@ainias42/tanstack-ids 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/QueryContext/QueriesContextProvider.js +2 -2
  2. package/dist/QueryContext/QueriesContextProvider.js.map +1 -1
  3. package/dist/QueryContext/SubQueriesContext.js +3 -3
  4. package/dist/QueryContext/SubQueriesContext.js.map +1 -1
  5. package/dist/QueryContext/useGenerateQueriesContextId.js +1 -1
  6. package/dist/QueryContext/useGenerateQueriesContextId.js.map +1 -1
  7. package/dist/QueryContext/useQueriesError.js +2 -2
  8. package/dist/QueryContext/useQueriesError.js.map +1 -1
  9. package/dist/QueryContext/useQueriesIsFetching.js +2 -2
  10. package/dist/QueryContext/useQueriesIsFetching.js.map +1 -1
  11. package/dist/QueryContext/useQueriesReload.js +2 -2
  12. package/dist/QueryContext/useQueriesReload.js.map +1 -1
  13. package/dist/QueryContext/useQuerySubscribeToReload.js +2 -2
  14. package/dist/QueryContext/useQuerySubscribeToReload.js.map +1 -1
  15. package/dist/QueryContext/useScopedQueriesIsFetching.js +2 -2
  16. package/dist/QueryContext/useScopedQueriesIsFetching.js.map +1 -1
  17. package/dist/generateIdsQuery.d.ts +7 -7
  18. package/dist/generateNestedIdQuery.d.ts +12 -12
  19. package/dist/hooks/useIndexedData.d.ts +1 -1
  20. package/dist/noop.js +1 -0
  21. package/dist/noop.js.map +1 -1
  22. package/dist/tsconfig.tsbuildinfo +1 -1
  23. package/package.json +37 -38
  24. package/src/QueryContext/QueriesContextProvider.tsx +2 -2
  25. package/src/QueryContext/SubQueriesContext.tsx +3 -3
  26. package/src/QueryContext/useGenerateQueriesContextId.ts +1 -1
  27. package/src/QueryContext/useQueriesError.ts +2 -2
  28. package/src/QueryContext/useQueriesIsFetching.ts +2 -2
  29. package/src/QueryContext/useQueriesReload.ts +2 -2
  30. package/src/QueryContext/useQuerySubscribeToReload.ts +2 -2
  31. package/src/QueryContext/useScopedQueriesIsFetching.ts +2 -2
  32. package/src/generateIdsQuery.ts +5 -5
  33. package/src/generateNestedIdQuery.ts +3 -3
  34. package/src/generateQuery.ts +2 -2
  35. package/src/noop.ts +1 -0
  36. package/stylelint.config.mjs +4 -0
  37. package/tsconfig.json +8 -24
package/package.json CHANGED
@@ -1,40 +1,39 @@
1
1
  {
2
- "name": "@ainias42/tanstack-ids",
3
- "version": "0.0.4",
4
- "description": "",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "main": "dist/index.js",
9
- "exports": {
10
- ".": "./dist/index.js"
11
- },
12
- "scripts": {
13
- "build": "ctix build && tsc && tsc-alias",
14
- "lint:noCache": "eslint \"src/{**/*,*}.{js,jsx,tsx,ts}\" --max-warnings 0",
15
- "lint": "npm run lint:noCache -- --cache",
16
- "lint:fix": "npm run lint -- --fix",
17
- "typecheck": "tsc --noEmit",
18
- "prettier": "npm run prettier:list -- --write",
19
- "prettier:list": "prettier --list-different \"src/**/*.{ts,tsx,js,jsx,json}\""
20
- },
21
- "type": "module",
22
- "author": "",
23
- "repository": {
24
- "type": "git",
25
- "url": "gitea@git.silas.link:Ainias/libraries.git"
26
- },
27
- "dependencies": {
28
- "@ainias42/config": "*",
29
- "@types/react": "^19.1.11",
30
- "@ainias42/js-helper": "^0.8.17",
31
- "@tanstack/react-query": "^5.85.5",
32
- "@yornaath/batshit": "^0.10.1",
33
- "react-query-kit": "^3.3.2",
34
- "zustand": "^5.0.8",
35
- "react": "^19.1.1"
36
- },
37
- "devDependencies": {
38
- "ctix": "^2.7.1"
39
- }
2
+ "name": "@ainias42/tanstack-ids",
3
+ "version": "0.0.6",
4
+ "description": "",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "main": "dist/index.js",
9
+ "exports": {
10
+ ".": "./dist/index.js"
11
+ },
12
+ "scripts": {
13
+ "build": "ctix build && tsc && tsc-alias",
14
+ "lint:noCache": "eslint \"src/{**/*,*}.{js,jsx,tsx,ts}\" --max-warnings 0",
15
+ "lint": "npm run lint:noCache -- --cache",
16
+ "lint:fix": "npm run lint -- --fix",
17
+ "typecheck": "tsc --noEmit",
18
+ "prettier": "npm run prettier:list -- --write",
19
+ "prettier:list": "prettier --list-different \"src/**/*.{ts,tsx,js,jsx,json}\"",
20
+ "stylelint": "stylelint --allow-empty-input \"src/**/*.{css,scss}\"",
21
+ "stylelint:fix": "npm run stylelint -- --fix"
22
+ },
23
+ "type": "module",
24
+ "author": "",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "gitea@git.silas.link:Ainias/libraries.git"
28
+ },
29
+ "dependencies": {
30
+ "@ainias42/react-bootstrap-mobile": "*",
31
+ "@ainias42/config": "*",
32
+ "@ainias42/js-helper": ">=0.8.19",
33
+ "@tanstack/react-query": "^5.85.5",
34
+ "@yornaath/batshit": "^0.10.1",
35
+ "react-query-kit": "^3.3.2",
36
+ "zustand": "^5.0.8"
37
+ },
38
+ "devDependencies": {}
40
39
  }
