@hadoku/game-ui 0.1.67 → 0.1.69
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/look.js +19 -0
- package/package.json +7 -7
package/dist/room/look.js
CHANGED
|
@@ -118,6 +118,24 @@ function decorHost(face) {
|
|
|
118
118
|
}
|
|
119
119
|
return host;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Makes an overlay scroll with its face. An overlay is absolutely placed, against its nearest
|
|
123
|
+
* positioned ancestor; a list that scrolls between the two, and is not positioned itself, scrolls
|
|
124
|
+
* the face away while the overlay stays where it was put (the sign-up list's sakura, 2026-11-18).
|
|
125
|
+
* That list becomes the overlay's reference instead. A box that only clips (`hidden`) moves nothing
|
|
126
|
+
* and is left alone, so an overlay still clears it as before.
|
|
127
|
+
*/
|
|
128
|
+
function anchorToScroller(el) {
|
|
129
|
+
for (let box = el.parentElement; box !== null && box !== document.body; box = box.parentElement) {
|
|
130
|
+
const style = getComputedStyle(box);
|
|
131
|
+
if (style.position !== '' && style.position !== 'static')
|
|
132
|
+
return;
|
|
133
|
+
if ([style.overflowX, style.overflowY].some((o) => o === 'auto' || o === 'scroll')) {
|
|
134
|
+
box.style.position = 'relative';
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
121
139
|
/**
|
|
122
140
|
* The overlay a person wears, laid over the face drawn just before it.
|
|
123
141
|
*
|
|
@@ -144,6 +162,7 @@ export const FaceDecor = memo(function FaceDecor({ avatarId, look }) {
|
|
|
144
162
|
const face = anchor.current?.previousElementSibling;
|
|
145
163
|
if (el === null || !(face instanceof Element))
|
|
146
164
|
return;
|
|
165
|
+
anchorToScroller(el);
|
|
147
166
|
// From boxes, not `offsetLeft`: the fallback mark is an SVG, which has none,
|
|
148
167
|
// and a scaled board (UI scale, the portrait fit) scales both boxes alike.
|
|
149
168
|
const fit = () => {
|
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.69",
|
|
4
|
+
"gitHead": "2ada02180afff2e2d5f9e4c28ee9b97be29d3c66",
|
|
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.
|
|
52
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.73",
|
|
53
|
+
"@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.73",
|
|
54
54
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.30",
|
|
55
|
-
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.
|
|
56
|
-
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.
|
|
55
|
+
"@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.122",
|
|
56
|
+
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.122",
|
|
57
57
|
"@wolffm/task-ui-components": "npm:@hadoku/task-ui-components@^4.23.43",
|
|
58
58
|
"@wolffm/themes": "npm:@hadoku/themes@^5.14.12",
|
|
59
|
-
"@wolffm/watchparty-ui": "npm:@hadoku/watchparty-ui@^0.45.
|
|
59
|
+
"@wolffm/watchparty-ui": "npm:@hadoku/watchparty-ui@^0.45.122",
|
|
60
60
|
"socket.io-client": "^4.8.3",
|
|
61
61
|
"zod": "4.5.4"
|
|
62
62
|
},
|