@hadoku/game-ui 0.1.154 → 0.1.156
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/EdgeCue.css +58 -0
- package/dist/components/edgeCue.d.ts +14 -0
- package/dist/components/edgeCue.js +46 -0
- package/dist/rooms/room-core-client.d.ts +7 -1
- package/dist/rooms/room-core-client.js +1 -1
- package/dist/rooms/screen/RoomShell.d.ts +6 -1
- package/dist/rooms/screen/RoomShell.js +22 -7
- package/dist/seats/SeatChip.css +11 -4
- package/dist/seats/SeatChip.js +6 -1
- package/package.json +4 -4
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The edge cue (the operator, 2026-11-02: "i would prefer if there was a '>' or '<' for which
|
|
3
|
+
* direction the extra cards are"): a fade with a small chevron in it, on each edge a sideways
|
|
4
|
+
* scroller can still scroll toward. `./edgeCue.ts` toggles the two classes; this draws them on the
|
|
5
|
+
* scroller's own `::before` (`‹`) and `::after` (`›`), so the scroller has no child of its own for
|
|
6
|
+
* them. Drawn first for portrait's lanes (`portrait.css`); the pod's seats and its bracket draw the
|
|
7
|
+
* same one.
|
|
8
|
+
*
|
|
9
|
+
* The scroller is a flex row. Each cue sits in it, sticky to its edge, and takes no room: its
|
|
10
|
+
* negative margin cancels its own width and the gap before it, so nothing moves when a cue appears.
|
|
11
|
+
* Sticky insets count from inside the scroller's padding, hence the negative padding that puts the
|
|
12
|
+
* cue flush with its visible edge. Vertically centred, over what peeks out from under it.
|
|
13
|
+
*
|
|
14
|
+
* A scroller sets, where they are not 0:
|
|
15
|
+
* --edge-cue-gap its own column gap
|
|
16
|
+
* --edge-cue-pad-l its left padding
|
|
17
|
+
* --edge-cue-pad-r its right padding
|
|
18
|
+
* --edge-cue-tail the room it keeps after its last item with its own `::after` (the cue keeps it too)
|
|
19
|
+
* --edge-cue-bg what it stands on, when that is not the page (a card): the colour the fade ends in
|
|
20
|
+
*/
|
|
21
|
+
.edge-cue.edge-cue--r::after,
|
|
22
|
+
.edge-cue.edge-cue--l::before {
|
|
23
|
+
--cue-w: 24px;
|
|
24
|
+
|
|
25
|
+
position: sticky;
|
|
26
|
+
align-self: stretch;
|
|
27
|
+
flex: none;
|
|
28
|
+
width: var(--cue-w);
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
padding-inline: 3px;
|
|
33
|
+
color: var(--color-text);
|
|
34
|
+
font-size: 20px;
|
|
35
|
+
font-weight: 700;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
text-shadow: 0 0 4px var(--edge-cue-bg, var(--color-bg));
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.edge-cue.edge-cue--r::after {
|
|
43
|
+
content: '›';
|
|
44
|
+
right: calc(-1 * var(--edge-cue-pad-r, 0px));
|
|
45
|
+
order: 999;
|
|
46
|
+
justify-content: flex-end;
|
|
47
|
+
margin-left: calc(var(--edge-cue-tail, 0px) - var(--cue-w) - var(--edge-cue-gap, 0px));
|
|
48
|
+
background: linear-gradient(90deg, transparent, var(--edge-cue-bg, var(--color-bg)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.edge-cue.edge-cue--l::before {
|
|
52
|
+
content: '‹';
|
|
53
|
+
left: calc(-1 * var(--edge-cue-pad-l, 0px));
|
|
54
|
+
order: -999;
|
|
55
|
+
justify-content: flex-start;
|
|
56
|
+
margin-right: calc(-1 * (var(--cue-w) + var(--edge-cue-gap, 0px)));
|
|
57
|
+
background: linear-gradient(-90deg, transparent, var(--edge-cue-bg, var(--color-bg)));
|
|
58
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import './EdgeCue.css';
|
|
3
|
+
/**
|
|
4
|
+
* Mark `el`'s edges: `edge-cue--l` while it can scroll left, `edge-cue--r` while it can scroll right.
|
|
5
|
+
* Drawn only where `el` also has the class `edge-cue`, which its owner gives it (portrait's lanes have it
|
|
6
|
+
* only in portrait, so a lane measured once in portrait draws nothing back on the desktop board).
|
|
7
|
+
*/
|
|
8
|
+
export declare function measureEdgeCue(el: HTMLElement): void;
|
|
9
|
+
/**
|
|
10
|
+
* Keep `ref`'s scroller's edge cue current: on its scroll, on a change of its own size (a window
|
|
11
|
+
* resized across a breakpoint), and after every commit of the component that draws it, since an item
|
|
12
|
+
* arriving or leaving changes its `scrollWidth` without resizing its box.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useEdgeCue(ref: RefObject<HTMLElement | null>): void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* A sideways scroller's edge cue (`./EdgeCue.css`): the fade and chevron on each edge it can still
|
|
3
|
+
* scroll toward. The direction is the information, so there is no count and no element: two classes
|
|
4
|
+
* on the scroller, toggled imperatively, since a scroll fires every frame while a finger drags it and
|
|
5
|
+
* two class toggles cost far less than a React render for the same frame.
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
8
|
+
import './EdgeCue.css';
|
|
9
|
+
const SCROLLS = new Set(['auto', 'scroll']);
|
|
10
|
+
/**
|
|
11
|
+
* Mark `el`'s edges: `edge-cue--l` while it can scroll left, `edge-cue--r` while it can scroll right.
|
|
12
|
+
* Drawn only where `el` also has the class `edge-cue`, which its owner gives it (portrait's lanes have it
|
|
13
|
+
* only in portrait, so a lane measured once in portrait draws nothing back on the desktop board).
|
|
14
|
+
*/
|
|
15
|
+
export function measureEdgeCue(el) {
|
|
16
|
+
// A strip that overflows without scrolling (a game drawing the seats in a row that spills on purpose) has no edge to cue.
|
|
17
|
+
const scrolls = SCROLLS.has(getComputedStyle(el).overflowX);
|
|
18
|
+
// A pixel of slack either way, for a fractional `scrollLeft`.
|
|
19
|
+
const room = scrolls ? el.scrollWidth - el.clientWidth : 0;
|
|
20
|
+
el.classList.toggle('edge-cue--l', el.scrollLeft > 1);
|
|
21
|
+
el.classList.toggle('edge-cue--r', el.scrollLeft < room - 1);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Keep `ref`'s scroller's edge cue current: on its scroll, on a change of its own size (a window
|
|
25
|
+
* resized across a breakpoint), and after every commit of the component that draws it, since an item
|
|
26
|
+
* arriving or leaving changes its `scrollWidth` without resizing its box.
|
|
27
|
+
*/
|
|
28
|
+
export function useEdgeCue(ref) {
|
|
29
|
+
useLayoutEffect(() => {
|
|
30
|
+
if (ref.current !== null)
|
|
31
|
+
measureEdgeCue(ref.current);
|
|
32
|
+
});
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const el = ref.current;
|
|
35
|
+
if (el === null)
|
|
36
|
+
return undefined;
|
|
37
|
+
const measure = () => measureEdgeCue(el);
|
|
38
|
+
el.addEventListener('scroll', measure, { passive: true });
|
|
39
|
+
const resized = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure);
|
|
40
|
+
resized?.observe(el);
|
|
41
|
+
return () => {
|
|
42
|
+
el.removeEventListener('scroll', measure);
|
|
43
|
+
resized?.disconnect();
|
|
44
|
+
};
|
|
45
|
+
}, [ref]);
|
|
46
|
+
}
|
|
@@ -33,7 +33,13 @@ export interface RoomCoreClient<R> {
|
|
|
33
33
|
get(roomId: string): Promise<R | null>;
|
|
34
34
|
create(body: Record<string, unknown>): Promise<RoomOutcome<R>>;
|
|
35
35
|
join(roomId: string, password?: string): Promise<RoomJoinOutcome<R>>;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* `POST /api/rooms/:id/leave`. Mid-tournament the server refuses it unless `drop` says the caller is
|
|
38
|
+
* leaving the tournament on purpose (the room's own Leave, confirmed): a way off the page never drops anyone.
|
|
39
|
+
*/
|
|
40
|
+
leave(roomId: string, opts?: {
|
|
41
|
+
drop?: boolean;
|
|
42
|
+
}): Promise<RoomOutcome<R>>;
|
|
37
43
|
ready(roomId: string, ready: boolean): Promise<RoomOutcome<R>>;
|
|
38
44
|
close(roomId: string): Promise<RoomEndOutcome>;
|
|
39
45
|
reset(roomId: string): Promise<RoomEndOutcome>;
|
|
@@ -109,7 +109,7 @@ export function roomCoreClient({ parse, fetch: fetchImpl = pageFetch, base = api
|
|
|
109
109
|
return { ok: false, reason: 'error', message: 'The server answered the join with something that is not a room.' };
|
|
110
110
|
return { ok: true, room };
|
|
111
111
|
},
|
|
112
|
-
leave: (roomId) => send(`${id(roomId)}/leave`, {}, 'Could not leave the room'),
|
|
112
|
+
leave: (roomId, opts) => send(`${id(roomId)}/leave${opts?.drop === true ? '?drop=1' : ''}`, {}, 'Could not leave the room'),
|
|
113
113
|
ready: (roomId, ready) => send(`${id(roomId)}/ready`, { ready }, 'Could not change your readiness'),
|
|
114
114
|
close: (roomId) => end(roomId, 'close', 'Could not close the room'),
|
|
115
115
|
reset: (roomId) => end(roomId, 'reset', 'Could not reset the room'),
|
|
@@ -18,6 +18,11 @@ export interface RoomShellProps {
|
|
|
18
18
|
* head row draws Leave, and the page's top bar leaves through it too (`room-exit.tsx`).
|
|
19
19
|
*/
|
|
20
20
|
leave?: LeaveRoom;
|
|
21
|
+
/**
|
|
22
|
+
* Leaving now costs the viewer their place in an event (a tournament under way), and this is what the
|
|
23
|
+
* leave is called: Leave reads so, asks once more before it leaves, and the top bar only goes home.
|
|
24
|
+
*/
|
|
25
|
+
leaveAsks?: string;
|
|
21
26
|
/** Close, Settings, and whatever the game type's own settings panel wants beside them. */
|
|
22
27
|
headerTools: ReactNode;
|
|
23
28
|
streamed: boolean;
|
|
@@ -40,4 +45,4 @@ export interface RoomShellProps {
|
|
|
40
45
|
/** The game type's own content: its setup, its game, in that order. */
|
|
41
46
|
children: ReactNode;
|
|
42
47
|
}
|
|
43
|
-
export declare function RoomShell({ shellRef, dataMembers, roomTitle, titleAside, settled, leave, headerTools, streamed, streamedSubLine, resolved, pending, pendingBody, streamedBody, locked, password, onPasswordChange, onPasswordSubmit, roomMissingMessage, children, }: RoomShellProps): import("react").JSX.Element;
|
|
48
|
+
export declare function RoomShell({ shellRef, dataMembers, roomTitle, titleAside, settled, leave, leaveAsks, headerTools, streamed, streamedSubLine, resolved, pending, pendingBody, streamedBody, locked, password, onPasswordChange, onPasswordSubmit, roomMissingMessage, children, }: RoomShellProps): import("react").JSX.Element;
|
|
@@ -15,15 +15,30 @@ import { useState } from 'react';
|
|
|
15
15
|
import { leaveRoomThen, useRoomHome, useRoomLeave } from "./room-exit.js";
|
|
16
16
|
import '../../components/Button.css';
|
|
17
17
|
import './RoomShell.css';
|
|
18
|
-
export function RoomShell({ shellRef, dataMembers, roomTitle, titleAside, settled, leave, headerTools, streamed, streamedSubLine, resolved, pending, pendingBody, streamedBody, locked, password, onPasswordChange, onPasswordSubmit, roomMissingMessage, children, }) {
|
|
19
|
-
useRoomLeave(leave ?? null);
|
|
18
|
+
export function RoomShell({ shellRef, dataMembers, roomTitle, titleAside, settled, leave, leaveAsks, headerTools, streamed, streamedSubLine, resolved, pending, pendingBody, streamedBody, locked, password, onPasswordChange, onPasswordSubmit, roomMissingMessage, children, }) {
|
|
19
|
+
useRoomLeave(leaveAsks === undefined ? (leave ?? null) : null);
|
|
20
20
|
const home = useRoomHome();
|
|
21
|
-
|
|
22
|
-
return (_jsxs("div", { ref: shellRef, className: "shell shell--fit", "data-testid": "constructed", "data-members": dataMembers, children: [_jsxs("header", { className: "shell__head", children: [roomTitle !== undefined ? (_jsx("h1", { className: "shell__title", "data-testid": "room-name", children: roomTitle })) : settled ? (_jsx("h1", { className: "shell__title", children: "Room" })) : (_jsx("span", { className: "skeleton skeleton--title" })), roomTitle !== undefined && titleAside, _jsxs("div", { className: "shell__tools", children: [leave !== undefined && home !== null && (_jsx("button", { type: "button", className: "room-leave ct-action", "data-testid": "room-leave", disabled: leaving, onClick: () => {
|
|
23
|
-
setLeaving(true);
|
|
24
|
-
void leaveRoomThen(home);
|
|
25
|
-
}, children: _jsx("span", { className: "ct-action__label", children: "Leave" }) })), headerTools] }), resolved && streamed && streamedSubLine] }), _jsxs("main", { className: "lobby lobby--room", "aria-busy": pending ? 'true' : undefined, children: [pending && pendingBody, streamed && streamedBody, !streamed && resolved && (_jsxs(_Fragment, { children: [locked !== null && (_jsxs("form", { className: "lobby__locked ct-panel", "data-testid": "room-locked", onSubmit: (e) => {
|
|
21
|
+
return (_jsxs("div", { ref: shellRef, className: "shell shell--fit", "data-testid": "constructed", "data-members": dataMembers, children: [_jsxs("header", { className: "shell__head", children: [roomTitle !== undefined ? (_jsx("h1", { className: "shell__title", "data-testid": "room-name", children: roomTitle })) : settled ? (_jsx("h1", { className: "shell__title", children: "Room" })) : (_jsx("span", { className: "skeleton skeleton--title" })), roomTitle !== undefined && titleAside, _jsxs("div", { className: "shell__tools", children: [leave !== undefined && home !== null && _jsx(RoomLeave, { leave: leave, asks: leaveAsks, home: home }), headerTools] }), resolved && streamed && streamedSubLine] }), _jsxs("main", { className: "lobby lobby--room", "aria-busy": pending ? 'true' : undefined, children: [pending && pendingBody, streamed && streamedBody, !streamed && resolved && (_jsxs(_Fragment, { children: [locked !== null && (_jsxs("form", { className: "lobby__locked ct-panel", "data-testid": "room-locked", onSubmit: (e) => {
|
|
26
22
|
e.preventDefault();
|
|
27
23
|
onPasswordSubmit();
|
|
28
24
|
}, children: [_jsx("p", { role: "alert", children: locked === 'need' ? 'This room needs a password.' : locked === 'wrong' ? 'Wrong password.' : 'Too many attempts.' }), _jsx("label", { htmlFor: "room-password", children: "Password" }), _jsx("input", { id: "room-password", "data-testid": "room-password", type: "password", autoComplete: "off", value: password, onChange: (e) => onPasswordChange(e.target.value) }), _jsx("button", { type: "submit", "data-testid": "room-password-submit", disabled: locked === 'rate-limited', children: "Join" })] })), locked === null && roomMissingMessage !== null && (_jsx("p", { className: "ct-error", role: "alert", "data-testid": "room-missing", children: roomMissingMessage })), children] }))] })] }));
|
|
29
25
|
}
|
|
26
|
+
/** The head row's Leave. A leave that costs an event (`asks`) is asked once more, by its name, before it leaves. */
|
|
27
|
+
function RoomLeave({ leave, asks, home }) {
|
|
28
|
+
const [leaving, setLeaving] = useState(false);
|
|
29
|
+
const [asking, setAsking] = useState(false);
|
|
30
|
+
if (asks === undefined || !asking) {
|
|
31
|
+
return (_jsx("button", { type: "button", className: "room-leave ct-action", "data-testid": "room-leave", disabled: leaving, onClick: () => {
|
|
32
|
+
if (asks !== undefined) {
|
|
33
|
+
setAsking(true);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
setLeaving(true);
|
|
37
|
+
void leaveRoomThen(home);
|
|
38
|
+
}, children: _jsx("span", { className: "ct-action__label", children: asks ?? 'Leave' }) }));
|
|
39
|
+
}
|
|
40
|
+
return (_jsxs("span", { className: "room-leave__ask", "data-testid": "room-leave-ask", children: [_jsx("button", { type: "button", className: "room-leave ct-action", "data-testid": "room-leave-no", autoFocus: true, disabled: leaving, onClick: () => setAsking(false), children: _jsx("span", { className: "ct-action__label", children: "Cancel" }) }), _jsx("button", { type: "button", className: "room-leave ct-action ct-action--danger", "data-testid": "room-leave-yes", disabled: leaving, onClick: () => {
|
|
41
|
+
setLeaving(true);
|
|
42
|
+
void leave().finally(home);
|
|
43
|
+
}, children: _jsx("span", { className: "ct-action__label", children: asks }) })] }));
|
|
44
|
+
}
|
package/dist/seats/SeatChip.css
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* strip --seat-list-gap, -list-justify, -list-align, -list-min-width, -list-margin,
|
|
12
12
|
* --seat-list-narrow-wrap, -narrow-overflow-x, -narrow-overflow-y, -narrow-padding,
|
|
13
|
-
* -narrow-tail (the trailing spacer's `content`)
|
|
13
|
+
* -narrow-tail (the trailing spacer's `content`), -narrow-bg (what the strip stands on,
|
|
14
|
+
* where its edge cue's fade ends)
|
|
14
15
|
* seat --seat-position, -gap, -width, -min-width, -flex, -wrap-position, -wrap-display
|
|
15
16
|
* avatar --seat-avatar-display, -size, -border, -edge, -radius, -bg, -ink, -text, -weight,
|
|
16
17
|
* -overflow, -flex, -fit, -rendering, --seat-ready-ring, --seat-unready-edge
|
|
@@ -40,9 +41,11 @@
|
|
|
40
41
|
|
|
41
42
|
/*
|
|
42
43
|
* Below 560px, eight wrapped seats (each with its buttons under it) filled a phone's whole first
|
|
43
|
-
* screen, so the strip becomes one row that scrolls sideways
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* screen, so the strip becomes one row that scrolls sideways, with the edge cue on each edge it can
|
|
45
|
+
* still scroll toward (`../components/EdgeCue.css`). The scroller clips at its padding edge, so 6px
|
|
46
|
+
* clears the ready ring's 3px and a focus outline; the trailing spacer is a real flex item because
|
|
47
|
+
* Chromium does not count a scroller's own trailing padding toward its extent, and the right cue,
|
|
48
|
+
* drawn on that same `::after`, keeps its room.
|
|
46
49
|
*/
|
|
47
50
|
@media (max-width: 560px) {
|
|
48
51
|
.pod-seats {
|
|
@@ -50,6 +53,10 @@
|
|
|
50
53
|
overflow-x: var(--seat-list-narrow-overflow-x, auto);
|
|
51
54
|
overflow-y: var(--seat-list-narrow-overflow-y, hidden);
|
|
52
55
|
padding: var(--seat-list-narrow-padding, 6px 0 6px 6px);
|
|
56
|
+
--edge-cue-gap: var(--seat-list-gap, 14px);
|
|
57
|
+
--edge-cue-pad-l: 6px;
|
|
58
|
+
--edge-cue-tail: calc(var(--seat-list-gap, 14px) + 6px);
|
|
59
|
+
--edge-cue-bg: var(--seat-list-narrow-bg, var(--color-bg-card));
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
.pod-seats::after {
|
package/dist/seats/SeatChip.js
CHANGED
|
@@ -14,7 +14,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
* Its paint is `./SeatChip.css`, after `.ct-action`'s: a game drawing the seats at its own scale
|
|
15
15
|
* (bomberman's overlay, over its board) sets that file's custom properties, never a copy of it.
|
|
16
16
|
*/
|
|
17
|
+
import { useRef } from 'react';
|
|
17
18
|
import { ActionButton } from "../components/ActionButton.js";
|
|
19
|
+
import { useEdgeCue } from "../components/edgeCue.js";
|
|
18
20
|
import { Avatar } from "../components/Avatar.js";
|
|
19
21
|
import { PlayerName } from "../room/look.js";
|
|
20
22
|
import { StatusPill } from "../components/StatusPill.js";
|
|
@@ -24,7 +26,10 @@ import './SeatChip.css';
|
|
|
24
26
|
export const SEAT_CROWN_PATH = 'M2 9V3.5l2.2 2L6 2.6l1.8 2.9L10 3.5V9Z';
|
|
25
27
|
/** 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
28
|
export function SeatList({ slots, iLead, shut = false, readiness = true, fieldFixed = false, realSeatCount, mySeat, onSit, onBotOn, onBotOff, onCloseSeat, onOpenSeat, onRemoveMember, onBotReplace, onMakeLeader }) {
|
|
27
|
-
|
|
29
|
+
// Below 560px the strip scrolls sideways: its edges say which way more seats are.
|
|
30
|
+
const strip = useRef(null);
|
|
31
|
+
useEdgeCue(strip);
|
|
32
|
+
return (_jsx("ul", { className: "pod-seats edge-cue", "data-testid": "pod-seats", ref: strip, children: slots.map(({ seat, occupant }) => {
|
|
28
33
|
if (occupant.kind === 'open') {
|
|
29
34
|
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: _jsx("span", { className: "ct-action__label", 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: _jsx("span", { className: "ct-action__label", children: "Close" }) }))] }))] }, seat));
|
|
30
35
|
}
|
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.156",
|
|
4
|
+
"gitHead": "496faea307d7bf63bcf9c3b3c3c8bbb3e4147297",
|
|
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.",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"react-dom": "^19.2.8"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.
|
|
58
|
-
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.
|
|
57
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.160",
|
|
58
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.160",
|
|
59
59
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.2.2",
|
|
60
60
|
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.143",
|
|
61
61
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.143",
|