@hadoku/game-ui 0.1.52 → 0.1.53
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/components/Button.css +3 -3
- package/dist/components/ConnectionBanner.css +11 -11
- package/dist/components/StatusPill.css +66 -0
- package/dist/components/StatusPill.d.ts +2 -1
- package/dist/components/StatusPill.js +3 -2
- package/dist/embed/bound-room.d.ts +1 -1
- package/dist/embed/bound-room.js +8 -16
- package/dist/rooms/room-core-client.d.ts +2 -0
- package/dist/rooms/room-core-client.js +4 -2
- package/dist/seats/SeatChip.d.ts +3 -1
- package/dist/seats/SeatChip.js +2 -2
- package/package.json +10 -10
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
.ct-action--danger:hover,
|
|
29
29
|
.ct-action--danger:focus-visible {
|
|
30
|
-
background: var(--danger);
|
|
31
|
-
color: var(--on-danger);
|
|
32
|
-
border-color: var(--danger);
|
|
30
|
+
background: var(--color-danger);
|
|
31
|
+
color: var(--color-on-danger);
|
|
32
|
+
border-color: var(--color-danger);
|
|
33
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The connection banner (`ConnectionBanner.tsx`).
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The connection banner (`ConnectionBanner.tsx`). Theme tokens only, so it reads the same in any
|
|
3
|
+
* game. The recovered edge is the theme's success unless a game names its own
|
|
4
|
+
* (`--conn-recovered-edge`: cardtable's colour-pie green).
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
.conn {
|
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
gap: 10px;
|
|
10
10
|
align-items: flex-start;
|
|
11
11
|
padding: 10px 14px;
|
|
12
|
-
border: 1px solid var(--
|
|
12
|
+
border: 1px solid var(--color-border);
|
|
13
13
|
border-left-width: 3px;
|
|
14
|
-
border-radius: var(--radius
|
|
15
|
-
background: var(--bg-
|
|
16
|
-
color: var(--
|
|
14
|
+
border-radius: var(--hdk-radius-lg);
|
|
15
|
+
background: var(--color-bg-card);
|
|
16
|
+
color: var(--color-text);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/* The phase, as a colour. Never the only signal — the label says it in words. */
|
|
20
20
|
.conn--connecting,
|
|
21
21
|
.conn--reconnecting,
|
|
22
22
|
.conn--resyncing {
|
|
23
|
-
border-left-color: var(--
|
|
23
|
+
border-left-color: var(--color-primary);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.conn--offline {
|
|
27
|
-
border-left-color: var(--
|
|
27
|
+
border-left-color: var(--color-warning);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.conn--recovered {
|
|
31
|
-
border-left-color: var(--
|
|
31
|
+
border-left-color: var(--conn-recovered-edge, var(--color-success));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.conn__dot {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.conn__detail {
|
|
76
|
-
color: var(--
|
|
76
|
+
color: var(--color-text-secondary);
|
|
77
77
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A status, drawn (`./StatusPill.tsx`): a shape, a colour and a word. The SHAPE is the primary
|
|
3
|
+
* signal (a tick or an open ring, `data-mark`) and the border style a second one, so nothing here
|
|
4
|
+
* depends on telling green from amber. Theme tokens only.
|
|
5
|
+
*
|
|
6
|
+
* `pill--button` is the same pill as a press (a seat's own Ready, which sets what the pill shows):
|
|
7
|
+
* a button's cursor, and the primary fill while it still asks to be pressed.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.pill {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.3rem;
|
|
14
|
+
padding: 0.1rem 0.5rem 0.1rem 0.35rem;
|
|
15
|
+
border: 1px solid currentcolor;
|
|
16
|
+
border-radius: 999px;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pill[data-state='yes'] {
|
|
23
|
+
color: var(--color-success-dark);
|
|
24
|
+
background: var(--color-success-bg);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pill[data-state='no'] {
|
|
28
|
+
color: var(--color-warning-dark);
|
|
29
|
+
background: var(--color-warning-bg);
|
|
30
|
+
border-style: dashed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pill--button {
|
|
34
|
+
font: inherit;
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Not ready yet: the action, in the primary colour. */
|
|
40
|
+
.pill--button[data-state='no'] {
|
|
41
|
+
color: var(--color-on-primary);
|
|
42
|
+
background: var(--color-primary);
|
|
43
|
+
border-color: var(--color-primary);
|
|
44
|
+
border-style: solid;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pill--button:hover:not(:disabled),
|
|
48
|
+
.pill--button:focus-visible {
|
|
49
|
+
border-color: var(--color-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pill--button:disabled {
|
|
53
|
+
cursor: default;
|
|
54
|
+
opacity: 0.6;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pill__mark {
|
|
58
|
+
width: 0.85rem;
|
|
59
|
+
height: 0.85rem;
|
|
60
|
+
flex: none;
|
|
61
|
+
fill: none;
|
|
62
|
+
stroke: currentcolor;
|
|
63
|
+
stroke-width: 1.8;
|
|
64
|
+
stroke-linecap: round;
|
|
65
|
+
stroke-linejoin: round;
|
|
66
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import './StatusPill.css';
|
|
1
2
|
/** A pass: the ready pill's tick. */
|
|
2
3
|
export declare const TICK = "M2.6 6.3 4.9 8.8 9.4 3.3";
|
|
3
4
|
/**
|
|
@@ -5,7 +6,7 @@ export declare const TICK = "M2.6 6.3 4.9 8.8 9.4 3.3";
|
|
|
5
6
|
*
|
|
6
7
|
* Colour alone is not a status — a third of the operator's friends could not
|
|
7
8
|
* read it — so each state has its OWN SHAPE (`data-mark`, drawn in an inline
|
|
8
|
-
* `<svg>` we own) and its own border style as well.
|
|
9
|
+
* `<svg>` we own) and its own border style as well. `./StatusPill.css` colours it;
|
|
9
10
|
* remove every colour from that file and this still reads.
|
|
10
11
|
*/
|
|
11
12
|
export declare function StatusPill({ testId, state, mark, label }: {
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
/*
|
|
3
3
|
* A ready state, drawn: the table's seats, a pod's seats and building list, a Gauntlet's choice.
|
|
4
4
|
*/
|
|
5
|
+
import './StatusPill.css';
|
|
5
6
|
/** A pass: the ready pill's tick. */
|
|
6
7
|
export const TICK = 'M2.6 6.3 4.9 8.8 9.4 3.3';
|
|
7
8
|
/**
|
|
@@ -9,9 +10,9 @@ export const TICK = 'M2.6 6.3 4.9 8.8 9.4 3.3';
|
|
|
9
10
|
*
|
|
10
11
|
* Colour alone is not a status — a third of the operator's friends could not
|
|
11
12
|
* read it — so each state has its OWN SHAPE (`data-mark`, drawn in an inline
|
|
12
|
-
* `<svg>` we own) and its own border style as well.
|
|
13
|
+
* `<svg>` we own) and its own border style as well. `./StatusPill.css` colours it;
|
|
13
14
|
* remove every colour from that file and this still reads.
|
|
14
15
|
*/
|
|
15
16
|
export function StatusPill({ testId, state, mark, label }) {
|
|
16
|
-
return (_jsxs("span", { className: "pill
|
|
17
|
+
return (_jsxs("span", { className: "pill", "data-testid": testId, "data-state": state, "data-mark": mark, children: [_jsx("svg", { className: "pill__mark", viewBox: "0 0 12 12", "aria-hidden": "true", focusable: "false", children: mark === 'tick' ? _jsx("path", { d: TICK }) : _jsx("circle", { cx: "6", cy: "6", r: "3.4" }) }), label] }));
|
|
17
18
|
}
|
|
@@ -9,7 +9,7 @@ export type BindOutcome = {
|
|
|
9
9
|
};
|
|
10
10
|
/** Which of this game's rooms a host room plays in. Never throws: a failure is an outcome the embed renders. */
|
|
11
11
|
export type BindRoom = (hostRoom: string) => Promise<BindOutcome>;
|
|
12
|
-
/** The game server's own answer, over `fetchImpl`. */
|
|
12
|
+
/** The game server's own answer (room-core's binding, through game-ui's room client), over `fetchImpl`. */
|
|
13
13
|
export declare function bindWatchpartyRoom(fetchImpl?: Fetch): BindRoom;
|
|
14
14
|
export type Binding = {
|
|
15
15
|
state: 'binding';
|
package/dist/embed/bound-room.js
CHANGED
|
@@ -12,24 +12,16 @@
|
|
|
12
12
|
import { useEffect, useState } from 'react';
|
|
13
13
|
import { THEME_FAMILIES } from '@wolffm/themes';
|
|
14
14
|
import { ROOM_ID_RE } from '@wolffm/platform-wire/room-feed';
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import { isRecord, pageFetch } from "../http.js";
|
|
16
|
+
import { roomCoreClient } from "../rooms/room-core-client.js";
|
|
17
|
+
/** A bound room's id, and only one this game's server could have made (`ROOM_ID_RE`): anything else is not a room. */
|
|
18
|
+
const boundRoomId = (body) => (isRecord(body) && typeof body.id === 'string' && ROOM_ID_RE.test(body.id) ? body.id : null);
|
|
19
|
+
/** The game server's own answer (room-core's binding, through game-ui's room client), over `fetchImpl`. */
|
|
17
20
|
export function bindWatchpartyRoom(fetchImpl = pageFetch) {
|
|
21
|
+
const rooms = roomCoreClient({ parse: boundRoomId, fetch: fetchImpl });
|
|
18
22
|
return async (hostRoom) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
res = await sendJson(apiUrl('rooms/watchparty'), 'POST', { room: hostRoom }, fetchImpl);
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return { ok: false, message: 'Could not reach the server.' };
|
|
25
|
-
}
|
|
26
|
-
const body = await bodyOf(res);
|
|
27
|
-
if (!res.ok)
|
|
28
|
-
return { ok: false, message: `Could not open this room’s table: ${serverMessage(body, res.status)}.` };
|
|
29
|
-
const roomId = isRecord(body) ? body.id : undefined;
|
|
30
|
-
if (typeof roomId !== 'string' || !ROOM_ID_RE.test(roomId))
|
|
31
|
-
return { ok: false, message: 'The server answered with something that is not a room.' };
|
|
32
|
-
return { ok: true, roomId };
|
|
23
|
+
const outcome = await rooms.bindWatchparty(hostRoom);
|
|
24
|
+
return outcome.ok ? { ok: true, roomId: outcome.room } : outcome;
|
|
33
25
|
};
|
|
34
26
|
}
|
|
35
27
|
/**
|
|
@@ -53,6 +53,8 @@ export interface RoomCoreClient<R> {
|
|
|
53
53
|
lowerSeatCapacity(roomId: string, count: number): Promise<RoomOutcome<R>>;
|
|
54
54
|
/** The leader hands the room to another member, seated or watching. */
|
|
55
55
|
makeLeader(roomId: string, memberId: string): Promise<RoomOutcome<R>>;
|
|
56
|
+
/** The room a host's room (watchparty's game slot) plays in, made on first use and joined after: the server derives it from `hostRoom`. */
|
|
57
|
+
bindWatchparty(hostRoom: string): Promise<RoomOutcome<R>>;
|
|
56
58
|
/** Any other write that answers with the room, under `/api/rooms`: `path` starts with `/` or is `''`. */
|
|
57
59
|
write(path: string, payload: unknown, whatFailed: string, method?: 'POST' | 'PATCH' | 'PUT'): Promise<RoomOutcome<R>>;
|
|
58
60
|
/** Any other read of one room under `/api/rooms`, as `get` reads one. */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* The browser's client for game-server's generic room routes (`@hadoku/game-server/http/room-core`):
|
|
3
|
-
* the room list, a room, create, join, leave, ready, close, reset,
|
|
4
|
-
* leader's close/open, bot in and out, remove, fewer seats, a new leader)
|
|
3
|
+
* the room list, a room, create, join, leave, ready, close, reset, the seat ops (sit, stand, the
|
|
4
|
+
* leader's close/open, bot in and out, remove, fewer seats, a new leader) and an embed's binding to
|
|
5
|
+
* its host's room. One copy, so every game
|
|
5
6
|
* reads the same refusals the same way; a game supplies only how its room body parses
|
|
6
7
|
* (`parse`), and adds its own routes with `write`/`read`.
|
|
7
8
|
*
|
|
@@ -120,6 +121,7 @@ export function roomCoreClient({ parse, fetch: fetchImpl = pageFetch, base = api
|
|
|
120
121
|
removeFromSeat: (roomId, memberId) => seat(roomId, 'seats/remove', { memberId }),
|
|
121
122
|
lowerSeatCapacity: (roomId, count) => seat(roomId, 'seats/capacity', { count }),
|
|
122
123
|
makeLeader: (roomId, memberId) => seat(roomId, 'leader', { memberId }),
|
|
124
|
+
bindWatchparty: (hostRoom) => send('/watchparty', { room: hostRoom }, 'Could not open this room’s table'),
|
|
123
125
|
write: (path, payload, whatFailed, method = 'POST') => send(path, payload, whatFailed, method),
|
|
124
126
|
read,
|
|
125
127
|
};
|
package/dist/seats/SeatChip.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export interface SeatListProps {
|
|
|
42
42
|
iLead: boolean;
|
|
43
43
|
/** An event's room before its seats open: nobody sits, nor gives a seat to the bot. */
|
|
44
44
|
shut?: boolean;
|
|
45
|
+
/** `false` for a game with no Ready step (its Start is a press): no seat draws a ready pill. */
|
|
46
|
+
readiness?: boolean;
|
|
45
47
|
/** A fixed field (a Challenge's): no seat is grown, given to the bot, taken from it or closed. */
|
|
46
48
|
fieldFixed?: boolean;
|
|
47
49
|
/** How many of `slots` are seats the room has today — the rest are one caller-grown "+1" slot. An open seat at or past this index offers Sit to nobody already seated, and Close to nobody at all. */
|
|
@@ -73,4 +75,4 @@ export interface SeatListProps {
|
|
|
73
75
|
onMakeLeader?: (memberId: string) => void;
|
|
74
76
|
}
|
|
75
77
|
/** A strip of seats, one `<li>` each: dashed-open / "×"-closed / the bot's own look / a member's avatar, a label underneath, every action its own always-visible button. */
|
|
76
|
-
export declare function SeatList({ slots, iLead, shut, fieldFixed, realSeatCount, mySeat, onSit, onBotOn, onBotOff, onCloseSeat, onOpenSeat, onRemoveMember, onBotReplace, onMakeLeader }: SeatListProps): import("react").JSX.Element;
|
|
78
|
+
export declare function SeatList({ slots, iLead, shut, readiness, fieldFixed, realSeatCount, mySeat, onSit, onBotOn, onBotOff, onCloseSeat, onOpenSeat, onRemoveMember, onBotReplace, onMakeLeader }: SeatListProps): import("react").JSX.Element;
|
package/dist/seats/SeatChip.js
CHANGED
|
@@ -23,7 +23,7 @@ import './SeatChip.css';
|
|
|
23
23
|
/** The same crown `magic-room-ui.tsx` draws for its own direct uses — duplicated, not imported, so this file pulls in nothing of Magic's. */
|
|
24
24
|
export const SEAT_CROWN_PATH = 'M2 9V3.5l2.2 2L6 2.6l1.8 2.9L10 3.5V9Z';
|
|
25
25
|
/** A strip of seats, one `<li>` each: dashed-open / "×"-closed / the bot's own look / a member's avatar, a label underneath, every action its own always-visible button. */
|
|
26
|
-
export function SeatList({ slots, iLead, shut = false, fieldFixed = false, realSeatCount, mySeat, onSit, onBotOn, onBotOff, onCloseSeat, onOpenSeat, onRemoveMember, onBotReplace, onMakeLeader }) {
|
|
26
|
+
export function SeatList({ slots, iLead, shut = false, readiness = true, fieldFixed = false, realSeatCount, mySeat, onSit, onBotOn, onBotOff, onCloseSeat, onOpenSeat, onRemoveMember, onBotReplace, onMakeLeader }) {
|
|
27
27
|
return (_jsx("ul", { className: "pod-seats", "data-testid": "pod-seats", children: slots.map(({ seat, occupant }) => {
|
|
28
28
|
if (occupant.kind === 'open') {
|
|
29
29
|
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, children: [_jsx(ActionButton, { action: "sit", className: "pod-seats__avatar pod-seats__avatar--open", "data-testid": "pod-seat-sit", "data-seat": seat, "aria-label": `Sit in seat ${seat + 1}`, disabled: shut || (mySeat !== null && seat >= realSeatCount), onPress: () => onSit?.(seat), children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": "true", children: _jsx("path", { d: "M12 5v14M5 12h14" }) }) }), _jsx("span", { className: "pod-seats__label", children: "Open" }), !fieldFixed && iLead && (_jsxs("span", { className: "pod-seats__actions", children: [_jsx(ActionButton, { action: "ai", className: "pod-seats__action ct-action", "data-testid": "pod-seat-ai", "data-seat": seat, "aria-label": `Fill seat ${seat + 1} with AI`, disabled: shut, onPress: () => onBotOn?.(seat), children: "AI" }), seat < realSeatCount && (_jsx(ActionButton, { action: "close", className: "pod-seats__action ct-action", "data-testid": "pod-seat-close", "data-seat": seat, "aria-label": `Close seat ${seat + 1}`, onPress: () => onCloseSeat?.(seat), children: "Close" }))] }))] }, seat));
|
|
@@ -36,6 +36,6 @@ export function SeatList({ slots, iLead, shut = false, fieldFixed = false, realS
|
|
|
36
36
|
}
|
|
37
37
|
const { id, name, avatarId, look, ready, leader, mine } = occupant;
|
|
38
38
|
const face = { id: avatarId ?? null, look };
|
|
39
|
-
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-mine": mine ? '' : undefined, children: [_jsxs("span", { className: "pod-seats__avatar-wrap", children: [_jsx("span", { className: "pod-seats__avatar", "data-ready": ready ? 'true' : 'false', children: _jsx(Avatar, { ...face, fallback: "initial", name: name, className: "pod-seats__avatar-img", fallbackClassName: "pod-seats__avatar-fallback" }) }), leader && (_jsxs("svg", { className: "pod-seats__crown", "data-testid": `pod-seat-${seat}-leader`, viewBox: "0 0 12 12", role: "img", "aria-label": "Room owner", children: [_jsx("title", { children: "Room owner" }), _jsx("path", { d: SEAT_CROWN_PATH })] }))] }), _jsx(PlayerName, { name: name, face: face, className: "pod-seats__label" }), _jsx(StatusPill, { testId: `pod-seat-${seat}-ready`, state: ready ? 'yes' : 'no', mark: ready ? 'tick' : 'ring', label: ready ? 'ready' : 'not ready' }), iLead && !mine && (onRemoveMember !== undefined || onBotReplace !== undefined || onMakeLeader !== undefined) && (_jsxs("span", { className: "pod-seats__actions", children: [onRemoveMember !== undefined && (_jsx(ActionButton, { action: "remove", className: "pod-seats__action ct-action", "data-testid": "pod-seat-remove", "data-seat": seat, "aria-label": `Remove ${name} from the table`, onPress: () => onRemoveMember(seat, id), children: "Remove" })), onBotReplace !== undefined && (_jsx(ActionButton, { action: "bot-replace", className: "pod-seats__action ct-action", "data-testid": "pod-seat-bot-replace", "data-seat": seat, "aria-label": `Put the bot in ${name}'s seat`, onPress: () => onBotReplace(seat, id), children: "Bot" })), onMakeLeader !== undefined && (_jsx(ActionButton, { action: "make-leader", className: "pod-seats__action ct-action", "data-testid": "pod-seat-make-leader", "data-seat": seat, "aria-label": `Make ${name} the room leader`, onPress: () => onMakeLeader(id), children: _jsx("svg", { className: "pod-seats__action-icon", viewBox: "0 0 12 12", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: SEAT_CROWN_PATH }) }) }))] }))] }, seat));
|
|
39
|
+
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-mine": mine ? '' : undefined, children: [_jsxs("span", { className: "pod-seats__avatar-wrap", children: [_jsx("span", { className: "pod-seats__avatar", "data-ready": ready ? 'true' : 'false', children: _jsx(Avatar, { ...face, fallback: "initial", name: name, className: "pod-seats__avatar-img", fallbackClassName: "pod-seats__avatar-fallback" }) }), leader && (_jsxs("svg", { className: "pod-seats__crown", "data-testid": `pod-seat-${seat}-leader`, viewBox: "0 0 12 12", role: "img", "aria-label": "Room owner", children: [_jsx("title", { children: "Room owner" }), _jsx("path", { d: SEAT_CROWN_PATH })] }))] }), _jsx(PlayerName, { name: name, face: face, className: "pod-seats__label" }), readiness && _jsx(StatusPill, { testId: `pod-seat-${seat}-ready`, state: ready ? 'yes' : 'no', mark: ready ? 'tick' : 'ring', label: ready ? 'ready' : 'not ready' }), iLead && !mine && (onRemoveMember !== undefined || onBotReplace !== undefined || onMakeLeader !== undefined) && (_jsxs("span", { className: "pod-seats__actions", children: [onRemoveMember !== undefined && (_jsx(ActionButton, { action: "remove", className: "pod-seats__action ct-action", "data-testid": "pod-seat-remove", "data-seat": seat, "aria-label": `Remove ${name} from the table`, onPress: () => onRemoveMember(seat, id), children: "Remove" })), onBotReplace !== undefined && (_jsx(ActionButton, { action: "bot-replace", className: "pod-seats__action ct-action", "data-testid": "pod-seat-bot-replace", "data-seat": seat, "aria-label": `Put the bot in ${name}'s seat`, onPress: () => onBotReplace(seat, id), children: "Bot" })), onMakeLeader !== undefined && (_jsx(ActionButton, { action: "make-leader", className: "pod-seats__action ct-action", "data-testid": "pod-seat-make-leader", "data-seat": seat, "aria-label": `Make ${name} the room leader`, onPress: () => onMakeLeader(id), children: _jsx("svg", { className: "pod-seats__action-icon", viewBox: "0 0 12 12", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: SEAT_CROWN_PATH }) }) }))] }))] }, seat));
|
|
40
40
|
}) }));
|
|
41
41
|
}
|
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.53",
|
|
4
|
+
"gitHead": "0166283dfda9b0764316999e9c07fb00acce23e9",
|
|
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,14 +49,14 @@
|
|
|
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.
|
|
54
|
-
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.
|
|
55
|
-
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.
|
|
56
|
-
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.
|
|
57
|
-
"@wolffm/task-ui-components": "npm:@hadoku/task-ui-components@^4.23.
|
|
58
|
-
"@wolffm/themes": "npm:@hadoku/themes@^5.14.
|
|
59
|
-
"@wolffm/watchparty-ui": "npm:@hadoku/watchparty-ui@^0.45.
|
|
52
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.57",
|
|
53
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.57",
|
|
54
|
+
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.28",
|
|
55
|
+
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.116",
|
|
56
|
+
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.116",
|
|
57
|
+
"@wolffm/task-ui-components": "npm:@hadoku/task-ui-components@^4.23.40",
|
|
58
|
+
"@wolffm/themes": "npm:@hadoku/themes@^5.14.9",
|
|
59
|
+
"@wolffm/watchparty-ui": "npm:@hadoku/watchparty-ui@^0.45.116",
|
|
60
60
|
"socket.io-client": "^4.8.3",
|
|
61
61
|
"zod": "4.5.4"
|
|
62
62
|
},
|