@hadoku/game-ui 0.1.113 → 0.1.114
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 +28 -0
- package/dist/components/RoomSettings.css +1 -5
- package/dist/components/RoomSettings.js +1 -1
- package/dist/front/LobbyShell.js +1 -1
- package/dist/front/RoomFront.css +1 -2
- package/dist/screens/route.d.ts +16 -2
- package/dist/screens/route.js +19 -2
- package/dist/seats/SeatChip.js +4 -4
- package/package.json +4 -4
|
@@ -4,15 +4,43 @@
|
|
|
4
4
|
* table's scorekeeping buttons. `.ct-action` is the colour and hover/focus fill; `.ct-action--danger`
|
|
5
5
|
* fills the theme's danger instead. No size here — that differs per site, and gets duplicated
|
|
6
6
|
* either way (`css-ownership.test.ts` forbids one block split across sheets); SHARED there, like `.button`.
|
|
7
|
+
*
|
|
8
|
+
* What is here is how its contents sit, because that is the same at every size: icon and label on
|
|
9
|
+
* one row, centred on the box. A flex row centres each item's box, and a bare label's box is its
|
|
10
|
+
* line, which in this font sits about a quarter of an em below the capitals: "New deck" drew 3.5 px
|
|
11
|
+
* high in a 30 px button. So a label is a `.ct-action__label`, trimmed to its capitals and baseline
|
|
12
|
+
* and padded back to one line, so the box keeps its height and the box's centre is the ink's.
|
|
7
13
|
*/
|
|
8
14
|
|
|
15
|
+
/* The space between icon and label; a site's own rule may set it, since this one weighs nothing. */
|
|
16
|
+
:where(.ct-action) {
|
|
17
|
+
--ct-action-gap: 0.4em;
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
.ct-action {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
gap: var(--ct-action-gap);
|
|
25
|
+
line-height: 1.2;
|
|
10
26
|
color: var(--color-text);
|
|
11
27
|
background: var(--color-bg);
|
|
12
28
|
border: 1px solid var(--color-border);
|
|
13
29
|
cursor: pointer;
|
|
14
30
|
}
|
|
15
31
|
|
|
32
|
+
.ct-action > svg {
|
|
33
|
+
display: block;
|
|
34
|
+
flex: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
38
|
+
.ct-action__label {
|
|
39
|
+
text-box: trim-both cap alphabetic;
|
|
40
|
+
padding-block: calc((1lh - 1cap) / 2);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
.ct-action:hover,
|
|
17
45
|
.ct-action:focus-visible {
|
|
18
46
|
background: var(--color-primary);
|
|
@@ -5,17 +5,13 @@
|
|
|
5
5
|
* that one x.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/* The button's size; its colour and hover are `.ct-action` (`Button.css`) unless a game passes its own. */
|
|
8
|
+
/* The button's size; its layout, colour and hover are `.ct-action` (`Button.css`) unless a game passes its own. */
|
|
9
9
|
.room-settings__trigger {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
gap: 0.35rem;
|
|
13
10
|
flex: none;
|
|
14
11
|
align-self: flex-start;
|
|
15
12
|
padding: 0.2rem 0.6rem;
|
|
16
13
|
font: inherit;
|
|
17
14
|
font-size: 0.85em;
|
|
18
|
-
line-height: 1.2;
|
|
19
15
|
border-radius: var(--hdk-radius);
|
|
20
16
|
}
|
|
21
17
|
|
|
@@ -10,7 +10,7 @@ import './RoomSettings.css';
|
|
|
10
10
|
/** The Room settings button and its popover, holding `children` as its rows. */
|
|
11
11
|
export function RoomSettingsPopover({ testId = 'room-settings', title = 'Room settings', triggerClassName = 'room-settings__trigger ct-action', children, }) {
|
|
12
12
|
const { trigger, toggle, close } = usePopover();
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: triggerClassName, "aria-expanded": trigger !== null, "data-testid": testId, onClick: (event) => toggle(event.currentTarget), children: [_jsx(Icon, { name: "gear", size: uiLength('0.9rem') }), title] }), trigger !== null && (_jsx(Popover, { trigger: trigger, onClose: close, title: title, testId: `${testId}-popover`, wide: true, children: _jsx("div", { className: "room-settings__list", children: children }) }))] }));
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: triggerClassName, "aria-expanded": trigger !== null, "data-testid": testId, onClick: (event) => toggle(event.currentTarget), children: [_jsx(Icon, { name: "gear", size: uiLength('0.9rem') }), _jsx("span", { className: "ct-action__label", children: title })] }), trigger !== null && (_jsx(Popover, { trigger: trigger, onClose: close, title: title, testId: `${testId}-popover`, wide: true, children: _jsx("div", { className: "room-settings__list", children: children }) }))] }));
|
|
14
14
|
}
|
|
15
15
|
/** One row's two grid cells: the setting's name (with the lock while it holds), then its control. */
|
|
16
16
|
export function SettingRow({ label, locked = false, children }) {
|
package/dist/front/LobbyShell.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* markup, not an empty wrapper.
|
|
9
9
|
*
|
|
10
10
|
* Platform: knows no game's own banner, nav buttons or room list — `LobbyScreen.tsx` still
|
|
11
|
-
* assembles those (`Banner`, `DecksButton
|
|
11
|
+
* assembles those (`Banner`, `DecksButton` (the Library)/`StatsButton`, `RoomList`, the Fan
|
|
12
12
|
* Content Policy line) and hands them in as children/props. What stays here is what was already
|
|
13
13
|
* game-agnostic: the shell chrome, the page-reveal gate (`./gate.ts`) and the trim-loaded settle.
|
|
14
14
|
*
|
package/dist/front/RoomFront.css
CHANGED
|
@@ -648,8 +648,7 @@
|
|
|
648
648
|
text-transform: var(--room-front-create-label-case, uppercase);
|
|
649
649
|
}
|
|
650
650
|
|
|
651
|
-
.room-front-create input
|
|
652
|
-
.room-front-create select {
|
|
651
|
+
.room-front-create input {
|
|
653
652
|
min-width: 0;
|
|
654
653
|
padding: var(--room-front-create-input-padding, 9px 10px);
|
|
655
654
|
border: 1px solid var(--color-border);
|
package/dist/screens/route.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const registerEmbedAddress: (value: (catalogue: string, view: string) => boolean) => void;
|
|
2
|
+
/** The Library's tabs beside its Decks tab, which is the one with no name in the address. */
|
|
3
|
+
export type LibraryTab = 'cubes' | 'cards';
|
|
2
4
|
/** Where the app is. The single source of truth for what gets rendered. */
|
|
3
5
|
export type Route = {
|
|
4
6
|
kind: 'lobby';
|
|
@@ -51,13 +53,25 @@ export type Route = {
|
|
|
51
53
|
player: string;
|
|
52
54
|
tab?: never;
|
|
53
55
|
}
|
|
54
|
-
/** `draftId` opens that deck in the editor; absent is the
|
|
56
|
+
/** `draftId` opens that deck in the editor; absent is LEGACY, the Library's Decks tab. */
|
|
55
57
|
| {
|
|
56
58
|
kind: 'decks';
|
|
57
59
|
draftId?: string;
|
|
58
|
-
}
|
|
60
|
+
}
|
|
61
|
+
/** LEGACY: the Library's Cubes tab. */
|
|
62
|
+
| {
|
|
59
63
|
kind: 'inventory';
|
|
60
64
|
}
|
|
65
|
+
/** The Library: no `tab` is its Decks tab, `cube` narrows that tab to the decks drafted from the cube of that name. */
|
|
66
|
+
| {
|
|
67
|
+
kind: 'library';
|
|
68
|
+
tab?: LibraryTab;
|
|
69
|
+
cube?: never;
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'library';
|
|
72
|
+
cube: string;
|
|
73
|
+
tab?: never;
|
|
74
|
+
}
|
|
61
75
|
/** A Rally pick option's page in Rally's frame: no header, no room (cardtable#24). */
|
|
62
76
|
| {
|
|
63
77
|
kind: 'rally-embed';
|
package/dist/screens/route.js
CHANGED
|
@@ -37,9 +37,13 @@
|
|
|
37
37
|
* `#/profile` the stats page's Your profile: your rating, unfinished games, matches, decks, colours
|
|
38
38
|
* `#/stats/<name>` another player's profile, by registry name
|
|
39
39
|
* `#/tournaments` the stats page's Tournaments tab: every past pod's standings
|
|
40
|
-
* `#/
|
|
40
|
+
* `#/library` the Library's Decks tab: every deck you built or drafted (wave 125)
|
|
41
|
+
* `#/library/cube/<name>` the Decks tab, narrowed to the decks drafted from that cube
|
|
42
|
+
* `#/library/cubes` the Cubes tab: every cube, and the imported ones refreshed, deleted, imported (AF305 §B)
|
|
43
|
+
* `#/library/cards` the Cards tab
|
|
44
|
+
* `#/decks` LEGACY — the Library's Decks tab (`Screen.tsx` moves it)
|
|
41
45
|
* `#/decks/<draftId>` that deck in the editor, outside any game
|
|
42
|
-
* `#/inventory`
|
|
46
|
+
* `#/inventory` LEGACY — the Library's Cubes tab (`Screen.tsx` moves it)
|
|
43
47
|
* `#/embed/<catalogue>/<id>/<view>` one Rally pick option's page, chromeless, for Rally's frame (`rally/RallyEmbed.tsx`, cardtable#24)
|
|
44
48
|
*
|
|
45
49
|
* An unrecognised hash is the lobby. That is deliberate: a mistyped invite link
|
|
@@ -75,6 +79,7 @@ import { createHashRouter } from "./router.js";
|
|
|
75
79
|
/** Whether `#/embed/<catalogue>/<id>/<view>` is one of the game's pages; any other is the lobby. */
|
|
76
80
|
const embedAddress = registered('embed address');
|
|
77
81
|
export const registerEmbedAddress = embedAddress.set;
|
|
82
|
+
const LIBRARY_TABS = ['cubes', 'cards'];
|
|
78
83
|
/**
|
|
79
84
|
* `#/room/r-1a2b3c` → `{ kind: 'room', roomId: 'r-1a2b3c' }`.
|
|
80
85
|
*
|
|
@@ -107,7 +112,15 @@ export function parseRoute(hash) {
|
|
|
107
112
|
return { kind: 'decks' };
|
|
108
113
|
if (path === 'inventory')
|
|
109
114
|
return { kind: 'inventory' };
|
|
115
|
+
if (path === 'library')
|
|
116
|
+
return { kind: 'library' };
|
|
110
117
|
const parts = path.split('/');
|
|
118
|
+
if (parts[0] === 'library') {
|
|
119
|
+
if (parts.length === 2 && LIBRARY_TABS.includes(parts[1]))
|
|
120
|
+
return { kind: 'library', tab: parts[1] };
|
|
121
|
+
const cube = parts.length === 3 && parts[1] === 'cube' ? decodeSegment(parts[2]) : '';
|
|
122
|
+
return cube === '' ? { kind: 'library' } : { kind: 'library', cube };
|
|
123
|
+
}
|
|
111
124
|
if (parts.length === 4 && parts[0] === 'embed') {
|
|
112
125
|
const [catalogue, view] = [parts[1], parts[3]];
|
|
113
126
|
const id = decodeSegment(parts[2]);
|
|
@@ -193,6 +206,10 @@ export function routeHash(route) {
|
|
|
193
206
|
return route.draftId === undefined ? '#/decks' : `#/decks/${encodeURIComponent(route.draftId)}`;
|
|
194
207
|
case 'inventory':
|
|
195
208
|
return '#/inventory';
|
|
209
|
+
case 'library':
|
|
210
|
+
if (route.cube !== undefined)
|
|
211
|
+
return `#/library/cube/${encodeURIComponent(route.cube)}`;
|
|
212
|
+
return route.tab === undefined ? '#/library' : `#/library/${route.tab}`;
|
|
196
213
|
case 'rally-embed':
|
|
197
214
|
return `#/embed/${route.catalogue}/${encodeURIComponent(route.id)}/${route.view}`;
|
|
198
215
|
}
|
package/dist/seats/SeatChip.js
CHANGED
|
@@ -26,16 +26,16 @@ export const SEAT_CROWN_PATH = 'M2 9V3.5l2.2 2L6 2.6l1.8 2.9L10 3.5V9Z';
|
|
|
26
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
|
-
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));
|
|
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: _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
30
|
}
|
|
31
31
|
if (occupant.kind === 'closed') {
|
|
32
|
-
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-closed": "", children: [_jsx("span", { className: "pod-seats__avatar pod-seats__avatar--closed", "aria-hidden": "true", children: "\u00D7" }), _jsx("span", { className: "pod-seats__label", children: "Closed" }), iLead && (_jsx("span", { className: "pod-seats__actions", children: _jsx(ActionButton, { action: "open", className: "pod-seats__action ct-action", "data-testid": "pod-seat-open", "data-seat": seat, "aria-label": `Open seat ${seat + 1}`, onPress: () => onOpenSeat?.(seat), children: "Open" }) }))] }, seat));
|
|
32
|
+
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-closed": "", children: [_jsx("span", { className: "pod-seats__avatar pod-seats__avatar--closed", "aria-hidden": "true", children: "\u00D7" }), _jsx("span", { className: "pod-seats__label", children: "Closed" }), iLead && (_jsx("span", { className: "pod-seats__actions", children: _jsx(ActionButton, { action: "open", className: "pod-seats__action ct-action", "data-testid": "pod-seat-open", "data-seat": seat, "aria-label": `Open seat ${seat + 1}`, onPress: () => onOpenSeat?.(seat), children: _jsx("span", { className: "ct-action__label", children: "Open" }) }) }))] }, seat));
|
|
33
33
|
}
|
|
34
34
|
if (occupant.kind === 'bot') {
|
|
35
|
-
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-ai": "", children: [_jsx("span", { className: "pod-seats__avatar pod-seats__avatar--ai", children: _jsx(Avatar, { id: occupant.avatarId, fallback: "mark", className: "pod-seats__avatar-img", fallbackClassName: "pod-seats__avatar-fallback" }) }), _jsx("span", { className: "pod-seats__label", children: occupant.name }), !fieldFixed && iLead && (_jsx("span", { className: "pod-seats__actions", children: _jsx(ActionButton, { action: "ai-remove", className: "pod-seats__action ct-action", "data-testid": "pod-seat-ai-remove", "data-seat": seat, "aria-label": `Remove AI from seat ${seat + 1}`, onPress: () => onBotOff?.(seat), children: "Remove" }) }))] }, seat));
|
|
35
|
+
return (_jsxs("li", { className: "pod-seats__seat", "data-testid": `pod-seat-${seat}`, "data-ai": "", children: [_jsx("span", { className: "pod-seats__avatar pod-seats__avatar--ai", children: _jsx(Avatar, { id: occupant.avatarId, fallback: "mark", className: "pod-seats__avatar-img", fallbackClassName: "pod-seats__avatar-fallback" }) }), _jsx("span", { className: "pod-seats__label", children: occupant.name }), !fieldFixed && iLead && (_jsx("span", { className: "pod-seats__actions", children: _jsx(ActionButton, { action: "ai-remove", className: "pod-seats__action ct-action", "data-testid": "pod-seat-ai-remove", "data-seat": seat, "aria-label": `Remove AI from seat ${seat + 1}`, onPress: () => onBotOff?.(seat), children: _jsx("span", { className: "ct-action__label", children: "Remove" }) }) }))] }, seat));
|
|
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": readiness ? (ready ? 'true' : 'false') : undefined, 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));
|
|
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": readiness ? (ready ? 'true' : 'false') : undefined, 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: _jsx("span", { className: "ct-action__label", 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: _jsx("span", { className: "ct-action__label", 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.114",
|
|
4
|
+
"gitHead": "dfa395328f8624b0207970c5ca79b03a12288385",
|
|
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.118",
|
|
58
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.118",
|
|
59
59
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.2.0",
|
|
60
60
|
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.133",
|
|
61
61
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.133",
|