@molecule/app-query-react 1.6.1 → 1.6.2

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-14T12:29:21.947Z
6
+ Generated: 2026-11-15T13:01:55.786Z
7
7
  -->
8
8
 
9
9
  # @molecule/app-query-react
@@ -45,8 +45,8 @@ its writes already publish the response and refresh its tracked collections.
45
45
  ```tsx
46
46
  import { Link } from 'react-router'
47
47
  import { getClient, isHttpError } from '@molecule/app-http'
48
- import { t } from '@molecule/app-i18n'
49
48
  import { intentPrefetchProps, useQuery } from '@molecule/app-query-react'
49
+ import { useTranslation } from '@molecule/app-react'
50
50
 
51
51
  interface PackageDocument {
52
52
  name: string
@@ -78,6 +78,7 @@ function PackageLink({ name }: { name: string }) {
78
78
  }
79
79
 
80
80
  function PackagePage({ name }: { name: string }) {
81
+ const { t } = useTranslation()
81
82
  const { data, status } = useQuery(packageQuery(name))
82
83
  if (status === 'error') {
83
84
  return (
@@ -181,8 +182,8 @@ explicit `fetch()` retries into the mounted page.
181
182
 
182
183
  ```tsx
183
184
  import { getClient } from '@molecule/app-http'
184
- import { t } from '@molecule/app-i18n'
185
185
  import { getQueryClient } from '@molecule/app-query'
186
+ import { useTranslation } from '@molecule/app-react'
186
187
 
187
188
  // The key names what the document actually depends on — here the signed-in
188
189
  // principal, the filter and the page. Another principal's feed is a
@@ -210,6 +211,7 @@ async function setFollowing(principal: string, authorId: string, follow: boolean
210
211
  }
211
212
 
212
213
  function Retry({ principal }: { principal: string }) {
214
+ const { t } = useTranslation()
213
215
  return (
214
216
  <button
215
217
  onClick={() => {
package/dist/index.d.ts CHANGED
@@ -31,8 +31,8 @@
31
31
  * ```tsx
32
32
  * import { Link } from 'react-router'
33
33
  * import { getClient, isHttpError } from '@molecule/app-http'
34
- * import { t } from '@molecule/app-i18n'
35
34
  * import { intentPrefetchProps, useQuery } from '@molecule/app-query-react'
35
+ * import { useTranslation } from '@molecule/app-react'
36
36
  *
37
37
  * interface PackageDocument {
38
38
  * name: string
@@ -60,6 +60,7 @@
60
60
  * }
61
61
  *
62
62
  * function PackagePage({ name }: { name: string }) {
63
+ * const { t } = useTranslation()
63
64
  * const { data, status } = useQuery(packageQuery(name))
64
65
  * if (status === 'error') {
65
66
  * return <p role="alert">{t('packages.loadFailed', undefined, { defaultValue: 'Unable to load package.' })}</p>
@@ -156,8 +157,8 @@
156
157
  *
157
158
  * ```tsx
158
159
  * import { getClient } from '@molecule/app-http'
159
- * import { t } from '@molecule/app-i18n'
160
160
  * import { getQueryClient } from '@molecule/app-query'
161
+ * import { useTranslation } from '@molecule/app-react'
161
162
  *
162
163
  * // The key names what the document actually depends on — here the signed-in
163
164
  * // principal, the filter and the page. Another principal's feed is a
@@ -185,6 +186,7 @@
185
186
  * }
186
187
  *
187
188
  * function Retry({ principal }: { principal: string }) {
189
+ * const { t } = useTranslation()
188
190
  * return (
189
191
  * <button
190
192
  * onClick={() => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiYG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmYG;AAEH,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
package/dist/index.js CHANGED
@@ -31,8 +31,8 @@
31
31
  * ```tsx
32
32
  * import { Link } from 'react-router'
33
33
  * import { getClient, isHttpError } from '@molecule/app-http'
34
- * import { t } from '@molecule/app-i18n'
35
34
  * import { intentPrefetchProps, useQuery } from '@molecule/app-query-react'
35
+ * import { useTranslation } from '@molecule/app-react'
36
36
  *
37
37
  * interface PackageDocument {
38
38
  * name: string
@@ -60,6 +60,7 @@
60
60
  * }
61
61
  *
62
62
  * function PackagePage({ name }: { name: string }) {
63
+ * const { t } = useTranslation()
63
64
  * const { data, status } = useQuery(packageQuery(name))
64
65
  * if (status === 'error') {
65
66
  * return <p role="alert">{t('packages.loadFailed', undefined, { defaultValue: 'Unable to load package.' })}</p>
@@ -156,8 +157,8 @@
156
157
  *
157
158
  * ```tsx
158
159
  * import { getClient } from '@molecule/app-http'
159
- * import { t } from '@molecule/app-i18n'
160
160
  * import { getQueryClient } from '@molecule/app-query'
161
+ * import { useTranslation } from '@molecule/app-react'
161
162
  *
162
163
  * // The key names what the document actually depends on — here the signed-in
163
164
  * // principal, the filter and the page. Another principal's feed is a
@@ -185,6 +186,7 @@
185
186
  * }
186
187
  *
187
188
  * function Retry({ principal }: { principal: string }) {
189
+ * const { t } = useTranslation()
188
190
  * return (
189
191
  * <button
190
192
  * onClick={() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-query-react",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
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",