@comapeo/core-react 6.3.1 → 7.0.0

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.
@@ -158,6 +158,18 @@ export declare function leaveProjectMutationOptions({ clientApi, queryClient, }:
158
158
  networkMode: "always";
159
159
  retry: false;
160
160
  };
161
+ export declare function importProjectCategoriesMutationOptions({ projectApi, projectId, queryClient, }: {
162
+ projectApi: MapeoProjectApi;
163
+ projectId: string;
164
+ queryClient: QueryClient;
165
+ }): {
166
+ mutationFn: ({ filePath }: {
167
+ filePath: string;
168
+ }) => Promise<void>;
169
+ onSuccess: () => void;
170
+ networkMode: "always";
171
+ retry: false;
172
+ };
161
173
  export declare function importProjectConfigMutationOptions({ projectApi, projectId, queryClient, }: {
162
174
  projectApi: MapeoProjectApi;
163
175
  projectId: string;
@@ -189,6 +189,19 @@ export function leaveProjectMutationOptions({ clientApi, queryClient, }) {
189
189
  },
190
190
  };
191
191
  }
192
+ export function importProjectCategoriesMutationOptions({ projectApi, projectId, queryClient, }) {
193
+ return {
194
+ ...baseMutationOptions(),
195
+ mutationFn: ({ filePath }) => {
196
+ return projectApi.$importCategories({ filePath });
197
+ },
198
+ onSuccess: () => {
199
+ queryClient.invalidateQueries({
200
+ queryKey: getProjectByIdQueryKey({ projectId }),
201
+ });
202
+ },
203
+ };
204
+ }
192
205
  export function importProjectConfigMutationOptions({ projectApi, projectId, queryClient, }) {
193
206
  return {
194
207
  ...baseMutationOptions(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comapeo/core-react",
3
- "version": "6.3.1",
3
+ "version": "7.0.0",
4
4
  "description": "React wrapper for working with @comapeo/core",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,20 +57,22 @@
57
57
  "types": "tsc"
58
58
  },
59
59
  "peerDependencies": {
60
- "@comapeo/core": "^4.4.0",
61
- "@comapeo/ipc": "^5.0.0",
60
+ "@comapeo/core": "^5.0.0",
61
+ "@comapeo/ipc": "^6.0.0",
62
62
  "@comapeo/schema": "*",
63
63
  "@tanstack/react-query": "^5",
64
64
  "react": "^18 || ^19"
65
65
  },
66
66
  "devDependencies": {
67
- "@comapeo/core": "4.4.0",
68
- "@comapeo/ipc": "5.0.0",
67
+ "@comapeo/core": "5.0.0",
68
+ "@comapeo/ipc": "6.0.0",
69
69
  "@comapeo/schema": "2.1.1",
70
70
  "@eslint/compat": "1.3.2",
71
71
  "@eslint/js": "9.35.0",
72
72
  "@ianvs/prettier-plugin-sort-imports": "4.7.0",
73
73
  "@mapeo/crypto": "1.0.0-alpha.10",
74
+ "@mapeo/default-config": "6.0.0",
75
+ "@mapeo/mock-data": "5.0.0",
74
76
  "@tanstack/eslint-plugin-query": "5.89.0",
75
77
  "@tanstack/react-query": "5.89.0",
76
78
  "@testing-library/dom": "10.4.1",