screeps-connectivity 0.2.3 → 0.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 0bd54f3: Add badge editor modal to settings panel with color picker, design selector, and variation controls. Export badge color utilities from library for use in UI components.
8
+
3
9
  ## 0.2.3
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screeps-connectivity",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "repository": {
@@ -32,8 +32,8 @@ export interface GameEndpoints {
32
32
  checkUniqueFlagName(name: string): Promise<ApiCheckUniqueFlagNameResponse>
33
33
  changeFlagColor(room: string, name: string, color: number, secondaryColor: number): Promise<ApiChangeFlagColorResponse>
34
34
  removeFlag(room: string, name: string): Promise<ApiRemoveFlagResponse>
35
- genUniqueObjectName(type: string): Promise<ApiGenUniqueObjectNameResponse>
36
- checkUniqueObjectName(type: string, name: string): Promise<ApiCheckUniqueObjectNameResponse>
35
+ genUniqueObjectName(type: string, shard?: string | null): Promise<ApiGenUniqueObjectNameResponse>
36
+ checkUniqueObjectName(type: string, name: string, shard?: string | null): Promise<ApiCheckUniqueObjectNameResponse>
37
37
  placeSpawn(room: string, x: number, y: number, name?: string, shard?: string | null): Promise<{ ok: number }>
38
38
  createConstruction(room: string, x: number, y: number, structureType: string, name?: string, shard?: string | null): Promise<{ ok: number }>
39
39
  removeConstructionSite(room: string, ids: string[], shard?: string | null): Promise<{ ok: number }>
@@ -78,8 +78,8 @@ export function createGameEndpoints(http: HttpClient): GameEndpoints {
78
78
  checkUniqueFlagName: (name) => http.request('POST', '/api/game/check-unique-flag-name', { name }),
79
79
  changeFlagColor: (room, name, color, secondaryColor) => http.request('POST', '/api/game/change-flag-color', { room, name, color, secondaryColor }),
80
80
  removeFlag: (room, name) => http.request('POST', '/api/game/remove-flag', { room, name }),
81
- genUniqueObjectName: (type) => http.request('POST', '/api/game/gen-unique-object-name', { type }),
82
- checkUniqueObjectName: (type, name) => http.request('POST', '/api/game/check-unique-object-name', { type, name }),
81
+ genUniqueObjectName: (type, shard) => http.request('POST', '/api/game/gen-unique-object-name', withShard({ type }, shard)),
82
+ checkUniqueObjectName: (type, name, shard) => http.request('POST', '/api/game/check-unique-object-name', withShard({ type, name }, shard)),
83
83
  placeSpawn: (room, x, y, name, shard) => http.request('POST', '/api/game/place-spawn', withShard({ room, x, y, ...(name ? { name } : {}) }, shard)),
84
84
  createConstruction: (room, x, y, structureType, name, shard) => http.request('POST', '/api/game/create-construction', withShard({ room, x, y, structureType, ...(name ? { name } : {}) }, shard)),
85
85
  removeConstructionSite: (room, ids, shard) => http.request('POST', '/api/game/add-object-intent', withShard({ _id: 'room', room, name: 'removeConstructionSite', intent: ids.map(id => ({ id, roomName: room })) }, shard)),
package/src/index.ts CHANGED
@@ -41,6 +41,8 @@ export { fetchServerVersion, fetchAuthModInfo, checkUsername, checkEmail, regist
41
41
  export type { ApiAuthModInfoResponse } from './http/fetchServerVersion.js'
42
42
 
43
43
  export { badgeToSvg } from './badge/index.js'
44
+ export { BadgeColors } from './badge/colors.js'
45
+ export type { ColorEntry } from './badge/colors.js'
44
46
  export type { RoomStoreEvents, UserStoreEvents, ServerStoreEvents, MapStoreEvents, Map2SubscriptionStatus, HttpClientEvents } from './types/events.js'
45
47
 
46
48
  export type { UserMessagesEndpoints } from './http/endpoints/user-messages.js'