@prismicio/editor-fields 0.4.52 → 0.4.54
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/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/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 +6 -6
- package/dist/core/service/document.d.ts +17 -17
- 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/IntegrationField/integrationData.d.ts +5 -5
- 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/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 +14 -14
- package/dist/index.es.js +3448 -3430
- 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 {};
|
|
@@ -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,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
|
}
|
|
@@ -6,21 +6,21 @@ declare const customTypeResponse: z.ZodObject<{
|
|
|
6
6
|
repeatable: z.ZodBoolean;
|
|
7
7
|
status: z.ZodBoolean;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
9
|
status: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
id: string;
|
|
12
12
|
repeatable: boolean;
|
|
13
13
|
}, {
|
|
14
|
-
id: string;
|
|
15
|
-
label: string;
|
|
16
14
|
status: boolean;
|
|
15
|
+
label: string;
|
|
16
|
+
id: string;
|
|
17
17
|
repeatable: 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
|
-
id: string;
|
|
22
|
-
label: string;
|
|
23
21
|
status: boolean;
|
|
22
|
+
label: string;
|
|
23
|
+
id: string;
|
|
24
24
|
repeatable: boolean;
|
|
25
25
|
}[]>;
|
|
26
26
|
export {};
|
|
@@ -193,13 +193,13 @@ export declare const documentMetaOkType: z.ZodObject<{
|
|
|
193
193
|
uid?: string | undefined;
|
|
194
194
|
}>>, "many">;
|
|
195
195
|
}, "strip", z.ZodTypeAny, {
|
|
196
|
-
id: string;
|
|
197
196
|
title: string;
|
|
198
197
|
language: {
|
|
199
198
|
id: string;
|
|
200
199
|
name: string;
|
|
201
200
|
is_master?: boolean | undefined;
|
|
202
201
|
};
|
|
202
|
+
id: string;
|
|
203
203
|
custom_type_id: string;
|
|
204
204
|
group_lang_id: string;
|
|
205
205
|
versions: (({
|
|
@@ -227,12 +227,12 @@ export declare const documentMetaOkType: z.ZodObject<{
|
|
|
227
227
|
uid?: string | undefined;
|
|
228
228
|
})[];
|
|
229
229
|
}, {
|
|
230
|
-
id: string;
|
|
231
230
|
language: {
|
|
232
231
|
id: string;
|
|
233
232
|
name: string;
|
|
234
233
|
is_master?: boolean | undefined;
|
|
235
234
|
};
|
|
235
|
+
id: string;
|
|
236
236
|
custom_type_id: string;
|
|
237
237
|
group_lang_id: string;
|
|
238
238
|
versions: (({
|
|
@@ -363,13 +363,13 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
363
363
|
uid?: string | undefined;
|
|
364
364
|
}>>, "many">;
|
|
365
365
|
}, "strip", z.ZodTypeAny, {
|
|
366
|
-
id: string;
|
|
367
366
|
title: string;
|
|
368
367
|
language: {
|
|
369
368
|
id: string;
|
|
370
369
|
name: string;
|
|
371
370
|
is_master?: boolean | undefined;
|
|
372
371
|
};
|
|
372
|
+
id: string;
|
|
373
373
|
custom_type_id: string;
|
|
374
374
|
group_lang_id: string;
|
|
375
375
|
versions: (({
|
|
@@ -397,12 +397,12 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
397
397
|
uid?: string | undefined;
|
|
398
398
|
})[];
|
|
399
399
|
}, {
|
|
400
|
-
id: string;
|
|
401
400
|
language: {
|
|
402
401
|
id: string;
|
|
403
402
|
name: string;
|
|
404
403
|
is_master?: boolean | undefined;
|
|
405
404
|
};
|
|
405
|
+
id: string;
|
|
406
406
|
custom_type_id: string;
|
|
407
407
|
group_lang_id: string;
|
|
408
408
|
versions: (({
|
|
@@ -434,13 +434,13 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
434
434
|
}, "strip", z.ZodTypeAny, {
|
|
435
435
|
total: number;
|
|
436
436
|
results: {
|
|
437
|
-
id: string;
|
|
438
437
|
title: string;
|
|
439
438
|
language: {
|
|
440
439
|
id: string;
|
|
441
440
|
name: string;
|
|
442
441
|
is_master?: boolean | undefined;
|
|
443
442
|
};
|
|
443
|
+
id: string;
|
|
444
444
|
custom_type_id: string;
|
|
445
445
|
group_lang_id: string;
|
|
446
446
|
versions: (({
|
|
@@ -472,12 +472,12 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
472
472
|
}, {
|
|
473
473
|
total: number;
|
|
474
474
|
results: {
|
|
475
|
-
id: string;
|
|
476
475
|
language: {
|
|
477
476
|
id: string;
|
|
478
477
|
name: string;
|
|
479
478
|
is_master?: boolean | undefined;
|
|
480
479
|
};
|
|
480
|
+
id: string;
|
|
481
481
|
custom_type_id: string;
|
|
482
482
|
group_lang_id: string;
|
|
483
483
|
versions: (({
|
|
@@ -854,7 +854,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
854
854
|
label?: string | null | undefined;
|
|
855
855
|
direction?: string | null | undefined;
|
|
856
856
|
}) | ({
|
|
857
|
-
type: "
|
|
857
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
858
858
|
content: {
|
|
859
859
|
text: string;
|
|
860
860
|
} & {
|
|
@@ -1201,7 +1201,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
1201
1201
|
label?: string | null | undefined;
|
|
1202
1202
|
direction?: string | null | undefined;
|
|
1203
1203
|
}) | ({
|
|
1204
|
-
type: "
|
|
1204
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
1205
1205
|
content: {
|
|
1206
1206
|
text: string;
|
|
1207
1207
|
} & {
|
|
@@ -1540,7 +1540,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
1540
1540
|
label?: string | null | undefined;
|
|
1541
1541
|
direction?: string | null | undefined;
|
|
1542
1542
|
}) | ({
|
|
1543
|
-
type: "
|
|
1543
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
1544
1544
|
content: {
|
|
1545
1545
|
text: string;
|
|
1546
1546
|
} & {
|
|
@@ -1881,7 +1881,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
1881
1881
|
label?: string | null | undefined;
|
|
1882
1882
|
direction?: string | null | undefined;
|
|
1883
1883
|
}) | ({
|
|
1884
|
-
type: "
|
|
1884
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
1885
1885
|
content: {
|
|
1886
1886
|
text: string;
|
|
1887
1887
|
} & {
|
|
@@ -2220,7 +2220,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
2220
2220
|
label?: string | null | undefined;
|
|
2221
2221
|
direction?: string | null | undefined;
|
|
2222
2222
|
}) | ({
|
|
2223
|
-
type: "
|
|
2223
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
2224
2224
|
content: {
|
|
2225
2225
|
text: string;
|
|
2226
2226
|
} & {
|
|
@@ -2557,7 +2557,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
2557
2557
|
label?: string | null | undefined;
|
|
2558
2558
|
direction?: string | null | undefined;
|
|
2559
2559
|
}) | ({
|
|
2560
|
-
type: "
|
|
2560
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
2561
2561
|
content: {
|
|
2562
2562
|
text: string;
|
|
2563
2563
|
} & {
|
|
@@ -2905,7 +2905,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
2905
2905
|
label?: string | null | undefined;
|
|
2906
2906
|
direction?: string | null | undefined;
|
|
2907
2907
|
}) | ({
|
|
2908
|
-
type: "
|
|
2908
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
2909
2909
|
content: {
|
|
2910
2910
|
text: string;
|
|
2911
2911
|
} & {
|
|
@@ -3244,7 +3244,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
3244
3244
|
label?: string | null | undefined;
|
|
3245
3245
|
direction?: string | null | undefined;
|
|
3246
3246
|
}) | ({
|
|
3247
|
-
type: "
|
|
3247
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
3248
3248
|
content: {
|
|
3249
3249
|
text: string;
|
|
3250
3250
|
} & {
|
|
@@ -3585,7 +3585,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
3585
3585
|
label?: string | null | undefined;
|
|
3586
3586
|
direction?: string | null | undefined;
|
|
3587
3587
|
}) | ({
|
|
3588
|
-
type: "
|
|
3588
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
3589
3589
|
content: {
|
|
3590
3590
|
text: string;
|
|
3591
3591
|
} & {
|
|
@@ -3924,7 +3924,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
3924
3924
|
label?: string | null | undefined;
|
|
3925
3925
|
direction?: string | null | undefined;
|
|
3926
3926
|
}) | ({
|
|
3927
|
-
type: "
|
|
3927
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
3928
3928
|
content: {
|
|
3929
3929
|
text: string;
|
|
3930
3930
|
} & {
|
|
@@ -4261,7 +4261,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
4261
4261
|
label?: string | null | undefined;
|
|
4262
4262
|
direction?: string | null | undefined;
|
|
4263
4263
|
}) | ({
|
|
4264
|
-
type: "
|
|
4264
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "paragraph" | "rtl" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "o-list-item";
|
|
4265
4265
|
content: {
|
|
4266
4266
|
text: string;
|
|
4267
4267
|
} & {
|
|
@@ -16,27 +16,27 @@ export declare const onboardingStateSchema: z.ZodObject<{
|
|
|
16
16
|
isDismissed: z.ZodBoolean;
|
|
17
17
|
context: z.ZodObject<{
|
|
18
18
|
framework: z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>;
|
|
19
|
-
starterId: z.ZodNullable<z.ZodString
|
|
19
|
+
starterId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
21
|
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
22
|
-
starterId
|
|
22
|
+
starterId?: string | null | undefined;
|
|
23
23
|
}, {
|
|
24
|
-
starterId: string | null;
|
|
25
24
|
framework?: unknown;
|
|
25
|
+
starterId?: string | null | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
28
|
completedSteps: string[];
|
|
29
29
|
isDismissed: boolean;
|
|
30
30
|
context: {
|
|
31
31
|
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
32
|
-
starterId
|
|
32
|
+
starterId?: string | null | undefined;
|
|
33
33
|
};
|
|
34
34
|
}, {
|
|
35
35
|
completedSteps: string[];
|
|
36
36
|
isDismissed: boolean;
|
|
37
37
|
context: {
|
|
38
|
-
starterId: string | null;
|
|
39
38
|
framework?: unknown;
|
|
39
|
+
starterId?: string | null | undefined;
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
42
42
|
export type OnboardingState = z.infer<typeof onboardingStateSchema>;
|
|
@@ -93,6 +93,7 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
93
93
|
}>;
|
|
94
94
|
uploadedAvatar: z.ZodOptional<z.ZodString>;
|
|
95
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
96
97
|
authors: {
|
|
97
98
|
id: string;
|
|
98
99
|
email: string;
|
|
@@ -108,7 +109,6 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
|
108
109
|
quotas: {
|
|
109
110
|
slicemachineEnabled: boolean;
|
|
110
111
|
};
|
|
111
|
-
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
112
112
|
storageVersion: {
|
|
113
113
|
major: number;
|
|
114
114
|
minor: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
3
|
import { type CroppedImage } from "./croppedImage";
|
|
4
|
-
|
|
5
|
-
trigger: React.ReactNode;
|
|
4
|
+
interface CropperDialogProps {
|
|
5
|
+
trigger: React.ReactNode;
|
|
6
6
|
/** Flattened list of all thumbnails in the field */
|
|
7
7
|
initialImages: CropperImage[];
|
|
8
8
|
/** Index of the initial image displayed in the cropper */
|
|
@@ -10,7 +10,7 @@ trigger: React.ReactNode;
|
|
|
10
10
|
onClose: (result: {
|
|
11
11
|
croppedImages: CroppedImages;
|
|
12
12
|
option: number;
|
|
13
|
-
}) => void;
|
|
13
|
+
}) => void;
|
|
14
14
|
renderTooltip: (trigger: ReactNode) => ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare function CropperDialog(props: CropperDialogProps): JSX.Element;
|