@battle-racing/br-common-lib 1.2.4 → 1.2.6

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.
@@ -0,0 +1,5 @@
1
+ export declare const CHECKPOINT_TYPE: {
2
+ readonly TRACK: "Track";
3
+ readonly POWER_UP: "PowerUp";
4
+ readonly SHORTCUT: "Shortcut";
5
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CHECKPOINT_TYPE = void 0;
4
+ exports.CHECKPOINT_TYPE = {
5
+ TRACK: 'Track',
6
+ POWER_UP: 'PowerUp',
7
+ SHORTCUT: 'Shortcut',
8
+ };
@@ -1,3 +1,4 @@
1
+ export * from './checkpoint-type';
1
2
  export * from './hardware';
2
3
  export * from './kart-status';
3
4
  export * from './module-name';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./checkpoint-type"), exports);
17
18
  __exportStar(require("./hardware"), exports);
18
19
  __exportStar(require("./kart-status"), exports);
19
20
  __exportStar(require("./module-name"), exports);
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KART_STATUS = void 0;
4
- // export const kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'] as const;
5
4
  exports.KART_STATUS = {
6
5
  STAND_BY: 'standBy',
7
6
  IN_GAME: 'in-game',
@@ -1,5 +1,3 @@
1
- export type CheckpointType = 'Track' | 'PowerUp' | null;
2
- export declare enum checkpointType {
3
- Track = "Track",
4
- PowerUp = "PowerUp"
5
- }
1
+ import { CHECKPOINT_TYPE } from '../../constants';
2
+ import type { ObjectValues } from '../utils';
3
+ export type CheckpointType = ObjectValues<typeof CHECKPOINT_TYPE>;
@@ -1,8 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkpointType = void 0;
4
- var checkpointType;
5
- (function (checkpointType) {
6
- checkpointType["Track"] = "Track";
7
- checkpointType["PowerUp"] = "PowerUp";
8
- })(checkpointType || (exports.checkpointType = checkpointType = {}));
@@ -1,4 +1,5 @@
1
1
  import type { GameTrack } from '../../gameTrack';
2
+ import type { ShowLightsColorParams, ShowLightsEffectParams } from '../../hardware';
2
3
  import type { Response } from '../../response';
3
4
  export interface SocketGameTrackEventsParams {
4
5
  'game-track:init:response': Response<GameTrack>;
@@ -6,5 +7,7 @@ export interface SocketGameTrackEventsParams {
6
7
  export interface SocketGameTrackEventParams {
7
8
  'game-track:emergency:activate': undefined;
8
9
  'game-track:emergency:deactivate': undefined;
10
+ 'game-track:lights:showEffect': ShowLightsEffectParams;
11
+ 'game-track:lights:showColor': ShowLightsColorParams;
9
12
  }
10
13
  export type SocketGameTrackServerToClientEventsParams = SocketGameTrackEventsParams & SocketGameTrackEventParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,5 @@
1
+ export const CHECKPOINT_TYPE = {
2
+ TRACK: 'Track',
3
+ POWER_UP: 'PowerUp',
4
+ SHORTCUT: 'Shortcut',
5
+ } as const;
@@ -1,3 +1,4 @@
1
+ export * from './checkpoint-type';
1
2
  export * from './hardware';
2
3
  export * from './kart-status';
3
4
  export * from './module-name';
@@ -1,4 +1,3 @@
1
- // export const kartStatus = ['standBy', 'in-game', 'yellow-flag', 'emergency', 'pits', 'eliminated'] as const;
2
1
  export const KART_STATUS = {
3
2
  STAND_BY: 'standBy',
4
3
  IN_GAME: 'in-game',
@@ -6,4 +5,4 @@ export const KART_STATUS = {
6
5
  EMERGENCY: 'emergency',
7
6
  PITS: 'pits',
8
7
  ELIMINATED: 'eliminated',
9
- } as const;
8
+ } as const;
@@ -1,6 +1,4 @@
1
- export type CheckpointType = 'Track' | 'PowerUp' | null;
1
+ import { CHECKPOINT_TYPE } from '../../constants';
2
+ import type { ObjectValues } from '../utils';
2
3
 
3
- export enum checkpointType {
4
- Track = 'Track',
5
- PowerUp = 'PowerUp',
6
- }
4
+ export type CheckpointType = ObjectValues<typeof CHECKPOINT_TYPE>;
@@ -1,4 +1,5 @@
1
1
  import type { GameTrack } from '../../gameTrack';
2
+ import type { ShowLightsColorParams, ShowLightsEffectParams } from '../../hardware';
2
3
  import type { Response } from '../../response';
3
4
 
4
5
  export interface SocketGameTrackEventsParams {
@@ -9,6 +10,9 @@ export interface SocketGameTrackEventsParams {
9
10
  export interface SocketGameTrackEventParams {
10
11
  'game-track:emergency:activate': undefined;
11
12
  'game-track:emergency:deactivate': undefined;
13
+
14
+ 'game-track:lights:showEffect': ShowLightsEffectParams;
15
+ 'game-track:lights:showColor': ShowLightsColorParams;
12
16
  }
13
17
 
14
18
  export type SocketGameTrackServerToClientEventsParams = SocketGameTrackEventsParams & SocketGameTrackEventParams;