@brendanbank/atrium-host-bundle-utils 0.17.0 → 0.18.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 +2 -2
- package/dist/react/index.d.ts +45 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +85 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -97,8 +97,8 @@ or hosts that want axios-shaped retry).
|
|
|
97
97
|
|
|
98
98
|
## Versioning
|
|
99
99
|
|
|
100
|
-
The package version tracks atrium's image version. Pin `^0.
|
|
101
|
-
"compatible with atrium 0.
|
|
100
|
+
The package version tracks atrium's image version. Pin `^0.18` for
|
|
101
|
+
"compatible with atrium 0.18.x"; bump together with the atrium image
|
|
102
102
|
to pick up new registry slots and SDK helpers.
|
|
103
103
|
|
|
104
104
|
## See also
|
package/dist/react/index.d.ts
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { type ReactNode } from 'react';
|
|
23
23
|
import { type QueryClient, type UseQueryResult } from '@tanstack/react-query';
|
|
24
|
-
import type { UserContext } from '@brendanbank/atrium-host-types';
|
|
25
|
-
export type { UserContext } from '@brendanbank/atrium-host-types';
|
|
24
|
+
import type { AtriumUserChangeDetail, UserContext } from '@brendanbank/atrium-host-types';
|
|
25
|
+
export type { AtriumUserChangeDetail, UserContext, } from '@brendanbank/atrium-host-types';
|
|
26
26
|
export { __atrium_t__ } from '../i18n';
|
|
27
27
|
interface AtriumContextValue {
|
|
28
28
|
fetchUserContext: () => Promise<UserContext | null>;
|
|
@@ -198,4 +198,47 @@ export declare function useAtriumNavigate(): (href: string, opts?: {
|
|
|
198
198
|
* `window.location` fresh. Production code never calls this — the
|
|
199
199
|
* cache is updated by the event subscription. */
|
|
200
200
|
export declare function __resetAtriumLocationCacheForTests(): void;
|
|
201
|
+
/** Subscribe to atrium's identity transitions from inside a host
|
|
202
|
+
* bundle's React tree. Returns the most recent `atrium:userchange`
|
|
203
|
+
* detail — `{previous, current, nonce}` — or a zeroed sentinel
|
|
204
|
+
* (`{previous: null, current: null, nonce: 0}`) before any event has
|
|
205
|
+
* fired. The hook does NOT report the initial signed-in state on
|
|
206
|
+
* mount; use `useUserContext()` for that.
|
|
207
|
+
*
|
|
208
|
+
* Bridges the `atrium:userchange` CustomEvent atrium dispatches on
|
|
209
|
+
* `window` through `useSyncExternalStore`, so multiple subscribers in
|
|
210
|
+
* the same tree share one event listener and the snapshot is
|
|
211
|
+
* referentially stable when nothing has changed.
|
|
212
|
+
*
|
|
213
|
+
* The canonical use is wiping a host's own QueryClient when the user
|
|
214
|
+
* swaps — without it, user A's host cache renders for user B until
|
|
215
|
+
* staleness forces a refetch:
|
|
216
|
+
*
|
|
217
|
+
* ```tsx
|
|
218
|
+
* function HostCacheGuard({ client }: { client: QueryClient }) {
|
|
219
|
+
* const { nonce } = useAtriumUser();
|
|
220
|
+
* useEffect(() => {
|
|
221
|
+
* // nonce > 0 means at least one transition has fired; on the
|
|
222
|
+
* // first paint we skip (the host already loaded against the
|
|
223
|
+
* // current user).
|
|
224
|
+
* if (nonce > 0) client.clear();
|
|
225
|
+
* }, [nonce, client]);
|
|
226
|
+
* return null;
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*
|
|
230
|
+
* Hosts that don't use React (or want to clear the cache from outside
|
|
231
|
+
* any component) can subscribe directly:
|
|
232
|
+
* `window.addEventListener('atrium:userchange', () => client.clear())`.
|
|
233
|
+
*
|
|
234
|
+
* Available on atrium 0.18+. On older atrium images the event is
|
|
235
|
+
* never dispatched, so the hook stays at the zeroed sentinel — host
|
|
236
|
+
* bundles that need to support pre-0.18 atrium can read
|
|
237
|
+
* `window.__ATRIUM_VERSION__` and fall back to the in-component
|
|
238
|
+
* watch-`useUserContext` workaround. */
|
|
239
|
+
export declare function useAtriumUser(): AtriumUserChangeDetail;
|
|
240
|
+
/** Test-only: drop the cached snapshot so the next `getSnapshot`
|
|
241
|
+
* returns the zeroed sentinel. Production code never calls this — the
|
|
242
|
+
* cache is updated by the event subscription. */
|
|
243
|
+
export declare function __resetAtriumUserCacheForTests(): void;
|
|
201
244
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EACZ,MAAM,gCAAgC,CAAC;AAExC,YAAY,EACV,sBAAsB,EACtB,WAAW,GACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACrD;AAmBD,MAAM,WAAW,mBAAmB;IAClC;;;kDAG8C;IAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;sBAGkB;IAClB,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;qCAGqC;AACrC,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,gBAAg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igate() {
|
|
|
296
296
|
export function __resetAtriumLocationCacheForTests() {
|
|
297
297
|
cachedLocation = null;
|
|
298
298
|
}
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
// Identity transitions — `atrium:userchange`
|
|
301
|
+
// ---------------------------------------------------------------------------
|
|
302
|
+
const ATRIUM_USERCHANGE_EVENT = 'atrium:userchange';
|
|
303
|
+
const NO_USERCHANGE = {
|
|
304
|
+
previous: null,
|
|
305
|
+
current: null,
|
|
306
|
+
nonce: 0,
|
|
307
|
+
};
|
|
308
|
+
// Module-level cache so `useSyncExternalStore.getSnapshot` returns a
|
|
309
|
+
// referentially-stable object across renders. Updated only when an
|
|
310
|
+
// `atrium:userchange` event lands; `null` until the first event.
|
|
311
|
+
let cachedUserChange = null;
|
|
312
|
+
function getUserChangeSnapshot() {
|
|
313
|
+
return cachedUserChange ?? NO_USERCHANGE;
|
|
314
|
+
}
|
|
315
|
+
function getServerUserChangeSnapshot() {
|
|
316
|
+
return NO_USERCHANGE;
|
|
317
|
+
}
|
|
318
|
+
function subscribeUserChange(onChange) {
|
|
319
|
+
if (typeof window === 'undefined')
|
|
320
|
+
return () => { };
|
|
321
|
+
const handler = (e) => {
|
|
322
|
+
const detail = e.detail;
|
|
323
|
+
if (detail &&
|
|
324
|
+
(detail.previous === null || typeof detail.previous === 'number') &&
|
|
325
|
+
(detail.current === null || typeof detail.current === 'number')) {
|
|
326
|
+
cachedUserChange = {
|
|
327
|
+
previous: detail.previous,
|
|
328
|
+
current: detail.current,
|
|
329
|
+
nonce: typeof detail.nonce === 'number' ? detail.nonce : 0,
|
|
330
|
+
};
|
|
331
|
+
onChange();
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
window.addEventListener(ATRIUM_USERCHANGE_EVENT, handler);
|
|
335
|
+
return () => window.removeEventListener(ATRIUM_USERCHANGE_EVENT, handler);
|
|
336
|
+
}
|
|
337
|
+
/** Subscribe to atrium's identity transitions from inside a host
|
|
338
|
+
* bundle's React tree. Returns the most recent `atrium:userchange`
|
|
339
|
+
* detail — `{previous, current, nonce}` — or a zeroed sentinel
|
|
340
|
+
* (`{previous: null, current: null, nonce: 0}`) before any event has
|
|
341
|
+
* fired. The hook does NOT report the initial signed-in state on
|
|
342
|
+
* mount; use `useUserContext()` for that.
|
|
343
|
+
*
|
|
344
|
+
* Bridges the `atrium:userchange` CustomEvent atrium dispatches on
|
|
345
|
+
* `window` through `useSyncExternalStore`, so multiple subscribers in
|
|
346
|
+
* the same tree share one event listener and the snapshot is
|
|
347
|
+
* referentially stable when nothing has changed.
|
|
348
|
+
*
|
|
349
|
+
* The canonical use is wiping a host's own QueryClient when the user
|
|
350
|
+
* swaps — without it, user A's host cache renders for user B until
|
|
351
|
+
* staleness forces a refetch:
|
|
352
|
+
*
|
|
353
|
+
* ```tsx
|
|
354
|
+
* function HostCacheGuard({ client }: { client: QueryClient }) {
|
|
355
|
+
* const { nonce } = useAtriumUser();
|
|
356
|
+
* useEffect(() => {
|
|
357
|
+
* // nonce > 0 means at least one transition has fired; on the
|
|
358
|
+
* // first paint we skip (the host already loaded against the
|
|
359
|
+
* // current user).
|
|
360
|
+
* if (nonce > 0) client.clear();
|
|
361
|
+
* }, [nonce, client]);
|
|
362
|
+
* return null;
|
|
363
|
+
* }
|
|
364
|
+
* ```
|
|
365
|
+
*
|
|
366
|
+
* Hosts that don't use React (or want to clear the cache from outside
|
|
367
|
+
* any component) can subscribe directly:
|
|
368
|
+
* `window.addEventListener('atrium:userchange', () => client.clear())`.
|
|
369
|
+
*
|
|
370
|
+
* Available on atrium 0.18+. On older atrium images the event is
|
|
371
|
+
* never dispatched, so the hook stays at the zeroed sentinel — host
|
|
372
|
+
* bundles that need to support pre-0.18 atrium can read
|
|
373
|
+
* `window.__ATRIUM_VERSION__` and fall back to the in-component
|
|
374
|
+
* watch-`useUserContext` workaround. */
|
|
375
|
+
export function useAtriumUser() {
|
|
376
|
+
return useSyncExternalStore(subscribeUserChange, getUserChangeSnapshot, getServerUserChangeSnapshot);
|
|
377
|
+
}
|
|
378
|
+
/** Test-only: drop the cached snapshot so the next `getSnapshot`
|
|
379
|
+
* returns the zeroed sentinel. Production code never calls this — the
|
|
380
|
+
* cache is updated by the event subscription. */
|
|
381
|
+
export function __resetAtriumUserCacheForTests() {
|
|
382
|
+
cachedUserChange = null;
|
|
383
|
+
}
|
|
299
384
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,wCAAwC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,oBAAoB,GAErB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,mBAAmB,EACnB,QAAQ,GAGT,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,wCAAwC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,oBAAoB,GAErB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,mBAAmB,EACnB,QAAQ,GAGT,MAAM,uBAAuB,CAAC;AAW/B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAE5C,KAAK,UAAU,uBAAuB;IACpC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,eAAe,EAAE;QACvC,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;KACxC,CAAC,CAAC;IACH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,MAAM,K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C,CAAC;IAC1D,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAqCyC;AACzC,MAAM,UAAU,aAAa;IAC3B,OAAO,oBAAoB,CACzB,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,CAC5B,CAAC;AACJ,CAAC;AAED;;kDAEkD;AAClD,MAAM,UAAU,8BAA8B;IAC5C,gBAAgB,GAAG,IAAI,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brendanbank/atrium-host-bundle-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Runtime helpers, Vite preset, and React hooks for atrium host bundles. Wraps the dual-tree mount pattern, the host-bundle Vite library config, and the /users/me/context hook so a host's main.tsx is ~10 lines of registration calls.",
|
|
5
5
|
"license": "BSD-2-Clause",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@brendanbank/atrium-host-types": "0.
|
|
28
|
+
"@brendanbank/atrium-host-types": "0.18.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@tanstack/react-query": "^5.0.0",
|