@molecule/app-query-react 1.1.4 → 1.1.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 CHANGED
@@ -3,7 +3,7 @@ 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-11-03T05:29:04.362Z
6
+ Generated: 2026-11-09T15:00:50.006Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-query-react
@@ -310,8 +310,9 @@ rendering a loading state over an empty list. The key names everything the
310
310
  answer depends on, and the app's HTTP client sends the session, so a list the
311
311
  server can filter or personalize per viewer puts the viewer in its key and
312
312
  passes the same value as `principal` (`'anonymous'` when signed out): an
313
-
314
- _(description truncated — read the full text in `node_modules/@molecule/app-query-react/dist/useQuery.d.ts`.)_
313
+ account switch then drops the previous account's document immediately. Only
314
+ an endpoint that answers every viewer the same takes a viewer-free key with
315
+ `principal: 'public'`.
315
316
 
316
317
  ```typescript
317
318
  function useQuery<T>(options: QueryOptions<T> | null): QueryState<T>
@@ -344,6 +345,13 @@ Peer dependencies:
344
345
  or a successful null response as missing; other errors stay load failures.
345
346
  The app's bonded HTTP client rejects non-2xx responses. Native `fetch`
346
347
  resolves them, so a custom fetcher must check `response.ok` before JSON.
348
+ - **Mount a detail region and its actions only after its initial document arrives.**
349
+ A visible container is not a loaded document: a caller may wait for that container and
350
+ read its text once, or click its button, while `data` is still undefined. Put the loading
351
+ message outside the detail region, as in `PackagePage` above. Keep record-dependent
352
+ controls absent or natively disabled until the record exists; returning early inside
353
+ an enabled click handler loses that click. `client.set()` protects a cache mutation
354
+ from an older read, but cannot recover a click whose handler never sent the mutation.
347
355
  - **The key is the identity.** Building `options` inline is fine; the
348
356
  hook resubscribes only when the key's value changes, not when the
349
357
  `fetch` closure does.
package/dist/index.d.ts CHANGED
@@ -205,6 +205,13 @@
205
205
  * or a successful null response as missing; other errors stay load failures.
206
206
  * The app's bonded HTTP client rejects non-2xx responses. Native `fetch`
207
207
  * resolves them, so a custom fetcher must check `response.ok` before JSON.
208
+ * - **Mount a detail region and its actions only after its initial document arrives.**
209
+ * A visible container is not a loaded document: a caller may wait for that container and
210
+ * read its text once, or click its button, while `data` is still undefined. Put the loading
211
+ * message outside the detail region, as in `PackagePage` above. Keep record-dependent
212
+ * controls absent or natively disabled until the record exists; returning early inside
213
+ * an enabled click handler loses that click. `client.set()` protects a cache mutation
214
+ * from an older read, but cannot recover a click whose handler never sent the mutation.
208
215
  * - **The key is the identity.** Building `options` inline is fine; the
209
216
  * hook resubscribes only when the key's value changes, not when the
210
217
  * `fetch` closure does.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+PG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsQG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -205,6 +205,13 @@
205
205
  * or a successful null response as missing; other errors stay load failures.
206
206
  * The app's bonded HTTP client rejects non-2xx responses. Native `fetch`
207
207
  * resolves them, so a custom fetcher must check `response.ok` before JSON.
208
+ * - **Mount a detail region and its actions only after its initial document arrives.**
209
+ * A visible container is not a loaded document: a caller may wait for that container and
210
+ * read its text once, or click its button, while `data` is still undefined. Put the loading
211
+ * message outside the detail region, as in `PackagePage` above. Keep record-dependent
212
+ * controls absent or natively disabled until the record exists; returning early inside
213
+ * an enabled click handler loses that click. `client.set()` protects a cache mutation
214
+ * from an older read, but cannot recover a click whose handler never sent the mutation.
208
215
  * - **The key is the identity.** Building `options` inline is fine; the
209
216
  * hook resubscribes only when the key's value changes, not when the
210
217
  * `fetch` closure does.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-query-react",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "React hooks for @molecule/app-query — read a cached document synchronously, observe it, and prefetch on intent",
5
5
  "homepage": "https://www.molecule.dev/packages/app-query-react",
6
6
  "type": "module",