@prismicio/editor-fields 0.4.6 → 0.4.8

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 (35) hide show
  1. package/dist/fields/BooleanField.d.ts +4 -5
  2. package/dist/fields/ColorField/ColorField.d.ts +3 -3
  3. package/dist/fields/DateField.d.ts +3 -3
  4. package/dist/fields/ImageField/{EmptyCardContent.d.ts → Components/EmptyCardContent.d.ts} +1 -1
  5. package/dist/fields/ImageField/{ImageFieldCard.d.ts → Components/ImageFieldCard.d.ts} +9 -2
  6. package/dist/fields/ImageField/CropperDialog/CropperDialog.d.ts +2 -8
  7. package/dist/fields/ImageField/CropperDialog/croppedImage.d.ts +19 -1
  8. package/dist/fields/ImageField/ImageField.d.ts +1 -2
  9. package/dist/fields/ImageField/MediaPicker/MediaLibrary/mediaLibraryData.d.ts +18 -8
  10. package/dist/fields/ImageField/MediaPicker/externalImage.d.ts +1 -0
  11. package/dist/fields/ImageField/imageFieldUtils.d.ts +6 -0
  12. package/dist/fields/ImageField/useImageField.d.ts +101 -0
  13. package/dist/fields/LinkField/Documents/documentsData.d.ts +23 -23
  14. package/dist/fields/LinkField/useLinkField.d.ts +3 -3
  15. package/dist/fields/RichTextField/RichTextField.d.ts +4 -4
  16. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  17. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +23 -0
  18. package/dist/fields/RichTextField/models/RichTextConfig.d.ts +2 -2
  19. package/dist/fields/SelectField.d.ts +3 -4
  20. package/dist/fields/TimestampField.d.ts +3 -3
  21. package/dist/index.es.js +11371 -11325
  22. package/package.json +3 -3
  23. package/dist/fields/GeoPointField.d.ts +0 -11
  24. package/dist/fields/RichTextField/BubbleMenu.d.ts +0 -8
  25. package/dist/fields/RichTextField/extensions/Bold.d.ts +0 -3
  26. package/dist/fields/RichTextField/extensions/BulletList.d.ts +0 -3
  27. package/dist/fields/RichTextField/extensions/CodeBlock.d.ts +0 -3
  28. package/dist/fields/RichTextField/extensions/Embed/index.d.ts +0 -10
  29. package/dist/fields/RichTextField/extensions/Heading.d.ts +0 -21
  30. package/dist/fields/RichTextField/extensions/Italic.d.ts +0 -3
  31. package/dist/fields/RichTextField/extensions/Link/Link.d.ts +0 -44
  32. package/dist/fields/RichTextField/extensions/OrderedList.d.ts +0 -3
  33. package/dist/fields/RichTextField/extensions/Paragraph.d.ts +0 -3
  34. package/dist/index.umd.js +0 -145
  35. /package/dist/fields/ImageField/{ImageAltControl.d.ts → Components/ImageAltControl.d.ts} +0 -0
@@ -0,0 +1,23 @@
1
+ import type { ImageContent } from "@prismicio/types-internal/lib/content";
2
+ import type { CroppedImages } from "../../../ImageField/CropperDialog";
3
+ import { ExternalImage } from "../../../ImageField/MediaPicker/externalImage";
4
+ import type { ImageViewProps } from "./ImageView";
5
+ interface useImageViewProps {
6
+ content: ImageContent | undefined;
7
+ thumbnail: {
8
+ width: number | undefined;
9
+ height: number | undefined;
10
+ name: string;
11
+ };
12
+ imageViewProps: ImageViewProps;
13
+ }
14
+ export declare function useImageView(props: useImageViewProps): {
15
+ onContentChange: (content?: ImageContent) => void;
16
+ onMediaSelected: (media: ExternalImage) => void;
17
+ onCropperDialogClose: ({ croppedImages }: {
18
+ croppedImages: CroppedImages;
19
+ }) => void;
20
+ isUpdating: boolean;
21
+ updateContent: (content?: ImageContent) => void;
22
+ };
23
+ export {};
@@ -7,7 +7,7 @@ export declare function composeExtensions(config?: RichTextConfig): {
7
7
  } | {
8
8
  extensions: WidgetExtension[];
9
9
  defaultTextConverter: (schema: Schema<any, any>) => (block: {
10
- type: "em" | "embed" | "strong" | "image" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "paragraph" | "preformatted" | "hyperlink" | "rtl" | "list-item" | "o-list-item";
10
+ type: "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
11
11
  content: {
12
12
  text: string;
13
13
  } & {
@@ -16,7 +16,7 @@ export declare function composeExtensions(config?: RichTextConfig): {
16
16
  } & {
17
17
  start: number;
18
18
  end: number;
19
- type: "em" | "embed" | "label" | "strong" | "image" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "paragraph" | "preformatted" | "hyperlink" | "rtl" | "list-item" | "o-list-item";
19
+ type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
20
20
  })[] | undefined;
21
21
  };
22
22
  } & {
@@ -1,12 +1,11 @@
1
1
  import type { SelectContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { Select as SelectT } from "@prismicio/types-internal/lib/customtypes";
3
- import type { FC } from "react";
4
- declare type SelectFieldProps = Readonly<{
3
+ interface Props {
5
4
  content: SelectContent | undefined;
6
5
  field: SelectT;
7
6
  id: string;
8
7
  onContentChange: (content: SelectContent | undefined) => void;
9
8
  readOnly: boolean;
10
- }>;
11
- export declare const SelectField: FC<SelectFieldProps>;
9
+ }
10
+ export declare function SelectField(props: Props): JSX.Element;
12
11
  export {};
@@ -1,11 +1,11 @@
1
1
  import type { TimestampContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { Timestamp } from "@prismicio/types-internal/lib/customtypes";
3
- declare type Props = Readonly<{
3
+ interface Props {
4
4
  id: string;
5
5
  readOnly: boolean;
6
6
  field: Timestamp;
7
7
  content?: TimestampContent;
8
8
  onContentChange: (content?: TimestampContent) => void;
9
- }>;
10
- export declare const TimestampField: ({ id, readOnly, field, content, onContentChange }: Props) => JSX.Element;
9
+ }
10
+ export declare function TimestampField(props: Props): JSX.Element;
11
11
  export {};