@brendanbank/atrium-host-types 0.19.2 → 0.21.0

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
@@ -32,8 +32,8 @@ your `.npmrc`, delete it — npmjs.org is the default registry.
32
32
 
33
33
  ## Versioning
34
34
 
35
- The package version tracks atrium's image version. Pin `^0.19` for
36
- "compatible with atrium 0.19.x"; bump together with the atrium image
35
+ The package version tracks atrium's image version. Pin `^0.21` for
36
+ "compatible with atrium 0.21.x"; bump together with the atrium image
37
37
  to pick up new registry slots. New slots land as **optional** members
38
38
  on `AtriumRegistry` first so a host that hasn't bumped yet still
39
39
  type-checks.
package/dist/index.d.ts CHANGED
@@ -71,6 +71,26 @@ export interface AtriumUserChangeDetail {
71
71
  current: number | null;
72
72
  nonce: number;
73
73
  }
74
+ /** Resolved color scheme for the atrium app's outer ``<MantineProvider>``,
75
+ * driven by the brand preset (``"dark"`` for ``dark-glass``, ``"auto"``
76
+ * for everything else). Host bundles read it via
77
+ * ``useAtriumColorScheme()`` and pass it to their own
78
+ * ``<MantineProvider>`` so nested providers don't default to ``"light"``
79
+ * and produce a two-tone UI on systems set to dark mode (atrium #96). */
80
+ export type AtriumColorScheme = 'auto' | 'light' | 'dark';
81
+ /** Detail payload of the ``atrium:colorschemechange`` window CustomEvent
82
+ * atrium dispatches whenever the resolved scheme changes — typically
83
+ * because an admin flipped the brand preset in app-config. The current
84
+ * scheme is also published synchronously on
85
+ * ``window.__ATRIUM_COLOR_SCHEME__`` so a host that mounts after the
86
+ * initial dispatch can read the value without waiting for an event.
87
+ *
88
+ * Available since atrium 0.20. */
89
+ export interface AtriumColorSchemeChangeDetail {
90
+ previous: AtriumColorScheme | null;
91
+ current: AtriumColorScheme;
92
+ nonce: number;
93
+ }
74
94
  /** A single notification row as the SPA sees it. `kind` is host-defined;
75
95
  * `payload` is opaque JSON. `read_at` is null until the user clears the
76
96
  * bell; `created_at` is the server-side timestamp. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brendanbank/atrium-host-types",
3
- "version": "0.19.2",
3
+ "version": "0.21.0",
4
4
  "description": "TypeScript declarations for the atrium host-extension contract: AtriumRegistry, UserContext, AdminUserRow, AtriumNotification, AtriumEvent. Source-of-truth shapes a host bundle types against, kept in sync with atrium's published image major.minor.",
5
5
  "license": "BSD-2-Clause",
6
6
  "type": "module",