@prismicio/editor-fields 0.4.58 → 0.4.59-alpha.xru-link-variant-link-style.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.
Files changed (37) hide show
  1. package/dist/DocumentEditor.d.ts +2 -0
  2. package/dist/EditorConfig.d.ts +16 -1
  3. package/dist/SectionEditor.d.ts +5 -1
  4. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +53 -53
  5. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  6. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +5 -5
  7. package/dist/core/OnboardingGuide/components/OnboardingTutorial.d.ts +2 -0
  8. package/dist/core/SeoMetadata/components/MetadataBadge.d.ts +8 -0
  9. package/dist/core/SeoMetadata/components/MetadataPreview.d.ts +7 -0
  10. package/dist/core/SeoMetadata/index.d.ts +2 -0
  11. package/dist/core/document.d.ts +2 -6
  12. package/dist/core/service/aiSeoMetadata.d.ts +30 -0
  13. package/dist/core/service/customType.d.ts +15 -8
  14. package/dist/core/service/document.d.ts +230 -98
  15. package/dist/core/service/documentSearch.d.ts +34 -34
  16. package/dist/core/service/index.d.ts +1 -0
  17. package/dist/core/service/onboarding.d.ts +3 -0
  18. package/dist/core/service/repository.d.ts +6 -6
  19. package/dist/core/service/role.d.ts +18 -10
  20. package/dist/core/service/user.d.ts +1 -1
  21. package/dist/fields/KeyTextField.d.ts +3 -1
  22. package/dist/fields/LinkField/Documents/documentsData.d.ts +10 -10
  23. package/dist/fields/LinkField/LinkField.d.ts +4 -3
  24. package/dist/fields/LinkField/LinkFieldActions.d.ts +3 -0
  25. package/dist/fields/LinkField/RepeatableLinkField/useRepeatableLinkField.d.ts +8 -1
  26. package/dist/fields/LinkField/WebLinks/WebLinkModal.d.ts +5 -2
  27. package/dist/fields/LinkField/useLinkField.d.ts +7 -2
  28. package/dist/fields/MetadataTextField.d.ts +18 -0
  29. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  30. package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
  31. package/dist/index.cjs.js +92 -39
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.es.js +28759 -21920
  34. package/dist/slices/utils.d.ts +14 -2
  35. package/dist/zones/StaticZoneEditor.d.ts +6 -0
  36. package/package.json +6 -5
  37. package/dist/core/service/teamSpace.d.ts +0 -48
@@ -29,13 +29,13 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
29
29
  results: {
30
30
  id: string;
31
31
  title: string;
32
+ custom_type_id: string;
33
+ group_lang_id: string;
32
34
  language: {
33
35
  isMaster?: boolean | undefined;
34
36
  id: string;
35
37
  label: string;
36
38
  };
37
- custom_type_id: string;
38
- group_lang_id: string;
39
39
  versions: (({
40
40
  status: "unclassified";
41
41
  } | {
@@ -47,15 +47,15 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
47
47
  status: "archived";
48
48
  }) & {
49
49
  tags: string[];
50
+ version_id: string;
51
+ last_modified_date: Date;
52
+ custom_type_label: string;
50
53
  author: {
51
54
  first_name?: string | undefined;
52
55
  last_name?: string | undefined;
53
56
  email?: string | undefined;
54
57
  uploadedAvatar?: string | undefined;
55
58
  };
56
- version_id: string;
57
- last_modified_date: Date;
58
- custom_type_label: string;
59
59
  preview_image?: string | undefined;
60
60
  uid?: string | undefined;
61
61
  preview_summary?: string | undefined;
@@ -81,15 +81,15 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
81
81
  tags: string[];
82
82
  version_id: string;
83
83
  last_modified_date: Date;
84
- summary?: string | undefined;
85
84
  preview_image?: string | undefined;
86
85
  uid?: string | undefined;
87
86
  custom_type_id?: string | undefined;
87
+ summary?: string | undefined;
88
88
  author_ids?: string[] | undefined;
89
89
  })[];
90
90
  }[];
