@prismicio/editor-fields 0.4.63 → 0.4.64-alpha.fix-simulator-issue.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.
Files changed (68) hide show
  1. package/dist/EditorConfig.d.ts +12 -3
  2. package/dist/core/APIExplorer/APIExplorer.d.ts +2 -0
  3. package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +54 -0
  4. package/dist/core/APIExplorer/components/APIExplorerRequest.d.ts +2 -0
  5. package/dist/core/APIExplorer/components/APIExplorerResponse.d.ts +2 -0
  6. package/dist/core/APIExplorer/components/Request/GetByTypeRequest.d.ts +1 -0
  7. package/dist/core/APIExplorer/components/Request/GetByUIDRequest.d.ts +1 -0
  8. package/dist/core/APIExplorer/components/Request/GetRepositoryRequest.d.ts +1 -0
  9. package/dist/core/APIExplorer/components/Request/GetRequest.d.ts +1 -0
  10. package/dist/core/APIExplorer/components/Request/GetSingleRequest.d.ts +1 -0
  11. package/dist/core/APIExplorer/components/Request/components/RequestFormInput.d.ts +4 -0
  12. package/dist/core/APIExplorer/components/Request/components/RequestFormInputBase.d.ts +6 -0
  13. package/dist/core/APIExplorer/components/Request/components/RequestFormSelect.d.ts +4 -0
  14. package/dist/core/APIExplorer/components/Request/components/RequestPaginationFieldset.d.ts +5 -0
  15. package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +7 -0
  16. package/dist/core/APIExplorer/components/Request/components/index.d.ts +3 -0
  17. package/dist/core/APIExplorer/components/Request/createRequest.d.ts +20 -0
  18. package/dist/core/APIExplorer/components/Request/index.d.ts +1 -0
  19. package/dist/core/APIExplorer/components/Request/types.d.ts +14 -0
  20. package/dist/core/APIExplorer/index.d.ts +1 -0
  21. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +80 -80
  22. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  23. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +8 -8
  24. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +8 -8
  25. package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
  26. package/dist/core/service/aiSeoMetadata.d.ts +2 -6
  27. package/dist/core/service/customType.d.ts +20 -20
  28. package/dist/core/service/document.d.ts +213 -213
  29. package/dist/core/service/documentSearch.d.ts +47 -47
  30. package/dist/core/service/repository.d.ts +30 -30
  31. package/dist/core/service/role.d.ts +267 -46
  32. package/dist/core/service/user.d.ts +11 -7
  33. package/dist/fields/ImageField/useImageField.d.ts +8 -8
  34. package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +8 -8
  35. package/dist/fields/LinkField/Documents/documentsData.d.ts +16 -16
  36. package/dist/fields/LinkField/useLinkField.d.ts +1 -1
  37. package/dist/fields/RichTextField/RichTextField.d.ts +2 -0
  38. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  39. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +8 -8
  40. package/dist/fields/RichTextField/extensions/Table/Table.d.ts +4 -4
  41. package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +10 -0
  42. package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +10 -0
  43. package/dist/fields/RichTextField/extensions/Table/TableCell/index.d.ts +2 -0
  44. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +8 -0
  45. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts +34 -0
  46. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +19 -0
  47. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +1 -0
  48. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +23 -0
  49. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +1 -0
  50. package/dist/fields/RichTextField/extensions/Table/TableCell/types.d.ts +17 -0
  51. package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +15 -0
  52. package/dist/fields/RichTextField/extensions/Table/TableEvent.d.ts +31 -0
  53. package/dist/fields/RichTextField/extensions/Table/TableLimitToast.d.ts +7 -0
  54. package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +9 -0
  55. package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +20 -0
  56. package/dist/fields/RichTextField/extensions/Table/menus/TableColumnMenu.d.ts +11 -0
  57. package/dist/fields/RichTextField/extensions/Table/menus/TableFloatingMenus.d.ts +7 -0
  58. package/dist/fields/RichTextField/extensions/Table/menus/TableRowMenu.d.ts +10 -0
  59. package/dist/fields/RichTextField/extensions/Table/menus/TriggerAnchor.d.ts +11 -0
  60. package/dist/fields/RichTextField/extensions/Table/menus/index.d.ts +2 -0
  61. package/dist/fields/RichTextField/extensions/Table/menus/utils.d.ts +23 -0
  62. package/dist/fields/RichTextField/extensions/Table/utils.d.ts +60 -0
  63. package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
  64. package/dist/index.cjs.js +138 -38
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.es.js +59001 -10823
  67. package/dist/slices/utils.d.ts +4 -4
  68. package/package.json +6 -6
