@prismicio/editor-fields 0.4.0 → 0.4.1

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.
@@ -0,0 +1 @@
1
+ export declare const MediaLibrary: () => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { FC, ReactNode } from "react";
2
+ import type { ExternalImage } from "./externalImage";
3
+ interface MediaPickerProps {
4
+ trigger: ReactNode;
5
+ onMediaSelected: (media: ExternalImage) => void;
6
+ }
7
+ export declare const MediaPicker: FC<MediaPickerProps>;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ExternalImage } from "./externalImage";
2
+ interface Props {
3
+ onMediaSelected: (media: ExternalImage) => void;
4
+ }
5
+ export declare const UnsplashLibrary: (props: Props) => JSX.Element;
6
+ export {};
@@ -1,8 +1 @@
1
- import { FC, ReactNode } from "react";
2
- import type { ExternalImage } from "./externalImage";
3
- interface MediaPickerProps {
4
- trigger: ReactNode;
5
- onMediaSelected?: (media: ExternalImage) => void;
6
- }
7
- export declare const MediaPicker: FC<MediaPickerProps>;
8
- export {};
1
+ export { MediaPicker } from "./MediaPicker";
@@ -4,7 +4,7 @@ declare const _default: {
4
4
  component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
5
5
  converter: {
6
6
  fromPrismic(schema: Schema<any, any>): (list: {
7
- type: "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
7
+ type: "em" | "embed" | "strong" | "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
8
8
  content: {
9
9
  text: string;
10
10
  } & {
@@ -13,7 +13,7 @@ declare const _default: {
13
13
  } & {
14
14
  start: number;
15
15
  end: number;
16
- type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
16
+ type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
17
17
  })[] | undefined;
18
18
  };
19
19
  } & {
@@ -21,7 +21,7 @@ declare const _default: {
21
21
  direction?: string | undefined;
22
22
  }) => ProsemirrorNode | undefined;
23
23
  toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
24
- type: "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
24
+ type: "em" | "embed" | "strong" | "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
25
25
  content: {
26
26
  text: string;
27
27
  } & {
@@ -30,7 +30,7 @@ declare const _default: {
30
30
  } & {
31
31
  start: number;
32
32
  end: number;
33
- type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "list-item" | "o-list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "rtl";
33
+ type: "label" | "em" | "embed" | "strong" | "image" | "paragraph" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "preformatted" | "hyperlink" | "list-item" | "o-list-item" | "rtl";
34
34
  })[] | undefined;
35
35
  };
36
36
  } & {
@@ -0,0 +1,10 @@
1
+ import type { UIDContent } from "@prismicio/types-internal/lib/content";
2
+ import type { UID as UIDType } from "@prismicio/types-internal/lib/customtypes";
3
+ declare type Props = Readonly<{
4
+ id: string;
5
+ content?: UIDContent;
6
+ field: UIDType;
7
+ onContentChange: (content?: UIDContent) => void;
8
+ }>;
9
+ export declare const UIDField: ({ id, field, content, onContentChange }: Props) => JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { UIDField } from "./UIDField";
@@ -0,0 +1 @@
1
+ export declare const slugifyUID: (input: string) => string;
@@ -1,6 +1,7 @@
1
- import type { BooleanField, NestableWidget, Separator } from "@prismicio/types-internal/lib/customtypes";
2
- declare type Field = Exclude<NestableWidget, Separator>;
3
- export declare function getFieldLabel(field: NestableWidget): string;
1
+ import type { BooleanField, NestableWidget, Separator, UID } from "@prismicio/types-internal/lib/customtypes";
2
+ declare type Widgets = NestableWidget | UID;
3
+ declare type Field = Exclude<Widgets, Separator>;
4
+ export declare function getFieldLabel(field: Widgets): string;
4
5
  export declare function getFieldPlaceholder(field: Exclude<Field, BooleanField>): string;
5
6
  export declare function getFieldPlaceholder(field: BooleanField, value: boolean): string;
6
7
  export {};