@prismicio/editor-fields 0.4.37-alpha.dialog-actions.0 → 0.4.38
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/core/MediaLibrary/hooks/mediaLibraryData.d.ts +9 -9
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +1 -1
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
- package/dist/core/imageUtils.d.ts +3 -2
- package/dist/core/service/document.d.ts +9 -26
- package/dist/core/service/repository.d.ts +29 -2
- package/dist/fields/ImageField/Components/EmptyCardContent.d.ts +2 -2
- package/dist/fields/ImageField/Components/ImageFieldCard.d.ts +2 -13
- package/dist/fields/ImageField/Components/ImageFieldHeader.d.ts +20 -0
- package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +7 -0
- package/dist/fields/ImageField/Components/ImageLinkControl.d.ts +9 -0
- package/dist/fields/ImageField/Components/NonEmptyCardContent.d.ts +27 -0
- package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +2 -1
- package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +4 -54
- package/dist/fields/ImageField/ImageField.d.ts +1 -2
- package/dist/fields/LinkField/Documents/documentsData.d.ts +9 -11
- package/dist/fields/LinkField/LinkField.d.ts +1 -0
- package/dist/fields/LinkField/LinkFieldActions.d.ts +1 -0
- package/dist/index.cjs.js +29 -29
- package/dist/index.es.js +11803 -11663
- package/package.json +3 -3
|
@@ -53,7 +53,6 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
53
53
|
}>, "many">;
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
55
|
id: string;
|
|
56
|
-
url: string;
|
|
57
56
|
tags: {
|
|
58
57
|
id: string;
|
|
59
58
|
name: string;
|
|
@@ -65,6 +64,7 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
65
64
|
last_modified: number;
|
|
66
65
|
kind: string;
|
|
67
66
|
filename: string;
|
|
67
|
+
url: string;
|
|
68
68
|
size: number;
|
|
69
69
|
extension?: string | undefined;
|
|
70
70
|
width?: number | undefined;
|
|
@@ -80,7 +80,6 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
80
80
|
} | undefined;
|
|
81
81
|
}, {
|
|
82
82
|
id: string;
|
|
83
|
-
url: string;
|
|
84
83
|
tags: {
|
|
85
84
|
id: string;
|
|
86
85
|
name: string;
|
|
@@ -92,6 +91,7 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
92
91
|
last_modified: number;
|
|
93
92
|
kind: string;
|
|
94
93
|
filename: string;
|
|
94
|
+
url: string;
|
|
95
95
|
size: number;
|
|
96
96
|
extension?: string | undefined;
|
|
97
97
|
width?: number | undefined;
|
|
@@ -165,7 +165,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
165
165
|
}>, "many">;
|
|
166
166
|
}, "strip", z.ZodTypeAny, {
|
|
167
167
|
id: string;
|
|
168
|
-
url: string;
|
|
169
168
|
tags: {
|
|
170
169
|
id: string;
|
|
171
170
|
name: string;
|
|
@@ -177,6 +176,7 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
177
176
|
last_modified: number;
|
|
178
177
|
kind: string;
|
|
179
178
|
filename: string;
|
|
179
|
+
url: string;
|
|
180
180
|
size: number;
|
|
181
181
|
extension?: string | undefined;
|
|
182
182
|
width?: number | undefined;
|
|
@@ -192,7 +192,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
192
192
|
} | undefined;
|
|
193
193
|
}, {
|
|
194
194
|
id: string;
|
|
195
|
-
url: string;
|
|
196
195
|
tags: {
|
|
197
196
|
id: string;
|
|
198
197
|
name: string;
|
|
@@ -204,6 +203,7 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
204
203
|
last_modified: number;
|
|
205
204
|
kind: string;
|
|
206
205
|
filename: string;
|
|
206
|
+
url: string;
|
|
207
207
|
size: number;
|
|
208
208
|
extension?: string | undefined;
|
|
209
209
|
width?: number | undefined;
|
|
@@ -222,7 +222,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
222
222
|
total: number;
|
|
223
223
|
items: {
|
|
224
224
|
id: string;
|
|
225
|
-
url: string;
|
|
226
225
|
tags: {
|
|
227
226
|
id: string;
|
|
228
227
|
name: string;
|
|
@@ -234,6 +233,7 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
234
233
|
last_modified: number;
|
|
235
234
|
kind: string;
|
|
236
235
|
filename: string;
|
|
236
|
+
url: string;
|
|
237
237
|
size: number;
|
|
238
238
|
extension?: string | undefined;
|
|
239
239
|
width?: number | undefined;
|
|
@@ -253,7 +253,6 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
253
253
|
total: number;
|
|
254
254
|
items: {
|
|
255
255
|
id: string;
|
|
256
|
-
url: string;
|
|
257
256
|
tags: {
|
|
258
257
|
id: string;
|
|
259
258
|
name: string;
|
|
@@ -265,6 +264,7 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
265
264
|
last_modified: number;
|
|
266
265
|
kind: string;
|
|
267
266
|
filename: string;
|
|
267
|
+
url: string;
|
|
268
268
|
size: number;
|
|
269
269
|
extension?: string | undefined;
|
|
270
270
|
width?: number | undefined;
|
|
@@ -305,7 +305,6 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
305
305
|
total: number;
|
|
306
306
|
items: {
|
|
307
307
|
id: string;
|
|
308
|
-
url: string;
|
|
309
308
|
tags: {
|
|
310
309
|
id: string;
|
|
311
310
|
name: string;
|
|
@@ -317,6 +316,7 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
317
316
|
last_modified: number;
|
|
318
317
|
kind: string;
|
|
319
318
|
filename: string;
|
|
319
|
+
url: string;
|
|
320
320
|
size: number;
|
|
321
321
|
extension?: string | undefined;
|
|
322
322
|
width?: number | undefined;
|
|
@@ -344,7 +344,6 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
344
344
|
setTagIds: (newTagIds: string[]) => void;
|
|
345
345
|
media: {
|
|
346
346
|
id: string;
|
|
347
|
-
url: string;
|
|
348
347
|
tags: {
|
|
349
348
|
id: string;
|
|
350
349
|
name: string;
|
|
@@ -356,6 +355,7 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
356
355
|
last_modified: number;
|
|
357
356
|
kind: string;
|
|
358
357
|
filename: string;
|
|
358
|
+
url: string;
|
|
359
359
|
size: number;
|
|
360
360
|
extension?: string | undefined;
|
|
361
361
|
width?: number | undefined;
|
|
@@ -393,7 +393,6 @@ declare function deleteSearchData(args: DeleteSearchDataArgs): void;
|
|
|
393
393
|
type MediaPage = Awaited<ReturnType<typeof searchMedia>>;
|
|
394
394
|
export declare function getMedia(allPages: MediaPage[], assetType: MediaAssetType, keyword: string, tags: string): {
|
|
395
395
|
id: string;
|
|
396
|
-
url: string;
|
|
397
396
|
tags: {
|
|
398
397
|
id: string;
|
|
399
398
|
name: string;
|
|
@@ -405,6 +404,7 @@ export declare function getMedia(allPages: MediaPage[], assetType: MediaAssetTyp
|
|
|
405
404
|
last_modified: number;
|
|
406
405
|
kind: string;
|
|
407
406
|
filename: string;
|
|
407
|
+
url: string;
|
|
408
408
|
size: number;
|
|
409
409
|
extension?: string | undefined;
|
|
410
410
|
width?: number | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
2
|
id: string;
|
|
3
|
-
url: string;
|
|
4
3
|
tags: {
|
|
5
4
|
id: string;
|
|
6
5
|
name: string;
|
|
@@ -12,6 +11,7 @@ export declare function useSelectedMedia(): {
|
|
|
12
11
|
last_modified: number;
|
|
13
12
|
kind: string;
|
|
14
13
|
filename: string;
|
|
14
|
+
url: string;
|
|
15
15
|
size: number;
|
|
16
16
|
extension?: string | undefined;
|
|
17
17
|
width?: number | undefined;
|
|
@@ -17,9 +17,9 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
17
17
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
18
18
|
}, "strip", import("zod").ZodTypeAny, {
|
|
19
19
|
id: string;
|
|
20
|
-
description: string | null;
|
|
21
20
|
width: number;
|
|
22
21
|
height: number;
|
|
22
|
+
description: string | null;
|
|
23
23
|
urls: {
|
|
24
24
|
small: string;
|
|
25
25
|
full: string;
|
|
@@ -27,9 +27,9 @@ declare const unsplashImage: import("zod").ZodObject<{
|
|
|
27
27
|
alt_description?: string | undefined;
|
|
28
28
|
}, {
|
|
29
29
|
id: string;
|
|
30
|
-
description: string | null;
|
|
31
30
|
width: number;
|
|
32
31
|
height: number;
|
|
32
|
+
description: string | null;
|
|
33
33
|
urls: {
|
|
34
34
|
small: string;
|
|
35
35
|
full: string;
|
|
@@ -55,9 +55,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
55
55
|
description: import("zod").ZodNullable<import("zod").ZodString>;
|
|
56
56
|
}, "strip", import("zod").ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
-
description: string | null;
|
|
59
58
|
width: number;
|
|
60
59
|
height: number;
|
|
60
|
+
description: string | null;
|
|
61
61
|
urls: {
|
|
62
62
|
small: string;
|
|
63
63
|
full: string;
|
|
@@ -65,9 +65,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
65
65
|
alt_description?: string | undefined;
|
|
66
66
|
}, {
|
|
67
67
|
id: string;
|
|
68
|
-
description: string | null;
|
|
69
68
|
width: number;
|
|
70
69
|
height: number;
|
|
70
|
+
description: string | null;
|
|
71
71
|
urls: {
|
|
72
72
|
small: string;
|
|
73
73
|
full: string;
|
|
@@ -77,9 +77,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
77
77
|
}, "strip", import("zod").ZodTypeAny, {
|
|
78
78
|
results: {
|
|
79
79
|
id: string;
|
|
80
|
-
description: string | null;
|
|
81
80
|
width: number;
|
|
82
81
|
height: number;
|
|
82
|
+
description: string | null;
|
|
83
83
|
urls: {
|
|
84
84
|
small: string;
|
|
85
85
|
full: string;
|
|
@@ -89,9 +89,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
89
89
|
}, {
|
|
90
90
|
results: {
|
|
91
91
|
id: string;
|
|
92
|
-
description: string | null;
|
|
93
92
|
width: number;
|
|
94
93
|
height: number;
|
|
94
|
+
description: string | null;
|
|
95
95
|
urls: {
|
|
96
96
|
small: string;
|
|
97
97
|
full: string;
|
|
@@ -100,9 +100,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
100
100
|
}[];
|
|
101
101
|
}>, {
|
|
102
102
|
id: string;
|
|
103
|
-
description: string | null;
|
|
104
103
|
width: number;
|
|
105
104
|
height: number;
|
|
105
|
+
description: string | null;
|
|
106
106
|
urls: {
|
|
107
107
|
small: string;
|
|
108
108
|
full: string;
|
|
@@ -111,9 +111,9 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
|
|
|
111
111
|
}[], {
|
|
112
112
|
results: {
|
|
113
113
|
id: string;
|
|
114
|
-
description: string | null;
|
|
115
114
|
width: number;
|
|
116
115
|
height: number;
|
|
116
|
+
description: string | null;
|
|
117
117
|
urls: {
|
|
118
118
|
small: string;
|
|
119
119
|
full: string;
|
|
@@ -125,9 +125,9 @@ export type UnplashSearchApi = TypeOf<typeof unsplashSearchApiType>;
|
|
|
125
125
|
export type UnsplashImage = TypeOf<typeof unsplashImage>;
|
|
126
126
|
export declare function useUnsplashSearch(baseUrl: URL, term: string): {
|
|
127
127
|
id: string;
|
|
128
|
-
description: string | null;
|
|
129
128
|
width: number;
|
|
130
129
|
height: number;
|
|
130
|
+
description: string | null;
|
|
131
131
|
urls: {
|
|
132
132
|
small: string;
|
|
133
133
|
full: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ImageBlock, type ImageContent, type ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { Image, ImageConstraint } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { MediaAsset, MediaAssetOrExternalImage } from "./MediaLibrary/hooks/mediaLibraryData";
|
|
4
4
|
/**
|
|
@@ -23,7 +23,7 @@ type ImageLabel = [thumbnailName: string | undefined, size: string | undefined];
|
|
|
23
23
|
export declare function getImageLabel(thumbnail: Thumbnail, content: ImageContent | ImageBlockData | undefined, contentView: ImageContentView | undefined): ImageLabel;
|
|
24
24
|
export declare function getImageThumbnails(field: Image): readonly Thumbnail[];
|
|
25
25
|
export declare function getImageContentViews(field: Image, content: ImageContent): readonly [ImageContentView, ...(ImageContentView | undefined)[]];
|
|
26
|
-
export declare function updateImageContentAlt(thumbnailName: string, content:
|
|
26
|
+
export declare function updateImageContentAlt<ContentType extends ImageContent | ImageBlockData>(thumbnailName: string, content: ContentType, contentView: ImageContentView, value: string): ContentType;
|
|
27
27
|
export declare function getConstraints(extImage: {
|
|
28
28
|
width: number;
|
|
29
29
|
height: number;
|
|
@@ -53,6 +53,7 @@ export declare function fitImage(extImage: {
|
|
|
53
53
|
height: number;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
+
export declare function getMediaUrlExtension(url: string): string | undefined;
|
|
56
57
|
export declare function getTitleWithoutExtension(selectedMedia?: MediaAsset): string;
|
|
57
58
|
export type ImageBlockData = ImageBlock["data"];
|
|
58
59
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { AuthStrategy } from "../../EditorConfig";
|
|
3
|
-
import { searchDocumentStatus } from "../document";
|
|
4
3
|
export declare const languageOkType: z.ZodObject<{
|
|
5
4
|
id: z.ZodString;
|
|
6
5
|
name: z.ZodString;
|
|
@@ -487,62 +486,46 @@ declare const documentsSearchAPISchemaOkType: z.ZodObject<{
|
|
|
487
486
|
}[];
|
|
488
487
|
cursor?: string | undefined;
|
|
489
488
|
}>;
|
|
490
|
-
export declare const documentOkType: z.ZodObject<{
|
|
491
|
-
id: z.ZodString;
|
|
492
|
-
title: z.ZodString;
|
|
493
|
-
repository_id: z.ZodString;
|
|
494
|
-
tags: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string[], string>, z.ZodArray<z.ZodString, "many">>>;
|
|
495
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
496
|
-
id: z.ZodString;
|
|
497
|
-
title: z.ZodString;
|
|
498
|
-
repository_id: z.ZodString;
|
|
499
|
-
tags: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string[], string>, z.ZodArray<z.ZodString, "many">>>;
|
|
500
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
501
|
-
id: z.ZodString;
|
|
502
|
-
title: z.ZodString;
|
|
503
|
-
repository_id: z.ZodString;
|
|
504
|
-
tags: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodString, string[], string>, z.ZodArray<z.ZodString, "many">>>;
|
|
505
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
506
489
|
declare const documentsFullTextSearchAPISchemaOkType: z.ZodObject<{
|
|
507
490
|
results: z.ZodArray<z.ZodObject<{
|
|
508
491
|
id: z.ZodString;
|
|
509
492
|
title: z.ZodString;
|
|
510
493
|
repository_id: z.ZodString;
|
|
511
|
-
tags: z.ZodOptional<z.
|
|
494
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
512
495
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
513
496
|
id: z.ZodString;
|
|
514
497
|
title: z.ZodString;
|
|
515
498
|
repository_id: z.ZodString;
|
|
516
|
-
tags: z.ZodOptional<z.
|
|
499
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
517
500
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
518
501
|
id: z.ZodString;
|
|
519
502
|
title: z.ZodString;
|
|
520
503
|
repository_id: z.ZodString;
|
|
521
|
-
tags: z.ZodOptional<z.
|
|
504
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
522
505
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
523
506
|
}, "strip", z.ZodTypeAny, {
|
|
524
507
|
results: z.objectOutputType<{
|
|
525
508
|
id: z.ZodString;
|
|
526
509
|
title: z.ZodString;
|
|
527
510
|
repository_id: z.ZodString;
|
|
528
|
-
tags: z.ZodOptional<z.
|
|
511
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
529
512
|
}, z.ZodTypeAny, "passthrough">[];
|
|
530
513
|
}, {
|
|
531
514
|
results: z.objectInputType<{
|
|
532
515
|
id: z.ZodString;
|
|
533
516
|
title: z.ZodString;
|
|
534
517
|
repository_id: z.ZodString;
|
|
535
|
-
tags: z.ZodOptional<z.
|
|
518
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
536
519
|
}, z.ZodTypeAny, "passthrough">[];
|
|
537
520
|
}>;
|
|
538
521
|
export type Language = z.TypeOf<typeof languageOkType>;
|
|
539
|
-
export type
|
|
522
|
+
export type GetsDocumentApi = z.TypeOf<typeof documentsSearchAPISchemaOkType>;
|
|
540
523
|
export type DocumentFullTextSearchApi = z.TypeOf<typeof documentsFullTextSearchAPISchemaOkType>;
|
|
541
524
|
export type DocumentMeta = z.TypeOf<typeof documentMetaOkType>;
|
|
542
525
|
export type DocumentVersion = z.TypeOf<typeof documentVersionOkType>;
|
|
543
526
|
export type DocumentStatus = DocumentVersion["status"];
|
|
544
|
-
export declare function getDocuments(baseUrl: URL, authStrategy: AuthStrategy, queryString: string, limit?: number, cursor?: string): Promise<
|
|
545
|
-
export declare function searchFullTextDocuments(baseUrl: URL, authStrategy: AuthStrategy, queryString: string): Promise<DocumentFullTextSearchApi>;
|
|
527
|
+
export declare function getDocuments(baseUrl: URL, authStrategy: AuthStrategy, queryString: string, limit?: number, cursor?: string): Promise<GetsDocumentApi>;
|
|
528
|
+
export declare function searchFullTextDocuments(baseUrl: URL, authStrategy: AuthStrategy, repository: string, queryString: string): Promise<DocumentFullTextSearchApi>;
|
|
546
529
|
export declare function makeSearchFullTextDocumentsQueryString(args: {
|
|
547
530
|
searchTerm?: string;
|
|
548
531
|
tags?: string[];
|
|
@@ -596,7 +579,7 @@ export declare function getDocumentsByReleaseId(baseUrl: URL, authStrategy: Auth
|
|
|
596
579
|
}[];
|
|
597
580
|
cursor?: string | undefined;
|
|
598
581
|
}>;
|
|
599
|
-
export declare function
|
|
582
|
+
export declare function getDocumentsById(baseUrl: URL, authStrategy: AuthStrategy, ids: string[]): Promise<GetsDocumentApi>;
|
|
600
583
|
export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDef, unknown>, {
|
|
601
584
|
[x: string]: import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
602
585
|
type: string;
|
|
@@ -17,7 +17,15 @@ declare const repositoryAuthor: z.ZodObject<{
|
|
|
17
17
|
lastname?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export type RepositoryAuthor = z.TypeOf<typeof repositoryAuthor>;
|
|
20
|
-
declare const
|
|
20
|
+
declare const repositoryQuotas: z.ZodObject<{
|
|
21
|
+
slicemachineEnabled: z.ZodBoolean;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
slicemachineEnabled: boolean;
|
|
24
|
+
}, {
|
|
25
|
+
slicemachineEnabled: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
export type RepositoryQuotas = z.TypeOf<typeof repositoryQuotas>;
|
|
28
|
+
declare const repositorySchema: z.ZodEffects<z.ZodObject<{
|
|
21
29
|
simulator_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
30
|
languages: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
23
31
|
id: z.ZodString;
|
|
@@ -56,6 +64,13 @@ declare const repositoryOkType: z.ZodEffects<z.ZodObject<{
|
|
|
56
64
|
firstname?: string | undefined;
|
|
57
65
|
lastname?: string | undefined;
|
|
58
66
|
}>, "many">>>;
|
|
67
|
+
quotas: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
68
|
+
slicemachineEnabled: z.ZodBoolean;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
slicemachineEnabled: boolean;
|
|
71
|
+
}, {
|
|
72
|
+
slicemachineEnabled: boolean;
|
|
73
|
+
}>>>;
|
|
59
74
|
}, "strip", z.ZodTypeAny, {
|
|
60
75
|
authors: {
|
|
61
76
|
id: string;
|
|
@@ -68,6 +83,9 @@ declare const repositoryOkType: z.ZodEffects<z.ZodObject<{
|
|
|
68
83
|
name: string;
|
|
69
84
|
is_master?: boolean | undefined;
|
|
70
85
|
}[];
|
|
86
|
+
quotas: {
|
|
87
|
+
slicemachineEnabled: boolean;
|
|
88
|
+
};
|
|
71
89
|
simulator_url?: string | null | undefined;
|
|
72
90
|
}, {
|
|
73
91
|
languages: {
|
|
@@ -82,6 +100,9 @@ declare const repositoryOkType: z.ZodEffects<z.ZodObject<{
|
|
|
82
100
|
firstname?: string | undefined;
|
|
83
101
|
lastname?: string | undefined;
|
|
84
102
|
}[] | undefined;
|
|
103
|
+
quotas?: {
|
|
104
|
+
slicemachineEnabled: boolean;
|
|
105
|
+
} | undefined;
|
|
85
106
|
}>, {
|
|
86
107
|
simulatorUrl: string | undefined;
|
|
87
108
|
authors: {
|
|
@@ -95,6 +116,9 @@ declare const repositoryOkType: z.ZodEffects<z.ZodObject<{
|
|
|
95
116
|
name: string;
|
|
96
117
|
is_master?: boolean | undefined;
|
|
97
118
|
}[];
|
|
119
|
+
quotas: {
|
|
120
|
+
slicemachineEnabled: boolean;
|
|
121
|
+
};
|
|
98
122
|
}, {
|
|
99
123
|
languages: {
|
|
100
124
|
id: string;
|
|
@@ -108,8 +132,11 @@ declare const repositoryOkType: z.ZodEffects<z.ZodObject<{
|
|
|
108
132
|
firstname?: string | undefined;
|
|
109
133
|
lastname?: string | undefined;
|
|
110
134
|
}[] | undefined;
|
|
135
|
+
quotas?: {
|
|
136
|
+
slicemachineEnabled: boolean;
|
|
137
|
+
} | undefined;
|
|
111
138
|
}>;
|
|
112
|
-
export type Repository = z.TypeOf<typeof
|
|
139
|
+
export type Repository = z.TypeOf<typeof repositorySchema>;
|
|
113
140
|
export declare function getRepository(baseUrl: URL, authStrategy: AuthStrategy): Promise<Repository>;
|
|
114
141
|
export declare function isValidSimulatorURL(urlString: string): boolean;
|
|
115
142
|
declare const repositoryTagsResponse: z.ZodObject<{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { MediaAssetOrExternalImage } from "../../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
3
2
|
interface EmptyCardContentProps {
|
|
3
|
+
fieldLabel: string;
|
|
4
4
|
isUpdating: boolean;
|
|
5
5
|
readOnly: boolean;
|
|
6
|
-
|
|
6
|
+
onMediaDialogOpenChange: (open: boolean) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function EmptyCardContent(props: EmptyCardContentProps): JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
2
|
import type { MediaAssetOrExternalImage } from "../../../core/MediaLibrary/hooks/mediaLibraryData";
|
|
4
|
-
import { type CroppedImages } from "../CropperDialog";
|
|
5
3
|
interface ImageFieldCardProps {
|
|
6
|
-
|
|
4
|
+
isMediaDialogOpen: boolean;
|
|
7
5
|
selected?: boolean;
|
|
8
|
-
|
|
9
|
-
readOnly: boolean;
|
|
10
|
-
imageLabel: string[];
|
|
6
|
+
onMediaDialogOpenChange: (open: boolean) => void;
|
|
11
7
|
onMediaSelected: (media: MediaAssetOrExternalImage) => void;
|
|
12
|
-
initialImages: CropperImage[];
|
|
13
|
-
initialOption?: number;
|
|
14
|
-
onCropperDialogClose: (result: {
|
|
15
|
-
croppedImages: CroppedImages;
|
|
16
|
-
option: number;
|
|
17
|
-
}) => void;
|
|
18
|
-
onClear: () => void;
|
|
19
8
|
children: ReactNode;
|
|
20
9
|
}
|
|
21
10
|
export declare function ImageFieldCard(props: ImageFieldCardProps): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type CropperImage } from "../../../core/imageUtils";
|
|
3
|
+
import { type CroppedImages } from "../CropperDialog";
|
|
4
|
+
interface ImageFieldHeaderProps {
|
|
5
|
+
fieldLabel: string;
|
|
6
|
+
imageLabel: string[];
|
|
7
|
+
initialImages: CropperImage[];
|
|
8
|
+
page: number;
|
|
9
|
+
displaySeparator?: boolean;
|
|
10
|
+
isSVGContentView: boolean;
|
|
11
|
+
visibility: "visible" | "hidden";
|
|
12
|
+
onClear: () => void;
|
|
13
|
+
onCropperDialogClose: (result: {
|
|
14
|
+
croppedImages: CroppedImages;
|
|
15
|
+
option: number;
|
|
16
|
+
}) => void;
|
|
17
|
+
onMediaDialogOpenChange: (open: boolean) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function ImageFieldHeader(props: ImageFieldHeaderProps): JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ImageBlockData } from "../../../core/imageUtils";
|
|
3
|
+
type LinkTo = ImageBlockData["linkTo"];
|
|
4
|
+
interface ImageLinkControlProps {
|
|
5
|
+
linkTo: LinkTo;
|
|
6
|
+
onLinkToChange: (linkTo: LinkTo) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ImageLinkControl(props: ImageLinkControlProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type ImageContent, type ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
3
|
+
import { type CropperImage, type ImageBlockData } from "../../../core/imageUtils";
|
|
4
|
+
import { type CroppedImages } from "../CropperDialog";
|
|
5
|
+
interface NonEmptyCardContentProps<ContentType extends ImageContent | ImageBlockData> {
|
|
6
|
+
allContentViews: readonly (ImageContentView | undefined)[];
|
|
7
|
+
content: ContentType;
|
|
8
|
+
contentView: ImageContentView | undefined;
|
|
9
|
+
fieldLabel: string;
|
|
10
|
+
id: string;
|
|
11
|
+
imageLabel: string[];
|
|
12
|
+
initialImages: CropperImage[];
|
|
13
|
+
isUpdating: boolean;
|
|
14
|
+
page?: number;
|
|
15
|
+
readOnly: boolean;
|
|
16
|
+
thumbnailName: string;
|
|
17
|
+
onClear: () => void;
|
|
18
|
+
onContentChange: (content: ContentType | undefined) => void;
|
|
19
|
+
onCropperDialogClose: (result: {
|
|
20
|
+
croppedImages: CroppedImages;
|
|
21
|
+
option: number;
|
|
22
|
+
}) => void;
|
|
23
|
+
onPageChange?: (page: number) => void;
|
|
24
|
+
onMediaDialogOpenChange: (open: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function NonEmptyCardContent<ContentType extends ImageContent | ImageBlockData>(props: NonEmptyCardContentProps<ContentType>): JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
2
|
import type { CropperImage } from "../../../core/imageUtils";
|
|
3
3
|
import { type CroppedImage } from "./croppedImage";
|
|
4
4
|
interface CropperDialogProps {
|
|
@@ -11,6 +11,7 @@ interface CropperDialogProps {
|
|
|
11
11
|
croppedImages: CroppedImages;
|
|
12
12
|
option: number;
|
|
13
13
|
}) => void;
|
|
14
|
+
renderTooltip: (trigger: ReactNode) => ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export declare function CropperDialog(props: CropperDialogProps): JSX.Element;
|
|
16
17
|
export type CroppedImages = Record<string, CroppedImage>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ImageContent, type ImageContentView } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type ImageBlockData } from "../../../core/imageUtils";
|
|
4
4
|
export interface Point {
|
|
@@ -30,63 +30,13 @@ export interface CroppedImage {
|
|
|
30
30
|
/** Final (user defined via H input) height of the image */
|
|
31
31
|
height: number;
|
|
32
32
|
}
|
|
33
|
-
interface UpdateImageArgs {
|
|
33
|
+
interface UpdateImageArgs<ContentType extends ImageContent | ImageBlockData> {
|
|
34
34
|
field: Image;
|
|
35
|
-
content:
|
|
35
|
+
content: ContentType;
|
|
36
36
|
thumbnail: string;
|
|
37
37
|
croppedImage: CroppedImage;
|
|
38
38
|
}
|
|
39
|
-
export declare function updateImage(args: UpdateImageArgs):
|
|
40
|
-
origin: {
|
|
41
|
-
id: string;
|
|
42
|
-
url: string;
|
|
43
|
-
width: number;
|
|
44
|
-
height: number;
|
|
45
|
-
};
|
|
46
|
-
width: number;
|
|
47
|
-
height: number;
|
|
48
|
-
edit: {
|
|
49
|
-
zoom: number;
|
|
50
|
-
crop: {
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
};
|
|
54
|
-
background: string;
|
|
55
|
-
};
|
|
56
|
-
} & {
|
|
57
|
-
url?: string | undefined;
|
|
58
|
-
credits?: string | null | undefined;
|
|
59
|
-
alt?: string | null | undefined;
|
|
60
|
-
provider?: string | null | undefined;
|
|
61
|
-
} & {
|
|
62
|
-
thumbnails?: {
|
|
63
|
-
[x: string]: {
|
|
64
|
-
origin: {
|
|
65
|
-
id: string;
|
|
66
|
-
url: string;
|
|
67
|
-
width: number;
|
|
68
|
-
height: number;
|
|
69
|
-
};
|
|
70
|
-
width: number;
|
|
71
|
-
height: number;
|
|
72
|
-
edit: {
|
|
73
|
-
zoom: number;
|
|
74
|
-
crop: {
|
|
75
|
-
x: number;
|
|
76
|
-
y: number;
|
|
77
|
-
};
|
|
78
|
-
background: string;
|
|
79
|
-
};
|
|
80
|
-
} & {
|
|
81
|
-
url?: string | undefined;
|
|
82
|
-
credits?: string | null | undefined;
|
|
83
|
-
alt?: string | null | undefined;
|
|
84
|
-
provider?: string | null | undefined;
|
|
85
|
-
};
|
|
86
|
-
} | undefined;
|
|
87
|
-
} & {
|
|
88
|
-
__TYPE__: "ImageContent";
|
|
89
|
-
};
|
|
39
|
+
export declare function updateImage<ContentType extends ImageContent | ImageBlockData>(args: UpdateImageArgs<ContentType>): ContentType;
|
|
90
40
|
interface UpdateImageMainThumbnailArgs<T> {
|
|
91
41
|
content: T;
|
|
92
42
|
croppedImage: CroppedImage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
-
interface ImageFieldProps {
|
|
4
|
+
export interface ImageFieldProps {
|
|
5
5
|
content: ImageContent | undefined;
|
|
6
6
|
field: Image;
|
|
7
7
|
id: string;
|
|
@@ -9,4 +9,3 @@ interface ImageFieldProps {
|
|
|
9
9
|
readOnly: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare function ImageField(props: ImageFieldProps): JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -40,17 +40,7 @@ export declare function useDocuments(params: {
|
|
|
40
40
|
})[];
|
|
41
41
|
}[];
|
|
42
42
|
response: {
|
|
43
|
-
total: number;
|
|
44
43
|
results: {
|
|
45
|
-
id: string;
|
|
46
|
-
title: string;
|
|
47
|
-
custom_type_id: string;
|
|
48
|
-
group_lang_id: string;
|
|
49
|
-
language: {
|
|
50
|
-
id: string;
|
|
51
|
-
name: string;
|
|
52
|
-
is_master?: boolean | undefined;
|
|
53
|
-
};
|
|
54
44
|
versions: (({
|
|
55
45
|
status: "unclassified";
|
|
56
46
|
} | {
|
|
@@ -74,7 +64,15 @@ export declare function useDocuments(params: {
|
|
|
74
64
|
preview_image?: string | undefined;
|
|
75
65
|
uid?: string | undefined;
|
|
76
66
|
})[];
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
custom_type_id: string;
|
|
70
|
+
group_lang_id: string;
|
|
71
|
+
language: {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
is_master?: boolean | undefined;
|
|
75
|
+
};
|
|
77
76
|
}[];
|
|
78
|
-
cursor?: string | undefined;
|
|
79
77
|
};
|
|
80
78
|
};
|