reactjrx 2.2.0 → 3.0.1

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.
@@ -17,10 +17,9 @@ type AdaptedMutationCallbacks<TData, TError, TVariables, TOnMutateResult> = {
17
17
  }, TOnMutateResult>[K] | undefined;
18
18
  };
19
19
  /**
20
- * Hooks built on top of `useMutation$` (`useSwitchMutation$`,
21
- * `useConcatMutation$`) run their inner mutation with the user variables
22
- * wrapped in an envelope (`{ variables, ... }`). This adapts the user-facing
23
- * callbacks, which expect the raw variables, to that envelope.
20
+ * `useSwitchMutation$` runs its inner mutation with the user variables
21
+ * wrapped in an envelope (`{ variables, abort }`). This adapts the
22
+ * user-facing callbacks, which expect the raw variables, to that envelope.
24
23
  */
25
24
  export declare function adaptCallbacksToWrappedVariables<TData, TError, TVariables, TOnMutateResult>({ onMutate, onSuccess, onError, onSettled, }: MutationCallbacks<TData, TError, TVariables, TOnMutateResult>): AdaptedMutationCallbacks<TData, TError, TVariables, TOnMutateResult>;
26
25
  export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reactjrx",
3
3
  "private": false,
4
- "version": "2.2.0",
4
+ "version": "3.0.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -39,28 +39,29 @@
39
39
  "rxjs": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@biomejs/biome": "2.5.15",
43
- "@rolldown/plugin-babel": "^0.2.3",
44
- "@tanstack/react-query-persist-client": "^5.96.2",
42
+ "@biomejs/biome": "2.6.4",
43
+ "@rolldown/plugin-babel": "^0.3.0",
44
+ "@tanstack/react-query-persist-client": "^5.105.3",
45
45
  "@testing-library/jest-dom": "^7.0.0",
46
46
  "@testing-library/react": "^16.1.0",
47
- "@types/node": "^26.6.5",
47
+ "@types/node": "^26.6.6",
48
48
  "@types/react": "^19.0.2",
49
49
  "@types/react-dom": "^19.0.2",
50
- "@vitejs/plugin-react": "^6.0.4",
50
+ "@typescript/typescript6": "^6.0.2",
51
+ "@vitejs/plugin-react": "^6.2.1",
51
52
  "babel-plugin-react-compiler": "^1.0.0",
52
53
  "husky": "^9.1.7",
53
- "jsdom": "^29.1.1",
54
+ "jsdom": "^30.1.3",
54
55
  "lint-staged": "^17.2.0",
55
56
  "react": "^19.0.0",
56
57
  "react-dom": "^19.2.8",
57
58
  "rxjs": "^7.8.0",
58
59
  "semantic-release": "^25.0.8",
59
60
  "terser": "^5.46.0",
60
- "typescript": "^6.0.2",
61
- "vite": "^8.1.5",
61
+ "typescript": "^7.0.2",
62
+ "vite": "^8.3.5",
62
63
  "vite-plugin-dts": "^5.0.1",
63
- "vitest": "^5.0.5"
64
+ "vitest": "^5.1.0"
64
65
  },
65
66
  "repository": {
66
67
  "type": "git",
@@ -1,99 +0,0 @@
1
- import { DefaultError, MutationKey, QueryClient } from '@tanstack/react-query';
2
- import { BehaviorSubject, Subject } from 'rxjs';
3
- import { UseMutation$Options } from './useMutation$';
4
- export declare function useConcatMutation$<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(options: UseMutation$Options<TData | null, TError, TVariables, TContext> & {
5
- mutationKey: MutationKey;
6
- }, queryClient?: QueryClient): {
7
- mutate: (variables: TVariables) => void;
8
- mutateAsync: (variables: TVariables) => Promise<TData | null>;
9
- state$: BehaviorSubject<Pick<import('@tanstack/react-query').UseMutationResult<TData | null, TError, {
10
- variables: TVariables;
11
- ready$: Subject<boolean>;
12
- }, TContext>, "status" | "isPending" | "isError" | "isSuccess" | "isIdle">>;
13
- data: undefined;
14
- variables: undefined;
15
- error: null;
16
- isError: false;
17
- isIdle: true;
18
- isPending: false;
19
- isSuccess: false;
20
- status: "idle";
21
- reset: () => void;
22
- context: TContext | undefined;
23
- failureCount: number;
24
- failureReason: TError | null;
25
- isPaused: boolean;
26
- submittedAt: number;
27
- } | {
28
- mutate: (variables: TVariables) => void;
29
- mutateAsync: (variables: TVariables) => Promise<TData | null>;
30
- state$: BehaviorSubject<Pick<import('@tanstack/react-query').UseMutationResult<TData | null, TError, {
31
- variables: TVariables;
32
- ready$: Subject<boolean>;
33
- }, TContext>, "status" | "isPending" | "isError" | "isSuccess" | "isIdle">>;
34
- data: undefined;
35
- variables: {
36
- variables: TVariables;
37
- ready$: Subject<boolean>;
38
- };
39
- error: null;
40
- isError: false;
41
- isIdle: false;
42
- isPending: true;
43
- isSuccess: false;
44
- status: "pending";
45
- reset: () => void;
46
- context: TContext | undefined;
47
- failureCount: number;
48
- failureReason: TError | null;
49
- isPaused: boolean;
50
- submittedAt: number;
51
- } | {
52
- mutate: (variables: TVariables) => void;
53
- mutateAsync: (variables: TVariables) => Promise<TData | null>;
54
- state$: BehaviorSubject<Pick<import('@tanstack/react-query').UseMutationResult<TData | null, TError, {
55
- variables: TVariables;
56
- ready$: Subject<boolean>;
57
- }, TContext>, "status" | "isPending" | "isError" | "isSuccess" | "isIdle">>;
58
- data: undefined;
59
- error: TError;
60
- variables: {
61
- variables: TVariables;
62
- ready$: Subject<boolean>;
63
- };
64
- isError: true;
65
- isIdle: false;
66
- isPending: false;
67
- isSuccess: false;
68
- status: "error";
69
- reset: () => void;
70
- context: TContext | undefined;
71
- failureCount: number;
72
- failureReason: TError | null;
73
- isPaused: boolean;
74
- submittedAt: number;
75
- } | {
76
- mutate: (variables: TVariables) => void;
77
- mutateAsync: (variables: TVariables) => Promise<TData | null>;
78
- state$: BehaviorSubject<Pick<import('@tanstack/react-query').UseMutationResult<TData | null, TError, {
79
- variables: TVariables;
80
- ready$: Subject<boolean>;
81
- }, TContext>, "status" | "isPending" | "isError" | "isSuccess" | "isIdle">>;
82
- data: TData | null;
83
- error: null;
84
- variables: {
85
- variables: TVariables;
86
- ready$: Subject<boolean>;
87
- };
88
- isError: false;
89
- isIdle: false;
90
- isPending: false;
91
- isSuccess: true;
92
- status: "success";
93
- reset: () => void;
94
- context: TContext | undefined;
95
- failureCount: number;
96
- failureReason: TError | null;
97
- isPaused: boolean;
98
- submittedAt: number;
99
- };