@hadoku/game-ui 0.1.68 → 0.1.70

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.
Files changed (2) hide show
  1. package/dist/room/look.js +19 -0
  2. package/package.json +4 -4
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.68",
4
- "gitHead": "05dcae1a1c2b2e66220a55e98e8b3934fd1ae0ff",
3
+ "version": "0.1.70",
4
+ "gitHead": "89a57e628dc4c2f07c33ded4f65728dad1ae05c9",
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,8 +49,8 @@
49
49
  "react-dom": "^19.2.8"
50
50
  },
51
51
  "dependencies": {
52
- "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.72",
53
- "@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.72",
52
+ "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.74",
53
+ "@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.74",
54
54
  "@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.30",
55
55
  "@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.122",
56
56
  "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.122",