@comapeo/core-react 6.0.0-prerelease.1 → 6.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.
@@ -108,13 +108,13 @@ export declare function useSendInvite({ projectId }: {
108
108
  mutate: import("@tanstack/react-query").UseMutateFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
109
109
  deviceId: string;
110
110
  roleDescription?: string;
111
- roleId: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).RoleIdForNewInvite;
111
+ roleId: import("@comapeo/core", { with: { "resolution-mode": "import" } }).MemberApi.RoleIdForNewInvite;
112
112
  roleName?: string;
113
113
  }, unknown>;
114
114
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
115
115
  deviceId: string;
116
116
  roleDescription?: string;
117
- roleId: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).RoleIdForNewInvite;
117
+ roleId: import("@comapeo/core", { with: { "resolution-mode": "import" } }).MemberApi.RoleIdForNewInvite;
118
118
  roleName?: string;
119
119
  }, unknown>;
120
120
  reset: () => void;
@@ -124,13 +124,13 @@ export declare function useSendInvite({ projectId }: {
124
124
  mutate: import("@tanstack/react-query").UseMutateFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
125
125
  deviceId: string;
126
126
  roleDescription?: string;
127
- roleId: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).RoleIdForNewInvite;
127
+ roleId: import("@comapeo/core", { with: { "resolution-mode": "import" } }).MemberApi.RoleIdForNewInvite;
128
128
  roleName?: string;
129
129
  }, unknown>;
130
130
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
131
131
  deviceId: string;
132
132
  roleDescription?: string;
133
- roleId: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).RoleIdForNewInvite;
133
+ roleId: import("@comapeo/core", { with: { "resolution-mode": "import" } }).MemberApi.RoleIdForNewInvite;
134
134
  roleName?: string;
135
135
  }, unknown>;
136
136
  reset: () => void;