@@ -52,9 +52,8 @@ type AISeoMetadata = {
52
52
  aiSeoMetadataEnabled?: never;
53
53
  } | {
54
54
  aiSeoMetadataEnabled: boolean;
55
- awsBedrockAccessKeyId: string;
56
- awsBedrockSecretAccessKey: string;
57
- awsBedrockRegion: string;
55
+ documentBaseUrl: URL;
56
+ repository: string;
58
57
  trackMetadataGeneration: (args: {
59
58
  documentId: string;
60
59
  locale: string;
@@ -96,6 +95,16 @@ interface OnAnalyticsEvent {
96
95
  customTypeFormat: "page" | "custom";
97
96
  }): void;
98
97
  (event: "Unsplash Image Searched" | "Unsplash Image Added"): void;
98
+ (event: "API Explorer Request", args: {
99
+ type: string;
100
+ repositoryID: string;
101
+ }): void;
102
+ (event: "API Explorer Request Error", args: {
103
+ type: string;
104
+ repositoryID: string;
105
+ error?: string;
106
+ url?: string;
107
+ }): void;
99
108
  }
100
109
  interface Analytics {
101
110
  onAnalyticsEvent?: OnAnalyticsEvent;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function APIExplorer(): JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { type PropsWithChildren } from "react";
2
+ import { type RequestRunReturnType, type RequestTypes } from "./Request";
3
+ export type RequestPagination = {
4
+ page?: number;
5
+ pageSize?: number;
6
+ };
7
+ type ResponseBase = {
8
+ duration: number;
9
+ };
10
+ type ResponsePending = {
11
+ status: "pending";
12
+ };
13
+ export type ResponseSuccess = ResponseBase & {
14
+ status: "success";
15
+ url?: string;
16
+ ref?: string;
17
+ data: RequestRunReturnType;
18
+ };
19
+ export type ResponseError = ResponseBase & {
20
+ status: "error";
21
+ url?: string;
22
+ error: Error;
23
+ };
24
+ export type UseAPIExplorerRequestProperties = {
25
+ repository: {
26
+ id: string;
27
+ accessToken: string;
28
+ };
29
+ type: RequestTypes;
30
+ options: {
31
+ [Type in RequestTypes]?: Record<string, string>;
32
+ };
33
+ pagination: RequestPagination;
34
+ response?: ResponsePending | ResponseSuccess | ResponseError;
35
+ };
36
+ type UseAPIExplorerRequestMethods = {
37
+ setRepositoryID: (id: string) => void;
38
+ setRepositoryAccessToken: (token: string) => void;
39
+ setRequestType: (type: RequestTypes) => void;
40
+ setRequestOptions: <Type extends RequestTypes>(type: Type, options: UseAPIExplorerRequestProperties["options"][Type]) => void;
41
+ setPagination: (pagination: {
42
+ page?: number;
43
+ pageSize?: number;
44
+ }) => void;
45
+ run: () => Promise<void>;
46
+ };
47
+ type APIExplorerContextType = {
48
+ request: UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
49
+ };
50
+ type APIExplorerProviderProps = PropsWithChildren;
51
+ export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
52
+ export declare function useAPIExplorer(): APIExplorerContextType;
53
+ export declare function useAPIExplorerRequest(): UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
54
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function APIExplorerRequest(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function APIExplorerResponse(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const GetByTypeRequest: import("./createRequest").RequestConfig<"getByType">;
@@ -0,0 +1 @@
1
+ export declare const GetByUIDRequest: import("./createRequest").RequestConfig<"getByUID">;
@@ -0,0 +1 @@
1
+ export declare const GetRepositoryRequest: import("./createRequest").RequestConfig<"getRepository">;
@@ -0,0 +1 @@
1
+ export declare const GetRequest: import("./createRequest").RequestConfig<"get">;
@@ -0,0 +1 @@
1
+ export declare const GetSingleRequest: import("./createRequest").RequestConfig<"getSingle">;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { type FormInputProps } from "@prismicio/editor-ui";
3
+ import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
4
+ export declare function RequestFormInput(props: Pick<RequestFormInputBaseProps, "label"> & FormInputProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type RequestFormInputBaseProps = {
3
+ label: string;
4
+ children: JSX.Element;
5
+ };
6
+ export declare function RequestFormInputBase(props: RequestFormInputBaseProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { type SelectProps } from "@prismicio/editor-ui";
3
+ import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
4
+ export declare function RequestFormSelect(props: Pick<RequestFormInputBaseProps, "label"> & SelectProps<string>): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Display a fieldset managing a request pagination settings.
4
+ */
5
+ export declare function RequestPaginationFieldset(): JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Display a fieldset managing a request document type setting.
4
+ */
5
+ export declare function RequestTypeFieldset(props: {
6
+ nonRepeatableOnly?: boolean;
7
+ }): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { RequestFormInput } from "./RequestFormInput";
2
+ export { RequestPaginationFieldset } from "./RequestPaginationFieldset";
3
+ export { RequestTypeFieldset } from "./RequestTypeFieldset";
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import type { Client } from "@prismicio/client";
3
+ import { type FormInputProps } from "@prismicio/editor-ui";
4
+ import { type RequestPagination } from "../APIExplorerContext";
5
+ import type { RequestRunReturnType } from "./types";
6
+ export type RequestConfig<TType extends string> = {
7
+ type: TType;
8
+ Fieldset?: () => JSX.Element;
9
+ getSnippet: (options: Record<string, string | number> & RequestPagination) => string;
10
+ run: (client: Client, options: Record<string, string | number> & RequestPagination) => Promise<RequestRunReturnType>;
11
+ };
12
+ /**
13
+ * A factory for creating request handlers (fieldset, snippet, runner, erc.) for the API explorer.
14
+ *
15
+ * @param config - Request configuration.
16
+ * @returns A request handler to be referenced in `./types.ts` for the API explorer to use.
17
+ */
18
+ export declare function createRequest<TType extends string>(config: RequestConfig<TType>): RequestConfig<TType>;
19
+ export declare function RequestFormInput(props: FormInputProps): JSX.Element;
20
+ export declare function RequestPaginationFieldset(): JSX.Element;
@@ -0,0 +1 @@
1
+ export { type RequestRunReturnType, Requests, type RequestTypes } from "./types";
@@ -0,0 +1,14 @@
1
+ import type { PrismicDocument, Query, Repository } from "@prismicio/client";
2
+ /**
3
+ * All available requests for the API explorer.
4
+ */
5
+ export declare const Requests: {
6
+ readonly get: import("./createRequest").RequestConfig<"get">;
7
+ readonly getByType: import("./createRequest").RequestConfig<"getByType">;
8
+ readonly getByUID: import("./createRequest").RequestConfig<"getByUID">;
9
+ readonly getSingle: import("./createRequest").RequestConfig<"getSingle">;
10
+ readonly getRepository: import("./createRequest").RequestConfig<"getRepository">;
11
+ };
12
+ export type Requests = typeof Requests;
13
+ export type RequestTypes = keyof Requests;
14
+ export type RequestRunReturnType = PrismicDocument[] | PrismicDocument | Query | Repository;
@@ -0,0 +1 @@
1
+ export { APIExplorer } from "./APIExplorer";
@@ -21,14 +21,14 @@ export declare const mediaAssetType: z.ZodObject<{
21
21
  notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
22
22
  credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
23
23
  }, "strip", z.ZodTypeAny, {
24
+ notes?: string | undefined;
24
25
  credits?: string | undefined;
25
26
  alt?: string | undefined;
26
- notes?: string | undefined;
27
27
  filename?: string | undefined;
28
28
  }, {
29
+ notes?: string[] | undefined;
29
30
  credits?: string[] | undefined;
30
31
  alt?: string[] | undefined;
31
- notes?: string[] | undefined;
32
32
  filename?: string[] | undefined;
33
33
  }>>;
34
34
  tags: z.ZodArray<z.ZodObject<{
@@ -39,74 +39,74 @@ export declare const mediaAssetType: z.ZodObject<{
39
39
  last_modified: z.ZodNumber;
40
40
  count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
41
41
  }, "strip", z.ZodTypeAny, {
42
- name: string;
43
42
  id: string;
43
+ name: string;
44
44
  created_at: number;
45
45
  last_modified: number;
46
46
  count: number;
47
47
  uploader_id?: string | undefined;
48
48
  }, {
49
- name: string;
50
49
  id: string;
50
+ name: string;
51
51
  created_at: number;
52
52
  last_modified: number;
53
53
  uploader_id?: string | undefined;
54
54
  count?: number | undefined;
55
55
  }>, "many">;
56
56
  }, "strip", z.ZodTypeAny, {
57
+ id: string;
58
+ size: number;
59
+ kind: string;
60
+ url: string;
57
61
  tags: {
58
- name: string;
59
62
  id: string;
63
+ name: string;
60
64
  created_at: number;
61
65
  last_modified: number;
62
66
  count: number;
63
67
  uploader_id?: string | undefined;
64
68
  }[];
65
- id: string;
66
- url: string;
67
- kind: string;
68
- size: number;
69
69
  last_modified: number;
70
70
  filename: string;
71
- width?: number | undefined;
71
+ notes?: string | undefined;
72
72
  height?: number | undefined;
73
+ width?: number | undefined;
73
74
  credits?: string | undefined;
74
75
  alt?: string | undefined;
75
- notes?: string | undefined;
76
76
  uploader_id?: string | undefined;
77
77
  extension?: string | undefined;
78
78
  search_highlight?: {
79
+ notes?: string | undefined;
79
80
  credits?: string | undefined;
80
81
  alt?: string | undefined;
81
- notes?: string | undefined;
82
82
  filename?: string | undefined;
83
83
  } | undefined;
84
84
  }, {
85
+ id: string;
86
+ size: number;
87
+ kind: string;
88
+ url: string;
85
89
  tags: {
86
- name: string;
87
90
  id: string;
91
+ name: string;
88
92
  created_at: number;
89
93
  last_modified: number;
90
94
  uploader_id?: string | undefined;
91
95
  count?: number | undefined;
92
96
  }[];
93
- id: string;
94
- url: string;
95
- kind: string;
96
- size: number;
97
97
  last_modified: number;
98
98
  filename: string;
99
- width?: number | undefined;
99
+ notes?: string | undefined;
100
100
  height?: number | undefined;
101
+ width?: number | undefined;
101
102
  credits?: string | undefined;
102
103
  alt?: string | undefined;
103
- notes?: string | undefined;
104
104
  uploader_id?: string | undefined;
105
105
  extension?: string | undefined;
106
106
  search_highlight?: {
107
+ notes?: string[] | undefined;
107
108
  credits?: string[] | undefined;
108
109
  alt?: string[] | undefined;
109
- notes?: string[] | undefined;
110
110
  filename?: string[] | undefined;
111
111
  } | undefined;
112
112
  }>;
@@ -136,14 +136,14 @@ export declare const mediaSearchResponse: z.ZodObject<{
136
136
  notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
137
137
  credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
138
138
  }, "strip", z.ZodTypeAny, {
139
+ notes?: string | undefined;
139
140
  credits?: string | undefined;
140
141
  alt?: string | undefined;
141
- notes?: string | undefined;
142
142
  filename?: string | undefined;
143
143
  }, {
144
+ notes?: string[] | undefined;
144
145
  credits?: string[] | undefined;
145
146
  alt?: string[] | undefined;
146
- notes?: string[] | undefined;
147
147
  filename?: string[] | undefined;
148
148
  }>>;
149
149
  tags: z.ZodArray<z.ZodObject<{
@@ -154,105 +154,105 @@ export declare const mediaSearchResponse: z.ZodObject<{
154
154
  last_modified: z.ZodNumber;
155
155
  count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
156
156
  }, "strip", z.ZodTypeAny, {
157
- name: string;
158
157
  id: string;
158
+ name: string;
159
159
  created_at: number;
160
160
  last_modified: number;
161
161
  count: number;
162
162
  uploader_id?: string | undefined;
163
163
  }, {
164
- name: string;
165
164
  id: string;
165
+ name: string;
166
166
  created_at: number;
167
167
  last_modified: number;
168
168
  uploader_id?: string | undefined;
169
169
  count?: number | undefined;
170
170
  }>, "many">;
171
171
  }, "strip", z.ZodTypeAny, {
172
+ id: string;
173
+ size: number;
174
+ kind: string;
175
+ url: string;
172
176
  tags: {
173
- name: string;
174
177
  id: string;
178
+ name: string;
175
179
  created_at: number;
176
180
  last_modified: number;
177
181
  count: number;
178
182
  uploader_id?: string | undefined;
179
183
  }[];
180
- id: string;
181
- url: string;
182
- kind: string;
183
- size: number;
184
184
  last_modified: number;
185
185
  filename: string;
186
- width?: number | undefined;
186
+ notes?: string | undefined;
187
187
  height?: number | undefined;
188
+ width?: number | undefined;
188
189
  credits?: string | undefined;
189
190
  alt?: string | undefined;
190
- notes?: string | undefined;
191
191
  uploader_id?: string | undefined;
192
192
  extension?: string | undefined;
193
193
  search_highlight?: {
194
+ notes?: string | undefined;
194
195
  credits?: string | undefined;
195
196
  alt?: string | undefined;
196
- notes?: string | undefined;
197
197
  filename?: string | undefined;
198
198
  } | undefined;
199
199
  }, {
200
+ id: string;
201
+ size: number;
202
+ kind: string;
203
+ url: string;
200
204
  tags: {
201
- name: string;
202
205
  id: string;
206
+ name: string;
203
207
  created_at: number;
204
208
  last_modified: number;
205
209
  uploader_id?: string | undefined;
206
210
  count?: number | undefined;
207
211
  }[];
208
- id: string;
209
- url: string;
210
- kind: string;
211
- size: number;
212
212
  last_modified: number;
213
213
  filename: string;
214
- width?: number | undefined;
214
+ notes?: string | undefined;
215
215
  height?: number | undefined;
216
+ width?: number | undefined;
216
217
  credits?: string | undefined;
217
218
  alt?: string | undefined;
218
- notes?: string | undefined;
219
219
  uploader_id?: string | undefined;
220
220
  extension?: string | undefined;
221
221
  search_highlight?: {
222
+ notes?: string[] | undefined;
222
223
  credits?: string[] | undefined;
223
224
  alt?: string[] | undefined;
224
- notes?: string[] | undefined;
225
225
  filename?: string[] | undefined;
226
226
  } | undefined;
227
227
  }>, "many">;
228
228
  }, "strip", z.ZodTypeAny, {
229
229
  total: number;
230
230
  items: {
231
+ id: string;
232
+ size: number;
233
+ kind: string;
234
+ url: string;
231
235
  tags: {
232
- name: string;
233
236
  id: string;
237
+ name: string;
234
238
  created_at: number;
235
239
  last_modified: number;
236
240
  count: number;
237
241
  uploader_id?: string | undefined;
238
242
  }[];
239
- id: string;
240
- url: string;
241
- kind: string;
242
- size: number;
243
243
  last_modified: number;
244
244
  filename: string;
245
- width?: number | undefined;
245
+ notes?: string | undefined;
246
246
  height?: number | undefined;
247
+ width?: number | undefined;
247
248
  credits?: string | undefined;
248
249
  alt?: string | undefined;
249
- notes?: string | undefined;
250
250
  uploader_id?: string | undefined;
251
251
  extension?: string | undefined;
252
252
  search_highlight?: {
253
+ notes?: string | undefined;
253
254
  credits?: string | undefined;
254
255
  alt?: string | undefined;
255
- notes?: string | undefined;
256
256
  filename?: string | undefined;
257
257
  } | undefined;
258
258
  }[];
@@ -260,31 +260,31 @@ export declare const mediaSearchResponse: z.ZodObject<{
260
260
  }, {
261
261
  total: number;
262
262
  items: {
263
+ id: string;
264
+ size: number;
265
+ kind: string;
266
+ url: string;
263
267
  tags: {
264
- name: string;
265
268
  id: string;
269
+ name: string;
266
270
  created_at: number;
267
271
  last_modified: number;
268
272
  uploader_id?: string | undefined;
269
273
  count?: number | undefined;
270
274
  }[];
271
- id: string;
272
- url: string;
273
- kind: string;
274
- size: number;
275
275
  last_modified: number;
276
276
  filename: string;
277
- width?: number | undefined;
277
+ notes?: string | undefined;
278
278
  height?: number | undefined;
279
+ width?: number | undefined;
279
280
  credits?: string | undefined;
280
281
  alt?: string | undefined;
281
- notes?: string | undefined;
282
282
  uploader_id?: string | undefined;
283
283
  extension?: string | undefined;
284
284
  search_highlight?: {
285
+ notes?: string[] | undefined;
285
286
  credits?: string[] | undefined;
286
287
  alt?: string[] | undefined;
287
- notes?: string[] | undefined;
288
288
  filename?: string[] | undefined;
289
289
  } | undefined;
290
290
  }[];
@@ -308,31 +308,31 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
308
308
  page: number;
309
309
  total: number;
310
310
  items: {
311
+ id: string;
312
+ size: number;
313
+ kind: string;
314
+ url: string;
311
315
  tags: {
312
- name: string;
313
316
  id: string;
317
+ name: string;
314
318
  created_at: number;
315
319
  last_modified: number;
316
320
  count: number;
317
321
  uploader_id?: string | undefined;
318
322
  }[];
319
- id: string;
320
- url: string;
321
- kind: string;
322
- size: number;
323
323
  last_modified: number;
324
324
  filename: string;
325
- width?: number | undefined;
325
+ notes?: string | undefined;
326
326
  height?: number | undefined;
327
+ width?: number | undefined;
327
328
  credits?: string | undefined;
328
329
  alt?: string | undefined;
329
- notes?: string | undefined;
330
330
  uploader_id?: string | undefined;
331
331
  extension?: string | undefined;
332
332
  search_highlight?: {
333
+ notes?: string | undefined;
333
334
  credits?: string | undefined;
334
335
  alt?: string | undefined;
335
- notes?: string | undefined;
336
336
  filename?: string | undefined;
337
337
  } | undefined;
338
338
  }[];
@@ -357,31 +357,31 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
357
357
  setFilters: (filters: Partial<MediaLibraryFilters>) => void;
358
358
  resetFilters: () => void;
359
359
  media: {
360
+ id: string;
361
+ size: number;
362
+ kind: string;
363
+ url: string;
360
364
  tags: {
361
- name: string;
362
365
  id: string;
366
+ name: string;
363
367
  created_at: number;
364
368
  last_modified: number;
365
369
  count: number;
366
370
  uploader_id?: string | undefined;
367
371
  }[];
368
- id: string;
369
- url: string;
370
- kind: string;
371
- size: number;
372
372
  last_modified: number;
373
373
  filename: string;
374
- width?: number | undefined;
374
+ notes?: string | undefined;
375
375
  height?: number | undefined;
376
+ width?: number | undefined;
376
377
  credits?: string | undefined;
377
378
  alt?: string | undefined;
378
- notes?: string | undefined;
379
379
  uploader_id?: string | undefined;
380
380
  extension?: string | undefined;
381
381
  search_highlight?: {
382
+ notes?: string | undefined;
382
383
  credits?: string | undefined;
383
384
  alt?: string | undefined;
384
- notes?: string | undefined;
385
385
  filename?: string | undefined;
386
386
  } | undefined;
387
387
  }[];
@@ -407,31 +407,31 @@ declare function deleteMedia(mediaIds: string[]): void;
407
407
  declare function deleteSearchData(args: MediaLibraryFilters): void;
408
408
  type MediaPage = Awaited<ReturnType<typeof searchMedia>>;
409
409
  export declare function getMedia(allPages: MediaPage[], keyword: string, assetType: MediaAssetType, uploaderId: string | undefined, tags: string): {
410
+ id: string;
411
+ size: number;
412
+ kind: string;
413
+ url: string;
410
414
  tags: {
411
- name: string;
412
415
  id: string;
416
+ name: string;
413
417
  created_at: number;
414
418
  last_modified: number;
415
419
  count: number;
416
420
  uploader_id?: string | undefined;
417
421
  }[];
418
- id: string;
419
- url: string;
420
- kind: string;
421
- size: number;
422
422
  last_modified: number;
423
423
  filename: string;
424
- width?: number | undefined;
424
+ notes?: string | undefined;
425
425
  height?: number | undefined;
426
+ width?: number | undefined;
426
427
  credits?: string | undefined;
427
428
  alt?: string | undefined;
428
- notes?: string | undefined;
429
429
  uploader_id?: string | undefined;
430
430
  extension?: string | undefined;
431
431
  search_highlight?: {
432
+ notes?: string | undefined;
432
433
  credits?: string | undefined;
433
434
  alt?: string | undefined;
434
- notes?: string | undefined;
435
435
  filename?: string | undefined;
436
436
  } | undefined;
437
437
  }[];
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare function useTagSearch(): {
3
3
  tags: {
4
- name: string;
5
4
  id: string;
5
+ name: string;
6
6
  created_at: number;
7
7
  last_modified: number;
8
8
  count: number;
@@ -20,15 +20,15 @@ export declare const tagSchema: z.ZodObject<{
20
20
  last_modified: z.ZodNumber;
21
21
  count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
22
22
  }, "strip", z.ZodTypeAny, {
23
- name: string;
24
23
  id: string;
24
+ name: string;
25
25
  created_at: number;
26
26
  last_modified: number;
27
27
  count: number;
28
28
  uploader_id?: string | undefined;
29
29
  }, {
30
- name: string;
31
30
  id: string;
31
+ name: string;
32
32
  created_at: number;
33
33
  last_modified: number;
34
34
  uploader_id?: string | undefined;
@@ -37,31 +37,31 @@ export declare function uploadMedia(params: {
37
37
  file: File;
38
38
  config: EditorConfig;
39
39
  }): Promise<{
40
+ id: string;
41
+ size: number;
42
+ kind: string;
43
+ url: string;
40
44
  tags: {
41
- name: string;
42
45
  id: string;
46
+ name: string;
43
47
  created_at: number;
44
48
  last_modified: number;
45
49
  count: number;
46
50
  uploader_id?: string | undefined;
47
51
  }[];
48
- id: string;
49
- url: string;
50
- kind: string;
51
- size: number;
52
52
  last_modified: number;
53
53
  filename: string;
54
- width?: number | undefined;
54
+ notes?: string | undefined;
55
55
  height?: number | undefined;
56
+ width?: number | undefined;
56
57
  credits?: string | undefined;
57
58
  alt?: string | undefined;
58
- notes?: string | undefined;
59
59
  uploader_id?: string | undefined;
60
60
  extension?: string | undefined;
61
61
  search_highlight?: {
62
+ notes?: string | undefined;
62
63
  credits?: string | undefined;
63
64
  alt?: string | undefined;
64
- notes?: string | undefined;
65
65
  filename?: string | undefined;
66
66
  } | undefined;
67
67
  }>;