@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
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -73,6 +73,12 @@ interface OnAnalyticsEvent {
|
|
|
73
73
|
timeToAddMediaToPage: string;
|
|
74
74
|
tags: string;
|
|
75
75
|
}): void;
|
|
76
|
+
(event: "Generic Link Added", args: {
|
|
77
|
+
type: "web" | "media" | "document";
|
|
78
|
+
isInSlice: string;
|
|
79
|
+
isInGroup: string;
|
|
80
|
+
customTypeFormat: "page" | "custom";
|
|
81
|
+
}): void;
|
|
76
82
|
(event: "Unsplash Image Searched" | "Unsplash Image Added"): void;
|
|
77
83
|
}
|
|
78
84
|
interface Analytics {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
2
|
+
import { type PropsWithChildren, type ReactNode } from "react";
|
|
3
|
+
type CustomTypeFormat = CustomType["format"];
|
|
4
|
+
interface FieldContextValue {
|
|
5
|
+
customTypeFormat: CustomTypeFormat;
|
|
6
|
+
isInSlice: boolean;
|
|
7
|
+
isInGroup: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface RootFieldContextProviderProps {
|
|
10
|
+
customTypeFormat: CustomTypeFormat;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Provides extra context to the fields below.
|
|
15
|
+
* Use it only once at the root of the fields tree.
|
|
16
|
+
*/
|
|
17
|
+
export declare function RootFieldContextProvider(props: RootFieldContextProviderProps): JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* Overrides the field context to indicate that the field is in a slice.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FieldInSliceContextProvider(props: PropsWithChildren): JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Overrides the field context to indicate that the field is in a group.
|
|
24
|
+
*/
|
|
25
|
+
export declare function FieldInGroupContextProvider(props: PropsWithChildren): JSX.Element;
|
|
26
|
+
export declare function useFieldContext(): FieldContextValue | undefined;
|
|
27
|
+
export {};
|
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;
|
|
@@ -4,3 +4,8 @@ export declare const frameworkLabels: {
|
|
|
4
4
|
readonly sveltekit: "SvelteKit";
|
|
5
5
|
readonly other: "Other";
|
|
6
6
|
};
|
|
7
|
+
export declare const frameworkCreateProjectCodeSnippet: {
|
|
8
|
+
readonly next: "npx create-next-app@latest";
|
|
9
|
+
readonly nuxt: "npx nuxi@latest init";
|
|
10
|
+
readonly sveltekit: "npx sv create";
|
|
11
|
+
};
|
|
@@ -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 {};
|
|
@@ -41,33 +41,33 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
id: string;
|
|
43
43
|
name: string;
|
|
44
|
-
created_at: number;
|
|
45
44
|
last_modified: number;
|
|
45
|
+
created_at: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
created_at: number;
|
|
52
51
|
last_modified: number;
|
|
52
|
+
created_at: number;
|
|
53
53
|
uploader_id?: string | undefined;
|
|
54
54
|
count?: number | undefined;
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
id: string;
|
|
58
|
+
kind: string;
|
|
59
|
+
url: string;
|
|
60
|
+
size: number;
|
|
57
61
|
tags: {
|
|
58
62
|
id: string;
|
|
59
63
|
name: string;
|
|
60
|
-
created_at: number;
|
|
61
64
|
last_modified: number;
|
|
65
|
+
created_at: number;
|
|
62
66
|
count: number;
|
|
63
67
|
uploader_id?: string | undefined;
|
|
64
68
|
}[];
|
|
65
|
-
id: string;
|
|
66
|
-
url: string;
|
|
67
|
-
size: number;
|
|
68
|
-
last_modified: number;
|
|
69
|
-
kind: string;
|
|
70
69
|
filename: string;
|
|
70
|
+
last_modified: number;
|
|
71
71
|
extension?: string | undefined;
|
|
72
72
|
width?: number | undefined;
|
|
73
73
|
height?: number | undefined;
|
|
@@ -82,20 +82,20 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
82
82
|
credits?: string | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
|
+
id: string;
|
|
86
|
+
kind: string;
|
|
87
|
+
url: string;
|
|
88
|
+
size: number;
|
|
85
89
|
tags: {
|
|
86
90
|
id: string;
|
|
87
91
|
name: string;
|
|
88
|
-
created_at: number;
|
|
89
92
|
last_modified: number;
|
|
93
|
+
created_at: number;
|
|
90
94
|
uploader_id?: string | undefined;
|
|
91
95
|
count?: number | undefined;
|
|
92
96
|
}[];
|
|
93
|
-
id: string;
|
|
94
|
-
url: string;
|
|
95
|
-
size: number;
|
|
96
|
-
last_modified: number;
|
|
97
|
-
kind: string;
|
|
98
97
|
filename: string;
|
|
98
|
+
last_modified: number;
|
|
99
99
|
extension?: string | undefined;
|
|
100
100
|
width?: number | undefined;
|
|
101
101
|
height?: number | undefined;
|
|
@@ -156,33 +156,33 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
id: string;
|
|
158
158
|
name: string;
|
|
159
|
-
created_at: number;
|
|
160
159
|
last_modified: number;
|
|
160
|
+
created_at: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
164
|
id: string;
|
|
165
165
|
name: string;
|
|
166
|
-
created_at: number;
|
|
167
166
|
last_modified: number;
|
|
167
|
+
created_at: number;
|
|
168
168
|
uploader_id?: string | undefined;
|
|
169
169
|
count?: number | undefined;
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
id: string;
|
|
173
|
+
kind: string;
|
|
174
|
+
url: string;
|
|
175
|
+
size: number;
|
|
172
176
|
tags: {
|
|
173
177
|
id: string;
|
|
174
178
|
name: string;
|
|
175
|
-
created_at: number;
|
|
176
179
|
last_modified: number;
|
|
180
|
+
created_at: number;
|
|
177
181
|
count: number;
|
|
178
182
|
uploader_id?: string | undefined;
|
|
179
183
|
}[];
|
|
180
|
-
id: string;
|
|
181
|
-
url: string;
|
|
182
|
-
size: number;
|
|
183
|
-
last_modified: number;
|
|
184
|
-
kind: string;
|
|
185
184
|
filename: string;
|
|
185
|
+
last_modified: number;
|
|
186
186
|
extension?: string | undefined;
|
|
187
187
|
width?: number | undefined;
|
|
188
188
|
height?: number | undefined;
|
|
@@ -197,20 +197,20 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
197
197
|
credits?: string | undefined;
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
|
+
id: string;
|
|
201
|
+
kind: string;
|
|
202
|
+
url: string;
|
|
203
|
+
size: number;
|
|
200
204
|
tags: {
|
|
201
205
|
id: string;
|
|
202
206
|
name: string;
|
|
203
|
-
created_at: number;
|
|
204
207
|
last_modified: number;
|
|
208
|
+
created_at: number;
|
|
205
209
|
uploader_id?: string | undefined;
|
|
206
210
|
count?: number | undefined;
|
|
207
211
|
}[];
|
|
208
|
-
id: string;
|
|
209
|
-
url: string;
|
|
210
|
-
size: number;
|
|
211
|
-
last_modified: number;
|
|
212
|
-
kind: string;
|
|
213
212
|
filename: string;
|
|
213
|
+
last_modified: number;
|
|
214
214
|
extension?: string | undefined;
|
|
215
215
|
width?: number | undefined;
|
|
216
216
|
height?: number | undefined;
|
|
@@ -226,22 +226,21 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
226
226
|
} | undefined;
|
|
227
227
|
}>, "many">;
|
|
228
228
|
}, "strip", z.ZodTypeAny, {
|
|
229
|
-
total: number;
|
|
230
229
|
items: {
|
|
230
|
+
id: string;
|
|
231
|
+
kind: string;
|
|
232
|
+
url: string;
|
|
233
|
+
size: number;
|
|
231
234
|
tags: {
|
|
232
235
|
id: string;
|
|
233
236
|
name: string;
|
|
234
|
-
created_at: number;
|
|
235
237
|
last_modified: number;
|
|
238
|
+
created_at: number;
|
|
236
239
|
count: number;
|
|
237
240
|
uploader_id?: string | undefined;
|
|
238
241
|
}[];
|
|
239
|
-
id: string;
|
|
240
|
-
url: string;
|
|
241
|
-
size: number;
|
|
242
|
-
last_modified: number;
|
|
243
|
-
kind: string;
|
|
244
242
|
filename: string;
|
|
243
|
+
last_modified: number;
|
|
245
244
|
extension?: string | undefined;
|
|
246
245
|
width?: number | undefined;
|
|
247
246
|
height?: number | undefined;
|
|
@@ -256,24 +255,24 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
256
255
|
credits?: string | undefined;
|
|
257
256
|
} | undefined;
|
|
258
257
|
}[];
|
|
258
|
+
total: number;
|
|
259
259
|
cursor?: string | undefined;
|
|
260
260
|
}, {
|
|
261
|
-
total: number;
|
|
262
261
|
items: {
|
|
262
|
+
id: string;
|
|
263
|
+
kind: string;
|
|
264
|
+
url: string;
|
|
265
|
+
size: number;
|
|
263
266
|
tags: {
|
|
264
267
|
id: string;
|
|
265
268
|
name: string;
|
|
266
|
-
created_at: number;
|
|
267
269
|
last_modified: number;
|
|
270
|
+
created_at: number;
|
|
268
271
|
uploader_id?: string | undefined;
|
|
269
272
|
count?: number | undefined;
|
|
270
273
|
}[];
|
|
271
|
-
id: string;
|
|
272
|
-
url: string;
|
|
273
|
-
size: number;
|
|
274
|
-
last_modified: number;
|
|
275
|
-
kind: string;
|
|
276
274
|
filename: string;
|
|
275
|
+
last_modified: number;
|
|
277
276
|
extension?: string | undefined;
|
|
278
277
|
width?: number | undefined;
|
|
279
278
|
height?: number | undefined;
|
|
@@ -288,6 +287,7 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
288
287
|
credits?: string[] | undefined;
|
|
289
288
|
} | undefined;
|
|
290
289
|
}[];
|
|
290
|
+
total: number;
|
|
291
291
|
cursor?: string | undefined;
|
|
292
292
|
}>;
|
|
293
293
|
export type MediaAsset = z.TypeOf<typeof mediaAssetType>;
|
|
@@ -306,22 +306,21 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
306
306
|
uploaderId: string | undefined;
|
|
307
307
|
tags: string;
|
|
308
308
|
page: number;
|
|
309
|
-
total: number;
|
|
310
309
|
items: {
|
|
310
|
+
id: string;
|
|
311
|
+
kind: string;
|
|
312
|
+
url: string;
|
|
313
|
+
size: number;
|
|
311
314
|
tags: {
|
|
312
315
|
id: string;
|
|
313
316
|
name: string;
|
|
314
|
-
created_at: number;
|
|
315
317
|
last_modified: number;
|
|
318
|
+
created_at: number;
|
|
316
319
|
count: number;
|
|
317
320
|
uploader_id?: string | undefined;
|
|
318
321
|
}[];
|
|
319
|
-
id: string;
|
|
320
|
-
url: string;
|
|
321
|
-
size: number;
|
|
322
|
-
last_modified: number;
|
|
323
|
-
kind: string;
|
|
324
322
|
filename: string;
|
|
323
|
+
last_modified: number;
|
|
325
324
|
extension?: string | undefined;
|
|
326
325
|
width?: number | undefined;
|
|
327
326
|
height?: number | undefined;
|
|
@@ -336,6 +335,7 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
336
335
|
credits?: string | undefined;
|
|
337
336
|
} | undefined;
|
|
338
337
|
}[];
|
|
338
|
+
total: number;
|
|
339
339
|
cursor?: string | undefined;
|
|
340
340
|
}>;
|
|
341
341
|
interface UseMediaLibrarySearchArgs {
|
|
@@ -357,20 +357,20 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
357
357
|
setFilters: (filters: Partial<MediaLibraryFilters>) => void;
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
|
+
id: string;
|
|
361
|
+
kind: string;
|
|
362
|
+
url: string;
|
|
363
|
+
size: number;
|
|
360
364
|
tags: {
|
|
361
365
|
id: string;
|
|
362
366
|
name: string;
|
|
363
|
-
created_at: number;
|
|
364
367
|
last_modified: number;
|
|
368
|
+
created_at: number;
|
|
365
369
|
count: number;
|
|
366
370
|
uploader_id?: string | undefined;
|
|
367
371
|
}[];
|
|
368
|
-
id: string;
|
|
369
|
-
url: string;
|
|
370
|
-
size: number;
|
|
371
|
-
last_modified: number;
|
|
372
|
-
kind: string;
|
|
373
372
|
filename: string;
|
|
373
|
+
last_modified: number;
|
|
374
374
|
extension?: string | undefined;
|
|
375
375
|
width?: number | undefined;
|
|
376
376
|
height?: number | undefined;
|
|
@@ -407,20 +407,20 @@ declare function deleteMedia(mediaIds: string[]): void;
|
|
|
407
407
|
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
|
+
id: string;
|
|
411
|
+
kind: string;
|
|
412
|
+
url: string;
|
|
413
|
+
size: number;
|
|
410
414
|
tags: {
|
|
411
415
|
id: string;
|
|
412
416
|
name: string;
|
|
413
|
-
created_at: number;
|
|
414
417
|
last_modified: number;
|
|
418
|
+
created_at: number;
|
|
415
419
|
count: number;
|
|
416
420
|
uploader_id?: string | undefined;
|
|
417
421
|
}[];
|
|
418
|
-
id: string;
|
|
419
|
-
url: string;
|
|
420
|
-
size: number;
|
|
421
|
-
last_modified: number;
|
|
422
|
-
kind: string;
|
|
423
422
|
filename: string;
|
|
423
|
+
last_modified: number;
|
|
424
424
|
extension?: string | undefined;
|
|
425
425
|
width?: number | undefined;
|
|
426
426
|
height?: number | undefined;
|
|
@@ -3,8 +3,8 @@ export declare function useTagSearch(): {
|
|
|
3
3
|
tags: {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
-
created_at: number;
|
|
7
6
|
last_modified: number;
|
|
7
|
+
created_at: number;
|
|
8
8
|
count: number;
|
|
9
9
|
uploader_id?: string | undefined;
|
|
10
10
|
}[];
|
|
@@ -22,15 +22,15 @@ export declare const tagSchema: z.ZodObject<{
|
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
created_at: number;
|
|
26
25
|
last_modified: number;
|
|
26
|
+
created_at: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
|
-
created_at: number;
|
|
33
32
|
last_modified: number;
|
|
33
|
+
created_at: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
35
35
|
count?: number | undefined;
|
|
36
36
|
}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
2
|
-
|
|
3
|
-
|
|
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,18 +1,18 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: string;
|
|
4
|
+
url: string;
|
|
5
|
+
size: number;
|
|
2
6
|
tags: {
|
|
3
7
|
id: string;
|
|
4
8
|
name: string;
|
|
5
|
-
created_at: number;
|
|
6
9
|
last_modified: number;
|
|
10
|
+
created_at: number;
|
|
7
11
|
count: number;
|
|
8
12
|
uploader_id?: string | undefined;
|
|
9
13
|
}[];
|
|
10
|
-
id: string;
|
|
11
|
-
url: string;
|
|
12
|
-
size: number;
|
|
13
|
-
last_modified: number;
|
|
14
|
-
kind: string;
|
|
15
14
|
filename: string;
|
|
15
|
+
last_modified: number;
|
|
16
16
|
extension?: string | undefined;
|
|
17
17
|
width?: number | undefined;
|
|
18
18
|
height?: number | undefined;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { OnboardingState, OnboardingTracking } from "../service";
|
|
3
|
-
interface OnboardingGuideProps {
|
|
2
|
+
import type { OnboardingState, OnboardingStepId, OnboardingTracking } from "../service";
|
|
3
|
+
export 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
|
+
stepOverrides?: Partial<Record<OnboardingStepId, () => void>>;
|
|
11
|
+
repositoryName?: string;
|
|
12
|
+
projectName?: string;
|
|
9
13
|
}
|
|
10
14
|
export declare function OnboardingGuide(props: OnboardingGuideProps): JSX.Element | null;
|
|
11
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { OnboardingStep, OnboardingTracking } from "../../service";
|
|
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
|
+
stepOverrides?: Partial<Record<OnboardingStepId, () => void>>;
|
|
10
11
|
}
|
|
11
12
|
export declare function OnboardingCard(props: OnboardingCardProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { OnboardingStep, OnboardingTracking } from "../../service";
|
|
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
|
+
stepOverrides?: Partial<Record<OnboardingStepId, () => void>>;
|
|
8
9
|
}
|
|
9
10
|
export declare function OnboardingProgressStepper(props: OnboardingProgressStepperProps): JSX.Element | null;
|
|
10
11
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
2
|
import type { OnboardingStep } from "../../service";
|
|
3
3
|
interface OnboardingStepDialogProps {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
step: OnboardingStep;
|
|
6
6
|
stepIndex: number;
|
|
7
7
|
isStepComplete: boolean;
|
|
8
|
-
onActionClick: () => Promise<void>;
|
|
8
|
+
onActionClick: (isUndo?: boolean) => Promise<void>;
|
|
9
9
|
onClose: () => void;
|
|
10
|
+
contentRef: RefObject<HTMLDivElement>;
|
|
10
11
|
}
|
|
11
12
|
export declare function OnboardingStepDialog(props: OnboardingStepDialogProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { OnboardingFramework, OnboardingStep } from "../service/onboarding";
|
|
2
|
-
|
|
2
|
+
type Context = {
|
|
3
|
+
framework?: OnboardingFramework;
|
|
4
|
+
starter?: string | null;
|
|
5
|
+
repositoryName?: string;
|
|
6
|
+
projectName?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function getOnboardingContent(context: Context): {
|
|
3
9
|
steps: OnboardingStep[];
|
|
4
|
-
defaultCompletedStepIds:
|
|
10
|
+
defaultCompletedStepIds: ("createPrismicProject" | "chooseLocale" | "createProject" | "setupSliceMachine" | "createPageType" | "codePage" | "createSlice" | "reviewAndPush" | "createContent" | "renderPage")[];
|
|
5
11
|
tutorialLink: string | undefined;
|
|
6
12
|
};
|
|
13
|
+
export {};
|