@prismicio/editor-fields 0.4.52 → 0.4.53

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 (55) hide show
  1. package/dist/GroupEditor.d.ts +2 -2
  2. package/dist/SliceSelection.d.ts +4 -4
  3. package/dist/core/MediaLibrary/components/MediaLibraryContext.d.ts +4 -4
  4. package/dist/core/MediaLibrary/components/MediaLibraryToast.d.ts +7 -7
  5. package/dist/core/MediaLibrary/components/MediaList.d.ts +2 -2
  6. package/dist/core/MediaLibrary/components/NewMediaLibraryFeaturesBanner.d.ts +2 -2
  7. package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneContainer.d.ts +2 -2
  8. package/dist/core/MediaLibrary/components/Sidepane/components/SidepaneMetadataTags/SingleMediaMetadataTags.d.ts +2 -2
  9. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +18 -18
  10. package/dist/core/MediaLibrary/hooks/uploadersData.d.ts +2 -2
  11. package/dist/core/MediaLibrary/hooks/useMediaLibraryAnalytics.d.ts +4 -4
  12. package/dist/core/MediaLibrary/hooks/useMediaLibraryCacheInvalidation.d.ts +2 -2
  13. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +6 -6
  14. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +2 -2
  15. package/dist/core/SelectionManager/SelectionManagerTypes.d.ts +8 -8
  16. package/dist/core/UID.d.ts +6 -6
  17. package/dist/core/UnsplashLibrary/UnsplashLibrary.d.ts +2 -2
  18. package/dist/core/document.d.ts +2 -2
  19. package/dist/core/imageUtils.d.ts +4 -4
  20. package/dist/core/service/customType.d.ts +3 -3
  21. package/dist/core/service/document.d.ts +12 -12
  22. package/dist/core/service/onboarding.d.ts +5 -5
  23. package/dist/fields/ImageField/Components/ImageAltControl.d.ts +2 -2
  24. package/dist/fields/ImageField/Components/ImageFieldTitle.d.ts +2 -2
  25. package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +3 -3
  26. package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +10 -10
  27. package/dist/fields/ImageField/MediaDialog/MediaDialog.d.ts +2 -2
  28. package/dist/fields/ImageField/useImageField.d.ts +2 -2
  29. package/dist/fields/IntegrationField/IntegrationInput.d.ts +6 -6
  30. package/dist/fields/LinkField/Documents/Filters.d.ts +6 -6
  31. package/dist/fields/LinkField/Documents/documentsData.d.ts +2 -2
  32. package/dist/fields/LinkField/LinkDescriptionCard.d.ts +2 -2
  33. package/dist/fields/LinkField/LinkField.d.ts +7 -7
  34. package/dist/fields/LinkField/LinkImageCard.d.ts +2 -2
  35. package/dist/fields/RichTextField/BubbleMenu/Label/LabelItems.d.ts +2 -2
  36. package/dist/fields/RichTextField/BubbleMenu/Link/DocumentDescriptionCard.d.ts +2 -2
  37. package/dist/fields/RichTextField/BubbleMenu/Link/LinkItems.d.ts +2 -2
  38. package/dist/fields/RichTextField/BubbleMenu/Link/LinkPopover.d.ts +4 -4
  39. package/dist/fields/RichTextField/BubbleMenu/Link/SetMediaLinkModal.d.ts +2 -2
  40. package/dist/fields/RichTextField/BubbleMenu/Link/SetWebLinkModal.d.ts +2 -2
  41. package/dist/fields/RichTextField/BubbleMenu/MarkItems.d.ts +2 -2
  42. package/dist/fields/RichTextField/BubbleMenu/NodeItems.d.ts +2 -2
  43. package/dist/fields/RichTextField/extensions/Label/Label.d.ts +4 -4
  44. package/dist/fields/RichTextField/extensions/Label/LabelModel.d.ts +2 -2
  45. package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +11 -11
  46. package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +2 -2
  47. package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
  48. package/dist/index.cjs.js +12 -12
  49. package/dist/index.es.js +3436 -3418
  50. package/dist/slices/LegacySliceEditor.d.ts +2 -2
  51. package/dist/slices/utils.d.ts +1 -1
  52. package/dist/zones/Components/LegacyCustomLabelSelect.d.ts +2 -2
  53. package/dist/zones/NonRepeatableZoneEditor.d.ts +2 -2
  54. package/dist/zones/SliceZoneEditor.d.ts +2 -2
  55. package/package.json +4 -4
