@hadoku/game-ui 0.1.38 → 0.1.39
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.
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Look } from '@wolffm/platform-wire/look';
|
|
2
3
|
export interface RoomFrontMember {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
5
6
|
avatarId?: string;
|
|
7
|
+
/** Their picture and cosmetics: drawn instead of the character, as chat and the seats draw them. */
|
|
8
|
+
look?: Look;
|
|
6
9
|
}
|
|
7
10
|
/** Every number and label a row draws besides its name, its lock and its roster — a game's own derivation, computed before the room reaches this file. */
|
|
8
11
|
export interface RoomFrontView {
|
package/dist/seats/platform.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ export interface PlatformSeats {
|
|
|
42
42
|
look?: Look;
|
|
43
43
|
}[];
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export interface PlatformSeatsOptions {
|
|
46
|
+
/** The most seats the room can grow to: no "+1" slot at or past it. */
|
|
46
47
|
ceiling: number;
|
|
47
|
-
|
|
48
|
+
/** `false` for a game with no Ready step (its Start is a press, never a readiness gate): every member reads ready, so no ring says "not ready" for no reason. */
|
|
49
|
+
readiness?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare function platformSeats(room: PlatformSeatRoom, myId: string | null, opts: PlatformSeatsOptions): PlatformSeats;
|
package/dist/seats/platform.js
CHANGED
|
@@ -20,7 +20,7 @@ export function platformSeats(room, myId, opts) {
|
|
|
20
20
|
name: member.name,
|
|
21
21
|
...(member.avatarId === undefined ? {} : { avatarId: member.avatarId }),
|
|
22
22
|
...(member.look === undefined ? {} : { look: member.look }),
|
|
23
|
-
ready: member.ready === true,
|
|
23
|
+
ready: opts.readiness === false || member.ready === true,
|
|
24
24
|
leader: member.id === room.leader,
|
|
25
25
|
mine: member.id === myId,
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/game-ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.39",
|
|
4
|
+
"gitHead": "1f205041f6382de02221007ebda7bd1ba96e417d",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The browser parts any hosted game shares, above ui-shell: the room shell and session, seats and looks, the room route, the front page's generic pieces (gate, polls, gallery, patch notes), the bundle slot and relay channel a game's client mounts in, settings and trim screens, the HTTP and socket helpers, and the generic components (modal, popover, avatar, action button, radio cards). Knows no game; Magic's UI (games/magic/ui) plugs in, composed by the site (apps/ui). MIT; imports only react, react-dom, socket.io-client, @wolffm/* and the platform packages.",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"react-dom": "^19.2.8"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.
|
|
53
|
-
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.
|
|
52
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.39",
|
|
53
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.39",
|
|
54
54
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.27",
|
|
55
55
|
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.109",
|
|
56
56
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.109",
|