91
91
  }>;
92
- interface searchDocumentsQueryOptionsArgs {
92
+ interface SearchDocumentsQueryOptionsArgs {
93
93
  searchTerm?: string;
94
94
  customTypes?: string[];
95
95
  tags?: string[];
@@ -108,17 +108,17 @@ interface searchDocumentsQueryOptionsArgs {
108
108
  timeToGetResultsInMs: number;
109
109
  }) => void;
110
110
  }
111
- export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
111
+ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
112
112
  results: {
113
113
  id: string;
114
114
  title: string;
115
+ custom_type_id: string;
116
+ group_lang_id: string;
115
117
  language: {
116
118
  isMaster?: boolean | undefined;
117
119
  id: string;
118
120
  label: string;
119
121
  };
120
- custom_type_id: string;
121
- group_lang_id: string;
122
122
  versions: (({
123
123
  status: "unclassified";
124
124
  } | {
@@ -130,15 +130,15 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
130
130
  status: "archived";
131
131
  }) & {
132
132
  tags: string[];
133
+ version_id: string;
134
+ last_modified_date: Date;
135
+ custom_type_label: string;
133
136
  author: {
134
137
  first_name?: string | undefined;
135
138
  last_name?: string | undefined;
136
139
  email?: string | undefined;
137
140
  uploadedAvatar?: string | undefined;
138
141
  };
139
- version_id: string;
140
- last_modified_date: Date;
141
- custom_type_label: string;
142
142
  preview_image?: string | undefined;
143
143
  uid?: string | undefined;
144
144
  preview_summary?: string | undefined;
@@ -164,10 +164,10 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
164
164
  tags: string[];
165
165
  version_id: string;
166
166
  last_modified_date: Date;
167
- summary?: string | undefined;
168
167
  preview_image?: string | undefined;
169
168
  uid?: string | undefined;
170
169
  custom_type_id?: string | undefined;
170
+ summary?: string | undefined;
171
171
  author_ids?: string[] | undefined;
172
172
  })[];
173
173
  }[];
@@ -175,13 +175,13 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
175
175
  results: {
176
176
  id: string;
177
177
  title: string;
178
+ custom_type_id: string;
179
+ group_lang_id: string;
178
180
  language: {
179
181
  isMaster?: boolean | undefined;
180
182
  id: string;
181
183
  label: string;
182
184
  };
183
- custom_type_id: string;
184
- group_lang_id: string;
185
185
  versions: (({
186
186
  status: "unclassified";
187
187
  } | {
@@ -193,15 +193,15 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
193
193
  status: "archived";
194
194
  }) & {
195
195
  tags: string[];
196
+ version_id: string;
197
+ last_modified_date: Date;
198
+ custom_type_label: string;
196
199
  author: {
197
200
  first_name?: string | undefined;
198
201
  last_name?: string | undefined;
199
202
  email?: string | undefined;
200
203
  uploadedAvatar?: string | undefined;
201
204
  };
202
- version_id: string;
203
- last_modified_date: Date;
204
- custom_type_label: string;
205
205
  preview_image?: string | undefined;
206
206
  uid?: string | undefined;
207
207
  preview_summary?: string | undefined;
@@ -227,10 +227,10 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
227
227
  tags: string[];
228
228
  version_id: string;
229
229
  last_modified_date: Date;
230
- summary?: string | undefined;
231
230
  preview_image?: string | undefined;
232
231
  uid?: string | undefined;
233
232
  custom_type_id?: string | undefined;
233
+ summary?: string | undefined;
234
234
  author_ids?: string[] | undefined;
235
235
  })[];
236
236
  }[];
@@ -243,7 +243,7 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
243
243
  readonly customTypes: string[] | undefined;
244
244
  readonly tags: string[] | undefined;
245
245
  readonly authors: string[] | undefined;
246
- readonly status: ("published" | "release" | "archived" | "unclassified")[] | undefined;
246
+ readonly status: ("unclassified" | "published" | "release" | "archived")[] | undefined;
247
247
  readonly locale: string | undefined;
