@prismicio/editor-fields 0.4.72 → 0.4.73
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/EditorConfig.d.ts +2 -10
- package/dist/core/APIExplorer/APIExplorer.d.ts +4 -1
- package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +36 -8
- package/dist/core/APIExplorer/components/Request/components/RequestRefFieldset.d.ts +1 -1
- package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +12 -3
- package/dist/core/APIExplorer/components/Request/components/index.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useRepositoryCustomTypes.d.ts +6 -0
- package/dist/core/APIExplorer/hooks/useRequestRepository.d.ts +1 -1
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +31 -31
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +3 -3
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
- package/dist/core/service/customType.d.ts +9 -9
- package/dist/core/service/document.d.ts +151 -151
- package/dist/core/service/documentSearch.d.ts +40 -40
- package/dist/core/service/repository.d.ts +12 -12
- package/dist/fields/ImageField/useImageField.d.ts +3 -3
- package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +3 -3
- 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/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +3 -3
- package/dist/index.cjs.js +42 -42
- package/dist/index.es.js +12451 -12397
- package/dist/slices/utils.d.ts +4 -4
- package/package.json +4 -4
- package/dist/core/APIExplorer/hooks/useRequestRepositoryCustomTypes.d.ts +0 -6
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
3
|
+
import type { APIExplorerEvents } from "./core/APIExplorer/components/APIExplorerContext";
|
|
3
4
|
import type { MetadataType } from "./core/service";
|
|
4
5
|
export type EditorConfig = {
|
|
5
6
|
baseUrl: URL;
|
|
@@ -95,19 +96,10 @@ interface OnAnalyticsEvent {
|
|
|
95
96
|
customTypeFormat: "page" | "custom";
|
|
96
97
|
}): void;
|
|
97
98
|
(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;
|
|
108
99
|
(event: "Table Limit Reached", args: {
|
|
109
100
|
type: "row" | "column";
|
|
110
101
|
}): void;
|
|
102
|
+
(...params: APIExplorerEvents): void;
|
|
111
103
|
}
|
|
112
104
|
interface Analytics {
|
|
113
105
|
onAnalyticsEvent?: OnAnalyticsEvent;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { type APIExplorerProviderProps } from "./components/APIExplorerContext";
|
|
3
|
+
type APIExplorerProps = Pick<APIExplorerProviderProps, "repository" | "track">;
|
|
4
|
+
export declare function APIExplorer(props: APIExplorerProps): JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -18,37 +18,37 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
18
18
|
page: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
page?: number | undefined;
|
|
22
21
|
pageSize?: number | undefined;
|
|
23
|
-
}, {
|
|
24
22
|
page?: number | undefined;
|
|
23
|
+
}, {
|
|
25
24
|
pageSize?: number | undefined;
|
|
25
|
+
page?: number | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
lang: z.ZodOptional<z.ZodString>;
|
|
28
28
|
ref: z.ZodOptional<z.ZodString>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
31
30
|
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
32
31
|
repository: {
|
|
33
32
|
id: string;
|
|
34
33
|
accessToken?: string | undefined;
|
|
35
34
|
};
|
|
35
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
36
36
|
pagination: {
|
|
37
|
-
page?: number | undefined;
|
|
38
37
|
pageSize?: number | undefined;
|
|
38
|
+
page?: number | undefined;
|
|
39
39
|
};
|
|
40
40
|
ref?: string | undefined;
|
|
41
41
|
lang?: string | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
44
43
|
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
45
44
|
repository: {
|
|
46
45
|
id: string;
|
|
47
46
|
accessToken?: string | undefined;
|
|
48
47
|
};
|
|
48
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
49
49
|
pagination: {
|
|
50
|
-
page?: number | undefined;
|
|
51
50
|
pageSize?: number | undefined;
|
|
51
|
+
page?: number | undefined;
|
|
52
52
|
};
|
|
53
53
|
ref?: string | undefined;
|
|
54
54
|
lang?: string | undefined;
|
|
@@ -88,12 +88,40 @@ export type ResponseError = ResponseBase & {
|
|
|
88
88
|
error: Error;
|
|
89
89
|
};
|
|
90
90
|
type APIExplorerResponse = ResponseIdle | ResponsePending | ResponseSuccess | ResponseError;
|
|
91
|
-
|
|
91
|
+
type APIExplorerConfig = {
|
|
92
|
+
/**
|
|
93
|
+
* Repository information to use the API Explorer with.
|
|
94
|
+
* When not provided, the API Explorer will allow entering a repository ID.
|
|
95
|
+
*/
|
|
96
|
+
repository?: {
|
|
97
|
+
id: string;
|
|
98
|
+
documentAPIEndpoint: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
92
101
|
type APIExplorerContextType = {
|
|
93
102
|
request: APIExplorerRequestProperties & APIExplorerRequestMethods;
|
|
94
103
|
response: APIExplorerResponse;
|
|
104
|
+
config: APIExplorerConfig;
|
|
95
105
|
};
|
|
96
|
-
type
|
|
106
|
+
export type APIExplorerEvents = [
|
|
107
|
+
event: "API Explorer Request",
|
|
108
|
+
args: {
|
|
109
|
+
type: RequestTypes;
|
|
110
|
+
repositoryID: string;
|
|
111
|
+
}
|
|
112
|
+
] | [
|
|
113
|
+
event: "API Explorer Request Error",
|
|
114
|
+
args: {
|
|
115
|
+
type: RequestTypes;
|
|
116
|
+
repositoryID: string;
|
|
117
|
+
error?: string;
|
|
118
|
+
url?: string;
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
export type APIExplorerProviderProps = {
|
|
122
|
+
track?: (...params: APIExplorerEvents) => void;
|
|
123
|
+
} & APIExplorerConfig & PropsWithChildren;
|
|
97
124
|
export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
|
|
98
125
|
export declare function useAPIExplorer(): APIExplorerContextType;
|
|
126
|
+
export declare const apiExplorerShareableUrlSearchParam = "request";
|
|
99
127
|
export {};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
type RequestTypeFieldsetProps = {
|
|
3
|
+
nonRepeatableOnly?: boolean;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
6
|
* Display a fieldset managing a request document type setting.
|
|
4
7
|
*/
|
|
5
|
-
export declare function RequestTypeFieldset(props:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
export declare function RequestTypeFieldset(props: RequestTypeFieldsetProps): JSX.Element;
|
|
9
|
+
type RequestTypeFieldsetContentProps = {
|
|
10
|
+
customTypes?: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
export declare function RequestTypeFieldsetContent(props: RequestTypeFieldsetContentProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { RequestFormInput } from "./RequestFormInput";
|
|
2
2
|
export { RequestLangFieldset } from "./RequestLangFieldset";
|
|
3
3
|
export { RequestPaginationFieldset } from "./RequestPaginationFieldset";
|
|
4
|
+
export { RequestRefFieldset } from "./RequestRefFieldset";
|
|
4
5
|
export { RequestTypeFieldset } from "./RequestTypeFieldset";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useRequestRepository(): import("@prismicio/client").Repository;
|
|
1
|
+
export declare function useRequestRepository(): import("@prismicio/client").Repository | undefined;
|
|
@@ -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<{
|
|
@@ -54,10 +54,10 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
54
54
|
count?: number | undefined;
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
size: number;
|
|
57
58
|
id: string;
|
|
58
59
|
url: string;
|
|
59
60
|
kind: string;
|
|
60
|
-
size: number;
|
|
61
61
|
tags: {
|
|
62
62
|
id: string;
|
|
63
63
|
name: string;
|
|
@@ -68,24 +68,24 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
68
68
|
}[];
|
|
69
69
|
last_modified: number;
|
|
70
70
|
filename: string;
|
|
71
|
+
notes?: string | undefined;
|
|
71
72
|
width?: number | undefined;
|
|
72
73
|
height?: 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
|
+
size: number;
|
|
85
86
|
id: string;
|
|
86
87
|
url: string;
|
|
87
88
|
kind: string;
|
|
88
|
-
size: number;
|
|
89
89
|
tags: {
|
|
90
90
|
id: string;
|
|
91
91
|
name: string;
|
|
@@ -96,17 +96,17 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
96
96
|
}[];
|
|
97
97
|
last_modified: number;
|
|
98
98
|
filename: string;
|
|
99
|
+
notes?: string | undefined;
|
|
99
100
|
width?: number | undefined;
|
|
100
101
|
height?: 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<{
|
|
@@ -169,10 +169,10 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
169
169
|
count?: number | undefined;
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
size: number;
|
|
172
173
|
id: string;
|
|
173
174
|
url: string;
|
|
174
175
|
kind: string;
|
|
175
|
-
size: number;
|
|
176
176
|
tags: {
|
|
177
177
|
id: string;
|
|
178
178
|
name: string;
|
|
@@ -183,24 +183,24 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
183
183
|
}[];
|
|
184
184
|
last_modified: number;
|
|
185
185
|
filename: string;
|
|
186
|
+
notes?: string | undefined;
|
|
186
187
|
width?: number | undefined;
|
|
187
188
|
height?: 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
|
+
size: number;
|
|
200
201
|
id: string;
|
|
201
202
|
url: string;
|
|
202
203
|
kind: string;
|
|
203
|
-
size: number;
|
|
204
204
|
tags: {
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
@@ -211,27 +211,27 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
211
211
|
}[];
|
|
212
212
|
last_modified: number;
|
|
213
213
|
filename: string;
|
|
214
|
+
notes?: string | undefined;
|
|
214
215
|
width?: number | undefined;
|
|
215
216
|
height?: 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
|
+
size: number;
|
|
231
232
|
id: string;
|
|
232
233
|
url: string;
|
|
233
234
|
kind: string;
|
|
234
|
-
size: number;
|
|
235
235
|
tags: {
|
|
236
236
|
id: string;
|
|
237
237
|
name: string;
|
|
@@ -242,17 +242,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
242
242
|
}[];
|
|
243
243
|
last_modified: number;
|
|
244
244
|
filename: string;
|
|
245
|
+
notes?: string | undefined;
|
|
245
246
|
width?: number | undefined;
|
|
246
247
|
height?: 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,10 +260,10 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
260
260
|
}, {
|
|
261
261
|
total: number;
|
|
262
262
|
items: {
|
|
263
|
+
size: number;
|
|
263
264
|
id: string;
|
|
264
265
|
url: string;
|
|
265
266
|
kind: string;
|
|
266
|
-
size: number;
|
|
267
267
|
tags: {
|
|
268
268
|
id: string;
|
|
269
269
|
name: string;
|
|
@@ -274,17 +274,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
274
274
|
}[];
|
|
275
275
|
last_modified: number;
|
|
276
276
|
filename: string;
|
|
277
|
+
notes?: string | undefined;
|
|
277
278
|
width?: number | undefined;
|
|
278
279
|
height?: 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,10 +308,10 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
308
308
|
page: number;
|
|
309
309
|
total: number;
|
|
310
310
|
items: {
|
|
311
|
+
size: number;
|
|
311
312
|
id: string;
|
|
312
313
|
url: string;
|
|
313
314
|
kind: string;
|
|
314
|
-
size: number;
|
|
315
315
|
tags: {
|
|
316
316
|
id: string;
|
|
317
317
|
name: string;
|
|
@@ -322,17 +322,17 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
322
322
|
}[];
|
|
323
323
|
last_modified: number;
|
|
324
324
|
filename: string;
|
|
325
|
+
notes?: string | undefined;
|
|
325
326
|
width?: number | undefined;
|
|
326
327
|
height?: 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,10 +357,10 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
357
357
|
setFilters: (filters: Partial<MediaLibraryFilters>) => void;
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
|
+
size: number;
|
|
360
361
|
id: string;
|
|
361
362
|
url: string;
|
|
362
363
|
kind: string;
|
|
363
|
-
size: number;
|
|
364
364
|
tags: {
|
|
365
365
|
id: string;
|
|
366
366
|
name: string;
|
|
@@ -371,17 +371,17 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
371
371
|
}[];
|
|
372
372
|
last_modified: number;
|
|
373
373
|
filename: string;
|
|
374
|
+
notes?: string | undefined;
|
|
374
375
|
width?: number | undefined;
|
|
375
376
|
height?: 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,10 +407,10 @@ 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
|
+
size: number;
|
|
410
411
|
id: string;
|
|
411
412
|
url: string;
|
|
412
413
|
kind: string;
|
|
413
|
-
size: number;
|
|
414
414
|
tags: {
|
|
415
415
|
id: string;
|
|
416
416
|
name: string;
|
|
@@ -421,17 +421,17 @@ export declare function getMedia(allPages: MediaPage[], keyword: string, assetTy
|
|
|
421
421
|
}[];
|
|
422
422
|
last_modified: number;
|
|
423
423
|
filename: string;
|
|
424
|
+
notes?: string | undefined;
|
|
424
425
|
width?: number | undefined;
|
|
425
426
|
height?: 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
|
}[];
|
|
@@ -37,10 +37,10 @@ export declare function uploadMedia(params: {
|
|
|
37
37
|
file: File;
|
|
38
38
|
config: EditorConfig;
|
|
39
39
|
}): Promise<{
|
|
40
|
+
size: number;
|
|
40
41
|
id: string;
|
|
41
42
|
url: string;
|
|
42
43
|
kind: string;
|
|
43
|
-
size: number;
|
|
44
44
|
tags: {
|
|
45
45
|
id: string;
|
|
46
46
|
name: string;
|
|
@@ -51,17 +51,17 @@ export declare function uploadMedia(params: {
|
|
|
51
51
|
}[];
|
|
52
52
|
last_modified: number;
|
|
53
53
|
filename: string;
|
|
54
|
+
notes?: string | undefined;
|
|
54
55
|
width?: number | undefined;
|
|
55
56
|
height?: 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
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
|
+
size: number;
|
|
2
3
|
id: string;
|
|
3
4
|
url: string;
|
|
4
5
|
kind: string;
|
|
5
|
-
size: number;
|
|
6
6
|
tags: {
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
@@ -13,17 +13,17 @@ export declare function useSelectedMedia(): {
|
|
|
13
13
|
}[];
|
|
14
14
|
last_modified: number;
|
|
15
15
|
filename: string;
|
|
16
|
+
notes?: string | undefined;
|
|
16
17
|
width?: number | undefined;
|
|
17
18
|
height?: number | 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
|
}[];
|
|
@@ -16,8 +16,8 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
16
16
|
alt_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
17
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
18
18
|
}, "strip", import("zod").ZodTypeAny, {
|
|
19
|
-
id: string;
|
|
20
19
|
description: string | null;
|
|
20
|
+
id: string;
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
23
23
|
urls: {
|
|
@@ -26,8 +26,8 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
26
26
|
};
|
|
27
27
|
alt_description?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
id: string;
|
|
30
29
|
description: string | null;
|
|
30
|
+
id: string;
|
|
31
31
|
width: number;
|
|
32
32
|
height: number;
|
|
33
33
|
urls: {
|
|
@@ -54,8 +54,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
54
54
|
alt_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
55
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
56
56
|
}, "strip", import("zod").ZodTypeAny, {
|
|
57
|
-
id: string;
|
|
58
57
|
description: string | null;
|
|
58
|
+
id: string;
|
|
59
59
|
width: number;
|
|
60
60
|
height: number;
|
|
61
61
|
urls: {
|
|
@@ -64,8 +64,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
64
64
|
};
|
|
65
65
|
alt_description?: string | undefined;
|
|
66
66
|
}, {
|
|
67
|
-
id: string;
|
|
68
67
|
description: string | null;
|
|
68
|
+
id: string;
|
|
69
69
|
width: number;
|
|
70
70
|
height: number;
|
|
71
71
|
urls: {
|
|
@@ -76,8 +76,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
76
76
|
}>, "many">;
|
|
77
77
|
}, "strip", import("zod").ZodTypeAny, {
|
|
78
78
|
results: {
|
|
79
|
-
id: string;
|
|
80
79
|
description: string | null;
|
|
80
|
+
id: string;
|
|
81
81
|
width: number;
|
|
82
82
|
height: number;
|
|
83
83
|
urls: {
|
|
@@ -88,8 +88,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
88
88
|
}[];
|
|
89
89
|
}, {
|
|
90
90
|
results: {
|
|
91
|
-
id: string;
|
|
92
91
|
description: string | null;
|
|
92
|
+
id: string;
|
|
93
93
|
width: number;
|
|
94
94
|
height: number;
|
|
95
95
|
urls: {
|
|
@@ -99,8 +99,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
99
99
|
alt_description?: string | undefined;
|
|
100
100
|
}[];
|
|
101
101
|
}>, {
|
|
102
|
-
id: string;
|
|
103
102
|
description: string | null;
|
|
103
|
+
id: string;
|
|
104
104
|
width: number;
|
|
105
105
|
height: number;
|
|
106
106
|
urls: {
|
|
@@ -110,8 +110,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
110
110
|
alt_description?: string | undefined;
|
|
111
111
|
}[], {
|
|
112
112
|
results: {
|
|
113
|
-
id: string;
|
|
114
113
|
description: string | null;
|
|
114
|
+
id: string;
|
|
115
115
|
width: number;
|
|
116
116
|
height: number;
|
|
117
117
|
urls: {
|
|
@@ -124,8 +124,8 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
124
124
|
export type UnplashSearchApi = TypeOf<typeof unsplashSearchApiType>;
|
|
125
125
|
export type UnsplashImage = TypeOf<typeof unsplashImage>;
|
|
126
126
|
export declare function useUnsplashSearch(baseUrl: URL, term: string): {
|
|
127
|
-
id: string;
|
|
128
127
|
description: string | null;
|
|
128
|
+
id: string;
|
|
129
129
|
width: number;
|
|
130
130
|
height: number;
|
|
131
131
|
urls: {
|