@prismicio/editor-fields 0.4.52-jp-onboarding-guide-triggers-highlight → 0.4.53
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/GroupEditor.d.ts +2 -2
- package/dist/SliceSelection.d.ts +4 -4
- package/dist/core/MediaLibrary/components/MediaLibraryContext.d.ts +4 -4
- package/dist/core/MediaLibrary/components/MediaLibraryToast.d.ts +7 -7
- package/dist/core/MediaLibrary/components/MediaList.d.ts +2 -2
- package/dist/core/MediaLibrary/components/NewMediaLibraryFeaturesBanner.d.ts +2 -2
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneContainer.d.ts +2 -2
- package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/SingleMediaMetadataTags.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +52 -52
- package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/uploadersData.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/useMediaLibraryAnalytics.d.ts +4 -4
- package/dist/core/MediaLibrary/hooks/useMediaLibraryCacheInvalidation.d.ts +2 -2
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +6 -6
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +5 -5
- package/dist/core/SelectionManager/SelectionManagerTypes.d.ts +8 -8
- package/dist/core/UID.d.ts +6 -6
- package/dist/core/UnsplashLibrary/UnsplashLibrary.d.ts +2 -2
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +18 -18
- package/dist/core/document.d.ts +2 -2
- package/dist/core/imageUtils.d.ts +4 -4
- package/dist/core/service/document.d.ts +12 -12
- package/dist/core/service/onboarding.d.ts +5 -5
- package/dist/core/service/repository.d.ts +1 -1
- package/dist/fields/ImageField/Components/ImageAltControl.d.ts +2 -2
- package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +2 -2
- package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +3 -3
- package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +10 -10
- package/dist/fields/ImageField/MediaDialog/MediaDialog.d.ts +2 -2
- package/dist/fields/ImageField/useImageField.d.ts +2 -2
- package/dist/fields/IntegrationField/IntegrationInput.d.ts +6 -6
- package/dist/fields/LinkField/Documents/DocumentCard.d.ts +1 -0
- package/dist/fields/LinkField/Documents/DocumentsModal.d.ts +5 -4
- package/dist/fields/LinkField/Documents/Filters.d.ts +6 -6
- package/dist/fields/LinkField/LinkDescriptionCard.d.ts +2 -2
- package/dist/fields/LinkField/LinkField.d.ts +7 -7
- package/dist/fields/LinkField/LinkImageCard.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Label/LabelItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/DocumentDescriptionCard.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +4 -4
- package/dist/fields/RichTextField/BubbleMenu/Link/SetMediaLinkModal.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/Link/SetWebLinkModal.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/MarkItems.d.ts +2 -2
- package/dist/fields/RichTextField/BubbleMenu/NodeItems.d.ts +2 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Label/Label.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Label/LabelModel.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +11 -11
- package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +2 -2
- package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
- package/dist/index.cjs.js +34 -34
- package/dist/index.es.js +15068 -14940
- package/dist/slices/LegacySliceEditor.d.ts +2 -2
- package/dist/slices/utils.d.ts +1 -1
- package/dist/zones/Components/LegacyCustomLabelSelect.d.ts +2 -2
- package/dist/zones/NonRepeatableZoneEditor.d.ts +2 -2
- package/dist/zones/SliceZoneEditor.d.ts +2 -2
- package/package.json +4 -4
package/dist/GroupEditor.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { GroupContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Group } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
-
|
|
5
|
-
content: GroupContent | undefined;
|
|
4
|
+
interface GroupEditorProps {
|
|
5
|
+
content: GroupContent | undefined;
|
|
6
6
|
group: Group;
|
|
7
7
|
id: string;
|
|
8
8
|
readOnly: boolean;
|
package/dist/SliceSelection.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
2
|
+
export interface SliceSelection {
|
|
3
|
+
/**
|
|
4
4
|
* The keys of the slices that are currently selected.
|
|
5
5
|
*/
|
|
6
6
|
ids: string[];
|
|
@@ -12,8 +12,8 @@ export type SliceSelection = {
|
|
|
12
12
|
*/
|
|
13
13
|
update: (args: SliceSelectionUpdateArgs) => void;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
id: string;
|
|
15
|
+
export interface SliceSelectionUpdateArgs {
|
|
16
|
+
id: string;
|
|
17
17
|
requestedFrom: "all" | SliceSelectionArea;
|
|
18
18
|
shiftKey?: boolean;
|
|
19
19
|
metaKey?: boolean;
|
|
@@ -2,8 +2,8 @@ import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
|
2
2
|
import { type PropsWithChildren, type RefObject } from "react";
|
|
3
3
|
import { type MediaAsset, type MediaLibraryFilters } from "../hooks/mediaLibraryData";
|
|
4
4
|
import { type UploadFile } from "../hooks/useMediaLibraryUpload";
|
|
5
|
-
|
|
6
|
-
onScrollToBottom: () => void;
|
|
5
|
+
interface MediaLibraryContextValue {
|
|
6
|
+
onScrollToBottom: () => void;
|
|
7
7
|
isFetchingMedia: boolean;
|
|
8
8
|
media: MediaAsset[];
|
|
9
9
|
mediaTotal: number;
|
|
@@ -42,8 +42,8 @@ onScrollToBottom: () => void;
|
|
|
42
42
|
setOpenMediaSection: (section: MediaSection | undefined) => void;
|
|
43
43
|
}
|
|
44
44
|
type MediaSection = "tags";
|
|
45
|
-
|
|
46
|
-
/**
|
|
45
|
+
interface MediaLibraryProviderProps extends PropsWithChildren {
|
|
46
|
+
/**
|
|
47
47
|
* The type of media to allow in the media library.
|
|
48
48
|
* @default all
|
|
49
49
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { type IconName } from "@prismicio/editor-ui";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
-
|
|
4
|
-
showToast: (config: ToastConfig) => void;
|
|
3
|
+
interface MediaLibraryToastContextValue {
|
|
4
|
+
showToast: (config: ToastConfig) => void;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
children: ReactNode;
|
|
6
|
+
interface MediaLibraryToastProviderProps {
|
|
7
|
+
children: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
title: string;
|
|
9
|
+
interface ToastConfig {
|
|
10
|
+
title: string;
|
|
11
11
|
seconds?: number;
|
|
12
12
|
action?: {
|
|
13
13
|
title: string;
|
|
14
14
|
onClick: () => void;
|
|
15
|
-
};
|
|
15
|
+
};
|
|
16
16
|
icon?: IconName;
|
|
17
17
|
}
|
|
18
18
|
export declare function MediaLibraryToastProvider(props: MediaLibraryToastProviderProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from "react";
|
|
2
2
|
export declare function MediaList(): JSX.Element;
|
|
3
|
-
|
|
4
|
-
children: ReactNode;
|
|
3
|
+
interface MediaListScrollAreaProps {
|
|
4
|
+
children: ReactNode;
|
|
5
5
|
scrollAreaRef?: RefObject<HTMLDivElement>;
|
|
6
6
|
onScrollToBottom?: () => void;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
maxWidth?: number;
|
|
2
|
+
interface NewMediaLibraryFeaturesBannerProps {
|
|
3
|
+
maxWidth?: number;
|
|
4
4
|
}
|
|
5
5
|
export declare function NewMediaLibraryFeaturesBanner(props: NewMediaLibraryFeaturesBannerProps): JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
children: ReactNode;
|
|
2
|
+
interface SidepaneContainerProps {
|
|
3
|
+
children: ReactNode;
|
|
4
4
|
hasSelectedMedia: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare function SidepaneContainer(props: SidepaneContainerProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAsset } from "../../../../hooks/mediaLibraryData";
|
|
3
|
-
|
|
4
|
-
selectedMedia: MediaAsset;
|
|
3
|
+
interface SingleMediaMetadataTagsProps {
|
|
4
|
+
selectedMedia: MediaAsset;
|
|
5
5
|
}
|
|
6
6
|
export declare function SingleMediaMetadataTags(props: SingleMediaMetadataTagsProps): JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -41,33 +41,33 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
id: string;
|
|
43
43
|
name: string;
|
|
44
|
-
last_modified: number;
|
|
45
44
|
created_at: number;
|
|
45
|
+
last_modified: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
last_modified: number;
|
|
52
51
|
created_at: number;
|
|
52
|
+
last_modified: number;
|
|
53
53
|
uploader_id?: string | undefined;
|
|
54
54
|
count?: number | undefined;
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
-
kind: string;
|
|
59
|
-
url: string;
|
|
60
|
-
size: number;
|
|
61
58
|
tags: {
|
|
62
59
|
id: string;
|
|
63
60
|
name: string;
|
|
64
|
-
last_modified: number;
|
|
65
61
|
created_at: number;
|
|
62
|
+
last_modified: number;
|
|
66
63
|
count: number;
|
|
67
64
|
uploader_id?: string | undefined;
|
|
68
65
|
}[];
|
|
69
|
-
|
|
66
|
+
url: string;
|
|
67
|
+
size: number;
|
|
70
68
|
last_modified: number;
|
|
69
|
+
kind: string;
|
|
70
|
+
filename: string;
|
|
71
71
|
extension?: string | undefined;
|
|
72
72
|
width?: number | undefined;
|
|
73
73
|
height?: number | undefined;
|
|
@@ -83,19 +83,19 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
id: string;
|
|
86
|
-
kind: string;
|
|
87
|
-
url: string;
|
|
88
|
-
size: number;
|
|
89
86
|
tags: {
|
|
90
87
|
id: string;
|
|
91
88
|
name: string;
|
|
92
|
-
last_modified: number;
|
|
93
89
|
created_at: number;
|
|
90
|
+
last_modified: number;
|
|
94
91
|
uploader_id?: string | undefined;
|
|
95
92
|
count?: number | undefined;
|
|
96
93
|
}[];
|
|
97
|
-
|
|
94
|
+
url: string;
|
|
95
|
+
size: number;
|
|
98
96
|
last_modified: number;
|
|
97
|
+
kind: string;
|
|
98
|
+
filename: string;
|
|
99
99
|
extension?: string | undefined;
|
|
100
100
|
width?: number | undefined;
|
|
101
101
|
height?: number | undefined;
|
|
@@ -156,33 +156,33 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
id: string;
|
|
158
158
|
name: string;
|
|
159
|
-
last_modified: number;
|
|
160
159
|
created_at: number;
|
|
160
|
+
last_modified: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
164
|
id: string;
|
|
165
165
|
name: string;
|
|
166
|
-
last_modified: number;
|
|
167
166
|
created_at: number;
|
|
167
|
+
last_modified: number;
|
|
168
168
|
uploader_id?: string | undefined;
|
|
169
169
|
count?: number | undefined;
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
172
|
id: string;
|
|
173
|
-
kind: string;
|
|
174
|
-
url: string;
|
|
175
|
-
size: number;
|
|
176
173
|
tags: {
|
|
177
174
|
id: string;
|
|
178
175
|
name: string;
|
|
179
|
-
last_modified: number;
|
|
180
176
|
created_at: number;
|
|
177
|
+
last_modified: number;
|
|
181
178
|
count: number;
|
|
182
179
|
uploader_id?: string | undefined;
|
|
183
180
|
}[];
|
|
184
|
-
|
|
181
|
+
url: string;
|
|
182
|
+
size: number;
|
|
185
183
|
last_modified: number;
|
|
184
|
+
kind: string;
|
|
185
|
+
filename: string;
|
|
186
186
|
extension?: string | undefined;
|
|
187
187
|
width?: number | undefined;
|
|
188
188
|
height?: number | undefined;
|
|
@@ -198,19 +198,19 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
200
|
id: string;
|
|
201
|
-
kind: string;
|
|
202
|
-
url: string;
|
|
203
|
-
size: number;
|
|
204
201
|
tags: {
|
|
205
202
|
id: string;
|
|
206
203
|
name: string;
|
|
207
|
-
last_modified: number;
|
|
208
204
|
created_at: number;
|
|
205
|
+
last_modified: number;
|
|
209
206
|
uploader_id?: string | undefined;
|
|
210
207
|
count?: number | undefined;
|
|
211
208
|
}[];
|
|
212
|
-
|
|
209
|
+
url: string;
|
|
210
|
+
size: number;
|
|
213
211
|
last_modified: number;
|
|
212
|
+
kind: string;
|
|
213
|
+
filename: string;
|
|
214
214
|
extension?: string | undefined;
|
|
215
215
|
width?: number | undefined;
|
|
216
216
|
height?: number | undefined;
|
|
@@ -226,21 +226,22 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
226
226
|
} | undefined;
|
|
227
227
|
}>, "many">;
|
|
228
228
|
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
total: number;
|
|
229
230
|
items: {
|
|
230
231
|
id: string;
|
|
231
|
-
kind: string;
|
|
232
|
-
url: string;
|
|
233
|
-
size: number;
|
|
234
232
|
tags: {
|
|
235
233
|
id: string;
|
|
236
234
|
name: string;
|
|
237
|
-
last_modified: number;
|
|
238
235
|
created_at: number;
|
|
236
|
+
last_modified: number;
|
|
239
237
|
count: number;
|
|
240
238
|
uploader_id?: string | undefined;
|
|
241
239
|
}[];
|
|
242
|
-
|
|
240
|
+
url: string;
|
|
241
|
+
size: number;
|
|
243
242
|
last_modified: number;
|
|
243
|
+
kind: string;
|
|
244
|
+
filename: string;
|
|
244
245
|
extension?: string | undefined;
|
|
245
246
|
width?: number | undefined;
|
|
246
247
|
height?: number | undefined;
|
|
@@ -255,24 +256,24 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
255
256
|
credits?: string | undefined;
|
|
256
257
|
} | undefined;
|
|
257
258
|
}[];
|
|
258
|
-
total: number;
|
|
259
259
|
cursor?: string | undefined;
|
|
260
260
|
}, {
|
|
261
|
+
total: number;
|
|
261
262
|
items: {
|
|
262
263
|
id: string;
|
|
263
|
-
kind: string;
|
|
264
|
-
url: string;
|
|
265
|
-
size: number;
|
|
266
264
|
tags: {
|
|
267
265
|
id: string;
|
|
268
266
|
name: string;
|
|
269
|
-
last_modified: number;
|
|
270
267
|
created_at: number;
|
|
268
|
+
last_modified: number;
|
|
271
269
|
uploader_id?: string | undefined;
|
|
272
270
|
count?: number | undefined;
|
|
273
271
|
}[];
|
|
274
|
-
|
|
272
|
+
url: string;
|
|
273
|
+
size: number;
|
|
275
274
|
last_modified: number;
|
|
275
|
+
kind: string;
|
|
276
|
+
filename: string;
|
|
276
277
|
extension?: string | undefined;
|
|
277
278
|
width?: number | undefined;
|
|
278
279
|
height?: number | undefined;
|
|
@@ -287,7 +288,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
287
288
|
credits?: string[] | undefined;
|
|
288
289
|
} | undefined;
|
|
289
290
|
}[];
|
|
290
|
-
total: number;
|
|
291
291
|
cursor?: string | undefined;
|
|
292
292
|
}>;
|
|
293
293
|
export type MediaAsset = z.TypeOf<typeof mediaAssetType>;
|
|
@@ -306,21 +306,22 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
306
306
|
uploaderId: string | undefined;
|
|
307
307
|
tags: string;
|
|
308
308
|
page: number;
|
|
309
|
+
total: number;
|
|
309
310
|
items: {
|
|
310
311
|
id: string;
|
|
311
|
-
kind: string;
|
|
312
|
-
url: string;
|
|
313
|
-
size: number;
|
|
314
312
|
tags: {
|
|
315
313
|
id: string;
|
|
316
314
|
name: string;
|
|
317
|
-
last_modified: number;
|
|
318
315
|
created_at: number;
|
|
316
|
+
last_modified: number;
|
|
319
317
|
count: number;
|
|
320
318
|
uploader_id?: string | undefined;
|
|
321
319
|
}[];
|
|
322
|
-
|
|
320
|
+
url: string;
|
|
321
|
+
size: number;
|
|
323
322
|
last_modified: number;
|
|
323
|
+
kind: string;
|
|
324
|
+
filename: string;
|
|
324
325
|
extension?: string | undefined;
|
|
325
326
|
width?: number | undefined;
|
|
326
327
|
height?: number | undefined;
|
|
@@ -335,7 +336,6 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
335
336
|
credits?: string | undefined;
|
|
336
337
|
} | undefined;
|
|
337
338
|
}[];
|
|
338
|
-
total: number;
|
|
339
339
|
cursor?: string | undefined;
|
|
340
340
|
}>;
|
|
341
341
|
interface UseMediaLibrarySearchArgs {
|
|
@@ -358,19 +358,19 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
360
|
id: string;
|
|
361
|
-
kind: string;
|
|
362
|
-
url: string;
|
|
363
|
-
size: number;
|
|
364
361
|
tags: {
|
|
365
362
|
id: string;
|
|
366
363
|
name: string;
|
|
367
|
-
last_modified: number;
|
|
368
364
|
created_at: number;
|
|
365
|
+
last_modified: number;
|
|
369
366
|
count: number;
|
|
370
367
|
uploader_id?: string | undefined;
|
|
371
368
|
}[];
|
|
372
|
-
|
|
369
|
+
url: string;
|
|
370
|
+
size: number;
|
|
373
371
|
last_modified: number;
|
|
372
|
+
kind: string;
|
|
373
|
+
filename: string;
|
|
374
374
|
extension?: string | undefined;
|
|
375
375
|
width?: number | undefined;
|
|
376
376
|
height?: number | undefined;
|
|
@@ -408,19 +408,19 @@ 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
|
-
kind: string;
|
|
412
|
-
url: string;
|
|
413
|
-
size: number;
|
|
414
411
|
tags: {
|
|
415
412
|
id: string;
|
|
416
413
|
name: string;
|
|
417
|
-
last_modified: number;
|
|
418
414
|
created_at: number;
|
|
415
|
+
last_modified: number;
|
|
419
416
|
count: number;
|
|
420
417
|
uploader_id?: string | undefined;
|
|
421
418
|
}[];
|
|
422
|
-
|
|
419
|
+
url: string;
|
|
420
|
+
size: number;
|
|
423
421
|
last_modified: number;
|
|
422
|
+
kind: string;
|
|
423
|
+
filename: string;
|
|
424
424
|
extension?: string | undefined;
|
|
425
425
|
width?: number | undefined;
|
|
426
426
|
height?: number | undefined;
|
|
@@ -3,8 +3,8 @@ export declare function useTagSearch(): {
|
|
|
3
3
|
tags: {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
-
last_modified: number;
|
|
7
6
|
created_at: number;
|
|
7
|
+
last_modified: number;
|
|
8
8
|
count: number;
|
|
9
9
|
uploader_id?: string | undefined;
|
|
10
10
|
}[];
|
|
@@ -22,15 +22,15 @@ export declare const tagSchema: z.ZodObject<{
|
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
last_modified: number;
|
|
26
25
|
created_at: number;
|
|
26
|
+
last_modified: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
|
-
last_modified: number;
|
|
33
32
|
created_at: number;
|
|
33
|
+
last_modified: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
35
35
|
count?: number | undefined;
|
|
36
36
|
}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
2
|
-
|
|
3
|
-
assetType: MediaAssetType;
|
|
2
|
+
interface AnalyticsMediaSearchArgs {
|
|
3
|
+
assetType: MediaAssetType;
|
|
4
4
|
keyword: string;
|
|
5
5
|
tagIds: string[];
|
|
6
6
|
mode: "select" | "browse";
|
|
7
7
|
}
|
|
8
8
|
export declare function useMediaLibraryAnalyticsMediaSearch(args: AnalyticsMediaSearchArgs): void;
|
|
9
|
-
|
|
10
|
-
assetType: MediaAssetType;
|
|
9
|
+
interface AnalyticsMediaAddedToPageArgs {
|
|
10
|
+
assetType: MediaAssetType;
|
|
11
11
|
mediaDialogOpen: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare function useMediaLibraryAnalyticsMediaAddedToPage(args: AnalyticsMediaAddedToPageArgs): (mediaId: string) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
2
2
|
import type { EditorConfig } from "../../../EditorConfig";
|
|
3
3
|
import { type SearchMediaArgs } from "./mediaLibraryData";
|
|
4
|
-
|
|
5
|
-
revalidate: () => void;
|
|
4
|
+
interface UseMediaLibraryCacheInvalidationArgs {
|
|
5
|
+
revalidate: () => void;
|
|
6
6
|
config: EditorConfig;
|
|
7
7
|
keyword: string;
|
|
8
8
|
assetType: MediaAssetType;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { type MediaAsset } from "../hooks/mediaLibraryData";
|
|
2
2
|
export type UploadFile = NewUploadFile | UploadedFile;
|
|
3
|
-
|
|
4
|
-
id: string;
|
|
3
|
+
interface NewUploadFile {
|
|
4
|
+
id: string;
|
|
5
5
|
file: File;
|
|
6
6
|
status: "idle" | "uploading" | "error";
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
id: string;
|
|
8
|
+
interface UploadedFile {
|
|
9
|
+
id: string;
|
|
10
10
|
file: File;
|
|
11
11
|
status: "success";
|
|
12
12
|
response: MediaAsset;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
14
|
+
interface UseMediaLibraryUploadArgs {
|
|
15
|
+
/**
|
|
16
16
|
* The upload is about to begin.
|
|
17
17
|
*/
|
|
18
18
|
onBeforeUpload: (files: UploadFile[]) => void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
2
|
id: string;
|
|
3
|
-
kind: string;
|
|
4
|
-
url: string;
|
|
5
|
-
size: number;
|
|
6
3
|
tags: {
|
|
7
4
|
id: string;
|
|
8
5
|
name: string;
|
|
9
|
-
last_modified: number;
|
|
10
6
|
created_at: number;
|
|
7
|
+
last_modified: number;
|
|
11
8
|
count: number;
|
|
12
9
|
uploader_id?: string | undefined;
|
|
13
10
|
}[];
|
|
14
|
-
|
|
11
|
+
url: string;
|
|
12
|
+
size: number;
|
|
15
13
|
last_modified: number;
|
|
14
|
+
kind: string;
|
|
15
|
+
filename: string;
|
|
16
16
|
extension?: string | undefined;
|
|
17
17
|
width?: number | undefined;
|
|
18
18
|
height?: number | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
2
|
export type ID = string;
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
3
|
+
export interface ToggleSelectionArgs {
|
|
4
|
+
/**
|
|
5
5
|
* The ID of the item to toggle selection for.
|
|
6
6
|
*/
|
|
7
7
|
id: ID;
|
|
@@ -66,14 +66,14 @@ export type SelectionManager = {
|
|
|
66
66
|
isSelectAllEnabled: boolean;
|
|
67
67
|
state: SelectionManagerState;
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
selectedIds: ID[];
|
|
69
|
+
interface SelectionState {
|
|
70
|
+
selectedIds: ID[];
|
|
71
71
|
excludedIds: ID[];
|
|
72
72
|
isAllSelected: boolean;
|
|
73
73
|
selectedCount: number;
|
|
74
74
|
}
|
|
75
|
-
export
|
|
76
|
-
/**
|
|
75
|
+
export interface SelectionManagerState {
|
|
76
|
+
/**
|
|
77
77
|
* Set of selected IDs.
|
|
78
78
|
*/
|
|
79
79
|
selectedIds: Set<ID>;
|
|
@@ -86,8 +86,8 @@ export type SelectionManagerState = {
|
|
|
86
86
|
*/
|
|
87
87
|
isAllSelected: boolean;
|
|
88
88
|
}
|
|
89
|
-
export
|
|
90
|
-
initialState?: Partial<SelectionManagerState>;
|
|
89
|
+
export interface SelectionManagerProviderProps extends PropsWithChildren {
|
|
90
|
+
initialState?: Partial<SelectionManagerState>;
|
|
91
91
|
initialTotalItemCount?: number;
|
|
92
92
|
isSelectAllEnabled?: boolean;
|
|
93
93
|
}
|
package/dist/core/UID.d.ts
CHANGED
|
@@ -6,19 +6,19 @@ import type { DocumentMeta } from "./service";
|
|
|
6
6
|
* Allows the UID Field to directly communicate its important events
|
|
7
7
|
* with an optional, external party without polluting all the parents in between.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
editedUID: MutableRefObject<boolean>;
|
|
9
|
+
interface UIDContextValue {
|
|
10
|
+
editedUID: MutableRefObject<boolean>;
|
|
11
11
|
onEditUID: () => void;
|
|
12
12
|
}
|
|
13
13
|
export declare const UIDContext: import("react").Context<UIDContextValue>;
|
|
14
14
|
export declare function hasUIDField(customType: CustomType): boolean;
|
|
15
|
-
|
|
16
|
-
content: DocumentT;
|
|
15
|
+
interface isMissingUIDArgs {
|
|
16
|
+
content: DocumentT;
|
|
17
17
|
customType: CustomType;
|
|
18
18
|
}
|
|
19
19
|
export declare function isMissingUID(args: isMissingUIDArgs): boolean;
|
|
20
|
-
export
|
|
21
|
-
customTypeId: string;
|
|
20
|
+
export interface GetConflictingUidDocumentsArgs {
|
|
21
|
+
customTypeId: string;
|
|
22
22
|
languageId: string;
|
|
23
23
|
documentId: string | undefined;
|
|
24
24
|
/** The list of documents to check for UID conflicts */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExternalImage } from "../MediaLibrary/hooks/mediaLibraryData";
|
|
3
|
-
|
|
4
|
-
onSelectedChange?: (media: ExternalImage[]) => void;
|
|
3
|
+
interface UnsplashLibraryProps {
|
|
4
|
+
onSelectedChange?: (media: ExternalImage[]) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare function UnsplashLibrary(props: UnsplashLibraryProps): JSX.Element;
|
|
7
7
|
export {};
|