@@ -1,5 +1,5 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
2
- import { useGenerateQueriesContextId } from '@/QueryContext/useGenerateQueriesContextId';
1
+ import { QueriesContext } from './QueriesContext';
2
+ import { useGenerateQueriesContextId } from './useGenerateQueriesContextId';
3
3
  import { withMemo } from '@ainias42/react-bootstrap-mobile';
4
4
  import React from 'react';
5
5
  import type { ReactNode } from 'react';
@@ -1,7 +1,7 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useClientLayoutEffect, withMemo } from '@ainias42/react-bootstrap-mobile';
3
- import { useGenerateQueriesContextId } from '@/QueryContext/useGenerateQueriesContextId';
4
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
3
+ import { useGenerateQueriesContextId } from './useGenerateQueriesContextId';
4
+ import { useQueriesStore } from './useQueriesStore';
5
5
  import React, { type ReactNode, useContext } from 'react';
6
6
 
7
7
  export type SubQueriesContextProps = { children: ReactNode; subContextId?: number };
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
2
+ import { useQueriesStore } from './useQueriesStore';
3
3
 
4
4
  export function useGenerateQueriesContextId() {
5
5
  const generateId = useQueriesStore((s) => s.generateContextId);
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
3
+ import { useQueriesStore } from './useQueriesStore';
4
4
 
5
5
  export function useQueriesError(contextId?: number) {
6
6
  const context = useContext(QueriesContext);
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
3
+ import { useQueriesStore } from './useQueriesStore';
4
4
 
5
5
  export function useQueriesIsFetching(contextId?: number) {
6
6
  const context = useContext(QueriesContext);
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useCallback, useContext } from 'react';
3
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
3
+ import { useQueriesStore } from './useQueriesStore';
4
4
  import { useQueryClient } from '@tanstack/react-query';
5
5
 
6
6
  export function useQueriesReload(contextId?: number) {
@@ -1,7 +1,7 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useClientLayoutEffect } from '@ainias42/react-bootstrap-mobile';
3
3
  import { useContext, useRef } from 'react';
4
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
4
+ import { useQueriesStore } from './useQueriesStore';
5
5
 
6
6
  export function useQueriesSubscribeToReload(keys: string[], isFetching: boolean, error: any) {
7
7
  const contextId = useContext(QueriesContext);
@@ -1,6 +1,6 @@
1
- import { QueriesContext } from '@/QueryContext/QueriesContext';
1
+ import { QueriesContext } from './QueriesContext';
2
2
  import { useContext } from 'react';
3
- import { useQueriesStore } from '@/QueryContext/useQueriesStore';
3
+ import { useQueriesStore } from './useQueriesStore';
4
4
 
5
5
  export function useScopedQueriesIsFetching(scope: { global: boolean; subContexts: boolean }, contextId?: number) {
6
6
  const context = useContext(QueriesContext);
@@ -1,13 +1,13 @@
1
1
  import { ArrayHelper, JsonHelper } from '@ainias42/js-helper';
2
- import { NotFoundError } from '@/NotFoundError';
2
+ import { NotFoundError } from './NotFoundError';
3
3
  import { create, windowScheduler } from '@yornaath/batshit';
4
4
  import { createInfiniteQuery, createQuery } from 'react-query-kit';
5
- import { generateQuery } from '@/generateQuery';
5
+ import { generateQuery } from './generateQuery';
6
6
  import { hashKey, useQueries, useQueryClient } from '@tanstack/react-query';
7
- import { hoistReactQueryKitAttributes } from '@/hoistReactQueryKitAttributes';
8
- import { useIndexedData } from '@/hooks/useIndexedData';
7
+ import { hoistReactQueryKitAttributes } from './hoistReactQueryKitAttributes';
8
+ import { useIndexedData } from './hooks/useIndexedData';
9
9
  import { useMemo, useRef } from 'react';
10
- import { useQueriesSubscribeToReload } from '@/QueryContext/useQuerySubscribeToReload';
10
+ import { useQueriesSubscribeToReload } from './QueryContext/useQuerySubscribeToReload';
11
11
  import type { Awaitable, Override, URecord } from '@ainias42/js-helper';
12
12
  import type { CreateInfiniteQueryOptions, CreateQueryOptions, QueryHookOptions } from 'react-query-kit';
13
13
  import type { QueriesResults } from '@tanstack/react-query/build/legacy/useQueries';
@@ -1,8 +1,8 @@
1
- import { generateIdsQuery } from '@/generateIdsQuery';
1
+ import { generateIdsQuery } from './generateIdsQuery';
2
2
  import { hashKey } from '@tanstack/react-query';
3
- import { noop } from '@/noop';
3
+ import { noop } from './noop';
4
4
  import { useMemo } from 'react';
5
- import type { DeepPartial } from '@/types/DeepPartial';
5
+ import type { DeepPartial } from './types/DeepPartial';
6
6
 
7
7
  export function generateNestedIdQuery<
8
8
  IdType extends number | string | symbol,
@@ -1,7 +1,7 @@
1
1
  import { createQuery } from 'react-query-kit';
2
2
  import { hashKey } from '@tanstack/react-query';
3
- import { hoistReactQueryKitAttributes } from '@/hoistReactQueryKitAttributes';
4
- import { useQueriesSubscribeToReload } from '@/QueryContext/useQuerySubscribeToReload';
3
+ import { hoistReactQueryKitAttributes } from './hoistReactQueryKitAttributes';
4
+ import { useQueriesSubscribeToReload } from './QueryContext/useQuerySubscribeToReload';
5
5
  import type { CreateQueryOptions, QueryHookResult } from 'react-query-kit';
6
6
 
7
7
  export function generateQuery<
package/src/noop.ts CHANGED
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1
2
  export function noop() {}
@@ -0,0 +1,4 @@
1
+ /** @type {import('stylelint').Config} */
2
+ export default {
3
+ extends: ['@ainias42/config/stylelint.config.mjs'],
4
+ };
package/tsconfig.json CHANGED
@@ -1,26 +1,10 @@
1
1
  {
2
- "extends": "@ainias42/config/tsconfig.json",
3
- "compilerOptions": {
4
- "jsx": "react",
5
- "outDir": "./dist",
6
- "declaration": true,
7
- "baseUrl": "./",
8
- "paths": {
9
- "@/*": [
10
- "src/*"
11
- ],
12
- "@cli/*": [
13
- "cli/*"
14
- ]
15
- }
16
- },
17
- "exclude": [
18
- "../../node_modules",
19
- "dist/**/*",
20
- "dist/src/**/*"
21
- ],
22
- "include": [
23
- "src/**/*.tsx",
24
- "src/**/*.ts"
25
- ]
2
+ "extends": "@ainias42/config/tsconfig.json",
3
+ "compilerOptions": {
4
+ "jsx": "react",
5
+ "outDir": "./dist",
6
+ "declaration": true
7
+ },
8
+ "exclude": ["../../node_modules", "dist/**/*", "dist/src/**/*"],
9
+ "include": ["src/**/*.tsx", "src/**/*.ts"]
26
10
  }