@prismicio/editor-fields 0.4.52 → 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 +18 -18
- 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 +2 -2
- 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/document.d.ts +2 -2
- package/dist/core/imageUtils.d.ts +4 -4
- package/dist/core/service/customType.d.ts +3 -3
- package/dist/core/service/document.d.ts +12 -12
- package/dist/core/service/onboarding.d.ts +5 -5
- 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/Filters.d.ts +6 -6
- package/dist/fields/LinkField/Documents/documentsData.d.ts +2 -2
- 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/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 +12 -12
- package/dist/index.es.js +3436 -3418
- 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 {};
|
|
@@ -55,8 +55,6 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
-
url: string;
|
|
59
|
-
size: number;
|
|
60
58
|
tags: {
|
|
61
59
|
id: string;
|
|
62
60
|
name: string;
|
|
@@ -65,6 +63,8 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
65
63
|
count: number;
|
|
66
64
|
uploader_id?: string | undefined;
|
|
67
65
|
}[];
|
|
66
|
+
url: string;
|
|
67
|
+
size: number;
|
|
68
68
|
last_modified: number;
|
|
69
69
|
kind: string;
|
|
70
70
|
filename: string;
|
|
@@ -83,8 +83,6 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
id: string;
|
|
86
|
-
url: string;
|
|
87
|
-
size: number;
|
|
88
86
|
tags: {
|
|
89
87
|
id: string;
|
|
90
88
|
name: string;
|
|
@@ -93,6 +91,8 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
93
91
|
uploader_id?: string | undefined;
|
|
94
92
|
count?: number | undefined;
|
|
95
93
|
}[];
|
|
94
|
+
url: string;
|
|
95
|
+
size: number;
|
|
96
96
|
last_modified: number;
|
|
97
97
|
kind: string;
|
|
98
98
|
filename: string;
|
|
@@ -170,8 +170,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
172
|
id: string;
|
|
173
|
-
url: string;
|
|
174
|
-
size: number;
|
|
175
173
|
tags: {
|
|
176
174
|
id: string;
|
|
177
175
|
name: string;
|
|
@@ -180,6 +178,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
180
178
|
count: number;
|
|
181
179
|
uploader_id?: string | undefined;
|
|
182
180
|
}[];
|
|
181
|
+
url: string;
|
|
182
|
+
size: number;
|
|
183
183
|
last_modified: number;
|
|
184
184
|
kind: string;
|
|
185
185
|
filename: string;
|
|
@@ -198,8 +198,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
200
|
id: string;
|
|
201
|
-
url: string;
|
|
202
|
-
size: number;
|
|
203
201
|
tags: {
|
|
204
202
|
id: string;
|
|
205
203
|
name: string;
|
|
@@ -208,6 +206,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
208
206
|
uploader_id?: string | undefined;
|
|
209
207
|
count?: number | undefined;
|
|
210
208
|
}[];
|
|
209
|
+
url: string;
|
|
210
|
+
size: number;
|
|
211
211
|
last_modified: number;
|
|
212
212
|
kind: string;
|
|
213
213
|
filename: string;
|
|
@@ -229,8 +229,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
229
229
|
total: number;
|
|
230
230
|
items: {
|
|
231
231
|
id: string;
|
|
232
|
-
url: string;
|
|
233
|
-
size: number;
|
|
234
232
|
tags: {
|
|
235
233
|
id: string;
|
|
236
234
|
name: string;
|
|
@@ -239,6 +237,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
239
237
|
count: number;
|
|
240
238
|
uploader_id?: string | undefined;
|
|
241
239
|
}[];
|
|
240
|
+
url: string;
|
|
241
|
+
size: number;
|
|
242
242
|
last_modified: number;
|
|
243
243
|
kind: string;
|
|
244
244
|
filename: string;
|
|
@@ -261,8 +261,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
261
261
|
total: number;
|
|
262
262
|
items: {
|
|
263
263
|
id: string;
|
|
264
|
-
url: string;
|
|
265
|
-
size: number;
|
|
266
264
|
tags: {
|
|
267
265
|
id: string;
|
|
268
266
|
name: string;
|
|
@@ -271,6 +269,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
271
269
|
uploader_id?: string | undefined;
|
|
272
270
|
count?: number | undefined;
|
|
273
271
|
}[];
|
|
272
|
+
url: string;
|
|
273
|
+
size: number;
|
|
274
274
|
last_modified: number;
|
|
275
275
|
kind: string;
|
|
276
276
|
filename: string;
|
|
@@ -309,8 +309,6 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
309
309
|
total: number;
|
|
310
310
|
items: {
|
|
311
311
|
id: string;
|
|
312
|
-
url: string;
|
|
313
|
-
size: number;
|
|
314
312
|
tags: {
|
|
315
313
|
id: string;
|
|
316
314
|
name: string;
|
|
@@ -319,6 +317,8 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
319
317
|
count: number;
|
|
320
318
|
uploader_id?: string | undefined;
|
|
321
319
|
}[];
|
|
320
|
+
url: string;
|
|
321
|
+
size: number;
|
|
322
322
|
last_modified: number;
|
|
323
323
|
kind: string;
|
|
324
324
|
filename: string;
|
|
@@ -358,8 +358,6 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
360
|
id: string;
|
|
361
|
-
url: string;
|
|
362
|
-
size: number;
|
|
363
361
|
tags: {
|
|
364
362
|
id: string;
|
|
365
363
|
name: string;
|
|
@@ -368,6 +366,8 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
368
366
|
count: number;
|
|
369
367
|
uploader_id?: string | undefined;
|
|
370
368
|
}[];
|
|
369
|
+
url: string;
|
|
370
|
+
size: number;
|
|
371
371
|
last_modified: number;
|
|
372
372
|
kind: string;
|
|
373
373
|
filename: string;
|
|
@@ -408,8 +408,6 @@ 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
|
-
url: string;
|
|
412
|
-
size: number;
|
|
413
411
|
tags: {
|
|
414
412
|
id: string;
|
|
415
413
|
name: string;
|
|
@@ -418,6 +416,8 @@ export declare function getMedia(allPages: MediaPage[], keyword: string, assetTy
|
|
|
418
416
|
count: number;
|
|
419
417
|
uploader_id?: string | undefined;
|
|
420
418
|
}[];
|
|
419
|
+
url: string;
|
|
420
|
+
size: number;
|
|
421
421
|
last_modified: number;
|
|
422
422
|
kind: string;
|
|
423
423
|
filename: string;
|
|
@@ -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,7 +1,5 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
2
|
id: string;
|
|
3
|
-
url: string;
|
|
4
|
-
size: number;
|
|
5
3
|
tags: {
|
|
6
4
|
id: string;
|
|
7
5
|
name: string;
|
|
@@ -10,6 +8,8 @@ export declare function useSelectedMedia(): {
|
|
|
10
8
|
count: number;
|
|
11
9
|
uploader_id?: string | undefined;
|
|
12
10
|
}[];
|
|
11
|
+
url: string;
|
|
12
|
+
size: number;
|
|
13
13
|
last_modified: number;
|
|
14
14
|
kind: string;
|
|
15
15
|
filename: string;
|
|
@@ -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 {};
|
package/dist/core/document.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare const searchDocumentStatus: {
|
|
|
26
26
|
release: string[];
|
|
27
27
|
published: string[];
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
documentId: string;
|
|
29
|
+
interface getDocumentUrlArgs {
|
|
30
|
+
documentId: string;
|
|
31
31
|
status?: string;
|
|
32
32
|
releaseId?: string;
|
|
33
33
|
versionId?: string;
|
|
@@ -5,8 +5,8 @@ import type { MediaAsset, MediaAssetOrExternalImage } from "./MediaLibrary/hooks
|
|
|
5
5
|
* A thumbnail is an abstraction of the prismic models for the image fields
|
|
6
6
|
* We use it to flatten the main image and its thumbnails into a single array.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
/** Thumbnail name or MAIN_THUMBNAIL_NAME */
|
|
8
|
+
export interface Thumbnail {
|
|
9
|
+
/** Thumbnail name or MAIN_THUMBNAIL_NAME */
|
|
10
10
|
name: string;
|
|
11
11
|
/** Width constraint for the current thumbnail */
|
|
12
12
|
width?: number | null;
|
|
@@ -14,8 +14,8 @@ export type Thumbnail = {
|
|
|
14
14
|
height?: number | null;
|
|
15
15
|
}
|
|
16
16
|
export declare const MAIN_THUMBNAIL_NAME = "__MAIN_THUMBNAIL__";
|
|
17
|
-
export
|
|
18
|
-
thumbnail: Thumbnail;
|
|
17
|
+
export interface CropperImage {
|
|
18
|
+
thumbnail: Thumbnail;
|
|
19
19
|
contentView?: ImageContentView;
|
|
20
20
|
labels: ImageLabel;
|
|
21
21
|
}
|
|
@@ -8,19 +8,19 @@ declare const customTypeResponse: z.ZodObject<{
|
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
id: string;
|
|
10
10
|
label: string;
|
|
11
|
-
status: boolean;
|
|
12
11
|
repeatable: boolean;
|
|
12
|
+
status: boolean;
|
|
13
13
|
}, {
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
|
16
|
-
status: boolean;
|
|
17
16
|
repeatable: boolean;
|
|
17
|
+
status: boolean;
|
|
18
18
|
}>;
|
|
19
19
|
export type CustomTypeResponse = z.TypeOf<typeof customTypeResponse>;
|
|
20
20
|
export declare function getRepositoryCustomTypes(baseUrl: URL, repository: string, authStrategy: AuthStrategy): Promise<{
|
|
21
21
|
id: string;
|
|
22
22
|
label: string;
|
|
23
|
-
status: boolean;
|
|
24
23
|
repeatable: boolean;
|
|
24
|
+
status: boolean;
|
|
25
25
|
}[]>;
|
|
26
26
|
export {};
|