@prismicio/editor-fields 0.4.56 → 0.4.58-alpha.repeatable-link-base.0
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 +2 -0
- package/dist/FieldContext.d.ts +5 -0
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +40 -40
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +4 -4
- package/dist/core/service/customType.d.ts +13 -0
- package/dist/core/service/document.d.ts +1658 -407
- package/dist/core/service/documentSearch.d.ts +214 -0
- package/dist/core/service/index.d.ts +2 -0
- package/dist/core/service/repository.d.ts +28 -20
- package/dist/core/service/teamSpace.d.ts +48 -0
- package/dist/core/service/user.d.ts +112 -6
- package/dist/fields/IntegrationField/integrationData.d.ts +5 -5
- package/dist/fields/LinkField/Documents/DocumentCard.d.ts +1 -1
- package/dist/fields/LinkField/Documents/documentsData.d.ts +73 -44
- package/dist/fields/LinkField/LinkField.d.ts +3 -2
- package/dist/fields/LinkField/LinkOrRepeatableLinkField.d.ts +12 -0
- package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkField.d.ts +11 -0
- package/dist/fields/LinkField/RepeatableLinkField/RepeatableLinkFieldActions.d.ts +11 -0
- package/dist/fields/LinkField/RepeatableLinkField/index.d.ts +1 -0
- package/dist/fields/LinkField/RepeatableLinkField/useRepeatableLinkField.d.ts +84 -0
- package/dist/fields/LinkField/index.d.ts +1 -0
- package/dist/fields/LinkField/useLinkField.d.ts +5 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Embed/EmbedView.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Image/ImageView.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +2 -2
- package/dist/index.cjs.js +37 -39
- package/dist/index.es.js +25902 -22602
- package/dist/slices/utils.d.ts +100 -26
- package/package.json +25 -24
- package/dist/fields/RichTextField/extensions/Image/ImageLinkControl.d.ts +0 -9
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ type SearchDocuments = {
|
|
|
39
39
|
localeId?: string;
|
|
40
40
|
customTypeId?: string;
|
|
41
41
|
documentSearchBaseUrl: URL;
|
|
42
|
+
searchDocumentsWithInterestingVersions: boolean;
|
|
42
43
|
};
|
|
43
44
|
type IntegrationFields = {
|
|
44
45
|
integrationFields?: never;
|
|
@@ -77,6 +78,7 @@ interface OnAnalyticsEvent {
|
|
|
77
78
|
type: "web" | "media" | "document";
|
|
78
79
|
isInSlice: string;
|
|
79
80
|
isInGroup: string;
|
|
81
|
+
inInRepeatable: string;
|
|
80
82
|
customTypeFormat: "page" | "custom";
|
|
81
83
|
}): void;
|
|
82
84
|
(event: "Unsplash Image Searched" | "Unsplash Image Added"): void;
|
package/dist/FieldContext.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ interface FieldContextValue {
|
|
|
5
5
|
customTypeFormat: CustomTypeFormat;
|
|
6
6
|
isInSlice: boolean;
|
|
7
7
|
isInGroup: boolean;
|
|
8
|
+
isInRepeatable: boolean;
|
|
8
9
|
}
|
|
9
10
|
interface RootFieldContextProviderProps {
|
|
10
11
|
customTypeFormat: CustomTypeFormat;
|
|
@@ -23,5 +24,9 @@ export declare function FieldInSliceContextProvider(props: PropsWithChildren): J
|
|
|
23
24
|
* Overrides the field context to indicate that the field is in a group.
|
|
24
25
|
*/
|
|
25
26
|
export declare function FieldInGroupContextProvider(props: PropsWithChildren): JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Overrides the field context to indicate that the field is repeatable.
|
|
29
|
+
*/
|
|
30
|
+
export declare function FieldInRepeatableContextProvider(props: PropsWithChildren): JSX.Element;
|
|
26
31
|
export declare function useFieldContext(): FieldContextValue | undefined;
|
|
27
32
|
export {};
|
|
@@ -21,14 +21,14 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
21
21
|
notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
22
22
|
credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
notes?: string | undefined;
|
|
24
25
|
filename?: string | undefined;
|
|
25
26
|
alt?: string | undefined;
|
|
26
|
-
notes?: string | undefined;
|
|
27
27
|
credits?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
+
notes?: string[] | undefined;
|
|
29
30
|
filename?: string[] | undefined;
|
|
30
31
|
alt?: string[] | undefined;
|
|
31
|
-
notes?: string[] | undefined;
|
|
32
32
|
credits?: string[] | undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
tags: z.ZodArray<z.ZodObject<{
|
|
@@ -68,17 +68,17 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
68
68
|
last_modified: number;
|
|
69
69
|
kind: string;
|
|
70
70
|
filename: string;
|
|
71
|
-
|
|
71
|
+
notes?: string | undefined;
|
|
72
72
|
width?: number | undefined;
|
|
73
73
|
height?: number | undefined;
|
|
74
|
-
alt?: string | undefined;
|
|
75
74
|
uploader_id?: string | undefined;
|
|
76
|
-
|
|
75
|
+
extension?: string | undefined;
|
|
76
|
+
alt?: string | undefined;
|
|
77
77
|
credits?: string | undefined;
|
|
78
78
|
search_highlight?: {
|
|
79
|
+
notes?: string | undefined;
|
|
79
80
|
filename?: string | undefined;
|
|
80
81
|
alt?: string | undefined;
|
|
81
|
-
notes?: string | undefined;
|
|
82
82
|
credits?: string | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
@@ -96,17 +96,17 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
96
96
|
last_modified: number;
|
|
97
97
|
kind: string;
|
|
98
98
|
filename: string;
|
|
99
|
-
|
|
99
|
+
notes?: string | undefined;
|
|
100
100
|
width?: number | undefined;
|
|
101
101
|
height?: number | undefined;
|
|
102
|
-
alt?: string | undefined;
|
|
103
102
|
uploader_id?: string | undefined;
|
|
104
|
-
|
|
103
|
+
extension?: string | undefined;
|
|
104
|
+
alt?: string | undefined;
|
|
105
105
|
credits?: string | undefined;
|
|
106
106
|
search_highlight?: {
|
|
107
|
+
notes?: string[] | undefined;
|
|
107
108
|
filename?: string[] | undefined;
|
|
108
109
|
alt?: string[] | undefined;
|
|
109
|
-
notes?: string[] | undefined;
|
|
110
110
|
credits?: string[] | undefined;
|
|
111
111
|
} | undefined;
|
|
112
112
|
}>;
|
|
@@ -136,14 +136,14 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
136
136
|
notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
137
137
|
credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
+
notes?: string | undefined;
|
|
139
140
|
filename?: string | undefined;
|
|
140
141
|
alt?: string | undefined;
|
|
141
|
-
notes?: string | undefined;
|
|
142
142
|
credits?: string | undefined;
|
|
143
143
|
}, {
|
|
144
|
+
notes?: string[] | undefined;
|
|
144
145
|
filename?: string[] | undefined;
|
|
145
146
|
alt?: string[] | undefined;
|
|
146
|
-
notes?: string[] | undefined;
|
|
147
147
|
credits?: string[] | undefined;
|
|
148
148
|
}>>;
|
|
149
149
|
tags: z.ZodArray<z.ZodObject<{
|
|
@@ -183,17 +183,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
183
183
|
last_modified: number;
|
|
184
184
|
kind: string;
|
|
185
185
|
filename: string;
|
|
186
|
-
|
|
186
|
+
notes?: string | undefined;
|
|
187
187
|
width?: number | undefined;
|
|
188
188
|
height?: number | undefined;
|
|
189
|
-
alt?: string | undefined;
|
|
190
189
|
uploader_id?: string | undefined;
|
|
191
|
-
|
|
190
|
+
extension?: string | undefined;
|
|
191
|
+
alt?: string | undefined;
|
|
192
192
|
credits?: string | undefined;
|
|
193
193
|
search_highlight?: {
|
|
194
|
+
notes?: string | undefined;
|
|
194
195
|
filename?: string | undefined;
|
|
195
196
|
alt?: string | undefined;
|
|
196
|
-
notes?: string | undefined;
|
|
197
197
|
credits?: string | undefined;
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
@@ -211,17 +211,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
211
211
|
last_modified: number;
|
|
212
212
|
kind: string;
|
|
213
213
|
filename: string;
|
|
214
|
-
|
|
214
|
+
notes?: string | undefined;
|
|
215
215
|
width?: number | undefined;
|
|
216
216
|
height?: number | undefined;
|
|
217
|
-
alt?: string | undefined;
|
|
218
217
|
uploader_id?: string | undefined;
|
|
219
|
-
|
|
218
|
+
extension?: string | undefined;
|
|
219
|
+
alt?: string | undefined;
|
|
220
220
|
credits?: string | undefined;
|
|
221
221
|
search_highlight?: {
|
|
222
|
+
notes?: string[] | undefined;
|
|
222
223
|
filename?: string[] | undefined;
|
|
223
224
|
alt?: string[] | undefined;
|
|
224
|
-
notes?: string[] | undefined;
|
|
225
225
|
credits?: string[] | undefined;
|
|
226
226
|
} | undefined;
|
|
227
227
|
}>, "many">;
|
|
@@ -242,17 +242,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
242
242
|
last_modified: number;
|
|
243
243
|
kind: string;
|
|
244
244
|
filename: string;
|
|
245
|
-
|
|
245
|
+
notes?: string | undefined;
|
|
246
246
|
width?: number | undefined;
|
|
247
247
|
height?: number | undefined;
|
|
248
|
-
alt?: string | undefined;
|
|
249
248
|
uploader_id?: string | undefined;
|
|
250
|
-
|
|
249
|
+
extension?: string | undefined;
|
|
250
|
+
alt?: string | undefined;
|
|
251
251
|
credits?: string | undefined;
|
|
252
252
|
search_highlight?: {
|
|
253
|
+
notes?: string | undefined;
|
|
253
254
|
filename?: string | undefined;
|
|
254
255
|
alt?: string | undefined;
|
|
255
|
-
notes?: string | undefined;
|
|
256
256
|
credits?: string | undefined;
|
|
257
257
|
} | undefined;
|
|
258
258
|
}[];
|
|
@@ -274,17 +274,17 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
274
274
|
last_modified: number;
|
|
275
275
|
kind: string;
|
|
276
276
|
filename: string;
|
|
277
|
-
|
|
277
|
+
notes?: string | undefined;
|
|
278
278
|
width?: number | undefined;
|
|
279
279
|
height?: number | undefined;
|
|
280
|
-
alt?: string | undefined;
|
|
281
280
|
uploader_id?: string | undefined;
|
|
282
|
-
|
|
281
|
+
extension?: string | undefined;
|
|
282
|
+
alt?: string | undefined;
|
|
283
283
|
credits?: string | undefined;
|
|
284
284
|
search_highlight?: {
|
|
285
|
+
notes?: string[] | undefined;
|
|
285
286
|
filename?: string[] | undefined;
|
|
286
287
|
alt?: string[] | undefined;
|
|
287
|
-
notes?: string[] | undefined;
|
|
288
288
|
credits?: string[] | undefined;
|
|
289
289
|
} | undefined;
|
|
290
290
|
}[];
|
|
@@ -322,17 +322,17 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
322
322
|
last_modified: number;
|
|
323
323
|
kind: string;
|
|
324
324
|
filename: string;
|
|
325
|
-
|
|
325
|
+
notes?: string | undefined;
|
|
326
326
|
width?: number | undefined;
|
|
327
327
|
height?: number | undefined;
|
|
328
|
-
alt?: string | undefined;
|
|
329
328
|
uploader_id?: string | undefined;
|
|
330
|
-
|
|
329
|
+
extension?: string | undefined;
|
|
330
|
+
alt?: string | undefined;
|
|
331
331
|
credits?: string | undefined;
|
|
332
332
|
search_highlight?: {
|
|
333
|
+
notes?: string | undefined;
|
|
333
334
|
filename?: string | undefined;
|
|
334
335
|
alt?: string | undefined;
|
|
335
|
-
notes?: string | undefined;
|
|
336
336
|
credits?: string | undefined;
|
|
337
337
|
} | undefined;
|
|
338
338
|
}[];
|
|
@@ -371,17 +371,17 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
371
371
|
last_modified: number;
|
|
372
372
|
kind: string;
|
|
373
373
|
filename: string;
|
|
374
|
-
|
|
374
|
+
notes?: string | undefined;
|
|
375
375
|
width?: number | undefined;
|
|
376
376
|
height?: number | undefined;
|
|
377
|
-
alt?: string | undefined;
|
|
378
377
|
uploader_id?: string | undefined;
|
|
379
|
-
|
|
378
|
+
extension?: string | undefined;
|
|
379
|
+
alt?: string | undefined;
|
|
380
380
|
credits?: string | undefined;
|
|
381
381
|
search_highlight?: {
|
|
382
|
+
notes?: string | undefined;
|
|
382
383
|
filename?: string | undefined;
|
|
383
384
|
alt?: string | undefined;
|
|
384
|
-
notes?: string | undefined;
|
|
385
385
|
credits?: string | undefined;
|
|
386
386
|
} | undefined;
|
|
387
387
|
}[];
|
|
@@ -421,17 +421,17 @@ export declare function getMedia(allPages: MediaPage[], keyword: string, assetTy
|
|
|
421
421
|
last_modified: number;
|
|
422
422
|
kind: string;
|
|
423
423
|
filename: string;
|
|
424
|
-
|
|
424
|
+
notes?: string | undefined;
|
|
425
425
|
width?: number | undefined;
|
|
426
426
|
height?: number | undefined;
|
|
427
|
-
alt?: string | undefined;
|
|
428
427
|
uploader_id?: string | undefined;
|
|
429
|
-
|
|
428
|
+
extension?: string | undefined;
|
|
429
|
+
alt?: string | undefined;
|
|
430
430
|
credits?: string | undefined;
|
|
431
431
|
search_highlight?: {
|
|
432
|
+
notes?: string | undefined;
|
|
432
433
|
filename?: string | undefined;
|
|
433
434
|
alt?: string | undefined;
|
|
434
|
-
notes?: string | undefined;
|
|
435
435
|
credits?: string | undefined;
|
|
436
436
|
} | undefined;
|
|
437
437
|
}[];
|
|
@@ -13,17 +13,17 @@ export declare function useSelectedMedia(): {
|
|
|
13
13
|
last_modified: number;
|
|
14
14
|
kind: string;
|
|
15
15
|
filename: string;
|
|
16
|
-
|
|
16
|
+
notes?: string | undefined;
|
|
17
17
|
width?: number | undefined;
|
|
18
18
|
height?: number | undefined;
|
|
19
|
-
alt?: string | undefined;
|
|
20
19
|
uploader_id?: string | undefined;
|
|
21
|
-
|
|
20
|
+
extension?: string | undefined;
|
|
21
|
+
alt?: string | undefined;
|
|
22
22
|
credits?: string | undefined;
|
|
23
23
|
search_highlight?: {
|
|
24
|
+
notes?: string | undefined;
|
|
24
25
|
filename?: string | undefined;
|
|
25
26
|
alt?: string | undefined;
|
|
26
|
-
notes?: string | undefined;
|
|
27
27
|
credits?: string | undefined;
|
|
28
28
|
} | undefined;
|
|
29
29
|
}[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import type { AuthStrategy } from "../../EditorConfig";
|
|
3
4
|
declare const customTypeResponse: z.ZodObject<{
|
|
@@ -23,4 +24,16 @@ export declare function getRepositoryCustomTypes(baseUrl: URL, repository: strin
|
|
|
23
24
|
repeatable: boolean;
|
|
24
25
|
status: boolean;
|
|
25
26
|
}[]>;
|
|
27
|
+
interface CustomTypesOptionsArgs {
|
|
28
|
+
baseUrl: URL;
|
|
29
|
+
repository: string;
|
|
30
|
+
authStrategy: AuthStrategy;
|
|
31
|
+
}
|
|
32
|
+
export declare function prefetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): void;
|
|
33
|
+
export declare function fetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): Promise<{
|
|
34
|
+
id: string;
|
|
35
|
+
label: string;
|
|
36
|
+
repeatable: boolean;
|
|
37
|
+
status: boolean;
|
|
38
|
+
}[]>;
|
|
26
39
|
export {};
|