Initial commit
This commit is contained in:
21
node_modules/@tanstack/react-query/LICENSE
generated
vendored
Executable file
21
node_modules/@tanstack/react-query/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Tanner Linsley
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
48
node_modules/@tanstack/react-query/README.md
generated
vendored
Executable file
48
node_modules/@tanstack/react-query/README.md
generated
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
<img src="https://static.scarf.sh/a.png?x-pxid=be2d8a11-9712-4c1d-9963-580b2d4fb133" />
|
||||
|
||||

|
||||
|
||||
Hooks for fetching, caching and updating asynchronous data in React
|
||||
|
||||
<a href="https://twitter.com/intent/tweet?button_hashtag=TanStack" target="\_parent">
|
||||
<img alt="#TanStack" src="https://img.shields.io/twitter/url?color=%2308a0e9&label=%23TanStack&style=social&url=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DTanStack">
|
||||
</a><a href="https://discord.com/invite/WrRKjPJ" target="\_parent">
|
||||
<img alt="" src="https://img.shields.io/badge/Discord-TanStack-%235865F2" />
|
||||
</a><a href="https://github.com/TanStack/query/actions?query=workflow%3A%22react-query+tests%22">
|
||||
<img src="https://github.com/TanStack/query/workflows/react-query%20tests/badge.svg" />
|
||||
</a><a href="https://www.npmjs.com/package/@tanstack/query-core" target="\_parent">
|
||||
<img alt="" src="https://img.shields.io/npm/dm/@tanstack/query-core.svg" />
|
||||
</a><a href="https://bundlejs.com/?q=%40tanstack%2Freact-query&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent">
|
||||
<img alt="" src="https://deno.bundlejs.com/?q=@tanstack/react-query&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}}&badge=detailed" />
|
||||
</a><a href="#badge">
|
||||
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
|
||||
</a><a href="https://github.com/TanStack/query/discussions">
|
||||
<img alt="Join the discussion on Github" src="https://img.shields.io/badge/Github%20Discussions%20%26%20Support-Chat%20now!-blue" />
|
||||
</a><a href="https://bestofjs.org/projects/tanstack-query"><img alt="Best of JS" src="https://img.shields.io/endpoint?url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=TanStack%2Fquery%26since=daily" /></a><a href="https://github.com/TanStack/query/" target="\_parent">
|
||||
<img alt="" src="https://img.shields.io/github/stars/TanStack/query.svg?style=social&label=Star" />
|
||||
</a><a href="https://twitter.com/tannerlinsley" target="\_parent">
|
||||
<img alt="" src="https://img.shields.io/twitter/follow/tannerlinsley.svg?style=social&label=Follow" />
|
||||
</a> <a href="https://gitpod.io/from-referrer/">
|
||||
<img src="https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"/>
|
||||
</a>
|
||||
|
||||
Enjoy this library? Try the entire [TanStack](https://tanstack.com)! [TanStack Table](https://github.com/TanStack/table), [TanStack Router](https://github.com/tanstack/router), [TanStack Virtual](https://github.com/tanstack/virtual), [React Charts](https://github.com/TanStack/react-charts), [React Ranger](https://github.com/TanStack/ranger)
|
||||
|
||||
## Visit [tanstack.com/query](https://tanstack.com/query) for docs, guides, API and more!
|
||||
|
||||
## Quick Features
|
||||
|
||||
- Transport/protocol/backend agnostic data fetching (REST, GraphQL, promises, whatever!)
|
||||
- Auto Caching + Refetching (stale-while-revalidate, Window Refocus, Polling/Realtime)
|
||||
- Parallel + Dependent Queries
|
||||
- Mutations + Reactive Query Refetching
|
||||
- Multi-layer Cache + Automatic Garbage Collection
|
||||
- Paginated + Cursor-based Queries
|
||||
- Load-More + Infinite Scroll Queries w/ Scroll Recovery
|
||||
- Request Cancellation
|
||||
- [React Suspense](https://react.dev/reference/react/Suspense) + Fetch-As-You-Render Query Prefetching
|
||||
- Dedicated Devtools
|
||||
|
||||
### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)
|
||||
|
||||
<!-- Use the force, Luke -->
|
||||
208
node_modules/@tanstack/react-query/build/codemods/src/utils/index.cjs
generated
vendored
Executable file
208
node_modules/@tanstack/react-query/build/codemods/src/utils/index.cjs
generated
vendored
Executable file
@@ -0,0 +1,208 @@
|
||||
module.exports = ({ root, jscodeshift }) => {
|
||||
const findImportIdentifierOf = (importSpecifiers, identifier) => {
|
||||
const specifier = importSpecifiers
|
||||
.filter((node) => node.value.imported.name === identifier)
|
||||
.paths()
|
||||
|
||||
if (specifier.length > 0) {
|
||||
return specifier[0].value.local
|
||||
}
|
||||
|
||||
return jscodeshift.identifier(identifier)
|
||||
}
|
||||
|
||||
const findImportSpecifiers = (packageName) =>
|
||||
root
|
||||
.find(jscodeshift.ImportDeclaration, {
|
||||
source: {
|
||||
value: packageName,
|
||||
},
|
||||
})
|
||||
.find(jscodeshift.ImportSpecifier, {})
|
||||
|
||||
const locateImports = (
|
||||
identifiers,
|
||||
packageName = '@tanstack/react-query',
|
||||
) => {
|
||||
const findNamespaceImportIdentifier = () => {
|
||||
const specifier = root
|
||||
.find(jscodeshift.ImportDeclaration, {
|
||||
source: {
|
||||
value: packageName,
|
||||
},
|
||||
})
|
||||
.find(jscodeshift.ImportNamespaceSpecifier)
|
||||
.paths()
|
||||
|
||||
return specifier.length > 0 ? specifier[0].value.local : null
|
||||
}
|
||||
|
||||
/**
|
||||
* First, we search for the namespace import identifier because if we have any, we assume the consumer uses
|
||||
* namespace imports. In this case, we won't search for named imports at all.
|
||||
*/
|
||||
const namespaceImportIdentifier = findNamespaceImportIdentifier()
|
||||
|
||||
if (namespaceImportIdentifier) {
|
||||
const identifierMap = {}
|
||||
|
||||
for (const identifier of identifiers) {
|
||||
identifierMap[identifier] = jscodeshift.identifier(identifier)
|
||||
}
|
||||
|
||||
return {
|
||||
namespace: namespaceImportIdentifier,
|
||||
...identifierMap,
|
||||
}
|
||||
}
|
||||
|
||||
const importSpecifiers = findImportSpecifiers(packageName)
|
||||
const identifierMap = {}
|
||||
|
||||
for (const identifier of identifiers) {
|
||||
identifierMap[identifier] = findImportIdentifierOf(
|
||||
importSpecifiers,
|
||||
identifier,
|
||||
)
|
||||
}
|
||||
|
||||
return {
|
||||
namespace: null,
|
||||
...identifierMap,
|
||||
}
|
||||
}
|
||||
|
||||
const findAllMethodCalls = () =>
|
||||
root
|
||||
// First, we need to find all method calls.
|
||||
.find(jscodeshift.CallExpression, {
|
||||
callee: {
|
||||
type: jscodeshift.MemberExpression.name,
|
||||
property: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const findQueryClientIdentifiers = (importIdentifiers) =>
|
||||
root
|
||||
.find(jscodeshift.VariableDeclarator, {})
|
||||
.filter((node) => {
|
||||
if (node.value.init) {
|
||||
const initializer = node.value.init
|
||||
|
||||
return (
|
||||
isClassInstantiationOf(
|
||||
initializer,
|
||||
getSelectorByImports(importIdentifiers, 'QueryClient'),
|
||||
) ||
|
||||
isFunctionCallOf(
|
||||
initializer,
|
||||
getSelectorByImports(importIdentifiers, 'useQueryClient'),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
.paths()
|
||||
.map((node) => node.value.id.name)
|
||||
|
||||
const isCallExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.CallExpression.name })
|
||||
|
||||
const isIdentifier = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.Identifier.name })
|
||||
|
||||
const isMemberExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.MemberExpression.name })
|
||||
|
||||
const isNewExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.NewExpression.name })
|
||||
|
||||
const isArrayExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.ArrayExpression.name })
|
||||
|
||||
const isObjectExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.ObjectExpression.name })
|
||||
|
||||
const isObjectProperty = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.ObjectProperty.name })
|
||||
|
||||
const isSpreadElement = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.SpreadElement.name })
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').Node} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isFunctionDefinition = (node) => {
|
||||
const isArrowFunctionExpression = jscodeshift.match(node, {
|
||||
type: jscodeshift.ArrowFunctionExpression.name,
|
||||
})
|
||||
const isFunctionExpression = jscodeshift.match(node, {
|
||||
type: jscodeshift.FunctionExpression.name,
|
||||
})
|
||||
|
||||
return isArrowFunctionExpression || isFunctionExpression
|
||||
}
|
||||
|
||||
const warn = (message) => {
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.warn(message)
|
||||
}
|
||||
}
|
||||
|
||||
const isClassInstantiationOf = (node, selector) => {
|
||||
if (!isNewExpression(node)) {
|
||||
return false
|
||||
}
|
||||
|
||||
const parts = selector.split('.')
|
||||
|
||||
return parts.length === 1
|
||||
? isIdentifier(node.callee) && node.callee.name === parts[0]
|
||||
: isMemberExpression(node.callee) &&
|
||||
node.callee.object.name === parts[0] &&
|
||||
node.callee.property.name === parts[1]
|
||||
}
|
||||
|
||||
const isFunctionCallOf = (node, selector) => {
|
||||
if (!isCallExpression(node)) {
|
||||
return false
|
||||
}
|
||||
|
||||
const parts = selector.split('.')
|
||||
|
||||
return parts.length === 1
|
||||
? isIdentifier(node.callee) && node.callee.name === parts[0]
|
||||
: isMemberExpression(node.callee) &&
|
||||
node.callee.object.name === parts[0] &&
|
||||
node.callee.property.name === parts[1]
|
||||
}
|
||||
|
||||
const getSelectorByImports = (imports, path) =>
|
||||
imports.namespace
|
||||
? `${imports.namespace.name}.${imports[path].name}`
|
||||
: imports[path].name
|
||||
|
||||
return {
|
||||
findAllMethodCalls,
|
||||
getSelectorByImports,
|
||||
isCallExpression,
|
||||
isClassInstantiationOf,
|
||||
isFunctionCallOf,
|
||||
isIdentifier,
|
||||
isMemberExpression,
|
||||
isArrayExpression,
|
||||
isObjectExpression,
|
||||
isObjectProperty,
|
||||
isSpreadElement,
|
||||
isFunctionDefinition,
|
||||
locateImports,
|
||||
warn,
|
||||
queryClient: {
|
||||
findQueryClientIdentifiers,
|
||||
},
|
||||
}
|
||||
}
|
||||
124
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-cache-transformer.cjs
generated
vendored
Executable file
124
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-cache-transformer.cjs
generated
vendored
Executable file
@@ -0,0 +1,124 @@
|
||||
module.exports = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName = '@tanstack/react-query',
|
||||
}) => {
|
||||
const isGetQueryCacheMethodCall = (
|
||||
initializer,
|
||||
importIdentifiers,
|
||||
knownQueryClientIds,
|
||||
) => {
|
||||
const isKnownQueryClient = (node) =>
|
||||
utils.isIdentifier(node) && knownQueryClientIds.includes(node.name)
|
||||
|
||||
const isGetQueryCacheIdentifier = (node) =>
|
||||
utils.isIdentifier(node) && node.name === 'getQueryCache'
|
||||
|
||||
const isValidInitializer = (node) =>
|
||||
utils.isCallExpression(node) && utils.isMemberExpression(node.callee)
|
||||
|
||||
if (isValidInitializer(initializer)) {
|
||||
const instance = initializer.callee.object
|
||||
|
||||
return (
|
||||
isGetQueryCacheIdentifier(initializer.callee.property) &&
|
||||
(isKnownQueryClient(instance) ||
|
||||
utils.isFunctionCallOf(
|
||||
instance,
|
||||
utils.getSelectorByImports(importIdentifiers, 'useQueryClient'),
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const findQueryCacheInstantiations = (
|
||||
importIdentifiers,
|
||||
knownQueryClientIds,
|
||||
) =>
|
||||
root.find(jscodeshift.VariableDeclarator, {}).filter((node) => {
|
||||
if (node.value.init) {
|
||||
const initializer = node.value.init
|
||||
|
||||
return (
|
||||
utils.isClassInstantiationOf(
|
||||
initializer,
|
||||
utils.getSelectorByImports(importIdentifiers, 'QueryCache'),
|
||||
) ||
|
||||
isGetQueryCacheMethodCall(
|
||||
initializer,
|
||||
importIdentifiers,
|
||||
knownQueryClientIds,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
|
||||
const filterQueryCacheMethodCalls = (node) =>
|
||||
utils.isIdentifier(node) && ['find', 'findAll'].includes(node.name)
|
||||
|
||||
const findQueryCacheMethodCalls = (importIdentifiers) => {
|
||||
/**
|
||||
* Here we collect all query client instantiations. We have to make aware of them because the query cache can be
|
||||
* accessed by the query client as well.
|
||||
*/
|
||||
const queryClientIdentifiers =
|
||||
utils.queryClient.findQueryClientIdentifiers(importIdentifiers)
|
||||
/**
|
||||
* Here we collect all query cache instantiations. The reason is simple: the methods can be called on query cache
|
||||
* instances, to locate the possible usages we need to be aware of the identifier names.
|
||||
*/
|
||||
const queryCacheIdentifiers = findQueryCacheInstantiations(
|
||||
importIdentifiers,
|
||||
queryClientIdentifiers,
|
||||
)
|
||||
.paths()
|
||||
.map((node) => node.value.id.name)
|
||||
|
||||
return (
|
||||
utils
|
||||
// First, we need to find all method calls.
|
||||
.findAllMethodCalls()
|
||||
// Then we narrow the collection to all `fetch` and `fetchAll` methods.
|
||||
.filter((node) =>
|
||||
filterQueryCacheMethodCalls(node.value.callee.property),
|
||||
)
|
||||
.filter((node) => {
|
||||
const object = node.value.callee.object
|
||||
|
||||
// If the method is called on a `QueryCache` instance, we keep it in the collection.
|
||||
if (utils.isIdentifier(object)) {
|
||||
return queryCacheIdentifiers.includes(object.name)
|
||||
}
|
||||
|
||||
// If the method is called on a `QueryClient` instance, we keep it in the collection.
|
||||
if (utils.isCallExpression(object)) {
|
||||
return isGetQueryCacheMethodCall(
|
||||
object,
|
||||
importIdentifiers,
|
||||
queryClientIdentifiers,
|
||||
)
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const execute = (replacer) => {
|
||||
findQueryCacheMethodCalls(
|
||||
utils.locateImports(
|
||||
['QueryCache', 'QueryClient', 'useQueryClient'],
|
||||
packageName,
|
||||
),
|
||||
).replaceWith(replacer)
|
||||
}
|
||||
|
||||
return {
|
||||
execute,
|
||||
}
|
||||
}
|
||||
53
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-client-transformer.cjs
generated
vendored
Executable file
53
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/query-client-transformer.cjs
generated
vendored
Executable file
@@ -0,0 +1,53 @@
|
||||
module.exports = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName = '@tanstack/react-query',
|
||||
}) => {
|
||||
const filterQueryClientMethodCalls = (node, methods) =>
|
||||
utils.isIdentifier(node) && methods.includes(node.name)
|
||||
|
||||
const findQueryClientMethodCalls = (importIdentifiers, methods) => {
|
||||
/**
|
||||
* Here we collect all query client instantiations. We have to make aware of them because some method calls might
|
||||
* be invoked on these instances.
|
||||
*/
|
||||
const queryClientIdentifiers =
|
||||
utils.queryClient.findQueryClientIdentifiers(importIdentifiers)
|
||||
|
||||
return (
|
||||
utils
|
||||
// First, we need to find all method calls.
|
||||
.findAllMethodCalls()
|
||||
// Then we narrow the collection to `QueryClient` methods.
|
||||
.filter((node) =>
|
||||
filterQueryClientMethodCalls(node.value.callee.property, methods),
|
||||
)
|
||||
.filter((node) => {
|
||||
const object = node.value.callee.object
|
||||
|
||||
// If the method is called on a `QueryClient` instance, we keep it in the collection.
|
||||
if (utils.isIdentifier(object)) {
|
||||
return queryClientIdentifiers.includes(object.name)
|
||||
}
|
||||
|
||||
// If the method is called on the return value of `useQueryClient` hook, we keep it in the collection.
|
||||
return utils.isFunctionCallOf(
|
||||
object,
|
||||
utils.getSelectorByImports(importIdentifiers, 'useQueryClient'),
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const execute = (methods, replacer) => {
|
||||
findQueryClientMethodCalls(
|
||||
utils.locateImports(['QueryClient', 'useQueryClient'], packageName),
|
||||
methods,
|
||||
).replaceWith(replacer)
|
||||
}
|
||||
|
||||
return {
|
||||
execute,
|
||||
}
|
||||
}
|
||||
38
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/use-query-like-transformer.cjs
generated
vendored
Executable file
38
node_modules/@tanstack/react-query/build/codemods/src/utils/transformers/use-query-like-transformer.cjs
generated
vendored
Executable file
@@ -0,0 +1,38 @@
|
||||
module.exports = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName = '@tanstack/react-query',
|
||||
}) => {
|
||||
const filterUseQueryLikeHookCalls = (node, importIdentifiers, hooks) => {
|
||||
for (const hook of hooks) {
|
||||
const selector = utils.getSelectorByImports(importIdentifiers, hook)
|
||||
|
||||
if (utils.isFunctionCallOf(node, selector)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const findUseQueryLikeHookCalls = (importIdentifiers, hooks) =>
|
||||
root
|
||||
// First, we need to find all call expressions.
|
||||
.find(jscodeshift.CallExpression, {})
|
||||
// Then we narrow the collection to the `useQuery` like hook calls.
|
||||
.filter((node) =>
|
||||
filterUseQueryLikeHookCalls(node.value, importIdentifiers, hooks),
|
||||
)
|
||||
|
||||
const execute = (hooks, replacer) => {
|
||||
findUseQueryLikeHookCalls(
|
||||
utils.locateImports(hooks, packageName),
|
||||
hooks,
|
||||
).replaceWith(replacer)
|
||||
}
|
||||
|
||||
return {
|
||||
execute,
|
||||
}
|
||||
}
|
||||
181
node_modules/@tanstack/react-query/build/codemods/src/v4/key-transformation.cjs
generated
vendored
Executable file
181
node_modules/@tanstack/react-query/build/codemods/src/v4/key-transformation.cjs
generated
vendored
Executable file
@@ -0,0 +1,181 @@
|
||||
const createUtilsObject = require('../utils/index.cjs')
|
||||
const createKeyReplacer = require('./utils/replacers/key-replacer.cjs')
|
||||
const createUseQueryLikeTransformer = require('../utils/transformers/use-query-like-transformer.cjs')
|
||||
const createQueryClientTransformer = require('../utils/transformers/query-client-transformer.cjs')
|
||||
const createQueryCacheTransformer = require('../utils/transformers/query-cache-transformer.cjs')
|
||||
|
||||
const transformQueryClientUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
packageName,
|
||||
}) => {
|
||||
const transformer = createQueryClientTransformer({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
})
|
||||
const replacer = createKeyReplacer({ jscodeshift, root, filePath })
|
||||
|
||||
transformer.execute(
|
||||
[
|
||||
// Not object syntax-aware methods.
|
||||
'getMutationDefaults',
|
||||
'getQueriesData',
|
||||
'getQueryData',
|
||||
'getQueryDefaults',
|
||||
'getQueryState',
|
||||
'isFetching',
|
||||
'setMutationDefaults',
|
||||
'setQueriesData',
|
||||
'setQueryData',
|
||||
'setQueryDefaults',
|
||||
// Object syntax-aware methods.
|
||||
'cancelQueries',
|
||||
'fetchInfiniteQuery',
|
||||
'fetchQuery',
|
||||
'invalidateQueries',
|
||||
'prefetchInfiniteQuery',
|
||||
'prefetchQuery',
|
||||
'refetchQueries',
|
||||
'removeQueries',
|
||||
'resetQueries',
|
||||
],
|
||||
replacer,
|
||||
)
|
||||
}
|
||||
|
||||
const transformUseQueriesUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
}) => {
|
||||
const transformer = createUseQueryLikeTransformer({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
})
|
||||
const replacer = ({ node }) => {
|
||||
/**
|
||||
* When the node doesn't have the 'original' property, that means the codemod has been already applied,
|
||||
* so we don't need to do any changes.
|
||||
*/
|
||||
if (!node.original) {
|
||||
return node
|
||||
}
|
||||
|
||||
const newCallExpression = jscodeshift.callExpression(node.original.callee, [
|
||||
jscodeshift.objectExpression([
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier('queries'),
|
||||
node.original.arguments[0],
|
||||
),
|
||||
]),
|
||||
])
|
||||
|
||||
// TODO: This should be part of one function!
|
||||
if (node.typeParameters) {
|
||||
newCallExpression.typeArguments = node.typeParameters
|
||||
}
|
||||
|
||||
return newCallExpression
|
||||
}
|
||||
|
||||
transformer.execute(['useQueries'], replacer)
|
||||
}
|
||||
|
||||
const transformUseQueryLikeUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
packageName,
|
||||
}) => {
|
||||
const transformer = createUseQueryLikeTransformer({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
})
|
||||
|
||||
transformer.execute(
|
||||
['useQuery', 'useInfiniteQuery', 'useIsFetching', 'useIsMutating'],
|
||||
createKeyReplacer({
|
||||
jscodeshift,
|
||||
root,
|
||||
filePath,
|
||||
keyName: 'queryKey',
|
||||
}),
|
||||
)
|
||||
transformer.execute(
|
||||
['useMutation'],
|
||||
createKeyReplacer({
|
||||
jscodeshift,
|
||||
root,
|
||||
filePath,
|
||||
keyName: 'mutationKey',
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
const transformQueryCacheUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
packageName,
|
||||
}) => {
|
||||
const transformer = createQueryCacheTransformer({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
})
|
||||
const replacer = createKeyReplacer({ jscodeshift, root, filePath })
|
||||
|
||||
transformer.execute(replacer)
|
||||
}
|
||||
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
|
||||
// TODO: Execute the transformers only when it contains a `react-query` import!
|
||||
|
||||
const utils = createUtilsObject({ root, jscodeshift })
|
||||
const filePath = file.path
|
||||
const packageName = 'react-query'
|
||||
|
||||
// This function transforms usages like `useQuery` and `useMutation`.
|
||||
transformUseQueryLikeUsages({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
packageName,
|
||||
})
|
||||
// This function transforms usages of `useQueries`.
|
||||
transformUseQueriesUsages({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
packageName,
|
||||
})
|
||||
// This function transforms usages of `QueryClient`.
|
||||
transformQueryClientUsages({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
packageName,
|
||||
})
|
||||
// This function transforms usages of `QueryCache`.
|
||||
transformQueryCacheUsages({ jscodeshift, utils, root, filePath, packageName })
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
25
node_modules/@tanstack/react-query/build/codemods/src/v4/replace-import-specifier.cjs
generated
vendored
Executable file
25
node_modules/@tanstack/react-query/build/codemods/src/v4/replace-import-specifier.cjs
generated
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
|
||||
const replacements = [
|
||||
{ from: 'react-query', to: '@tanstack/react-query' },
|
||||
{ from: 'react-query/devtools', to: '@tanstack/react-query-devtools' },
|
||||
]
|
||||
|
||||
replacements.forEach(({ from, to }) => {
|
||||
root
|
||||
.find(jscodeshift.ImportDeclaration, {
|
||||
source: {
|
||||
value: from,
|
||||
},
|
||||
})
|
||||
.replaceWith(({ node }) => {
|
||||
node.source.value = to
|
||||
|
||||
return node
|
||||
})
|
||||
})
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
164
node_modules/@tanstack/react-query/build/codemods/src/v4/utils/replacers/key-replacer.cjs
generated
vendored
Executable file
164
node_modules/@tanstack/react-query/build/codemods/src/v4/utils/replacers/key-replacer.cjs
generated
vendored
Executable file
@@ -0,0 +1,164 @@
|
||||
class UnprocessableKeyError extends Error {
|
||||
constructor(message) {
|
||||
super(message)
|
||||
this.name = 'UnprocessableKeyError'
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ({ jscodeshift, root, filePath, keyName = 'queryKey' }) => {
|
||||
const isArrayExpression = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.ArrayExpression.name })
|
||||
|
||||
const isStringLiteral = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.StringLiteral.name }) ||
|
||||
jscodeshift.match(node, { type: jscodeshift.Literal.name })
|
||||
|
||||
const isTemplateLiteral = (node) =>
|
||||
jscodeshift.match(node, { type: jscodeshift.TemplateLiteral.name })
|
||||
|
||||
const findVariableDeclaration = (node) => {
|
||||
const declarations = root
|
||||
.find(jscodeshift.VariableDeclarator, {
|
||||
id: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: node.name,
|
||||
},
|
||||
})
|
||||
.paths()
|
||||
|
||||
return declarations.length > 0 ? declarations[0] : null
|
||||
}
|
||||
|
||||
const createKeyValue = (node) => {
|
||||
// When the node is a string literal we convert it into an array of strings.
|
||||
if (isStringLiteral(node)) {
|
||||
return jscodeshift.arrayExpression([
|
||||
jscodeshift.stringLiteral(node.value),
|
||||
])
|
||||
}
|
||||
|
||||
// When the node is a template literal we convert it into an array of template literals.
|
||||
if (isTemplateLiteral(node)) {
|
||||
return jscodeshift.arrayExpression([
|
||||
jscodeshift.templateLiteral(node.quasis, node.expressions),
|
||||
])
|
||||
}
|
||||
|
||||
if (jscodeshift.match(node, { type: jscodeshift.Identifier.name })) {
|
||||
// When the node is an identifier at first, we try to find its declaration, because we will try
|
||||
// to guess its type.
|
||||
const variableDeclaration = findVariableDeclaration(node)
|
||||
|
||||
if (!variableDeclaration) {
|
||||
throw new UnprocessableKeyError(
|
||||
`In file ${filePath} at line ${node.loc.start.line} the type of identifier \`${node.name}\` couldn't be recognized, so the codemod couldn't be applied. Please migrate manually.`,
|
||||
)
|
||||
}
|
||||
|
||||
const initializer = variableDeclaration.value.init
|
||||
|
||||
// When it's a string, we just wrap it into an array expression.
|
||||
if (isStringLiteral(initializer) || isTemplateLiteral(initializer)) {
|
||||
return jscodeshift.arrayExpression([node])
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnprocessableKeyError(
|
||||
`In file ${filePath} at line ${node.loc.start.line} the type of the \`${keyName}\` couldn't be recognized, so the codemod couldn't be applied. Please migrate manually.`,
|
||||
)
|
||||
}
|
||||
|
||||
const createKeyProperty = (node) =>
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(keyName),
|
||||
createKeyValue(node),
|
||||
)
|
||||
|
||||
const getPropertyFromObjectExpression = (objectExpression, propertyName) =>
|
||||
objectExpression.properties.find(
|
||||
(property) => property.key.name === propertyName,
|
||||
) ?? null
|
||||
|
||||
const buildWithTypeArguments = (node, builder) => {
|
||||
const newNode = builder(node)
|
||||
|
||||
if (node.typeParameters) {
|
||||
newNode.typeArguments = node.typeParameters
|
||||
}
|
||||
|
||||
return newNode
|
||||
}
|
||||
|
||||
return ({ node }) => {
|
||||
// When the node doesn't have the 'original' property, that means the codemod has been already applied,
|
||||
// so we don't need to do any changes.
|
||||
if (!node.original) {
|
||||
return node
|
||||
}
|
||||
|
||||
const methodArguments = node.arguments
|
||||
|
||||
// The method call doesn't have any arguments, we have nothing to do in this case.
|
||||
if (methodArguments.length === 0) {
|
||||
return node
|
||||
}
|
||||
|
||||
try {
|
||||
const [firstArgument, ...restOfTheArguments] = methodArguments
|
||||
|
||||
if (
|
||||
jscodeshift.match(firstArgument, {
|
||||
type: jscodeshift.ObjectExpression.name,
|
||||
})
|
||||
) {
|
||||
const originalKey = getPropertyFromObjectExpression(
|
||||
firstArgument,
|
||||
keyName,
|
||||
)
|
||||
|
||||
if (!originalKey) {
|
||||
throw new UnprocessableKeyError(
|
||||
`In file ${filePath} at line ${node.loc.start.line} the \`${keyName}\` couldn't be found. Did you forget to add it?`,
|
||||
)
|
||||
}
|
||||
|
||||
const restOfTheProperties = firstArgument.properties.filter(
|
||||
(item) => item.key.name !== keyName,
|
||||
)
|
||||
|
||||
return buildWithTypeArguments(node, (originalNode) =>
|
||||
jscodeshift.callExpression(originalNode.original.callee, [
|
||||
jscodeshift.objectExpression([
|
||||
createKeyProperty(originalKey.value),
|
||||
...restOfTheProperties,
|
||||
]),
|
||||
...restOfTheArguments,
|
||||
]),
|
||||
)
|
||||
}
|
||||
|
||||
// When the node is an array expression we just simply return it because we want query keys to be arrays.
|
||||
if (isArrayExpression(firstArgument)) {
|
||||
return node
|
||||
}
|
||||
|
||||
return buildWithTypeArguments(node, (originalNode) =>
|
||||
jscodeshift.callExpression(originalNode.original.callee, [
|
||||
createKeyValue(firstArgument),
|
||||
...restOfTheArguments,
|
||||
]),
|
||||
)
|
||||
} catch (error) {
|
||||
if (error.name === 'UnprocessableKeyError') {
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.warn(error.message)
|
||||
}
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
244
node_modules/@tanstack/react-query/build/codemods/src/v5/is-loading/is-loading.cjs
generated
vendored
Executable file
244
node_modules/@tanstack/react-query/build/codemods/src/v5/is-loading/is-loading.cjs
generated
vendored
Executable file
@@ -0,0 +1,244 @@
|
||||
const createUtilsObject = require('../../utils/index.cjs')
|
||||
const createUseQueryLikeTransformer = require('../../utils/transformers/use-query-like-transformer.cjs')
|
||||
const createQueryClientTransformer = require('../../utils/transformers/query-client-transformer.cjs')
|
||||
|
||||
const originalName = 'isLoading'
|
||||
const newName = 'isPending'
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift')} jscodeshift
|
||||
* @param {Object} utils
|
||||
* @param {import('jscodeshift').Collection} root
|
||||
* @param {string} filePath
|
||||
* @param {{keyName: "mutationKey"|"queryKey", queryClientMethods: ReadonlyArray<string>, hooks: ReadonlyArray<string>}} config
|
||||
*/
|
||||
const transformUsages = ({ jscodeshift, utils, root, filePath, config }) => {
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression | import('jscodeshift').ExpressionStatement} node
|
||||
* @returns {{start: number, end: number}}
|
||||
*/
|
||||
const getNodeLocation = (node) => {
|
||||
const location = utils.isCallExpression(node) ? node.callee.loc : node.loc
|
||||
const start = location.start.line
|
||||
const end = location.end.line
|
||||
|
||||
return { start, end }
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ASTNode} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isObjectExpression = (node) => {
|
||||
return jscodeshift.match(node, {
|
||||
type: jscodeshift.ObjectExpression.name,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ASTNode} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isObjectPattern = (node) => {
|
||||
return jscodeshift.match(node, {
|
||||
type: jscodeshift.ObjectPattern.name,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ASTNode} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isVariableDeclarator = (node) => {
|
||||
return jscodeshift.match(node, {
|
||||
type: jscodeshift.VariableDeclarator.name,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').Node} node
|
||||
* @param {import('jscodeshift').Identifier} identifier
|
||||
* @returns {Collection<import('jscodeshift').MemberExpression>}
|
||||
*/
|
||||
const findIsLoadingPropertiesOfIdentifier = (node, identifier) => {
|
||||
return jscodeshift(node).find(jscodeshift.MemberExpression, {
|
||||
object: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: identifier.name,
|
||||
},
|
||||
property: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: originalName,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectPattern} node
|
||||
* @returns {import('jscodeshift').ObjectProperty|null}
|
||||
*/
|
||||
const findIsLoadingObjectPropertyInObjectPattern = (node) => {
|
||||
return (
|
||||
node.properties.find((property) =>
|
||||
jscodeshift.match(property, {
|
||||
key: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: originalName,
|
||||
},
|
||||
}),
|
||||
) ?? null
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectPattern} node
|
||||
* @returns {import('jscodeshift').RestElement|null}
|
||||
*/
|
||||
const findRestElementInObjectPattern = (node) => {
|
||||
return (
|
||||
node.properties.find((property) =>
|
||||
jscodeshift.match(property, {
|
||||
type: jscodeshift.RestElement.name,
|
||||
}),
|
||||
) ?? null
|
||||
)
|
||||
}
|
||||
|
||||
const replacer = (path, transformNode) => {
|
||||
const node = path.node
|
||||
const parentNode = path.parentPath.value
|
||||
const { start, end } = getNodeLocation(node)
|
||||
|
||||
try {
|
||||
if (!isVariableDeclarator(parentNode)) {
|
||||
// The parent node is not a variable declarator, the transformation will be skipped.
|
||||
return node
|
||||
}
|
||||
|
||||
const lookupNode = path.scope.node
|
||||
const variableDeclaratorId = parentNode.id
|
||||
|
||||
if (isObjectPattern(variableDeclaratorId)) {
|
||||
const isLoadingObjectProperty =
|
||||
findIsLoadingObjectPropertyInObjectPattern(variableDeclaratorId)
|
||||
|
||||
if (isLoadingObjectProperty) {
|
||||
jscodeshift(lookupNode)
|
||||
.find(jscodeshift.ObjectProperty, {
|
||||
key: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: originalName,
|
||||
},
|
||||
})
|
||||
.replaceWith((mutablePath) => {
|
||||
if (isObjectPattern(mutablePath.parent)) {
|
||||
const affectedProperty = mutablePath.value.value.shorthand
|
||||
? 'value'
|
||||
: 'key'
|
||||
|
||||
mutablePath.value[affectedProperty].name = newName
|
||||
|
||||
return mutablePath.value
|
||||
}
|
||||
|
||||
if (isObjectExpression(mutablePath.parent)) {
|
||||
const affectedProperty = mutablePath.value.value.shorthand
|
||||
? 'key'
|
||||
: 'value'
|
||||
|
||||
mutablePath.value[affectedProperty].name = newName
|
||||
|
||||
return mutablePath.value
|
||||
}
|
||||
|
||||
return mutablePath.value
|
||||
})
|
||||
|
||||
// Renaming all other 'isLoading' references that are object properties.
|
||||
jscodeshift(lookupNode)
|
||||
.find(jscodeshift.Identifier, { name: originalName })
|
||||
.replaceWith((mutablePath) => {
|
||||
if (
|
||||
!jscodeshift.match(mutablePath.parent, {
|
||||
type: jscodeshift.ObjectProperty.name,
|
||||
})
|
||||
) {
|
||||
mutablePath.value.name = newName
|
||||
}
|
||||
|
||||
return mutablePath.value
|
||||
})
|
||||
}
|
||||
|
||||
const restElement = findRestElementInObjectPattern(variableDeclaratorId)
|
||||
|
||||
if (restElement) {
|
||||
findIsLoadingPropertiesOfIdentifier(
|
||||
lookupNode,
|
||||
restElement.argument,
|
||||
).replaceWith(({ node: mutableNode }) => {
|
||||
mutableNode.property.name = newName
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
}
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
if (utils.isIdentifier(variableDeclaratorId)) {
|
||||
findIsLoadingPropertiesOfIdentifier(
|
||||
lookupNode,
|
||||
variableDeclaratorId,
|
||||
).replaceWith(({ node: mutableNode }) => {
|
||||
mutableNode.property.name = newName
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
utils.warn(
|
||||
`The usage in file "${filePath}" at line ${start}:${end} could not be transformed. Please migrate this usage manually.`,
|
||||
)
|
||||
|
||||
return node
|
||||
} catch (error) {
|
||||
utils.warn(
|
||||
`An unknown error occurred while processing the "${filePath}" file. Please review this file, because the codemod couldn't be applied.`,
|
||||
)
|
||||
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
createUseQueryLikeTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.hooks,
|
||||
replacer,
|
||||
)
|
||||
|
||||
createQueryClientTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.queryClientMethods,
|
||||
replacer,
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
const utils = createUtilsObject({ root, jscodeshift })
|
||||
const filePath = file.path
|
||||
|
||||
const dependencies = { jscodeshift, utils, root, filePath }
|
||||
|
||||
transformUsages({
|
||||
...dependencies,
|
||||
config: {
|
||||
hooks: ['useQuery', 'useMutation'],
|
||||
queryClientMethods: [],
|
||||
},
|
||||
})
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
32
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/README.md
generated
vendored
Executable file
32
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/README.md
generated
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
### Intro
|
||||
|
||||
The prerequisite for this code mod is to migrate your usages to the new syntax, so overloads for hooks and `QueryClient` methods shouldn't be available anymore.
|
||||
|
||||
### Affected usages
|
||||
|
||||
Please note, this code mod transforms usages only where the first argument is an object expression.
|
||||
|
||||
The following usage should be transformed by the code mod:
|
||||
|
||||
```ts
|
||||
const { data } = useQuery({
|
||||
queryKey: ['posts'],
|
||||
queryFn: queryFn,
|
||||
keepPreviousData: true,
|
||||
})
|
||||
```
|
||||
|
||||
But the following usage won't be transformed by the code mod, because the first argument an identifier:
|
||||
|
||||
```ts
|
||||
const hookArgument = {
|
||||
queryKey: ['posts'],
|
||||
queryFn: queryFn,
|
||||
keepPreviousData: true,
|
||||
}
|
||||
const { data } = useQuery(hookArgument)
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
In case of any errors, feel free to reach us out via Discord or open an issue. If you open an issue, please provide a code snippet as well, because without a snippet we cannot find the bug in the code mod.
|
||||
271
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/keep-previous-data.cjs
generated
vendored
Executable file
271
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/keep-previous-data.cjs
generated
vendored
Executable file
@@ -0,0 +1,271 @@
|
||||
const createUtilsObject = require('../../utils/index.cjs')
|
||||
const createUseQueryLikeTransformer = require('../../utils/transformers/use-query-like-transformer.cjs')
|
||||
const createQueryClientTransformer = require('../../utils/transformers/query-client-transformer.cjs')
|
||||
const AlreadyHasPlaceholderDataProperty = require('./utils/already-has-placeholder-data-property.cjs')
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift')} jscodeshift
|
||||
* @param {Object} utils
|
||||
* @param {import('jscodeshift').Collection} root
|
||||
* @param {string} filePath
|
||||
* @param {{keyName: "mutationKey"|"queryKey", queryClientMethods: ReadonlyArray<string>, hooks: ReadonlyArray<string>}} config
|
||||
*/
|
||||
const transformUsages = ({ jscodeshift, utils, root, filePath, config }) => {
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression | import('jscodeshift').ExpressionStatement} node
|
||||
* @returns {{start: number, end: number}}
|
||||
*/
|
||||
const getNodeLocation = (node) => {
|
||||
const location = utils.isCallExpression(node) ? node.callee.loc : node.loc
|
||||
const start = location.start.line
|
||||
const end = location.end.line
|
||||
|
||||
return { start, end }
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectProperty} objectProperty
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isKeepPreviousDataObjectProperty = (objectProperty) => {
|
||||
return jscodeshift.match(objectProperty.key, {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: 'keepPreviousData',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectProperty} objectProperty
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isObjectPropertyHasTrueBooleanLiteralValue = (objectProperty) => {
|
||||
return jscodeshift.match(objectProperty.value, {
|
||||
type: jscodeshift.BooleanLiteral.name,
|
||||
value: true,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectExpression} objectExpression
|
||||
* @returns {Array<import('jscodeshift').ObjectProperty>}
|
||||
*/
|
||||
const filterKeepPreviousDataProperty = (objectExpression) => {
|
||||
return objectExpression.properties.filter((objectProperty) => {
|
||||
return !isKeepPreviousDataObjectProperty(objectProperty)
|
||||
})
|
||||
}
|
||||
|
||||
const createPlaceholderDataObjectProperty = () => {
|
||||
return jscodeshift.objectProperty(
|
||||
jscodeshift.identifier('placeholderData'),
|
||||
jscodeshift.identifier('keepPreviousData'),
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectExpression} objectExpression
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const hasPlaceholderDataProperty = (objectExpression) => {
|
||||
return (
|
||||
objectExpression.properties.findIndex((objectProperty) => {
|
||||
return jscodeshift.match(objectProperty.key, {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: 'placeholderData',
|
||||
})
|
||||
}) !== -1
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').ObjectExpression} objectExpression
|
||||
* @returns {import('jscodeshift').ObjectProperty | undefined}
|
||||
*/
|
||||
const getKeepPreviousDataProperty = (objectExpression) => {
|
||||
return objectExpression.properties.find(isKeepPreviousDataObjectProperty)
|
||||
}
|
||||
|
||||
let shouldAddKeepPreviousDataImport = false
|
||||
|
||||
const replacer = (path, resolveTargetArgument, transformNode) => {
|
||||
const node = path.node
|
||||
const { start, end } = getNodeLocation(node)
|
||||
|
||||
try {
|
||||
const targetArgument = resolveTargetArgument(node)
|
||||
|
||||
if (targetArgument && utils.isObjectExpression(targetArgument)) {
|
||||
const isPlaceholderDataPropertyPresent =
|
||||
hasPlaceholderDataProperty(targetArgument)
|
||||
|
||||
if (hasPlaceholderDataProperty(targetArgument)) {
|
||||
throw new AlreadyHasPlaceholderDataProperty(node, filePath)
|
||||
}
|
||||
|
||||
const keepPreviousDataProperty =
|
||||
getKeepPreviousDataProperty(targetArgument)
|
||||
|
||||
const keepPreviousDataPropertyHasTrueValue =
|
||||
isObjectPropertyHasTrueBooleanLiteralValue(keepPreviousDataProperty)
|
||||
|
||||
if (!keepPreviousDataPropertyHasTrueValue) {
|
||||
utils.warn(
|
||||
`The usage in file "${filePath}" at line ${start}:${end} already contains a "keepPreviousData" property but its value is not "true". Please migrate this usage manually.`,
|
||||
)
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
if (keepPreviousDataPropertyHasTrueValue) {
|
||||
// Removing the `keepPreviousData` property from the object.
|
||||
const mutableObjectExpressionProperties =
|
||||
filterKeepPreviousDataProperty(targetArgument)
|
||||
|
||||
if (!isPlaceholderDataPropertyPresent) {
|
||||
shouldAddKeepPreviousDataImport = true
|
||||
|
||||
// When the `placeholderData` property is not present, the `placeholderData: keepPreviousData` property will be added.
|
||||
mutableObjectExpressionProperties.push(
|
||||
createPlaceholderDataObjectProperty(),
|
||||
)
|
||||
}
|
||||
|
||||
return transformNode(
|
||||
node,
|
||||
jscodeshift.objectExpression(mutableObjectExpressionProperties),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
utils.warn(
|
||||
`The usage in file "${filePath}" at line ${start}:${end} could not be transformed, because the first parameter is not an object expression. Please migrate this usage manually.`,
|
||||
)
|
||||
|
||||
return node
|
||||
} catch (error) {
|
||||
utils.warn(
|
||||
error.name === AlreadyHasPlaceholderDataProperty.name
|
||||
? error.message
|
||||
: `An unknown error occurred while processing the "${filePath}" file. Please review this file, because the codemod couldn't be applied.`,
|
||||
)
|
||||
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
createUseQueryLikeTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.hooks,
|
||||
(path) => {
|
||||
const resolveTargetArgument = (node) => node.arguments[0] ?? null
|
||||
const transformNode = (node, transformedArgument) =>
|
||||
jscodeshift.callExpression(node.original.callee, [transformedArgument])
|
||||
|
||||
return replacer(path, resolveTargetArgument, transformNode)
|
||||
},
|
||||
)
|
||||
|
||||
createQueryClientTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.queryClientMethods,
|
||||
(path) => {
|
||||
const resolveTargetArgument = (node) => node.arguments[1] ?? null
|
||||
const transformNode = (node, transformedArgument) => {
|
||||
return jscodeshift.callExpression(node.original.callee, [
|
||||
node.arguments[0],
|
||||
transformedArgument,
|
||||
...node.arguments.slice(2, 0),
|
||||
])
|
||||
}
|
||||
|
||||
return replacer(path, resolveTargetArgument, transformNode)
|
||||
},
|
||||
)
|
||||
|
||||
const importIdentifierOfQueryClient = utils.getSelectorByImports(
|
||||
utils.locateImports(['QueryClient']),
|
||||
'QueryClient',
|
||||
)
|
||||
|
||||
root
|
||||
.find(jscodeshift.ExpressionStatement, {
|
||||
expression: {
|
||||
type: jscodeshift.NewExpression.name,
|
||||
callee: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: importIdentifierOfQueryClient,
|
||||
},
|
||||
},
|
||||
})
|
||||
.filter((path) => path.node.expression)
|
||||
.replaceWith((path) => {
|
||||
const resolveTargetArgument = (node) => {
|
||||
const paths = jscodeshift(node)
|
||||
.find(jscodeshift.ObjectProperty, {
|
||||
key: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: 'keepPreviousData',
|
||||
},
|
||||
})
|
||||
.paths()
|
||||
|
||||
return paths.length > 0 ? paths[0].parent.node : null
|
||||
}
|
||||
const transformNode = (node, transformedArgument) => {
|
||||
jscodeshift(node.expression)
|
||||
.find(jscodeshift.ObjectProperty, {
|
||||
key: {
|
||||
type: jscodeshift.Identifier.name,
|
||||
name: 'queries',
|
||||
},
|
||||
})
|
||||
.replaceWith(({ node: mutableNode }) => {
|
||||
mutableNode.value.properties = transformedArgument.properties
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
return replacer(path, resolveTargetArgument, transformNode)
|
||||
})
|
||||
|
||||
return { shouldAddKeepPreviousDataImport }
|
||||
}
|
||||
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
const utils = createUtilsObject({ root, jscodeshift })
|
||||
const filePath = file.path
|
||||
|
||||
const dependencies = { jscodeshift, utils, root, filePath }
|
||||
|
||||
const { shouldAddKeepPreviousDataImport } = transformUsages({
|
||||
...dependencies,
|
||||
config: {
|
||||
hooks: ['useInfiniteQuery', 'useQueries', 'useQuery'],
|
||||
queryClientMethods: ['setQueryDefaults'],
|
||||
},
|
||||
})
|
||||
|
||||
if (shouldAddKeepPreviousDataImport) {
|
||||
root
|
||||
.find(jscodeshift.ImportDeclaration, {
|
||||
source: {
|
||||
value: '@tanstack/react-query',
|
||||
},
|
||||
})
|
||||
.replaceWith(({ node: mutableNode }) => {
|
||||
mutableNode.specifiers = [
|
||||
jscodeshift.importSpecifier(
|
||||
jscodeshift.identifier('keepPreviousData'),
|
||||
),
|
||||
...mutableNode.specifiers,
|
||||
]
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
}
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
26
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/utils/already-has-placeholder-data-property.cjs
generated
vendored
Executable file
26
node_modules/@tanstack/react-query/build/codemods/src/v5/keep-previous-data/utils/already-has-placeholder-data-property.cjs
generated
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
class AlreadyHasPlaceholderDataProperty extends Error {
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression} callExpression
|
||||
* @param {string} filePath
|
||||
*/
|
||||
constructor(callExpression, filePath) {
|
||||
super('')
|
||||
this.message = this.buildMessage(callExpression, filePath)
|
||||
this.name = 'AlreadyHasPlaceholderDataProperty'
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression} callExpression
|
||||
* @param {string} filePath
|
||||
* @returns {string}
|
||||
*/
|
||||
buildMessage(callExpression, filePath) {
|
||||
const location = callExpression.callee.loc
|
||||
const start = location.start.line
|
||||
const end = location.end.line
|
||||
|
||||
return `The usage in file "${filePath}" at line ${start}:${end} already contains a "placeholderData" property. Please migrate this usage manually.`
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AlreadyHasPlaceholderDataProperty
|
||||
58
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
generated
vendored
Executable file
58
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/remove-overloads.cjs
generated
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
const createUtilsObject = require('../../utils/index.cjs')
|
||||
const transformFilterAwareUsages = require('./transformers/filter-aware-usage-transformer.cjs')
|
||||
const transformQueryFnAwareUsages = require('./transformers/query-fn-aware-usage-transformer.cjs')
|
||||
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
const utils = createUtilsObject({ root, jscodeshift })
|
||||
const filePath = file.path
|
||||
|
||||
const dependencies = { jscodeshift, utils, root, filePath }
|
||||
|
||||
transformFilterAwareUsages({
|
||||
...dependencies,
|
||||
config: {
|
||||
keyName: 'queryKey',
|
||||
fnName: 'queryFn',
|
||||
queryClientMethods: [
|
||||
'cancelQueries',
|
||||
'getQueriesData',
|
||||
'invalidateQueries',
|
||||
'isFetching',
|
||||
'refetchQueries',
|
||||
'removeQueries',
|
||||
'resetQueries',
|
||||
// 'setQueriesData',
|
||||
],
|
||||
hooks: ['useIsFetching', 'useQuery'],
|
||||
},
|
||||
})
|
||||
|
||||
transformFilterAwareUsages({
|
||||
...dependencies,
|
||||
config: {
|
||||
keyName: 'mutationKey',
|
||||
fnName: 'mutationFn',
|
||||
queryClientMethods: [],
|
||||
hooks: ['useIsMutating', 'useMutation'],
|
||||
},
|
||||
})
|
||||
|
||||
transformQueryFnAwareUsages({
|
||||
...dependencies,
|
||||
config: {
|
||||
keyName: 'queryKey',
|
||||
queryClientMethods: [
|
||||
'ensureQueryData',
|
||||
'fetchQuery',
|
||||
'prefetchQuery',
|
||||
'fetchInfiniteQuery',
|
||||
'prefetchInfiniteQuery',
|
||||
],
|
||||
hooks: [],
|
||||
},
|
||||
})
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
271
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/filter-aware-usage-transformer.cjs
generated
vendored
Executable file
271
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/filter-aware-usage-transformer.cjs
generated
vendored
Executable file
@@ -0,0 +1,271 @@
|
||||
const createV5UtilsObject = require('../utils/index.cjs')
|
||||
const UnknownUsageError = require('../utils/unknown-usage-error.cjs')
|
||||
const createQueryClientTransformer = require('../../../utils/transformers/query-client-transformer.cjs')
|
||||
const createQueryCacheTransformer = require('../../../utils/transformers/query-cache-transformer.cjs')
|
||||
const createUseQueryLikeTransformer = require('../../../utils/transformers/use-query-like-transformer.cjs')
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').api} jscodeshift
|
||||
* @param {Object} utils
|
||||
* @param {import('jscodeshift').Collection} root
|
||||
* @param {string} filePath
|
||||
* @param {{keyName: "mutationKey"|"queryKey", fnName: "mutationFn"|"queryFn", queryClientMethods: ReadonlyArray<string>, hooks: ReadonlyArray<string>}} config
|
||||
*/
|
||||
const transformFilterAwareUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
config,
|
||||
}) => {
|
||||
const v5Utils = createV5UtilsObject({ jscodeshift, utils })
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression} node
|
||||
* @param {"mutationKey"|"queryKey"} keyName
|
||||
* @param {"mutationFn"|"queryFn"} fnName
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const canSkipReplacement = (node, keyName, fnName) => {
|
||||
const callArguments = node.arguments
|
||||
|
||||
const hasKeyOrFnProperty = () =>
|
||||
callArguments[0].properties.some(
|
||||
(property) =>
|
||||
utils.isObjectProperty(property) &&
|
||||
property.key.name !== keyName &&
|
||||
property.key.name !== fnName,
|
||||
)
|
||||
|
||||
/**
|
||||
* This call has at least one argument. If it's an object expression and contains the "queryKey" or "mutationKey"
|
||||
* field, the transformation can be skipped, because it's already matching the expected signature.
|
||||
*/
|
||||
return (
|
||||
callArguments.length > 0 &&
|
||||
utils.isObjectExpression(callArguments[0]) &&
|
||||
hasKeyOrFnProperty()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks whether the given object property is a spread element or a property that's not named
|
||||
* "queryKey" or "mutationKey".
|
||||
*
|
||||
* @param {import('jscodeshift').ObjectProperty} property
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const predicate = (property) => {
|
||||
const isSpreadElement = utils.isSpreadElement(property)
|
||||
const isObjectProperty = utils.isObjectProperty(property)
|
||||
|
||||
return (
|
||||
isSpreadElement ||
|
||||
(isObjectProperty && property.key.name !== config.keyName)
|
||||
)
|
||||
}
|
||||
|
||||
const replacer = (path) => {
|
||||
const node = path.node
|
||||
|
||||
const isFunctionDefinition = (functionArgument) => {
|
||||
if (utils.isFunctionDefinition(functionArgument)) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (utils.isIdentifier(functionArgument)) {
|
||||
const binding = v5Utils.getBindingFromScope(
|
||||
path,
|
||||
functionArgument.name,
|
||||
filePath,
|
||||
)
|
||||
|
||||
const isVariableDeclarator = jscodeshift.match(binding, {
|
||||
type: jscodeshift.VariableDeclarator.name,
|
||||
})
|
||||
|
||||
return isVariableDeclarator && utils.isFunctionDefinition(binding.init)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// If the given method/function call matches certain criteria, the node doesn't need to be replaced, this step can be skipped.
|
||||
if (canSkipReplacement(node, config.keyName, config.fnName)) {
|
||||
return node
|
||||
}
|
||||
|
||||
/**
|
||||
* Here we attempt to determine the first parameter of the function call.
|
||||
* If it's a function definition, we can create an object property from it (the mutation fn).
|
||||
*/
|
||||
const firstArgument = node.arguments[0]
|
||||
if (isFunctionDefinition(firstArgument)) {
|
||||
const objectExpression = jscodeshift.objectExpression([
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(config.fnName),
|
||||
firstArgument,
|
||||
),
|
||||
])
|
||||
|
||||
const secondArgument = node.arguments[1]
|
||||
|
||||
if (secondArgument) {
|
||||
// If it's an object expression, we can copy the properties from it to the newly created object expression.
|
||||
if (utils.isObjectExpression(secondArgument)) {
|
||||
v5Utils.copyPropertiesFromSource(
|
||||
secondArgument,
|
||||
objectExpression,
|
||||
predicate,
|
||||
)
|
||||
} else {
|
||||
// Otherwise, we simply spread the second argument in the newly created object expression.
|
||||
objectExpression.properties.push(
|
||||
jscodeshift.spreadElement(secondArgument),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, [
|
||||
objectExpression,
|
||||
])
|
||||
}
|
||||
|
||||
/**
|
||||
* If, instead, the first parameter is an array expression or an identifier that references
|
||||
* an array expression, then we create an object property from it (the query or mutation key).
|
||||
*
|
||||
* @type {import('jscodeshift').Property|undefined}
|
||||
*/
|
||||
const keyProperty = v5Utils.transformArgumentToKey(
|
||||
path,
|
||||
node.arguments[0],
|
||||
config.keyName,
|
||||
filePath,
|
||||
)
|
||||
|
||||
/**
|
||||
* The first parameter couldn't be transformed into an object property, so it's time to throw an exception,
|
||||
* it will notify the consumers that they need to rewrite this usage manually.
|
||||
*/
|
||||
if (!keyProperty) {
|
||||
const secondArgument =
|
||||
node.arguments.length > 1 ? node.arguments[1] : null
|
||||
|
||||
if (!secondArgument) {
|
||||
throw new UnknownUsageError(node, filePath)
|
||||
}
|
||||
|
||||
if (utils.isFunctionDefinition(secondArgument)) {
|
||||
const originalArguments = node.arguments
|
||||
const firstArgument = jscodeshift.objectExpression([
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(config.keyName),
|
||||
originalArguments[0],
|
||||
),
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(config.fnName),
|
||||
secondArgument,
|
||||
),
|
||||
])
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, [
|
||||
firstArgument,
|
||||
...originalArguments.slice(2),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
const functionArguments = [jscodeshift.objectExpression([keyProperty])]
|
||||
const secondParameter = node.arguments[1]
|
||||
|
||||
if (secondParameter) {
|
||||
const createdObjectExpression = functionArguments[0]
|
||||
|
||||
if (isFunctionDefinition(secondParameter)) {
|
||||
const objectExpression = jscodeshift.objectExpression([
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(config.keyName),
|
||||
node.arguments[0],
|
||||
),
|
||||
jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(config.fnName),
|
||||
secondParameter,
|
||||
),
|
||||
])
|
||||
|
||||
const thirdArgument = node.arguments[2]
|
||||
|
||||
if (thirdArgument) {
|
||||
// If it's an object expression, we can copy the properties from it to the newly created object expression.
|
||||
if (utils.isObjectExpression(thirdArgument)) {
|
||||
v5Utils.copyPropertiesFromSource(
|
||||
thirdArgument,
|
||||
objectExpression,
|
||||
predicate,
|
||||
)
|
||||
} else {
|
||||
// Otherwise, we simply spread the third argument in the newly created object expression.
|
||||
objectExpression.properties.push(
|
||||
jscodeshift.spreadElement(thirdArgument),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, [
|
||||
objectExpression,
|
||||
])
|
||||
}
|
||||
|
||||
/**
|
||||
* If it has a second argument, and it's an object expression, then we get the properties from it
|
||||
* (except the "queryKey" or "mutationKey" properties), because these arguments will also be moved to the
|
||||
* newly created object expression.
|
||||
*/
|
||||
if (utils.isObjectExpression(secondParameter)) {
|
||||
v5Utils.copyPropertiesFromSource(
|
||||
secondParameter,
|
||||
createdObjectExpression,
|
||||
predicate,
|
||||
)
|
||||
} else {
|
||||
// Otherwise, we simply spread the second parameter in the newly created object expression.
|
||||
createdObjectExpression.properties.push(
|
||||
jscodeshift.spreadElement(secondParameter),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// The rest of the function arguments can be simply pushed to the function arguments object so all will be kept.
|
||||
functionArguments.push(...node.arguments.slice(2))
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, functionArguments)
|
||||
} catch (error) {
|
||||
utils.warn(
|
||||
error.name === UnknownUsageError.name
|
||||
? error.message
|
||||
: `An unknown error occurred while processing the "${filePath}" file. Please review this file, because the codemod couldn't be applied.`,
|
||||
)
|
||||
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
createQueryClientTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.queryClientMethods,
|
||||
replacer,
|
||||
)
|
||||
|
||||
createUseQueryLikeTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.hooks,
|
||||
replacer,
|
||||
)
|
||||
|
||||
createQueryCacheTransformer({ jscodeshift, utils, root }).execute(replacer)
|
||||
}
|
||||
|
||||
module.exports = transformFilterAwareUsages
|
||||
185
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/query-fn-aware-usage-transformer.cjs
generated
vendored
Executable file
185
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/transformers/query-fn-aware-usage-transformer.cjs
generated
vendored
Executable file
@@ -0,0 +1,185 @@
|
||||
const createV5UtilsObject = require('../utils/index.cjs')
|
||||
const UnknownUsageError = require('../utils/unknown-usage-error.cjs')
|
||||
const createQueryClientTransformer = require('../../../utils/transformers/query-client-transformer.cjs')
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').api} jscodeshift
|
||||
* @param {Object} utils
|
||||
* @param {import('jscodeshift').Collection} root
|
||||
* @param {string} filePath
|
||||
* @param {{keyName: "mutationKey"|"queryKey", queryClientMethods: ReadonlyArray<string>, hooks: ReadonlyArray<string>}} config
|
||||
*/
|
||||
const transformQueryFnAwareUsages = ({
|
||||
jscodeshift,
|
||||
utils,
|
||||
root,
|
||||
filePath,
|
||||
config,
|
||||
}) => {
|
||||
const v5Utils = createV5UtilsObject({ jscodeshift, utils })
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const canSkipReplacement = (node) => {
|
||||
const callArguments = node.arguments
|
||||
|
||||
const hasKeyProperty = () =>
|
||||
callArguments[0].properties.some(
|
||||
(property) =>
|
||||
utils.isObjectProperty(property) &&
|
||||
[config.keyName, 'queryFn'].includes(property.key.name),
|
||||
)
|
||||
|
||||
return (
|
||||
callArguments.length > 0 &&
|
||||
utils.isObjectExpression(callArguments[0]) &&
|
||||
hasKeyProperty()
|
||||
)
|
||||
}
|
||||
|
||||
const predicate = (property) => {
|
||||
const isSpreadElement = utils.isSpreadElement(property)
|
||||
const isObjectProperty = utils.isObjectProperty(property)
|
||||
|
||||
return (
|
||||
isSpreadElement ||
|
||||
(isObjectProperty && property.key.name !== config.keyName)
|
||||
)
|
||||
}
|
||||
|
||||
const transformArgumentToQueryFunction = (path, node) => {
|
||||
const isIdentifier = utils.isIdentifier(node)
|
||||
const isFunctionDefinition = utils.isFunctionDefinition(node)
|
||||
|
||||
if (!isIdentifier && !isFunctionDefinition) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (isFunctionDefinition) {
|
||||
return jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier('queryFn'),
|
||||
node,
|
||||
)
|
||||
}
|
||||
|
||||
const binding = v5Utils.getBindingFromScope(path, node.name, filePath)
|
||||
const initializer = v5Utils.getInitializerByDeclarator(binding)
|
||||
|
||||
if (!utils.isFunctionDefinition(initializer)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
return jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier('queryFn'),
|
||||
binding.id,
|
||||
)
|
||||
}
|
||||
|
||||
const transformArgumentToOptionsObject = (path, node) => {
|
||||
if (!utils.isIdentifier(node)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const binding = v5Utils.getBindingFromScope(path, node.name, filePath)
|
||||
const initializer = v5Utils.getInitializerByDeclarator(binding)
|
||||
|
||||
if (utils.isObjectExpression(initializer)) {
|
||||
return jscodeshift.spreadElement(binding.id)
|
||||
}
|
||||
}
|
||||
|
||||
const replacer = (path) => {
|
||||
const node = path.node
|
||||
|
||||
try {
|
||||
// If the given method/function call matches certain criteria, the node doesn't need to be replaced, this step can be skipped.
|
||||
if (canSkipReplacement(node)) {
|
||||
return node
|
||||
}
|
||||
|
||||
const keyProperty = v5Utils.transformArgumentToKey(
|
||||
path,
|
||||
node.arguments[0],
|
||||
config.keyName,
|
||||
filePath,
|
||||
)
|
||||
|
||||
if (!keyProperty) {
|
||||
throw new UnknownUsageError(node, filePath)
|
||||
}
|
||||
|
||||
const parameters = [jscodeshift.objectExpression([keyProperty])]
|
||||
const createdObjectExpression = parameters[0]
|
||||
const secondParameter = node.arguments[1]
|
||||
|
||||
if (secondParameter) {
|
||||
const queryFnProperty = transformArgumentToQueryFunction(
|
||||
path,
|
||||
secondParameter,
|
||||
)
|
||||
|
||||
if (queryFnProperty) {
|
||||
createdObjectExpression.properties.push(queryFnProperty)
|
||||
|
||||
const thirdParameter = node.arguments[2]
|
||||
|
||||
if (utils.isObjectExpression(thirdParameter)) {
|
||||
v5Utils.copyPropertiesFromSource(
|
||||
thirdParameter,
|
||||
createdObjectExpression,
|
||||
predicate,
|
||||
)
|
||||
} else {
|
||||
createdObjectExpression.properties.push(
|
||||
jscodeshift.spreadElement(thirdParameter),
|
||||
)
|
||||
}
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, parameters)
|
||||
}
|
||||
|
||||
const optionsProperty = transformArgumentToOptionsObject(
|
||||
path,
|
||||
secondParameter,
|
||||
)
|
||||
|
||||
if (optionsProperty) {
|
||||
createdObjectExpression.properties.push(optionsProperty)
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, parameters)
|
||||
}
|
||||
|
||||
if (utils.isObjectExpression(secondParameter)) {
|
||||
v5Utils.copyPropertiesFromSource(
|
||||
secondParameter,
|
||||
createdObjectExpression,
|
||||
predicate,
|
||||
)
|
||||
}
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, parameters)
|
||||
}
|
||||
|
||||
return jscodeshift.callExpression(node.original.callee, parameters)
|
||||
} catch (error) {
|
||||
utils.warn(
|
||||
error.name === UnknownUsageError.name
|
||||
? error.message
|
||||
: `An unknown error occurred while processing the "${filePath}" file. Please review this file, because the codemod couldn't be applied.`,
|
||||
)
|
||||
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
createQueryClientTransformer({ jscodeshift, utils, root }).execute(
|
||||
config.queryClientMethods,
|
||||
replacer,
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = transformQueryFnAwareUsages
|
||||
123
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/index.cjs
generated
vendored
Executable file
123
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/index.cjs
generated
vendored
Executable file
@@ -0,0 +1,123 @@
|
||||
const UnknownUsageError = require('./unknown-usage-error.cjs')
|
||||
|
||||
module.exports = ({ jscodeshift, utils }) => {
|
||||
/**
|
||||
*
|
||||
* @param {import('jscodeshift').ObjectExpression} source
|
||||
* @param {import('jscodeshift').ObjectExpression} target
|
||||
* @param {(node: import('jscodeshift').Node) => boolean} predicate
|
||||
*/
|
||||
const copyPropertiesFromSource = (source, target, predicate) => {
|
||||
source.properties.forEach((property) => {
|
||||
if (predicate(property)) {
|
||||
target.properties.push(property)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').NodePath} path
|
||||
* @param {string} argumentName
|
||||
* @param {string} filePath
|
||||
* @returns {*}
|
||||
*/
|
||||
const getBindingFromScope = (path, argumentName, filePath) => {
|
||||
/**
|
||||
* If the current scope contains the declaration then we can use the actual one else we attempt to find the
|
||||
* binding from above.
|
||||
*/
|
||||
const scope = path.scope.declares(argumentName)
|
||||
? path.scope
|
||||
: path.scope.lookup(argumentName)
|
||||
|
||||
/**
|
||||
* The declaration couldn't be found for some reason, time to move on. We warn the user it needs to be rewritten
|
||||
* by themselves.
|
||||
*/
|
||||
if (!scope) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const binding = scope.bindings[argumentName]
|
||||
.filter((item) => utils.isIdentifier(item.value))
|
||||
.map((item) => item.parentPath.value)
|
||||
.at(0)
|
||||
|
||||
if (!binding) {
|
||||
throw new UnknownUsageError(path.node, filePath)
|
||||
}
|
||||
|
||||
return binding
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').VariableDeclarator} binding
|
||||
* @returns {import('jscodeshift').Node|undefined}
|
||||
*/
|
||||
const getInitializerByDeclarator = (binding) => {
|
||||
const isVariableDeclaration = jscodeshift.match(binding, {
|
||||
type: jscodeshift.VariableDeclarator.name,
|
||||
})
|
||||
|
||||
if (!isVariableDeclaration) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const isTSAsExpression = jscodeshift.match(binding.init, {
|
||||
type: jscodeshift.TSAsExpression.name,
|
||||
})
|
||||
|
||||
return isTSAsExpression ? binding.init.expression : binding.init
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').Node} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const isArrayExpressionVariable = (node) =>
|
||||
jscodeshift.match(node, {
|
||||
type: jscodeshift.VariableDeclarator.name,
|
||||
init: {
|
||||
type: jscodeshift.ArrayExpression.name,
|
||||
},
|
||||
})
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').NodePath} path
|
||||
* @param {import('jscodeshift').Node} node
|
||||
* @param {"queryKey"|"mutationKey"} keyName
|
||||
* @param {string} filePath
|
||||
* @returns {import('jscodeshift').Property|undefined}
|
||||
*/
|
||||
const transformArgumentToKey = (path, node, keyName, filePath) => {
|
||||
// If the first argument is an identifier we have to infer its type if possible.
|
||||
if (utils.isIdentifier(node)) {
|
||||
const binding = getBindingFromScope(path, node.name, filePath)
|
||||
|
||||
if (isArrayExpressionVariable(binding)) {
|
||||
return jscodeshift.property(
|
||||
'init',
|
||||
jscodeshift.identifier(keyName),
|
||||
jscodeshift.identifier(binding.id.name),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// If the first argument is an array, then it matches the following overload:
|
||||
// methodName(queryKey?: QueryKey, firstObject?: TFirstObject, secondObject?: TSecondObject)
|
||||
if (utils.isArrayExpression(node)) {
|
||||
// Then we create the 'queryKey' property based on it, because it will be passed to the first argument
|
||||
// that should be an object according to the new signature.
|
||||
return jscodeshift.property('init', jscodeshift.identifier(keyName), node)
|
||||
}
|
||||
|
||||
return undefined
|
||||
}
|
||||
|
||||
return {
|
||||
copyPropertiesFromSource,
|
||||
getInitializerByDeclarator,
|
||||
getBindingFromScope,
|
||||
transformArgumentToKey,
|
||||
}
|
||||
}
|
||||
27
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/unknown-usage-error.cjs
generated
vendored
Executable file
27
node_modules/@tanstack/react-query/build/codemods/src/v5/remove-overloads/utils/unknown-usage-error.cjs
generated
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
class UnknownUsageError extends Error {
|
||||
/**
|
||||
* @param {import('jscodeshift').CallExpression} callExpression
|
||||
* @param {string} filePath
|
||||
*/
|
||||
constructor(callExpression, filePath) {
|
||||
super('')
|
||||
this.message = this.buildMessage(callExpression, filePath)
|
||||
this.name = 'UnknownUsageError'
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {import('jscodeshift').CallExpression} callExpression
|
||||
* @param {string} filePath
|
||||
* @returns {string}
|
||||
*/
|
||||
buildMessage(callExpression, filePath) {
|
||||
const location = callExpression.callee.loc
|
||||
const start = location.start.line
|
||||
const end = location.end.line
|
||||
|
||||
return `The usage in file "${filePath}" at line ${start}:${end} could not be transformed into the new syntax. Please do this manually.`
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = UnknownUsageError
|
||||
55
node_modules/@tanstack/react-query/build/codemods/src/v5/rename-hydrate/rename-hydrate.cjs
generated
vendored
Executable file
55
node_modules/@tanstack/react-query/build/codemods/src/v5/rename-hydrate/rename-hydrate.cjs
generated
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
|
||||
const importSpecifiers = root
|
||||
.find(jscodeshift.ImportDeclaration, {
|
||||
source: {
|
||||
value: '@tanstack/react-query',
|
||||
},
|
||||
})
|
||||
.find(jscodeshift.ImportSpecifier, {
|
||||
imported: {
|
||||
name: 'Hydrate',
|
||||
},
|
||||
})
|
||||
|
||||
if (importSpecifiers.length > 0) {
|
||||
const names = {
|
||||
searched: 'Hydrate', // By default, we want to replace the `Hydrate` usages.
|
||||
target: 'HydrationBoundary', // We want to replace them with `HydrationBoundary`.
|
||||
}
|
||||
|
||||
importSpecifiers.replaceWith(({ node: mutableNode }) => {
|
||||
/**
|
||||
* When the local and imported names match which means the code doesn't contain import aliases, we need
|
||||
* to replace only the import specifier.
|
||||
* @type {boolean}
|
||||
*/
|
||||
const usesDefaultImport =
|
||||
mutableNode.local.name === mutableNode.imported.name
|
||||
|
||||
if (!usesDefaultImport) {
|
||||
// If the code uses import aliases, we must re-use the alias.
|
||||
names.searched = mutableNode.local.name
|
||||
names.target = mutableNode.local.name
|
||||
}
|
||||
|
||||
// Override the import specifier.
|
||||
mutableNode.imported.name = 'HydrationBoundary'
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
|
||||
root
|
||||
.findJSXElements(names.searched)
|
||||
.replaceWith(({ node: mutableNode }) => {
|
||||
mutableNode.openingElement.name.name = names.target
|
||||
mutableNode.closingElement.name.name = names.target
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
}
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
41
node_modules/@tanstack/react-query/build/codemods/src/v5/rename-properties/rename-properties.cjs
generated
vendored
Executable file
41
node_modules/@tanstack/react-query/build/codemods/src/v5/rename-properties/rename-properties.cjs
generated
vendored
Executable file
@@ -0,0 +1,41 @@
|
||||
module.exports = (file, api) => {
|
||||
const jscodeshift = api.jscodeshift
|
||||
const root = jscodeshift(file.source)
|
||||
|
||||
const baseRenameLogic = (kind, from, to) => {
|
||||
root
|
||||
.find(kind, (node) => {
|
||||
return (
|
||||
node.computed === false &&
|
||||
(node.key?.name === from || node.key?.value === from)
|
||||
)
|
||||
})
|
||||
.replaceWith(({ node: mutableNode }) => {
|
||||
if (mutableNode.key.name !== undefined) {
|
||||
mutableNode.key.name = to
|
||||
}
|
||||
|
||||
if (mutableNode.key.value !== undefined) {
|
||||
mutableNode.key.value = to
|
||||
}
|
||||
|
||||
return mutableNode
|
||||
})
|
||||
}
|
||||
|
||||
const renameObjectProperty = (from, to) => {
|
||||
baseRenameLogic(jscodeshift.ObjectProperty, from, to)
|
||||
}
|
||||
|
||||
const renameTypeScriptPropertySignature = (from, to) => {
|
||||
baseRenameLogic(jscodeshift.TSPropertySignature, from, to)
|
||||
}
|
||||
|
||||
renameObjectProperty('cacheTime', 'gcTime')
|
||||
renameObjectProperty('useErrorBoundary', 'throwOnError')
|
||||
|
||||
renameTypeScriptPropertySignature('cacheTime', 'gcTime')
|
||||
renameTypeScriptPropertySignature('useErrorBoundary', 'throwOnError')
|
||||
|
||||
return root.toSource({ quote: 'single', lineTerminator: '\n' })
|
||||
}
|
||||
91
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs
generated
vendored
Executable file
91
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs
generated
vendored
Executable file
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/HydrationBoundary.tsx
|
||||
var HydrationBoundary_exports = {};
|
||||
__export(HydrationBoundary_exports, {
|
||||
HydrationBoundary: () => HydrationBoundary
|
||||
});
|
||||
module.exports = __toCommonJS(HydrationBoundary_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var import_query_core = require("@tanstack/query-core");
|
||||
var import_QueryClientProvider = require("./QueryClientProvider.cjs");
|
||||
var HydrationBoundary = ({
|
||||
children,
|
||||
options = {},
|
||||
state,
|
||||
queryClient
|
||||
}) => {
|
||||
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
|
||||
const optionsRef = React.useRef(options);
|
||||
React.useEffect(() => {
|
||||
optionsRef.current = options;
|
||||
});
|
||||
const hydrationQueue = React.useMemo(() => {
|
||||
if (state) {
|
||||
if (typeof state !== "object") {
|
||||
return;
|
||||
}
|
||||
const queryCache = client.getQueryCache();
|
||||
const queries = state.queries || [];
|
||||
const newQueries = [];
|
||||
const existingQueries = [];
|
||||
for (const dehydratedQuery of queries) {
|
||||
const existingQuery = queryCache.get(dehydratedQuery.queryHash);
|
||||
if (!existingQuery) {
|
||||
newQueries.push(dehydratedQuery);
|
||||
} else {
|
||||
const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt || dehydratedQuery.promise && existingQuery.state.status !== "pending" && existingQuery.state.fetchStatus !== "fetching" && dehydratedQuery.dehydratedAt !== void 0 && dehydratedQuery.dehydratedAt > existingQuery.state.dataUpdatedAt;
|
||||
if (hydrationIsNewer) {
|
||||
existingQueries.push(dehydratedQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newQueries.length > 0) {
|
||||
(0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
|
||||
}
|
||||
if (existingQueries.length > 0) {
|
||||
return existingQueries;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
}, [client, state]);
|
||||
React.useEffect(() => {
|
||||
if (hydrationQueue) {
|
||||
(0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
|
||||
}
|
||||
}, [client, hydrationQueue]);
|
||||
return children;
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
HydrationBoundary
|
||||
});
|
||||
//# sourceMappingURL=HydrationBoundary.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.cjs.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
2
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.cts
generated
vendored
Executable file
2
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.cts
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export { HydrationBoundaryProps } from './_tsup-dts-rollup.cjs';
|
||||
export { HydrationBoundary } from './_tsup-dts-rollup.cjs';
|
||||
2
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.ts
generated
vendored
Executable file
2
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.d.ts
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export { HydrationBoundaryProps } from './_tsup-dts-rollup.js';
|
||||
export { HydrationBoundary } from './_tsup-dts-rollup.js';
|
||||
57
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js
generated
vendored
Executable file
57
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js
generated
vendored
Executable file
@@ -0,0 +1,57 @@
|
||||
"use client";
|
||||
|
||||
// src/HydrationBoundary.tsx
|
||||
import * as React from "react";
|
||||
import { hydrate } from "@tanstack/query-core";
|
||||
import { useQueryClient } from "./QueryClientProvider.js";
|
||||
var HydrationBoundary = ({
|
||||
children,
|
||||
options = {},
|
||||
state,
|
||||
queryClient
|
||||
}) => {
|
||||
const client = useQueryClient(queryClient);
|
||||
const optionsRef = React.useRef(options);
|
||||
React.useEffect(() => {
|
||||
optionsRef.current = options;
|
||||
});
|
||||
const hydrationQueue = React.useMemo(() => {
|
||||
if (state) {
|
||||
if (typeof state !== "object") {
|
||||
return;
|
||||
}
|
||||
const queryCache = client.getQueryCache();
|
||||
const queries = state.queries || [];
|
||||
const newQueries = [];
|
||||
const existingQueries = [];
|
||||
for (const dehydratedQuery of queries) {
|
||||
const existingQuery = queryCache.get(dehydratedQuery.queryHash);
|
||||
if (!existingQuery) {
|
||||
newQueries.push(dehydratedQuery);
|
||||
} else {
|
||||
const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt || dehydratedQuery.promise && existingQuery.state.status !== "pending" && existingQuery.state.fetchStatus !== "fetching" && dehydratedQuery.dehydratedAt !== void 0 && dehydratedQuery.dehydratedAt > existingQuery.state.dataUpdatedAt;
|
||||
if (hydrationIsNewer) {
|
||||
existingQueries.push(dehydratedQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newQueries.length > 0) {
|
||||
hydrate(client, { queries: newQueries }, optionsRef.current);
|
||||
}
|
||||
if (existingQueries.length > 0) {
|
||||
return existingQueries;
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
}, [client, state]);
|
||||
React.useEffect(() => {
|
||||
if (hydrationQueue) {
|
||||
hydrate(client, { queries: hydrationQueue }, optionsRef.current);
|
||||
}
|
||||
}, [client, hydrationQueue]);
|
||||
return children;
|
||||
};
|
||||
export {
|
||||
HydrationBoundary
|
||||
};
|
||||
//# sourceMappingURL=HydrationBoundary.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
47
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs
generated
vendored
Executable file
47
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs
generated
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/IsRestoringProvider.ts
|
||||
var IsRestoringProvider_exports = {};
|
||||
__export(IsRestoringProvider_exports, {
|
||||
IsRestoringProvider: () => IsRestoringProvider,
|
||||
useIsRestoring: () => useIsRestoring
|
||||
});
|
||||
module.exports = __toCommonJS(IsRestoringProvider_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var IsRestoringContext = React.createContext(false);
|
||||
var useIsRestoring = () => React.useContext(IsRestoringContext);
|
||||
var IsRestoringProvider = IsRestoringContext.Provider;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
IsRestoringProvider,
|
||||
useIsRestoring
|
||||
});
|
||||
//# sourceMappingURL=IsRestoringProvider.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAEvB,IAAM,qBAA2B,oBAAc,KAAK;AAE7C,IAAM,iBAAiB,MAAY,iBAAW,kBAAkB;AAChE,IAAM,sBAAsB,mBAAmB;","names":[]}
|
||||
2
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.cts
generated
vendored
Executable file
2
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.cts
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export { useIsRestoring } from './_tsup-dts-rollup.cjs';
|
||||
export { IsRestoringProvider } from './_tsup-dts-rollup.cjs';
|
||||
2
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.ts
generated
vendored
Executable file
2
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.d.ts
generated
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
export { useIsRestoring } from './_tsup-dts-rollup.js';
|
||||
export { IsRestoringProvider } from './_tsup-dts-rollup.js';
|
||||
12
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js
generated
vendored
Executable file
12
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js
generated
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
"use client";
|
||||
|
||||
// src/IsRestoringProvider.ts
|
||||
import * as React from "react";
|
||||
var IsRestoringContext = React.createContext(false);
|
||||
var useIsRestoring = () => React.useContext(IsRestoringContext);
|
||||
var IsRestoringProvider = IsRestoringContext.Provider;
|
||||
export {
|
||||
IsRestoringProvider,
|
||||
useIsRestoring
|
||||
};
|
||||
//# sourceMappingURL=IsRestoringProvider.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/IsRestoringProvider.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/IsRestoringProvider.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nconst IsRestoringContext = React.createContext(false)\n\nexport const useIsRestoring = () => React.useContext(IsRestoringContext)\nexport const IsRestoringProvider = IsRestoringContext.Provider\n"],"mappings":";;;AACA,YAAY,WAAW;AAEvB,IAAM,qBAA2B,oBAAc,KAAK;AAE7C,IAAM,iBAAiB,MAAY,iBAAW,kBAAkB;AAChE,IAAM,sBAAsB,mBAAmB;","names":[]}
|
||||
72
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs
generated
vendored
Executable file
72
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs
generated
vendored
Executable file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/QueryClientProvider.tsx
|
||||
var QueryClientProvider_exports = {};
|
||||
__export(QueryClientProvider_exports, {
|
||||
QueryClientContext: () => QueryClientContext,
|
||||
QueryClientProvider: () => QueryClientProvider,
|
||||
useQueryClient: () => useQueryClient
|
||||
});
|
||||
module.exports = __toCommonJS(QueryClientProvider_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var QueryClientContext = React.createContext(
|
||||
void 0
|
||||
);
|
||||
var useQueryClient = (queryClient) => {
|
||||
const client = React.useContext(QueryClientContext);
|
||||
if (queryClient) {
|
||||
return queryClient;
|
||||
}
|
||||
if (!client) {
|
||||
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
||||
}
|
||||
return client;
|
||||
};
|
||||
var QueryClientProvider = ({
|
||||
client,
|
||||
children
|
||||
}) => {
|
||||
React.useEffect(() => {
|
||||
client.mount();
|
||||
return () => {
|
||||
client.unmount();
|
||||
};
|
||||
}, [client]);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
QueryClientContext,
|
||||
QueryClientProvider,
|
||||
useQueryClient
|
||||
});
|
||||
//# sourceMappingURL=QueryClientProvider.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): React.JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAuCnB;AAnCG,IAAM,qBAA2B;AAAA,EACtC;AACF;AAEO,IAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,SAAe,iBAAW,kBAAkB;AAElD,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,IAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAmD;AACjD,EAAM,gBAAU,MAAM;AACpB,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;","names":[]}
|
||||
4
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.cts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.cts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { QueryClientContext } from './_tsup-dts-rollup.cjs';
|
||||
export { useQueryClient } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientProviderProps } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientProvider } from './_tsup-dts-rollup.cjs';
|
||||
4
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.ts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.d.ts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { QueryClientContext } from './_tsup-dts-rollup.js';
|
||||
export { useQueryClient } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientProviderProps } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientProvider } from './_tsup-dts-rollup.js';
|
||||
36
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js
generated
vendored
Executable file
36
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js
generated
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
"use client";
|
||||
|
||||
// src/QueryClientProvider.tsx
|
||||
import * as React from "react";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var QueryClientContext = React.createContext(
|
||||
void 0
|
||||
);
|
||||
var useQueryClient = (queryClient) => {
|
||||
const client = React.useContext(QueryClientContext);
|
||||
if (queryClient) {
|
||||
return queryClient;
|
||||
}
|
||||
if (!client) {
|
||||
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
||||
}
|
||||
return client;
|
||||
};
|
||||
var QueryClientProvider = ({
|
||||
client,
|
||||
children
|
||||
}) => {
|
||||
React.useEffect(() => {
|
||||
client.mount();
|
||||
return () => {
|
||||
client.unmount();
|
||||
};
|
||||
}, [client]);
|
||||
return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });
|
||||
};
|
||||
export {
|
||||
QueryClientContext,
|
||||
QueryClientProvider,
|
||||
useQueryClient
|
||||
};
|
||||
//# sourceMappingURL=QueryClientProvider.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/QueryClientProvider.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\nimport type { QueryClient } from '@tanstack/query-core'\n\nexport const QueryClientContext = React.createContext<QueryClient | undefined>(\n undefined,\n)\n\nexport const useQueryClient = (queryClient?: QueryClient) => {\n const client = React.useContext(QueryClientContext)\n\n if (queryClient) {\n return queryClient\n }\n\n if (!client) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one')\n }\n\n return client\n}\n\nexport type QueryClientProviderProps = {\n client: QueryClient\n children?: React.ReactNode\n}\n\nexport const QueryClientProvider = ({\n client,\n children,\n}: QueryClientProviderProps): React.JSX.Element => {\n React.useEffect(() => {\n client.mount()\n return () => {\n client.unmount()\n }\n }, [client])\n\n return (\n <QueryClientContext.Provider value={client}>\n {children}\n </QueryClientContext.Provider>\n )\n}\n"],"mappings":";;;AACA,YAAY,WAAW;AAuCnB;AAnCG,IAAM,qBAA2B;AAAA,EACtC;AACF;AAEO,IAAM,iBAAiB,CAAC,gBAA8B;AAC3D,QAAM,SAAe,iBAAW,kBAAkB;AAElD,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,QAAQ;AACX,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAEA,SAAO;AACT;AAOO,IAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AACF,MAAmD;AACjD,EAAM,gBAAU,MAAM;AACpB,WAAO,MAAM;AACb,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,QACjC,UACH;AAEJ;","names":[]}
|
||||
67
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs
generated
vendored
Executable file
67
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs
generated
vendored
Executable file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/QueryErrorResetBoundary.tsx
|
||||
var QueryErrorResetBoundary_exports = {};
|
||||
__export(QueryErrorResetBoundary_exports, {
|
||||
QueryErrorResetBoundary: () => QueryErrorResetBoundary,
|
||||
useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
|
||||
});
|
||||
module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
function createValue() {
|
||||
let isReset = false;
|
||||
return {
|
||||
clearReset: () => {
|
||||
isReset = false;
|
||||
},
|
||||
reset: () => {
|
||||
isReset = true;
|
||||
},
|
||||
isReset: () => {
|
||||
return isReset;
|
||||
}
|
||||
};
|
||||
}
|
||||
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
||||
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
||||
var QueryErrorResetBoundary = ({
|
||||
children
|
||||
}) => {
|
||||
const [value] = React.useState(() => createValue());
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
QueryErrorResetBoundary,
|
||||
useQueryErrorResetBoundary
|
||||
});
|
||||
//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => React.ReactNode\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AAkDnB;AArCJ,SAAS,cAA4C;AACnD,MAAI,UAAU;AACd,SAAO;AAAA,IACL,YAAY,MAAM;AAChB,gBAAU;AAAA,IACZ;AAAA,IACA,OAAO,MAAM;AACX,gBAAU;AAAA,IACZ;AAAA,IACA,SAAS,MAAM;AACb,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,IAAM,iCAAuC,oBAAc,YAAY,CAAC;AAIjE,IAAM,6BAA6B,MAClC,iBAAW,8BAA8B;AAY1C,IAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,IAAU,eAAS,MAAM,YAAY,CAAC;AAClD,SACE,4CAAC,+BAA+B,UAA/B,EAAwC,OACtC,iBAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACtD;AAEJ;","names":[]}
|
||||
8
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.cts
generated
vendored
Executable file
8
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.cts
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
export { QueryErrorResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.cjs';
|
||||
export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
|
||||
8
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.ts
generated
vendored
Executable file
8
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.d.ts
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
export { QueryErrorResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorIsResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorClearResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundaryValue } from './_tsup-dts-rollup.js';
|
||||
export { useQueryErrorResetBoundary } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundary } from './_tsup-dts-rollup.js';
|
||||
32
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
generated
vendored
Executable file
32
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js
generated
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
"use client";
|
||||
|
||||
// src/QueryErrorResetBoundary.tsx
|
||||
import * as React from "react";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
function createValue() {
|
||||
let isReset = false;
|
||||
return {
|
||||
clearReset: () => {
|
||||
isReset = false;
|
||||
},
|
||||
reset: () => {
|
||||
isReset = true;
|
||||
},
|
||||
isReset: () => {
|
||||
return isReset;
|
||||
}
|
||||
};
|
||||
}
|
||||
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
||||
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
||||
var QueryErrorResetBoundary = ({
|
||||
children
|
||||
}) => {
|
||||
const [value] = React.useState(() => createValue());
|
||||
return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
|
||||
};
|
||||
export {
|
||||
QueryErrorResetBoundary,
|
||||
useQueryErrorResetBoundary
|
||||
};
|
||||
//# sourceMappingURL=QueryErrorResetBoundary.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/QueryErrorResetBoundary.tsx"],"sourcesContent":["'use client'\nimport * as React from 'react'\n\n// CONTEXT\nexport type QueryErrorResetFunction = () => void\nexport type QueryErrorIsResetFunction = () => boolean\nexport type QueryErrorClearResetFunction = () => void\n\nexport interface QueryErrorResetBoundaryValue {\n clearReset: QueryErrorClearResetFunction\n isReset: QueryErrorIsResetFunction\n reset: QueryErrorResetFunction\n}\n\nfunction createValue(): QueryErrorResetBoundaryValue {\n let isReset = false\n return {\n clearReset: () => {\n isReset = false\n },\n reset: () => {\n isReset = true\n },\n isReset: () => {\n return isReset\n },\n }\n}\n\nconst QueryErrorResetBoundaryContext = React.createContext(createValue())\n\n// HOOK\n\nexport const useQueryErrorResetBoundary = () =>\n React.useContext(QueryErrorResetBoundaryContext)\n\n// COMPONENT\n\nexport type QueryErrorResetBoundaryFunction = (\n value: QueryErrorResetBoundaryValue,\n) => React.ReactNode\n\nexport interface QueryErrorResetBoundaryProps {\n children: QueryErrorResetBoundaryFunction | React.ReactNode\n}\n\nexport const QueryErrorResetBoundary = ({\n children,\n}: QueryErrorResetBoundaryProps) => {\n const [value] = React.useState(() => createValue())\n return (\n <QueryErrorResetBoundaryContext.Provider value={value}>\n {typeof children === 'function' ? children(value) : children}\n </QueryErrorResetBoundaryContext.Provider>\n )\n}\n"],"mappings":";;;AACA,YAAY,WAAW;AAkDnB;AArCJ,SAAS,cAA4C;AACnD,MAAI,UAAU;AACd,SAAO;AAAA,IACL,YAAY,MAAM;AAChB,gBAAU;AAAA,IACZ;AAAA,IACA,OAAO,MAAM;AACX,gBAAU;AAAA,IACZ;AAAA,IACA,SAAS,MAAM;AACb,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,IAAM,iCAAuC,oBAAc,YAAY,CAAC;AAIjE,IAAM,6BAA6B,MAClC,iBAAW,8BAA8B;AAY1C,IAAM,0BAA0B,CAAC;AAAA,EACtC;AACF,MAAoC;AAClC,QAAM,CAAC,KAAK,IAAU,eAAS,MAAM,YAAY,CAAC;AAClD,SACE,oBAAC,+BAA+B,UAA/B,EAAwC,OACtC,iBAAO,aAAa,aAAa,SAAS,KAAK,IAAI,UACtD;AAEJ;","names":[]}
|
||||
950
node_modules/@tanstack/react-query/build/legacy/_tsup-dts-rollup.d.cts
generated
vendored
Executable file
950
node_modules/@tanstack/react-query/build/legacy/_tsup-dts-rollup.d.cts
generated
vendored
Executable file
@@ -0,0 +1,950 @@
|
||||
import { AnyDataTag } from '@tanstack/query-core';
|
||||
import { CancelledError } from '@tanstack/query-core';
|
||||
import { CancelOptions } from '@tanstack/query-core';
|
||||
import { DataTag } from '@tanstack/query-core';
|
||||
import { dataTagErrorSymbol } from '@tanstack/query-core';
|
||||
import { dataTagSymbol } from '@tanstack/query-core';
|
||||
import { DefaultedInfiniteQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { DefaultedQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { DefaultError } from '@tanstack/query-core';
|
||||
import { DefaultOptions } from '@tanstack/query-core';
|
||||
import { defaultScheduler } from '@tanstack/query-core';
|
||||
import { defaultShouldDehydrateMutation } from '@tanstack/query-core';
|
||||
import { defaultShouldDehydrateQuery } from '@tanstack/query-core';
|
||||
import { DefinedInfiniteQueryObserverResult } from '@tanstack/query-core';
|
||||
import { DefinedQueryObserverResult } from '@tanstack/query-core';
|
||||
import { dehydrate } from '@tanstack/query-core';
|
||||
import { DehydratedState } from '@tanstack/query-core';
|
||||
import { DehydrateOptions } from '@tanstack/query-core';
|
||||
import { DistributiveOmit } from '@tanstack/query-core';
|
||||
import { Enabled } from '@tanstack/query-core';
|
||||
import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
|
||||
import { EnsureQueryDataOptions } from '@tanstack/query-core';
|
||||
import { environmentManager } from '@tanstack/query-core';
|
||||
import { experimental_streamedQuery } from '@tanstack/query-core';
|
||||
import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
|
||||
import { FetchNextPageOptions } from '@tanstack/query-core';
|
||||
import { FetchPreviousPageOptions } from '@tanstack/query-core';
|
||||
import { FetchQueryOptions } from '@tanstack/query-core';
|
||||
import { FetchStatus } from '@tanstack/query-core';
|
||||
import { focusManager } from '@tanstack/query-core';
|
||||
import { GetNextPageParamFunction } from '@tanstack/query-core';
|
||||
import { GetPreviousPageParamFunction } from '@tanstack/query-core';
|
||||
import { hashKey } from '@tanstack/query-core';
|
||||
import { hydrate } from '@tanstack/query-core';
|
||||
import { HydrateOptions } from '@tanstack/query-core';
|
||||
import { InferDataFromTag } from '@tanstack/query-core';
|
||||
import { InferErrorFromTag } from '@tanstack/query-core';
|
||||
import { InfiniteData } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserver } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverBaseResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverLoadingErrorResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverPendingResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverPlaceholderResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverRefetchErrorResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryPageParamsOptions } from '@tanstack/query-core';
|
||||
import { InitialDataFunction } from '@tanstack/query-core';
|
||||
import { InitialPageParam } from '@tanstack/query-core';
|
||||
import { InvalidateOptions } from '@tanstack/query-core';
|
||||
import { InvalidateQueryFilters } from '@tanstack/query-core';
|
||||
import { isCancelledError } from '@tanstack/query-core';
|
||||
import { isServer } from '@tanstack/query-core';
|
||||
import { JSX } from 'react/jsx-runtime';
|
||||
import { keepPreviousData } from '@tanstack/query-core';
|
||||
import { ManagedTimerId } from '@tanstack/query-core';
|
||||
import { matchMutation } from '@tanstack/query-core';
|
||||
import { matchQuery } from '@tanstack/query-core';
|
||||
import { MutateFunction } from '@tanstack/query-core';
|
||||
import { MutateOptions } from '@tanstack/query-core';
|
||||
import { Mutation } from '@tanstack/query-core';
|
||||
import { MutationCache } from '@tanstack/query-core';
|
||||
import { MutationCacheNotifyEvent } from '@tanstack/query-core';
|
||||
import { MutationFilters } from '@tanstack/query-core';
|
||||
import { MutationFunction } from '@tanstack/query-core';
|
||||
import { MutationFunctionContext } from '@tanstack/query-core';
|
||||
import { MutationKey } from '@tanstack/query-core';
|
||||
import { MutationMeta } from '@tanstack/query-core';
|
||||
import { MutationObserver as MutationObserver_2 } from '@tanstack/query-core';
|
||||
import { MutationObserverBaseResult } from '@tanstack/query-core';
|
||||
import { MutationObserverErrorResult } from '@tanstack/query-core';
|
||||
import { MutationObserverIdleResult } from '@tanstack/query-core';
|
||||
import { MutationObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { MutationObserverOptions } from '@tanstack/query-core';
|
||||
import { MutationObserverResult } from '@tanstack/query-core';
|
||||
import { MutationObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { MutationOptions } from '@tanstack/query-core';
|
||||
import { MutationScope } from '@tanstack/query-core';
|
||||
import { MutationState } from '@tanstack/query-core';
|
||||
import { MutationStatus } from '@tanstack/query-core';
|
||||
import { NetworkMode } from '@tanstack/query-core';
|
||||
import { NoInfer as NoInfer_2 } from '@tanstack/query-core';
|
||||
import { NonUndefinedGuard } from '@tanstack/query-core';
|
||||
import { noop } from '@tanstack/query-core';
|
||||
import { NotifyEvent } from '@tanstack/query-core';
|
||||
import { NotifyEventType } from '@tanstack/query-core';
|
||||
import { notifyManager } from '@tanstack/query-core';
|
||||
import { NotifyOnChangeProps } from '@tanstack/query-core';
|
||||
import { OmitKeyof } from '@tanstack/query-core';
|
||||
import { onlineManager } from '@tanstack/query-core';
|
||||
import { Override } from '@tanstack/query-core';
|
||||
import { partialMatchKey } from '@tanstack/query-core';
|
||||
import { PlaceholderDataFunction } from '@tanstack/query-core';
|
||||
import { QueriesObserver } from '@tanstack/query-core';
|
||||
import { QueriesObserverOptions } from '@tanstack/query-core';
|
||||
import { QueriesPlaceholderDataFunction } from '@tanstack/query-core';
|
||||
import { Query } from '@tanstack/query-core';
|
||||
import { QueryCache } from '@tanstack/query-core';
|
||||
import { QueryCacheNotifyEvent } from '@tanstack/query-core';
|
||||
import { QueryClient } from '@tanstack/query-core';
|
||||
import { QueryClientConfig } from '@tanstack/query-core';
|
||||
import { QueryFilters } from '@tanstack/query-core';
|
||||
import { QueryFunction } from '@tanstack/query-core';
|
||||
import { QueryFunctionContext } from '@tanstack/query-core';
|
||||
import { QueryKey } from '@tanstack/query-core';
|
||||
import { QueryKeyHashFunction } from '@tanstack/query-core';
|
||||
import { QueryMeta } from '@tanstack/query-core';
|
||||
import { QueryObserver } from '@tanstack/query-core';
|
||||
import { QueryObserverBaseResult } from '@tanstack/query-core';
|
||||
import { QueryObserverLoadingErrorResult } from '@tanstack/query-core';
|
||||
import { QueryObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { QueryObserverOptions } from '@tanstack/query-core';
|
||||
import { QueryObserverPendingResult } from '@tanstack/query-core';
|
||||
import { QueryObserverPlaceholderResult } from '@tanstack/query-core';
|
||||
import { QueryObserverRefetchErrorResult } from '@tanstack/query-core';
|
||||
import { QueryObserverResult } from '@tanstack/query-core';
|
||||
import { QueryObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { QueryOptions } from '@tanstack/query-core';
|
||||
import { QueryPersister } from '@tanstack/query-core';
|
||||
import { QueryState } from '@tanstack/query-core';
|
||||
import { QueryStatus } from '@tanstack/query-core';
|
||||
import * as React_2 from 'react';
|
||||
import { RefetchOptions } from '@tanstack/query-core';
|
||||
import { RefetchQueryFilters } from '@tanstack/query-core';
|
||||
import { Register } from '@tanstack/query-core';
|
||||
import { replaceEqualDeep } from '@tanstack/query-core';
|
||||
import { ResetOptions } from '@tanstack/query-core';
|
||||
import { ResultOptions } from '@tanstack/query-core';
|
||||
import { SetDataOptions } from '@tanstack/query-core';
|
||||
import { shouldThrowError } from '@tanstack/query-core';
|
||||
import { SkipToken } from '@tanstack/query-core';
|
||||
import { skipToken } from '@tanstack/query-core';
|
||||
import { StaleTime } from '@tanstack/query-core';
|
||||
import { StaleTimeFunction } from '@tanstack/query-core';
|
||||
import { ThrowOnError } from '@tanstack/query-core';
|
||||
import { TimeoutCallback } from '@tanstack/query-core';
|
||||
import { timeoutManager } from '@tanstack/query-core';
|
||||
import { TimeoutProvider } from '@tanstack/query-core';
|
||||
import { UnsetMarker } from '@tanstack/query-core';
|
||||
import { unsetMarker } from '@tanstack/query-core';
|
||||
import { Updater } from '@tanstack/query-core';
|
||||
import { WithRequired } from '@tanstack/query-core';
|
||||
|
||||
export { AnyDataTag }
|
||||
|
||||
declare type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseBaseQueryOptions }
|
||||
export { AnyUseBaseQueryOptions as AnyUseBaseQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseInfiniteQueryOptions }
|
||||
export { AnyUseInfiniteQueryOptions as AnyUseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
||||
export { AnyUseMutationOptions }
|
||||
export { AnyUseMutationOptions as AnyUseMutationOptions_alias_1 }
|
||||
|
||||
declare type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
||||
export { AnyUseQueryOptions }
|
||||
export { AnyUseQueryOptions as AnyUseQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseSuspenseInfiniteQueryOptions }
|
||||
export { AnyUseSuspenseInfiniteQueryOptions as AnyUseSuspenseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any, any>;
|
||||
export { AnyUseSuspenseQueryOptions }
|
||||
export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
|
||||
|
||||
export { CancelledError }
|
||||
|
||||
export { CancelOptions }
|
||||
|
||||
export { DataTag }
|
||||
|
||||
export { dataTagErrorSymbol }
|
||||
|
||||
export { dataTagSymbol }
|
||||
|
||||
export { DefaultedInfiniteQueryObserverOptions }
|
||||
|
||||
export { DefaultedQueryObserverOptions }
|
||||
|
||||
export { DefaultError }
|
||||
|
||||
export { DefaultOptions }
|
||||
|
||||
export { defaultScheduler }
|
||||
|
||||
export { defaultShouldDehydrateMutation }
|
||||
|
||||
export { defaultShouldDehydrateQuery }
|
||||
|
||||
export declare const defaultThrowOnError: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(_error: TError, query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean;
|
||||
|
||||
export { DefinedInfiniteQueryObserverResult }
|
||||
|
||||
declare type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>) | undefined;
|
||||
};
|
||||
export { DefinedInitialDataInfiniteOptions }
|
||||
export { DefinedInitialDataInfiniteOptions as DefinedInitialDataInfiniteOptions_alias_1 }
|
||||
|
||||
declare type DefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
|
||||
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
||||
queryFn?: QueryFunction<TQueryFnData, TQueryKey>;
|
||||
};
|
||||
export { DefinedInitialDataOptions }
|
||||
export { DefinedInitialDataOptions as DefinedInitialDataOptions_alias_1 }
|
||||
|
||||
export { DefinedQueryObserverResult }
|
||||
|
||||
declare type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
|
||||
export { DefinedUseInfiniteQueryResult }
|
||||
export { DefinedUseInfiniteQueryResult as DefinedUseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
|
||||
export { DefinedUseQueryResult }
|
||||
export { DefinedUseQueryResult as DefinedUseQueryResult_alias_1 }
|
||||
|
||||
export { dehydrate }
|
||||
|
||||
export { DehydratedState }
|
||||
|
||||
export { DehydrateOptions }
|
||||
|
||||
export { DistributiveOmit }
|
||||
|
||||
export { Enabled }
|
||||
|
||||
export { EnsureInfiniteQueryDataOptions }
|
||||
|
||||
export declare const ensurePreventErrorBoundaryRetry: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue, query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined) => void;
|
||||
|
||||
export { EnsureQueryDataOptions }
|
||||
|
||||
export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>) => void;
|
||||
|
||||
export { environmentManager }
|
||||
|
||||
export { experimental_streamedQuery }
|
||||
|
||||
export { FetchInfiniteQueryOptions }
|
||||
|
||||
export { FetchNextPageOptions }
|
||||
|
||||
export declare const fetchOptimistic: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(defaultedOptions: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => Promise<void | QueryObserverResult<TData, TError>>;
|
||||
|
||||
export { FetchPreviousPageOptions }
|
||||
|
||||
export { FetchQueryOptions }
|
||||
|
||||
export { FetchStatus }
|
||||
|
||||
export { focusManager }
|
||||
|
||||
declare type GetDefinedOrUndefinedQueryResult<T, TData, TError = unknown> = T extends {
|
||||
initialData?: infer TInitialData;
|
||||
} ? unknown extends TInitialData ? UseQueryResult<TData, TError> : TInitialData extends TData ? DefinedUseQueryResult<TData, TError> : TInitialData extends () => infer TInitialDataResult ? unknown extends TInitialDataResult ? UseQueryResult<TData, TError> : TInitialDataResult extends TData ? DefinedUseQueryResult<TData, TError> : UseQueryResult<TData, TError> : UseQueryResult<TData, TError> : UseQueryResult<TData, TError>;
|
||||
|
||||
export declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQueryKey extends QueryKey>({ result, errorResetBoundary, throwOnError, query, suspense, }: {
|
||||
result: QueryObserverResult<TData, TError>;
|
||||
errorResetBoundary: QueryErrorResetBoundaryValue;
|
||||
throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>;
|
||||
query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined;
|
||||
suspense: boolean | undefined;
|
||||
}) => boolean | undefined;
|
||||
|
||||
export { GetNextPageParamFunction }
|
||||
|
||||
export { GetPreviousPageParamFunction }
|
||||
|
||||
declare type GetUseQueryOptionsForUseQueries<T> = T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, TError, TData> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseQueryOptionsForUseQueries<unknown, TError, TData> : T extends [infer TQueryFnData, infer TError, infer TData] ? UseQueryOptionsForUseQueries<TQueryFnData, TError, TData> : T extends [infer TQueryFnData, infer TError] ? UseQueryOptionsForUseQueries<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseQueryOptionsForUseQueries<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, unknown extends TError ? DefaultError : TError, unknown extends TData ? TQueryFnData : TData, TQueryKey> : UseQueryOptionsForUseQueries;
|
||||
|
||||
declare type GetUseQueryResult<T> = T extends {
|
||||
queryFnData: any;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends [any, infer TError, infer TData] ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends [infer TQueryFnData, infer TError] ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData, TError> : T extends [infer TQueryFnData] ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError> : UseQueryResult;
|
||||
|
||||
declare type GetUseSuspenseQueryOptions<T> = T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TData> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryOptions<unknown, TError, TData> : T extends [infer TQueryFnData, infer TError, infer TData] ? UseSuspenseQueryOptions<TQueryFnData, TError, TData> : T extends [infer TQueryFnData, infer TError] ? UseSuspenseQueryOptions<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseSuspenseQueryOptions<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries_2;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries_2;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TQueryFnData, TQueryKey> : UseSuspenseQueryOptions;
|
||||
|
||||
declare type GetUseSuspenseQueryResult<T> = T extends {
|
||||
queryFnData: any;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseSuspenseQueryResult<TData, TError> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryResult<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryResult<TData, TError> : T extends [any, infer TError, infer TData] ? UseSuspenseQueryResult<TData, TError> : T extends [infer TQueryFnData, infer TError] ? UseSuspenseQueryResult<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseSuspenseQueryResult<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries_2;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryResult<unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries_2;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryResult<TQueryFnData, unknown extends TError ? DefaultError : TError> : UseSuspenseQueryResult;
|
||||
|
||||
export { hashKey }
|
||||
|
||||
export { hydrate }
|
||||
|
||||
export { HydrateOptions }
|
||||
|
||||
declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => React_2.ReactElement;
|
||||
export { HydrationBoundary }
|
||||
export { HydrationBoundary as HydrationBoundary_alias_1 }
|
||||
|
||||
declare interface HydrationBoundaryProps {
|
||||
state: DehydratedState | null | undefined;
|
||||
options?: OmitKeyof<HydrateOptions, 'defaultOptions'> & {
|
||||
defaultOptions?: OmitKeyof<Exclude<HydrateOptions['defaultOptions'], undefined>, 'mutations'>;
|
||||
};
|
||||
children?: React_2.ReactNode;
|
||||
queryClient?: QueryClient;
|
||||
}
|
||||
export { HydrationBoundaryProps }
|
||||
export { HydrationBoundaryProps as HydrationBoundaryProps_alias_1 }
|
||||
|
||||
export { InferDataFromTag }
|
||||
|
||||
export { InferErrorFromTag }
|
||||
|
||||
export { InfiniteData }
|
||||
|
||||
export { InfiniteQueryObserver }
|
||||
|
||||
export { InfiniteQueryObserverBaseResult }
|
||||
|
||||
export { InfiniteQueryObserverLoadingErrorResult }
|
||||
|
||||
export { InfiniteQueryObserverLoadingResult }
|
||||
|
||||
export { InfiniteQueryObserverOptions }
|
||||
|
||||
export { InfiniteQueryObserverPendingResult }
|
||||
|
||||
export { InfiniteQueryObserverPlaceholderResult }
|
||||
|
||||
export { InfiniteQueryObserverRefetchErrorResult }
|
||||
|
||||
export { InfiniteQueryObserverResult }
|
||||
|
||||
export { InfiniteQueryObserverSuccessResult }
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
export { infiniteQueryOptions }
|
||||
export { infiniteQueryOptions as infiniteQueryOptions_alias_1 }
|
||||
|
||||
export { InfiniteQueryPageParamsOptions }
|
||||
|
||||
export { InitialDataFunction }
|
||||
|
||||
export { InitialPageParam }
|
||||
|
||||
export { InvalidateOptions }
|
||||
|
||||
export { InvalidateQueryFilters }
|
||||
|
||||
export { isCancelledError }
|
||||
|
||||
declare const IsRestoringProvider: React_2.Provider<boolean>;
|
||||
export { IsRestoringProvider }
|
||||
export { IsRestoringProvider as IsRestoringProvider_alias_1 }
|
||||
|
||||
export { isServer }
|
||||
|
||||
export { keepPreviousData }
|
||||
|
||||
export { ManagedTimerId }
|
||||
|
||||
export { matchMutation }
|
||||
|
||||
export { matchQuery }
|
||||
|
||||
declare type MAXIMUM_DEPTH = 20;
|
||||
|
||||
declare type MAXIMUM_DEPTH_2 = 20;
|
||||
|
||||
export { MutateFunction }
|
||||
|
||||
export { MutateOptions }
|
||||
|
||||
export { Mutation }
|
||||
|
||||
export { MutationCache }
|
||||
|
||||
export { MutationCacheNotifyEvent }
|
||||
|
||||
export { MutationFilters }
|
||||
|
||||
export { MutationFunction }
|
||||
|
||||
export { MutationFunctionContext }
|
||||
|
||||
export { MutationKey }
|
||||
|
||||
export { MutationMeta }
|
||||
|
||||
export { MutationObserver_2 as MutationObserver }
|
||||
|
||||
export { MutationObserverBaseResult }
|
||||
|
||||
export { MutationObserverErrorResult }
|
||||
|
||||
export { MutationObserverIdleResult }
|
||||
|
||||
export { MutationObserverLoadingResult }
|
||||
|
||||
export { MutationObserverOptions }
|
||||
|
||||
export { MutationObserverResult }
|
||||
|
||||
export { MutationObserverSuccessResult }
|
||||
|
||||
export { MutationOptions }
|
||||
|
||||
declare function mutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: WithRequired<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>): WithRequired<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>;
|
||||
|
||||
declare function mutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: Omit<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>): Omit<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>;
|
||||
export { mutationOptions }
|
||||
export { mutationOptions as mutationOptions_alias_1 }
|
||||
|
||||
export { MutationScope }
|
||||
|
||||
export { MutationState }
|
||||
|
||||
declare type MutationStateOptions<TResult = MutationState> = {
|
||||
filters?: MutationFilters;
|
||||
select?: (mutation: Mutation) => TResult;
|
||||
};
|
||||
|
||||
export { MutationStatus }
|
||||
|
||||
export { NetworkMode }
|
||||
|
||||
export { NoInfer_2 as NoInfer }
|
||||
|
||||
export { NonUndefinedGuard }
|
||||
|
||||
export { noop }
|
||||
|
||||
export { NotifyEvent }
|
||||
|
||||
export { NotifyEventType }
|
||||
|
||||
export { notifyManager }
|
||||
|
||||
export { NotifyOnChangeProps }
|
||||
|
||||
export { OmitKeyof }
|
||||
|
||||
export { onlineManager }
|
||||
|
||||
export { Override }
|
||||
|
||||
export { partialMatchKey }
|
||||
|
||||
export { PlaceholderDataFunction }
|
||||
|
||||
export { QueriesObserver }
|
||||
|
||||
export { QueriesObserverOptions }
|
||||
|
||||
/**
|
||||
* QueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
|
||||
*/
|
||||
declare type QueriesOptions<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<UseQueryOptionsForUseQueries> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseQueryOptionsForUseQueries<Head>] : T extends [infer Head, ...infer Tails] ? QueriesOptions<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseQueryOptionsForUseQueries<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : ReadonlyArray<unknown> extends T ? T : T extends Array<UseQueryOptionsForUseQueries<infer TQueryFnData, infer TError, infer TData, infer TQueryKey>> ? Array<UseQueryOptionsForUseQueries<TQueryFnData, TError, TData, TQueryKey>> : Array<UseQueryOptionsForUseQueries>;
|
||||
export { QueriesOptions }
|
||||
export { QueriesOptions as QueriesOptions_alias_1 }
|
||||
|
||||
export { QueriesPlaceholderDataFunction }
|
||||
|
||||
/**
|
||||
* QueriesResults reducer recursively maps type param to results
|
||||
*/
|
||||
declare type QueriesResults<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<UseQueryResult> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseQueryResult<Head>] : T extends [infer Head, ...infer Tails] ? QueriesResults<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseQueryResult<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : {
|
||||
[K in keyof T]: GetUseQueryResult<T[K]>;
|
||||
};
|
||||
export { QueriesResults }
|
||||
export { QueriesResults as QueriesResults_alias_1 }
|
||||
|
||||
export { Query }
|
||||
|
||||
export { QueryCache }
|
||||
|
||||
export { QueryCacheNotifyEvent }
|
||||
|
||||
export { QueryClient }
|
||||
|
||||
export { QueryClientConfig }
|
||||
|
||||
declare const QueryClientContext: React_2.Context<QueryClient | undefined>;
|
||||
export { QueryClientContext }
|
||||
export { QueryClientContext as QueryClientContext_alias_1 }
|
||||
|
||||
declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => React_2.JSX.Element;
|
||||
export { QueryClientProvider }
|
||||
export { QueryClientProvider as QueryClientProvider_alias_1 }
|
||||
|
||||
declare type QueryClientProviderProps = {
|
||||
client: QueryClient;
|
||||
children?: React_2.ReactNode;
|
||||
};
|
||||
export { QueryClientProviderProps }
|
||||
export { QueryClientProviderProps as QueryClientProviderProps_alias_1 }
|
||||
|
||||
declare type QueryErrorClearResetFunction = () => void;
|
||||
export { QueryErrorClearResetFunction }
|
||||
export { QueryErrorClearResetFunction as QueryErrorClearResetFunction_alias_1 }
|
||||
|
||||
declare type QueryErrorIsResetFunction = () => boolean;
|
||||
export { QueryErrorIsResetFunction }
|
||||
export { QueryErrorIsResetFunction as QueryErrorIsResetFunction_alias_1 }
|
||||
|
||||
declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
|
||||
export { QueryErrorResetBoundary }
|
||||
export { QueryErrorResetBoundary as QueryErrorResetBoundary_alias_1 }
|
||||
|
||||
declare type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => React_2.ReactNode;
|
||||
export { QueryErrorResetBoundaryFunction }
|
||||
export { QueryErrorResetBoundaryFunction as QueryErrorResetBoundaryFunction_alias_1 }
|
||||
|
||||
declare interface QueryErrorResetBoundaryProps {
|
||||
children: QueryErrorResetBoundaryFunction | React_2.ReactNode;
|
||||
}
|
||||
export { QueryErrorResetBoundaryProps }
|
||||
export { QueryErrorResetBoundaryProps as QueryErrorResetBoundaryProps_alias_1 }
|
||||
|
||||
export declare interface QueryErrorResetBoundaryValue {
|
||||
clearReset: QueryErrorClearResetFunction;
|
||||
isReset: QueryErrorIsResetFunction;
|
||||
reset: QueryErrorResetFunction;
|
||||
}
|
||||
|
||||
declare type QueryErrorResetFunction = () => void;
|
||||
export { QueryErrorResetFunction }
|
||||
export { QueryErrorResetFunction as QueryErrorResetFunction_alias_1 }
|
||||
|
||||
export { QueryFilters }
|
||||
|
||||
export { QueryFunction }
|
||||
|
||||
export { QueryFunctionContext }
|
||||
|
||||
export { QueryKey }
|
||||
|
||||
export { QueryKeyHashFunction }
|
||||
|
||||
export { QueryMeta }
|
||||
|
||||
export { QueryObserver }
|
||||
|
||||
export { QueryObserverBaseResult }
|
||||
|
||||
export { QueryObserverLoadingErrorResult }
|
||||
|
||||
export { QueryObserverLoadingResult }
|
||||
|
||||
export { QueryObserverOptions }
|
||||
|
||||
export { QueryObserverPendingResult }
|
||||
|
||||
export { QueryObserverPlaceholderResult }
|
||||
|
||||
export { QueryObserverRefetchErrorResult }
|
||||
|
||||
export { QueryObserverResult }
|
||||
|
||||
export { QueryObserverSuccessResult }
|
||||
|
||||
export { QueryOptions }
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey>): UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
export { queryOptions }
|
||||
export { queryOptions as queryOptions_alias_1 }
|
||||
|
||||
export { QueryPersister }
|
||||
|
||||
export { QueryState }
|
||||
|
||||
export { QueryStatus }
|
||||
|
||||
export { RefetchOptions }
|
||||
|
||||
export { RefetchQueryFilters }
|
||||
|
||||
export { Register }
|
||||
|
||||
export { replaceEqualDeep }
|
||||
|
||||
export { ResetOptions }
|
||||
|
||||
export { ResultOptions }
|
||||
|
||||
export { SetDataOptions }
|
||||
|
||||
export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
|
||||
|
||||
export { shouldThrowError }
|
||||
|
||||
export { SkipToken }
|
||||
|
||||
export { skipToken }
|
||||
|
||||
declare type SkipTokenForUseQueries = symbol;
|
||||
|
||||
declare type SkipTokenForUseQueries_2 = symbol;
|
||||
|
||||
export { StaleTime }
|
||||
|
||||
export { StaleTimeFunction }
|
||||
|
||||
/**
|
||||
* SuspenseQueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
|
||||
*/
|
||||
declare type SuspenseQueriesOptions<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH_2 ? Array<UseSuspenseQueryOptions> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseSuspenseQueryOptions<Head>] : T extends [infer Head, ...infer Tails] ? SuspenseQueriesOptions<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseSuspenseQueryOptions<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : Array<unknown> extends T ? T : T extends Array<UseSuspenseQueryOptions<infer TQueryFnData, infer TError, infer TData, infer TQueryKey>> ? Array<UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>> : Array<UseSuspenseQueryOptions>;
|
||||
export { SuspenseQueriesOptions }
|
||||
export { SuspenseQueriesOptions as SuspenseQueriesOptions_alias_1 }
|
||||
|
||||
/**
|
||||
* SuspenseQueriesResults reducer recursively maps type param to results
|
||||
*/
|
||||
declare type SuspenseQueriesResults<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH_2 ? Array<UseSuspenseQueryResult> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseSuspenseQueryResult<Head>] : T extends [infer Head, ...infer Tails] ? SuspenseQueriesResults<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseSuspenseQueryResult<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : {
|
||||
[K in keyof T]: GetUseSuspenseQueryResult<T[K]>;
|
||||
};
|
||||
export { SuspenseQueriesResults }
|
||||
export { SuspenseQueriesResults as SuspenseQueriesResults_alias_1 }
|
||||
|
||||
export { ThrowOnError }
|
||||
|
||||
export { TimeoutCallback }
|
||||
|
||||
export { timeoutManager }
|
||||
|
||||
export { TimeoutProvider }
|
||||
|
||||
declare type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
|
||||
};
|
||||
export { UndefinedInitialDataInfiniteOptions }
|
||||
export { UndefinedInitialDataInfiniteOptions as UndefinedInitialDataInfiniteOptions_alias_1 }
|
||||
|
||||
declare type UndefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
initialData?: undefined | InitialDataFunction<NonUndefinedGuard<TQueryFnData>> | NonUndefinedGuard<TQueryFnData>;
|
||||
};
|
||||
export { UndefinedInitialDataOptions }
|
||||
export { UndefinedInitialDataOptions as UndefinedInitialDataOptions_alias_1 }
|
||||
|
||||
export { UnsetMarker }
|
||||
|
||||
export { unsetMarker }
|
||||
|
||||
declare type UnusedSkipTokenInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
|
||||
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken | undefined>;
|
||||
};
|
||||
export { UnusedSkipTokenInfiniteOptions }
|
||||
export { UnusedSkipTokenInfiniteOptions as UnusedSkipTokenInfiniteOptions_alias_1 }
|
||||
|
||||
declare type UnusedSkipTokenOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
|
||||
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken | undefined>;
|
||||
};
|
||||
export { UnusedSkipTokenOptions }
|
||||
export { UnusedSkipTokenOptions as UnusedSkipTokenOptions_alias_1 }
|
||||
|
||||
export { Updater }
|
||||
|
||||
declare type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
|
||||
mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
}> & {
|
||||
mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
};
|
||||
export { UseBaseMutationResult }
|
||||
export { UseBaseMutationResult as UseBaseMutationResult_alias_1 }
|
||||
|
||||
export declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, Observer: typeof QueryObserver, queryClient?: QueryClient): QueryObserverResult<TData, TError>;
|
||||
|
||||
declare interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
||||
/**
|
||||
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
subscribed?: boolean;
|
||||
}
|
||||
export { UseBaseQueryOptions }
|
||||
export { UseBaseQueryOptions as UseBaseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
||||
export { UseBaseQueryResult }
|
||||
export { UseBaseQueryResult as UseBaseQueryResult_alias_1 }
|
||||
|
||||
export declare const useClearResetErrorBoundary: (errorResetBoundary: QueryErrorResetBoundaryValue) => void;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): DefinedUseInfiniteQueryResult<TData, TError>;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
|
||||
export { useInfiniteQuery }
|
||||
export { useInfiniteQuery as useInfiniteQuery_alias_1 }
|
||||
|
||||
declare interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
||||
/**
|
||||
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
subscribed?: boolean;
|
||||
}
|
||||
export { UseInfiniteQueryOptions }
|
||||
export { UseInfiniteQueryOptions as UseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
|
||||
export { UseInfiniteQueryResult }
|
||||
export { UseInfiniteQueryResult as UseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare function useIsFetching(filters?: QueryFilters, queryClient?: QueryClient): number;
|
||||
export { useIsFetching }
|
||||
export { useIsFetching as useIsFetching_alias_1 }
|
||||
|
||||
declare function useIsMutating(filters?: MutationFilters, queryClient?: QueryClient): number;
|
||||
export { useIsMutating }
|
||||
export { useIsMutating as useIsMutating_alias_1 }
|
||||
|
||||
declare const useIsRestoring: () => boolean;
|
||||
export { useIsRestoring }
|
||||
export { useIsRestoring as useIsRestoring_alias_1 }
|
||||
|
||||
declare type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = MutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { UseMutateAsyncFunction }
|
||||
export { UseMutateAsyncFunction as UseMutateAsyncFunction_alias_1 }
|
||||
|
||||
declare type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TOnMutateResult>>) => void;
|
||||
export { UseMutateFunction }
|
||||
export { UseMutateFunction as UseMutateFunction_alias_1 }
|
||||
|
||||
declare function useMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, queryClient?: QueryClient): UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { useMutation }
|
||||
export { useMutation as useMutation_alias_1 }
|
||||
|
||||
declare interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted'> {
|
||||
}
|
||||
export { UseMutationOptions }
|
||||
export { UseMutationOptions as UseMutationOptions_alias_1 }
|
||||
|
||||
declare type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { UseMutationResult }
|
||||
export { UseMutationResult as UseMutationResult_alias_1 }
|
||||
|
||||
declare function useMutationState<TResult = MutationState>(options?: MutationStateOptions<TResult>, queryClient?: QueryClient): Array<TResult>;
|
||||
export { useMutationState }
|
||||
export { useMutationState as useMutationState_alias_1 }
|
||||
|
||||
declare function usePrefetchInfiniteQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): void;
|
||||
export { usePrefetchInfiniteQuery }
|
||||
export { usePrefetchInfiniteQuery as usePrefetchInfiniteQuery_alias_1 }
|
||||
|
||||
declare function usePrefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UsePrefetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): void;
|
||||
export { usePrefetchQuery }
|
||||
export { usePrefetchQuery as usePrefetchQuery_alias_1 }
|
||||
|
||||
declare interface UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> {
|
||||
queryFn?: Exclude<FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UsePrefetchQueryOptions }
|
||||
export { UsePrefetchQueryOptions as UsePrefetchQueryOptions_alias_1 }
|
||||
|
||||
declare function useQueries<T extends Array<any>, TCombinedResult = QueriesResults<T>>({ queries, ...options }: {
|
||||
queries: readonly [...QueriesOptions<T>] | readonly [...{
|
||||
[K in keyof T]: GetUseQueryOptionsForUseQueries<T[K]>;
|
||||
}];
|
||||
combine?: (result: QueriesResults<T>) => TCombinedResult;
|
||||
subscribed?: boolean;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
export { useQueries }
|
||||
export { useQueries as useQueries_alias_1 }
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): DefinedUseQueryResult<NoInfer_2<TData>, TError>;
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer_2<TData>, TError>;
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer_2<TData>, TError>;
|
||||
export { useQuery }
|
||||
export { useQuery as useQuery_alias_1 }
|
||||
|
||||
declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
|
||||
export { useQueryClient }
|
||||
export { useQueryClient as useQueryClient_alias_1 }
|
||||
|
||||
declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
|
||||
export { useQueryErrorResetBoundary }
|
||||
export { useQueryErrorResetBoundary as useQueryErrorResetBoundary_alias_1 }
|
||||
|
||||
declare interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {
|
||||
}
|
||||
export { UseQueryOptions }
|
||||
export { UseQueryOptions as UseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'placeholderData' | 'subscribed'> & {
|
||||
placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
|
||||
};
|
||||
|
||||
declare type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
|
||||
export { UseQueryResult }
|
||||
export { UseQueryResult as UseQueryResult_alias_1 }
|
||||
|
||||
declare function useSuspenseInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseSuspenseInfiniteQueryResult<TData, TError>;
|
||||
export { useSuspenseInfiniteQuery }
|
||||
export { useSuspenseInfiniteQuery as useSuspenseInfiniteQuery_alias_1 }
|
||||
|
||||
declare interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
||||
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UseSuspenseInfiniteQueryOptions }
|
||||
export { UseSuspenseInfiniteQueryOptions as UseSuspenseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type UseSuspenseInfiniteQueryResult<TData = unknown, TError = DefaultError> = OmitKeyof<DefinedInfiniteQueryObserverResult<TData, TError>, 'isPlaceholderData' | 'promise'>;
|
||||
export { UseSuspenseInfiniteQueryResult }
|
||||
export { UseSuspenseInfiniteQueryResult as UseSuspenseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare function useSuspenseQueries<T extends Array<any>, TCombinedResult = SuspenseQueriesResults<T>>(options: {
|
||||
queries: readonly [...SuspenseQueriesOptions<T>] | readonly [...{
|
||||
[K in keyof T]: GetUseSuspenseQueryOptions<T[K]>;
|
||||
}];
|
||||
combine?: (result: SuspenseQueriesResults<T>) => TCombinedResult;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
|
||||
declare function useSuspenseQueries<T extends Array<any>, TCombinedResult = SuspenseQueriesResults<T>>(options: {
|
||||
queries: readonly [...SuspenseQueriesOptions<T>];
|
||||
combine?: (result: SuspenseQueriesResults<T>) => TCombinedResult;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
export { useSuspenseQueries }
|
||||
export { useSuspenseQueries as useSuspenseQueries_alias_1 }
|
||||
|
||||
declare function useSuspenseQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError>;
|
||||
export { useSuspenseQuery }
|
||||
export { useSuspenseQuery as useSuspenseQuery_alias_1 }
|
||||
|
||||
declare interface UseSuspenseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
||||
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UseSuspenseQueryOptions }
|
||||
export { UseSuspenseQueryOptions as UseSuspenseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = DistributiveOmit<DefinedQueryObserverResult<TData, TError>, 'isPlaceholderData' | 'promise'>;
|
||||
export { UseSuspenseQueryResult }
|
||||
export { UseSuspenseQueryResult as UseSuspenseQueryResult_alias_1 }
|
||||
|
||||
export declare const willFetch: (result: QueryObserverResult<any, any>, isRestoring: boolean) => boolean;
|
||||
|
||||
export { WithRequired }
|
||||
|
||||
export { }
|
||||
950
node_modules/@tanstack/react-query/build/legacy/_tsup-dts-rollup.d.ts
generated
vendored
Executable file
950
node_modules/@tanstack/react-query/build/legacy/_tsup-dts-rollup.d.ts
generated
vendored
Executable file
@@ -0,0 +1,950 @@
|
||||
import { AnyDataTag } from '@tanstack/query-core';
|
||||
import { CancelledError } from '@tanstack/query-core';
|
||||
import { CancelOptions } from '@tanstack/query-core';
|
||||
import { DataTag } from '@tanstack/query-core';
|
||||
import { dataTagErrorSymbol } from '@tanstack/query-core';
|
||||
import { dataTagSymbol } from '@tanstack/query-core';
|
||||
import { DefaultedInfiniteQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { DefaultedQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { DefaultError } from '@tanstack/query-core';
|
||||
import { DefaultOptions } from '@tanstack/query-core';
|
||||
import { defaultScheduler } from '@tanstack/query-core';
|
||||
import { defaultShouldDehydrateMutation } from '@tanstack/query-core';
|
||||
import { defaultShouldDehydrateQuery } from '@tanstack/query-core';
|
||||
import { DefinedInfiniteQueryObserverResult } from '@tanstack/query-core';
|
||||
import { DefinedQueryObserverResult } from '@tanstack/query-core';
|
||||
import { dehydrate } from '@tanstack/query-core';
|
||||
import { DehydratedState } from '@tanstack/query-core';
|
||||
import { DehydrateOptions } from '@tanstack/query-core';
|
||||
import { DistributiveOmit } from '@tanstack/query-core';
|
||||
import { Enabled } from '@tanstack/query-core';
|
||||
import { EnsureInfiniteQueryDataOptions } from '@tanstack/query-core';
|
||||
import { EnsureQueryDataOptions } from '@tanstack/query-core';
|
||||
import { environmentManager } from '@tanstack/query-core';
|
||||
import { experimental_streamedQuery } from '@tanstack/query-core';
|
||||
import { FetchInfiniteQueryOptions } from '@tanstack/query-core';
|
||||
import { FetchNextPageOptions } from '@tanstack/query-core';
|
||||
import { FetchPreviousPageOptions } from '@tanstack/query-core';
|
||||
import { FetchQueryOptions } from '@tanstack/query-core';
|
||||
import { FetchStatus } from '@tanstack/query-core';
|
||||
import { focusManager } from '@tanstack/query-core';
|
||||
import { GetNextPageParamFunction } from '@tanstack/query-core';
|
||||
import { GetPreviousPageParamFunction } from '@tanstack/query-core';
|
||||
import { hashKey } from '@tanstack/query-core';
|
||||
import { hydrate } from '@tanstack/query-core';
|
||||
import { HydrateOptions } from '@tanstack/query-core';
|
||||
import { InferDataFromTag } from '@tanstack/query-core';
|
||||
import { InferErrorFromTag } from '@tanstack/query-core';
|
||||
import { InfiniteData } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserver } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverBaseResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverLoadingErrorResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverOptions } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverPendingResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverPlaceholderResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverRefetchErrorResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { InfiniteQueryPageParamsOptions } from '@tanstack/query-core';
|
||||
import { InitialDataFunction } from '@tanstack/query-core';
|
||||
import { InitialPageParam } from '@tanstack/query-core';
|
||||
import { InvalidateOptions } from '@tanstack/query-core';
|
||||
import { InvalidateQueryFilters } from '@tanstack/query-core';
|
||||
import { isCancelledError } from '@tanstack/query-core';
|
||||
import { isServer } from '@tanstack/query-core';
|
||||
import { JSX } from 'react/jsx-runtime';
|
||||
import { keepPreviousData } from '@tanstack/query-core';
|
||||
import { ManagedTimerId } from '@tanstack/query-core';
|
||||
import { matchMutation } from '@tanstack/query-core';
|
||||
import { matchQuery } from '@tanstack/query-core';
|
||||
import { MutateFunction } from '@tanstack/query-core';
|
||||
import { MutateOptions } from '@tanstack/query-core';
|
||||
import { Mutation } from '@tanstack/query-core';
|
||||
import { MutationCache } from '@tanstack/query-core';
|
||||
import { MutationCacheNotifyEvent } from '@tanstack/query-core';
|
||||
import { MutationFilters } from '@tanstack/query-core';
|
||||
import { MutationFunction } from '@tanstack/query-core';
|
||||
import { MutationFunctionContext } from '@tanstack/query-core';
|
||||
import { MutationKey } from '@tanstack/query-core';
|
||||
import { MutationMeta } from '@tanstack/query-core';
|
||||
import { MutationObserver as MutationObserver_2 } from '@tanstack/query-core';
|
||||
import { MutationObserverBaseResult } from '@tanstack/query-core';
|
||||
import { MutationObserverErrorResult } from '@tanstack/query-core';
|
||||
import { MutationObserverIdleResult } from '@tanstack/query-core';
|
||||
import { MutationObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { MutationObserverOptions } from '@tanstack/query-core';
|
||||
import { MutationObserverResult } from '@tanstack/query-core';
|
||||
import { MutationObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { MutationOptions } from '@tanstack/query-core';
|
||||
import { MutationScope } from '@tanstack/query-core';
|
||||
import { MutationState } from '@tanstack/query-core';
|
||||
import { MutationStatus } from '@tanstack/query-core';
|
||||
import { NetworkMode } from '@tanstack/query-core';
|
||||
import { NoInfer as NoInfer_2 } from '@tanstack/query-core';
|
||||
import { NonUndefinedGuard } from '@tanstack/query-core';
|
||||
import { noop } from '@tanstack/query-core';
|
||||
import { NotifyEvent } from '@tanstack/query-core';
|
||||
import { NotifyEventType } from '@tanstack/query-core';
|
||||
import { notifyManager } from '@tanstack/query-core';
|
||||
import { NotifyOnChangeProps } from '@tanstack/query-core';
|
||||
import { OmitKeyof } from '@tanstack/query-core';
|
||||
import { onlineManager } from '@tanstack/query-core';
|
||||
import { Override } from '@tanstack/query-core';
|
||||
import { partialMatchKey } from '@tanstack/query-core';
|
||||
import { PlaceholderDataFunction } from '@tanstack/query-core';
|
||||
import { QueriesObserver } from '@tanstack/query-core';
|
||||
import { QueriesObserverOptions } from '@tanstack/query-core';
|
||||
import { QueriesPlaceholderDataFunction } from '@tanstack/query-core';
|
||||
import { Query } from '@tanstack/query-core';
|
||||
import { QueryCache } from '@tanstack/query-core';
|
||||
import { QueryCacheNotifyEvent } from '@tanstack/query-core';
|
||||
import { QueryClient } from '@tanstack/query-core';
|
||||
import { QueryClientConfig } from '@tanstack/query-core';
|
||||
import { QueryFilters } from '@tanstack/query-core';
|
||||
import { QueryFunction } from '@tanstack/query-core';
|
||||
import { QueryFunctionContext } from '@tanstack/query-core';
|
||||
import { QueryKey } from '@tanstack/query-core';
|
||||
import { QueryKeyHashFunction } from '@tanstack/query-core';
|
||||
import { QueryMeta } from '@tanstack/query-core';
|
||||
import { QueryObserver } from '@tanstack/query-core';
|
||||
import { QueryObserverBaseResult } from '@tanstack/query-core';
|
||||
import { QueryObserverLoadingErrorResult } from '@tanstack/query-core';
|
||||
import { QueryObserverLoadingResult } from '@tanstack/query-core';
|
||||
import { QueryObserverOptions } from '@tanstack/query-core';
|
||||
import { QueryObserverPendingResult } from '@tanstack/query-core';
|
||||
import { QueryObserverPlaceholderResult } from '@tanstack/query-core';
|
||||
import { QueryObserverRefetchErrorResult } from '@tanstack/query-core';
|
||||
import { QueryObserverResult } from '@tanstack/query-core';
|
||||
import { QueryObserverSuccessResult } from '@tanstack/query-core';
|
||||
import { QueryOptions } from '@tanstack/query-core';
|
||||
import { QueryPersister } from '@tanstack/query-core';
|
||||
import { QueryState } from '@tanstack/query-core';
|
||||
import { QueryStatus } from '@tanstack/query-core';
|
||||
import * as React_2 from 'react';
|
||||
import { RefetchOptions } from '@tanstack/query-core';
|
||||
import { RefetchQueryFilters } from '@tanstack/query-core';
|
||||
import { Register } from '@tanstack/query-core';
|
||||
import { replaceEqualDeep } from '@tanstack/query-core';
|
||||
import { ResetOptions } from '@tanstack/query-core';
|
||||
import { ResultOptions } from '@tanstack/query-core';
|
||||
import { SetDataOptions } from '@tanstack/query-core';
|
||||
import { shouldThrowError } from '@tanstack/query-core';
|
||||
import { SkipToken } from '@tanstack/query-core';
|
||||
import { skipToken } from '@tanstack/query-core';
|
||||
import { StaleTime } from '@tanstack/query-core';
|
||||
import { StaleTimeFunction } from '@tanstack/query-core';
|
||||
import { ThrowOnError } from '@tanstack/query-core';
|
||||
import { TimeoutCallback } from '@tanstack/query-core';
|
||||
import { timeoutManager } from '@tanstack/query-core';
|
||||
import { TimeoutProvider } from '@tanstack/query-core';
|
||||
import { UnsetMarker } from '@tanstack/query-core';
|
||||
import { unsetMarker } from '@tanstack/query-core';
|
||||
import { Updater } from '@tanstack/query-core';
|
||||
import { WithRequired } from '@tanstack/query-core';
|
||||
|
||||
export { AnyDataTag }
|
||||
|
||||
declare type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseBaseQueryOptions }
|
||||
export { AnyUseBaseQueryOptions as AnyUseBaseQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseInfiniteQueryOptions }
|
||||
export { AnyUseInfiniteQueryOptions as AnyUseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
||||
export { AnyUseMutationOptions }
|
||||
export { AnyUseMutationOptions as AnyUseMutationOptions_alias_1 }
|
||||
|
||||
declare type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
||||
export { AnyUseQueryOptions }
|
||||
export { AnyUseQueryOptions as AnyUseQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions<any, any, any, any, any>;
|
||||
export { AnyUseSuspenseInfiniteQueryOptions }
|
||||
export { AnyUseSuspenseInfiniteQueryOptions as AnyUseSuspenseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any, any>;
|
||||
export { AnyUseSuspenseQueryOptions }
|
||||
export { AnyUseSuspenseQueryOptions as AnyUseSuspenseQueryOptions_alias_1 }
|
||||
|
||||
export { CancelledError }
|
||||
|
||||
export { CancelOptions }
|
||||
|
||||
export { DataTag }
|
||||
|
||||
export { dataTagErrorSymbol }
|
||||
|
||||
export { dataTagSymbol }
|
||||
|
||||
export { DefaultedInfiniteQueryObserverOptions }
|
||||
|
||||
export { DefaultedQueryObserverOptions }
|
||||
|
||||
export { DefaultError }
|
||||
|
||||
export { DefaultOptions }
|
||||
|
||||
export { defaultScheduler }
|
||||
|
||||
export { defaultShouldDehydrateMutation }
|
||||
|
||||
export { defaultShouldDehydrateQuery }
|
||||
|
||||
export declare const defaultThrowOnError: <TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(_error: TError, query: Query<TQueryFnData, TError, TData, TQueryKey>) => boolean;
|
||||
|
||||
export { DefinedInfiniteQueryObserverResult }
|
||||
|
||||
declare type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>) | undefined;
|
||||
};
|
||||
export { DefinedInitialDataInfiniteOptions }
|
||||
export { DefinedInitialDataInfiniteOptions as DefinedInitialDataInfiniteOptions_alias_1 }
|
||||
|
||||
declare type DefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
|
||||
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
||||
queryFn?: QueryFunction<TQueryFnData, TQueryKey>;
|
||||
};
|
||||
export { DefinedInitialDataOptions }
|
||||
export { DefinedInitialDataOptions as DefinedInitialDataOptions_alias_1 }
|
||||
|
||||
export { DefinedQueryObserverResult }
|
||||
|
||||
declare type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
|
||||
export { DefinedUseInfiniteQueryResult }
|
||||
export { DefinedUseInfiniteQueryResult as DefinedUseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
|
||||
export { DefinedUseQueryResult }
|
||||
export { DefinedUseQueryResult as DefinedUseQueryResult_alias_1 }
|
||||
|
||||
export { dehydrate }
|
||||
|
||||
export { DehydratedState }
|
||||
|
||||
export { DehydrateOptions }
|
||||
|
||||
export { DistributiveOmit }
|
||||
|
||||
export { Enabled }
|
||||
|
||||
export { EnsureInfiniteQueryDataOptions }
|
||||
|
||||
export declare const ensurePreventErrorBoundaryRetry: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue, query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined) => void;
|
||||
|
||||
export { EnsureQueryDataOptions }
|
||||
|
||||
export declare const ensureSuspenseTimers: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>) => void;
|
||||
|
||||
export { environmentManager }
|
||||
|
||||
export { experimental_streamedQuery }
|
||||
|
||||
export { FetchInfiniteQueryOptions }
|
||||
|
||||
export { FetchNextPageOptions }
|
||||
|
||||
export declare const fetchOptimistic: <TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(defaultedOptions: DefaultedQueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>, errorResetBoundary: QueryErrorResetBoundaryValue) => Promise<void | QueryObserverResult<TData, TError>>;
|
||||
|
||||
export { FetchPreviousPageOptions }
|
||||
|
||||
export { FetchQueryOptions }
|
||||
|
||||
export { FetchStatus }
|
||||
|
||||
export { focusManager }
|
||||
|
||||
declare type GetDefinedOrUndefinedQueryResult<T, TData, TError = unknown> = T extends {
|
||||
initialData?: infer TInitialData;
|
||||
} ? unknown extends TInitialData ? UseQueryResult<TData, TError> : TInitialData extends TData ? DefinedUseQueryResult<TData, TError> : TInitialData extends () => infer TInitialDataResult ? unknown extends TInitialDataResult ? UseQueryResult<TData, TError> : TInitialDataResult extends TData ? DefinedUseQueryResult<TData, TError> : UseQueryResult<TData, TError> : UseQueryResult<TData, TError> : UseQueryResult<TData, TError>;
|
||||
|
||||
export declare const getHasError: <TData, TError, TQueryFnData, TQueryData, TQueryKey extends QueryKey>({ result, errorResetBoundary, throwOnError, query, suspense, }: {
|
||||
result: QueryObserverResult<TData, TError>;
|
||||
errorResetBoundary: QueryErrorResetBoundaryValue;
|
||||
throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>;
|
||||
query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined;
|
||||
suspense: boolean | undefined;
|
||||
}) => boolean | undefined;
|
||||
|
||||
export { GetNextPageParamFunction }
|
||||
|
||||
export { GetPreviousPageParamFunction }
|
||||
|
||||
declare type GetUseQueryOptionsForUseQueries<T> = T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, TError, TData> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseQueryOptionsForUseQueries<unknown, TError, TData> : T extends [infer TQueryFnData, infer TError, infer TData] ? UseQueryOptionsForUseQueries<TQueryFnData, TError, TData> : T extends [infer TQueryFnData, infer TError] ? UseQueryOptionsForUseQueries<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseQueryOptionsForUseQueries<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseQueryOptionsForUseQueries<TQueryFnData, unknown extends TError ? DefaultError : TError, unknown extends TData ? TQueryFnData : TData, TQueryKey> : UseQueryOptionsForUseQueries;
|
||||
|
||||
declare type GetUseQueryResult<T> = T extends {
|
||||
queryFnData: any;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends [any, infer TError, infer TData] ? GetDefinedOrUndefinedQueryResult<T, TData, TError> : T extends [infer TQueryFnData, infer TError] ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData, TError> : T extends [infer TQueryFnData] ? GetDefinedOrUndefinedQueryResult<T, TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? GetDefinedOrUndefinedQueryResult<T, unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError> : UseQueryResult;
|
||||
|
||||
declare type GetUseSuspenseQueryOptions<T> = T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TData> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryOptions<unknown, TError, TData> : T extends [infer TQueryFnData, infer TError, infer TData] ? UseSuspenseQueryOptions<TQueryFnData, TError, TData> : T extends [infer TQueryFnData, infer TError] ? UseSuspenseQueryOptions<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseSuspenseQueryOptions<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries_2;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries_2;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryOptions<TQueryFnData, TError, TQueryFnData, TQueryKey> : UseSuspenseQueryOptions;
|
||||
|
||||
declare type GetUseSuspenseQueryResult<T> = T extends {
|
||||
queryFnData: any;
|
||||
error?: infer TError;
|
||||
data: infer TData;
|
||||
} ? UseSuspenseQueryResult<TData, TError> : T extends {
|
||||
queryFnData: infer TQueryFnData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryResult<TQueryFnData, TError> : T extends {
|
||||
data: infer TData;
|
||||
error?: infer TError;
|
||||
} ? UseSuspenseQueryResult<TData, TError> : T extends [any, infer TError, infer TData] ? UseSuspenseQueryResult<TData, TError> : T extends [infer TQueryFnData, infer TError] ? UseSuspenseQueryResult<TQueryFnData, TError> : T extends [infer TQueryFnData] ? UseSuspenseQueryResult<TQueryFnData> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries_2;
|
||||
select?: (data: any) => infer TData;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryResult<unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError> : T extends {
|
||||
queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries_2;
|
||||
throwOnError?: ThrowOnError<any, infer TError, any, any>;
|
||||
} ? UseSuspenseQueryResult<TQueryFnData, unknown extends TError ? DefaultError : TError> : UseSuspenseQueryResult;
|
||||
|
||||
export { hashKey }
|
||||
|
||||
export { hydrate }
|
||||
|
||||
export { HydrateOptions }
|
||||
|
||||
declare const HydrationBoundary: ({ children, options, state, queryClient, }: HydrationBoundaryProps) => React_2.ReactElement;
|
||||
export { HydrationBoundary }
|
||||
export { HydrationBoundary as HydrationBoundary_alias_1 }
|
||||
|
||||
declare interface HydrationBoundaryProps {
|
||||
state: DehydratedState | null | undefined;
|
||||
options?: OmitKeyof<HydrateOptions, 'defaultOptions'> & {
|
||||
defaultOptions?: OmitKeyof<Exclude<HydrateOptions['defaultOptions'], undefined>, 'mutations'>;
|
||||
};
|
||||
children?: React_2.ReactNode;
|
||||
queryClient?: QueryClient;
|
||||
}
|
||||
export { HydrationBoundaryProps }
|
||||
export { HydrationBoundaryProps as HydrationBoundaryProps_alias_1 }
|
||||
|
||||
export { InferDataFromTag }
|
||||
|
||||
export { InferErrorFromTag }
|
||||
|
||||
export { InfiniteData }
|
||||
|
||||
export { InfiniteQueryObserver }
|
||||
|
||||
export { InfiniteQueryObserverBaseResult }
|
||||
|
||||
export { InfiniteQueryObserverLoadingErrorResult }
|
||||
|
||||
export { InfiniteQueryObserverLoadingResult }
|
||||
|
||||
export { InfiniteQueryObserverOptions }
|
||||
|
||||
export { InfiniteQueryObserverPendingResult }
|
||||
|
||||
export { InfiniteQueryObserverPlaceholderResult }
|
||||
|
||||
export { InfiniteQueryObserverRefetchErrorResult }
|
||||
|
||||
export { InfiniteQueryObserverResult }
|
||||
|
||||
export { InfiniteQueryObserverSuccessResult }
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
|
||||
declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
|
||||
};
|
||||
export { infiniteQueryOptions }
|
||||
export { infiniteQueryOptions as infiniteQueryOptions_alias_1 }
|
||||
|
||||
export { InfiniteQueryPageParamsOptions }
|
||||
|
||||
export { InitialDataFunction }
|
||||
|
||||
export { InitialPageParam }
|
||||
|
||||
export { InvalidateOptions }
|
||||
|
||||
export { InvalidateQueryFilters }
|
||||
|
||||
export { isCancelledError }
|
||||
|
||||
declare const IsRestoringProvider: React_2.Provider<boolean>;
|
||||
export { IsRestoringProvider }
|
||||
export { IsRestoringProvider as IsRestoringProvider_alias_1 }
|
||||
|
||||
export { isServer }
|
||||
|
||||
export { keepPreviousData }
|
||||
|
||||
export { ManagedTimerId }
|
||||
|
||||
export { matchMutation }
|
||||
|
||||
export { matchQuery }
|
||||
|
||||
declare type MAXIMUM_DEPTH = 20;
|
||||
|
||||
declare type MAXIMUM_DEPTH_2 = 20;
|
||||
|
||||
export { MutateFunction }
|
||||
|
||||
export { MutateOptions }
|
||||
|
||||
export { Mutation }
|
||||
|
||||
export { MutationCache }
|
||||
|
||||
export { MutationCacheNotifyEvent }
|
||||
|
||||
export { MutationFilters }
|
||||
|
||||
export { MutationFunction }
|
||||
|
||||
export { MutationFunctionContext }
|
||||
|
||||
export { MutationKey }
|
||||
|
||||
export { MutationMeta }
|
||||
|
||||
export { MutationObserver_2 as MutationObserver }
|
||||
|
||||
export { MutationObserverBaseResult }
|
||||
|
||||
export { MutationObserverErrorResult }
|
||||
|
||||
export { MutationObserverIdleResult }
|
||||
|
||||
export { MutationObserverLoadingResult }
|
||||
|
||||
export { MutationObserverOptions }
|
||||
|
||||
export { MutationObserverResult }
|
||||
|
||||
export { MutationObserverSuccessResult }
|
||||
|
||||
export { MutationOptions }
|
||||
|
||||
declare function mutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: WithRequired<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>): WithRequired<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>;
|
||||
|
||||
declare function mutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: Omit<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>): Omit<UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, 'mutationKey'>;
|
||||
export { mutationOptions }
|
||||
export { mutationOptions as mutationOptions_alias_1 }
|
||||
|
||||
export { MutationScope }
|
||||
|
||||
export { MutationState }
|
||||
|
||||
declare type MutationStateOptions<TResult = MutationState> = {
|
||||
filters?: MutationFilters;
|
||||
select?: (mutation: Mutation) => TResult;
|
||||
};
|
||||
|
||||
export { MutationStatus }
|
||||
|
||||
export { NetworkMode }
|
||||
|
||||
export { NoInfer_2 as NoInfer }
|
||||
|
||||
export { NonUndefinedGuard }
|
||||
|
||||
export { noop }
|
||||
|
||||
export { NotifyEvent }
|
||||
|
||||
export { NotifyEventType }
|
||||
|
||||
export { notifyManager }
|
||||
|
||||
export { NotifyOnChangeProps }
|
||||
|
||||
export { OmitKeyof }
|
||||
|
||||
export { onlineManager }
|
||||
|
||||
export { Override }
|
||||
|
||||
export { partialMatchKey }
|
||||
|
||||
export { PlaceholderDataFunction }
|
||||
|
||||
export { QueriesObserver }
|
||||
|
||||
export { QueriesObserverOptions }
|
||||
|
||||
/**
|
||||
* QueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
|
||||
*/
|
||||
declare type QueriesOptions<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<UseQueryOptionsForUseQueries> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseQueryOptionsForUseQueries<Head>] : T extends [infer Head, ...infer Tails] ? QueriesOptions<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseQueryOptionsForUseQueries<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : ReadonlyArray<unknown> extends T ? T : T extends Array<UseQueryOptionsForUseQueries<infer TQueryFnData, infer TError, infer TData, infer TQueryKey>> ? Array<UseQueryOptionsForUseQueries<TQueryFnData, TError, TData, TQueryKey>> : Array<UseQueryOptionsForUseQueries>;
|
||||
export { QueriesOptions }
|
||||
export { QueriesOptions as QueriesOptions_alias_1 }
|
||||
|
||||
export { QueriesPlaceholderDataFunction }
|
||||
|
||||
/**
|
||||
* QueriesResults reducer recursively maps type param to results
|
||||
*/
|
||||
declare type QueriesResults<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<UseQueryResult> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseQueryResult<Head>] : T extends [infer Head, ...infer Tails] ? QueriesResults<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseQueryResult<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : {
|
||||
[K in keyof T]: GetUseQueryResult<T[K]>;
|
||||
};
|
||||
export { QueriesResults }
|
||||
export { QueriesResults as QueriesResults_alias_1 }
|
||||
|
||||
export { Query }
|
||||
|
||||
export { QueryCache }
|
||||
|
||||
export { QueryCacheNotifyEvent }
|
||||
|
||||
export { QueryClient }
|
||||
|
||||
export { QueryClientConfig }
|
||||
|
||||
declare const QueryClientContext: React_2.Context<QueryClient | undefined>;
|
||||
export { QueryClientContext }
|
||||
export { QueryClientContext as QueryClientContext_alias_1 }
|
||||
|
||||
declare const QueryClientProvider: ({ client, children, }: QueryClientProviderProps) => React_2.JSX.Element;
|
||||
export { QueryClientProvider }
|
||||
export { QueryClientProvider as QueryClientProvider_alias_1 }
|
||||
|
||||
declare type QueryClientProviderProps = {
|
||||
client: QueryClient;
|
||||
children?: React_2.ReactNode;
|
||||
};
|
||||
export { QueryClientProviderProps }
|
||||
export { QueryClientProviderProps as QueryClientProviderProps_alias_1 }
|
||||
|
||||
declare type QueryErrorClearResetFunction = () => void;
|
||||
export { QueryErrorClearResetFunction }
|
||||
export { QueryErrorClearResetFunction as QueryErrorClearResetFunction_alias_1 }
|
||||
|
||||
declare type QueryErrorIsResetFunction = () => boolean;
|
||||
export { QueryErrorIsResetFunction }
|
||||
export { QueryErrorIsResetFunction as QueryErrorIsResetFunction_alias_1 }
|
||||
|
||||
declare const QueryErrorResetBoundary: ({ children, }: QueryErrorResetBoundaryProps) => JSX.Element;
|
||||
export { QueryErrorResetBoundary }
|
||||
export { QueryErrorResetBoundary as QueryErrorResetBoundary_alias_1 }
|
||||
|
||||
declare type QueryErrorResetBoundaryFunction = (value: QueryErrorResetBoundaryValue) => React_2.ReactNode;
|
||||
export { QueryErrorResetBoundaryFunction }
|
||||
export { QueryErrorResetBoundaryFunction as QueryErrorResetBoundaryFunction_alias_1 }
|
||||
|
||||
declare interface QueryErrorResetBoundaryProps {
|
||||
children: QueryErrorResetBoundaryFunction | React_2.ReactNode;
|
||||
}
|
||||
export { QueryErrorResetBoundaryProps }
|
||||
export { QueryErrorResetBoundaryProps as QueryErrorResetBoundaryProps_alias_1 }
|
||||
|
||||
export declare interface QueryErrorResetBoundaryValue {
|
||||
clearReset: QueryErrorClearResetFunction;
|
||||
isReset: QueryErrorIsResetFunction;
|
||||
reset: QueryErrorResetFunction;
|
||||
}
|
||||
|
||||
declare type QueryErrorResetFunction = () => void;
|
||||
export { QueryErrorResetFunction }
|
||||
export { QueryErrorResetFunction as QueryErrorResetFunction_alias_1 }
|
||||
|
||||
export { QueryFilters }
|
||||
|
||||
export { QueryFunction }
|
||||
|
||||
export { QueryFunctionContext }
|
||||
|
||||
export { QueryKey }
|
||||
|
||||
export { QueryKeyHashFunction }
|
||||
|
||||
export { QueryMeta }
|
||||
|
||||
export { QueryObserver }
|
||||
|
||||
export { QueryObserverBaseResult }
|
||||
|
||||
export { QueryObserverLoadingErrorResult }
|
||||
|
||||
export { QueryObserverLoadingResult }
|
||||
|
||||
export { QueryObserverOptions }
|
||||
|
||||
export { QueryObserverPendingResult }
|
||||
|
||||
export { QueryObserverPlaceholderResult }
|
||||
|
||||
export { QueryObserverRefetchErrorResult }
|
||||
|
||||
export { QueryObserverResult }
|
||||
|
||||
export { QueryObserverSuccessResult }
|
||||
|
||||
export { QueryOptions }
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey>): UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
|
||||
declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
|
||||
};
|
||||
export { queryOptions }
|
||||
export { queryOptions as queryOptions_alias_1 }
|
||||
|
||||
export { QueryPersister }
|
||||
|
||||
export { QueryState }
|
||||
|
||||
export { QueryStatus }
|
||||
|
||||
export { RefetchOptions }
|
||||
|
||||
export { RefetchQueryFilters }
|
||||
|
||||
export { Register }
|
||||
|
||||
export { replaceEqualDeep }
|
||||
|
||||
export { ResetOptions }
|
||||
|
||||
export { ResultOptions }
|
||||
|
||||
export { SetDataOptions }
|
||||
|
||||
export declare const shouldSuspend: (defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any> | undefined, result: QueryObserverResult<any, any>) => boolean | undefined;
|
||||
|
||||
export { shouldThrowError }
|
||||
|
||||
export { SkipToken }
|
||||
|
||||
export { skipToken }
|
||||
|
||||
declare type SkipTokenForUseQueries = symbol;
|
||||
|
||||
declare type SkipTokenForUseQueries_2 = symbol;
|
||||
|
||||
export { StaleTime }
|
||||
|
||||
export { StaleTimeFunction }
|
||||
|
||||
/**
|
||||
* SuspenseQueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
|
||||
*/
|
||||
declare type SuspenseQueriesOptions<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH_2 ? Array<UseSuspenseQueryOptions> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseSuspenseQueryOptions<Head>] : T extends [infer Head, ...infer Tails] ? SuspenseQueriesOptions<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseSuspenseQueryOptions<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : Array<unknown> extends T ? T : T extends Array<UseSuspenseQueryOptions<infer TQueryFnData, infer TError, infer TData, infer TQueryKey>> ? Array<UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>> : Array<UseSuspenseQueryOptions>;
|
||||
export { SuspenseQueriesOptions }
|
||||
export { SuspenseQueriesOptions as SuspenseQueriesOptions_alias_1 }
|
||||
|
||||
/**
|
||||
* SuspenseQueriesResults reducer recursively maps type param to results
|
||||
*/
|
||||
declare type SuspenseQueriesResults<T extends Array<any>, TResults extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH_2 ? Array<UseSuspenseQueryResult> : T extends [] ? [] : T extends [infer Head] ? [...TResults, GetUseSuspenseQueryResult<Head>] : T extends [infer Head, ...infer Tails] ? SuspenseQueriesResults<[
|
||||
...Tails
|
||||
], [
|
||||
...TResults,
|
||||
GetUseSuspenseQueryResult<Head>
|
||||
], [
|
||||
...TDepth,
|
||||
1
|
||||
]> : {
|
||||
[K in keyof T]: GetUseSuspenseQueryResult<T[K]>;
|
||||
};
|
||||
export { SuspenseQueriesResults }
|
||||
export { SuspenseQueriesResults as SuspenseQueriesResults_alias_1 }
|
||||
|
||||
export { ThrowOnError }
|
||||
|
||||
export { TimeoutCallback }
|
||||
|
||||
export { timeoutManager }
|
||||
|
||||
export { TimeoutProvider }
|
||||
|
||||
declare type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
|
||||
initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
|
||||
};
|
||||
export { UndefinedInitialDataInfiniteOptions }
|
||||
export { UndefinedInitialDataInfiniteOptions as UndefinedInitialDataInfiniteOptions_alias_1 }
|
||||
|
||||
declare type UndefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
|
||||
initialData?: undefined | InitialDataFunction<NonUndefinedGuard<TQueryFnData>> | NonUndefinedGuard<TQueryFnData>;
|
||||
};
|
||||
export { UndefinedInitialDataOptions }
|
||||
export { UndefinedInitialDataOptions as UndefinedInitialDataOptions_alias_1 }
|
||||
|
||||
export { UnsetMarker }
|
||||
|
||||
export { unsetMarker }
|
||||
|
||||
declare type UnusedSkipTokenInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
|
||||
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken | undefined>;
|
||||
};
|
||||
export { UnusedSkipTokenInfiniteOptions }
|
||||
export { UnusedSkipTokenInfiniteOptions as UnusedSkipTokenInfiniteOptions_alias_1 }
|
||||
|
||||
declare type UnusedSkipTokenOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
|
||||
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken | undefined>;
|
||||
};
|
||||
export { UnusedSkipTokenOptions }
|
||||
export { UnusedSkipTokenOptions as UnusedSkipTokenOptions_alias_1 }
|
||||
|
||||
export { Updater }
|
||||
|
||||
declare type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
|
||||
mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
}> & {
|
||||
mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
};
|
||||
export { UseBaseMutationResult }
|
||||
export { UseBaseMutationResult as UseBaseMutationResult_alias_1 }
|
||||
|
||||
export declare function useBaseQuery<TQueryFnData, TError, TData, TQueryData, TQueryKey extends QueryKey>(options: UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, Observer: typeof QueryObserver, queryClient?: QueryClient): QueryObserverResult<TData, TError>;
|
||||
|
||||
declare interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
||||
/**
|
||||
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
subscribed?: boolean;
|
||||
}
|
||||
export { UseBaseQueryOptions }
|
||||
export { UseBaseQueryOptions as UseBaseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
||||
export { UseBaseQueryResult }
|
||||
export { UseBaseQueryResult as UseBaseQueryResult_alias_1 }
|
||||
|
||||
export declare const useClearResetErrorBoundary: (errorResetBoundary: QueryErrorResetBoundaryValue) => void;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): DefinedUseInfiniteQueryResult<TData, TError>;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
|
||||
|
||||
declare function useInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseInfiniteQueryResult<TData, TError>;
|
||||
export { useInfiniteQuery }
|
||||
export { useInfiniteQuery as useInfiniteQuery_alias_1 }
|
||||
|
||||
declare interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
||||
/**
|
||||
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
||||
* Defaults to `true`.
|
||||
*/
|
||||
subscribed?: boolean;
|
||||
}
|
||||
export { UseInfiniteQueryOptions }
|
||||
export { UseInfiniteQueryOptions as UseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
|
||||
export { UseInfiniteQueryResult }
|
||||
export { UseInfiniteQueryResult as UseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare function useIsFetching(filters?: QueryFilters, queryClient?: QueryClient): number;
|
||||
export { useIsFetching }
|
||||
export { useIsFetching as useIsFetching_alias_1 }
|
||||
|
||||
declare function useIsMutating(filters?: MutationFilters, queryClient?: QueryClient): number;
|
||||
export { useIsMutating }
|
||||
export { useIsMutating as useIsMutating_alias_1 }
|
||||
|
||||
declare const useIsRestoring: () => boolean;
|
||||
export { useIsRestoring }
|
||||
export { useIsRestoring as useIsRestoring_alias_1 }
|
||||
|
||||
declare type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = MutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { UseMutateAsyncFunction }
|
||||
export { UseMutateAsyncFunction as UseMutateAsyncFunction_alias_1 }
|
||||
|
||||
declare type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TOnMutateResult>>) => void;
|
||||
export { UseMutateFunction }
|
||||
export { UseMutateFunction as UseMutateFunction_alias_1 }
|
||||
|
||||
declare function useMutation<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown>(options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>, queryClient?: QueryClient): UseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { useMutation }
|
||||
export { useMutation as useMutation_alias_1 }
|
||||
|
||||
declare interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted'> {
|
||||
}
|
||||
export { UseMutationOptions }
|
||||
export { UseMutationOptions as UseMutationOptions_alias_1 }
|
||||
|
||||
declare type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
||||
export { UseMutationResult }
|
||||
export { UseMutationResult as UseMutationResult_alias_1 }
|
||||
|
||||
declare function useMutationState<TResult = MutationState>(options?: MutationStateOptions<TResult>, queryClient?: QueryClient): Array<TResult>;
|
||||
export { useMutationState }
|
||||
export { useMutationState as useMutationState_alias_1 }
|
||||
|
||||
declare function usePrefetchInfiniteQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: FetchInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): void;
|
||||
export { usePrefetchInfiniteQuery }
|
||||
export { usePrefetchInfiniteQuery as usePrefetchInfiniteQuery_alias_1 }
|
||||
|
||||
declare function usePrefetchQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UsePrefetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): void;
|
||||
export { usePrefetchQuery }
|
||||
export { usePrefetchQuery as usePrefetchQuery_alias_1 }
|
||||
|
||||
declare interface UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> {
|
||||
queryFn?: Exclude<FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UsePrefetchQueryOptions }
|
||||
export { UsePrefetchQueryOptions as UsePrefetchQueryOptions_alias_1 }
|
||||
|
||||
declare function useQueries<T extends Array<any>, TCombinedResult = QueriesResults<T>>({ queries, ...options }: {
|
||||
queries: readonly [...QueriesOptions<T>] | readonly [...{
|
||||
[K in keyof T]: GetUseQueryOptionsForUseQueries<T[K]>;
|
||||
}];
|
||||
combine?: (result: QueriesResults<T>) => TCombinedResult;
|
||||
subscribed?: boolean;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
export { useQueries }
|
||||
export { useQueries as useQueries_alias_1 }
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): DefinedUseQueryResult<NoInfer_2<TData>, TError>;
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer_2<TData>, TError>;
|
||||
|
||||
declare function useQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseQueryResult<NoInfer_2<TData>, TError>;
|
||||
export { useQuery }
|
||||
export { useQuery as useQuery_alias_1 }
|
||||
|
||||
declare const useQueryClient: (queryClient?: QueryClient) => QueryClient;
|
||||
export { useQueryClient }
|
||||
export { useQueryClient as useQueryClient_alias_1 }
|
||||
|
||||
declare const useQueryErrorResetBoundary: () => QueryErrorResetBoundaryValue;
|
||||
export { useQueryErrorResetBoundary }
|
||||
export { useQueryErrorResetBoundary as useQueryErrorResetBoundary_alias_1 }
|
||||
|
||||
declare interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {
|
||||
}
|
||||
export { UseQueryOptions }
|
||||
export { UseQueryOptions as UseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'placeholderData' | 'subscribed'> & {
|
||||
placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
|
||||
};
|
||||
|
||||
declare type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
|
||||
export { UseQueryResult }
|
||||
export { UseQueryResult as UseQueryResult_alias_1 }
|
||||
|
||||
declare function useSuspenseInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UseSuspenseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient?: QueryClient): UseSuspenseInfiniteQueryResult<TData, TError>;
|
||||
export { useSuspenseInfiniteQuery }
|
||||
export { useSuspenseInfiniteQuery as useSuspenseInfiniteQuery_alias_1 }
|
||||
|
||||
declare interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
||||
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UseSuspenseInfiniteQueryOptions }
|
||||
export { UseSuspenseInfiniteQueryOptions as UseSuspenseInfiniteQueryOptions_alias_1 }
|
||||
|
||||
declare type UseSuspenseInfiniteQueryResult<TData = unknown, TError = DefaultError> = OmitKeyof<DefinedInfiniteQueryObserverResult<TData, TError>, 'isPlaceholderData' | 'promise'>;
|
||||
export { UseSuspenseInfiniteQueryResult }
|
||||
export { UseSuspenseInfiniteQueryResult as UseSuspenseInfiniteQueryResult_alias_1 }
|
||||
|
||||
declare function useSuspenseQueries<T extends Array<any>, TCombinedResult = SuspenseQueriesResults<T>>(options: {
|
||||
queries: readonly [...SuspenseQueriesOptions<T>] | readonly [...{
|
||||
[K in keyof T]: GetUseSuspenseQueryOptions<T[K]>;
|
||||
}];
|
||||
combine?: (result: SuspenseQueriesResults<T>) => TCombinedResult;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
|
||||
declare function useSuspenseQueries<T extends Array<any>, TCombinedResult = SuspenseQueriesResults<T>>(options: {
|
||||
queries: readonly [...SuspenseQueriesOptions<T>];
|
||||
combine?: (result: SuspenseQueriesResults<T>) => TCombinedResult;
|
||||
}, queryClient?: QueryClient): TCombinedResult;
|
||||
export { useSuspenseQueries }
|
||||
export { useSuspenseQueries as useSuspenseQueries_alias_1 }
|
||||
|
||||
declare function useSuspenseQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, queryClient?: QueryClient): UseSuspenseQueryResult<TData, TError>;
|
||||
export { useSuspenseQuery }
|
||||
export { useSuspenseQuery as useSuspenseQuery_alias_1 }
|
||||
|
||||
declare interface UseSuspenseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
||||
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
||||
}
|
||||
export { UseSuspenseQueryOptions }
|
||||
export { UseSuspenseQueryOptions as UseSuspenseQueryOptions_alias_1 }
|
||||
|
||||
declare type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = DistributiveOmit<DefinedQueryObserverResult<TData, TError>, 'isPlaceholderData' | 'promise'>;
|
||||
export { UseSuspenseQueryResult }
|
||||
export { UseSuspenseQueryResult as UseSuspenseQueryResult_alias_1 }
|
||||
|
||||
export declare const willFetch: (result: QueryObserverResult<any, any>, isRestoring: boolean) => boolean;
|
||||
|
||||
export { WithRequired }
|
||||
|
||||
export { }
|
||||
69
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs
generated
vendored
Executable file
69
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs
generated
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/errorBoundaryUtils.ts
|
||||
var errorBoundaryUtils_exports = {};
|
||||
__export(errorBoundaryUtils_exports, {
|
||||
ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
|
||||
getHasError: () => getHasError,
|
||||
useClearResetErrorBoundary: () => useClearResetErrorBoundary
|
||||
});
|
||||
module.exports = __toCommonJS(errorBoundaryUtils_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var import_query_core = require("@tanstack/query-core");
|
||||
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
||||
const throwOnError = (query == null ? void 0 : query.state.error) && typeof options.throwOnError === "function" ? (0, import_query_core.shouldThrowError)(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
||||
if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
|
||||
if (!errorResetBoundary.isReset()) {
|
||||
options.retryOnMount = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
||||
React.useEffect(() => {
|
||||
errorResetBoundary.clearReset();
|
||||
}, [errorResetBoundary]);
|
||||
};
|
||||
var getHasError = ({
|
||||
result,
|
||||
errorResetBoundary,
|
||||
throwOnError,
|
||||
query,
|
||||
suspense
|
||||
}) => {
|
||||
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || (0, import_query_core.shouldThrowError)(throwOnError, [result.error, query]));
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
ensurePreventErrorBoundaryRetry,
|
||||
getHasError,
|
||||
useClearResetErrorBoundary
|
||||
});
|
||||
//# sourceMappingURL=errorBoundaryUtils.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { shouldThrowError } from '@tanstack/query-core'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowOnError,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined,\n) => {\n const throwOnError =\n query?.state.error && typeof options.throwOnError === 'function'\n ? shouldThrowError(options.throwOnError, [query.state.error, query])\n : options.throwOnError\n\n if (\n options.suspense ||\n options.experimental_prefetchInRender ||\n throwOnError\n ) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwOnError,\n query,\n suspense,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined\n suspense: boolean | undefined\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n query &&\n ((suspense && result.data === undefined) ||\n shouldThrowError(throwOnError, [result.error, query]))\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,YAAuB;AACvB,wBAAiC;AAU1B,IAAM,kCAAkC,CAO7C,SAOA,oBACA,UACG;AACH,QAAM,gBACJ,+BAAO,MAAM,UAAS,OAAO,QAAQ,iBAAiB,iBAClD,oCAAiB,QAAQ,cAAc,CAAC,MAAM,MAAM,OAAO,KAAK,CAAC,IACjE,QAAQ;AAEd,MACE,QAAQ,YACR,QAAQ,iCACR,cACA;AAEA,QAAI,CAAC,mBAAmB,QAAQ,GAAG;AACjC,cAAQ,eAAe;AAAA,IACzB;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,CACxC,uBACG;AACH,EAAM,gBAAU,MAAM;AACpB,uBAAmB,WAAW;AAAA,EAChC,GAAG,CAAC,kBAAkB,CAAC;AACzB;AAEO,IAAM,cAAc,CAMzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAMM;AACJ,SACE,OAAO,WACP,CAAC,mBAAmB,QAAQ,KAC5B,CAAC,OAAO,cACR,UACE,YAAY,OAAO,SAAS,cAC5B,oCAAiB,cAAc,CAAC,OAAO,OAAO,KAAK,CAAC;AAE1D;","names":[]}
|
||||
3
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.cts
generated
vendored
Executable file
3
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.cts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
export { ensurePreventErrorBoundaryRetry } from './_tsup-dts-rollup.cjs';
|
||||
export { useClearResetErrorBoundary } from './_tsup-dts-rollup.cjs';
|
||||
export { getHasError } from './_tsup-dts-rollup.cjs';
|
||||
3
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.ts
generated
vendored
Executable file
3
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
export { ensurePreventErrorBoundaryRetry } from './_tsup-dts-rollup.js';
|
||||
export { useClearResetErrorBoundary } from './_tsup-dts-rollup.js';
|
||||
export { getHasError } from './_tsup-dts-rollup.js';
|
||||
33
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js
generated
vendored
Executable file
33
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js
generated
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
"use client";
|
||||
|
||||
// src/errorBoundaryUtils.ts
|
||||
import * as React from "react";
|
||||
import { shouldThrowError } from "@tanstack/query-core";
|
||||
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
||||
const throwOnError = (query == null ? void 0 : query.state.error) && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
||||
if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
|
||||
if (!errorResetBoundary.isReset()) {
|
||||
options.retryOnMount = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
||||
React.useEffect(() => {
|
||||
errorResetBoundary.clearReset();
|
||||
}, [errorResetBoundary]);
|
||||
};
|
||||
var getHasError = ({
|
||||
result,
|
||||
errorResetBoundary,
|
||||
throwOnError,
|
||||
query,
|
||||
suspense
|
||||
}) => {
|
||||
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
||||
};
|
||||
export {
|
||||
ensurePreventErrorBoundaryRetry,
|
||||
getHasError,
|
||||
useClearResetErrorBoundary
|
||||
};
|
||||
//# sourceMappingURL=errorBoundaryUtils.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/errorBoundaryUtils.ts"],"sourcesContent":["'use client'\nimport * as React from 'react'\nimport { shouldThrowError } from '@tanstack/query-core'\nimport type {\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserverResult,\n ThrowOnError,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const ensurePreventErrorBoundaryRetry = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n options: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined,\n) => {\n const throwOnError =\n query?.state.error && typeof options.throwOnError === 'function'\n ? shouldThrowError(options.throwOnError, [query.state.error, query])\n : options.throwOnError\n\n if (\n options.suspense ||\n options.experimental_prefetchInRender ||\n throwOnError\n ) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false\n }\n }\n}\n\nexport const useClearResetErrorBoundary = (\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset()\n }, [errorResetBoundary])\n}\n\nexport const getHasError = <\n TData,\n TError,\n TQueryFnData,\n TQueryData,\n TQueryKey extends QueryKey,\n>({\n result,\n errorResetBoundary,\n throwOnError,\n query,\n suspense,\n}: {\n result: QueryObserverResult<TData, TError>\n errorResetBoundary: QueryErrorResetBoundaryValue\n throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>\n query: Query<TQueryFnData, TError, TQueryData, TQueryKey> | undefined\n suspense: boolean | undefined\n}) => {\n return (\n result.isError &&\n !errorResetBoundary.isReset() &&\n !result.isFetching &&\n query &&\n ((suspense && result.data === undefined) ||\n shouldThrowError(throwOnError, [result.error, query]))\n )\n}\n"],"mappings":";;;AACA,YAAY,WAAW;AACvB,SAAS,wBAAwB;AAU1B,IAAM,kCAAkC,CAO7C,SAOA,oBACA,UACG;AACH,QAAM,gBACJ,+BAAO,MAAM,UAAS,OAAO,QAAQ,iBAAiB,aAClD,iBAAiB,QAAQ,cAAc,CAAC,MAAM,MAAM,OAAO,KAAK,CAAC,IACjE,QAAQ;AAEd,MACE,QAAQ,YACR,QAAQ,iCACR,cACA;AAEA,QAAI,CAAC,mBAAmB,QAAQ,GAAG;AACjC,cAAQ,eAAe;AAAA,IACzB;AAAA,EACF;AACF;AAEO,IAAM,6BAA6B,CACxC,uBACG;AACH,EAAM,gBAAU,MAAM;AACpB,uBAAmB,WAAW;AAAA,EAChC,GAAG,CAAC,kBAAkB,CAAC;AACzB;AAEO,IAAM,cAAc,CAMzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAMM;AACJ,SACE,OAAO,WACP,CAAC,mBAAmB,QAAQ,KAC5B,CAAC,OAAO,cACR,UACE,YAAY,OAAO,SAAS,UAC5B,iBAAiB,cAAc,CAAC,OAAO,OAAO,KAAK,CAAC;AAE1D;","names":[]}
|
||||
97
node_modules/@tanstack/react-query/build/legacy/index.cjs
generated
vendored
Executable file
97
node_modules/@tanstack/react-query/build/legacy/index.cjs
generated
vendored
Executable file
@@ -0,0 +1,97 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
|
||||
IsRestoringProvider: () => import_IsRestoringProvider.IsRestoringProvider,
|
||||
QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
|
||||
QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
|
||||
QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
|
||||
infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
|
||||
mutationOptions: () => import_mutationOptions.mutationOptions,
|
||||
queryOptions: () => import_queryOptions.queryOptions,
|
||||
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
|
||||
useIsFetching: () => import_useIsFetching.useIsFetching,
|
||||
useIsMutating: () => import_useMutationState.useIsMutating,
|
||||
useIsRestoring: () => import_IsRestoringProvider.useIsRestoring,
|
||||
useMutation: () => import_useMutation.useMutation,
|
||||
useMutationState: () => import_useMutationState.useMutationState,
|
||||
usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery,
|
||||
usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery,
|
||||
useQueries: () => import_useQueries.useQueries,
|
||||
useQuery: () => import_useQuery.useQuery,
|
||||
useQueryClient: () => import_QueryClientProvider.useQueryClient,
|
||||
useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
|
||||
useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
|
||||
useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
|
||||
useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
__reExport(index_exports, require("@tanstack/query-core"), module.exports);
|
||||
__reExport(index_exports, require("./types.cjs"), module.exports);
|
||||
var import_useQueries = require("./useQueries.cjs");
|
||||
var import_useQuery = require("./useQuery.cjs");
|
||||
var import_useSuspenseQuery = require("./useSuspenseQuery.cjs");
|
||||
var import_useSuspenseInfiniteQuery = require("./useSuspenseInfiniteQuery.cjs");
|
||||
var import_useSuspenseQueries = require("./useSuspenseQueries.cjs");
|
||||
var import_usePrefetchQuery = require("./usePrefetchQuery.cjs");
|
||||
var import_usePrefetchInfiniteQuery = require("./usePrefetchInfiniteQuery.cjs");
|
||||
var import_queryOptions = require("./queryOptions.cjs");
|
||||
var import_infiniteQueryOptions = require("./infiniteQueryOptions.cjs");
|
||||
var import_QueryClientProvider = require("./QueryClientProvider.cjs");
|
||||
var import_HydrationBoundary = require("./HydrationBoundary.cjs");
|
||||
var import_QueryErrorResetBoundary = require("./QueryErrorResetBoundary.cjs");
|
||||
var import_useIsFetching = require("./useIsFetching.cjs");
|
||||
var import_useMutationState = require("./useMutationState.cjs");
|
||||
var import_useMutation = require("./useMutation.cjs");
|
||||
var import_mutationOptions = require("./mutationOptions.cjs");
|
||||
var import_useInfiniteQuery = require("./useInfiniteQuery.cjs");
|
||||
var import_IsRestoringProvider = require("./IsRestoringProvider.cjs");
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
HydrationBoundary,
|
||||
IsRestoringProvider,
|
||||
QueryClientContext,
|
||||
QueryClientProvider,
|
||||
QueryErrorResetBoundary,
|
||||
infiniteQueryOptions,
|
||||
mutationOptions,
|
||||
queryOptions,
|
||||
useInfiniteQuery,
|
||||
useIsFetching,
|
||||
useIsMutating,
|
||||
useIsRestoring,
|
||||
useMutation,
|
||||
useMutationState,
|
||||
usePrefetchInfiniteQuery,
|
||||
usePrefetchQuery,
|
||||
useQueries,
|
||||
useQuery,
|
||||
useQueryClient,
|
||||
useQueryErrorResetBoundary,
|
||||
useSuspenseInfiniteQuery,
|
||||
useSuspenseQueries,
|
||||
useSuspenseQuery,
|
||||
...require("@tanstack/query-core"),
|
||||
...require("./types.cjs")
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/index.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/index.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\n// Re-export core\nexport * from '@tanstack/query-core'\n\n// React Query\nexport * from './types'\nexport { useQueries } from './useQueries'\nexport type { QueriesResults, QueriesOptions } from './useQueries'\nexport { useQuery } from './useQuery'\nexport { useSuspenseQuery } from './useSuspenseQuery'\nexport { useSuspenseInfiniteQuery } from './useSuspenseInfiniteQuery'\nexport { useSuspenseQueries } from './useSuspenseQueries'\nexport type {\n SuspenseQueriesResults,\n SuspenseQueriesOptions,\n} from './useSuspenseQueries'\nexport { usePrefetchQuery } from './usePrefetchQuery'\nexport { usePrefetchInfiniteQuery } from './usePrefetchInfiniteQuery'\nexport { queryOptions } from './queryOptions'\nexport type {\n DefinedInitialDataOptions,\n UndefinedInitialDataOptions,\n UnusedSkipTokenOptions,\n} from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n UnusedSkipTokenInfiniteOptions,\n} from './infiniteQueryOptions'\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient,\n} from './QueryClientProvider'\nexport type { QueryClientProviderProps } from './QueryClientProvider'\nexport type { QueryErrorResetBoundaryProps } from './QueryErrorResetBoundary'\nexport { HydrationBoundary } from './HydrationBoundary'\nexport type { HydrationBoundaryProps } from './HydrationBoundary'\nexport type {\n QueryErrorClearResetFunction,\n QueryErrorIsResetFunction,\n QueryErrorResetBoundaryFunction,\n QueryErrorResetFunction,\n} from './QueryErrorResetBoundary'\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary,\n} from './QueryErrorResetBoundary'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { useMutation } from './useMutation'\nexport { mutationOptions } from './mutationOptions'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useIsRestoring, IsRestoringProvider } from './IsRestoringProvider'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAc,iCAHd;AAMA,0BAAc,wBANd;AAOA,wBAA2B;AAE3B,sBAAyB;AACzB,8BAAiC;AACjC,sCAAyC;AACzC,gCAAmC;AAKnC,8BAAiC;AACjC,sCAAyC;AACzC,0BAA6B;AAM7B,kCAAqC;AAMrC,iCAIO;AAGP,+BAAkC;AAQlC,qCAGO;AACP,2BAA8B;AAC9B,8BAAgD;AAChD,yBAA4B;AAC5B,6BAAgC;AAChC,8BAAiC;AACjC,iCAAoD;","names":[]}
|
||||
206
node_modules/@tanstack/react-query/build/legacy/index.d.cts
generated
vendored
Executable file
206
node_modules/@tanstack/react-query/build/legacy/index.d.cts
generated
vendored
Executable file
@@ -0,0 +1,206 @@
|
||||
export { useQueries } from './_tsup-dts-rollup.cjs';
|
||||
export { QueriesResults } from './_tsup-dts-rollup.cjs';
|
||||
export { QueriesOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { useQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { useSuspenseQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { useSuspenseInfiniteQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { useSuspenseQueries } from './_tsup-dts-rollup.cjs';
|
||||
export { SuspenseQueriesResults } from './_tsup-dts-rollup.cjs';
|
||||
export { SuspenseQueriesOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { usePrefetchQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { usePrefetchInfiniteQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { queryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedInitialDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UndefinedInitialDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UnusedSkipTokenOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { infiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UndefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UnusedSkipTokenInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientContext_alias_1 as QueryClientContext } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientProvider_alias_1 as QueryClientProvider } from './_tsup-dts-rollup.cjs';
|
||||
export { useQueryClient_alias_1 as useQueryClient } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientProviderProps_alias_1 as QueryClientProviderProps } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundaryProps_alias_1 as QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.cjs';
|
||||
export { HydrationBoundary_alias_1 as HydrationBoundary } from './_tsup-dts-rollup.cjs';
|
||||
export { HydrationBoundaryProps_alias_1 as HydrationBoundaryProps } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorClearResetFunction_alias_1 as QueryErrorClearResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorIsResetFunction_alias_1 as QueryErrorIsResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundaryFunction_alias_1 as QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetFunction_alias_1 as QueryErrorResetFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryErrorResetBoundary_alias_1 as QueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
|
||||
export { useQueryErrorResetBoundary_alias_1 as useQueryErrorResetBoundary } from './_tsup-dts-rollup.cjs';
|
||||
export { useIsFetching } from './_tsup-dts-rollup.cjs';
|
||||
export { useIsMutating } from './_tsup-dts-rollup.cjs';
|
||||
export { useMutationState } from './_tsup-dts-rollup.cjs';
|
||||
export { useMutation } from './_tsup-dts-rollup.cjs';
|
||||
export { mutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { useInfiniteQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { useIsRestoring_alias_1 as useIsRestoring } from './_tsup-dts-rollup.cjs';
|
||||
export { IsRestoringProvider_alias_1 as IsRestoringProvider } from './_tsup-dts-rollup.cjs';
|
||||
export { focusManager } from './_tsup-dts-rollup.cjs';
|
||||
export { environmentManager } from './_tsup-dts-rollup.cjs';
|
||||
export { defaultShouldDehydrateMutation } from './_tsup-dts-rollup.cjs';
|
||||
export { defaultShouldDehydrateQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { dehydrate } from './_tsup-dts-rollup.cjs';
|
||||
export { hydrate } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserver } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationCache } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationCacheNotifyEvent } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserver } from './_tsup-dts-rollup.cjs';
|
||||
export { defaultScheduler } from './_tsup-dts-rollup.cjs';
|
||||
export { notifyManager } from './_tsup-dts-rollup.cjs';
|
||||
export { onlineManager } from './_tsup-dts-rollup.cjs';
|
||||
export { QueriesObserver } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryCache } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryCacheNotifyEvent } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClient } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserver } from './_tsup-dts-rollup.cjs';
|
||||
export { CancelledError } from './_tsup-dts-rollup.cjs';
|
||||
export { isCancelledError } from './_tsup-dts-rollup.cjs';
|
||||
export { timeoutManager } from './_tsup-dts-rollup.cjs';
|
||||
export { ManagedTimerId } from './_tsup-dts-rollup.cjs';
|
||||
export { TimeoutCallback } from './_tsup-dts-rollup.cjs';
|
||||
export { TimeoutProvider } from './_tsup-dts-rollup.cjs';
|
||||
export { hashKey } from './_tsup-dts-rollup.cjs';
|
||||
export { isServer } from './_tsup-dts-rollup.cjs';
|
||||
export { keepPreviousData } from './_tsup-dts-rollup.cjs';
|
||||
export { matchMutation } from './_tsup-dts-rollup.cjs';
|
||||
export { matchQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { noop } from './_tsup-dts-rollup.cjs';
|
||||
export { partialMatchKey } from './_tsup-dts-rollup.cjs';
|
||||
export { replaceEqualDeep } from './_tsup-dts-rollup.cjs';
|
||||
export { shouldThrowError } from './_tsup-dts-rollup.cjs';
|
||||
export { skipToken } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationFilters } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryFilters } from './_tsup-dts-rollup.cjs';
|
||||
export { SkipToken } from './_tsup-dts-rollup.cjs';
|
||||
export { Updater } from './_tsup-dts-rollup.cjs';
|
||||
export { experimental_streamedQuery } from './_tsup-dts-rollup.cjs';
|
||||
export { DehydratedState } from './_tsup-dts-rollup.cjs';
|
||||
export { DehydrateOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { HydrateOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { Mutation } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationState } from './_tsup-dts-rollup.cjs';
|
||||
export { QueriesObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { Query } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryState } from './_tsup-dts-rollup.cjs';
|
||||
export { NonUndefinedGuard } from './_tsup-dts-rollup.cjs';
|
||||
export { DistributiveOmit } from './_tsup-dts-rollup.cjs';
|
||||
export { OmitKeyof } from './_tsup-dts-rollup.cjs';
|
||||
export { Override } from './_tsup-dts-rollup.cjs';
|
||||
export { NoInfer } from './_tsup-dts-rollup.cjs';
|
||||
export { Register } from './_tsup-dts-rollup.cjs';
|
||||
export { DefaultError } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryKey } from './_tsup-dts-rollup.cjs';
|
||||
export { dataTagSymbol } from './_tsup-dts-rollup.cjs';
|
||||
export { dataTagErrorSymbol } from './_tsup-dts-rollup.cjs';
|
||||
export { unsetMarker } from './_tsup-dts-rollup.cjs';
|
||||
export { UnsetMarker } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyDataTag } from './_tsup-dts-rollup.cjs';
|
||||
export { DataTag } from './_tsup-dts-rollup.cjs';
|
||||
export { InferDataFromTag } from './_tsup-dts-rollup.cjs';
|
||||
export { InferErrorFromTag } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { StaleTime } from './_tsup-dts-rollup.cjs';
|
||||
export { StaleTimeFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { Enabled } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryPersister } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryFunctionContext } from './_tsup-dts-rollup.cjs';
|
||||
export { InitialDataFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { PlaceholderDataFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueriesPlaceholderDataFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryKeyHashFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { GetPreviousPageParamFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { GetNextPageParamFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteData } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryMeta } from './_tsup-dts-rollup.cjs';
|
||||
export { NetworkMode } from './_tsup-dts-rollup.cjs';
|
||||
export { NotifyOnChangeProps } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { InitialPageParam } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryPageParamsOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { ThrowOnError } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { WithRequired } from './_tsup-dts-rollup.cjs';
|
||||
export { DefaultedQueryObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { DefaultedInfiniteQueryObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { FetchQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { EnsureQueryDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { EnsureInfiniteQueryDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { FetchInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { ResultOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { RefetchOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { InvalidateQueryFilters } from './_tsup-dts-rollup.cjs';
|
||||
export { RefetchQueryFilters } from './_tsup-dts-rollup.cjs';
|
||||
export { InvalidateOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { ResetOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { FetchNextPageOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { FetchPreviousPageOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryStatus } from './_tsup-dts-rollup.cjs';
|
||||
export { FetchStatus } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverBaseResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverPendingResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverLoadingResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverLoadingErrorResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverRefetchErrorResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverSuccessResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverPlaceholderResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedQueryObserverResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryObserverResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverBaseResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverPendingResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverLoadingResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverLoadingErrorResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverRefetchErrorResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverSuccessResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverPlaceholderResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedInfiniteQueryObserverResult } from './_tsup-dts-rollup.cjs';
|
||||
export { InfiniteQueryObserverResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationKey } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationStatus } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationScope } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationMeta } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationFunctionContext } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { MutateOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { MutateFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverBaseResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverIdleResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverLoadingResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverErrorResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverSuccessResult } from './_tsup-dts-rollup.cjs';
|
||||
export { MutationObserverResult } from './_tsup-dts-rollup.cjs';
|
||||
export { QueryClientConfig } from './_tsup-dts-rollup.cjs';
|
||||
export { DefaultOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { CancelOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { SetDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { NotifyEventType } from './_tsup-dts-rollup.cjs';
|
||||
export { NotifyEvent } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseBaseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UsePrefetchQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseSuspenseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedUseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedUseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseMutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutateFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutateAsyncFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseMutationResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutationResult } from './_tsup-dts-rollup.cjs';
|
||||
206
node_modules/@tanstack/react-query/build/legacy/index.d.ts
generated
vendored
Executable file
206
node_modules/@tanstack/react-query/build/legacy/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,206 @@
|
||||
export { useQueries } from './_tsup-dts-rollup.js';
|
||||
export { QueriesResults } from './_tsup-dts-rollup.js';
|
||||
export { QueriesOptions } from './_tsup-dts-rollup.js';
|
||||
export { useQuery } from './_tsup-dts-rollup.js';
|
||||
export { useSuspenseQuery } from './_tsup-dts-rollup.js';
|
||||
export { useSuspenseInfiniteQuery } from './_tsup-dts-rollup.js';
|
||||
export { useSuspenseQueries } from './_tsup-dts-rollup.js';
|
||||
export { SuspenseQueriesResults } from './_tsup-dts-rollup.js';
|
||||
export { SuspenseQueriesOptions } from './_tsup-dts-rollup.js';
|
||||
export { usePrefetchQuery } from './_tsup-dts-rollup.js';
|
||||
export { usePrefetchInfiniteQuery } from './_tsup-dts-rollup.js';
|
||||
export { queryOptions } from './_tsup-dts-rollup.js';
|
||||
export { DefinedInitialDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { UndefinedInitialDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { UnusedSkipTokenOptions } from './_tsup-dts-rollup.js';
|
||||
export { infiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { DefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
export { UndefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
export { UnusedSkipTokenInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientContext_alias_1 as QueryClientContext } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientProvider_alias_1 as QueryClientProvider } from './_tsup-dts-rollup.js';
|
||||
export { useQueryClient_alias_1 as useQueryClient } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientProviderProps_alias_1 as QueryClientProviderProps } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundaryProps_alias_1 as QueryErrorResetBoundaryProps } from './_tsup-dts-rollup.js';
|
||||
export { HydrationBoundary_alias_1 as HydrationBoundary } from './_tsup-dts-rollup.js';
|
||||
export { HydrationBoundaryProps_alias_1 as HydrationBoundaryProps } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorClearResetFunction_alias_1 as QueryErrorClearResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorIsResetFunction_alias_1 as QueryErrorIsResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundaryFunction_alias_1 as QueryErrorResetBoundaryFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetFunction_alias_1 as QueryErrorResetFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryErrorResetBoundary_alias_1 as QueryErrorResetBoundary } from './_tsup-dts-rollup.js';
|
||||
export { useQueryErrorResetBoundary_alias_1 as useQueryErrorResetBoundary } from './_tsup-dts-rollup.js';
|
||||
export { useIsFetching } from './_tsup-dts-rollup.js';
|
||||
export { useIsMutating } from './_tsup-dts-rollup.js';
|
||||
export { useMutationState } from './_tsup-dts-rollup.js';
|
||||
export { useMutation } from './_tsup-dts-rollup.js';
|
||||
export { mutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { useInfiniteQuery } from './_tsup-dts-rollup.js';
|
||||
export { useIsRestoring_alias_1 as useIsRestoring } from './_tsup-dts-rollup.js';
|
||||
export { IsRestoringProvider_alias_1 as IsRestoringProvider } from './_tsup-dts-rollup.js';
|
||||
export { focusManager } from './_tsup-dts-rollup.js';
|
||||
export { environmentManager } from './_tsup-dts-rollup.js';
|
||||
export { defaultShouldDehydrateMutation } from './_tsup-dts-rollup.js';
|
||||
export { defaultShouldDehydrateQuery } from './_tsup-dts-rollup.js';
|
||||
export { dehydrate } from './_tsup-dts-rollup.js';
|
||||
export { hydrate } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserver } from './_tsup-dts-rollup.js';
|
||||
export { MutationCache } from './_tsup-dts-rollup.js';
|
||||
export { MutationCacheNotifyEvent } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserver } from './_tsup-dts-rollup.js';
|
||||
export { defaultScheduler } from './_tsup-dts-rollup.js';
|
||||
export { notifyManager } from './_tsup-dts-rollup.js';
|
||||
export { onlineManager } from './_tsup-dts-rollup.js';
|
||||
export { QueriesObserver } from './_tsup-dts-rollup.js';
|
||||
export { QueryCache } from './_tsup-dts-rollup.js';
|
||||
export { QueryCacheNotifyEvent } from './_tsup-dts-rollup.js';
|
||||
export { QueryClient } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserver } from './_tsup-dts-rollup.js';
|
||||
export { CancelledError } from './_tsup-dts-rollup.js';
|
||||
export { isCancelledError } from './_tsup-dts-rollup.js';
|
||||
export { timeoutManager } from './_tsup-dts-rollup.js';
|
||||
export { ManagedTimerId } from './_tsup-dts-rollup.js';
|
||||
export { TimeoutCallback } from './_tsup-dts-rollup.js';
|
||||
export { TimeoutProvider } from './_tsup-dts-rollup.js';
|
||||
export { hashKey } from './_tsup-dts-rollup.js';
|
||||
export { isServer } from './_tsup-dts-rollup.js';
|
||||
export { keepPreviousData } from './_tsup-dts-rollup.js';
|
||||
export { matchMutation } from './_tsup-dts-rollup.js';
|
||||
export { matchQuery } from './_tsup-dts-rollup.js';
|
||||
export { noop } from './_tsup-dts-rollup.js';
|
||||
export { partialMatchKey } from './_tsup-dts-rollup.js';
|
||||
export { replaceEqualDeep } from './_tsup-dts-rollup.js';
|
||||
export { shouldThrowError } from './_tsup-dts-rollup.js';
|
||||
export { skipToken } from './_tsup-dts-rollup.js';
|
||||
export { MutationFilters } from './_tsup-dts-rollup.js';
|
||||
export { QueryFilters } from './_tsup-dts-rollup.js';
|
||||
export { SkipToken } from './_tsup-dts-rollup.js';
|
||||
export { Updater } from './_tsup-dts-rollup.js';
|
||||
export { experimental_streamedQuery } from './_tsup-dts-rollup.js';
|
||||
export { DehydratedState } from './_tsup-dts-rollup.js';
|
||||
export { DehydrateOptions } from './_tsup-dts-rollup.js';
|
||||
export { HydrateOptions } from './_tsup-dts-rollup.js';
|
||||
export { Mutation } from './_tsup-dts-rollup.js';
|
||||
export { MutationState } from './_tsup-dts-rollup.js';
|
||||
export { QueriesObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { Query } from './_tsup-dts-rollup.js';
|
||||
export { QueryState } from './_tsup-dts-rollup.js';
|
||||
export { NonUndefinedGuard } from './_tsup-dts-rollup.js';
|
||||
export { DistributiveOmit } from './_tsup-dts-rollup.js';
|
||||
export { OmitKeyof } from './_tsup-dts-rollup.js';
|
||||
export { Override } from './_tsup-dts-rollup.js';
|
||||
export { NoInfer } from './_tsup-dts-rollup.js';
|
||||
export { Register } from './_tsup-dts-rollup.js';
|
||||
export { DefaultError } from './_tsup-dts-rollup.js';
|
||||
export { QueryKey } from './_tsup-dts-rollup.js';
|
||||
export { dataTagSymbol } from './_tsup-dts-rollup.js';
|
||||
export { dataTagErrorSymbol } from './_tsup-dts-rollup.js';
|
||||
export { unsetMarker } from './_tsup-dts-rollup.js';
|
||||
export { UnsetMarker } from './_tsup-dts-rollup.js';
|
||||
export { AnyDataTag } from './_tsup-dts-rollup.js';
|
||||
export { DataTag } from './_tsup-dts-rollup.js';
|
||||
export { InferDataFromTag } from './_tsup-dts-rollup.js';
|
||||
export { InferErrorFromTag } from './_tsup-dts-rollup.js';
|
||||
export { QueryFunction } from './_tsup-dts-rollup.js';
|
||||
export { StaleTime } from './_tsup-dts-rollup.js';
|
||||
export { StaleTimeFunction } from './_tsup-dts-rollup.js';
|
||||
export { Enabled } from './_tsup-dts-rollup.js';
|
||||
export { QueryPersister } from './_tsup-dts-rollup.js';
|
||||
export { QueryFunctionContext } from './_tsup-dts-rollup.js';
|
||||
export { InitialDataFunction } from './_tsup-dts-rollup.js';
|
||||
export { PlaceholderDataFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueriesPlaceholderDataFunction } from './_tsup-dts-rollup.js';
|
||||
export { QueryKeyHashFunction } from './_tsup-dts-rollup.js';
|
||||
export { GetPreviousPageParamFunction } from './_tsup-dts-rollup.js';
|
||||
export { GetNextPageParamFunction } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteData } from './_tsup-dts-rollup.js';
|
||||
export { QueryMeta } from './_tsup-dts-rollup.js';
|
||||
export { NetworkMode } from './_tsup-dts-rollup.js';
|
||||
export { NotifyOnChangeProps } from './_tsup-dts-rollup.js';
|
||||
export { QueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { InitialPageParam } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryPageParamsOptions } from './_tsup-dts-rollup.js';
|
||||
export { ThrowOnError } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { WithRequired } from './_tsup-dts-rollup.js';
|
||||
export { DefaultedQueryObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { DefaultedInfiniteQueryObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { FetchQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { EnsureQueryDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { EnsureInfiniteQueryDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { FetchInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { ResultOptions } from './_tsup-dts-rollup.js';
|
||||
export { RefetchOptions } from './_tsup-dts-rollup.js';
|
||||
export { InvalidateQueryFilters } from './_tsup-dts-rollup.js';
|
||||
export { RefetchQueryFilters } from './_tsup-dts-rollup.js';
|
||||
export { InvalidateOptions } from './_tsup-dts-rollup.js';
|
||||
export { ResetOptions } from './_tsup-dts-rollup.js';
|
||||
export { FetchNextPageOptions } from './_tsup-dts-rollup.js';
|
||||
export { FetchPreviousPageOptions } from './_tsup-dts-rollup.js';
|
||||
export { QueryStatus } from './_tsup-dts-rollup.js';
|
||||
export { FetchStatus } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverBaseResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverPendingResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverLoadingResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverLoadingErrorResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverRefetchErrorResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverSuccessResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverPlaceholderResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedQueryObserverResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryObserverResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverBaseResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverPendingResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverLoadingResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverLoadingErrorResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverRefetchErrorResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverSuccessResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverPlaceholderResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedInfiniteQueryObserverResult } from './_tsup-dts-rollup.js';
|
||||
export { InfiniteQueryObserverResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationKey } from './_tsup-dts-rollup.js';
|
||||
export { MutationStatus } from './_tsup-dts-rollup.js';
|
||||
export { MutationScope } from './_tsup-dts-rollup.js';
|
||||
export { MutationMeta } from './_tsup-dts-rollup.js';
|
||||
export { MutationFunctionContext } from './_tsup-dts-rollup.js';
|
||||
export { MutationFunction } from './_tsup-dts-rollup.js';
|
||||
export { MutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverOptions } from './_tsup-dts-rollup.js';
|
||||
export { MutateOptions } from './_tsup-dts-rollup.js';
|
||||
export { MutateFunction } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverBaseResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverIdleResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverLoadingResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverErrorResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverSuccessResult } from './_tsup-dts-rollup.js';
|
||||
export { MutationObserverResult } from './_tsup-dts-rollup.js';
|
||||
export { QueryClientConfig } from './_tsup-dts-rollup.js';
|
||||
export { DefaultOptions } from './_tsup-dts-rollup.js';
|
||||
export { CancelOptions } from './_tsup-dts-rollup.js';
|
||||
export { SetDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { NotifyEventType } from './_tsup-dts-rollup.js';
|
||||
export { NotifyEvent } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseBaseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UsePrefetchQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseSuspenseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedUseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedUseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseMutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseMutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseMutateFunction } from './_tsup-dts-rollup.js';
|
||||
export { UseMutateAsyncFunction } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseMutationResult } from './_tsup-dts-rollup.js';
|
||||
export { UseMutationResult } from './_tsup-dts-rollup.js';
|
||||
54
node_modules/@tanstack/react-query/build/legacy/index.js
generated
vendored
Executable file
54
node_modules/@tanstack/react-query/build/legacy/index.js
generated
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
// src/index.ts
|
||||
export * from "@tanstack/query-core";
|
||||
export * from "./types.js";
|
||||
import { useQueries } from "./useQueries.js";
|
||||
import { useQuery } from "./useQuery.js";
|
||||
import { useSuspenseQuery } from "./useSuspenseQuery.js";
|
||||
import { useSuspenseInfiniteQuery } from "./useSuspenseInfiniteQuery.js";
|
||||
import { useSuspenseQueries } from "./useSuspenseQueries.js";
|
||||
import { usePrefetchQuery } from "./usePrefetchQuery.js";
|
||||
import { usePrefetchInfiniteQuery } from "./usePrefetchInfiniteQuery.js";
|
||||
import { queryOptions } from "./queryOptions.js";
|
||||
import { infiniteQueryOptions } from "./infiniteQueryOptions.js";
|
||||
import {
|
||||
QueryClientContext,
|
||||
QueryClientProvider,
|
||||
useQueryClient
|
||||
} from "./QueryClientProvider.js";
|
||||
import { HydrationBoundary } from "./HydrationBoundary.js";
|
||||
import {
|
||||
QueryErrorResetBoundary,
|
||||
useQueryErrorResetBoundary
|
||||
} from "./QueryErrorResetBoundary.js";
|
||||
import { useIsFetching } from "./useIsFetching.js";
|
||||
import { useIsMutating, useMutationState } from "./useMutationState.js";
|
||||
import { useMutation } from "./useMutation.js";
|
||||
import { mutationOptions } from "./mutationOptions.js";
|
||||
import { useInfiniteQuery } from "./useInfiniteQuery.js";
|
||||
import { useIsRestoring, IsRestoringProvider } from "./IsRestoringProvider.js";
|
||||
export {
|
||||
HydrationBoundary,
|
||||
IsRestoringProvider,
|
||||
QueryClientContext,
|
||||
QueryClientProvider,
|
||||
QueryErrorResetBoundary,
|
||||
infiniteQueryOptions,
|
||||
mutationOptions,
|
||||
queryOptions,
|
||||
useInfiniteQuery,
|
||||
useIsFetching,
|
||||
useIsMutating,
|
||||
useIsRestoring,
|
||||
useMutation,
|
||||
useMutationState,
|
||||
usePrefetchInfiniteQuery,
|
||||
usePrefetchQuery,
|
||||
useQueries,
|
||||
useQuery,
|
||||
useQueryClient,
|
||||
useQueryErrorResetBoundary,
|
||||
useSuspenseInfiniteQuery,
|
||||
useSuspenseQueries,
|
||||
useSuspenseQuery
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/index.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/* istanbul ignore file */\n\n// Re-export core\nexport * from '@tanstack/query-core'\n\n// React Query\nexport * from './types'\nexport { useQueries } from './useQueries'\nexport type { QueriesResults, QueriesOptions } from './useQueries'\nexport { useQuery } from './useQuery'\nexport { useSuspenseQuery } from './useSuspenseQuery'\nexport { useSuspenseInfiniteQuery } from './useSuspenseInfiniteQuery'\nexport { useSuspenseQueries } from './useSuspenseQueries'\nexport type {\n SuspenseQueriesResults,\n SuspenseQueriesOptions,\n} from './useSuspenseQueries'\nexport { usePrefetchQuery } from './usePrefetchQuery'\nexport { usePrefetchInfiniteQuery } from './usePrefetchInfiniteQuery'\nexport { queryOptions } from './queryOptions'\nexport type {\n DefinedInitialDataOptions,\n UndefinedInitialDataOptions,\n UnusedSkipTokenOptions,\n} from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n UnusedSkipTokenInfiniteOptions,\n} from './infiniteQueryOptions'\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient,\n} from './QueryClientProvider'\nexport type { QueryClientProviderProps } from './QueryClientProvider'\nexport type { QueryErrorResetBoundaryProps } from './QueryErrorResetBoundary'\nexport { HydrationBoundary } from './HydrationBoundary'\nexport type { HydrationBoundaryProps } from './HydrationBoundary'\nexport type {\n QueryErrorClearResetFunction,\n QueryErrorIsResetFunction,\n QueryErrorResetBoundaryFunction,\n QueryErrorResetFunction,\n} from './QueryErrorResetBoundary'\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary,\n} from './QueryErrorResetBoundary'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { useMutation } from './useMutation'\nexport { mutationOptions } from './mutationOptions'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useIsRestoring, IsRestoringProvider } from './IsRestoringProvider'\n"],"mappings":";AAGA,cAAc;AAGd,cAAc;AACd,SAAS,kBAAkB;AAE3B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,0BAA0B;AAKnC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,oBAAoB;AAM7B,SAAS,4BAA4B;AAMrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,yBAAyB;AAQlC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AACjC,SAAS,gBAAgB,2BAA2B;","names":[]}
|
||||
33
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs
generated
vendored
Executable file
33
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs
generated
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/infiniteQueryOptions.ts
|
||||
var infiniteQueryOptions_exports = {};
|
||||
__export(infiniteQueryOptions_exports, {
|
||||
infiniteQueryOptions: () => infiniteQueryOptions
|
||||
});
|
||||
module.exports = __toCommonJS(infiniteQueryOptions_exports);
|
||||
function infiniteQueryOptions(options) {
|
||||
return options;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
infiniteQueryOptions
|
||||
});
|
||||
//# sourceMappingURL=infiniteQueryOptions.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DataTag,\n DefaultError,\n InfiniteData,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryKey,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './types'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData?:\n | undefined\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | InitialDataFunction<\n NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n >\n}\n\nexport type UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken | undefined\n >\n}\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n | undefined\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkJO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
||||
4
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.cts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.cts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { infiniteQueryOptions_alias_1 as infiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UndefinedInitialDataInfiniteOptions_alias_1 as UndefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UnusedSkipTokenInfiniteOptions_alias_1 as UnusedSkipTokenInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedInitialDataInfiniteOptions_alias_1 as DefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.cjs';
|
||||
4
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.ts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.d.ts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { infiniteQueryOptions_alias_1 as infiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UndefinedInitialDataInfiniteOptions_alias_1 as UndefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
export { UnusedSkipTokenInfiniteOptions_alias_1 as UnusedSkipTokenInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
export { DefinedInitialDataInfiniteOptions_alias_1 as DefinedInitialDataInfiniteOptions } from './_tsup-dts-rollup.js';
|
||||
8
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js
generated
vendored
Executable file
8
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
// src/infiniteQueryOptions.ts
|
||||
function infiniteQueryOptions(options) {
|
||||
return options;
|
||||
}
|
||||
export {
|
||||
infiniteQueryOptions
|
||||
};
|
||||
//# sourceMappingURL=infiniteQueryOptions.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type {\n DataTag,\n DefaultError,\n InfiniteData,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryKey,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './types'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData?:\n | undefined\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | InitialDataFunction<\n NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n >\n}\n\nexport type UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = OmitKeyof<\n UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >['queryFn'],\n SkipToken | undefined\n >\n}\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n | undefined\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UnusedSkipTokenInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AAkJO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
||||
33
node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs
generated
vendored
Executable file
33
node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs
generated
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/mutationOptions.ts
|
||||
var mutationOptions_exports = {};
|
||||
__export(mutationOptions_exports, {
|
||||
mutationOptions: () => mutationOptions
|
||||
});
|
||||
module.exports = __toCommonJS(mutationOptions_exports);
|
||||
function mutationOptions(options) {
|
||||
return options;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
mutationOptions
|
||||
});
|
||||
//# sourceMappingURL=mutationOptions.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { UseMutationOptions } from './types'\n\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: WithRequired<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): WithRequired<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: Omit<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): Omit<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n): UseMutationOptions<TData, TError, TVariables, TOnMutateResult> {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BO,SAAS,gBAMd,SACgE;AAChE,SAAO;AACT;","names":[]}
|
||||
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.cts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.cts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { mutationOptions_alias_1 as mutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.ts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.d.ts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { mutationOptions_alias_1 as mutationOptions } from './_tsup-dts-rollup.js';
|
||||
8
node_modules/@tanstack/react-query/build/legacy/mutationOptions.js
generated
vendored
Executable file
8
node_modules/@tanstack/react-query/build/legacy/mutationOptions.js
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
// src/mutationOptions.ts
|
||||
function mutationOptions(options) {
|
||||
return options;
|
||||
}
|
||||
export {
|
||||
mutationOptions
|
||||
};
|
||||
//# sourceMappingURL=mutationOptions.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/mutationOptions.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/mutationOptions.ts"],"sourcesContent":["import type { DefaultError, WithRequired } from '@tanstack/query-core'\nimport type { UseMutationOptions } from './types'\n\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: WithRequired<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): WithRequired<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: Omit<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n >,\n): Omit<\n UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n 'mutationKey'\n>\nexport function mutationOptions<\n TData = unknown,\n TError = DefaultError,\n TVariables = void,\n TOnMutateResult = unknown,\n>(\n options: UseMutationOptions<TData, TError, TVariables, TOnMutateResult>,\n): UseMutationOptions<TData, TError, TVariables, TOnMutateResult> {\n return options\n}\n"],"mappings":";AA+BO,SAAS,gBAMd,SACgE;AAChE,SAAO;AACT;","names":[]}
|
||||
33
node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs
generated
vendored
Executable file
33
node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs
generated
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/queryOptions.ts
|
||||
var queryOptions_exports = {};
|
||||
__export(queryOptions_exports, {
|
||||
queryOptions: () => queryOptions
|
||||
});
|
||||
module.exports = __toCommonJS(queryOptions_exports);
|
||||
function queryOptions(options) {
|
||||
return options;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
queryOptions
|
||||
});
|
||||
//# sourceMappingURL=queryOptions.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/queryOptions.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type {\n DataTag,\n DefaultError,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryFunction,\n QueryKey,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseQueryOptions } from './types'\n\nexport type UndefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n initialData?:\n | undefined\n | InitialDataFunction<NonUndefinedGuard<TQueryFnData>>\n | NonUndefinedGuard<TQueryFnData>\n}\n\nexport type UnusedSkipTokenOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken | undefined\n >\n}\n\nexport type DefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n queryFn?: QueryFunction<TQueryFnData, TQueryKey>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoFO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
||||
4
node_modules/@tanstack/react-query/build/legacy/queryOptions.d.cts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/queryOptions.d.cts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { queryOptions_alias_1 as queryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UndefinedInitialDataOptions_alias_1 as UndefinedInitialDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UnusedSkipTokenOptions_alias_1 as UnusedSkipTokenOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedInitialDataOptions_alias_1 as DefinedInitialDataOptions } from './_tsup-dts-rollup.cjs';
|
||||
4
node_modules/@tanstack/react-query/build/legacy/queryOptions.d.ts
generated
vendored
Executable file
4
node_modules/@tanstack/react-query/build/legacy/queryOptions.d.ts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export { queryOptions_alias_1 as queryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UndefinedInitialDataOptions_alias_1 as UndefinedInitialDataOptions } from './_tsup-dts-rollup.js';
|
||||
export { UnusedSkipTokenOptions_alias_1 as UnusedSkipTokenOptions } from './_tsup-dts-rollup.js';
|
||||
export { DefinedInitialDataOptions_alias_1 as DefinedInitialDataOptions } from './_tsup-dts-rollup.js';
|
||||
8
node_modules/@tanstack/react-query/build/legacy/queryOptions.js
generated
vendored
Executable file
8
node_modules/@tanstack/react-query/build/legacy/queryOptions.js
generated
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
// src/queryOptions.ts
|
||||
function queryOptions(options) {
|
||||
return options;
|
||||
}
|
||||
export {
|
||||
queryOptions
|
||||
};
|
||||
//# sourceMappingURL=queryOptions.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/queryOptions.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/queryOptions.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/queryOptions.ts"],"sourcesContent":["import type {\n DataTag,\n DefaultError,\n InitialDataFunction,\n NonUndefinedGuard,\n OmitKeyof,\n QueryFunction,\n QueryKey,\n SkipToken,\n} from '@tanstack/query-core'\nimport type { UseQueryOptions } from './types'\n\nexport type UndefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {\n initialData?:\n | undefined\n | InitialDataFunction<NonUndefinedGuard<TQueryFnData>>\n | NonUndefinedGuard<TQueryFnData>\n}\n\nexport type UnusedSkipTokenOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n 'queryFn'\n> & {\n queryFn?: Exclude<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],\n SkipToken | undefined\n >\n}\n\nexport type DefinedInitialDataOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n queryFn?: QueryFunction<TQueryFnData, TQueryKey>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>,\n): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {\n queryKey: DataTag<TQueryKey, TQueryFnData, TError>\n}\n\nexport function queryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AAoFO,SAAS,aAAa,SAAkB;AAC7C,SAAO;AACT;","names":[]}
|
||||
58
node_modules/@tanstack/react-query/build/legacy/suspense.cjs
generated
vendored
Executable file
58
node_modules/@tanstack/react-query/build/legacy/suspense.cjs
generated
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/suspense.ts
|
||||
var suspense_exports = {};
|
||||
__export(suspense_exports, {
|
||||
defaultThrowOnError: () => defaultThrowOnError,
|
||||
ensureSuspenseTimers: () => ensureSuspenseTimers,
|
||||
fetchOptimistic: () => fetchOptimistic,
|
||||
shouldSuspend: () => shouldSuspend,
|
||||
willFetch: () => willFetch
|
||||
});
|
||||
module.exports = __toCommonJS(suspense_exports);
|
||||
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
|
||||
var ensureSuspenseTimers = (defaultedOptions) => {
|
||||
if (defaultedOptions.suspense) {
|
||||
const MIN_SUSPENSE_TIME_MS = 1e3;
|
||||
const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
||||
const originalStaleTime = defaultedOptions.staleTime;
|
||||
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
||||
if (typeof defaultedOptions.gcTime === "number") {
|
||||
defaultedOptions.gcTime = Math.max(
|
||||
defaultedOptions.gcTime,
|
||||
MIN_SUSPENSE_TIME_MS
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
||||
var shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending;
|
||||
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
||||
errorResetBoundary.clearReset();
|
||||
});
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
defaultThrowOnError,
|
||||
ensureSuspenseTimers,
|
||||
fetchOptimistic,
|
||||
shouldSuspend,
|
||||
willFetch
|
||||
});
|
||||
//# sourceMappingURL=suspense.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/suspense.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/suspense.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n) => defaultedOptions?.suspense && result.isPending\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset()\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,IAAM,sBAAsB,CAMjC,QACA,UACG,MAAM,MAAM,SAAS;AAEnB,IAAM,uBAAuB,CAClC,qBACG;AACH,MAAI,iBAAiB,UAAU;AAG7B,UAAM,uBAAuB;AAE7B,UAAM,QAAQ,CAAC,UACb,UAAU,WACN,QACA,KAAK,IAAI,SAAS,sBAAsB,oBAAoB;AAElE,UAAM,oBAAoB,iBAAiB;AAC3C,qBAAiB,YACf,OAAO,sBAAsB,aACzB,IAAI,SAAS,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAC7C,MAAM,iBAAiB;AAE7B,QAAI,OAAO,iBAAiB,WAAW,UAAU;AAC/C,uBAAiB,SAAS,KAAK;AAAA,QAC7B,iBAAiB;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,YAAY,CACvB,QACA,gBACG,OAAO,aAAa,OAAO,cAAc,CAAC;AAExC,IAAM,gBAAgB,CAC3B,kBAGA,YACG,qDAAkB,aAAY,OAAO;AAEnC,IAAM,kBAAkB,CAO7B,kBAOA,UACA,uBAEA,SAAS,gBAAgB,gBAAgB,EAAE,MAAM,MAAM;AACrD,qBAAmB,WAAW;AAChC,CAAC;","names":[]}
|
||||
5
node_modules/@tanstack/react-query/build/legacy/suspense.d.cts
generated
vendored
Executable file
5
node_modules/@tanstack/react-query/build/legacy/suspense.d.cts
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
export { defaultThrowOnError } from './_tsup-dts-rollup.cjs';
|
||||
export { ensureSuspenseTimers } from './_tsup-dts-rollup.cjs';
|
||||
export { willFetch } from './_tsup-dts-rollup.cjs';
|
||||
export { shouldSuspend } from './_tsup-dts-rollup.cjs';
|
||||
export { fetchOptimistic } from './_tsup-dts-rollup.cjs';
|
||||
5
node_modules/@tanstack/react-query/build/legacy/suspense.d.ts
generated
vendored
Executable file
5
node_modules/@tanstack/react-query/build/legacy/suspense.d.ts
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
export { defaultThrowOnError } from './_tsup-dts-rollup.js';
|
||||
export { ensureSuspenseTimers } from './_tsup-dts-rollup.js';
|
||||
export { willFetch } from './_tsup-dts-rollup.js';
|
||||
export { shouldSuspend } from './_tsup-dts-rollup.js';
|
||||
export { fetchOptimistic } from './_tsup-dts-rollup.js';
|
||||
29
node_modules/@tanstack/react-query/build/legacy/suspense.js
generated
vendored
Executable file
29
node_modules/@tanstack/react-query/build/legacy/suspense.js
generated
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
// src/suspense.ts
|
||||
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
|
||||
var ensureSuspenseTimers = (defaultedOptions) => {
|
||||
if (defaultedOptions.suspense) {
|
||||
const MIN_SUSPENSE_TIME_MS = 1e3;
|
||||
const clamp = (value) => value === "static" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
||||
const originalStaleTime = defaultedOptions.staleTime;
|
||||
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
||||
if (typeof defaultedOptions.gcTime === "number") {
|
||||
defaultedOptions.gcTime = Math.max(
|
||||
defaultedOptions.gcTime,
|
||||
MIN_SUSPENSE_TIME_MS
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
||||
var shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending;
|
||||
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
||||
errorResetBoundary.clearReset();
|
||||
});
|
||||
export {
|
||||
defaultThrowOnError,
|
||||
ensureSuspenseTimers,
|
||||
fetchOptimistic,
|
||||
shouldSuspend,
|
||||
willFetch
|
||||
};
|
||||
//# sourceMappingURL=suspense.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/suspense.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/suspense.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/suspense.ts"],"sourcesContent":["import type {\n DefaultError,\n DefaultedQueryObserverOptions,\n Query,\n QueryKey,\n QueryObserver,\n QueryObserverResult,\n} from '@tanstack/query-core'\nimport type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'\n\nexport const defaultThrowOnError = <\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n _error: TError,\n query: Query<TQueryFnData, TError, TData, TQueryKey>,\n) => query.state.data === undefined\n\nexport const ensureSuspenseTimers = (\n defaultedOptions: DefaultedQueryObserverOptions<any, any, any, any, any>,\n) => {\n if (defaultedOptions.suspense) {\n // Handle staleTime to ensure minimum 1000ms in Suspense mode\n // This prevents unnecessary refetching when components remount after suspending\n const MIN_SUSPENSE_TIME_MS = 1000\n\n const clamp = (value: number | 'static' | undefined) =>\n value === 'static'\n ? value\n : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS)\n\n const originalStaleTime = defaultedOptions.staleTime\n defaultedOptions.staleTime =\n typeof originalStaleTime === 'function'\n ? (...args) => clamp(originalStaleTime(...args))\n : clamp(originalStaleTime)\n\n if (typeof defaultedOptions.gcTime === 'number') {\n defaultedOptions.gcTime = Math.max(\n defaultedOptions.gcTime,\n MIN_SUSPENSE_TIME_MS,\n )\n }\n }\n}\n\nexport const willFetch = (\n result: QueryObserverResult<any, any>,\n isRestoring: boolean,\n) => result.isLoading && result.isFetching && !isRestoring\n\nexport const shouldSuspend = (\n defaultedOptions:\n | DefaultedQueryObserverOptions<any, any, any, any, any>\n | undefined,\n result: QueryObserverResult<any, any>,\n) => defaultedOptions?.suspense && result.isPending\n\nexport const fetchOptimistic = <\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey extends QueryKey,\n>(\n defaultedOptions: DefaultedQueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >,\n observer: QueryObserver<TQueryFnData, TError, TData, TQueryData, TQueryKey>,\n errorResetBoundary: QueryErrorResetBoundaryValue,\n) =>\n observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset()\n })\n"],"mappings":";AAUO,IAAM,sBAAsB,CAMjC,QACA,UACG,MAAM,MAAM,SAAS;AAEnB,IAAM,uBAAuB,CAClC,qBACG;AACH,MAAI,iBAAiB,UAAU;AAG7B,UAAM,uBAAuB;AAE7B,UAAM,QAAQ,CAAC,UACb,UAAU,WACN,QACA,KAAK,IAAI,SAAS,sBAAsB,oBAAoB;AAElE,UAAM,oBAAoB,iBAAiB;AAC3C,qBAAiB,YACf,OAAO,sBAAsB,aACzB,IAAI,SAAS,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAC7C,MAAM,iBAAiB;AAE7B,QAAI,OAAO,iBAAiB,WAAW,UAAU;AAC/C,uBAAiB,SAAS,KAAK;AAAA,QAC7B,iBAAiB;AAAA,QACjB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,IAAM,YAAY,CACvB,QACA,gBACG,OAAO,aAAa,OAAO,cAAc,CAAC;AAExC,IAAM,gBAAgB,CAC3B,kBAGA,YACG,qDAAkB,aAAY,OAAO;AAEnC,IAAM,kBAAkB,CAO7B,kBAOA,UACA,uBAEA,SAAS,gBAAgB,gBAAgB,EAAE,MAAM,MAAM;AACrD,qBAAmB,WAAW;AAChC,CAAC;","names":[]}
|
||||
19
node_modules/@tanstack/react-query/build/legacy/types.cjs
generated
vendored
Executable file
19
node_modules/@tanstack/react-query/build/legacy/types.cjs
generated
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/types.ts
|
||||
var types_exports = {};
|
||||
module.exports = __toCommonJS(types_exports);
|
||||
//# sourceMappingURL=types.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/types.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/types.cjs.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
24
node_modules/@tanstack/react-query/build/legacy/types.d.cts
generated
vendored
Executable file
24
node_modules/@tanstack/react-query/build/legacy/types.d.cts
generated
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
export { AnyUseBaseQueryOptions_alias_1 as AnyUseBaseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseQueryOptions_alias_1 as UseBaseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UsePrefetchQueryOptions_alias_1 as UsePrefetchQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseQueryOptions_alias_1 as AnyUseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseQueryOptions_alias_1 as UseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseSuspenseQueryOptions_alias_1 as AnyUseSuspenseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseQueryOptions_alias_1 as UseSuspenseQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseInfiniteQueryOptions_alias_1 as AnyUseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseInfiniteQueryOptions_alias_1 as UseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseSuspenseInfiniteQueryOptions_alias_1 as AnyUseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseInfiniteQueryOptions_alias_1 as UseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseQueryResult_alias_1 as UseBaseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseQueryResult_alias_1 as UseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseQueryResult_alias_1 as UseSuspenseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedUseQueryResult_alias_1 as DefinedUseQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseInfiniteQueryResult_alias_1 as UseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { DefinedUseInfiniteQueryResult_alias_1 as DefinedUseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseSuspenseInfiniteQueryResult_alias_1 as UseSuspenseInfiniteQueryResult } from './_tsup-dts-rollup.cjs';
|
||||
export { AnyUseMutationOptions_alias_1 as AnyUseMutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutationOptions_alias_1 as UseMutationOptions } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutateFunction_alias_1 as UseMutateFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutateAsyncFunction_alias_1 as UseMutateAsyncFunction } from './_tsup-dts-rollup.cjs';
|
||||
export { UseBaseMutationResult_alias_1 as UseBaseMutationResult } from './_tsup-dts-rollup.cjs';
|
||||
export { UseMutationResult_alias_1 as UseMutationResult } from './_tsup-dts-rollup.cjs';
|
||||
24
node_modules/@tanstack/react-query/build/legacy/types.d.ts
generated
vendored
Executable file
24
node_modules/@tanstack/react-query/build/legacy/types.d.ts
generated
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
export { AnyUseBaseQueryOptions_alias_1 as AnyUseBaseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseQueryOptions_alias_1 as UseBaseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UsePrefetchQueryOptions_alias_1 as UsePrefetchQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseQueryOptions_alias_1 as AnyUseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseQueryOptions_alias_1 as UseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseSuspenseQueryOptions_alias_1 as AnyUseSuspenseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseQueryOptions_alias_1 as UseSuspenseQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseInfiniteQueryOptions_alias_1 as AnyUseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseInfiniteQueryOptions_alias_1 as UseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseSuspenseInfiniteQueryOptions_alias_1 as AnyUseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseInfiniteQueryOptions_alias_1 as UseSuspenseInfiniteQueryOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseQueryResult_alias_1 as UseBaseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseQueryResult_alias_1 as UseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseQueryResult_alias_1 as UseSuspenseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedUseQueryResult_alias_1 as DefinedUseQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseInfiniteQueryResult_alias_1 as UseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { DefinedUseInfiniteQueryResult_alias_1 as DefinedUseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { UseSuspenseInfiniteQueryResult_alias_1 as UseSuspenseInfiniteQueryResult } from './_tsup-dts-rollup.js';
|
||||
export { AnyUseMutationOptions_alias_1 as AnyUseMutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseMutationOptions_alias_1 as UseMutationOptions } from './_tsup-dts-rollup.js';
|
||||
export { UseMutateFunction_alias_1 as UseMutateFunction } from './_tsup-dts-rollup.js';
|
||||
export { UseMutateAsyncFunction_alias_1 as UseMutateAsyncFunction } from './_tsup-dts-rollup.js';
|
||||
export { UseBaseMutationResult_alias_1 as UseBaseMutationResult } from './_tsup-dts-rollup.js';
|
||||
export { UseMutationResult_alias_1 as UseMutationResult } from './_tsup-dts-rollup.js';
|
||||
1
node_modules/@tanstack/react-query/build/legacy/types.js
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/types.js
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/types.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/types.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
||||
133
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs
generated
vendored
Executable file
133
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs
generated
vendored
Executable file
@@ -0,0 +1,133 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/useBaseQuery.ts
|
||||
var useBaseQuery_exports = {};
|
||||
__export(useBaseQuery_exports, {
|
||||
useBaseQuery: () => useBaseQuery
|
||||
});
|
||||
module.exports = __toCommonJS(useBaseQuery_exports);
|
||||
var React = __toESM(require("react"), 1);
|
||||
var import_query_core = require("@tanstack/query-core");
|
||||
var import_QueryClientProvider = require("./QueryClientProvider.cjs");
|
||||
var import_QueryErrorResetBoundary = require("./QueryErrorResetBoundary.cjs");
|
||||
var import_errorBoundaryUtils = require("./errorBoundaryUtils.cjs");
|
||||
var import_IsRestoringProvider = require("./IsRestoringProvider.cjs");
|
||||
var import_suspense = require("./suspense.cjs");
|
||||
function useBaseQuery(options, Observer, queryClient) {
|
||||
var _a, _b, _c, _d;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (typeof options !== "object" || Array.isArray(options)) {
|
||||
throw new Error(
|
||||
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
||||
);
|
||||
}
|
||||
}
|
||||
const isRestoring = (0, import_IsRestoringProvider.useIsRestoring)();
|
||||
const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
|
||||
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
|
||||
const defaultedOptions = client.defaultQueryOptions(options);
|
||||
(_b = (_a = client.getDefaultOptions().queries) == null ? void 0 : _a._experimental_beforeQuery) == null ? void 0 : _b.call(
|
||||
_a,
|
||||
defaultedOptions
|
||||
);
|
||||
const query = client.getQueryCache().get(defaultedOptions.queryHash);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (!defaultedOptions.queryFn) {
|
||||
console.error(
|
||||
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
||||
);
|
||||
}
|
||||
}
|
||||
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
||||
(0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
|
||||
(0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary, query);
|
||||
(0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
|
||||
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
||||
const [observer] = React.useState(
|
||||
() => new Observer(
|
||||
client,
|
||||
defaultedOptions
|
||||
)
|
||||
);
|
||||
const result = observer.getOptimisticResult(defaultedOptions);
|
||||
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
||||
React.useSyncExternalStore(
|
||||
React.useCallback(
|
||||
(onStoreChange) => {
|
||||
const unsubscribe = shouldSubscribe ? observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)) : import_query_core.noop;
|
||||
observer.updateResult();
|
||||
return unsubscribe;
|
||||
},
|
||||
[observer, shouldSubscribe]
|
||||
),
|
||||
() => observer.getCurrentResult(),
|
||||
() => observer.getCurrentResult()
|
||||
);
|
||||
React.useEffect(() => {
|
||||
observer.setOptions(defaultedOptions);
|
||||
}, [defaultedOptions, observer]);
|
||||
if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
|
||||
throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
|
||||
}
|
||||
if ((0, import_errorBoundaryUtils.getHasError)({
|
||||
result,
|
||||
errorResetBoundary,
|
||||
throwOnError: defaultedOptions.throwOnError,
|
||||
query,
|
||||
suspense: defaultedOptions.suspense
|
||||
})) {
|
||||
throw result.error;
|
||||
}
|
||||
;
|
||||
(_d = (_c = client.getDefaultOptions().queries) == null ? void 0 : _c._experimental_afterQuery) == null ? void 0 : _d.call(
|
||||
_c,
|
||||
defaultedOptions,
|
||||
result
|
||||
);
|
||||
if (defaultedOptions.experimental_prefetchInRender && !import_query_core.environmentManager.isServer() && (0, import_suspense.willFetch)(result, isRestoring)) {
|
||||
const promise = isNewCacheEntry ? (
|
||||
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
||||
(0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
|
||||
) : (
|
||||
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
||||
query == null ? void 0 : query.promise
|
||||
);
|
||||
promise == null ? void 0 : promise.catch(import_query_core.noop).finally(() => {
|
||||
observer.updateResult();
|
||||
});
|
||||
}
|
||||
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
useBaseQuery
|
||||
});
|
||||
//# sourceMappingURL=useBaseQuery.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.cjs.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.cts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.cts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { useBaseQuery } from './_tsup-dts-rollup.cjs';
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.ts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.d.ts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { useBaseQuery } from './_tsup-dts-rollup.js';
|
||||
108
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js
generated
vendored
Executable file
108
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js
generated
vendored
Executable file
@@ -0,0 +1,108 @@
|
||||
"use client";
|
||||
|
||||
// src/useBaseQuery.ts
|
||||
import * as React from "react";
|
||||
import { environmentManager, noop, notifyManager } from "@tanstack/query-core";
|
||||
import { useQueryClient } from "./QueryClientProvider.js";
|
||||
import { useQueryErrorResetBoundary } from "./QueryErrorResetBoundary.js";
|
||||
import {
|
||||
ensurePreventErrorBoundaryRetry,
|
||||
getHasError,
|
||||
useClearResetErrorBoundary
|
||||
} from "./errorBoundaryUtils.js";
|
||||
import { useIsRestoring } from "./IsRestoringProvider.js";
|
||||
import {
|
||||
ensureSuspenseTimers,
|
||||
fetchOptimistic,
|
||||
shouldSuspend,
|
||||
willFetch
|
||||
} from "./suspense.js";
|
||||
function useBaseQuery(options, Observer, queryClient) {
|
||||
var _a, _b, _c, _d;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (typeof options !== "object" || Array.isArray(options)) {
|
||||
throw new Error(
|
||||
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
||||
);
|
||||
}
|
||||
}
|
||||
const isRestoring = useIsRestoring();
|
||||
const errorResetBoundary = useQueryErrorResetBoundary();
|
||||
const client = useQueryClient(queryClient);
|
||||
const defaultedOptions = client.defaultQueryOptions(options);
|
||||
(_b = (_a = client.getDefaultOptions().queries) == null ? void 0 : _a._experimental_beforeQuery) == null ? void 0 : _b.call(
|
||||
_a,
|
||||
defaultedOptions
|
||||
);
|
||||
const query = client.getQueryCache().get(defaultedOptions.queryHash);
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (!defaultedOptions.queryFn) {
|
||||
console.error(
|
||||
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
||||
);
|
||||
}
|
||||
}
|
||||
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
||||
ensureSuspenseTimers(defaultedOptions);
|
||||
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
|
||||
useClearResetErrorBoundary(errorResetBoundary);
|
||||
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
||||
const [observer] = React.useState(
|
||||
() => new Observer(
|
||||
client,
|
||||
defaultedOptions
|
||||
)
|
||||
);
|
||||
const result = observer.getOptimisticResult(defaultedOptions);
|
||||
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
||||
React.useSyncExternalStore(
|
||||
React.useCallback(
|
||||
(onStoreChange) => {
|
||||
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
|
||||
observer.updateResult();
|
||||
return unsubscribe;
|
||||
},
|
||||
[observer, shouldSubscribe]
|
||||
),
|
||||
() => observer.getCurrentResult(),
|
||||
() => observer.getCurrentResult()
|
||||
);
|
||||
React.useEffect(() => {
|
||||
observer.setOptions(defaultedOptions);
|
||||
}, [defaultedOptions, observer]);
|
||||
if (shouldSuspend(defaultedOptions, result)) {
|
||||
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
||||
}
|
||||
if (getHasError({
|
||||
result,
|
||||
errorResetBoundary,
|
||||
throwOnError: defaultedOptions.throwOnError,
|
||||
query,
|
||||
suspense: defaultedOptions.suspense
|
||||
})) {
|
||||
throw result.error;
|
||||
}
|
||||
;
|
||||
(_d = (_c = client.getDefaultOptions().queries) == null ? void 0 : _c._experimental_afterQuery) == null ? void 0 : _d.call(
|
||||
_c,
|
||||
defaultedOptions,
|
||||
result
|
||||
);
|
||||
if (defaultedOptions.experimental_prefetchInRender && !environmentManager.isServer() && willFetch(result, isRestoring)) {
|
||||
const promise = isNewCacheEntry ? (
|
||||
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
||||
fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
|
||||
) : (
|
||||
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
||||
query == null ? void 0 : query.promise
|
||||
);
|
||||
promise == null ? void 0 : promise.catch(noop).finally(() => {
|
||||
observer.updateResult();
|
||||
});
|
||||
}
|
||||
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
||||
}
|
||||
export {
|
||||
useBaseQuery
|
||||
};
|
||||
//# sourceMappingURL=useBaseQuery.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
40
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs
generated
vendored
Executable file
40
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs
generated
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/useInfiniteQuery.ts
|
||||
var useInfiniteQuery_exports = {};
|
||||
__export(useInfiniteQuery_exports, {
|
||||
useInfiniteQuery: () => useInfiniteQuery
|
||||
});
|
||||
module.exports = __toCommonJS(useInfiniteQuery_exports);
|
||||
var import_query_core = require("@tanstack/query-core");
|
||||
var import_useBaseQuery = require("./useBaseQuery.cjs");
|
||||
function useInfiniteQuery(options, queryClient) {
|
||||
return (0, import_useBaseQuery.useBaseQuery)(
|
||||
options,
|
||||
import_query_core.InfiniteQueryObserver,
|
||||
queryClient
|
||||
);
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
useInfiniteQuery
|
||||
});
|
||||
//# sourceMappingURL=useInfiniteQuery.cjs.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.cjs.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'use client'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): DefinedUseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery(\n options: UseInfiniteQueryOptions,\n queryClient?: QueryClient,\n) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAsC;AACtC,0BAA6B;AAqEtB,SAAS,iBACd,SACA,aACA;AACA,aAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.cts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.cts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { useInfiniteQuery_alias_1 as useInfiniteQuery } from './_tsup-dts-rollup.cjs';
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.ts
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.d.ts
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
export { useInfiniteQuery_alias_1 as useInfiniteQuery } from './_tsup-dts-rollup.js';
|
||||
16
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js
generated
vendored
Executable file
16
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js
generated
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
// src/useInfiniteQuery.ts
|
||||
import { InfiniteQueryObserver } from "@tanstack/query-core";
|
||||
import { useBaseQuery } from "./useBaseQuery.js";
|
||||
function useInfiniteQuery(options, queryClient) {
|
||||
return useBaseQuery(
|
||||
options,
|
||||
InfiniteQueryObserver,
|
||||
queryClient
|
||||
);
|
||||
}
|
||||
export {
|
||||
useInfiniteQuery
|
||||
};
|
||||
//# sourceMappingURL=useInfiniteQuery.js.map
|
||||
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js.map
generated
vendored
Executable file
1
node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/useInfiniteQuery.ts"],"sourcesContent":["'use client'\nimport { InfiniteQueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n InfiniteData,\n QueryClient,\n QueryKey,\n QueryObserver,\n} from '@tanstack/query-core'\nimport type {\n DefinedUseInfiniteQueryResult,\n UseInfiniteQueryOptions,\n UseInfiniteQueryResult,\n} from './types'\nimport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): DefinedUseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n queryClient?: QueryClient,\n): UseInfiniteQueryResult<TData, TError>\n\nexport function useInfiniteQuery(\n options: UseInfiniteQueryOptions,\n queryClient?: QueryClient,\n) {\n return useBaseQuery(\n options,\n InfiniteQueryObserver as typeof QueryObserver,\n queryClient,\n )\n}\n"],"mappings":";;;AACA,SAAS,6BAA6B;AACtC,SAAS,oBAAoB;AAqEtB,SAAS,iBACd,SACA,aACA;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user