@comapeo/core-react 6.2.1 → 6.3.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.
- package/dist/commonjs/hooks/documents.d.ts +369 -52
- package/dist/commonjs/hooks/documents.js +3 -8
- package/dist/commonjs/hooks/projects.d.ts +4 -4
- package/dist/commonjs/lib/react-query/documents.d.ts +73 -158
- package/dist/commonjs/lib/react-query/documents.js +3 -3
- package/dist/commonjs/lib/react-query/projects.d.ts +1 -1
- package/dist/esm/hooks/documents.d.ts +369 -52
- package/dist/esm/hooks/documents.js +3 -8
- package/dist/esm/hooks/projects.d.ts +4 -4
- package/dist/esm/lib/react-query/documents.d.ts +73 -158
- package/dist/esm/lib/react-query/documents.js +3 -3
- package/dist/esm/lib/react-query/projects.d.ts +1 -1
- package/package.json +3 -3
|
@@ -84,7 +84,7 @@ export function documentByVersionIdQueryOptions({ projectApi, projectId, docType
|
|
|
84
84
|
export function createDocumentMutationOptions({ docType, projectApi, projectId, queryClient, }) {
|
|
85
85
|
return {
|
|
86
86
|
...baseMutationOptions(),
|
|
87
|
-
mutationFn: async ({ value
|
|
87
|
+
mutationFn: async ({ value }) => {
|
|
88
88
|
// @ts-expect-error TS not handling this well
|
|
89
89
|
return projectApi[docType].create({
|
|
90
90
|
...value,
|
|
@@ -104,7 +104,7 @@ export function createDocumentMutationOptions({ docType, projectApi, projectId,
|
|
|
104
104
|
export function updateDocumentMutationOptions({ docType, projectApi, projectId, queryClient, }) {
|
|
105
105
|
return {
|
|
106
106
|
...baseMutationOptions(),
|
|
107
|
-
mutationFn: async ({ versionId, value
|
|
107
|
+
mutationFn: async ({ versionId, value }) => {
|
|
108
108
|
// @ts-expect-error TS not handling this well
|
|
109
109
|
return projectApi[docType].update(versionId, value);
|
|
110
110
|
},
|
|
@@ -121,7 +121,7 @@ export function updateDocumentMutationOptions({ docType, projectApi, projectId,
|
|
|
121
121
|
export function deleteDocumentMutationOptions({ docType, projectApi, projectId, queryClient, }) {
|
|
122
122
|
return {
|
|
123
123
|
...baseMutationOptions(),
|
|
124
|
-
mutationFn: async ({ docId
|
|
124
|
+
mutationFn: async ({ docId }) => {
|
|
125
125
|
// @ts-expect-error TS not handling this well
|
|
126
126
|
return projectApi[docType].delete(docId);
|
|
127
127
|
},
|
|
@@ -174,7 +174,7 @@ export declare function updateProjectSettingsMutationOptions({ projectApi, query
|
|
|
174
174
|
projectApi: MapeoProjectApi;
|
|
175
175
|
queryClient: QueryClient;
|
|
176
176
|
}): {
|
|
177
|
-
mutationFn: (value: import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings) => Promise<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings>;
|
|
177
|
+
mutationFn: (value: Partial<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings>) => Promise<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings>;
|
|
178
178
|
onSuccess: () => void;
|
|
179
179
|
networkMode: "always";
|
|
180
180
|
retry: false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comapeo/core-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "React wrapper for working with @comapeo/core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"types": "tsc"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@comapeo/core": "^4.
|
|
60
|
+
"@comapeo/core": "^4.4.0",
|
|
61
61
|
"@comapeo/ipc": "^5.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.
|
|
67
|
+
"@comapeo/core": "4.4.0",
|
|
68
68
|
"@comapeo/ipc": "5.0.0",
|
|
69
69
|
"@comapeo/schema": "2.1.1",
|
|
70
70
|
"@eslint/compat": "1.3.2",
|