-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alpha' into add-prevQuery-placeholderFn
- Loading branch information
Showing
55 changed files
with
4,764 additions
and
3,814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// @ts-check | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
const config = { | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: './tsconfig.eslint.json', | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'react-hooks/rules-of-hooks': 'off', | ||
'react/jsx-key': 'off', | ||
}, | ||
} | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "@tanstack/query-devtools", | ||
"version": "5.0.0-alpha.30", | ||
"description": "Developer tools to interact with and visualize the TanStack Query cache", | ||
"author": "tannerlinsley", | ||
"license": "MIT", | ||
"repository": "tanstack/query", | ||
"homepage": "https://tanstack.com/query", | ||
"funding": { | ||
"type": "github", | ||
"url": "https://github.com/sponsors/tannerlinsley" | ||
}, | ||
"types": "build/types/index.d.ts", | ||
"main": "build/umd/index.js", | ||
"module": "build/esm/index.mjs", | ||
"exports": { | ||
".": { | ||
"types": "./build/types/index.d.ts", | ||
"import": "./build/esm/index.mjs", | ||
"require": "./build/umd/index.js", | ||
"default": "./build/umd/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf ./build", | ||
"test:eslint": "eslint --ext .ts,.tsx ./src", | ||
"test:types": "tsc", | ||
"test:lib": "vitest run --coverage", | ||
"test:lib:dev": "pnpm run test:lib --watch", | ||
"build:types": "tsc --build" | ||
}, | ||
"files": [ | ||
"build", | ||
"src" | ||
], | ||
"devDependencies": { | ||
"vite-plugin-solid": "^2.5.0", | ||
"@tanstack/query-core": "workspace:*" | ||
}, | ||
"dependencies": { | ||
"@emotion/css": "^11.10.5", | ||
"@solid-primitives/keyed": "^1.1.4", | ||
"@solid-primitives/resize-observer": "^2.0.15", | ||
"@solid-primitives/storage": "^1.3.9", | ||
"@tanstack/match-sorter-utils": "^8.8.4", | ||
"solid-js": "^1.6.10", | ||
"solid-transition-group": "^0.2.2", | ||
"superjson": "^1.12.1" | ||
}, | ||
"peerDependencies": { | ||
"@tanstack/query-core": "workspace:*" | ||
}, | ||
"peerDependenciesMeta": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import type { QueryClient, onlineManager, Query } from '@tanstack/query-core' | ||
import { createContext, useContext } from 'solid-js' | ||
|
||
type XPosition = 'left' | 'right' | ||
type YPosition = 'top' | 'bottom' | ||
export type DevtoolsPosition = XPosition | YPosition | ||
export type DevtoolsButtonPosition = `${YPosition}-${XPosition}` | ||
|
||
export interface DevToolsErrorType { | ||
/** | ||
* The name of the error. | ||
*/ | ||
name: string | ||
/** | ||
* How the error is initialized. | ||
*/ | ||
initializer: (query: Query) => Error | ||
} | ||
|
||
export interface QueryDevtoolsProps { | ||
readonly client: QueryClient | ||
queryFlavor: string | ||
version: string | ||
onlineManager: typeof onlineManager | ||
|
||
buttonPosition?: DevtoolsButtonPosition | ||
position?: DevtoolsPosition | ||
initialIsOpen?: boolean | ||
errorTypes?: DevToolsErrorType[] | ||
} | ||
|
||
export const QueryDevtoolsContext = createContext<QueryDevtoolsProps>({ | ||
client: undefined as unknown as QueryClient, | ||
onlineManager: undefined as unknown as typeof onlineManager, | ||
queryFlavor: '', | ||
version: '', | ||
}) | ||
|
||
export function useQueryDevtoolsContext() { | ||
return useContext(QueryDevtoolsContext) | ||
} |
Oops, something went wrong.