@@ -66,6 +66,7 @@ declare const documentVersionOkType: z.ZodIntersection<z.ZodDiscriminatedUnion<"
66
66
  }>;
67
67
  uid: z.ZodOptional<z.ZodString>;
68
68
  }, "strip", z.ZodTypeAny, {
69
+ tags: string[];
69
70
  author: {
70
71
  first_name?: string | undefined;
71
72
  last_name?: string | undefined;
@@ -73,13 +74,13 @@ declare const documentVersionOkType: z.ZodIntersection<z.ZodDiscriminatedUnion<"
73
74
  uploadedAvatar?: string | undefined;
74
75
  };
75
76
  version_id: string;
76
- tags: string[];
77
77
  custom_type_label: string;
78
78
  last_modified_date: Date;
79
79
  preview_summary?: string | undefined;
80
80
  preview_image?: string | undefined;
81
81
  uid?: string | undefined;
82
82
  }, {
83
+ tags: string[];
83
84
  author: {
84
85
  first_name?: string | undefined;
85
86
  last_name?: string | undefined;
@@ -87,7 +88,6 @@ declare const documentVersionOkType: z.ZodIntersection<z.ZodDiscriminatedUnion<"
87
88
  uploadedAvatar?: string | undefined;
88
89
  };
89
90
  version_id: string;
90
- tags: string[];
91
91
  custom_type_label: string;
92
92
  last_modified_date: Date;
93
93
  preview_summary?: string | undefined;
@@ -164,6 +164,7 @@ export declare const documentMetaOkType: z.ZodObject<{
164
164
  }>;
165
165
  uid: z.ZodOptional<z.ZodString>;
166
166
  }, "strip", z.ZodTypeAny, {
167
+ tags: string[];
167
168
  author: {
168
169
  first_name?: string | undefined;
169
170
  last_name?: string | undefined;
@@ -171,13 +172,13 @@ export declare const documentMetaOkType: z.ZodObject<{
171
172
  uploadedAvatar?: string | undefined;
172
173
  };
173
174
  version_id: string;
174
- tags: string[];
175
175
  custom_type_label: string;
176
176
  last_modified_date: Date;
177
177
  preview_summary?: string | undefined;
178
178
  preview_image?: string | undefined;
179
179
  uid?: string | undefined;
180
180
  }, {
181
+ tags: string[];
181
182
  author: {
182
183
  first_name?: string | undefined;
183
184
  last_name?: string | undefined;
@@ -185,7 +186,6 @@ export declare const documentMetaOkType: z.ZodObject<{
185
186
  uploadedAvatar?: string | undefined;
186
187
  };
187
188
  version_id: string;
188
- tags: string[];
189
189
  custom_type_label: string;
190
190
  last_modified_date: Date;
191
191
  preview_summary?: string | undefined;
@@ -212,6 +212,7 @@ export declare const documentMetaOkType: z.ZodObject<{
212
212
  } | {
213
213
  status: "archived";
214
214
  }) & {
215
+ tags: string[];
215
216
  author: {
216
217
  first_name?: string | undefined;
217
218
  last_name?: string | undefined;
@@ -219,7 +220,6 @@ export declare const documentMetaOkType: z.ZodObject<{
219
220
  uploadedAvatar?: string | undefined;
220
221
  };
221
222
  version_id: string;
222
- tags: string[];
223
223
  custom_type_label: string;
224
224
  last_modified_date: Date;
225
225
  preview_summary?: string | undefined;
@@ -245,6 +245,7 @@ export declare const documentMetaOkType: z.ZodObject<{
245
245
  } | {
246
246
  status: "archived";
247
247
  }) & {
248
+ tags: string[];
248
249
  author: {
249
250
  first_name?: string | undefined;
250
251
  last_name?: string | undefined;
@@ -252,7 +253,6 @@ export declare const documentMetaOkType: z.ZodObject<{
252
253
  uploadedAvatar?: string | undefined;
253
254
  };
254
255
  version_id: string;
255
- tags: string[];
256
256
  custom_type_label: string;
257
257
  last_modified_date: Date;
258
258
  preview_summary?: string | undefined;
@@ -334,6 +334,7 @@ declare const getDocumentListSchema: z.ZodObject<{
334
334
  }>;
335
335
  uid: z.ZodOptional<z.ZodString>;
336
336
  }, "strip", z.ZodTypeAny, {
337
+ tags: string[];
337
338
  author: {
338
339
  first_name?: string | undefined;
339
340
  last_name?: string | undefined;
@@ -341,13 +342,13 @@ declare const getDocumentListSchema: z.ZodObject<{
341
342
  uploadedAvatar?: string | undefined;
342
343
  };
343
344
  version_id: string;
344
- tags: string[];
345
345
  custom_type_label: string;
346
346
  last_modified_date: Date;
347
347
  preview_summary?: string | undefined;
348
348
  preview_image?: string | undefined;
349
349
  uid?: string | undefined;
350
350
  }, {
351
+ tags: string[];
351
352
  author: {
352
353
  first_name?: string | undefined;
353
354
  last_name?: string | undefined;
@@ -355,7 +356,6 @@ declare const getDocumentListSchema: z.ZodObject<{
355
356
  uploadedAvatar?: string | undefined;
356
357
  };
357
358
  version_id: string;
358
- tags: string[];
359
359
  custom_type_label: string;
360
360
  last_modified_date: Date;
361
361
  preview_summary?: string | undefined;
@@ -382,6 +382,7 @@ declare const getDocumentListSchema: z.ZodObject<{
382
382
  } | {
383
383
  status: "archived";
384
384
  }) & {
385
+ tags: string[];
385
386
  author: {
386
387
  first_name?: string | undefined;
387
388
  last_name?: string | undefined;
@@ -389,7 +390,6 @@ declare const getDocumentListSchema: z.ZodObject<{
389
390
  uploadedAvatar?: string | undefined;
390
391
  };
391
392
  version_id: string;
392
- tags: string[];
393
393
  custom_type_label: string;
394
394
  last_modified_date: Date;
395
395
  preview_summary?: string | undefined;
@@ -415,6 +415,7 @@ declare const getDocumentListSchema: z.ZodObject<{
415
415
  } | {
416
416
  status: "archived";
417
417
  }) & {
418
+ tags: string[];
418
419
  author: {
419
420
  first_name?: string | undefined;
420
421
  last_name?: string | undefined;
@@ -422,7 +423,6 @@ declare const getDocumentListSchema: z.ZodObject<{
422
423
  uploadedAvatar?: string | undefined;
423
424
  };
424
425
  version_id: string;
425
- tags: string[];
426
426
  custom_type_label: string;
427
427
  last_modified_date: Date;
428
428
  preview_summary?: string | undefined;
@@ -453,6 +453,7 @@ declare const getDocumentListSchema: z.ZodObject<{
453
453
  } | {
454
454
  status: "archived";
455
455
  }) & {
456
+ tags: string[];
456
457
  author: {
457
458
  first_name?: string | undefined;
458
459
  last_name?: string | undefined;
@@ -460,7 +461,6 @@ declare const getDocumentListSchema: z.ZodObject<{
460
461
  uploadedAvatar?: string | undefined;
461
462
  };
462
463
  version_id: string;
463
- tags: string[];
464
464
  custom_type_label: string;
465
465
  last_modified_date: Date;
466
466
  preview_summary?: string | undefined;
@@ -490,6 +490,7 @@ declare const getDocumentListSchema: z.ZodObject<{
490
490
  } | {
491
491
  status: "archived";
492
492
  }) & {
493
+ tags: string[];
493
494
  author: {
494
495
  first_name?: string | undefined;
495
496
  last_name?: string | undefined;
@@ -497,7 +498,6 @@ declare const getDocumentListSchema: z.ZodObject<{
497
498
  uploadedAvatar?: string | undefined;
498
499
  };
499
500
  version_id: string;
500
- tags: string[];
501
501
  custom_type_label: string;
502
502
  last_modified_date: Date;
503
503
  preview_summary?: string | undefined;
@@ -16,27 +16,27 @@ export declare const onboardingStateSchema: z.ZodObject<{
16
16
  isDismissed: z.ZodBoolean;
17
17
  context: z.ZodObject<{
18
18
  framework: z.ZodEffects<z.ZodEnum<["next", "nuxt", "sveltekit", "other"]>, "next" | "nuxt" | "sveltekit" | "other", unknown>;
19
- starterId: z.ZodNullable<z.ZodString>;
19
+ starterId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  framework: "next" | "nuxt" | "sveltekit" | "other";
22
- starterId: string | null;
22
+ starterId?: string | null | undefined;
23
23
  }, {
24
- starterId: string | null;
25
24
  framework?: unknown;
25
+ starterId?: string | null | undefined;
26
26
  }>;
27
27
  }, "strip", z.ZodTypeAny, {
28
28
  completedSteps: string[];
29
29
  isDismissed: boolean;
30
30
  context: {
31
31
  framework: "next" | "nuxt" | "sveltekit" | "other";
32
- starterId: string | null;
32
+ starterId?: string | null | undefined;
33
33
  };
34
34
  }, {
35
35
  completedSteps: string[];
36
36
  isDismissed: boolean;
37
37
  context: {
38
- starterId: string | null;
39
38
  framework?: unknown;
39
+ starterId?: string | null | undefined;
40
40
  };
41
41
  }>;
42
42
  export type OnboardingState = z.infer<typeof onboardingStateSchema>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- type ImageAltControlProps = {
3
- readOnly?: boolean;
2
+ interface ImageAltControlProps {
3
+ readOnly?: boolean;
4
4
  altText: string;
5
5
  selected?: boolean;
6
6
  onValueChange: (value: string) => void;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- type ImageFieldTitleProps = {
3
- fieldLabel: string;
2
+ interface ImageFieldTitleProps {
3
+ fieldLabel: string;
4
4
  imageLabel?: string[];
5
5
  }
6
6
  export declare function ImageFieldTitle(props: ImageFieldTitleProps): JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { CropperImage } from "../../../core/imageUtils";
3
3
  import { type CroppedImage } from "./croppedImage";
4
- type CropperDialogProps = {
5
- trigger: React.ReactNode;
4
+ interface CropperDialogProps {
5
+ trigger: React.ReactNode;
6
6
  /** Flattened list of all thumbnails in the field */
7
7
  initialImages: CropperImage[];
8
8
  /** Index of the initial image displayed in the cropper */
@@ -10,7 +10,7 @@ trigger: React.ReactNode;
10
10
  onClose: (result: {
11
11
  croppedImages: CroppedImages;
12
12
  option: number;
13
- }) => void;
13
+ }) => void;
14
14
  renderTooltip: (trigger: ReactNode) => ReactNode;
15
15
  }
16
16
  export declare function CropperDialog(props: CropperDialogProps): JSX.Element;
@@ -1,22 +1,22 @@
1
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
- export type Point = {
5
- x: number;
4
+ export interface Point {
5
+ x: number;
6
6
  y: number;
7
7
  }
8
- export type Size = {
9
- width: number;
8
+ export interface Size {
9
+ width: number;
10
10
  height: number;
11
11
  }
12
- export type CropArea = {
13
- x: number;
12
+ export interface CropArea {
13
+ x: number;
14
14
  y: number;
15
15
  width: number;
16
16
  height: number;
17
17
  }
18
- export type CroppedImage = {
19
- zoom: number;
18
+ export interface CroppedImage {
19
+ zoom: number;
20
20
  /** x coordinate of the crop rect on the original image */
21
21
  x: number;
22
22
  /** y coordinate of the crop rect on the original image */
@@ -42,8 +42,8 @@ interface UpdateImageMainThumbnailArgs<T> {
42
42
  croppedImage: CroppedImage;
43
43
  }
44
44
  export declare function updateImageMainThumbnail<T extends ImageContent | ImageBlockData>(args: UpdateImageMainThumbnailArgs<T>): T;
45
- type BuildCropUrlArgs = {
46
- origin: ImageContent["origin"];
45
+ interface BuildCropUrlArgs {
46
+ origin: ImageContent["origin"];
47
47
  /** Image crop parameters */
48
48
  croppedImage: CroppedImage;
49
49
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { type MediaAssetType } from "@prismicio/editor-ui";
3
3
  import { type MediaAssetOrExternalImage } from "../../../core/MediaLibrary/hooks/mediaLibraryData";
4
- type MediaDialogProps = {
5
- assetType: MediaAssetType;
4
+ interface MediaDialogProps {
5
+ assetType: MediaAssetType;
6
6
  open: boolean;
7
7
  onOpenChange: (open: boolean) => void;
8
8
  onMediaSelected: (media: MediaAssetOrExternalImage) => void;
@@ -2,8 +2,8 @@ import type { ImageContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { Image } from "@prismicio/types-internal/lib/customtypes";
3
3
  import type { MediaAssetOrExternalImage } from "../../core/MediaLibrary/hooks/mediaLibraryData";
4
4
  import type { CroppedImages } from "./CropperDialog";
5
- type useImageFieldProps = {
6
- content: ImageContent | undefined;
5
+ interface useImageFieldProps {
6
+ content: ImageContent | undefined;
7
7
  field: Image;
8
8
  onContentChange: (content: ImageContent | undefined) => void;
9
9
  }
@@ -1,21 +1,21 @@
1
1
  /// <reference types="react" />
2
2
  import { IntegrationField as IntegrationFieldT } from "@prismicio/types-internal/lib/customtypes";
3
3
  import { type IntegrationItem } from "./integrationData";
4
- type IntegrationSharedInputProps = {
5
- id: string;
4
+ interface IntegrationSharedInputProps {
5
+ id: string;
6
6
  field: IntegrationFieldT;
7
7
  readOnly: boolean;
8
8
  onFocus: () => void;
9
9
  onClearItem: () => void;
10
10
  }
11
- type IntegrationInputProps = IntegrationSharedInputProps & {
12
- catalogId: string;
11
+ interface IntegrationInputProps extends IntegrationSharedInputProps {
12
+ catalogId: string;
13
13
  itemId?: string;
14
14
  item?: IntegrationItem;
15
15
  }
16
16
  export declare function IntegrationInput(props: IntegrationInputProps): JSX.Element;
17
- type IntegrationFooterProps = {
18
- catalogId: string;
17
+ interface IntegrationFooterProps {
18
+ catalogId: string;
19
19
  itemId?: string;
20
20
  item?: IntegrationItem;
21
21
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type FilterOption } from "@prismicio/editor-ui";
3
- type DocumentsListFiltersProps = {
4
- filteredLocales: Set<FilterOption>;
3
+ interface DocumentsListFiltersProps {
4
+ filteredLocales: Set<FilterOption>;
5
5
  setFilteredLocales: (newValue: Set<FilterOption>) => void;
6
6
  filteredTags: Set<FilterOption>;
7
7
  setFilteredTags: (newValue: Set<FilterOption>) => void;
@@ -11,8 +11,8 @@ filteredLocales: Set<FilterOption>;
11
11
  fixedTags?: Set<string>;
12
12
  }
13
13
  export declare function DocumentsListFilters(props: DocumentsListFiltersProps): JSX.Element;
14
- type FilterProps = {
15
- onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
14
+ interface FilterProps {
15
+ onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
16
16
  fixedSelectedValues?: Set<FilterOption>;
17
17
  selectedValues: Set<FilterOption>;
18
18
  label: string;
@@ -21,8 +21,8 @@ onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
21
21
  multiple?: boolean;
22
22
  }
23
23
  export declare function Filter(props: FilterProps): JSX.Element;
24
- type LocalesFilterProps = {
25
- selectedValues: Set<FilterOption>;
24
+ interface LocalesFilterProps {
25
+ selectedValues: Set<FilterOption>;
26
26
  onSelectedValuesChange: (selectedValues: Set<FilterOption>) => void;
27
27
  }
28
28
  export declare function LocalesFilter(props: LocalesFilterProps): JSX.Element;
@@ -25,6 +25,7 @@ export declare function useDocuments(params: {
25
25
  } | {
26
26
  status: "archived";
27
27
  }) & {
28
+ tags: string[];
28
29
  author: {
29
30
  first_name?: string | undefined;
30
31
  last_name?: string | undefined;
@@ -32,7 +33,6 @@ export declare function useDocuments(params: {
32
33
  uploadedAvatar?: string | undefined;
33
34
  };
34
35
  version_id: string;
35
- tags: string[];
36
36
  custom_type_label: string;
37
37
  last_modified_date: Date;
38
38
  preview_summary?: string | undefined;
@@ -52,6 +52,7 @@ export declare function useDocuments(params: {
52
52
  } | {
53
53
  status: "archived";
54
54
  }) & {
55
+ tags: string[];
55
56
  author: {
56
57
  first_name?: string | undefined;
57
58
  last_name?: string | undefined;
@@ -59,7 +60,6 @@ export declare function useDocuments(params: {
59
60
  uploadedAvatar?: string | undefined;
60
61
  };
61
62
  version_id: string;
62
- tags: string[];
63
63
  custom_type_label: string;
64
64
  last_modified_date: Date;
65
65
  preview_summary?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type IconName } from "@prismicio/editor-ui";
3
- export type LinkDescriptionCardProps = {
4
- url?: URL | string;
3
+ export interface LinkDescriptionCardProps {
4
+ url?: URL | string;
5
5
  title?: string;
6
6
  subTitle?: string;
7
7
  description?: string;
@@ -2,26 +2,26 @@
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 LinkFieldProps = {
6
- id?: string;
5
+ interface LinkFieldProps {
6
+ id?: string;
7
7
  field: Link;
8
8
  content: LinkContent | undefined;
9
9
  condensedButtons?: boolean;
10
10
  onContentChange: (content: LinkContent | undefined) => void;
11
11
  }
12
12
  export declare function LinkField(props: LinkFieldProps): JSX.Element;
13
- type GetFieldIconArgs = {
14
- selectType?: FieldSelectType;
13
+ interface GetFieldIconArgs {
14
+ selectType?: FieldSelectType;
15
15
  displayTextEnabled?: boolean;
16
16
  }
17
17
  export declare function getFieldIcon(args: GetFieldIconArgs): "image" | "description" | "link" | "notes" | "public";
18
- type FilledLinkFieldProps = {
19
- id?: string;
18
+ interface FilledLinkFieldProps {
19
+ id?: string;
20
20
  condensedButtons?: boolean;
21
21
  field: Link & {
22
22
  config?: {
23
23
  allowText?: false;
24
- };
24
+ };
25
25
  };
26
26
  content: FilledLinkContent | undefined;
27
27
  onContentChange: (content: FilledLinkContent | undefined) => void;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- export type LinkImageCardProps = {
3
- url: string;
2
+ export interface LinkImageCardProps {
3
+ url: string;
4
4
  title: string;
5
5
  subTitle: string;
6
6
  onEdit?: () => void;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
- type NodeItemsProps = {
4
- labels: string[];
3
+ interface NodeItemsProps {
4
+ labels: string[];
5
5
  editor: Editor;
6
6
  }
7
7
  export declare function LabelItems(props: NodeItemsProps): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- type DocumentDescriptionCardProps = {
3
- docId: string;
2
+ interface DocumentDescriptionCardProps {
3
+ docId: string;
4
4
  onEdit: () => void;
5
5
  onUnlink: () => void;
6
6
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
3
  import type { Modal } from "../BubbleMenu";
4
- type LinkItemsProps = {
5
- editor: Editor;
4
+ interface LinkItemsProps {
5
+ editor: Editor;
6
6
  setModal: (modal: Modal) => void;
7
7
  }
8
8
  export declare function LinkItems(props: LinkItemsProps): JSX.Element;
@@ -1,14 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
- type LinkPopoverProps = {
4
- editor: Editor;
3
+ interface LinkPopoverProps {
4
+ editor: Editor;
5
5
  onEditWebLink: () => void;
6
6
  onEditDocumentLink: () => void;
7
7
  onEditMediaLink: () => void;
8
8
  }
9
9
  export declare function LinkPopover(props: LinkPopoverProps): JSX.Element | null;
10
- type DocumentLinkPopoverProps = {
11
- editor: Editor;
10
+ interface DocumentLinkPopoverProps {
11
+ editor: Editor;
12
12
  onEditDocumentLink: () => void;
13
13
  docId: string;
14
14
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
- type SetMediaLinkModalProps = {
4
- open: boolean;
3
+ interface SetMediaLinkModalProps {
4
+ open: boolean;
5
5
  setOpen: (open: boolean) => void;
6
6
  editor: Editor;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
- type SetWebLinkModalProps = {
4
- open: boolean;
3
+ interface SetWebLinkModalProps {
4
+ open: boolean;
5
5
  editor: Editor;
6
6
  setOpen: (open: boolean) => void;
7
7
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
3
  import type { MenuItem } from "../models/MenuItems";
4
- type MarkItemsProps = {
5
- items: MenuItem[];
4
+ interface MarkItemsProps {
5
+ items: MenuItem[];
6
6
  editor: Editor;
7
7
  }
8
8
  export declare function MarkItems(props: MarkItemsProps): JSX.Element | null;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { Editor } from "@tiptap/core";
3
3
  import type { MenuItem } from "../models/MenuItems";
4
- type NodeItemsProps = {
5
- items: MenuItem[];
4
+ interface NodeItemsProps {
5
+ items: MenuItem[];
6
6
  editor: Editor;
7
7
  }
8
8
  export declare function NodeItems(props: NodeItemsProps): JSX.Element | null;
@@ -1,10 +1,10 @@
1
1
  import { LabelExtension } from "./LabelModel";
2
- export type LabelProtocolOptions = {
3
- scheme: string;
2
+ export interface LabelProtocolOptions {
3
+ scheme: string;
4
4
  optionalSlashes?: boolean;
5
5
  }
6
- export type LabelOptions = {
7
- /** These are the values passed into the HTML through the Tiptap extension. */
6
+ export interface LabelOptions {
7
+ /** These are the values passed into the HTML through the Tiptap extension. */
8
8
  htmlAttributes: Record<string, any>;
9
9
  }
10
10
  declare module "@tiptap/core" {
@@ -16,8 +16,8 @@ export declare class LabelExtension {
16
16
  toPrismic(elmt: ProsemirrorMark): LabelElementData;
17
17
  });
18
18
  }
19
- export type LabelElement = {
20
- type: "label";
19
+ export interface LabelElement {
20
+ type: "label";
21
21
  start: number;
22
22
  end: number;
23
23
  data: LabelElementData;
@@ -16,15 +16,15 @@ export declare class LinkExtension {
16
16
  toPrismic(elmt: ProsemirrorMark): LinkElementData;
17
17
  });
18
18
  }
19
- export type LinkElement = {
20
- type: "hyperlink";
19
+ export interface LinkElement {
20
+ type: "hyperlink";
21
21
  start: number;
22
22
  end: number;
23
23
  data: LinkElementData;
24
24
  }
25
25
  export type LinkElementData = ImageLinkData | FileLinkData | DocumentLinkData | ExternalLinkData;
26
- export type ImageLinkData = {
27
- __TYPE__: "ImageLink";
26
+ export interface ImageLinkData {
27
+ __TYPE__: "ImageLink";
28
28
  id: string;
29
29
  url: string;
30
30
  height: string;
@@ -34,8 +34,8 @@ __TYPE__: "ImageLink";
34
34
  kind: string;
35
35
  date?: string | null | undefined;
36
36
  }
37
- export type FileLinkData = {
38
- __TYPE__: "FileLink";
37
+ export interface FileLinkData {
38
+ __TYPE__: "FileLink";
39
39
  id: string;
40
40
  url: string;
41
41
  name: string;
@@ -43,17 +43,17 @@ __TYPE__: "FileLink";
43
43
  size: string;
44
44
  date?: string | null | undefined;
45
45
  }
46
- type DocumentLinkData = {
47
- __TYPE__: "DocumentLink";
46
+ interface DocumentLinkData {
47
+ __TYPE__: "DocumentLink";
48
48
  id: string;
49
49
  }
50
- type ExternalLinkData = {
51
- __TYPE__: "ExternalLink";
50
+ interface ExternalLinkData {
51
+ __TYPE__: "ExternalLink";
52
52
  url: string;
53
53
  kind?: "web";
54
54
  target?: string | null | undefined;
55
55
  preview?: {
56
56
  title?: string;
57
- } | null | undefined;
57
+ } | null | undefined;
58
58
  }
59
59
  export {};
@@ -4,8 +4,8 @@ import type { Node as ProsemirrorNode } from "prosemirror-model";
4
4
  export type Direction = "ltr" | "rtl";
5
5
  export declare const leftToRight: Direction;
6
6
  export declare const rightToLeft: Direction;
7
- type TextDirectionOptions = {
8
- supportedExtensionNames: string[];
7
+ interface TextDirectionOptions {
8
+ supportedExtensionNames: string[];
9
9
  }
10
10
  export declare const attrName = "dir";
11
11
  declare module "@tiptap/core" {