@prismicio/editor-fields 0.4.70 → 0.4.71
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/core/APIExplorer/components/APIExplorerContext.d.ts +70 -31
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +3 -2
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -1
- package/dist/core/APIExplorer/components/Request/types.d.ts +1 -0
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +44 -44
- package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +4 -4
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +4 -4
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +18 -18
- package/dist/core/service/customType.d.ts +20 -20
- package/dist/core/service/document.d.ts +174 -174
- package/dist/core/service/documentSearch.d.ts +40 -40
- package/dist/core/service/repository.d.ts +6 -6
- package/dist/core/service/role.d.ts +10 -10
- package/dist/fields/ImageField/useImageField.d.ts +4 -4
- package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +4 -4
- package/dist/fields/IntegrationField/integrationData.d.ts +5 -5
- package/dist/fields/LinkField/Documents/documentsData.d.ts +12 -12
- package/dist/fields/LinkField/LinkField.d.ts +1 -1
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +2 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/index.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/tableCellFocusPlugin.d.ts +9 -0
- package/dist/index.cjs.js +46 -46
- package/dist/index.es.js +17886 -17511
- package/package.json +4 -4
|
@@ -1,12 +1,74 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type RequestRunReturnType, RequestTypes } from "./Request";
|
|
4
|
+
declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
5
|
+
repository: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
accessToken?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
id: string;
|
|
13
|
+
accessToken?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
type: z.ZodEnum<["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]]>;
|
|
16
|
+
options: z.ZodRecord<z.ZodEnum<["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]]>, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
17
|
+
pagination: z.ZodObject<{
|
|
18
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
pageSize?: number | undefined;
|
|
22
|
+
page?: number | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
pageSize?: number | undefined;
|
|
25
|
+
page?: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
30
|
+
repository: {
|
|
31
|
+
id: string;
|
|
32
|
+
accessToken?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
35
|
+
pagination: {
|
|
36
|
+
pageSize?: number | undefined;
|
|
37
|
+
page?: number | undefined;
|
|
38
|
+
};
|
|
39
|
+
lang?: string | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
42
|
+
repository: {
|
|
43
|
+
id: string;
|
|
44
|
+
accessToken?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
47
|
+
pagination: {
|
|
48
|
+
pageSize?: number | undefined;
|
|
49
|
+
page?: number | undefined;
|
|
50
|
+
};
|
|
51
|
+
lang?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
export type APIExplorerRequestProperties = z.infer<typeof APIExplorerRequestProperties>;
|
|
54
|
+
type APIExplorerRequestMethods = {
|
|
55
|
+
setRepositoryID: (id: string) => void;
|
|
56
|
+
setRepositoryAccessToken: (token: string) => void;
|
|
57
|
+
setRequestType: (type: RequestTypes) => void;
|
|
58
|
+
setRequestOptions: <Type extends RequestTypes>(type: Type, options: APIExplorerRequestProperties["options"][Type]) => void;
|
|
59
|
+
setPagination: (pagination: {
|
|
60
|
+
page?: number;
|
|
61
|
+
pageSize?: number;
|
|
62
|
+
}) => void;
|
|
63
|
+
setLang: (lang?: string) => void;
|
|
64
|
+
run: () => Promise<void>;
|
|
6
65
|
};
|
|
7
66
|
type ResponseBase = {
|
|
8
67
|
duration: number;
|
|
9
68
|
};
|
|
69
|
+
type ResponseIdle = {
|
|
70
|
+
status: "idle";
|
|
71
|
+
};
|
|
10
72
|
type ResponsePending = {
|
|
11
73
|
status: "pending";
|
|
12
74
|
};
|
|
@@ -21,36 +83,13 @@ export type ResponseError = ResponseBase & {
|
|
|
21
83
|
url?: string;
|
|
22
84
|
error: Error;
|
|
23
85
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
id: string;
|
|
27
|
-
accessToken: string;
|
|
28
|
-
};
|
|
29
|
-
type: RequestTypes;
|
|
30
|
-
options: {
|
|
31
|
-
[Type in RequestTypes]?: Record<string, string>;
|
|
32
|
-
};
|
|
33
|
-
pagination: RequestPagination;
|
|
34
|
-
lang?: string;
|
|
35
|
-
response?: ResponsePending | ResponseSuccess | ResponseError;
|
|
36
|
-
};
|
|
37
|
-
type UseAPIExplorerRequestMethods = {
|
|
38
|
-
setRepositoryID: (id: string) => void;
|
|
39
|
-
setRepositoryAccessToken: (token: string) => void;
|
|
40
|
-
setRequestType: (type: RequestTypes) => void;
|
|
41
|
-
setRequestOptions: <Type extends RequestTypes>(type: Type, options: UseAPIExplorerRequestProperties["options"][Type]) => void;
|
|
42
|
-
setPagination: (pagination: {
|
|
43
|
-
page?: number;
|
|
44
|
-
pageSize?: number;
|
|
45
|
-
}) => void;
|
|
46
|
-
setLang: (lang?: string) => void;
|
|
47
|
-
run: () => Promise<void>;
|
|
48
|
-
};
|
|
86
|
+
type APIExplorerResponse = ResponseIdle | ResponsePending | ResponseSuccess | ResponseError;
|
|
87
|
+
export declare const apiExplorerShareableUrlSearchParam = "request";
|
|
49
88
|
type APIExplorerContextType = {
|
|
50
|
-
request:
|
|
89
|
+
request: APIExplorerRequestProperties & APIExplorerRequestMethods;
|
|
90
|
+
response: APIExplorerResponse;
|
|
51
91
|
};
|
|
52
92
|
type APIExplorerProviderProps = PropsWithChildren;
|
|
53
93
|
export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
|
|
54
94
|
export declare function useAPIExplorer(): APIExplorerContextType;
|
|
55
|
-
export declare function useAPIExplorerRequest(): UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
|
|
56
95
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Client } from "@prismicio/client";
|
|
3
|
-
import type { RequestPagination } from "../APIExplorerContext";
|
|
4
3
|
import type { RequestRunReturnType } from "./types";
|
|
5
|
-
type RequestOptions = Record<string, string | number | undefined> &
|
|
4
|
+
type RequestOptions = Record<string, string | number | undefined> & {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: number;
|
|
6
7
|
lang?: string;
|
|
7
8
|
};
|
|
8
9
|
export type RequestConfig<TType extends string> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type RequestRunReturnType, Requests,
|
|
1
|
+
export { type RequestRunReturnType, Requests, RequestTypes } from "./types";
|
|
@@ -11,4 +11,5 @@ export declare const Requests: {
|
|
|
11
11
|
};
|
|
12
12
|
export type Requests = typeof Requests;
|
|
13
13
|
export type RequestTypes = keyof Requests;
|
|
14
|
+
export declare const RequestTypes: ["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]];
|
|
14
15
|
export type RequestRunReturnType = PrismicDocument[] | PrismicDocument | Query | Repository;
|
|
@@ -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,15 +39,15 @@ 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
|
-
id: string;
|
|
43
42
|
name: string;
|
|
43
|
+
id: string;
|
|
44
44
|
created_at: number;
|
|
45
45
|
last_modified: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
|
-
id: string;
|
|
50
49
|
name: string;
|
|
50
|
+
id: string;
|
|
51
51
|
created_at: number;
|
|
52
52
|
last_modified: number;
|
|
53
53
|
uploader_id?: string | undefined;
|
|
@@ -55,12 +55,12 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
+
size: number;
|
|
58
59
|
url: string;
|
|
59
60
|
kind: string;
|
|
60
|
-
size: number;
|
|
61
61
|
tags: {
|
|
62
|
-
id: string;
|
|
63
62
|
name: string;
|
|
63
|
+
id: string;
|
|
64
64
|
created_at: number;
|
|
65
65
|
last_modified: number;
|
|
66
66
|
count: number;
|
|
@@ -70,25 +70,25 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
70
70
|
filename: string;
|
|
71
71
|
width?: number | undefined;
|
|
72
72
|
height?: number | undefined;
|
|
73
|
+
notes?: string | 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
85
|
id: string;
|
|
86
|
+
size: number;
|
|
86
87
|
url: string;
|
|
87
88
|
kind: string;
|
|
88
|
-
size: number;
|
|
89
89
|
tags: {
|
|
90
|
-
id: string;
|
|
91
90
|
name: string;
|
|
91
|
+
id: string;
|
|
92
92
|
created_at: number;
|
|
93
93
|
last_modified: number;
|
|
94
94
|
uploader_id?: string | undefined;
|
|
@@ -98,15 +98,15 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
98
98
|
filename: string;
|
|
99
99
|
width?: number | undefined;
|
|
100
100
|
height?: number | undefined;
|
|
101
|
+
notes?: string | 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,15 +154,15 @@ 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
|
-
id: string;
|
|
158
157
|
name: string;
|
|
158
|
+
id: string;
|
|
159
159
|
created_at: number;
|
|
160
160
|
last_modified: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
|
-
id: string;
|
|
165
164
|
name: string;
|
|
165
|
+
id: string;
|
|
166
166
|
created_at: number;
|
|
167
167
|
last_modified: number;
|
|
168
168
|
uploader_id?: string | undefined;
|
|
@@ -170,12 +170,12 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
172
|
id: string;
|
|
173
|
+
size: number;
|
|
173
174
|
url: string;
|
|
174
175
|
kind: string;
|
|
175
|
-
size: number;
|
|
176
176
|
tags: {
|
|
177
|
-
id: string;
|
|
178
177
|
name: string;
|
|
178
|
+
id: string;
|
|
179
179
|
created_at: number;
|
|
180
180
|
last_modified: number;
|
|
181
181
|
count: number;
|
|
@@ -185,25 +185,25 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
185
185
|
filename: string;
|
|
186
186
|
width?: number | undefined;
|
|
187
187
|
height?: number | undefined;
|
|
188
|
+
notes?: string | 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
200
|
id: string;
|
|
201
|
+
size: number;
|
|
201
202
|
url: string;
|
|
202
203
|
kind: string;
|
|
203
|
-
size: number;
|
|
204
204
|
tags: {
|
|
205
|
-
id: string;
|
|
206
205
|
name: string;
|
|
206
|
+
id: string;
|
|
207
207
|
created_at: number;
|
|
208
208
|
last_modified: number;
|
|
209
209
|
uploader_id?: string | undefined;
|
|
@@ -213,15 +213,15 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
213
213
|
filename: string;
|
|
214
214
|
width?: number | undefined;
|
|
215
215
|
height?: number | undefined;
|
|
216
|
+
notes?: string | 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">;
|
|
@@ -229,12 +229,12 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
229
229
|
total: number;
|
|
230
230
|
items: {
|
|
231
231
|
id: string;
|
|
232
|
+
size: number;
|
|
232
233
|
url: string;
|
|
233
234
|
kind: string;
|
|
234
|
-
size: number;
|
|
235
235
|
tags: {
|
|
236
|
-
id: string;
|
|
237
236
|
name: string;
|
|
237
|
+
id: string;
|
|
238
238
|
created_at: number;
|
|
239
239
|
last_modified: number;
|
|
240
240
|
count: number;
|
|
@@ -244,15 +244,15 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
244
244
|
filename: string;
|
|
245
245
|
width?: number | undefined;
|
|
246
246
|
height?: number | undefined;
|
|
247
|
+
notes?: string | 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
|
}[];
|
|
@@ -261,12 +261,12 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
261
261
|
total: number;
|
|
262
262
|
items: {
|
|
263
263
|
id: string;
|
|
264
|
+
size: number;
|
|
264
265
|
url: string;
|
|
265
266
|
kind: string;
|
|
266
|
-
size: number;
|
|
267
267
|
tags: {
|
|
268
|
-
id: string;
|
|
269
268
|
name: string;
|
|
269
|
+
id: string;
|
|
270
270
|
created_at: number;
|
|
271
271
|
last_modified: number;
|
|
272
272
|
uploader_id?: string | undefined;
|
|
@@ -276,15 +276,15 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
276
276
|
filename: string;
|
|
277
277
|
width?: number | undefined;
|
|
278
278
|
height?: number | undefined;
|
|
279
|
+
notes?: string | 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
|
}[];
|
|
@@ -309,12 +309,12 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
309
309
|
total: number;
|
|
310
310
|
items: {
|
|
311
311
|
id: string;
|
|
312
|
+
size: number;
|
|
312
313
|
url: string;
|
|
313
314
|
kind: string;
|
|
314
|
-
size: number;
|
|
315
315
|
tags: {
|
|
316
|
-
id: string;
|
|
317
316
|
name: string;
|
|
317
|
+
id: string;
|
|
318
318
|
created_at: number;
|
|
319
319
|
last_modified: number;
|
|
320
320
|
count: number;
|
|
@@ -324,15 +324,15 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
324
324
|
filename: string;
|
|
325
325
|
width?: number | undefined;
|
|
326
326
|
height?: number | undefined;
|
|
327
|
+
notes?: string | 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
|
}[];
|
|
@@ -358,12 +358,12 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
360
|
id: string;
|
|
361
|
+
size: number;
|
|
361
362
|
url: string;
|
|
362
363
|
kind: string;
|
|
363
|
-
size: number;
|
|
364
364
|
tags: {
|
|
365
|
-
id: string;
|
|
366
365
|
name: string;
|
|
366
|
+
id: string;
|
|
367
367
|
created_at: number;
|
|
368
368
|
last_modified: number;
|
|
369
369
|
count: number;
|
|
@@ -373,15 +373,15 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
373
373
|
filename: string;
|
|
374
374
|
width?: number | undefined;
|
|
375
375
|
height?: number | undefined;
|
|
376
|
+
notes?: string | 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
|
}[];
|
|
@@ -408,12 +408,12 @@ 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
410
|
id: string;
|
|
411
|
+
size: number;
|
|
411
412
|
url: string;
|
|
412
413
|
kind: string;
|
|
413
|
-
size: number;
|
|
414
414
|
tags: {
|
|
415
|
-
id: string;
|
|
416
415
|
name: string;
|
|
416
|
+
id: string;
|
|
417
417
|
created_at: number;
|
|
418
418
|
last_modified: number;
|
|
419
419
|
count: number;
|
|
@@ -423,15 +423,15 @@ export declare function getMedia(allPages: MediaPage[], keyword: string, assetTy
|
|
|
423
423
|
filename: string;
|
|
424
424
|
width?: number | undefined;
|
|
425
425
|
height?: number | undefined;
|
|
426
|
+
notes?: string | 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
|
-
id: string;
|
|
5
4
|
name: string;
|
|
5
|
+
id: 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
|
-
id: string;
|
|
24
23
|
name: string;
|
|
24
|
+
id: string;
|
|
25
25
|
created_at: number;
|
|
26
26
|
last_modified: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
|
-
id: string;
|
|
31
30
|
name: string;
|
|
31
|
+
id: string;
|
|
32
32
|
created_at: number;
|
|
33
33
|
last_modified: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
@@ -38,12 +38,12 @@ export declare function uploadMedia(params: {
|
|
|
38
38
|
config: EditorConfig;
|
|
39
39
|
}): Promise<{
|
|
40
40
|
id: string;
|
|
41
|
+
size: number;
|
|
41
42
|
url: string;
|
|
42
43
|
kind: string;
|
|
43
|
-
size: number;
|
|
44
44
|
tags: {
|
|
45
|
-
id: string;
|
|
46
45
|
name: string;
|
|
46
|
+
id: string;
|
|
47
47
|
created_at: number;
|
|
48
48
|
last_modified: number;
|
|
49
49
|
count: number;
|
|
@@ -53,15 +53,15 @@ export declare function uploadMedia(params: {
|
|
|
53
53
|
filename: string;
|
|
54
54
|
width?: number | undefined;
|
|
55
55
|
height?: number | undefined;
|
|
56
|
+
notes?: string | 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
|
}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
2
|
id: string;
|
|
3
|
+
size: number;
|
|
3
4
|
url: string;
|
|
4
5
|
kind: string;
|
|
5
|
-
size: number;
|
|
6
6
|
tags: {
|
|
7
|
-
id: string;
|
|
8
7
|
name: string;
|
|
8
|
+
id: string;
|
|
9
9
|
created_at: number;
|
|
10
10
|
last_modified: number;
|
|
11
11
|
count: number;
|
|
@@ -15,15 +15,15 @@ export declare function useSelectedMedia(): {
|
|
|
15
15
|
filename: string;
|
|
16
16
|
width?: number | undefined;
|
|
17
17
|
height?: number | undefined;
|
|
18
|
+
notes?: string | undefined;
|
|
18
19
|
credits?: string | undefined;
|
|
19
20
|
alt?: string | undefined;
|
|
20
|
-
notes?: string | undefined;
|
|
21
21
|
uploader_id?: string | undefined;
|
|
22
22
|
extension?: string | undefined;
|
|
23
23
|
search_highlight?: {
|
|
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
|
} | undefined;
|
|
29
29
|
}[];
|