@prismicio/editor-fields 0.4.7 → 0.4.9
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/fields/EmbedField/EmbedFooter.d.ts +1 -0
- package/dist/fields/ImageField/Components/ImageAltControl.d.ts +1 -0
- package/dist/fields/ImageField/Components/ImageFieldCard.d.ts +2 -2
- package/dist/fields/ImageField/MediaPicker/MediaLibrary/mediaLibraryData.d.ts +10 -0
- package/dist/fields/ImageField/MediaPicker/externalImage.d.ts +1 -0
- package/dist/fields/ImageField/useImageField.d.ts +1 -1
- package/dist/fields/LinkField/Documents/documentsData.d.ts +4 -242
- package/dist/fields/RichTextField/BubbleMenu/BubbleMenu.d.ts +1 -1
- package/dist/fields/RichTextField/BubbleMenu/{LinkItems.d.ts → Link/LinkItems.d.ts} +1 -0
- package/dist/fields/RichTextField/BubbleMenu/Link/SetLinkModal.d.ts +9 -0
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/useSelected.d.ts +4 -0
- package/dist/index.es.js +14481 -14394
- package/package.json +3 -3
|
@@ -5,11 +5,10 @@ import type { CropperImage } from "../imageFieldUtils";
|
|
|
5
5
|
import type { ExternalImage } from "../MediaPicker/externalImage";
|
|
6
6
|
interface ImageFieldCardProps {
|
|
7
7
|
content: ImageContent | undefined;
|
|
8
|
-
|
|
8
|
+
selected?: boolean;
|
|
9
9
|
fieldLabel: string;
|
|
10
10
|
readOnly: boolean;
|
|
11
11
|
imageLabel: string[];
|
|
12
|
-
setPage?: (page: number) => void;
|
|
13
12
|
onMediaSelected: (media: ExternalImage) => void;
|
|
14
13
|
initialImages: CropperImage[];
|
|
15
14
|
initialOption?: number;
|
|
@@ -17,6 +16,7 @@ interface ImageFieldCardProps {
|
|
|
17
16
|
croppedImages: CroppedImages;
|
|
18
17
|
option: number;
|
|
19
18
|
}) => void;
|
|
19
|
+
onClear: () => void;
|
|
20
20
|
children: ReactNode;
|
|
21
21
|
}
|
|
22
22
|
export declare function ImageFieldCard(props: ImageFieldCardProps): JSX.Element;
|
|
@@ -8,6 +8,7 @@ export declare const mediaLibraryImageOkType: import("zod").ZodObject<{
|
|
|
8
8
|
height: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9
9
|
last_modified: import("zod").ZodNumber;
|
|
10
10
|
url: import("zod").ZodString;
|
|
11
|
+
alt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
12
|
}, "strip", import("zod").ZodTypeAny, {
|
|
12
13
|
id: string;
|
|
13
14
|
url: string;
|
|
@@ -17,6 +18,7 @@ export declare const mediaLibraryImageOkType: import("zod").ZodObject<{
|
|
|
17
18
|
last_modified: number;
|
|
18
19
|
width?: number | undefined;
|
|
19
20
|
height?: number | undefined;
|
|
21
|
+
alt?: string | undefined;
|
|
20
22
|
}, {
|
|
21
23
|
id: string;
|
|
22
24
|
url: string;
|
|
@@ -26,6 +28,7 @@ export declare const mediaLibraryImageOkType: import("zod").ZodObject<{
|
|
|
26
28
|
last_modified: number;
|
|
27
29
|
width?: number | undefined;
|
|
28
30
|
height?: number | undefined;
|
|
31
|
+
alt?: string | undefined;
|
|
29
32
|
}>;
|
|
30
33
|
export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<{
|
|
31
34
|
total: import("zod").ZodNumber;
|
|
@@ -39,6 +42,7 @@ export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<
|
|
|
39
42
|
height: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
40
43
|
last_modified: import("zod").ZodNumber;
|
|
41
44
|
url: import("zod").ZodString;
|
|
45
|
+
alt: import("zod").ZodOptional<import("zod").ZodString>;
|
|
42
46
|
}, "strip", import("zod").ZodTypeAny, {
|
|
43
47
|
id: string;
|
|
44
48
|
url: string;
|
|
@@ -48,6 +52,7 @@ export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<
|
|
|
48
52
|
last_modified: number;
|
|
49
53
|
width?: number | undefined;
|
|
50
54
|
height?: number | undefined;
|
|
55
|
+
alt?: string | undefined;
|
|
51
56
|
}, {
|
|
52
57
|
id: string;
|
|
53
58
|
url: string;
|
|
@@ -57,6 +62,7 @@ export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<
|
|
|
57
62
|
last_modified: number;
|
|
58
63
|
width?: number | undefined;
|
|
59
64
|
height?: number | undefined;
|
|
65
|
+
alt?: string | undefined;
|
|
60
66
|
}>, "many">;
|
|
61
67
|
}, "strip", import("zod").ZodTypeAny, {
|
|
62
68
|
total: number;
|
|
@@ -69,6 +75,7 @@ export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<
|
|
|
69
75
|
last_modified: number;
|
|
70
76
|
width?: number | undefined;
|
|
71
77
|
height?: number | undefined;
|
|
78
|
+
alt?: string | undefined;
|
|
72
79
|
}[];
|
|
73
80
|
cursor?: string | undefined;
|
|
74
81
|
}, {
|
|
@@ -82,6 +89,7 @@ export declare const mediaLibrarySearchAPISchemaOkType: import("zod").ZodObject<
|
|
|
82
89
|
last_modified: number;
|
|
83
90
|
width?: number | undefined;
|
|
84
91
|
height?: number | undefined;
|
|
92
|
+
alt?: string | undefined;
|
|
85
93
|
}[];
|
|
86
94
|
cursor?: string | undefined;
|
|
87
95
|
}>;
|
|
@@ -97,6 +105,7 @@ export declare function useMediaLibrarySearch(): {
|
|
|
97
105
|
last_modified: number;
|
|
98
106
|
width?: number | undefined;
|
|
99
107
|
height?: number | undefined;
|
|
108
|
+
alt?: string | undefined;
|
|
100
109
|
}[];
|
|
101
110
|
limit: number;
|
|
102
111
|
onHasReachedBottom: () => void;
|
|
@@ -111,6 +120,7 @@ export declare function useMediaLibrarySearch(): {
|
|
|
111
120
|
last_modified: number;
|
|
112
121
|
width?: number | undefined;
|
|
113
122
|
height?: number | undefined;
|
|
123
|
+
alt?: string | undefined;
|
|
114
124
|
}[];
|
|
115
125
|
cursor?: string | undefined;
|
|
116
126
|
};
|
|
@@ -5,6 +5,7 @@ export interface ExternalImage {
|
|
|
5
5
|
url: string;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
|
+
alt?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare function replaceImage(thumbnailName: string, field: Image, content: ImageContent | undefined, extImage: ExternalImage): ImageContent;
|
|
10
11
|
export declare function createContentView(extImage: ExternalImage, constraints?: ImageConstraint): ImageContentView;
|
|
@@ -16,7 +16,6 @@ export declare function useImageField(props: useImageFieldProps): {
|
|
|
16
16
|
onMediaSelected: (media: ExternalImage) => void;
|
|
17
17
|
isUpdating: boolean;
|
|
18
18
|
page: number;
|
|
19
|
-
setPage: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
20
19
|
thumbnail: Readonly<{
|
|
21
20
|
width?: number | null | undefined;
|
|
22
21
|
height?: number | null | undefined;
|
|
@@ -97,5 +96,6 @@ export declare function useImageField(props: useImageFieldProps): {
|
|
|
97
96
|
alt?: string | null | undefined;
|
|
98
97
|
provider?: string | null | undefined;
|
|
99
98
|
}) | undefined;
|
|
99
|
+
onClear: () => void;
|
|
100
100
|
};
|
|
101
101
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
1
|
export declare function useDocuments(params: {
|
|
3
2
|
searchTerm: string;
|
|
4
3
|
tagsFilter: string[];
|
|
@@ -6,8 +5,8 @@ export declare function useDocuments(params: {
|
|
|
6
5
|
}): {
|
|
7
6
|
documents: {
|
|
8
7
|
id: string;
|
|
9
|
-
title: string;
|
|
10
8
|
custom_type_id: string;
|
|
9
|
+
title: string;
|
|
11
10
|
versions: (({
|
|
12
11
|
status: "unclassified";
|
|
13
12
|
} | {
|
|
@@ -18,8 +17,8 @@ export declare function useDocuments(params: {
|
|
|
18
17
|
} | {
|
|
19
18
|
status: "archived";
|
|
20
19
|
}) & {
|
|
21
|
-
tags: string[];
|
|
22
20
|
version_id: string;
|
|
21
|
+
tags: string[];
|
|
23
22
|
custom_type_label: string;
|
|
24
23
|
preview_summary?: string | undefined;
|
|
25
24
|
preview_image?: string | undefined;
|
|
@@ -30,8 +29,8 @@ export declare function useDocuments(params: {
|
|
|
30
29
|
total: number;
|
|
31
30
|
results: {
|
|
32
31
|
id: string;
|
|
33
|
-
title: string;
|
|
34
32
|
custom_type_id: string;
|
|
33
|
+
title: string;
|
|
35
34
|
versions: (({
|
|
36
35
|
status: "unclassified";
|
|
37
36
|
} | {
|
|
@@ -42,8 +41,8 @@ export declare function useDocuments(params: {
|
|
|
42
41
|
} | {
|
|
43
42
|
status: "archived";
|
|
44
43
|
}) & {
|
|
45
|
-
tags: string[];
|
|
46
44
|
version_id: string;
|
|
45
|
+
tags: string[];
|
|
47
46
|
custom_type_label: string;
|
|
48
47
|
preview_summary?: string | undefined;
|
|
49
48
|
preview_image?: string | undefined;
|
|
@@ -52,240 +51,3 @@ export declare function useDocuments(params: {
|
|
|
52
51
|
cursor?: string | undefined;
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
|
-
declare const documentsSearchOkType: import("zod").ZodObject<{
|
|
56
|
-
id: import("zod").ZodString;
|
|
57
|
-
custom_type_id: import("zod").ZodString;
|
|
58
|
-
title: import("zod").ZodString;
|
|
59
|
-
versions: import("zod").ZodArray<import("zod").ZodIntersection<import("zod").ZodDiscriminatedUnion<"status", [import("zod").ZodObject<{
|
|
60
|
-
status: import("zod").ZodLiteral<"unclassified">;
|
|
61
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
62
|
-
status: "unclassified";
|
|
63
|
-
}, {
|
|
64
|
-
status: "unclassified";
|
|
65
|
-
}>, import("zod").ZodObject<{
|
|
66
|
-
status: import("zod").ZodLiteral<"published">;
|
|
67
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
68
|
-
status: "published";
|
|
69
|
-
}, {
|
|
70
|
-
status: "published";
|
|
71
|
-
}>, import("zod").ZodObject<{
|
|
72
|
-
status: import("zod").ZodLiteral<"release">;
|
|
73
|
-
release_id: import("zod").ZodString;
|
|
74
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
75
|
-
status: "release";
|
|
76
|
-
release_id: string;
|
|
77
|
-
}, {
|
|
78
|
-
status: "release";
|
|
79
|
-
release_id: string;
|
|
80
|
-
}>, import("zod").ZodObject<{
|
|
81
|
-
status: import("zod").ZodLiteral<"archived">;
|
|
82
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
83
|
-
status: "archived";
|
|
84
|
-
}, {
|
|
85
|
-
status: "archived";
|
|
86
|
-
}>]>, import("zod").ZodObject<{
|
|
87
|
-
version_id: import("zod").ZodString;
|
|
88
|
-
tags: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
89
|
-
custom_type_label: import("zod").ZodString;
|
|
90
|
-
preview_summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
-
preview_image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
93
|
-
tags: string[];
|
|
94
|
-
version_id: string;
|
|
95
|
-
custom_type_label: string;
|
|
96
|
-
preview_summary?: string | undefined;
|
|
97
|
-
preview_image?: string | undefined;
|
|
98
|
-
}, {
|
|
99
|
-
tags: string[];
|
|
100
|
-
version_id: string;
|
|
101
|
-
custom_type_label: string;
|
|
102
|
-
preview_summary?: string | undefined;
|
|
103
|
-
preview_image?: string | undefined;
|
|
104
|
-
}>>, "many">;
|
|
105
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
106
|
-
id: string;
|
|
107
|
-
title: string;
|
|
108
|
-
custom_type_id: string;
|
|
109
|
-
versions: (({
|
|
110
|
-
status: "unclassified";
|
|
111
|
-
} | {
|
|
112
|
-
status: "published";
|
|
113
|
-
} | {
|
|
114
|
-
status: "release";
|
|
115
|
-
release_id: string;
|
|
116
|
-
} | {
|
|
117
|
-
status: "archived";
|
|
118
|
-
}) & {
|
|
119
|
-
tags: string[];
|
|
120
|
-
version_id: string;
|
|
121
|
-
custom_type_label: string;
|
|
122
|
-
preview_summary?: string | undefined;
|
|
123
|
-
preview_image?: string | undefined;
|
|
124
|
-
})[];
|
|
125
|
-
}, {
|
|
126
|
-
id: string;
|
|
127
|
-
title: string;
|
|
128
|
-
custom_type_id: string;
|
|
129
|
-
versions: (({
|
|
130
|
-
status: "unclassified";
|
|
131
|
-
} | {
|
|
132
|
-
status: "published";
|
|
133
|
-
} | {
|
|
134
|
-
status: "release";
|
|
135
|
-
release_id: string;
|
|
136
|
-
} | {
|
|
137
|
-
status: "archived";
|
|
138
|
-
}) & {
|
|
139
|
-
tags: string[];
|
|
140
|
-
version_id: string;
|
|
141
|
-
custom_type_label: string;
|
|
142
|
-
preview_summary?: string | undefined;
|
|
143
|
-
preview_image?: string | undefined;
|
|
144
|
-
})[];
|
|
145
|
-
}>;
|
|
146
|
-
declare const documentsSearchAPISchemaOkType: import("zod").ZodObject<{
|
|
147
|
-
total: import("zod").ZodNumber;
|
|
148
|
-
cursor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
149
|
-
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
150
|
-
id: import("zod").ZodString;
|
|
151
|
-
custom_type_id: import("zod").ZodString;
|
|
152
|
-
title: import("zod").ZodString;
|
|
153
|
-
versions: import("zod").ZodArray<import("zod").ZodIntersection<import("zod").ZodDiscriminatedUnion<"status", [import("zod").ZodObject<{
|
|
154
|
-
status: import("zod").ZodLiteral<"unclassified">;
|
|
155
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
156
|
-
status: "unclassified";
|
|
157
|
-
}, {
|
|
158
|
-
status: "unclassified";
|
|
159
|
-
}>, import("zod").ZodObject<{
|
|
160
|
-
status: import("zod").ZodLiteral<"published">;
|
|
161
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
162
|
-
status: "published";
|
|
163
|
-
}, {
|
|
164
|
-
status: "published";
|
|
165
|
-
}>, import("zod").ZodObject<{
|
|
166
|
-
status: import("zod").ZodLiteral<"release">;
|
|
167
|
-
release_id: import("zod").ZodString;
|
|
168
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
169
|
-
status: "release";
|
|
170
|
-
release_id: string;
|
|
171
|
-
}, {
|
|
172
|
-
status: "release";
|
|
173
|
-
release_id: string;
|
|
174
|
-
}>, import("zod").ZodObject<{
|
|
175
|
-
status: import("zod").ZodLiteral<"archived">;
|
|
176
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
177
|
-
status: "archived";
|
|
178
|
-
}, {
|
|
179
|
-
status: "archived";
|
|
180
|
-
}>]>, import("zod").ZodObject<{
|
|
181
|
-
version_id: import("zod").ZodString;
|
|
182
|
-
tags: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
183
|
-
custom_type_label: import("zod").ZodString;
|
|
184
|
-
preview_summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
-
preview_image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
186
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
187
|
-
tags: string[];
|
|
188
|
-
version_id: string;
|
|
189
|
-
custom_type_label: string;
|
|
190
|
-
preview_summary?: string | undefined;
|
|
191
|
-
preview_image?: string | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
tags: string[];
|
|
194
|
-
version_id: string;
|
|
195
|
-
custom_type_label: string;
|
|
196
|
-
preview_summary?: string | undefined;
|
|
197
|
-
preview_image?: string | undefined;
|
|
198
|
-
}>>, "many">;
|
|
199
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
200
|
-
id: string;
|
|
201
|
-
title: string;
|
|
202
|
-
custom_type_id: string;
|
|
203
|
-
versions: (({
|
|
204
|
-
status: "unclassified";
|
|
205
|
-
} | {
|
|
206
|
-
status: "published";
|
|
207
|
-
} | {
|
|
208
|
-
status: "release";
|
|
209
|
-
release_id: string;
|
|
210
|
-
} | {
|
|
211
|
-
status: "archived";
|
|
212
|
-
}) & {
|
|
213
|
-
tags: string[];
|
|
214
|
-
version_id: string;
|
|
215
|
-
custom_type_label: string;
|
|
216
|
-
preview_summary?: string | undefined;
|
|
217
|
-
preview_image?: string | undefined;
|
|
218
|
-
})[];
|
|
219
|
-
}, {
|
|
220
|
-
id: string;
|
|
221
|
-
title: string;
|
|
222
|
-
custom_type_id: string;
|
|
223
|
-
versions: (({
|
|
224
|
-
status: "unclassified";
|
|
225
|
-
} | {
|
|
226
|
-
status: "published";
|
|
227
|
-
} | {
|
|
228
|
-
status: "release";
|
|
229
|
-
release_id: string;
|
|
230
|
-
} | {
|
|
231
|
-
status: "archived";
|
|
232
|
-
}) & {
|
|
233
|
-
tags: string[];
|
|
234
|
-
version_id: string;
|
|
235
|
-
custom_type_label: string;
|
|
236
|
-
preview_summary?: string | undefined;
|
|
237
|
-
preview_image?: string | undefined;
|
|
238
|
-
})[];
|
|
239
|
-
}>, "many">;
|
|
240
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
241
|
-
total: number;
|
|
242
|
-
results: {
|
|
243
|
-
id: string;
|
|
244
|
-
title: string;
|
|
245
|
-
custom_type_id: string;
|
|
246
|
-
versions: (({
|
|
247
|
-
status: "unclassified";
|
|
248
|
-
} | {
|
|
249
|
-
status: "published";
|
|
250
|
-
} | {
|
|
251
|
-
status: "release";
|
|
252
|
-
release_id: string;
|
|
253
|
-
} | {
|
|
254
|
-
status: "archived";
|
|
255
|
-
}) & {
|
|
256
|
-
tags: string[];
|
|
257
|
-
version_id: string;
|
|
258
|
-
custom_type_label: string;
|
|
259
|
-
preview_summary?: string | undefined;
|
|
260
|
-
preview_image?: string | undefined;
|
|
261
|
-
})[];
|
|
262
|
-
}[];
|
|
263
|
-
cursor?: string | undefined;
|
|
264
|
-
}, {
|
|
265
|
-
total: number;
|
|
266
|
-
results: {
|
|
267
|
-
id: string;
|
|
268
|
-
title: string;
|
|
269
|
-
custom_type_id: string;
|
|
270
|
-
versions: (({
|
|
271
|
-
status: "unclassified";
|
|
272
|
-
} | {
|
|
273
|
-
status: "published";
|
|
274
|
-
} | {
|
|
275
|
-
status: "release";
|
|
276
|
-
release_id: string;
|
|
277
|
-
} | {
|
|
278
|
-
status: "archived";
|
|
279
|
-
}) & {
|
|
280
|
-
tags: string[];
|
|
281
|
-
version_id: string;
|
|
282
|
-
custom_type_label: string;
|
|
283
|
-
preview_summary?: string | undefined;
|
|
284
|
-
preview_image?: string | undefined;
|
|
285
|
-
})[];
|
|
286
|
-
}[];
|
|
287
|
-
cursor?: string | undefined;
|
|
288
|
-
}>;
|
|
289
|
-
export declare type DocumentSearchApi = TypeOf<typeof documentsSearchAPISchemaOkType>;
|
|
290
|
-
export declare type Document = TypeOf<typeof documentsSearchOkType>;
|
|
291
|
-
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface SetLinkModalProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
setOpen: (open: boolean) => void;
|
|
4
|
+
onSetUrl: (url: string) => void;
|
|
5
|
+
openInNewTab: boolean;
|
|
6
|
+
setOpenInNewTab: (openInNewTab: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function SetLinkModal(props: SetLinkModalProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -12,12 +12,12 @@ interface useImageViewProps {
|
|
|
12
12
|
imageViewProps: ImageViewProps;
|
|
13
13
|
}
|
|
14
14
|
export declare function useImageView(props: useImageViewProps): {
|
|
15
|
-
onContentChange: (content?: ImageContent) => void;
|
|
16
15
|
onMediaSelected: (media: ExternalImage) => void;
|
|
17
16
|
onCropperDialogClose: ({ croppedImages }: {
|
|
18
17
|
croppedImages: CroppedImages;
|
|
19
18
|
}) => void;
|
|
20
19
|
isUpdating: boolean;
|
|
21
20
|
updateContent: (content?: ImageContent) => void;
|
|
21
|
+
onClear: () => void;
|
|
22
22
|
};
|
|
23
23
|
export {};
|