@@ -1,5 +1,4 @@
1
- import type { BitmapOpts, SvgOpts } from '@comapeo/core/dist/icon-api.js' with { 'resolution-mode': 'import' };
2
- import type { BlobId } from '@comapeo/core/dist/types.js' with { 'resolution-mode': 'import' };
1
+ import type { BlobApi, IconApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
3
2
  import type { MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
4
3
  import { type SyncState } from '../lib/sync.js';
5
4
  /**
@@ -143,7 +142,7 @@ export declare function useManyMembers({ projectId }: {
143
142
  export declare function useIconUrl({ projectId, iconId, ...mimeBasedOpts }: {
144
143
  projectId: string;
145
144
  iconId: string;
146
- } & (BitmapOpts | SvgOpts)): {
145
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): {
147
146
  data: string;
148
147
  error: Error | null;
149
148
  isRefetching: boolean;
@@ -201,7 +200,7 @@ export declare function useIconUrl({ projectId, iconId, ...mimeBasedOpts }: {
201
200
  */
202
201
  export declare function useAttachmentUrl({ projectId, blobId, }: {
203
202
  projectId: string;
204
- blobId: BlobId;
203
+ blobId: BlobApi.BlobId;
205
204
  }): {
206
205
  data: string;
207
206
  error: Error | null;
@@ -249,7 +248,7 @@ export declare function useDocumentCreatedBy({ projectId, originalVersionId, }:
249
248
  export declare function useOwnRoleInProject({ projectId }: {
250
249
  projectId: string;
251
250
  }): {
252
- data: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">;
251
+ data: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">;
253
252
  error: Error | null;
254
253
  isRefetching: boolean;
255
254
  };
@@ -449,7 +448,7 @@ export declare function useCreateBlob({ projectId }: {
449
448
  original: string;
450
449
  preview?: string;
451
450
  thumbnail?: string;
452
- metadata: import("@comapeo/core/dist/blob-api.js", { with: { "resolution-mode": "import" } }).Metadata;
451
+ metadata: BlobApi.Metadata;
453
452
  }, unknown>;
454
453
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
455
454
  driveId: string;
@@ -460,7 +459,7 @@ export declare function useCreateBlob({ projectId }: {
460
459
  original: string;
461
460
  preview?: string;
462
461
  thumbnail?: string;
463
- metadata: import("@comapeo/core/dist/blob-api.js", { with: { "resolution-mode": "import" } }).Metadata;
462
+ metadata: BlobApi.Metadata;
464
463
  }, unknown>;
465
464
  reset: () => void;
466
465
  status: "error";
@@ -475,7 +474,7 @@ export declare function useCreateBlob({ projectId }: {
475
474
  original: string;
476
475
  preview?: string;
477
476
  thumbnail?: string;
478
- metadata: import("@comapeo/core/dist/blob-api.js", { with: { "resolution-mode": "import" } }).Metadata;
477
+ metadata: BlobApi.Metadata;
479
478
  }, unknown>;
480
479
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
481
480
  driveId: string;
@@ -486,7 +485,7 @@ export declare function useCreateBlob({ projectId }: {
486
485
  original: string;
487
486
  preview?: string;
488
487
  thumbnail?: string;
489
- metadata: import("@comapeo/core/dist/blob-api.js", { with: { "resolution-mode": "import" } }).Metadata;
488
+ metadata: BlobApi.Metadata;
490
489
  }, unknown>;
491
490
  reset: () => void;
492
491
  status: "pending" | "success" | "idle";
@@ -1,4 +1,4 @@
1
- import type { RoleIdForNewInvite } from '@comapeo/core/dist/roles.js' with { 'resolution-mode': 'import' };
1
+ import type { MemberApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
2
2
  import type { MapeoClientApi, MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
3
3
  import { type QueryClient } from '@tanstack/react-query';
4
4
  export declare function getInvitesQueryKey(): readonly ["@comapeo/core-react", "invites"];
@@ -64,7 +64,7 @@ export declare function sendInviteMutationOptions({ projectApi, projectId, query
64
64
  mutationFn: ({ deviceId, ...role }: {
65
65
  deviceId: string;
66
66
  roleDescription?: string;
67
- roleId: RoleIdForNewInvite;
67
+ roleId: MemberApi.RoleIdForNewInvite;
68
68
  roleName?: string;
69
69
  }) => Promise<"ACCEPT" | "REJECT" | "ALREADY">;
70
70
  onSuccess: () => void;
@@ -1,10 +1,7 @@
1
- import type { Metadata } from '@comapeo/core/dist/blob-api.js' with { 'resolution-mode': 'import' };
2
- import type { BitmapOpts, SvgOpts } from '@comapeo/core/dist/icon-api.js' with { 'resolution-mode': 'import' };
3
- import type { EditableProjectSettings } from '@comapeo/core/dist/mapeo-project.js' with { 'resolution-mode': 'import' };
4
- import type { BlobId } from '@comapeo/core/dist/types.js' with { 'resolution-mode': 'import' };
1
+ import type { BlobApi, IconApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
5
2
  import type { MapeoClientApi, MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
6
3
  import type { ProjectSettings } from '@comapeo/schema' with { 'resolution-mode': 'import' };
7
- import { type QueryClient, type UseSuspenseQueryOptions } from '@tanstack/react-query';
4
+ import { type QueryClient, type UnusedSkipTokenOptions } from '@tanstack/react-query';
8
5
  export declare function getProjectsQueryKey(): readonly ["@comapeo/core-react", "projects"];
9
6
  export declare function getProjectByIdQueryKey({ projectId }: {
10
7
  projectId: string;
@@ -25,7 +22,7 @@ export declare function getMemberByIdQueryKey({ projectId, deviceId, }: {
25
22
  export declare function getIconUrlQueryKey({ projectId, iconId, ...mimeBasedOpts }: {
26
23
  projectId: string;
27
24
  iconId: string;
28
- } & (BitmapOpts | SvgOpts)): readonly ["@comapeo/core-react", "projects", string, "icons", string, {
25
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): readonly ["@comapeo/core-react", "projects", string, "icons", string, {
29
26
  mimeType: Extract<import("@comapeo/core/dist/icon-api.js", { with: { "resolution-mode": "import" } }).IconVariant["mimeType"], "image/png">;
30
27
  pixelDensity: Extract<import("@comapeo/core/dist/icon-api.js", { with: { "resolution-mode": "import" } }).IconVariant, {
31
28
  mimeType: "image/png";
@@ -41,8 +38,8 @@ export declare function getDocumentCreatedByQueryKey({ projectId, originalVersio
41
38
  }): readonly ["@comapeo/core-react", "projects", string, "document_created_by", string];
42
39
  export declare function getAttachmentUrlQueryKey({ projectId, blobId, }: {
43
40
  projectId: string;
44
- blobId: BlobId;
45
- }): readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId];
41
+ blobId: BlobApi.BlobId;
42
+ }): readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js", { with: { "resolution-mode": "import" } }).BlobId];
46
43
  export declare function projectsQueryOptions({ clientApi, }: {
47
44
  clientApi: MapeoClientApi;
48
45
  }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[], Error, import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[], readonly ["@comapeo/core-react", "projects"]>, "queryFn"> & {
@@ -56,15 +53,15 @@ export declare function projectsQueryOptions({ clientApi, }: {
56
53
  export declare function projectByIdQueryOptions({ clientApi, projectId, }: {
57
54
  clientApi: MapeoClientApi;
58
55
  projectId: string;
59
- }): UseSuspenseQueryOptions<MapeoProjectApi, Error, MapeoProjectApi, ReturnType<typeof getProjectByIdQueryKey>>;
56
+ }): UnusedSkipTokenOptions<MapeoProjectApi, Error, MapeoProjectApi, ReturnType<typeof getProjectByIdQueryKey>>;
60
57
  export declare function projectSettingsQueryOptions({ projectApi, projectId, }: {
61
58
  projectApi: MapeoProjectApi;
62
59
  projectId: string;
63
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<EditableProjectSettings, Error, EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"]>, "queryFn"> & {
64
- queryFn?: import("@tanstack/react-query").QueryFunction<EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"], never> | undefined;
60
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"]>, "queryFn"> & {
61
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"], never> | undefined;
65
62
  } & {
66
63
  queryKey: readonly ["@comapeo/core-react", "projects", string, "project_settings"] & {
67
- [dataTagSymbol]: EditableProjectSettings;
64
+ [dataTagSymbol]: import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings;
68
65
  [dataTagErrorSymbol]: Error;
69
66
  };
70
67
  };
@@ -94,11 +91,11 @@ export declare function projectMemberByIdQueryOptions({ projectApi, projectId, d
94
91
  export declare function projectOwnRoleQueryOptions({ projectApi, projectId, }: {
95
92
  projectApi: MapeoProjectApi;
96
93
  projectId: string;
97
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, Error, import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"]>, "queryFn"> & {
98
- queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"], never> | undefined;
94
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, Error, import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"]>, "queryFn"> & {
95
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"], never> | undefined;
99
96
  } & {
100
97
  queryKey: readonly ["@comapeo/core-react", "projects", string, "role"] & {
101
- [dataTagSymbol]: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">;
98
+ [dataTagSymbol]: import("@comapeo/core/dist/roles.js", { with: { "resolution-mode": "import" } }).Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">;
102
99
  [dataTagErrorSymbol]: Error;
103
100
  };
104
101
  };
@@ -106,7 +103,7 @@ export declare function iconUrlQueryOptions({ projectApi, projectId, iconId, ...
106
103
  projectApi: MapeoProjectApi;
107
104
  projectId: string;
108
105
  iconId: Parameters<MapeoProjectApi['$icons']['getIconUrl']>[0];
109
- } & (BitmapOpts | SvgOpts)): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "icons", string, {
106
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "icons", string, {
110
107
  mimeType: Extract<import("@comapeo/core/dist/icon-api.js", { with: { "resolution-mode": "import" } }).IconVariant["mimeType"], "image/png">;
111
108
  pixelDensity: Extract<import("@comapeo/core/dist/icon-api.js", { with: { "resolution-mode": "import" } }).IconVariant, {
112
109
  mimeType: "image/png";
@@ -156,11 +153,11 @@ export declare function documentCreatedByQueryOptions({ projectApi, projectId, o
156
153
  export declare function attachmentUrlQueryOptions({ projectApi, projectId, blobId, }: {
157
154
  projectApi: MapeoProjectApi;
158
155
  projectId: string;
159
- blobId: BlobId;
160
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId]>, "queryFn"> & {
161
- queryFn?: import("@tanstack/react-query").QueryFunction<string, readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId], never> | undefined;
156
+ blobId: BlobApi.BlobId;
157
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js", { with: { "resolution-mode": "import" } }).BlobId]>, "queryFn"> & {
158
+ queryFn?: import("@tanstack/react-query").QueryFunction<string, readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js", { with: { "resolution-mode": "import" } }).BlobId], never> | undefined;
162
159
  } & {
163
- queryKey: readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId] & {
160
+ queryKey: readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js", { with: { "resolution-mode": "import" } }).BlobId] & {
164
161
  [dataTagSymbol]: string;
165
162
  [dataTagErrorSymbol]: Error;
166
163
  };
@@ -236,7 +233,7 @@ export declare function updateProjectSettingsMutationOptions({ projectApi, query
236
233
  defaultPresets?: ProjectSettings["defaultPresets"];
237
234
  projectColor?: ProjectSettings["projectColor"];
238
235
  projectDescription?: ProjectSettings["projectDescription"];
239
- }) => Promise<EditableProjectSettings>;
236
+ }) => Promise<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings>;
240
237
  onSuccess: () => void;
241
238
  networkMode: "always";
242
239
  retry: false;
@@ -248,7 +245,7 @@ export declare function createBlobMutationOptions({ projectApi, }: {
248
245
  original: string;
249
246
  preview?: string;
250
247
  thumbnail?: string;
251
- metadata: Metadata;
248
+ metadata: BlobApi.Metadata;
252
249
  }) => Promise<{
253
250
  driveId: string;
254
251
  name: string;
@@ -108,13 +108,13 @@ export declare function useSendInvite({ projectId }: {
108
108
  mutate: import("@tanstack/react-query").UseMutateFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
109
109
  deviceId: string;
110
110
  roleDescription?: string;
111
- roleId: import("@comapeo/core/dist/roles.js").RoleIdForNewInvite;
111
+ roleId: import("@comapeo/core").MemberApi.RoleIdForNewInvite;
112
112
  roleName?: string;
113
113
  }, unknown>;
114
114
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
115
115
  deviceId: string;
116
116
  roleDescription?: string;
117
- roleId: import("@comapeo/core/dist/roles.js").RoleIdForNewInvite;
117
+ roleId: import("@comapeo/core").MemberApi.RoleIdForNewInvite;
118
118
  roleName?: string;
119
119
  }, unknown>;
120
120
  reset: () => void;
@@ -124,13 +124,13 @@ export declare function useSendInvite({ projectId }: {
124
124
  mutate: import("@tanstack/react-query").UseMutateFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
125
125
  deviceId: string;
126
126
  roleDescription?: string;
127
- roleId: import("@comapeo/core/dist/roles.js").RoleIdForNewInvite;
127
+ roleId: import("@comapeo/core").MemberApi.RoleIdForNewInvite;
128
128
  roleName?: string;
129
129
  }, unknown>;
130
130
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<"ACCEPT" | "REJECT" | "ALREADY", Error, {
131
131
  deviceId: string;
132
132
  roleDescription?: string;
133
- roleId: import("@comapeo/core/dist/roles.js").RoleIdForNewInvite;
133
+ roleId: import("@comapeo/core").MemberApi.RoleIdForNewInvite;
134
134
  roleName?: string;
135
135
  }, unknown>;
136
136
  reset: () => void;
@@ -1,5 +1,4 @@
1
- import type { BitmapOpts, SvgOpts } from '@comapeo/core/dist/icon-api.js' with { 'resolution-mode': 'import' };
2
- import type { BlobId } from '@comapeo/core/dist/types.js' with { 'resolution-mode': 'import' };
1
+ import type { BlobApi, IconApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
3
2
  import type { MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
4
3
  import { type SyncState } from '../lib/sync.js';
5
4
  /**
@@ -143,7 +142,7 @@ export declare function useManyMembers({ projectId }: {
143
142
  export declare function useIconUrl({ projectId, iconId, ...mimeBasedOpts }: {
144
143
  projectId: string;
145
144
  iconId: string;
146
- } & (BitmapOpts | SvgOpts)): {
145
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): {
147
146
  data: string;
148
147
  error: Error | null;
149
148
  isRefetching: boolean;
@@ -201,7 +200,7 @@ export declare function useIconUrl({ projectId, iconId, ...mimeBasedOpts }: {
201
200
  */
202
201
  export declare function useAttachmentUrl({ projectId, blobId, }: {
203
202
  projectId: string;
204
- blobId: BlobId;
203
+ blobId: BlobApi.BlobId;
205
204
  }): {
206
205
  data: string;
207
206
  error: Error | null;
@@ -249,7 +248,7 @@ export declare function useDocumentCreatedBy({ projectId, originalVersionId, }:
249
248
  export declare function useOwnRoleInProject({ projectId }: {
250
249
  projectId: string;
251
250
  }): {
252
- data: import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">;
251
+ data: import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">;
253
252
  error: Error | null;
254
253
  isRefetching: boolean;
255
254
  };
@@ -449,7 +448,7 @@ export declare function useCreateBlob({ projectId }: {
449
448
  original: string;
450
449
  preview?: string;
451
450
  thumbnail?: string;
452
- metadata: import("@comapeo/core/dist/blob-api.js").Metadata;
451
+ metadata: BlobApi.Metadata;
453
452
  }, unknown>;
454
453
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
455
454
  driveId: string;
@@ -460,7 +459,7 @@ export declare function useCreateBlob({ projectId }: {
460
459
  original: string;
461
460
  preview?: string;
462
461
  thumbnail?: string;
463
- metadata: import("@comapeo/core/dist/blob-api.js").Metadata;
462
+ metadata: BlobApi.Metadata;
464
463
  }, unknown>;
465
464
  reset: () => void;
466
465
  status: "error";
@@ -475,7 +474,7 @@ export declare function useCreateBlob({ projectId }: {
475
474
  original: string;
476
475
  preview?: string;
477
476
  thumbnail?: string;
478
- metadata: import("@comapeo/core/dist/blob-api.js").Metadata;
477
+ metadata: BlobApi.Metadata;
479
478
  }, unknown>;
480
479
  mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
481
480
  driveId: string;
@@ -486,7 +485,7 @@ export declare function useCreateBlob({ projectId }: {
486
485
  original: string;
487
486
  preview?: string;
488
487
  thumbnail?: string;
489
- metadata: import("@comapeo/core/dist/blob-api.js").Metadata;
488
+ metadata: BlobApi.Metadata;
490
489
  }, unknown>;
491
490
  reset: () => void;
492
491
  status: "pending" | "success" | "idle";
@@ -1,4 +1,4 @@
1
- import type { RoleIdForNewInvite } from '@comapeo/core/dist/roles.js' with { 'resolution-mode': 'import' };
1
+ import type { MemberApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
2
2
  import type { MapeoClientApi, MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
3
3
  import { type QueryClient } from '@tanstack/react-query';
4
4
  export declare function getInvitesQueryKey(): readonly ["@comapeo/core-react", "invites"];
@@ -64,7 +64,7 @@ export declare function sendInviteMutationOptions({ projectApi, projectId, query
64
64
  mutationFn: ({ deviceId, ...role }: {
65
65
  deviceId: string;
66
66
  roleDescription?: string;
67
- roleId: RoleIdForNewInvite;
67
+ roleId: MemberApi.RoleIdForNewInvite;
68
68
  roleName?: string;
69
69
  }) => Promise<"ACCEPT" | "REJECT" | "ALREADY">;
70
70
  onSuccess: () => void;
@@ -1,10 +1,7 @@
1
- import type { Metadata } from '@comapeo/core/dist/blob-api.js' with { 'resolution-mode': 'import' };
2
- import type { BitmapOpts, SvgOpts } from '@comapeo/core/dist/icon-api.js' with { 'resolution-mode': 'import' };
3
- import type { EditableProjectSettings } from '@comapeo/core/dist/mapeo-project.js' with { 'resolution-mode': 'import' };
4
- import type { BlobId } from '@comapeo/core/dist/types.js' with { 'resolution-mode': 'import' };
1
+ import type { BlobApi, IconApi } from '@comapeo/core' with { 'resolution-mode': 'import' };
5
2
  import type { MapeoClientApi, MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
6
3
  import type { ProjectSettings } from '@comapeo/schema' with { 'resolution-mode': 'import' };
7
- import { type QueryClient, type UseSuspenseQueryOptions } from '@tanstack/react-query';
4
+ import { type QueryClient, type UnusedSkipTokenOptions } from '@tanstack/react-query';
8
5
  export declare function getProjectsQueryKey(): readonly ["@comapeo/core-react", "projects"];
9
6
  export declare function getProjectByIdQueryKey({ projectId }: {
10
7
  projectId: string;
@@ -25,7 +22,7 @@ export declare function getMemberByIdQueryKey({ projectId, deviceId, }: {
25
22
  export declare function getIconUrlQueryKey({ projectId, iconId, ...mimeBasedOpts }: {
26
23
  projectId: string;
27
24
  iconId: string;
28
- } & (BitmapOpts | SvgOpts)): readonly ["@comapeo/core-react", "projects", string, "icons", string, {
25
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): readonly ["@comapeo/core-react", "projects", string, "icons", string, {
29
26
  mimeType: Extract<import("@comapeo/core/dist/icon-api.js").IconVariant["mimeType"], "image/png">;
30
27
  pixelDensity: Extract<import("@comapeo/core/dist/icon-api.js").IconVariant, {
31
28
  mimeType: "image/png";
@@ -41,8 +38,8 @@ export declare function getDocumentCreatedByQueryKey({ projectId, originalVersio
41
38
  }): readonly ["@comapeo/core-react", "projects", string, "document_created_by", string];
42
39
  export declare function getAttachmentUrlQueryKey({ projectId, blobId, }: {
43
40
  projectId: string;
44
- blobId: BlobId;
45
- }): readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId];
41
+ blobId: BlobApi.BlobId;
42
+ }): readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js").BlobId];
46
43
  export declare function projectsQueryOptions({ clientApi, }: {
47
44
  clientApi: MapeoClientApi;
48
45
  }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-manager.js").ListedProject[], Error, import("@comapeo/core/dist/mapeo-manager.js").ListedProject[], readonly ["@comapeo/core-react", "projects"]>, "queryFn"> & {
@@ -56,15 +53,15 @@ export declare function projectsQueryOptions({ clientApi, }: {
56
53
  export declare function projectByIdQueryOptions({ clientApi, projectId, }: {
57
54
  clientApi: MapeoClientApi;
58
55
  projectId: string;
59
- }): UseSuspenseQueryOptions<MapeoProjectApi, Error, MapeoProjectApi, ReturnType<typeof getProjectByIdQueryKey>>;
56
+ }): UnusedSkipTokenOptions<MapeoProjectApi, Error, MapeoProjectApi, ReturnType<typeof getProjectByIdQueryKey>>;
60
57
  export declare function projectSettingsQueryOptions({ projectApi, projectId, }: {
61
58
  projectApi: MapeoProjectApi;
62
59
  projectId: string;
63
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<EditableProjectSettings, Error, EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"]>, "queryFn"> & {
64
- queryFn?: import("@tanstack/react-query").QueryFunction<EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"], never> | undefined;
60
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"]>, "queryFn"> & {
61
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings, readonly ["@comapeo/core-react", "projects", string, "project_settings"], never> | undefined;
65
62
  } & {
66
63
  queryKey: readonly ["@comapeo/core-react", "projects", string, "project_settings"] & {
67
- [dataTagSymbol]: EditableProjectSettings;
64
+ [dataTagSymbol]: import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings;
68
65
  [dataTagErrorSymbol]: Error;
69
66
  };
70
67
  };
@@ -94,11 +91,11 @@ export declare function projectMemberByIdQueryOptions({ projectApi, projectId, d
94
91
  export declare function projectOwnRoleQueryOptions({ projectApi, projectId, }: {
95
92
  projectApi: MapeoProjectApi;
96
93
  projectId: string;
97
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, Error, import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"]>, "queryFn"> & {
98
- queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"], never> | undefined;
94
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, Error, import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"]>, "queryFn"> & {
95
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, readonly ["@comapeo/core-react", "projects", string, "role"], never> | undefined;
99
96
  } & {
100
97
  queryKey: readonly ["@comapeo/core-react", "projects", string, "role"] & {
101
- [dataTagSymbol]: import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "a24eaca65ab5d5d0" | "08e4251e36f6e7ed">;
98
+ [dataTagSymbol]: import("@comapeo/core/dist/roles.js").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">;
102
99
  [dataTagErrorSymbol]: Error;
103
100
  };
104
101
  };
@@ -106,7 +103,7 @@ export declare function iconUrlQueryOptions({ projectApi, projectId, iconId, ...
106
103
  projectApi: MapeoProjectApi;
107
104
  projectId: string;
108
105
  iconId: Parameters<MapeoProjectApi['$icons']['getIconUrl']>[0];
109
- } & (BitmapOpts | SvgOpts)): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "icons", string, {
106
+ } & (IconApi.BitmapOpts | IconApi.SvgOpts)): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "icons", string, {
110
107
  mimeType: Extract<import("@comapeo/core/dist/icon-api.js").IconVariant["mimeType"], "image/png">;
111
108
  pixelDensity: Extract<import("@comapeo/core/dist/icon-api.js").IconVariant, {
112
109
  mimeType: "image/png";
@@ -156,11 +153,11 @@ export declare function documentCreatedByQueryOptions({ projectApi, projectId, o
156
153
  export declare function attachmentUrlQueryOptions({ projectApi, projectId, blobId, }: {
157
154
  projectApi: MapeoProjectApi;
158
155
  projectId: string;
159
- blobId: BlobId;
160
- }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId]>, "queryFn"> & {
161
- queryFn?: import("@tanstack/react-query").QueryFunction<string, readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId], never> | undefined;
156
+ blobId: BlobApi.BlobId;
157
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js").BlobId]>, "queryFn"> & {
158
+ queryFn?: import("@tanstack/react-query").QueryFunction<string, readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js").BlobId], never> | undefined;
162
159
  } & {
163
- queryKey: readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId] & {
160
+ queryKey: readonly ["@comapeo/core-react", "projects", string, "attachments", import("@comapeo/core/dist/types.js").BlobId] & {
164
161
  [dataTagSymbol]: string;
165
162
  [dataTagErrorSymbol]: Error;
166
163
  };
@@ -236,7 +233,7 @@ export declare function updateProjectSettingsMutationOptions({ projectApi, query
236
233
  defaultPresets?: ProjectSettings["defaultPresets"];
237
234
  projectColor?: ProjectSettings["projectColor"];
238
235
  projectDescription?: ProjectSettings["projectDescription"];
239
- }) => Promise<EditableProjectSettings>;
236
+ }) => Promise<import("@comapeo/core/dist/mapeo-project.js").EditableProjectSettings>;
240
237
  onSuccess: () => void;
241
238
  networkMode: "always";
242
239
  retry: false;
@@ -248,7 +245,7 @@ export declare function createBlobMutationOptions({ projectApi, }: {
248
245
  original: string;
249
246
  preview?: string;
250
247
  thumbnail?: string;
251
- metadata: Metadata;
248
+ metadata: BlobApi.Metadata;
252
249
  }) => Promise<{
253
250
  driveId: string;
254
251
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comapeo/core-react",
3
- "version": "6.0.0-prerelease.1",
3
+ "version": "6.0.0",
4
4
  "description": "React wrapper for working with @comapeo/core",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,15 +57,15 @@
57
57
  "types": "tsc"
58
58
  },
59
59
  "peerDependencies": {
60
- "@comapeo/core": "^4.0.0",
61
- "@comapeo/ipc": "^5.0.0-prerelease.1",
60
+ "@comapeo/core": "^4.1.3",
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.0.0",
68
- "@comapeo/ipc": "^5.0.0-prerelease.1",
67
+ "@comapeo/core": "4.1.3",
68
+ "@comapeo/ipc": "5.0.0",
69
69
  "@comapeo/schema": "2.0.0",
70
70
  "@eslint/compat": "1.3.0",
71
71
  "@eslint/js": "9.29.0",