@molecule/app-react 1.6.4 → 1.6.6
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 +136 -19
- package/dist/contexts.d.ts +1 -1
- package/dist/contexts.d.ts.map +1 -1
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +5 -0
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/hooks/useStore.d.ts +11 -1
- package/dist/hooks/useStore.d.ts.map +1 -1
- package/dist/hooks/useStore.js +26 -4
- package/dist/hooks/useStore.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,15 +3,11 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-10-
|
|
6
|
+
Generated: 2026-10-18T20:37:04.919Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-react
|
|
10
10
|
|
|
11
|
-
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
12
|
-
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
13
|
-
> package's source — edit `src/index.ts` JSDoc, not this file.
|
|
14
|
-
|
|
15
11
|
React framework bindings for the Molecule app stack.
|
|
16
12
|
|
|
17
13
|
Provides React hooks, contexts, and provider components for all molecule
|
|
@@ -19,6 +15,10 @@ core interfaces (auth, i18n, theme, routing, state, http, storage, logger,
|
|
|
19
15
|
chat, workspace, editor, preview), so framework-agnostic providers plug
|
|
20
16
|
into React idioms.
|
|
21
17
|
|
|
18
|
+
> **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
|
|
19
|
+
> It is written to be read by coding agents as much as by people, and is generated from this
|
|
20
|
+
> package's source — edit `src/index.ts` JSDoc, not this file.
|
|
21
|
+
|
|
22
22
|
## Quick Start
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
@@ -86,6 +86,11 @@ Reactive authentication state snapshot (initialized, authenticated, user, loadin
|
|
|
86
86
|
|
|
87
87
|
```typescript
|
|
88
88
|
interface AuthState<T = UserProfile> {
|
|
89
|
+
/**
|
|
90
|
+
* The session's state as one value — render from this instead of combining
|
|
91
|
+
* `initialized`/`authenticated`/`loading`. See {@link AuthStatus}.
|
|
92
|
+
*/
|
|
93
|
+
status: AuthStatus
|
|
89
94
|
/**
|
|
90
95
|
* Whether auth state has been initialized.
|
|
91
96
|
*/
|
|
@@ -116,7 +121,10 @@ Provides login/logout/register flows, token management, profile
|
|
|
116
121
|
updates, and auth state subscription.
|
|
117
122
|
|
|
118
123
|
```typescript
|
|
119
|
-
interface AuthClient<
|
|
124
|
+
interface AuthClient<
|
|
125
|
+
T = UserProfile,
|
|
126
|
+
TRegister extends Record<string, unknown> = Record<never, never>,
|
|
127
|
+
> {
|
|
120
128
|
/**
|
|
121
129
|
* Returns the current authentication state snapshot.
|
|
122
130
|
*/
|
|
@@ -134,6 +142,11 @@ interface AuthClient<T = UserProfile> {
|
|
|
134
142
|
* hitting the network. Intended for local refreshes after a per-app
|
|
135
143
|
* mutation (e.g., the user just PATCHed their own profile and the
|
|
136
144
|
* server returned the canonical row). Does NOT change tokens.
|
|
145
|
+
*
|
|
146
|
+
* This does not sign the client in: `authenticated` and `status` are
|
|
147
|
+
* unchanged, so an anonymous client stays anonymous. Use
|
|
148
|
+
* {@link login} / {@link register} for a credential exchange, or
|
|
149
|
+
* {@link setSession} when the token was issued outside the client.
|
|
137
150
|
*/
|
|
138
151
|
setUser(user: T | null): void
|
|
139
152
|
/**
|
|
@@ -141,13 +154,32 @@ interface AuthClient<T = UserProfile> {
|
|
|
141
154
|
*/
|
|
142
155
|
getAccessToken(): string | null
|
|
143
156
|
/**
|
|
144
|
-
* Stores the access token in the configured token storage adapter (in
|
|
145
|
-
*
|
|
146
|
-
* the
|
|
147
|
-
*
|
|
148
|
-
*
|
|
157
|
+
* Stores the access token in the configured token storage adapter (in a
|
|
158
|
+
* browser, Web Storage; `'memory'` where no browser store exists). Use this
|
|
159
|
+
* to seed the token after an out-of-band exchange (e.g. the OAuth
|
|
160
|
+
* code→token redirect) instead of writing to `localStorage` directly,
|
|
161
|
+
* which would violate the storage contract and make a stored bearer token
|
|
162
|
+
* JS-readable (XSS-exfiltratable). Pass `null` to clear it.
|
|
163
|
+
*
|
|
164
|
+
* This changes token storage only; it does not sign the client in
|
|
165
|
+
* (`authenticated` and `status` are unchanged). Use {@link login} /
|
|
166
|
+
* {@link register} for a credential exchange, or call {@link setSession}
|
|
167
|
+
* with the token and the user to establish an already-issued session.
|
|
149
168
|
*/
|
|
150
169
|
setAccessToken(token: string | null): void
|
|
170
|
+
/**
|
|
171
|
+
* Adopts a session an out-of-band exchange already established: stores the
|
|
172
|
+
* access token (and the refresh token when given), caches the user, and
|
|
173
|
+
* sets the COMPLETE state — `initialized`, `authenticated`, `status:
|
|
174
|
+
* 'authenticated'`, no error — in one update, with one subscriber
|
|
175
|
+
* notification. Every hook reading the shared client sees the user as
|
|
176
|
+
* signed in immediately.
|
|
177
|
+
*
|
|
178
|
+
* This is the way to seed an OAuth/custom sign-in. Calling
|
|
179
|
+
* {@link setAccessToken} and {@link setUser} instead does NOT sign the
|
|
180
|
+
* client in.
|
|
181
|
+
*/
|
|
182
|
+
setSession(session: AuthSessionSeed<T>): void
|
|
151
183
|
/**
|
|
152
184
|
* Gets the refresh token.
|
|
153
185
|
*/
|
|
@@ -161,9 +193,10 @@ interface AuthClient<T = UserProfile> {
|
|
|
161
193
|
*/
|
|
162
194
|
logout(): Promise<void>
|
|
163
195
|
/**
|
|
164
|
-
* Registers a new user.
|
|
196
|
+
* Registers a new user. Accepts the base fields plus the app's own fields
|
|
197
|
+
* (`TRegister`) at the top level — see {@link RegisterData}.
|
|
165
198
|
*/
|
|
166
|
-
register(data: RegisterData): Promise<AuthResult<T>>
|
|
199
|
+
register(data: RegisterData<TRegister>): Promise<AuthResult<T>>
|
|
167
200
|
/**
|
|
168
201
|
* Refreshes the access token.
|
|
169
202
|
*/
|
|
@@ -186,8 +219,64 @@ interface AuthClient<T = UserProfile> {
|
|
|
186
219
|
changePassword(oldPassword: string, newPassword: string): Promise<void>
|
|
187
220
|
/**
|
|
188
221
|
* Initializes auth state (e.g., from stored tokens).
|
|
222
|
+
*
|
|
223
|
+
* With a stored token AND a stored user it marks the session `'authenticated'`
|
|
224
|
+
* SYNCHRONOUSLY — before its first `await` — so the first render is the
|
|
225
|
+
* signed-in UI and no page waits on a verification round trip. Any check
|
|
226
|
+
* (a refresh, the cookie-restore probe) settles behind that render, and only an
|
|
227
|
+
* explicit 401/403 ends the session; a network/5xx/404 failure keeps it and
|
|
228
|
+
* reports `'unavailable'`. With no stored user the client stays `'loading'`
|
|
229
|
+
* until the cookie restore decides.
|
|
230
|
+
*
|
|
231
|
+
* Do not put this call (or a `/me` request of your own) in front of the first
|
|
232
|
+
* render, and do not render a loading screen over a session it just restored:
|
|
233
|
+
* `whenRestored()` already resolves as soon as the restore has settled, and the
|
|
234
|
+
* HTTP gate built on it holds requests for exactly that window.
|
|
189
235
|
*/
|
|
190
236
|
initialize(): Promise<void>
|
|
237
|
+
/**
|
|
238
|
+
* Re-checks a restored session against the server, in the background — the
|
|
239
|
+
* boot-time validation an app with a stored token needs when a revoked or
|
|
240
|
+
* expired token must sign the user out. Call it AFTER the first render
|
|
241
|
+
* (`initialize()` restores synchronously from storage; this costs one request).
|
|
242
|
+
*
|
|
243
|
+
* - The server confirms the user: the session is refreshed and {@link AuthState.status}
|
|
244
|
+
* stays `'authenticated'`.
|
|
245
|
+
* - The server answers 401 or 403: the token is dead — the stored session is
|
|
246
|
+
* cleared and the status becomes `'unauthenticated'`.
|
|
247
|
+
* - The server cannot confirm the session — a network failure, a 5xx, or a 404
|
|
248
|
+
* from a misconfigured {@link AuthClientConfig.currentUserEndpoint}: the
|
|
249
|
+
* session (token AND user) is KEPT and the status becomes `'unavailable'`, so
|
|
250
|
+
* the app can retry instead of signing the user out over a bad connection or a
|
|
251
|
+
* route that does not exist. The 404 error names `currentUserEndpoint`.
|
|
252
|
+
*
|
|
253
|
+
* Do not hand-write this beside the client: a parallel token/user store for a
|
|
254
|
+
* "validating"/"unavailable" flag is the race this method removes.
|
|
255
|
+
*
|
|
256
|
+
* Optional: a provider with no restorable session has nothing to validate.
|
|
257
|
+
*/
|
|
258
|
+
validateSession?(): Promise<void>
|
|
259
|
+
/**
|
|
260
|
+
* Resolves when the session restore started by `initialize()` has settled — the point
|
|
261
|
+
* after which the client knows whether this visitor is signed in.
|
|
262
|
+
*
|
|
263
|
+
* Resolves IMMEDIATELY when no restore is in flight: before `initialize()` is ever
|
|
264
|
+
* called, and after it has finished. A restore that failed resolves too (it settled the
|
|
265
|
+
* question), so an HTTP client can await this before every request without risking one
|
|
266
|
+
* held forever. That is what makes the fetch-before-restore race impossible: a page that
|
|
267
|
+
* fetches viewer-dependent data on mount waits here instead of going out anonymously
|
|
268
|
+
* (see `setAuthGate` in `@molecule/app-http`).
|
|
269
|
+
*
|
|
270
|
+
* Optional: a provider that restores no session has nothing to wait for. Without it, an
|
|
271
|
+
* HTTP client bonded to that provider sends first-paint requests unauthenticated.
|
|
272
|
+
*
|
|
273
|
+
* A provider whose restore sends a request THROUGH the gated HTTP client must send that
|
|
274
|
+
* request with `skipAuthGate: true` (`RequestConfig` in `@molecule/app-http`): the gate
|
|
275
|
+
* waits on this promise, so holding the restore's own request makes the gate wait on
|
|
276
|
+
* itself and stalls every request it holds until it times out. `createJWTAuthClient`'s
|
|
277
|
+
* restore does not need it — it uses `fetch`, not the bonded client.
|
|
278
|
+
*/
|
|
279
|
+
whenRestored?(): Promise<void>
|
|
191
280
|
/**
|
|
192
281
|
* Subscribes to auth state changes.
|
|
193
282
|
*/
|
|
@@ -363,7 +452,8 @@ interface HttpClient {
|
|
|
363
452
|
*/
|
|
364
453
|
defaultHeaders: Record<string, string>
|
|
365
454
|
/**
|
|
366
|
-
* Makes a generic HTTP request.
|
|
455
|
+
* Makes a generic HTTP request. `data` is a field of THIS config object — the same body
|
|
456
|
+
* `post(url, data, config)` takes as its second argument.
|
|
367
457
|
*/
|
|
368
458
|
request<T = unknown>(config: FullRequestConfig): Promise<HttpResponse<T>>
|
|
369
459
|
/**
|
|
@@ -371,15 +461,19 @@ interface HttpClient {
|
|
|
371
461
|
*/
|
|
372
462
|
get<T = unknown>(url: string, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
373
463
|
/**
|
|
374
|
-
* Makes a POST request.
|
|
464
|
+
* Makes a POST request. `data` is the request BODY, not a config object: the wire body is
|
|
465
|
+
* `data` itself, so `post(url, { data: body })` sends `{"data":body}` — pass `body` directly.
|
|
466
|
+
* A config (headers, params) is the THIRD argument.
|
|
375
467
|
*/
|
|
376
468
|
post<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
377
469
|
/**
|
|
378
|
-
* Makes a PUT request.
|
|
470
|
+
* Makes a PUT request. `data` is the request BODY (second argument) — never `{ data: body }`,
|
|
471
|
+
* which sends `{"data":body}`; a config is the THIRD argument.
|
|
379
472
|
*/
|
|
380
473
|
put<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
381
474
|
/**
|
|
382
|
-
* Makes a PATCH request.
|
|
475
|
+
* Makes a PATCH request. `data` is the request BODY (second argument) — never `{ data: body }`,
|
|
476
|
+
* which sends `{"data":body}`; a config is the THIRD argument.
|
|
383
477
|
*/
|
|
384
478
|
patch<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>
|
|
385
479
|
/**
|
|
@@ -1185,6 +1279,13 @@ Hook result for useAuth.
|
|
|
1185
1279
|
|
|
1186
1280
|
```typescript
|
|
1187
1281
|
interface UseAuthResult<T = unknown> {
|
|
1282
|
+
/**
|
|
1283
|
+
* The session state as one value — render from this instead of combining
|
|
1284
|
+
* `initialized`/`authenticated`/`loading`. A stored token AND user make it
|
|
1285
|
+
* `'authenticated'` on the first render; only `'loading'` means "no decision
|
|
1286
|
+
* yet", so a route guard waits on that and nothing else.
|
|
1287
|
+
*/
|
|
1288
|
+
status: AuthState<T>['status']
|
|
1188
1289
|
state: AuthState<T>
|
|
1189
1290
|
login: AuthClient<T>['login']
|
|
1190
1291
|
logout: AuthClient<T>['logout']
|
|
@@ -1626,7 +1727,7 @@ function useAsyncState(initialState: T): [T, AsyncSetState<T>, AsyncExtendState<
|
|
|
1626
1727
|
Hook to access the auth client from context.
|
|
1627
1728
|
|
|
1628
1729
|
```typescript
|
|
1629
|
-
function useAuthClient(): AuthClient<T
|
|
1730
|
+
function useAuthClient(): AuthClient<T, Record<never, never>>
|
|
1630
1731
|
```
|
|
1631
1732
|
|
|
1632
1733
|
**Returns:** The auth client from context
|
|
@@ -2225,6 +2326,9 @@ The context comes from `<StateProvider provider={…}>` or from
|
|
|
2225
2326
|
`<MoleculeProvider>` — which supplies the provider bonded under
|
|
2226
2327
|
`@molecule/app-state` by default, so a scaffolded app needs no `state` prop.
|
|
2227
2328
|
|
|
2329
|
+
Only hooks that read the context call this; `useStore(store)` takes its store
|
|
2330
|
+
as an argument and works with no provider at all.
|
|
2331
|
+
|
|
2228
2332
|
```typescript
|
|
2229
2333
|
function useStateProvider(): StateProvider
|
|
2230
2334
|
```
|
|
@@ -2235,6 +2339,12 @@ function useStateProvider(): StateProvider
|
|
|
2235
2339
|
|
|
2236
2340
|
Hook to subscribe to a store with optional selector and equality function.
|
|
2237
2341
|
|
|
2342
|
+
The store is the argument, so this hook needs NO `StateProvider`: it reads
|
|
2343
|
+
`store.getState()` and subscribes with `store.subscribe()`, and never touches
|
|
2344
|
+
the state context. A store minted outside the `state` bond — the direct
|
|
2345
|
+
`createStoreWithActions()` / `createStore()` a provider package exports — is
|
|
2346
|
+
therefore as valid here as one `@molecule/app-state`'s `createStore()` made.
|
|
2347
|
+
|
|
2238
2348
|
```typescript
|
|
2239
2349
|
function useStore(store: Store<T>, options?: UseStoreOptions<T, S>): S
|
|
2240
2350
|
```
|
|
@@ -2709,7 +2819,7 @@ const StateContext: Context<StateProvider | null>
|
|
|
2709
2819
|
Context for authentication client.
|
|
2710
2820
|
|
|
2711
2821
|
```typescript
|
|
2712
|
-
const AuthContext: Context<AuthClient<unknown
|
|
2822
|
+
const AuthContext: Context<AuthClient<unknown, Record<never, never>> | null>
|
|
2713
2823
|
```
|
|
2714
2824
|
|
|
2715
2825
|
#### `ThemeContext`
|
|
@@ -2856,6 +2966,13 @@ Peer dependencies:
|
|
|
2856
2966
|
`useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
2857
2967
|
`addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
2858
2968
|
`@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
2969
|
+
- **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
2970
|
+
`useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
2971
|
+
`AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
2972
|
+
render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
2973
|
+
answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
2974
|
+
localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
2975
|
+
page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
2859
2976
|
- **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
2860
2977
|
every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
2861
2978
|
mounted). Scaffolded Vite configs ship
|
package/dist/contexts.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const StateContext: import("react").Context<StateProvider | null>
|
|
|
25
25
|
/**
|
|
26
26
|
* Context for authentication client.
|
|
27
27
|
*/
|
|
28
|
-
export declare const AuthContext: import("react").Context<AuthClient<unknown
|
|
28
|
+
export declare const AuthContext: import("react").Context<AuthClient<unknown, Record<never, never>> | null>;
|
|
29
29
|
/**
|
|
30
30
|
* Context for theme provider.
|
|
31
31
|
*/
|
package/dist/contexts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../src/contexts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,YAAY,+CAA4C,CAAA;AAGrE;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+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AA;AAGnE;;GAEG;AACH,eAAO,MAAM,gBAAgB,mDAAgD,CAAA;AAG7E;;GAEG;AACH,eAAO,MAAM,aAAa,gDAA6C,CAAA;AAGvE;;GAEG;AACH,eAAO,MAAM,cAAc,iDAA8C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAA6C,MAAM,oBAAoB,CAAA;AAI/F,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CAU1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,UAAU,EAA6C,MAAM,oBAAoB,CAAA;AAI/F,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CAU1D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CAqE/E;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,GAAG,OAAO,KAAK,CAAC,GAAG,IAAI,CAG/C;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAG5C"}
|
package/dist/hooks/useAuth.js
CHANGED
|
@@ -45,6 +45,7 @@ export function useAuth(options) {
|
|
|
45
45
|
const next = client.getState();
|
|
46
46
|
const prev = cachedStateRef.current;
|
|
47
47
|
if (prev !== null &&
|
|
48
|
+
prev.status === next.status &&
|
|
48
49
|
prev.initialized === next.initialized &&
|
|
49
50
|
prev.authenticated === next.authenticated &&
|
|
50
51
|
prev.user === next.user &&
|
|
@@ -74,6 +75,10 @@ export function useAuth(options) {
|
|
|
74
75
|
const refresh = useCallback(() => client.refresh(), [client]);
|
|
75
76
|
const setUser = useCallback((user) => client.setUser(user), [client]);
|
|
76
77
|
return {
|
|
78
|
+
// The single value to render from. A stored token AND user make it
|
|
79
|
+
// `'authenticated'` on the FIRST render (the client restores synchronously);
|
|
80
|
+
// only `'loading'` means no decision yet, so a guard waits on that alone.
|
|
81
|
+
status: state.status,
|
|
77
82
|
state,
|
|
78
83
|
login,
|
|
79
84
|
logout,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.js","sourceRoot":"","sources":["../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAGxF,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAG5C;;;;;GAKG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACtC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,CAAC,CAAC,oCAAoC,EAAE,SAAS,EAAE;YACjD,YAAY,EAAE,mDAAmD;SAClE,CAAC,CACH,CAAA;IACH,CAAC;IACD,OAAO,MAAuB,CAAA;AAChC,CAAC;AAED;;;;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AC,MAAM,CAAC,CAAC,CAAA;IAE3D,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,IAAkB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAErF,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAE7D,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAE/E,OAAO;QACL,mEAAmE;QACnE,6EAA6E;QAC7E,0EAA0E;QAC1E,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK;QACL,KAAK;QACL,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,eAAe,EAAE,KAAK,CAAC,aAAa;QACpC,SAAS,EAAE,KAAK,CAAC,OAAO;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO;IACrB,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAK,CAAA;IAC7B,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAA;IACrC,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
package/dist/hooks/useStore.d.ts
CHANGED
|
@@ -12,13 +12,23 @@ import type { UseStoreOptions } from '../types.js';
|
|
|
12
12
|
* `<MoleculeProvider>` — which supplies the provider bonded under
|
|
13
13
|
* `@molecule/app-state` by default, so a scaffolded app needs no `state` prop.
|
|
14
14
|
*
|
|
15
|
+
* Only hooks that read the context call this; `useStore(store)` takes its store
|
|
16
|
+
* as an argument and works with no provider at all.
|
|
17
|
+
*
|
|
15
18
|
* @returns The state provider from context
|
|
16
|
-
* @throws {Error}
|
|
19
|
+
* @throws {Error} when no `StateProvider` is above the component — the message
|
|
20
|
+
* names the fix (which provider to render, and the import for it).
|
|
17
21
|
*/
|
|
18
22
|
export declare function useStateProvider(): StateProvider;
|
|
19
23
|
/**
|
|
20
24
|
* Hook to subscribe to a store with optional selector and equality function.
|
|
21
25
|
*
|
|
26
|
+
* The store is the argument, so this hook needs NO `StateProvider`: it reads
|
|
27
|
+
* `store.getState()` and subscribes with `store.subscribe()`, and never touches
|
|
28
|
+
* the state context. A store minted outside the `state` bond — the direct
|
|
29
|
+
* `createStoreWithActions()` / `createStore()` a provider package exports — is
|
|
30
|
+
* therefore as valid here as one `@molecule/app-state`'s `createStore()` made.
|
|
31
|
+
*
|
|
22
32
|
* @param store - The store to subscribe to
|
|
23
33
|
* @param options - Hook options (selector, equalityFn)
|
|
24
34
|
* @returns The selected state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAkBlD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAUhD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CA6BtF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAEpE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,EAAE,CAAC,EACzD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,GAC/F,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAKtB"}
|
package/dist/hooks/useStore.js
CHANGED
|
@@ -6,6 +6,20 @@
|
|
|
6
6
|
import { useCallback, useContext, useRef, useSyncExternalStore } from 'react';
|
|
7
7
|
import { t } from '@molecule/app-i18n';
|
|
8
8
|
import { StateContext } from '../contexts.js';
|
|
9
|
+
/**
|
|
10
|
+
* The fix, appended to the error below — this hook is the one place that READS
|
|
11
|
+
* the context, so it is the one place that has to say where the context comes
|
|
12
|
+
* from. The sentences are code (an import, a component, a bond call), so they
|
|
13
|
+
* are appended in English rather than translated.
|
|
14
|
+
*/
|
|
15
|
+
const STATE_CONTEXT_FIX = ' To fix: render a state provider above this component — ' +
|
|
16
|
+
"`import { MoleculeProvider, StateProvider } from '@molecule/app-react'`; " +
|
|
17
|
+
'<MoleculeProvider> passes the provider bonded under `@molecule/app-state` ' +
|
|
18
|
+
'(bond one with `setupAllDefaultBonds()` from `@molecule/app-bonds-default-react`, ' +
|
|
19
|
+
'or `setProvider(provider)` from `@molecule/app-state`), and ' +
|
|
20
|
+
'<StateProvider provider={provider}> passes one you hold. ' +
|
|
21
|
+
'To read a store you already have, call useStore(store) instead — it subscribes to the ' +
|
|
22
|
+
'store it is given and needs no provider.';
|
|
9
23
|
/**
|
|
10
24
|
* Hook to access the state provider from context.
|
|
11
25
|
*
|
|
@@ -13,21 +27,31 @@ import { StateContext } from '../contexts.js';
|
|
|
13
27
|
* `<MoleculeProvider>` — which supplies the provider bonded under
|
|
14
28
|
* `@molecule/app-state` by default, so a scaffolded app needs no `state` prop.
|
|
15
29
|
*
|
|
30
|
+
* Only hooks that read the context call this; `useStore(store)` takes its store
|
|
31
|
+
* as an argument and works with no provider at all.
|
|
32
|
+
*
|
|
16
33
|
* @returns The state provider from context
|
|
17
|
-
* @throws {Error}
|
|
34
|
+
* @throws {Error} when no `StateProvider` is above the component — the message
|
|
35
|
+
* names the fix (which provider to render, and the import for it).
|
|
18
36
|
*/
|
|
19
37
|
export function useStateProvider() {
|
|
20
38
|
const provider = useContext(StateContext);
|
|
21
39
|
if (!provider) {
|
|
22
40
|
throw new Error(t('react.error.useStoreOutsideProvider', undefined, {
|
|
23
41
|
defaultValue: 'useStateProvider must be used within a StateProvider',
|
|
24
|
-
}));
|
|
42
|
+
}) + STATE_CONTEXT_FIX);
|
|
25
43
|
}
|
|
26
44
|
return provider;
|
|
27
45
|
}
|
|
28
46
|
/**
|
|
29
47
|
* Hook to subscribe to a store with optional selector and equality function.
|
|
30
48
|
*
|
|
49
|
+
* The store is the argument, so this hook needs NO `StateProvider`: it reads
|
|
50
|
+
* `store.getState()` and subscribes with `store.subscribe()`, and never touches
|
|
51
|
+
* the state context. A store minted outside the `state` bond — the direct
|
|
52
|
+
* `createStoreWithActions()` / `createStore()` a provider package exports — is
|
|
53
|
+
* therefore as valid here as one `@molecule/app-state`'s `createStore()` made.
|
|
54
|
+
*
|
|
31
55
|
* @param store - The store to subscribe to
|
|
32
56
|
* @param options - Hook options (selector, equalityFn)
|
|
33
57
|
* @returns The selected state
|
|
@@ -39,8 +63,6 @@ export function useStateProvider() {
|
|
|
39
63
|
* ```
|
|
40
64
|
*/
|
|
41
65
|
export function useStore(store, options) {
|
|
42
|
-
// Validate that we're within a StateProvider
|
|
43
|
-
useStateProvider();
|
|
44
66
|
const { selector, equalityFn } = options ?? {};
|
|
45
67
|
// Use a ref to track the previous selected value for equality comparison
|
|
46
68
|
const prevSelectedRef = useRef(undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStore.js","sourceRoot":"","sources":["../../src/hooks/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAE7E,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C
|
|
1
|
+
{"version":3,"file":"useStore.js","sourceRoot":"","sources":["../../src/hooks/useStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAE7E,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAA;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C;;;;;GAKG;AACH,MAAM,iBAAiB,GACrB,0DAA0D;IAC1D,2EAA2E;IAC3E,4EAA4E;IAC5E,oFAAoF;IACpF,8DAA8D;IAC9D,2DAA2D;IAC3D,wFAAwF;IACxF,0CAA0C,CAAA;AAE5C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;IACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,CAAC,CAAC,qCAAqC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KAAK,CAAC,QAAQ,CAAA;AACvB,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAe,EACf,MAAgG;IAEhG,OAAO,WAAW,CAChB,CAAC,GAAG,IAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,EAClE,CAAC,KAAK,EAAE,MAAM,CAAC,CAChB,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,13 @@
|
|
|
60
60
|
* `useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
61
61
|
* `addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
62
62
|
* `@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
63
|
+
* - **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
64
|
+
* `useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
65
|
+
* `AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
66
|
+
* render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
67
|
+
* answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
68
|
+
* localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
69
|
+
* page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
63
70
|
* - **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
64
71
|
* every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
65
72
|
* mounted). Scaffolded Vite configs ship
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -60,6 +60,13 @@
|
|
|
60
60
|
* `useTranslation()` (or `useT()`); it re-renders on `onLocaleChange` — even when
|
|
61
61
|
* `addTranslations()` only adds keys for the current locale. Calling the raw `t()` import from
|
|
62
62
|
* `@molecule/app-i18n` in render works once but leaves stale text after a locale switch.
|
|
63
|
+
* - **Load a page's data with `useQuery` from `@molecule/app-query-react`, never with `fetch` in a
|
|
64
|
+
* `useEffect`.** A hand-written load effect that cancels on cleanup (a `cancelled` flag or an
|
|
65
|
+
* `AbortController`) cancels its own request on every re-render when a dependency is rebuilt each
|
|
66
|
+
* render (`const [.., setError] = useApiErrors()`), and its ref guard then skips the refetch: the
|
|
67
|
+
* answer is dropped whenever it arrives after a re-render — always on a remote server, never on
|
|
68
|
+
* localhost. `useQuery` keeps one request per key and aborts it only when the key changes or the
|
|
69
|
+
* page unmounts (install `@molecule/app-query` + a bond such as `@molecule/app-query-memory`).
|
|
63
70
|
* - **Exactly one React copy.** In workspace/symlinked dev setups a second React instance makes
|
|
64
71
|
* every hook fail ("Invalid hook call", or the provider errors above with the provider
|
|
65
72
|
* mounted). Scaffolded Vite configs ship
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAEH,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -133,6 +133,13 @@ export interface UseAuthOptions {
|
|
|
133
133
|
* Hook result for useAuth.
|
|
134
134
|
*/
|
|
135
135
|
export interface UseAuthResult<T = unknown> {
|
|
136
|
+
/**
|
|
137
|
+
* The session state as one value — render from this instead of combining
|
|
138
|
+
* `initialized`/`authenticated`/`loading`. A stored token AND user make it
|
|
139
|
+
* `'authenticated'` on the first render; only `'loading'` means "no decision
|
|
140
|
+
* yet", so a route guard waits on that and nothing else.
|
|
141
|
+
*/
|
|
142
|
+
status: AuthState<T>['status'];
|
|
136
143
|
state: AuthState<T>;
|
|
137
144
|
login: AuthClient<T>['login'];
|
|
138
145
|
logout: AuthClient<T>['logout'];
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,C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AAE,WAAW,KAAK,IAAI,CAAA;IACxC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5D,6EAA6E;IAC7E,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAMD,YAAY,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,KAAK,GACN,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
4
4
|
"description": "React framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@molecule/app-ai-models": "1.4.0",
|
|
62
|
-
"@molecule/app-bonds-default-react": "1.1.
|
|
62
|
+
"@molecule/app-bonds-default-react": "1.1.3",
|
|
63
63
|
"@molecule/app-i18n": "1.0.3",
|
|
64
64
|
"@testing-library/dom": "10.4.1",
|
|
65
65
|
"@testing-library/react": "16.3.2",
|