@hadoku/game-ui 0.1.160 → 0.1.161
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/room/RoomShell.d.ts +1 -5
- package/dist/room/RoomShell.js +5 -12
- package/package.json +4 -4
package/dist/room/RoomShell.d.ts
CHANGED
|
@@ -109,13 +109,9 @@ export declare function appOrigin(): string;
|
|
|
109
109
|
* before they have first mounted, they wait for it, showing `fallback`: their first frame is already
|
|
110
110
|
* inside. After that, they show bare while the chrome is not drawn.
|
|
111
111
|
*/
|
|
112
|
-
export declare function RoomShell({ roomId,
|
|
112
|
+
export declare function RoomShell({ roomId, inert, fallback, requireIdentified, toolbar, pending, children, }: {
|
|
113
113
|
/** The room this viewer is in: the chat and roster the chrome joins, and where their avatar is asserted. */
|
|
114
114
|
roomId: string | null;
|
|
115
|
-
/** `false` keeps the chat open with no Hide chat button — the room's lobby,
|
|
116
|
-
* where the chat is the point. A viewer's saved collapse is ignored there,
|
|
117
|
-
* not cleared, so the match still opens the way they left it. */
|
|
118
|
-
collapsible?: boolean;
|
|
119
115
|
/** Behind a question the page must answer first (`./SessionPrompt.tsx`): the chat cannot be reached. */
|
|
120
116
|
inert?: boolean;
|
|
121
117
|
/** What a room's route shows while it waits, before its content first mounts. Default: nothing. */
|
package/dist/room/RoomShell.js
CHANGED
|
@@ -211,7 +211,7 @@ export function appOrigin() {
|
|
|
211
211
|
* before they have first mounted, they wait for it, showing `fallback`: their first frame is already
|
|
212
212
|
* inside. After that, they show bare while the chrome is not drawn.
|
|
213
213
|
*/
|
|
214
|
-
export function RoomShell({ roomId,
|
|
214
|
+
export function RoomShell({ roomId, inert = false, fallback = null, requireIdentified = false, toolbar, pending = false, children, }) {
|
|
215
215
|
const who = useWhoami();
|
|
216
216
|
const RoomChrome = useRoomChrome();
|
|
217
217
|
// Always inside `AppChrome`'s `HadokuThemeRoot` — see chrome/AppChrome.tsx,
|
|
@@ -241,18 +241,11 @@ export function RoomShell({ roomId, collapsible = true, inert = false, fallback
|
|
|
241
241
|
return (_jsxs(_Fragment, { children: [_jsx(Slot, { host: host }, "bare"), content] }));
|
|
242
242
|
return (
|
|
243
243
|
/*
|
|
244
|
-
*
|
|
245
|
-
* `RoomChrome`
|
|
246
|
-
*
|
|
247
|
-
* outside. `live.css`'s portrait rules key the chat-sheet behaviour off
|
|
248
|
-
* this attribute rather than off `collapsible` turning the chrome's own
|
|
249
|
-
* "Hide chat" button on or off, because `collapsible` is a prop value, not
|
|
250
|
-
* a selector a stylesheet in another file can see — and only present at
|
|
251
|
-
* all when `collapsible` is true, i.e. a match route (`App.tsx`'s
|
|
252
|
-
* `route.kind !== 'room'`), never the room lobby (Settled 10: "the room
|
|
253
|
-
* lobby is unchanged").
|
|
244
|
+
* The chat hides and shows with the chrome's own Hide chat in every phase of a room (the lobby,
|
|
245
|
+
* the draft, the builder, the podium and the match): `RoomChrome`'s `collapsible` stays at its
|
|
246
|
+
* default everywhere, so the control and the viewer's saved choice are the same on every screen.
|
|
254
247
|
*/
|
|
255
|
-
_jsxs(_Fragment, { children: [_jsx("div", { className: "room-shell", "data-testid": "room-shell",
|
|
248
|
+
_jsxs(_Fragment, { children: [_jsx("div", { className: "room-shell", "data-testid": "room-shell", inert: inert || undefined, children: _jsxs(RoomChrome, { roomKey: key, serverOrigin: watchpartyOrigin(), roomOrigin: appOrigin(), userType: who.tier, userId: who.userId, theme: watchpartyTheme(theme), toolbar: toolbarPage ? toolbar : undefined, children: [_jsx(Slot, { host: host }), _jsx("span", { hidden: true, ref: roomFrameRef })] }) }, "chrome"), content] }));
|
|
256
249
|
}
|
|
257
250
|
/** The node {@link RoomShell}'s children are drawn into: it takes no box of its own, so they lay out as its parent's. */
|
|
258
251
|
function createHost() {
|
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.161",
|
|
4
|
+
"gitHead": "f58ae9f39c723f808b92ea4203afc898b1932bd1",
|
|
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.165",
|
|
58
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.165",
|
|
59
59
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.2.2",
|
|
60
60
|
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.144",
|
|
61
61
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.144",
|