@hadoku/game-ui 0.1.104 → 0.1.106

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.
@@ -147,10 +147,16 @@ export function useMotion(root) {
147
147
  if (typeof matchMedia !== 'function')
148
148
  return undefined;
149
149
  const query = matchMedia('(prefers-reduced-motion: reduce)');
150
- const changed = () => setSystemTick((t) => t + 1);
150
+ // The shake is written whatever the player set, so it is rewritten here, in the change itself.
151
+ const changed = () => {
152
+ const el = root();
153
+ if (el !== null)
154
+ applyMotion(el);
155
+ setSystemTick((t) => t + 1);
156
+ };
151
157
  query.addEventListener?.('change', changed);
152
158
  return () => query.removeEventListener?.('change', changed);
153
- }, []);
159
+ }, [root]);
154
160
  useEffect(() => {
155
161
  if (prefs !== null)
156
162
  rememberMotion(motionKey(), { cardMotion, screenShake, ambientMotion });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/game-ui",
3
- "version": "0.1.104",
4
- "gitHead": "a51b8e0343f7a8b2b27db981541bca211c75fd4f",
3
+ "version": "0.1.106",
4
+ "gitHead": "6b70aca798222f2a7c688c1782e823e1aea2e6ce",
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.108",
53
- "@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.108",
52
+ "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.110",
53
+ "@wolffm/ui-shell": "npm:@hadoku/ui-shell@0.1.110",
54
54
  "@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.32",
55
55
  "@wolffm/rooms-client": "npm:@hadoku/rooms-client@^0.45.131",
56
56
  "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.131",