@prismicio/editor-fields 0.4.58 → 0.4.59
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/DocumentEditor.d.ts +2 -0
- package/dist/EditorConfig.d.ts +16 -1
- package/dist/SectionEditor.d.ts +5 -1
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +53 -53
- package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +5 -5
- package/dist/core/OnboardingGuide/components/OnboardingTutorial.d.ts +2 -0
- package/dist/core/SeoMetadata/components/MetadataBadge.d.ts +8 -0
- package/dist/core/SeoMetadata/components/MetadataPreview.d.ts +7 -0
- package/dist/core/SeoMetadata/index.d.ts +2 -0
- package/dist/core/document.d.ts +2 -6
- package/dist/core/service/aiSeoMetadata.d.ts +30 -0
- package/dist/core/service/customType.d.ts +15 -8
- package/dist/core/service/document.d.ts +98 -98
- package/dist/core/service/documentSearch.d.ts +34 -34
- package/dist/core/service/index.d.ts +1 -0
- package/dist/core/service/onboarding.d.ts +3 -0
- package/dist/core/service/repository.d.ts +6 -6
- package/dist/core/service/role.d.ts +18 -10
- package/dist/core/service/user.d.ts +1 -1
- package/dist/fields/KeyTextField.d.ts +3 -1
- package/dist/fields/LinkField/Documents/documentsData.d.ts +10 -10
- package/dist/fields/LinkField/LinkField.d.ts +4 -3
- package/dist/fields/LinkField/RepeatableLinkField/useRepeatableLinkField.d.ts +2 -1
- package/dist/fields/LinkField/WebLinks/WebLinkModal.d.ts +5 -2
- package/dist/fields/LinkField/useLinkField.d.ts +4 -2
- package/dist/fields/MetadataTextField.d.ts +18 -0
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
- package/dist/index.cjs.js +92 -39
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +27639 -20872
- package/dist/slices/utils.d.ts +2 -2
- package/dist/zones/StaticZoneEditor.d.ts +6 -0
- package/package.json +5 -4
- package/dist/core/service/teamSpace.d.ts +0 -48
package/dist/DocumentEditor.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ interface Props {
|
|
|
7
7
|
readOnly?: boolean;
|
|
8
8
|
customType: StaticCustomType;
|
|
9
9
|
sectionName: string;
|
|
10
|
+
documentId: string;
|
|
10
11
|
content: Document;
|
|
12
|
+
locale: string;
|
|
11
13
|
onContentChange: (content: Document) => void;
|
|
12
14
|
}
|
|
13
15
|
export declare function DocumentEditor(props: Props): JSX.Element | null;
|
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
3
|
+
import type { MetadataType } from "./core/service";
|
|
3
4
|
export type EditorConfig = {
|
|
4
5
|
baseUrl: URL;
|
|
5
6
|
embedApiEndpoint: URL;
|
|
6
7
|
unsplashApiBaseUrl: URL;
|
|
7
8
|
authStrategy: AuthStrategy;
|
|
8
9
|
} & OptionalConfigs;
|
|
9
|
-
type OptionalConfigs = SearchDocuments & MediaLibrary & UIDField & Analytics & ErrorTracking & IntegrationFields & LayoutConfig & UserService;
|
|
10
|
+
type OptionalConfigs = SearchDocuments & MediaLibrary & UIDField & Analytics & ErrorTracking & IntegrationFields & LayoutConfig & UserService & AISeoMetadata;
|
|
10
11
|
type UserService = {
|
|
11
12
|
userServiceBaseUrl?: URL;
|
|
12
13
|
};
|
|
@@ -48,6 +49,20 @@ type IntegrationFields = {
|
|
|
48
49
|
integrationFieldsApiBaseUrl: URL;
|
|
49
50
|
repository: string;
|
|
50
51
|
};
|
|
52
|
+
type AISeoMetadata = {
|
|
53
|
+
aiSeoMetadataEnabled?: never;
|
|
54
|
+
} | {
|
|
55
|
+
aiSeoMetadataEnabled: boolean;
|
|
56
|
+
awsBedrockAccessKeyId: string;
|
|
57
|
+
awsBedrockSecretAccessKey: string;
|
|
58
|
+
awsBedrockRegion: string;
|
|
59
|
+
trackMetadataGeneration: (args: {
|
|
60
|
+
documentId: string;
|
|
61
|
+
locale: string;
|
|
62
|
+
suggestion: string;
|
|
63
|
+
type: MetadataType;
|
|
64
|
+
}) => void;
|
|
65
|
+
};
|
|
51
66
|
interface LayoutConfig {
|
|
52
67
|
/**
|
|
53
68
|
* Teaches fields about their containing scrolling element.
|
package/dist/SectionEditor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Document } from "@prismicio/types-internal/lib/content";
|
|
3
|
-
import type { StaticSection } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import type { StaticCustomType, StaticSection } from "@prismicio/types-internal/lib/customtypes";
|
|
4
4
|
import type { SliceSelection } from "./SliceSelection";
|
|
5
5
|
interface Props {
|
|
6
6
|
id: string;
|
|
@@ -9,6 +9,10 @@ interface Props {
|
|
|
9
9
|
section: StaticSection;
|
|
10
10
|
content: Document;
|
|
11
11
|
onContentChange: (content: Document) => void;
|
|
12
|
+
documentId: string;
|
|
13
|
+
documentContent: Document;
|
|
14
|
+
documentCustomType: StaticCustomType;
|
|
15
|
+
documentLocale: string;
|
|
12
16
|
}
|
|
13
17
|
export declare function SectionEditor(props: Props): JSX.Element;
|
|
14
18
|
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;
|
|
25
24
|
credits?: string | undefined;
|
|
26
25
|
alt?: string | undefined;
|
|
26
|
+
notes?: string | undefined;
|
|
27
27
|
filename?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
notes?: string[] | undefined;
|
|
30
29
|
credits?: string[] | undefined;
|
|
31
30
|
alt?: string[] | undefined;
|
|
31
|
+
notes?: string[] | undefined;
|
|
32
32
|
filename?: string[] | undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
tags: z.ZodArray<z.ZodObject<{
|
|
@@ -39,74 +39,74 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
39
39
|
last_modified: z.ZodNumber;
|
|
40
40
|
count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
id: string;
|
|
43
42
|
name: string;
|
|
43
|
+
id: string;
|
|
44
44
|
created_at: number;
|
|
45
45
|
last_modified: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
|
-
id: string;
|
|
50
49
|
name: string;
|
|
50
|
+
id: string;
|
|
51
51
|
created_at: number;
|
|
52
52
|
last_modified: number;
|
|
53
53
|
uploader_id?: string | undefined;
|
|
54
54
|
count?: number | undefined;
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
id: string;
|
|
58
57
|
tags: {
|
|
59
|
-
id: string;
|
|
60
58
|
name: string;
|
|
59
|
+
id: string;
|
|
61
60
|
created_at: number;
|
|
62
61
|
last_modified: number;
|
|
63
62
|
count: number;
|
|
64
63
|
uploader_id?: string | undefined;
|
|
65
64
|
}[];
|
|
65
|
+
id: string;
|
|
66
66
|
url: string;
|
|
67
|
-
size: number;
|
|
68
67
|
kind: string;
|
|
68
|
+
size: number;
|
|
69
69
|
last_modified: number;
|
|
70
70
|
filename: string;
|
|
71
|
-
notes?: string | undefined;
|
|
72
71
|
width?: number | undefined;
|
|
73
72
|
height?: number | undefined;
|
|
74
73
|
credits?: string | undefined;
|
|
75
74
|
alt?: string | undefined;
|
|
75
|
+
notes?: string | undefined;
|
|
76
76
|
uploader_id?: string | undefined;
|
|
77
77
|
extension?: string | undefined;
|
|
78
78
|
search_highlight?: {
|
|
79
|
-
notes?: string | undefined;
|
|
80
79
|
credits?: string | undefined;
|
|
81
80
|
alt?: string | undefined;
|
|
81
|
+
notes?: string | undefined;
|
|
82
82
|
filename?: string | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
|
-
id: string;
|
|
86
85
|
tags: {
|
|
87
|
-
id: string;
|
|
88
86
|
name: string;
|
|
87
|
+
id: string;
|
|
89
88
|
created_at: number;
|
|
90
89
|
last_modified: number;
|
|
91
90
|
uploader_id?: string | undefined;
|
|
92
91
|
count?: number | undefined;
|
|
93
92
|
}[];
|
|
93
|
+
id: string;
|
|
94
94
|
url: string;
|
|
95
|
-
size: number;
|
|
96
95
|
kind: string;
|
|
96
|
+
size: number;
|
|
97
97
|
last_modified: number;
|
|
98
98
|
filename: string;
|
|
99
|
-
notes?: string | undefined;
|
|
100
99
|
width?: number | undefined;
|
|
101
100
|
height?: number | undefined;
|
|
102
101
|
credits?: string | undefined;
|
|
103
102
|
alt?: string | undefined;
|
|
103
|
+
notes?: string | undefined;
|
|
104
104
|
uploader_id?: string | undefined;
|
|
105
105
|
extension?: string | undefined;
|
|
106
106
|
search_highlight?: {
|
|
107
|
-
notes?: string[] | undefined;
|
|
108
107
|
credits?: string[] | undefined;
|
|
109
108
|
alt?: string[] | undefined;
|
|
109
|
+
notes?: string[] | undefined;
|
|
110
110
|
filename?: 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;
|
|
140
139
|
credits?: string | undefined;
|
|
141
140
|
alt?: string | undefined;
|
|
141
|
+
notes?: string | undefined;
|
|
142
142
|
filename?: string | undefined;
|
|
143
143
|
}, {
|
|
144
|
-
notes?: string[] | undefined;
|
|
145
144
|
credits?: string[] | undefined;
|
|
146
145
|
alt?: string[] | undefined;
|
|
146
|
+
notes?: string[] | undefined;
|
|
147
147
|
filename?: string[] | undefined;
|
|
148
148
|
}>>;
|
|
149
149
|
tags: z.ZodArray<z.ZodObject<{
|
|
@@ -154,105 +154,105 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
154
154
|
last_modified: z.ZodNumber;
|
|
155
155
|
count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
|
-
id: string;
|
|
158
157
|
name: string;
|
|
158
|
+
id: string;
|
|
159
159
|
created_at: number;
|
|
160
160
|
last_modified: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
|
-
id: string;
|
|
165
164
|
name: string;
|
|
165
|
+
id: string;
|
|
166
166
|
created_at: number;
|
|
167
167
|
last_modified: number;
|
|
168
168
|
uploader_id?: string | undefined;
|
|
169
169
|
count?: number | undefined;
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
|
-
id: string;
|
|
173
172
|
tags: {
|
|
174
|
-
id: string;
|
|
175
173
|
name: string;
|
|
174
|
+
id: string;
|
|
176
175
|
created_at: number;
|
|
177
176
|
last_modified: number;
|
|
178
177
|
count: number;
|
|
179
178
|
uploader_id?: string | undefined;
|
|
180
179
|
}[];
|
|
180
|
+
id: string;
|
|
181
181
|
url: string;
|
|
182
|
-
size: number;
|
|
183
182
|
kind: string;
|
|
183
|
+
size: number;
|
|
184
184
|
last_modified: number;
|
|
185
185
|
filename: string;
|
|
186
|
-
notes?: string | undefined;
|
|
187
186
|
width?: number | undefined;
|
|
188
187
|
height?: number | undefined;
|
|
189
188
|
credits?: string | undefined;
|
|
190
189
|
alt?: string | undefined;
|
|
190
|
+
notes?: string | undefined;
|
|
191
191
|
uploader_id?: string | undefined;
|
|
192
192
|
extension?: string | undefined;
|
|
193
193
|
search_highlight?: {
|
|
194
|
-
notes?: string | undefined;
|
|
195
194
|
credits?: string | undefined;
|
|
196
195
|
alt?: string | undefined;
|
|
196
|
+
notes?: string | undefined;
|
|
197
197
|
filename?: string | undefined;
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
|
-
id: string;
|
|
201
200
|
tags: {
|
|
202
|
-
id: string;
|
|
203
201
|
name: string;
|
|
202
|
+
id: string;
|
|
204
203
|
created_at: number;
|
|
205
204
|
last_modified: number;
|
|
206
205
|
uploader_id?: string | undefined;
|
|
207
206
|
count?: number | undefined;
|
|
208
207
|
}[];
|
|
208
|
+
id: string;
|
|
209
209
|
url: string;
|
|
210
|
-
size: number;
|
|
211
210
|
kind: string;
|
|
211
|
+
size: number;
|
|
212
212
|
last_modified: number;
|
|
213
213
|
filename: string;
|
|
214
|
-
notes?: string | undefined;
|
|
215
214
|
width?: number | undefined;
|
|
216
215
|
height?: number | undefined;
|
|
217
216
|
credits?: string | undefined;
|
|
218
217
|
alt?: string | undefined;
|
|
218
|
+
notes?: string | undefined;
|
|
219
219
|
uploader_id?: string | undefined;
|
|
220
220
|
extension?: string | undefined;
|
|
221
221
|
search_highlight?: {
|
|
222
|
-
notes?: string[] | undefined;
|
|
223
222
|
credits?: string[] | undefined;
|
|
224
223
|
alt?: string[] | undefined;
|
|
224
|
+
notes?: string[] | undefined;
|
|
225
225
|
filename?: string[] | undefined;
|
|
226
226
|
} | undefined;
|
|
227
227
|
}>, "many">;
|
|
228
228
|
}, "strip", z.ZodTypeAny, {
|
|
229
229
|
total: number;
|
|
230
230
|
items: {
|
|
231
|
-
id: string;
|
|
232
231
|
tags: {
|
|
233
|
-
id: string;
|
|
234
232
|
name: string;
|
|
233
|
+
id: string;
|
|
235
234
|
created_at: number;
|
|
236
235
|
last_modified: number;
|
|
237
236
|
count: number;
|
|
238
237
|
uploader_id?: string | undefined;
|
|
239
238
|
}[];
|
|
239
|
+
id: string;
|
|
240
240
|
url: string;
|
|
241
|
-
size: number;
|
|
242
241
|
kind: string;
|
|
242
|
+
size: number;
|
|
243
243
|
last_modified: number;
|
|
244
244
|
filename: string;
|
|
245
|
-
notes?: string | undefined;
|
|
246
245
|
width?: number | undefined;
|
|
247
246
|
height?: number | undefined;
|
|
248
247
|
credits?: string | undefined;
|
|
249
248
|
alt?: string | undefined;
|
|
249
|
+
notes?: string | undefined;
|
|
250
250
|
uploader_id?: string | undefined;
|
|
251
251
|
extension?: string | undefined;
|
|
252
252
|
search_highlight?: {
|
|
253
|
-
notes?: string | undefined;
|
|
254
253
|
credits?: string | undefined;
|
|
255
254
|
alt?: string | undefined;
|
|
255
|
+
notes?: string | undefined;
|
|
256
256
|
filename?: string | undefined;
|
|
257
257
|
} | undefined;
|
|
258
258
|
}[];
|
|
@@ -260,31 +260,31 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
260
260
|
}, {
|
|
261
261
|
total: number;
|
|
262
262
|
items: {
|
|
263
|
-
id: string;
|
|
264
263
|
tags: {
|
|
265
|
-
id: string;
|
|
266
264
|
name: string;
|
|
265
|
+
id: string;
|
|
267
266
|
created_at: number;
|
|
268
267
|
last_modified: number;
|
|
269
268
|
uploader_id?: string | undefined;
|
|
270
269
|
count?: number | undefined;
|
|
271
270
|
}[];
|
|
271
|
+
id: string;
|
|
272
272
|
url: string;
|
|
273
|
-
size: number;
|
|
274
273
|
kind: string;
|
|
274
|
+
size: number;
|
|
275
275
|
last_modified: number;
|
|
276
276
|
filename: string;
|
|
277
|
-
notes?: string | undefined;
|
|
278
277
|
width?: number | undefined;
|
|
279
278
|
height?: number | undefined;
|
|
280
279
|
credits?: string | undefined;
|
|
281
280
|
alt?: string | undefined;
|
|
281
|
+
notes?: string | undefined;
|
|
282
282
|
uploader_id?: string | undefined;
|
|
283
283
|
extension?: string | undefined;
|
|
284
284
|
search_highlight?: {
|
|
285
|
-
notes?: string[] | undefined;
|
|
286
285
|
credits?: string[] | undefined;
|
|
287
286
|
alt?: string[] | undefined;
|
|
287
|
+
notes?: string[] | undefined;
|
|
288
288
|
filename?: string[] | undefined;
|
|
289
289
|
} | undefined;
|
|
290
290
|
}[];
|
|
@@ -308,31 +308,31 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
308
308
|
page: number;
|
|
309
309
|
total: number;
|
|
310
310
|
items: {
|
|
311
|
-
id: string;
|
|
312
311
|
tags: {
|
|
313
|
-
id: string;
|
|
314
312
|
name: string;
|
|
313
|
+
id: string;
|
|
315
314
|
created_at: number;
|
|
316
315
|
last_modified: number;
|
|
317
316
|
count: number;
|
|
318
317
|
uploader_id?: string | undefined;
|
|
319
318
|
}[];
|
|
319
|
+
id: string;
|
|
320
320
|
url: string;
|
|
321
|
-
size: number;
|
|
322
321
|
kind: string;
|
|
322
|
+
size: number;
|
|
323
323
|
last_modified: number;
|
|
324
324
|
filename: string;
|
|
325
|
-
notes?: string | undefined;
|
|
326
325
|
width?: number | undefined;
|
|
327
326
|
height?: number | undefined;
|
|
328
327
|
credits?: string | undefined;
|
|
329
328
|
alt?: string | undefined;
|
|
329
|
+
notes?: string | undefined;
|
|
330
330
|
uploader_id?: string | undefined;
|
|
331
331
|
extension?: string | undefined;
|
|
332
332
|
search_highlight?: {
|
|
333
|
-
notes?: string | undefined;
|
|
334
333
|
credits?: string | undefined;
|
|
335
334
|
alt?: string | undefined;
|
|
335
|
+
notes?: string | undefined;
|
|
336
336
|
filename?: string | undefined;
|
|
337
337
|
} | undefined;
|
|
338
338
|
}[];
|
|
@@ -357,31 +357,31 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
357
357
|
setFilters: (filters: Partial<MediaLibraryFilters>) => void;
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
|
-
id: string;
|
|
361
360
|
tags: {
|
|
362
|
-
id: string;
|
|
363
361
|
name: string;
|
|
362
|
+
id: string;
|
|
364
363
|
created_at: number;
|
|
365
364
|
last_modified: number;
|
|
366
365
|
count: number;
|
|
367
366
|
uploader_id?: string | undefined;
|
|
368
367
|
}[];
|
|
368
|
+
id: string;
|
|
369
369
|
url: string;
|
|
370
|
-
size: number;
|
|
371
370
|
kind: string;
|
|
371
|
+
size: number;
|
|
372
372
|
last_modified: number;
|
|
373
373
|
filename: string;
|
|
374
|
-
notes?: string | undefined;
|
|
375
374
|
width?: number | undefined;
|
|
376
375
|
height?: number | undefined;
|
|
377
376
|
credits?: string | undefined;
|
|
378
377
|
alt?: string | undefined;
|
|
378
|
+
notes?: string | undefined;
|
|
379
379
|
uploader_id?: string | undefined;
|
|
380
380
|
extension?: string | undefined;
|
|
381
381
|
search_highlight?: {
|
|
382
|
-
notes?: string | undefined;
|
|
383
382
|
credits?: string | undefined;
|
|
384
383
|
alt?: string | undefined;
|
|
384
|
+
notes?: string | undefined;
|
|
385
385
|
filename?: string | undefined;
|
|
386
386
|
} | undefined;
|
|
387
387
|
}[];
|
|
@@ -407,31 +407,31 @@ 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
410
|
tags: {
|
|
412
|
-
id: string;
|
|
413
411
|
name: string;
|
|
412
|
+
id: string;
|
|
414
413
|
created_at: number;
|
|
415
414
|
last_modified: number;
|
|
416
415
|
count: number;
|
|
417
416
|
uploader_id?: string | undefined;
|
|
418
417
|
}[];
|
|
418
|
+
id: string;
|
|
419
419
|
url: string;
|
|
420
|
-
size: number;
|
|
421
420
|
kind: string;
|
|
421
|
+
size: number;
|
|
422
422
|
last_modified: number;
|
|
423
423
|
filename: string;
|
|
424
|
-
notes?: string | undefined;
|
|
425
424
|
width?: number | undefined;
|
|
426
425
|
height?: number | undefined;
|
|
427
426
|
credits?: string | undefined;
|
|
428
427
|
alt?: string | undefined;
|
|
428
|
+
notes?: string | undefined;
|
|
429
429
|
uploader_id?: string | undefined;
|
|
430
430
|
extension?: string | undefined;
|
|
431
431
|
search_highlight?: {
|
|
432
|
-
notes?: string | undefined;
|
|
433
432
|
credits?: string | undefined;
|
|
434
433
|
alt?: string | undefined;
|
|
434
|
+
notes?: string | undefined;
|
|
435
435
|
filename?: string | undefined;
|
|
436
436
|
} | undefined;
|
|
437
437
|
}[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare function useTagSearch(): {
|
|
3
3
|
tags: {
|
|
4
|
-
id: string;
|
|
5
4
|
name: string;
|
|
5
|
+
id: string;
|
|
6
6
|
created_at: number;
|
|
7
7
|
last_modified: number;
|
|
8
8
|
count: number;
|
|
@@ -20,15 +20,15 @@ export declare const tagSchema: z.ZodObject<{
|
|
|
20
20
|
last_modified: z.ZodNumber;
|
|
21
21
|
count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
-
id: string;
|
|
24
23
|
name: string;
|
|
24
|
+
id: string;
|
|
25
25
|
created_at: number;
|
|
26
26
|
last_modified: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
|
-
id: string;
|
|
31
30
|
name: string;
|
|
31
|
+
id: string;
|
|
32
32
|
created_at: number;
|
|
33
33
|
last_modified: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
export declare function useSelectedMedia(): {
|
|
2
|
-
id: string;
|
|
3
2
|
tags: {
|
|
4
|
-
id: string;
|
|
5
3
|
name: string;
|
|
4
|
+
id: string;
|
|
6
5
|
created_at: number;
|
|
7
6
|
last_modified: number;
|
|
8
7
|
count: number;
|
|
9
8
|
uploader_id?: string | undefined;
|
|
10
9
|
}[];
|
|
10
|
+
id: string;
|
|
11
11
|
url: string;
|
|
12
|
-
size: number;
|
|
13
12
|
kind: string;
|
|
13
|
+
size: number;
|
|
14
14
|
last_modified: number;
|
|
15
15
|
filename: string;
|
|
16
|
-
notes?: string | undefined;
|
|
17
16
|
width?: number | undefined;
|
|
18
17
|
height?: number | undefined;
|
|
19
18
|
credits?: string | undefined;
|
|
20
19
|
alt?: string | undefined;
|
|
20
|
+
notes?: string | undefined;
|
|
21
21
|
uploader_id?: string | undefined;
|
|
22
22
|
extension?: string | undefined;
|
|
23
23
|
search_highlight?: {
|
|
24
|
-
notes?: string | undefined;
|
|
25
24
|
credits?: string | undefined;
|
|
26
25
|
alt?: string | undefined;
|
|
26
|
+
notes?: string | undefined;
|
|
27
27
|
filename?: string | undefined;
|
|
28
28
|
} | undefined;
|
|
29
29
|
}[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { OnboardingTracking } from "../../service";
|
|
2
3
|
interface OnboardingTutorialProps {
|
|
3
4
|
href: string;
|
|
5
|
+
tracking: OnboardingTracking;
|
|
4
6
|
}
|
|
5
7
|
export declare function OnboardingTutorial(props: OnboardingTutorialProps): JSX.Element;
|
|
6
8
|
export {};
|
package/dist/core/document.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Document as DocumentT, GroupContent } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import { type StaticCustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
import type { DocumentVersion } from "./service";
|
|
3
4
|
export declare function prepareDocumentForSave(customType: StaticCustomType, document: DocumentT): DocumentT;
|
|
4
5
|
export declare const defaultGroupContentWithOneItem: GroupContent;
|
|
5
6
|
export declare const documentStatus: {
|
|
@@ -20,12 +21,7 @@ export declare const documentStatus: {
|
|
|
20
21
|
readonly color: "grey";
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
|
-
export declare const searchDocumentStatus:
|
|
24
|
-
unclassified: string[];
|
|
25
|
-
archived: string[];
|
|
26
|
-
release: string[];
|
|
27
|
-
published: string[];
|
|
28
|
-
};
|
|
24
|
+
export declare const searchDocumentStatus: Record<DocumentVersion["status"], DocumentVersion["status"][]>;
|
|
29
25
|
interface getDocumentUrlArgs {
|
|
30
26
|
documentId: string;
|
|
31
27
|
status?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Document } from "@prismicio/types-internal/lib/content";
|
|
2
|
+
import type { StaticCustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
|
+
export declare const metaTitleProperty = "meta_title";
|
|
4
|
+
export declare const metaDescriptionProperty = "meta_description";
|
|
5
|
+
export type MetadataType = typeof metaTitleProperty | typeof metaDescriptionProperty;
|
|
6
|
+
interface GenerateSEOMetadataArgs {
|
|
7
|
+
pageTextContent: string;
|
|
8
|
+
contentLocale: string;
|
|
9
|
+
config: {
|
|
10
|
+
accessKeyId: string;
|
|
11
|
+
secretAccessKey: string;
|
|
12
|
+
region: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function generateSEOMetadata(args: GenerateSEOMetadataArgs): Promise<{
|
|
16
|
+
meta_title: string;
|
|
17
|
+
meta_description: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const metaTitleConfig: {
|
|
20
|
+
readonly min: 50;
|
|
21
|
+
readonly max: 60;
|
|
22
|
+
};
|
|
23
|
+
export declare const metaDescriptionConfig: {
|
|
24
|
+
readonly min: 120;
|
|
25
|
+
readonly max: 165;
|
|
26
|
+
};
|
|
27
|
+
export declare function getPageTextContent(document: Document, customType: StaticCustomType): string;
|
|
28
|
+
export declare function extractTextFromField(contentField: unknown): string | undefined;
|
|
29
|
+
export declare function isPageContentRelevantForAISeo(pageContent: string): boolean;
|
|
30
|
+
export {};
|
|
@@ -7,22 +7,22 @@ declare const customTypeResponse: z.ZodObject<{
|
|
|
7
7
|
repeatable: z.ZodBoolean;
|
|
8
8
|
status: z.ZodBoolean;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
status: boolean;
|
|
10
11
|
id: string;
|
|
11
12
|
label: string;
|
|
12
13
|
repeatable: boolean;
|
|
13
|
-
status: boolean;
|
|
14
14
|
}, {
|
|
15
|
+
status: boolean;
|
|
15
16
|
id: string;
|
|
16
17
|
label: string;
|
|
17
18
|
repeatable: boolean;
|
|
18
|
-
status: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
export type CustomTypeResponse = z.TypeOf<typeof customTypeResponse>;
|
|
21
21
|
export declare function getRepositoryCustomTypes(baseUrl: URL, repository: string, authStrategy: AuthStrategy): Promise<{
|
|
22
|
+
status: boolean;
|
|
22
23
|
id: string;
|
|
23
24
|
label: string;
|
|
24
25
|
repeatable: boolean;
|
|
25
|
-
status: boolean;
|
|
26
26
|
}[]>;
|
|
27
27
|
interface CustomTypesOptionsArgs {
|
|
28
28
|
baseUrl: URL;
|
|
@@ -30,35 +30,42 @@ interface CustomTypesOptionsArgs {
|
|
|
30
30
|
authStrategy: AuthStrategy;
|
|
31
31
|
}
|
|
32
32
|
export declare function getCustomTypesOptions(args: CustomTypesOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
|
|
33
|
+
status: boolean;
|
|
33
34
|
id: string;
|
|
34
35
|
label: string;
|
|
35
36
|
repeatable: boolean;
|
|
36
|
-
status: boolean;
|
|
37
37
|
}[], Error, {
|
|
38
|
+
status: boolean;
|
|
38
39
|
id: string;
|
|
39
40
|
label: string;
|
|
40
41
|
repeatable: boolean;
|
|
41
|
-
status: boolean;
|
|
42
42
|
}[], string[]> & {
|
|
43
43
|
initialData?: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").L<{
|
|
44
|
+
status: boolean;
|
|
44
45
|
id: string;
|
|
45
46
|
label: string;
|
|
46
47
|
repeatable: boolean;
|
|
47
|
-
status: boolean;
|
|
48
48
|
}[]> | undefined;
|
|
49
49
|
} & {
|
|
50
50
|
queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<string[], {
|
|
51
|
+
status: boolean;
|
|
51
52
|
id: string;
|
|
52
53
|
label: string;
|
|
53
54
|
repeatable: boolean;
|
|
54
|
-
status: boolean;
|
|
55
55
|
}[]>;
|
|
56
56
|
};
|
|
57
57
|
export declare function prefetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): void;
|
|
58
58
|
export declare function fetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): Promise<{
|
|
59
|
+
status: boolean;
|
|
59
60
|
id: string;
|
|
60
61
|
label: string;
|
|
61
62
|
repeatable: boolean;
|
|
62
|
-
status: boolean;
|
|
63
63
|
}[]>;
|
|
64
|
+
export declare function useCustomTypes(args: CustomTypesOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseSuspenseQueryResult<{
|
|
65
|
+
status: boolean;
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
repeatable: boolean;
|
|
69
|
+
}[], Error>;
|
|
70
|
+
export declare function invalidateCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): Promise<void>;
|
|
64
71
|
export {};
|