@molecule/app-query-react 1.1.3 → 1.1.5

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-10-27T04:18:56.986Z
6
+ Generated: 2026-11-04T14:20:06.123Z
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>
@@ -384,6 +385,9 @@ Peer dependencies:
384
385
  until the app retries with `client.fetch(options)` or the page subscribes
385
386
  again (a key change or a re-mount).
386
387
  - After a mutation, `client.set(key, response)` paints the server's own
387
- answer at once, and `client.invalidate(prefix)` marks the affected reads
388
- stale for their next mount. Which key and which scope is the app's
389
- decision: the cache does not infer it from auth or form state.
388
+ answer at once and supersedes an older fetch already in flight for that
389
+ key, so its response cannot undo the mutation. An existing `fetch()` caller
390
+ still settles with its older response or a bond-specific cancellation.
391
+ `client.invalidate(prefix)` marks the affected reads stale for their next
392
+ mount. Which key and which scope is the app's decision: the cache does not
393
+ infer it from auth or form state.
package/dist/index.d.ts CHANGED
@@ -245,9 +245,12 @@
245
245
  * until the app retries with `client.fetch(options)` or the page subscribes
246
246
  * again (a key change or a re-mount).
247
247
  * - After a mutation, `client.set(key, response)` paints the server's own
248
- * answer at once, and `client.invalidate(prefix)` marks the affected reads
249
- * stale for their next mount. Which key and which scope is the app's
250
- * decision: the cache does not infer it from auth or form state.
248
+ * answer at once and supersedes an older fetch already in flight for that
249
+ * key, so its response cannot undo the mutation. An existing `fetch()` caller
250
+ * still settles with its older response or a bond-specific cancellation.
251
+ * `client.invalidate(prefix)` marks the affected reads stale for their next
252
+ * mount. Which key and which scope is the app's decision: the cache does not
253
+ * infer it from auth or form state.
251
254
  *
252
255
  * @module
253
256
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4PG;AAEH,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
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"}
package/dist/index.js CHANGED
@@ -245,9 +245,12 @@
245
245
  * until the app retries with `client.fetch(options)` or the page subscribes
246
246
  * again (a key change or a re-mount).
247
247
  * - After a mutation, `client.set(key, response)` paints the server's own
248
- * answer at once, and `client.invalidate(prefix)` marks the affected reads
249
- * stale for their next mount. Which key and which scope is the app's
250
- * decision: the cache does not infer it from auth or form state.
248
+ * answer at once and supersedes an older fetch already in flight for that
249
+ * key, so its response cannot undo the mutation. An existing `fetch()` caller
250
+ * still settles with its older response or a bond-specific cancellation.
251
+ * `client.invalidate(prefix)` marks the affected reads stale for their next
252
+ * mount. Which key and which scope is the app's decision: the cache does not
253
+ * infer it from auth or form state.
251
254
  *
252
255
  * @module
253
256
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-query-react",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
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",
@@ -40,9 +40,9 @@
40
40
  "react": "^18.0.0 || ^19.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@molecule/app-query": "1.1.1",
44
- "@molecule/app-query-memory": "1.0.3",
45
- "@molecule/app-query-tanstack": "1.0.2",
43
+ "@molecule/app-query": "1.1.2",
44
+ "@molecule/app-query-memory": "1.0.4",
45
+ "@molecule/app-query-tanstack": "1.0.3",
46
46
  "@types/node": "26.6.5",
47
47
  "@types/react": "19.3.0",
48
48
  "@types/react-dom": "19.3.0",