@faybl/react-utils 2.0.0 → 2.0.1

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/README.md CHANGED
@@ -77,7 +77,8 @@ user comes back. After an automatic reload, a tab reloads on its own again only
77
77
  once `reloadCooldownMs` (default 30 000) has passed; an expiry before that shows
78
78
  the dialog, so a 401 that is not about the session cannot reload in a loop.
79
79
  `dialogLabels` sets the dialog's `{ title, action }`, which are English by
80
- default.
80
+ default. The dialog takes its colours from the page's CSS `color-scheme`, so a
81
+ dark app has to declare it, with MUI through `<CssBaseline enableColorScheme />`.
81
82
 
82
83
  `useSession()` returns:
83
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faybl/react-utils",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "React hooks for Faybl web apps",
5
5
  "license": "TBD",
6
6
  "author": "Arcturitech",
@@ -30,7 +30,7 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@faybl/utils": "^2.0.0"
33
+ "@faybl/utils": "^2.0.1"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=22"
@@ -2,9 +2,9 @@ import { createElement, useEffect, useId, useRef } from 'react';
2
2
 
3
3
  const DEFAULT_LABELS = { title: 'You have been signed out', action: 'Sign in again' };
4
4
 
5
- // Light or dark after the user's system, as apps here are.
5
+ // Its colours are the browser's for the page's CSS color-scheme, which a dark
6
+ // app sets on the root element (MUI: CssBaseline enableColorScheme).
6
7
  const dialogStyle = {
7
- colorScheme: 'light dark',
8
8
  border: 'none',
9
9
  borderRadius: 8,
10
10
  padding: 24,