@battle-racing/br-common-lib 2.4.1 → 2.5.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.
@@ -4,4 +4,6 @@ export * from './flag-media-name';
4
4
  export * from './flag-status';
5
5
  export * from './lights-effect';
6
6
  export * from './rgb-status';
7
+ export * from './screen-status';
8
+ export * from './screen-view';
7
9
  export * from './speed-status';
@@ -20,4 +20,6 @@ __exportStar(require("./flag-media-name"), exports);
20
20
  __exportStar(require("./flag-status"), exports);
21
21
  __exportStar(require("./lights-effect"), exports);
22
22
  __exportStar(require("./rgb-status"), exports);
23
+ __exportStar(require("./screen-status"), exports);
24
+ __exportStar(require("./screen-view"), exports);
23
25
  __exportStar(require("./speed-status"), exports);
@@ -0,0 +1,7 @@
1
+ export declare const SCREEN_STATUS: {
2
+ readonly DEBUG: "Debug";
3
+ readonly ACTIVATED: "Activated";
4
+ readonly DEACTIVATED: "Deactivated";
5
+ readonly UNKNOWN: "Unknown";
6
+ readonly ERROR: "Error";
7
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SCREEN_STATUS = void 0;
4
+ const base_hardware_status_1 = require("./base-hardware-status");
5
+ exports.SCREEN_STATUS = {
6
+ ...base_hardware_status_1.BASE_HARDWARE_STATUS,
7
+ DEBUG: 'Debug',
8
+ };
@@ -0,0 +1,9 @@
1
+ export declare const SCREEN_VIEW: {
2
+ readonly HOME: "Home";
3
+ readonly COUNTDOWN: "Countdown";
4
+ readonly RACE: "Race";
5
+ readonly GAME_SUMMARY: "GameSummary";
6
+ readonly INSTRUCTION_VIDEO: "InstructionVideo";
7
+ readonly BATTLE: "Battle";
8
+ readonly DEBUG: "Debug";
9
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SCREEN_VIEW = void 0;
4
+ exports.SCREEN_VIEW = {
5
+ HOME: 'Home',
6
+ COUNTDOWN: 'Countdown',
7
+ RACE: 'Race',
8
+ GAME_SUMMARY: 'GameSummary',
9
+ INSTRUCTION_VIDEO: 'InstructionVideo',
10
+ BATTLE: 'Battle',
11
+ DEBUG: 'Debug',
12
+ };
@@ -1,10 +1,12 @@
1
1
  import type { FlagStatus } from './flag';
2
2
  import type { RGBStatus } from './rgb';
3
+ import type { ScreenStatus } from './screen';
3
4
  import type { SpeedStatus } from './speed';
4
5
  export type KartHardwareState = {
5
6
  speed: SpeedStatus | null;
6
7
  rgb: RGBStatus | null;
7
8
  flag: FlagStatus | null;
9
+ screen: ScreenStatus | null;
8
10
  isConnectedToServer: boolean;
9
11
  isSteeringWheelPressed: boolean;
10
12
  };
@@ -0,0 +1,6 @@
1
+ import { ScreenStatus } from './ScreenStatus';
2
+ import { ScreenView } from './ScreenView';
3
+ export interface ScreenModuleStatus {
4
+ latestView: ScreenView;
5
+ screenStatus: ScreenStatus;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { SCREEN_STATUS } from '../../../constants';
2
+ import { ObjectValues } from '../../utils';
3
+ export type ScreenStatus = ObjectValues<typeof SCREEN_STATUS>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,3 @@
1
- export type ScreenView = 'Home' | 'Countdown' | 'Race' | 'Battle' | 'Victory' | 'Defeat';
1
+ import { SCREEN_VIEW } from '../../../constants';
2
+ import { ObjectValues } from '../../utils';
3
+ export type ScreenView = ObjectValues<typeof SCREEN_VIEW>;
@@ -4,7 +4,9 @@ export * from './ScreenDebugViewInput';
4
4
  export * from './ScreenFinishViewInput';
5
5
  export * from './ScreenGameTimeLeft';
6
6
  export * from './ScreenHomeViewInput';
7
+ export * from './ScreenModuleStatus';
7
8
  export * from './ScreenRaceViewConfig';
9
+ export * from './ScreenStatus';
8
10
  export * from './ScreenUpdateGameViewInput';
9
11
  export * from './ScreenView';
10
12
  export * from './ScreenViewBaseConfig';
@@ -20,7 +20,9 @@ __exportStar(require("./ScreenDebugViewInput"), exports);
20
20
  __exportStar(require("./ScreenFinishViewInput"), exports);
21
21
  __exportStar(require("./ScreenGameTimeLeft"), exports);
22
22
  __exportStar(require("./ScreenHomeViewInput"), exports);
23
+ __exportStar(require("./ScreenModuleStatus"), exports);
23
24
  __exportStar(require("./ScreenRaceViewConfig"), exports);
25
+ __exportStar(require("./ScreenStatus"), exports);
24
26
  __exportStar(require("./ScreenUpdateGameViewInput"), exports);
25
27
  __exportStar(require("./ScreenView"), exports);
26
28
  __exportStar(require("./ScreenViewBaseConfig"), exports);
@@ -1,4 +1,4 @@
1
- import type { BallSensorDiskThrowerModuleStatus, DiskSensorBallShooterModuleStatus, EmergencyModuleStatus, FlagModuleStatus, RGBModuleStatus, SpeedModuleStatus, StarLaserModuleStatus, SteeringWheelModuleStatus } from '../hardware';
1
+ import type { BallSensorDiskThrowerModuleStatus, DiskSensorBallShooterModuleStatus, EmergencyModuleStatus, FlagModuleStatus, RGBModuleStatus, ScreenModuleStatus, SpeedModuleStatus, StarLaserModuleStatus, SteeringWheelModuleStatus } from '../hardware';
2
2
  /** Data that are triggered from Hardware Modules of Kart */
3
3
  export type SocketHardwareOnDataEventsParams = {
4
4
  'hardware:disk-sensor-ball-shooter:onModuleStatus': DiskSensorBallShooterModuleStatus;
@@ -9,6 +9,7 @@ export type SocketHardwareOnDataEventsParams = {
9
9
  'hardware:left-star-back-laser:onModuleStatus': StarLaserModuleStatus;
10
10
  'hardware:right-star-front-laser:onModuleStatus': StarLaserModuleStatus;
11
11
  'hardware:steering-wheel:onModuleStatus': SteeringWheelModuleStatus;
12
+ 'hardware:screen:onModuleStatus': ScreenModuleStatus;
12
13
  };
13
14
  /** Data that are triggered from Hardware Modules of Game Track */
14
15
  export type SocketGameTrackHardwareOnDataEventsParams = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -4,4 +4,6 @@ export * from './flag-media-name';
4
4
  export * from './flag-status';
5
5
  export * from './lights-effect';
6
6
  export * from './rgb-status';
7
+ export * from './screen-status';
8
+ export * from './screen-view';
7
9
  export * from './speed-status';
@@ -0,0 +1,6 @@
1
+ import { BASE_HARDWARE_STATUS } from './base-hardware-status';
2
+
3
+ export const SCREEN_STATUS = {
4
+ ...BASE_HARDWARE_STATUS,
5
+ DEBUG: 'Debug',
6
+ } as const;
@@ -0,0 +1,9 @@
1
+ export const SCREEN_VIEW = {
2
+ HOME: 'Home',
3
+ COUNTDOWN: 'Countdown',
4
+ RACE: 'Race',
5
+ GAME_SUMMARY: 'GameSummary',
6
+ INSTRUCTION_VIDEO: 'InstructionVideo',
7
+ BATTLE: 'Battle',
8
+ DEBUG: 'Debug',
9
+ } as const;
@@ -1,11 +1,13 @@
1
1
  import type { FlagStatus } from './flag';
2
2
  import type { RGBStatus } from './rgb';
3
+ import type { ScreenStatus } from './screen';
3
4
  import type { SpeedStatus } from './speed';
4
5
 
5
6
  export type KartHardwareState = {
6
7
  speed: SpeedStatus | null;
7
8
  rgb: RGBStatus | null;
8
9
  flag: FlagStatus | null;
10
+ screen: ScreenStatus | null;
9
11
  isConnectedToServer: boolean;
10
12
  isSteeringWheelPressed: boolean;
11
13
  };
@@ -0,0 +1,7 @@
1
+ import { ScreenStatus } from './ScreenStatus';
2
+ import { ScreenView } from './ScreenView';
3
+
4
+ export interface ScreenModuleStatus {
5
+ latestView: ScreenView;
6
+ screenStatus: ScreenStatus;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { SCREEN_STATUS } from '../../../constants';
2
+ import { ObjectValues } from '../../utils';
3
+
4
+ export type ScreenStatus = ObjectValues<typeof SCREEN_STATUS>;
@@ -1 +1,4 @@
1
- export type ScreenView = 'Home' | 'Countdown' | 'Race' | 'Battle' | 'Victory' | 'Defeat';
1
+ import { SCREEN_VIEW } from '../../../constants';
2
+ import { ObjectValues } from '../../utils';
3
+
4
+ export type ScreenView = ObjectValues<typeof SCREEN_VIEW>;
@@ -4,7 +4,9 @@ export * from './ScreenDebugViewInput';
4
4
  export * from './ScreenFinishViewInput';
5
5
  export * from './ScreenGameTimeLeft';
6
6
  export * from './ScreenHomeViewInput';
7
+ export * from './ScreenModuleStatus';
7
8
  export * from './ScreenRaceViewConfig';
9
+ export * from './ScreenStatus';
8
10
  export * from './ScreenUpdateGameViewInput';
9
11
  export * from './ScreenView';
10
12
  export * from './ScreenViewBaseConfig';
@@ -4,6 +4,7 @@ import type {
4
4
  EmergencyModuleStatus,
5
5
  FlagModuleStatus,
6
6
  RGBModuleStatus,
7
+ ScreenModuleStatus,
7
8
  SpeedModuleStatus,
8
9
  StarLaserModuleStatus,
9
10
  SteeringWheelModuleStatus,
@@ -19,6 +20,7 @@ export type SocketHardwareOnDataEventsParams = {
19
20
  'hardware:left-star-back-laser:onModuleStatus': StarLaserModuleStatus;
20
21
  'hardware:right-star-front-laser:onModuleStatus': StarLaserModuleStatus;
21
22
  'hardware:steering-wheel:onModuleStatus': SteeringWheelModuleStatus;
23
+ 'hardware:screen:onModuleStatus': ScreenModuleStatus;
22
24
  };
23
25
 
24
26
  /** Data that are triggered from Hardware Modules of Game Track */