248
248
  readonly searchDocumentsWithInterestingVersions: boolean;
249
249
  readonly track: ((args: {
@@ -261,13 +261,13 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
261
261
  results: {
262
262
  id: string;
263
263
  title: string;
264
+ custom_type_id: string;
265
+ group_lang_id: string;
264
266
  language: {
265
267
  isMaster?: boolean | undefined;
266
268
  id: string;
267
269
  label: string;
268
270
  };
269
- custom_type_id: string;
270
- group_lang_id: string;
271
271
  versions: (({
272
272
  status: "unclassified";
273
273
  } | {
@@ -279,15 +279,15 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
279
279
  status: "archived";
280
280
  }) & {
281
281
  tags: string[];
282
+ version_id: string;
283
+ last_modified_date: Date;
284
+ custom_type_label: string;
282
285
  author: {
283
286
  first_name?: string | undefined;
284
287
  last_name?: string | undefined;
285
288
  email?: string | undefined;
286
289
  uploadedAvatar?: string | undefined;
287
290
  };
288
- version_id: string;
289
- last_modified_date: Date;
290
- custom_type_label: string;
291
291
  preview_image?: string | undefined;
292
292
  uid?: string | undefined;
293
293
  preview_summary?: string | undefined;
@@ -313,10 +313,10 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
313
313
  tags: string[];
314
314
  version_id: string;
315
315
  last_modified_date: Date;
316
- summary?: string | undefined;
317
316
  preview_image?: string | undefined;
318
317
  uid?: string | undefined;
319
318
  custom_type_id?: string | undefined;
319
+ summary?: string | undefined;
320
320
  author_ids?: string[] | undefined;
321
321
  })[];
322
322
  }[];
@@ -331,7 +331,7 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
331
331
  readonly customTypes: string[] | undefined;
332
332
  readonly tags: string[] | undefined;
333
333
  readonly authors: string[] | undefined;
334
- readonly status: ("published" | "release" | "archived" | "unclassified")[] | undefined;
334
+ readonly status: ("unclassified" | "published" | "release" | "archived")[] | undefined;
335
335
  readonly locale: string | undefined;
336
336
  readonly searchDocumentsWithInterestingVersions: boolean;
337
337
  readonly track: ((args: {
@@ -348,13 +348,13 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
348
348
  results: {
349
349
  id: string;
350
350
  title: string;
351
+ custom_type_id: string;
352
+ group_lang_id: string;
351
353
  language: {
352
354
  isMaster?: boolean | undefined;
353
355
  id: string;
354
356
  label: string;
355
357
  };
356
- custom_type_id: string;
357
- group_lang_id: string;
358
358
  versions: (({
359
359
  status: "unclassified";
360
360
  } | {
@@ -366,15 +366,15 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
366
366
  status: "archived";
367
367
  }) & {
368
368
  tags: string[];
369
+ version_id: string;
370
+ last_modified_date: Date;
371
+ custom_type_label: string;
369
372
  author: {
370
373
  first_name?: string | undefined;
371
374
  last_name?: string | undefined;
372
375
  email?: string | undefined;
373
376
  uploadedAvatar?: string | undefined;
374
377
  };
375
- version_id: string;
376
- last_modified_date: Date;
377
- custom_type_label: string;
378
378
  preview_image?: string | undefined;
379
379
  uid?: string | undefined;
380
380
  preview_summary?: string | undefined;
@@ -400,10 +400,10 @@ export declare function searchDocumentsQueryOptions(args: searchDocumentsQueryOp
400
400
  tags: string[];
401
401
  version_id: string;
402
402
  last_modified_date: Date;
403
- summary?: string | undefined;
404
403
  preview_image?: string | undefined;
405
404
  uid?: string | undefined;
406
405
  custom_type_id?: string | undefined;
406
+ summary?: string | undefined;
407
407
  author_ids?: string[] | undefined;
408
408
  })[];
409
409
  }[];
@@ -1,3 +1,4 @@
1
+ export * from "./aiSeoMetadata";
1
2
  export * from "./customType";
2
3
  export * from "./document";
3
4
  export * from "./documentSearch";
@@ -74,6 +74,9 @@ export type OnboardingTrackEvent = {
74
74
  } | {
75
75
  event: "shared-onboarding:completed";
76
76
  source: OnboardingTrackSource;
77
+ } | {
78
+ event: "shared-onboarding:follow-tutorial";
79
+ source: OnboardingTrackSource;
77
80
  };
78
81
  export interface OnboardingTracking {
79
82
  track: (args: OnboardingTrackEvent) => void | Promise<void>;
@@ -37,28 +37,28 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
37
37
  name: z.ZodString;
38
38
  is_master: z.ZodOptional<z.ZodBoolean>;
39
39
  }, "strip", z.ZodTypeAny, {
40
- id: string;
41
40
  name: string;
41
+ id: string;
42
42
  is_master?: boolean | undefined;
43
43
  }, {
44
- id: string;
45
44
  name: string;
45
+ id: string;
46
46
  is_master?: boolean | undefined;
47
47
  }>, {
48
48
  isMaster?: boolean | undefined;
49
49
  id: string;
50
50
  label: string;
51
51
  }, {
52
- id: string;
53
52
  name: string;
53
+ id: string;
54
54
  is_master?: boolean | undefined;
55
55
  }>, "many">, {
56
56
  isMaster?: boolean | undefined;
57
57
  id: string;
58
58
  label: string;
59
59
  }[], {
60
- id: string;
61
60
  name: string;
61
+ id: string;
62
62
  is_master?: boolean | undefined;
63
63
  }[]>;
64
64
  authors: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -126,8 +126,8 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
126
126
  starterId?: string | undefined;
127
127
  }, {
128
128
  languages: {
129
- id: string;
130
129
  name: string;
130
+ id: string;
131
131
  is_master?: boolean | undefined;
132
132
  }[];
133
133
  storageVersion: {
@@ -175,8 +175,8 @@ declare const repositorySchema: z.ZodEffects<z.ZodObject<{
175
175
  starterId?: string | undefined;
176
176
  }, {
177
177
  languages: {
178
- id: string;
179
178
  name: string;
179
+ id: string;
180
180
  is_master?: boolean | undefined;
181
181
  }[];
182
182
  storageVersion: {
@@ -13,14 +13,14 @@ export declare const TeamSpace: z.ZodObject<{
13
13
  rolesPerLocale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
14
14
  rolesPerLocaleByUser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- id: string;
17
16
  name: string;
17
+ id: string;
18
18
  customTypes: string[];
19
19
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
20
20
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
21
21
  }, {
22
- id: string;
23
22
  name: string;
23
+ id: string;
24
24
  customTypes: string[];
25
25
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
26
26
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
@@ -51,30 +51,30 @@ declare const TeamSpacesResponse: z.ZodObject<{
51
51
  rolesPerLocale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>;
52
52
  rolesPerLocaleByUser: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodEnum<["Manager", "Writer", "Readonly"]>>>>;
53
53
  }, "strip", z.ZodTypeAny, {
54
- id: string;
55
54
  name: string;
55
+ id: string;
56
56
  customTypes: string[];
57
57
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
58
58
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
59
59
  }, {
60
- id: string;
61
60
  name: string;
61
+ id: string;
62
62
  customTypes: string[];
63
63
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
64
64
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
65
65
  }>, "many">;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  results: {
68
- id: string;
69
68
  name: string;
69
+ id: string;
70
70
  customTypes: string[];
71
71
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
72
72
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
73
73
  }[];
74
74
  }, {
75
75
  results: {
76
- id: string;
77
76
  name: string;
77
+ id: string;
78
78
  customTypes: string[];
79
79
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
80
80
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
@@ -90,23 +90,23 @@ interface GetTeamSpacesArgs {
90
90
  export declare function getTeamSpaces(args: GetTeamSpacesArgs): Promise<TeamSpacesResponse>;
91
91
  export declare function getTeamSpacesOptions(args: GetTeamSpacesArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
92
92
  results: {
93
- id: string;
94
93
  name: string;
94
+ id: string;
95
95
  customTypes: string[];
96
96
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
97
97
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
98
98
  }[];
99
99
  }, Error, {
100
- id: string;
101
100
  name: string;
101
+ id: string;
102
102
  customTypes: string[];
103
103
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
104
104
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
105
105
  }[], string[]> & {
106
106
  initialData?: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").L<{
107
107
  results: {
108
- id: string;
109
108
  name: string;
109
+ id: string;
110
110
  customTypes: string[];
111
111
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
112
112
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
@@ -115,14 +115,15 @@ export declare function getTeamSpacesOptions(args: GetTeamSpacesArgs): import("@
115
115
  } & {
116
116
  queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<string[], {
117
117
  results: {
118
- id: string;
119
118
  name: string;
119
+ id: string;
120
120
  customTypes: string[];
121
121
  rolesPerLocale?: Record<string, "Manager" | "Writer" | "Readonly"> | undefined;
122
122
  rolesPerLocaleByUser?: Record<string, Record<string, "Manager" | "Writer" | "Readonly">> | undefined;
123
123
  }[];
124
124
  }>;
125
125
  };
126
+ export declare function useInvalidateTeamSpaces(): () => Promise<void>;
126
127
  interface CreateTeamSpaceArgs {
127
128
  baseUrl: URL;
128
129
  repository: string;
@@ -138,4 +139,11 @@ interface UpdateTeamSpaceArgs {
138
139
  teamSpaceId: string;
139
140
  }
140
141
  export declare function updateTeamSpace(args: UpdateTeamSpaceArgs): Promise<TeamSpace>;
142
+ interface DeleteTeamSpaceArgs {
143
+ baseUrl: URL;
144
+ repository: string;
145
+ authStrategy: AuthStrategy;
146
+ teamSpaceId: string;
147
+ }
148
+ export declare function deleteTeamSpace(args: DeleteTeamSpaceArgs): Promise<unknown>;
141
149
  export {};
@@ -9,7 +9,7 @@ export declare const roleMap: {
9
9
  readonly Writer: "Writer";
10
10
  readonly Readonly: "Contributor";
11
11
  };
12
- export type Role = typeof roleMap[keyof typeof roleMap];
12
+ export type Role = (typeof roleMap)[keyof typeof roleMap];
13
13
  export type RepositoryRole = z.TypeOf<typeof repositoryRole>;
14
14
  export declare const profileResponse: z.ZodObject<{
15
15
  shortId: z.ZodString;
@@ -1,12 +1,14 @@
1
- /// <reference types="react" />
2
1
  import type { TextContent } from "@prismicio/types-internal/lib/content";
3
2
  import type { Text } from "@prismicio/types-internal/lib/customtypes";
3
+ import type { ReactNode } from "react";
4
4
  interface Props {
5
5
  content: TextContent | undefined;
6
6
  field: Text;
7
7
  id: string;
8
8
  onContentChange: (content: TextContent | undefined) => void;
9
9
  readOnly: boolean;
10
+ endAdornment?: ReactNode;
11
+ placeholder?: string;
10
12
  }
11
13
  export declare function KeyTextField(props: Props): JSX.Element;
12
14
  export {};
@@ -17,15 +17,15 @@ export declare function useDocuments(params: {
17
17
  status: "archived";
18
18
  }) & {
19
19
  tags: string[];
20
+ version_id: string;
21
+ last_modified_date: Date;
22
+ custom_type_label: string;
20
23
  author: {
21
24
  first_name?: string | undefined;
22
25
  last_name?: string | undefined;
23
26
  email?: string | undefined;
24
27
  uploadedAvatar?: string | undefined;
25
28
  };
26
- version_id: string;
27
- last_modified_date: Date;
28
- custom_type_label: string;
29
29
  preview_image?: string | undefined;
30
30
  uid?: string | undefined;
31
31
  preview_summary?: string | undefined;
@@ -42,21 +42,21 @@ export declare function useDocuments(params: {
42
42
  tags: string[];
43
43
  version_id: string;
44
44
  last_modified_date: Date;
45
- summary?: string | undefined;
46
45
  preview_image?: string | undefined;
47
46
  uid?: string | undefined;
48
47
  custom_type_id?: string | undefined;
48
+ summary?: string | undefined;
49
49
  author_ids?: string[] | undefined;
50
50
  }))[];
51
51
  id: string;
52
52
  title: string;
53
+ custom_type_id: string;
54
+ group_lang_id: string;
53
55
  language: {
54
56
  isMaster?: boolean | undefined;
55
57
  id: string;
56
58
  label: string;
57
59
  };
58
- custom_type_id: string;
59
- group_lang_id: string;
60
60
  } | {
61
61
  versions: ((({
62
62
  status: "unclassified";
@@ -69,15 +69,15 @@ export declare function useDocuments(params: {
69
69
  status: "archived";
70
70
  }) & {
71
71
  tags: string[];
72
+ version_id: string;
73
+ last_modified_date: Date;
74
+ custom_type_label: string;
72
75
  author: {
73
76
  first_name?: string | undefined;
74
77
  last_name?: string | undefined;
75
78
  email?: string | undefined;
76
79
  uploadedAvatar?: string | undefined;
77
80
  };
78
- version_id: string;
79
- last_modified_date: Date;
80
- custom_type_label: string;
81
81
  preview_image?: string | undefined;
82
82
  uid?: string | undefined;
83
83
  preview_summary?: string | undefined;
@@ -94,10 +94,10 @@ export declare function useDocuments(params: {
94
94
  tags: string[];
95
95
  version_id: string;
96
96
  last_modified_date: Date;
97
- summary?: string | undefined;
98
97
  preview_image?: string | undefined;
99
98
  uid?: string | undefined;
100
99
  custom_type_id?: string | undefined;
100
+ summary?: string | undefined;
101
101
  author_ids?: string[] | undefined;
102
102
  }))[];
103
103
  id: string;
@@ -2,13 +2,14 @@
2
2
  import { FilledLinkContent, type LinkContent } from "@prismicio/types-internal/lib/content";
3
3
  import type { Link } from "@prismicio/types-internal/lib/customtypes";
4
4
  import { type FieldSelectType } from "./LinkFieldActions";
5
- type LinkFieldVariant = "normal" | "compact" | "condensedButtons";
5
+ type LinkFieldAppearance = "normal" | "compact" | "condensedButtons";
6
6
  interface LinkFieldProps {
7
7
  id?: string;
8
8
  field: Link;
9
9
  content: LinkContent | undefined;
10
10
  onContentChange: (content: LinkContent | undefined) => void;
11
- variant?: LinkFieldVariant;
11
+ appearance?: LinkFieldAppearance;
12
+ backgroundColor?: "transparent" | "grey1";
12
13
  }
13
14
  export declare function LinkField(props: LinkFieldProps): JSX.Element;
14
15
  interface GetFieldIconArgs {
@@ -18,7 +19,7 @@ interface GetFieldIconArgs {
18
19
  export declare function getFieldIcon(args: GetFieldIconArgs): "image" | "description" | "link" | "notes" | "public";
19
20
  interface FilledLinkFieldProps {
20
21
  id?: string;
21
- variant?: LinkFieldVariant;
22
+ appearance?: LinkFieldAppearance;
22
23
  field: Link & {
23
24
  config?: {
24
25
  allowText?: false;
@@ -12,6 +12,9 @@ interface Props {
12
12
  condensedButtons?: boolean;
13
13
  showNewTabButton?: boolean;
14
14
  displayTextEnabled: boolean;
15
+ variants: string[];
16
+ variant?: string;
17
+ onVariantChange: (newVariant: string) => void;
15
18
  }
16
19
  export declare function LinkFieldActions(props: Props): JSX.Element;
17
20
  export {};
@@ -26,6 +26,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
26
26
  kind: "image";
27
27
  }) & {
28
28
  text?: string | undefined;
29
+ variant?: string | undefined;
29
30
  })) | ({
30
31
  __TYPE__: "FileLink";
31
32
  } & ((({
@@ -40,6 +41,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
40
41
  kind: "file";
41
42
  }) & {
42
43
  text?: string | undefined;
44
+ variant?: string | undefined;
43
45
  })) | ({
44
46
  __TYPE__: "DocumentLink";
45
47
  } & (({
@@ -48,6 +50,7 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
48
50
  kind: "document";
49
51
  }) & {
50
52
  text?: string | undefined;
53
+ variant?: string | undefined;
51
54
  })) | ({
52
55
  __TYPE__: "ExternalLink";
53
56
  } & ((({
@@ -62,22 +65,26 @@ export declare function useRepeatableLinkField(props: UseRepeatableLinkFieldProp
62
65
  kind: "web";
63
66
  }) & {
64
67
  text?: string | undefined;
68
+ variant?: string | undefined;
65
69
  })) | ({
66
70
  __TYPE__: "MediaLink";
67
71
  } & {
68
72
  kind: "media";
69
73
  } & {
70
74
  text?: string | undefined;
75
+ variant?: string | undefined;
71
76
  }) | ({
72
77
  __TYPE__: "AnyLink";
73
78
  } & {
74
79
  kind: "any";
75
80
  } & {
76
81
  text?: string | undefined;
82
+ variant?: string | undefined;
77
83
  });
78
84
  })[];
79
85
  updateLink: (linkContent: LinkContent | undefined, index: number) => void;
80
- addNewLink: () => void;
86
+ updateLinks: (updatedLinks: LinkContent[]) => void;
87
+ addLink: (index: number) => void;
81
88
  deleteLink: (index: number) => void;
82
89
  moveLink: (direction: "up" | "down", index: number) => void;
83
90
  };
@@ -1,11 +1,14 @@
1
1
  /// <reference types="react" />
2
+ export interface WebLinkOptions {
3
+ newTab: boolean;
4
+ }
2
5
  interface WebLinkModalProps {
3
6
  open: boolean;
4
- setOpen: (open: boolean) => void;
7
+ onOpenChange: (open: boolean) => void;
5
8
  url: string;
6
9
  openInNewTab: boolean;
7
10
  showNewTabButton: boolean;
8
- onUpdate: (newUrl: string, newTab: boolean) => void;
11
+ onUpdate: (url: string, options: WebLinkOptions) => void;
9
12
  }
10
13
  export declare function WebLinkModal(props: WebLinkModalProps): JSX.Element;
11
14
  export {};
@@ -11,10 +11,12 @@ interface useLinkFieldParams {
11
11
  }
12
12
  export declare function useLinkField(params: useLinkFieldParams): {
13
13
  contentType: "ImageLink" | "FileLink" | "DocumentLink" | "ExternalLink" | "MediaLink" | "AnyLink" | undefined;
14
- selectType: "document" | "web" | "media" | "any" | undefined;
14
+ selectType: "web" | "document" | "media" | "any" | undefined;
15
15
  fieldValue: string;
16
16
  onDisplayTextChange: (displayText: string) => void;
17
- onValueChange: (value: string, newTab?: boolean) => void;
17
+ onValueChange: (value: string, options?: {
18
+ newTab: boolean;
19
+ }) => void;
18
20
  onTypeChange: (newValue?: FieldSelectType) => void;
19
21
  placeholder: string;
20
22
  isTypeSelectEnabled: boolean;
@@ -25,6 +27,9 @@ export declare function useLinkField(params: useLinkFieldParams): {
25
27
  onMediaSelected: (newMedia: MediaAssetOrExternalImage) => void;
26
28
  displayTextEnabled: boolean;
27
29
  displayText: string;
30
+ variants: string[];
31
+ variant: string | undefined;
32
+ onVariantChange: (newVariant: string) => void;
28
33
  };
29
34
  export declare function useDocumentTitle(id: string): string;
30
35
  interface MapMediaToLinkContentArgs {