@prismicio/editor-fields 0.4.51 → 0.4.52-jp-onboarding-guide-triggers-highlight
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 +6 -0
- package/dist/FieldContext.d.ts +27 -0
- package/dist/GroupEditor.d.ts +2 -2
- package/dist/SliceSelection.d.ts +4 -4
- package/dist/constants/framework.d.ts +5 -0
- 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 +61 -61
- 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 +6 -6
- package/dist/core/OnboardingGuide/OnboardingGuide.d.ts +7 -4
- package/dist/core/OnboardingGuide/components/OnboardingCard.d.ts +2 -1
- package/dist/core/OnboardingGuide/components/OnboardingProgressStepper.d.ts +2 -1
- package/dist/core/OnboardingGuide/components/OnboardingStepDialog.d.ts +3 -2
- package/dist/core/OnboardingGuide/content.d.ts +9 -2
- package/dist/core/OnboardingGuide/index.d.ts +1 -1
- 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/customType.d.ts +6 -6
- package/dist/core/service/document.d.ts +11 -11
- package/dist/core/service/onboarding.d.ts +3 -1
- 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 +1 -1
- package/dist/fields/LinkField/Documents/DocumentsModal.d.ts +4 -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/LinkField/useLinkField.d.ts +1 -1
- 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 +33 -33
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +13962 -13857
- 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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export { OnboardingGuide } from "./OnboardingGuide";
|
|
1
|
+
export { OnboardingGuide, type OnboardingGuideProps } from "./OnboardingGuide";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PropsWithChildren } from "react";
|
|
2
2
|
export type ID = string;
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type 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
|
-
|
|
69
|
+
type SelectionState = {
|
|
70
|
+
selectedIds: ID[];
|
|
71
71
|
excludedIds: ID[];
|
|
72
72
|
isAllSelected: boolean;
|
|
73
73
|
selectedCount: number;
|
|
74
74
|
}
|
|
75
|
-
export
|
|
76
|
-
|
|
75
|
+
export type SelectionManagerState = {
|
|
76
|
+
/**
|
|
77
77
|
* Set of selected IDs.
|
|
78
78
|
*/
|
|
79
79
|
selectedIds: Set<ID>;
|
|
@@ -86,8 +86,8 @@ export interface SelectionManagerState {
|
|
|
86
86
|
*/
|
|
87
87
|
isAllSelected: boolean;
|
|
88
88
|
}
|
|
89
|
-
export
|
|
90
|
-
|
|
89
|
+
export type SelectionManagerProviderProps = 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
|
-
|
|
9
|
+
type 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
|
-
|
|
15
|
+
type isMissingUIDArgs = {
|
|
16
|
+
content: DocumentT;
|
|
17
17
|
customType: CustomType;
|
|
18
18
|
}
|
|
19
19
|
export declare function isMissingUID(args: isMissingUIDArgs): boolean;
|
|
20
|
-
export
|
|
21
|
-
|
|
20
|
+
export type 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
|
-
|
|
3
|
+
type UnsplashLibraryProps = {
|
|
4
|
+
onSelectedChange?: (media: ExternalImage[]) => void;
|
|
5
5
|
}
|
|
6
6
|
export declare function UnsplashLibrary(props: UnsplashLibraryProps): JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -17,9 +17,9 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
17
17
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
18
18
|
}, "strip", import("zod").ZodTypeAny, {
|
|
19
19
|
id: string;
|
|
20
|
-
description: string | null;
|
|
21
|
-
width: number;
|
|
22
20
|
height: number;
|
|
21
|
+
width: number;
|
|
22
|
+
description: string | null;
|
|
23
23
|
urls: {
|
|
24
24
|
small: string;
|
|
25
25
|
full: string;
|
|
@@ -27,9 +27,9 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
27
27
|
alt_description?: string | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
id: string;
|
|
30
|
-
description: string | null;
|
|
31
|
-
width: number;
|
|
32
30
|
height: number;
|
|
31
|
+
width: number;
|
|
32
|
+
description: string | null;
|
|
33
33
|
urls: {
|
|
34
34
|
small: string;
|
|
35
35
|
full: string;
|
|
@@ -55,9 +55,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
55
55
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
56
56
|
}, "strip", import("zod").ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
-
description: string | null;
|
|
59
|
-
width: number;
|
|
60
58
|
height: number;
|
|
59
|
+
width: number;
|
|
60
|
+
description: string | null;
|
|
61
61
|
urls: {
|
|
62
62
|
small: string;
|
|
63
63
|
full: string;
|
|
@@ -65,9 +65,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
65
65
|
alt_description?: string | undefined;
|
|
66
66
|
}, {
|
|
67
67
|
id: string;
|
|
68
|
-
description: string | null;
|
|
69
|
-
width: number;
|
|
70
68
|
height: number;
|
|
69
|
+
width: number;
|
|
70
|
+
description: string | null;
|
|
71
71
|
urls: {
|
|
72
72
|
small: string;
|
|
73
73
|
full: string;
|
|
@@ -77,9 +77,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
77
77
|
}, "strip", import("zod").ZodTypeAny, {
|
|
78
78
|
results: {
|
|
79
79
|
id: string;
|
|
80
|
-
description: string | null;
|
|
81
|
-
width: number;
|
|
82
80
|
height: number;
|
|
81
|
+
width: number;
|
|
82
|
+
description: string | null;
|
|
83
83
|
urls: {
|
|
84
84
|
small: string;
|
|
85
85
|
full: string;
|
|
@@ -89,9 +89,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
89
89
|
}, {
|
|
90
90
|
results: {
|
|
91
91
|
id: string;
|
|
92
|
-
description: string | null;
|
|
93
|
-
width: number;
|
|
94
92
|
height: number;
|
|
93
|
+
width: number;
|
|
94
|
+
description: string | null;
|
|
95
95
|
urls: {
|
|
96
96
|
small: string;
|
|
97
97
|
full: string;
|
|
@@ -100,9 +100,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
100
100
|
}[];
|
|
101
101
|
}>, {
|
|
102
102
|
id: string;
|
|
103
|
-
description: string | null;
|
|
104
|
-
width: number;
|
|
105
103
|
height: number;
|
|
104
|
+
width: number;
|
|
105
|
+
description: string | null;
|
|
106
106
|
urls: {
|
|
107
107
|
small: string;
|
|
108
108
|
full: string;
|
|
@@ -111,9 +111,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
111
111
|
}[], {
|
|
112
112
|
results: {
|
|
113
113
|
id: string;
|
|
114
|
-
description: string | null;
|
|
115
|
-
width: number;
|
|
116
114
|
height: number;
|
|
115
|
+
width: number;
|
|
116
|
+
description: string | null;
|
|
117
117
|
urls: {
|
|
118
118
|
small: string;
|
|
119
119
|
full: string;
|
|
@@ -125,9 +125,9 @@ 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
127
|
id: string;
|
|
128
|
-
description: string | null;
|
|
129
|
-
width: number;
|
|
130
128
|
height: number;
|
|
129
|
+
width: number;
|
|
130
|
+
description: string | null;
|
|
131
131
|
urls: {
|
|
132
132
|
small: string;
|
|
133
133
|
full: string;
|
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
|
-
|
|
29
|
+
type 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
|
-
|
|
8
|
+
export type 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 interface Thumbnail {
|
|
|
14
14
|
height?: number | null;
|
|
15
15
|
}
|
|
16
16
|
export declare const MAIN_THUMBNAIL_NAME = "__MAIN_THUMBNAIL__";
|
|
17
|
-
export
|
|
18
|
-
|
|
17
|
+
export type 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
|
-
label: string;
|
|
10
9
|
id: string;
|
|
11
|
-
|
|
10
|
+
label: string;
|
|
12
11
|
repeatable: boolean;
|
|
12
|
+
status: boolean;
|
|
13
13
|
}, {
|
|
14
|
-
label: string;
|
|
15
14
|
id: string;
|
|
16
|
-
|
|
15
|
+
label: string;
|
|
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
|
-
label: string;
|
|
22
21
|
id: string;
|
|
23
|
-
|
|
22
|
+
label: string;
|
|
24
23
|
repeatable: boolean;
|
|
24
|
+
status: boolean;
|
|
25
25
|
}[]>;
|
|
26
26
|
export {};
|
|
@@ -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: "image" | "em" | "embed" | "strong" | "
|
|
857
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
1204
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
1543
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
1884
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
2223
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
2560
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
2908
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
3247
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
3588
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
3927
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
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: "image" | "em" | "embed" | "strong" | "
|
|
4264
|
+
type: "image" | "em" | "embed" | "strong" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
|
|
4265
4265
|
content: {
|
|
4266
4266
|
text: string;
|
|
4267
4267
|
} & {
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { type AuthStrategy } from "../../EditorConfig";
|
|
4
4
|
export interface OnboardingStep {
|
|
5
|
-
id:
|
|
5
|
+
id: OnboardingStepId;
|
|
6
6
|
title: string;
|
|
7
7
|
description: string;
|
|
8
8
|
content?: JSX.Element;
|
|
9
9
|
videoUrl?: string;
|
|
10
10
|
defaultCompleted?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export declare const OnboardingStepId: z.ZodEnum<["createPrismicProject", "chooseLocale", "createProject", "setupSliceMachine", "createPageType", "codePage", "createSlice", "reviewAndPush", "createContent", "renderPage"]>;
|
|
13
|
+
export type OnboardingStepId = z.infer<typeof OnboardingStepId>;
|
|
12
14
|
export declare const onboardingStateSchema: z.ZodObject<{
|
|
13
15
|
completedSteps: z.ZodArray<z.ZodString, "many">;
|
|
14
16
|
isDismissed: z.ZodBoolean;
|
|
@@ -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
|
-
|
|
4
|
+
type 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 @@ interface CropperDialogProps {
|
|
|
10
10
|
onClose: (result: {
|
|
11
11
|
croppedImages: CroppedImages;
|
|
12
12
|
option: number;
|
|
13
|
-
|
|
13
|
+
}) => void;
|
|
14
14
|
renderTooltip: (trigger: ReactNode) => ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare function CropperDialog(props: CropperDialogProps): JSX.Element;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type ImageContent, type ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type ImageBlockData } from "../../../core/imageUtils";
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type Point = {
|
|
5
|
+
x: number;
|
|
6
6
|
y: number;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
8
|
+
export type Size = {
|
|
9
|
+
width: number;
|
|
10
10
|
height: number;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
12
|
+
export type CropArea = {
|
|
13
|
+
x: number;
|
|
14
14
|
y: number;
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
18
|
+
export type CroppedImage = {
|
|
19
|
+
zoom: number;
|
|
20
20
|
/** x coordinate of the crop rect on the original image */
|
|
21
21
|
x: number;
|
|
22
22
|
/** y coordinate of the crop rect on the original image */
|
|
@@ -42,8 +42,8 @@ interface UpdateImageMainThumbnailArgs<T> {
|
|
|
42
42
|
croppedImage: CroppedImage;
|
|
43
43
|
}
|
|
44
44
|
export declare function updateImageMainThumbnail<T extends ImageContent | ImageBlockData>(args: UpdateImageMainThumbnailArgs<T>): T;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
type BuildCropUrlArgs = {
|
|
46
|
+
origin: ImageContent["origin"];
|
|
47
47
|
/** Image crop parameters */
|
|
48
48
|
croppedImage: CroppedImage;
|
|
49
49
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
3
3
|
import { type MediaAssetOrExternalImage } from "../../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type MediaDialogProps = {
|
|
5
|
+
assetType: MediaAssetType;
|
|
6
6
|
open: boolean;
|
|
7
7
|
onOpenChange: (open: boolean) => void;
|
|
8
8
|
onMediaSelected: (media: MediaAssetOrExternalImage) => void;
|
|
@@ -2,8 +2,8 @@ import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
|
2
2
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { MediaAssetOrExternalImage } from "../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
4
4
|
import type { CroppedImages } from "./CropperDialog";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type useImageFieldProps = {
|
|
6
|
+
content: ImageContent | undefined;
|
|
7
7
|
field: Image;
|
|
8
8
|
onContentChange: (content: ImageContent | undefined) => void;
|
|
9
9
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IntegrationField as IntegrationFieldT } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type IntegrationItem } from "./integrationData";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type IntegrationSharedInputProps = {
|
|
5
|
+
id: string;
|
|
6
6
|
field: IntegrationFieldT;
|
|
7
7
|
readOnly: boolean;
|
|
8
8
|
onFocus: () => void;
|
|
9
9
|
onClearItem: () => void;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type IntegrationInputProps = IntegrationSharedInputProps & {
|
|
12
|
+
catalogId: string;
|
|
13
13
|
itemId?: string;
|
|
14
14
|
item?: IntegrationItem;
|
|
15
15
|
}
|
|
16
16
|
export declare function IntegrationInput(props: IntegrationInputProps): JSX.Element;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
type IntegrationFooterProps = {
|
|
18
|
+
catalogId: string;
|
|
19
19
|
itemId?: string;
|
|
20
20
|
item?: IntegrationItem;
|
|
21
21
|
}
|
|
@@ -11,13 +11,13 @@ export declare function useIntegrationCatalogSearch(args: IntegrationCatalogSear
|
|
|
11
11
|
description?: string | undefined;
|
|
12
12
|
}[];
|
|
13
13
|
response: {
|
|
14
|
+
page: number;
|
|
14
15
|
items: {
|
|
15
16
|
id: string;
|
|
16
17
|
title: string;
|
|
17
18
|
imageURL?: string | undefined;
|
|
18
19
|
description?: string | undefined;
|
|
19
20
|
}[];
|
|
20
|
-
page: number;
|
|
21
21
|
totalPages: number;
|
|
22
22
|
};
|
|
23
23
|
fetchNextPage: () => void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FilterOption } from "@prismicio/editor-ui";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DocumentsModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
5
|
onOpenChange: (open: boolean) => void;
|
|
6
6
|
onSelectDocument: (documentID: string) => void;
|
|
7
7
|
fixedCustomTypes?: Set<string>;
|
|
8
8
|
fixedTags?: Set<string>;
|
|
9
9
|
}
|
|
10
10
|
export declare function DocumentsModal(props: DocumentsModalProps): JSX.Element;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type SortTagsByFilteredTagsArgs = {
|
|
12
|
+
tagsFilter: Set<FilterOption>;
|
|
13
13
|
tags: string[];
|
|
14
14
|
}
|
|
15
15
|
export declare function sortTagsByFilteredTags(args: SortTagsByFilteredTagsArgs): string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type FilterOption } from "@prismicio/editor-ui";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type DocumentsListFiltersProps = {
|
|
4
|
+
filteredLocales: Set<FilterOption>;
|
|
5
5
|
setFilteredLocales: (newValue: Set<FilterOption>) => void;
|
|
6
6
|
filteredTags: Set<FilterOption>;
|
|
7
7
|
setFilteredTags: (newValue: Set<FilterOption>) => void;
|
|
@@ -11,8 +11,8 @@ interface DocumentsListFiltersProps {
|
|
|
11
11
|
fixedTags?: Set<string>;
|
|
12
12
|
}
|
|
13
13
|
export declare function DocumentsListFilters(props: DocumentsListFiltersProps): JSX.Element;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type FilterProps = {
|
|
15
|
+
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
16
16
|
fixedSelectedValues?: Set<FilterOption>;
|
|
17
17
|
selectedValues: Set<FilterOption>;
|
|
18
18
|
label: string;
|
|
@@ -21,8 +21,8 @@ interface FilterProps {
|
|
|
21
21
|
multiple?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare function Filter(props: FilterProps): JSX.Element;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
type LocalesFilterProps = {
|
|
25
|
+
selectedValues: Set<FilterOption>;
|
|
26
26
|
onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
|
|
27
27
|
}
|
|
28
28
|
export declare function LocalesFilter(props: LocalesFilterProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconName } from "@prismicio/editor-ui";
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type LinkDescriptionCardProps = {
|
|
4
|
+
url?: URL | string;
|
|
5
5
|
title?: string;
|
|
6
6
|
subTitle?: string;
|
|
7
7
|
description?: string;
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
import { FilledLinkContent, type LinkContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Link } from "@prismicio/types-internal/lib/customtypes";
|
|
4
4
|
import { type FieldSelectType } from "./LinkFieldActions";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type LinkFieldProps = {
|
|
6
|
+
id?: string;
|
|
7
7
|
field: Link;
|
|
8
8
|
content: LinkContent | undefined;
|
|
9
9
|
condensedButtons?: boolean;
|
|
10
10
|
onContentChange: (content: LinkContent | undefined) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare function LinkField(props: LinkFieldProps): JSX.Element;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
type GetFieldIconArgs = {
|
|
14
|
+
selectType?: FieldSelectType;
|
|
15
15
|
displayTextEnabled?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export declare function getFieldIcon(args: GetFieldIconArgs): "image" | "description" | "link" | "notes" | "public";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
type FilledLinkFieldProps = {
|
|
19
|
+
id?: string;
|
|
20
20
|
condensedButtons?: boolean;
|
|
21
21
|
field: Link & {
|
|
22
22
|
config?: {
|
|
23
23
|
allowText?: false;
|
|
24
|
-
|
|
24
|
+
};
|
|
25
25
|
};
|
|
26
26
|
content: FilledLinkContent | undefined;
|
|
27
27
|
onContentChange: (content: FilledLinkContent | undefined) => void;
|