on-zero 0.4.39 → 0.4.42
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/dist/cjs/createUseQuery.cjs +30 -6
- package/dist/cjs/createUseQuery.native.js +31 -6
- package/dist/cjs/createUseQuery.native.js.map +1 -1
- package/dist/cjs/createUseQueryDirect.cjs +16 -18
- package/dist/cjs/createUseQueryDirect.native.js +23 -21
- package/dist/cjs/createUseQueryDirect.native.js.map +1 -1
- package/dist/cjs/useQuery.empty.test.cjs +70 -0
- package/dist/cjs/useQuery.empty.test.native.js +87 -0
- package/dist/cjs/useQuery.empty.test.native.js.map +1 -0
- package/dist/esm/createUseQuery.mjs +30 -7
- package/dist/esm/createUseQuery.mjs.map +1 -1
- package/dist/esm/createUseQuery.native.js +31 -7
- package/dist/esm/createUseQuery.native.js.map +1 -1
- package/dist/esm/createUseQueryDirect.mjs +17 -19
- package/dist/esm/createUseQueryDirect.mjs.map +1 -1
- package/dist/esm/createUseQueryDirect.native.js +24 -22
- package/dist/esm/createUseQueryDirect.native.js.map +1 -1
- package/dist/esm/useQuery.empty.test.mjs +71 -0
- package/dist/esm/useQuery.empty.test.mjs.map +1 -0
- package/dist/esm/useQuery.empty.test.native.js +85 -0
- package/dist/esm/useQuery.empty.test.native.js.map +1 -0
- package/package.json +2 -2
- package/src/createUseQuery.tsx +57 -7
- package/src/createUseQueryDirect.tsx +33 -16
- package/src/useQuery.empty.test.tsx +98 -0
- package/types/createUseQuery.d.ts +3 -0
- package/types/createUseQuery.d.ts.map +1 -1
- package/types/createUseQueryDirect.d.ts.map +1 -1
- package/types/useQuery.empty.test.d.ts +5 -0
- package/types/useQuery.empty.test.d.ts.map +1 -0
package/src/createUseQuery.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useQuery as zeroUseQuery } from '@rocicorp/zero/react'
|
|
2
|
+
import { addContextToQuery, asQueryInternals } from '@rocicorp/zero/bindings'
|
|
2
3
|
import { useContext, useMemo, useRef, type Context } from 'react'
|
|
3
4
|
|
|
4
5
|
import { useZeroDebug } from './helpers/useZeroDebug'
|
|
@@ -11,7 +12,7 @@ import type {
|
|
|
11
12
|
Schema as ZeroSchema,
|
|
12
13
|
} from '@rocicorp/zero'
|
|
13
14
|
|
|
14
|
-
// false = enabled, 'empty' = disabled (return
|
|
15
|
+
// false = enabled, 'empty' = disabled (return empty), 'last-value' = disabled (return cached)
|
|
15
16
|
export type QueryControlMode = false | 'empty' | 'last-value'
|
|
16
17
|
|
|
17
18
|
export type UseQueryOptions = {
|
|
@@ -39,7 +40,32 @@ export type UseQueryHook<Schema extends ZeroSchema> = {
|
|
|
39
40
|
): QueryResult<TReturn>
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
// shape the "empty" / loading / disabled response to match the typed contract:
|
|
44
|
+
// plural queries get [], singular queries get undefined. returning null for a
|
|
45
|
+
// plural query (the old `EMPTY_RESPONSE` constant) broke callers that do the
|
|
46
|
+
// obvious .filter / .find / .length on the result during the first render.
|
|
47
|
+
const EMPTY_PLURAL = Object.freeze([])
|
|
48
|
+
const RESULT_UNKNOWN = Object.freeze({ type: 'unknown' as const })
|
|
49
|
+
const EMPTY_RESPONSE_PLURAL = Object.freeze([EMPTY_PLURAL, RESULT_UNKNOWN]) as never
|
|
50
|
+
const EMPTY_RESPONSE_SINGULAR = Object.freeze([undefined, RESULT_UNKNOWN]) as never
|
|
51
|
+
|
|
52
|
+
// inspect a resolved query (a Query OR a QueryRequest, i.e. what resolveQuery
|
|
53
|
+
// returns from a defineQueries-registered fn) to find its singular/plural
|
|
54
|
+
// format. QueryRequests carry a `.query.fn({args, ctx})` that materializes
|
|
55
|
+
// the underlying Query — singular vs plural is determined entirely by the
|
|
56
|
+
// user-authored query body (`.one()` vs not), so passing an empty `ctx` is
|
|
57
|
+
// safe here.
|
|
58
|
+
export function emptyResponseFor(queryRequest: unknown): readonly [unknown, { type: string }] {
|
|
59
|
+
try {
|
|
60
|
+
const query = addContextToQuery(queryRequest as any, {} as never)
|
|
61
|
+
const internals = asQueryInternals(query)
|
|
62
|
+
return internals.format.singular ? EMPTY_RESPONSE_SINGULAR : EMPTY_RESPONSE_PLURAL
|
|
63
|
+
} catch {
|
|
64
|
+
// SSG factory / no-resolved-query — default to plural so callers' iteration
|
|
65
|
+
// (.filter / .find / .length / for-of) is always safe.
|
|
66
|
+
return EMPTY_RESPONSE_PLURAL
|
|
67
|
+
}
|
|
68
|
+
}
|
|
43
69
|
|
|
44
70
|
// determine if useQuery-style args are (fn, params, options) or (fn, options)
|
|
45
71
|
export function parseUseQueryArgs(paramsOrOptions: any, optionsArg: any) {
|
|
@@ -68,14 +94,17 @@ export function createUseQuery<Schema extends ZeroSchema>({
|
|
|
68
94
|
// an empty response matches how the wrapper behaves under DisabledContext
|
|
69
95
|
// anyway, so consumers see the same shape across SSG and the disabled
|
|
70
96
|
// client path. checking here (factory-time) instead of per-call keeps
|
|
71
|
-
// hook order stable so rules-of-hooks stays happy.
|
|
97
|
+
// hook order stable so rules-of-hooks stays happy. we default to the plural
|
|
98
|
+
// shape (data = []) because most queries are plural; a singular query under
|
|
99
|
+
// SSG that depends on undefined-vs-[] is exotic enough to handle at the call
|
|
100
|
+
// site.
|
|
72
101
|
if (typeof window === 'undefined') {
|
|
73
|
-
return (() =>
|
|
102
|
+
return (() => EMPTY_RESPONSE_PLURAL) as UseQueryHook<Schema>
|
|
74
103
|
}
|
|
75
104
|
|
|
76
105
|
function useQuery(...args: any[]): any {
|
|
77
106
|
const disableMode = useContext(DisabledContext)
|
|
78
|
-
const lastRef = useRef<any>(
|
|
107
|
+
const lastRef = useRef<any>(EMPTY_RESPONSE_PLURAL)
|
|
79
108
|
const [fn, paramsOrOptions, optionsArg] = args
|
|
80
109
|
|
|
81
110
|
const { queryRequest, options } = useMemo(() => {
|
|
@@ -96,7 +125,22 @@ export function createUseQuery<Schema extends ZeroSchema>({
|
|
|
96
125
|
? false
|
|
97
126
|
: { ...(options ?? {}), enabled: false }
|
|
98
127
|
: options
|
|
99
|
-
const
|
|
128
|
+
const rawOut = zeroUseQuery(queryRequest, effectiveOptions)
|
|
129
|
+
|
|
130
|
+
// normalize the rare null-data first snapshot for plural queries to []:
|
|
131
|
+
// zero-react's viewStore briefly hands us [null, {type:'unknown'}] when a
|
|
132
|
+
// stub Zero is wired up (e.g. during the disable→active transition) before
|
|
133
|
+
// the real materialize fires. useQuery is typed as T[] for plural so
|
|
134
|
+
// callers must never see null here. cheap drop-in: only allocates a new
|
|
135
|
+
// tuple in the (rare) null case; the steady-state pass-through is one
|
|
136
|
+
// identity check per render.
|
|
137
|
+
let out: any = rawOut
|
|
138
|
+
if (rawOut?.[0] === null) {
|
|
139
|
+
const fallback = emptyResponseFor(queryRequest)
|
|
140
|
+
if (fallback === EMPTY_RESPONSE_PLURAL) {
|
|
141
|
+
out = [EMPTY_PLURAL, rawOut[1] ?? RESULT_UNKNOWN]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
100
144
|
|
|
101
145
|
if (process.env.NODE_ENV === 'development') {
|
|
102
146
|
if (process.env.DEBUG_ZERO_QUERIES === '1')
|
|
@@ -110,10 +154,16 @@ export function createUseQuery<Schema extends ZeroSchema>({
|
|
|
110
154
|
}
|
|
111
155
|
|
|
112
156
|
if (disableMode === 'last-value') {
|
|
157
|
+
// first render under last-value mode: lastRef is still the plural default —
|
|
158
|
+
// reshape to match this query's actual format so a singular query gets
|
|
159
|
+
// undefined instead of [].
|
|
160
|
+
if (lastRef.current === EMPTY_RESPONSE_PLURAL) {
|
|
161
|
+
return emptyResponseFor(queryRequest)
|
|
162
|
+
}
|
|
113
163
|
return lastRef.current
|
|
114
164
|
}
|
|
115
165
|
|
|
116
|
-
return
|
|
166
|
+
return emptyResponseFor(queryRequest)
|
|
117
167
|
}
|
|
118
168
|
|
|
119
169
|
return useQuery as UseQueryHook<Schema>
|
|
@@ -8,6 +8,7 @@ import { useEmitterValue, type Emitter } from '@take-out/helpers'
|
|
|
8
8
|
import { useContext, useMemo, useRef, useSyncExternalStore, type Context } from 'react'
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
|
+
emptyResponseFor,
|
|
11
12
|
parseUseQueryArgs,
|
|
12
13
|
type QueryControlMode,
|
|
13
14
|
type UseQueryHook,
|
|
@@ -25,13 +26,10 @@ import type {
|
|
|
25
26
|
// useQuery path via createZeroClient; this exists only for nested providers
|
|
26
27
|
// where a non-innermost instance cannot be selected through react context.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
// see createUseQuery.tsx — empty responses must match the typed contract:
|
|
30
|
+
// plural queries get [], singular get undefined. returning null breaks the
|
|
31
|
+
// obvious .filter / .find / .length on first render.
|
|
29
32
|
const DISABLED_SUBSCRIBE = () => () => {}
|
|
30
|
-
const DISABLED_SNAPSHOT: readonly [undefined, { type: 'unknown' }] = [
|
|
31
|
-
undefined,
|
|
32
|
-
{ type: 'unknown' },
|
|
33
|
-
]
|
|
34
|
-
const getDisabledSnapshot = () => DISABLED_SNAPSHOT
|
|
35
33
|
|
|
36
34
|
type DirectSnapshot = readonly [unknown, { type: string }]
|
|
37
35
|
|
|
@@ -112,7 +110,12 @@ function getSnapshot(
|
|
|
112
110
|
return emptySnapshotSingularUnknown
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
|
|
113
|
+
// plural queries: data may arrive as null OR undefined from the zero view's
|
|
114
|
+
// initial / disconnected snapshot. either way we expose [], not the raw
|
|
115
|
+
// null/undefined — useQuery's contract is T[] for plural and callers do the
|
|
116
|
+
// obvious .filter / .find / .length / for-of on the first render. without
|
|
117
|
+
// this branch, a null first-snapshot crashes downstream.
|
|
118
|
+
if (!singular && (data == null || (Array.isArray(data) && data.length === 0))) {
|
|
116
119
|
if (resultType === 'complete') return emptySnapshotPluralComplete
|
|
117
120
|
if (resultType === 'error')
|
|
118
121
|
return error ? [emptyArray, makeError(retry, error)] : emptySnapshotPluralError
|
|
@@ -255,16 +258,17 @@ export function createUseQueryDirect<Schema extends ZeroSchema>({
|
|
|
255
258
|
getZero,
|
|
256
259
|
zeroVersion,
|
|
257
260
|
}: Parameters<CreateUseQueryDirect<Schema>>[0]): UseQueryHook<Schema> {
|
|
258
|
-
// SSG: return an inert hook — see createUseQuery for the rationale.
|
|
261
|
+
// SSG: return an inert hook — see createUseQuery for the rationale. default
|
|
262
|
+
// to the plural empty shape (most queries are plural; a singular caller can
|
|
263
|
+
// tolerate [] better than the non-singular caller can tolerate null/undefined).
|
|
259
264
|
if (typeof window === 'undefined') {
|
|
260
|
-
return (() =>
|
|
265
|
+
return ((_fn: any) => emptyResponseFor(undefined)) as UseQueryHook<Schema>
|
|
261
266
|
}
|
|
262
267
|
|
|
263
268
|
const directViewStore = new DirectViewStore()
|
|
264
269
|
|
|
265
270
|
function useQueryDirect(...args: any[]): any {
|
|
266
271
|
const disableMode = useContext(DisabledContext)
|
|
267
|
-
const lastRef = useRef<any>(EMPTY_RESPONSE)
|
|
268
272
|
const [fn, paramsOrOptions, optionsArg] = args
|
|
269
273
|
|
|
270
274
|
const version = useEmitterValue(zeroVersion)
|
|
@@ -281,19 +285,32 @@ export function createUseQueryDirect<Schema extends ZeroSchema>({
|
|
|
281
285
|
|
|
282
286
|
const paramsKey = params === undefined ? '' : JSON.stringify(params)
|
|
283
287
|
|
|
288
|
+
// resolve the query once so we know its singular/plural format up front —
|
|
289
|
+
// the no-zero / disabled snapshot needs to match that format so .filter /
|
|
290
|
+
// .find / .length is safe on first render.
|
|
291
|
+
const queryRequest = useMemo(
|
|
292
|
+
() => resolveQuery({ customQueries, fn, params }),
|
|
293
|
+
// params is keyed by paramsKey
|
|
294
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
295
|
+
[fn, paramsKey],
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
const emptyForQuery = useMemo(() => emptyResponseFor(queryRequest), [queryRequest])
|
|
299
|
+
const lastRef = useRef<any>(emptyForQuery)
|
|
300
|
+
|
|
284
301
|
const view = useMemo((): DirectView | null => {
|
|
285
302
|
const zero = getZero()
|
|
286
303
|
if (!zero) return null
|
|
287
|
-
const queryRequest = resolveQuery({ customQueries, fn, params })
|
|
288
304
|
return directViewStore.getView(zero, queryRequest, enabled, ttl)
|
|
289
|
-
//
|
|
305
|
+
// version re-materializes on a new zero
|
|
290
306
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
291
|
-
}, [
|
|
307
|
+
}, [queryRequest, enabled, ttl, version])
|
|
292
308
|
|
|
309
|
+
const getEmpty = () => emptyForQuery as DirectSnapshot
|
|
293
310
|
const out = useSyncExternalStore(
|
|
294
311
|
view ? view.subscribe : DISABLED_SUBSCRIBE,
|
|
295
|
-
view ? view.getSnapshot :
|
|
296
|
-
view ? view.getSnapshot :
|
|
312
|
+
view ? view.getSnapshot : getEmpty,
|
|
313
|
+
view ? view.getSnapshot : getEmpty,
|
|
297
314
|
)
|
|
298
315
|
|
|
299
316
|
if (!disableMode) {
|
|
@@ -305,7 +322,7 @@ export function createUseQueryDirect<Schema extends ZeroSchema>({
|
|
|
305
322
|
return lastRef.current
|
|
306
323
|
}
|
|
307
324
|
|
|
308
|
-
return
|
|
325
|
+
return emptyForQuery
|
|
309
326
|
}
|
|
310
327
|
|
|
311
328
|
return useQueryDirect as UseQueryHook<Schema>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
//
|
|
3
|
+
// useQuery's typed contract is `[T[], info]` for plural queries. The empty /
|
|
4
|
+
// loading / disabled response MUST therefore be `[[], info]` — returning
|
|
5
|
+
// `[null, info]` (the old EMPTY_RESPONSE constant) broke any caller that does
|
|
6
|
+
// the obvious .filter / .find / .length / for-of on first render. Singular
|
|
7
|
+
// queries get `[undefined, info]` instead (the established zero-react shape).
|
|
8
|
+
|
|
9
|
+
import { createSchema, number, string, table } from '@rocicorp/zero'
|
|
10
|
+
import { act } from 'react'
|
|
11
|
+
import { createRoot, type Root } from 'react-dom/client'
|
|
12
|
+
import { afterEach, beforeEach, expect, test } from 'vitest'
|
|
13
|
+
|
|
14
|
+
import { createZeroClient } from './createZeroClient'
|
|
15
|
+
import { zql } from './zql'
|
|
16
|
+
|
|
17
|
+
declare global {
|
|
18
|
+
// eslint-disable-next-line no-var
|
|
19
|
+
var IS_REACT_ACT_ENVIRONMENT: boolean | undefined
|
|
20
|
+
}
|
|
21
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true
|
|
22
|
+
|
|
23
|
+
const todoTable = table('todo')
|
|
24
|
+
.columns({ id: string(), title: string(), createdAt: number() })
|
|
25
|
+
.primaryKey('id')
|
|
26
|
+
const schema = createSchema({ tables: [todoTable] })
|
|
27
|
+
|
|
28
|
+
// real plain query functions backed by zql so resolveQuery returns a real
|
|
29
|
+
// QueryRequest (asQueryInternals(...).format.singular works).
|
|
30
|
+
const allTodos = (_args: void) =>
|
|
31
|
+
(zql as unknown as { todo: { orderBy: (k: string, d: string) => any } }).todo.orderBy(
|
|
32
|
+
'createdAt',
|
|
33
|
+
'desc',
|
|
34
|
+
)
|
|
35
|
+
const oneTodo = (args: { id: string }) =>
|
|
36
|
+
(zql as unknown as { todo: { where: (k: string, v: string) => any } }).todo
|
|
37
|
+
.where('id', args.id)
|
|
38
|
+
.one()
|
|
39
|
+
|
|
40
|
+
const client = createZeroClient({
|
|
41
|
+
schema,
|
|
42
|
+
models: {},
|
|
43
|
+
groupedQueries: {
|
|
44
|
+
todo: { allTodos, oneTodo },
|
|
45
|
+
},
|
|
46
|
+
instanceName: 'empty-shape-test',
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
let container: HTMLDivElement
|
|
50
|
+
let root: Root
|
|
51
|
+
|
|
52
|
+
beforeEach(() => {
|
|
53
|
+
container = document.createElement('div')
|
|
54
|
+
root = createRoot(container)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
afterEach(() => {
|
|
58
|
+
act(() => root.unmount())
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
function renderWithDisabled<T>(useHook: () => T): T {
|
|
62
|
+
let captured: T | undefined
|
|
63
|
+
const Probe = () => {
|
|
64
|
+
captured = useHook()
|
|
65
|
+
return null
|
|
66
|
+
}
|
|
67
|
+
act(() => {
|
|
68
|
+
// disable=true mounts the stable shell with DisabledContext='empty' + a
|
|
69
|
+
// stub Zero — this is exactly the path that used to return [null, ...]
|
|
70
|
+
// for every query.
|
|
71
|
+
root.render(
|
|
72
|
+
<client.ProvideZero authData={{}} userID="anon" disable>
|
|
73
|
+
<Probe />
|
|
74
|
+
</client.ProvideZero>,
|
|
75
|
+
)
|
|
76
|
+
})
|
|
77
|
+
if (captured === undefined) throw new Error('Probe did not render')
|
|
78
|
+
return captured
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// regression: previously this returned [null, ...] which crashed downstream
|
|
82
|
+
// .filter / .find / .length. now it must return [[], ...] for plural queries.
|
|
83
|
+
test('useQuery returns [] (not null) for plural queries under DisabledContext', () => {
|
|
84
|
+
const [data, info] = renderWithDisabled(() => client.useQuery(allTodos))
|
|
85
|
+
expect(Array.isArray(data)).toBe(true)
|
|
86
|
+
expect((data as unknown[]).length).toBe(0)
|
|
87
|
+
// method calls that previously crashed must not crash
|
|
88
|
+
expect((data as unknown[]).filter(() => true)).toEqual([])
|
|
89
|
+
expect((data as unknown[]).find(() => true)).toBeUndefined()
|
|
90
|
+
expect(info?.type).toBe('unknown')
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
test('useQuery returns undefined (not null) for singular queries under DisabledContext', () => {
|
|
94
|
+
const [data, info] = renderWithDisabled(() => client.useQuery(oneTodo, { id: 'x' }))
|
|
95
|
+
// singular queries match zero-react: data is undefined while loading/disabled.
|
|
96
|
+
expect(data).toBeUndefined()
|
|
97
|
+
expect(info?.type).toBe('unknown')
|
|
98
|
+
})
|
|
@@ -14,6 +14,9 @@ export type UseQueryHook<Schema extends ZeroSchema> = {
|
|
|
14
14
|
<TArg, TTable extends keyof Schema['tables'] & string, TReturn>(fn: PlainQueryFn<TArg, Query<TTable, Schema, TReturn>>, params: TArg, options?: UseQueryOptions | boolean): QueryResult<TReturn>;
|
|
15
15
|
<TTable extends keyof Schema['tables'] & string, TReturn>(fn: PlainQueryFn<void, Query<TTable, Schema, TReturn>>, options?: UseQueryOptions | boolean): QueryResult<TReturn>;
|
|
16
16
|
};
|
|
17
|
+
export declare function emptyResponseFor(queryRequest: unknown): readonly [unknown, {
|
|
18
|
+
type: string;
|
|
19
|
+
}];
|
|
17
20
|
export declare function parseUseQueryArgs(paramsOrOptions: any, optionsArg: any): {
|
|
18
21
|
params: any;
|
|
19
22
|
options: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUseQuery.d.ts","sourceRoot":"","sources":["../src/createUseQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"createUseQuery.d.ts","sourceRoot":"","sources":["../src/createUseQuery.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAE/D,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAGjE,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEhE,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,MAAM,IAAI,UAAU,EACrB,MAAM,gBAAgB,CAAA;AAGvB,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,GAAG,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CAC9C,CAAA;AAED,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC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UseQueryDirect.d.ts","sourceRoot":"","sources":["../src/createUseQueryDirect.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAqD,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAEvF,OAAO,
|
|
1
|
+
{"version":3,"file":"createUseQueryDirect.d.ts","sourceRoot":"","sources":["../src/createUseQueryDirect.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAqD,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAEvF,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EACV,gBAAgB,EAEhB,MAAM,IAAI,UAAU,EACrB,MAAM,gBAAgB,CAAA;AAkBvB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,CACT,KAAK,EAAE,GAAG,EACV,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,GACtB;QACD,WAAW,CACT,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,gBAAgB,KAAK,IAAI,GACpE,IAAI,CAAA;QACP,OAAO,IAAI,IAAI,CAAA;QACf,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,UAAU,IAAI,CAAC,KAAK,EAAE;IACpE,eAAe,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC1C,aAAa,EAAE,gBAAgB,CAAA;IAC/B,OAAO,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAA;IACxC,WAAW,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