@prismicio/editor-fields 0.4.51 → 0.4.52-jp-onboarding-guide-triggers.1
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 +9 -9
- 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 +9 -9
- 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 +1 -1
- package/dist/core/OnboardingGuide/OnboardingGuide.d.ts +4 -2
- package/dist/core/OnboardingGuide/components/OnboardingCard.d.ts +3 -2
- package/dist/core/OnboardingGuide/components/OnboardingProgressStepper.d.ts +3 -2
- package/dist/core/OnboardingGuide/components/OnboardingStepDialog.d.ts +3 -2
- package/dist/core/OnboardingGuide/content.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/document.d.ts +2 -2
- package/dist/core/imageUtils.d.ts +4 -4
- package/dist/core/service/document.d.ts +11 -11
- package/dist/core/service/onboarding.d.ts +3 -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 +4 -4
- 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 +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 +27 -27
- package/dist/index.es.js +1966 -1938
- 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
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -47,14 +47,14 @@ type IntegrationFields = {
|
|
|
47
47
|
integrationFieldsApiBaseUrl: URL;
|
|
48
48
|
repository: string;
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
type LayoutConfig = {
|
|
51
|
+
/**
|
|
52
52
|
* Teaches fields about their containing scrolling element.
|
|
53
53
|
*/
|
|
54
54
|
scrollOffsetTop?: number;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
type OnAnalyticsEvent = {
|
|
57
|
+
(event: "Media Library Search", args: {
|
|
58
58
|
assetType: MediaAssetType;
|
|
59
59
|
mode: "browse" | "select";
|
|
60
60
|
searchQuery: string;
|
|
@@ -62,7 +62,7 @@ interface OnAnalyticsEvent {
|
|
|
62
62
|
numberOfResults: string;
|
|
63
63
|
timeToGetResults: string;
|
|
64
64
|
tags: string;
|
|
65
|
-
|
|
65
|
+
}): void;
|
|
66
66
|
(event: "Media Added To Page", args: {
|
|
67
67
|
assetType: MediaAssetType;
|
|
68
68
|
searchQuery: string;
|
|
@@ -75,11 +75,11 @@ interface OnAnalyticsEvent {
|
|
|
75
75
|
}): void;
|
|
76
76
|
(event: "Unsplash Image Searched" | "Unsplash Image Added"): void;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
type Analytics = {
|
|
79
|
+
onAnalyticsEvent?: OnAnalyticsEvent;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
type ErrorTracking = {
|
|
82
|
+
/** Asks the editor to track this Error in its Error monitoring solution. */
|
|
83
83
|
onTrackError?: (error: Error) => void;
|
|
84
84
|
}
|
|
85
85
|
export type AuthStrategy = "cookie" | "token";
|
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
|
-
|
|
4
|
+
type 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 type SliceSelection = {
|
|
3
|
+
/**
|
|
4
4
|
* The keys of the slices that are currently selected.
|
|
5
5
|
*/
|
|
6
6
|
ids: string[];
|
|
@@ -12,8 +12,8 @@ export interface SliceSelection {
|
|
|
12
12
|
*/
|
|
13
13
|
update: (args: SliceSelectionUpdateArgs) => void;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
15
|
+
export type 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
|
-
|
|
5
|
+
type MediaLibraryContextValue = {
|
|
6
|
+
onScrollToBottom: () => void;
|
|
7
7
|
isFetchingMedia: boolean;
|
|
8
8
|
media: MediaAsset[];
|
|
9
9
|
mediaTotal: number;
|
|
@@ -42,8 +42,8 @@ interface MediaLibraryContextValue {
|
|
|
42
42
|
setOpenMediaSection: (section: MediaSection | undefined) => void;
|
|
43
43
|
}
|
|
44
44
|
type MediaSection = "tags";
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
type MediaLibraryProviderProps = 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
|
-
|
|
3
|
+
type MediaLibraryToastContextValue = {
|
|
4
|
+
showToast: (config: ToastConfig) => void;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type MediaLibraryToastProviderProps = {
|
|
7
|
+
children: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
type 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
|
-
|
|
3
|
+
type 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
|
-
|
|
2
|
+
type 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
|
-
|
|
2
|
+
type 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
|
-
|
|
3
|
+
type SingleMediaMetadataTagsProps = {
|
|
4
|
+
selectedMedia: MediaAsset;
|
|
5
5
|
}
|
|
6
6
|
export declare function SingleMediaMetadataTags(props: SingleMediaMetadataTagsProps): JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -65,8 +65,8 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
65
65
|
id: string;
|
|
66
66
|
url: string;
|
|
67
67
|
size: number;
|
|
68
|
-
last_modified: number;
|
|
69
68
|
kind: string;
|
|
69
|
+
last_modified: number;
|
|
70
70
|
filename: string;
|
|
71
71
|
extension?: string | undefined;
|
|
72
72
|
width?: number | undefined;
|
|
@@ -93,8 +93,8 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
93
93
|
id: string;
|
|
94
94
|
url: string;
|
|
95
95
|
size: number;
|
|
96
|
-
last_modified: number;
|
|
97
96
|
kind: string;
|
|
97
|
+
last_modified: number;
|
|
98
98
|
filename: string;
|
|
99
99
|
extension?: string | undefined;
|
|
100
100
|
width?: number | undefined;
|
|
@@ -180,8 +180,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
180
180
|
id: string;
|
|
181
181
|
url: string;
|
|
182
182
|
size: number;
|
|
183
|
-
last_modified: number;
|
|
184
183
|
kind: string;
|
|
184
|
+
last_modified: number;
|
|
185
185
|
filename: string;
|
|
186
186
|
extension?: string | undefined;
|
|
187
187
|
width?: number | undefined;
|
|
@@ -208,8 +208,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
208
208
|
id: string;
|
|
209
209
|
url: string;
|
|
210
210
|
size: number;
|
|
211
|
-
last_modified: number;
|
|
212
211
|
kind: string;
|
|
212
|
+
last_modified: number;
|
|
213
213
|
filename: string;
|
|
214
214
|
extension?: string | undefined;
|
|
215
215
|
width?: number | undefined;
|
|
@@ -239,8 +239,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
239
239
|
id: string;
|
|
240
240
|
url: string;
|
|
241
241
|
size: number;
|
|
242
|
-
last_modified: number;
|
|
243
242
|
kind: string;
|
|
243
|
+
last_modified: number;
|
|
244
244
|
filename: string;
|
|
245
245
|
extension?: string | undefined;
|
|
246
246
|
width?: number | undefined;
|
|
@@ -271,8 +271,8 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
271
271
|
id: string;
|
|
272
272
|
url: string;
|
|
273
273
|
size: number;
|
|
274
|
-
last_modified: number;
|
|
275
274
|
kind: string;
|
|
275
|
+
last_modified: number;
|
|
276
276
|
filename: string;
|
|
277
277
|
extension?: string | undefined;
|
|
278
278
|
width?: number | undefined;
|
|
@@ -319,8 +319,8 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
319
319
|
id: string;
|
|
320
320
|
url: string;
|
|
321
321
|
size: number;
|
|
322
|
-
last_modified: number;
|
|
323
322
|
kind: string;
|
|
323
|
+
last_modified: number;
|
|
324
324
|
filename: string;
|
|
325
325
|
extension?: string | undefined;
|
|
326
326
|
width?: number | undefined;
|
|
@@ -368,8 +368,8 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
368
368
|
id: string;
|
|
369
369
|
url: string;
|
|
370
370
|
size: number;
|
|
371
|
-
last_modified: number;
|
|
372
371
|
kind: string;
|
|
372
|
+
last_modified: number;
|
|
373
373
|
filename: string;
|
|
374
374
|
extension?: string | undefined;
|
|
375
375
|
width?: number | undefined;
|
|
@@ -418,8 +418,8 @@ export declare function getMedia(allPages: MediaPage[], keyword: string, assetTy
|
|
|
418
418
|
id: string;
|
|
419
419
|
url: string;
|
|
420
420
|
size: number;
|
|
421
|
-
last_modified: number;
|
|
422
421
|
kind: string;
|
|
422
|
+
last_modified: number;
|
|
423
423
|
filename: string;
|
|
424
424
|
extension?: string | undefined;
|
|
425
425
|
width?: number | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type 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
|
-
|
|
9
|
+
type 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
|
-
|
|
4
|
+
type 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
|
-
|
|
3
|
+
type NewUploadFile = {
|
|
4
|
+
id: string;
|
|
5
5
|
file: File;
|
|
6
6
|
status: "idle" | "uploading" | "error";
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type UploadedFile = {
|
|
9
|
+
id: string;
|
|
10
10
|
file: File;
|
|
11
11
|
status: "success";
|
|
12
12
|
response: MediaAsset;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type UseMediaLibraryUploadArgs = {
|
|
15
|
+
/**
|
|
16
16
|
* The upload is about to begin.
|
|
17
17
|
*/
|
|
18
18
|
onBeforeUpload: (files: UploadFile[]) => void;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { OnboardingState, OnboardingTracking } from "../service";
|
|
2
|
+
import type { OnboardingState, OnboardingStepId, OnboardingTracking } from "../service";
|
|
3
3
|
interface OnboardingGuideProps {
|
|
4
4
|
onboardingState: OnboardingState;
|
|
5
5
|
tracking: OnboardingTracking;
|
|
6
|
-
onToggleStep: (stepId:
|
|
6
|
+
onToggleStep: (stepId: OnboardingStepId) => Promise<string[]>;
|
|
7
7
|
onToggleGuide: () => Promise<void>;
|
|
8
8
|
fallback?: ReactNode;
|
|
9
|
+
/** This allows consumers of the onboarding to do something else for certain steps other than opening the modal. */
|
|
10
|
+
stepContentOverride?: Partial<Record<OnboardingStepId, ReactNode>>;
|
|
9
11
|
}
|
|
10
12
|
export declare function OnboardingGuide(props: OnboardingGuideProps): JSX.Element | null;
|
|
11
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import type { OnboardingStep, OnboardingTracking } from "../../service";
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { OnboardingStep, OnboardingStepId, OnboardingTracking } from "../../service";
|
|
3
3
|
interface OnboardingCardProps {
|
|
4
4
|
steps: OnboardingStep[];
|
|
5
5
|
completedSteps: string[];
|
|
@@ -7,6 +7,7 @@ interface OnboardingCardProps {
|
|
|
7
7
|
tracking: OnboardingTracking;
|
|
8
8
|
onToggleStep: (step: OnboardingStep) => Promise<void>;
|
|
9
9
|
onClose?: () => void;
|
|
10
|
+
stepContentOverride?: Partial<Record<OnboardingStepId, ReactNode>>;
|
|
10
11
|
}
|
|
11
12
|
export declare function OnboardingCard(props: OnboardingCardProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import type { OnboardingStep, OnboardingTracking } from "../../service";
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { OnboardingStep, OnboardingStepId, OnboardingTracking } from "../../service";
|
|
3
3
|
interface OnboardingProgressStepperProps {
|
|
4
4
|
steps: OnboardingStep[];
|
|
5
5
|
completedSteps: string[];
|
|
6
6
|
onToggleStep: (step: OnboardingStep) => Promise<void>;
|
|
7
7
|
tracking: OnboardingTracking;
|
|
8
|
+
stepContentOverride?: Partial<Record<OnboardingStepId, ReactNode>>;
|
|
8
9
|
}
|
|
9
10
|
export declare function OnboardingProgressStepper(props: OnboardingProgressStepperProps): JSX.Element | null;
|
|
10
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import type { OnboardingStep } from "../../service";
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { OnboardingStep, OnboardingStepId } from "../../service";
|
|
3
3
|
interface OnboardingStepDialogProps {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
step: OnboardingStep;
|
|
@@ -7,6 +7,7 @@ interface OnboardingStepDialogProps {
|
|
|
7
7
|
isStepComplete: boolean;
|
|
8
8
|
onActionClick: () => Promise<void>;
|
|
9
9
|
onClose: () => void;
|
|
10
|
+
stepContentOverride?: Partial<Record<OnboardingStepId, ReactNode>>;
|
|
10
11
|
}
|
|
11
12
|
export declare function OnboardingStepDialog(props: OnboardingStepDialogProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OnboardingFramework, OnboardingStep } from "../service/onboarding";
|
|
2
2
|
export declare function getOnboardingContent(framework?: OnboardingFramework, starter?: string | null): {
|
|
3
3
|
steps: OnboardingStep[];
|
|
4
|
-
defaultCompletedStepIds:
|
|
4
|
+
defaultCompletedStepIds: ("createPrismicProject" | "chooseLocale" | "createProject" | "setupSliceMachine" | "createPageType" | "codePage" | "createSlice" | "reviewAndPush" | "createContent" | "renderPage")[];
|
|
5
5
|
tutorialLink: string | undefined;
|
|
6
6
|
};
|
|
@@ -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 {};
|
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
|
}
|
|
@@ -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;
|