UNPKG

@prismicio/types-internal

Version:
74 lines (73 loc) 2.62 kB
import * as t from "io-ts"; export declare const RichTextFieldType = "StructuredText"; export declare const DEFAULT_OPTION = "paragraph"; export declare type RichTextNodeType = typeof RichTextNodeType[keyof typeof RichTextNodeType]; export declare const RichTextNodeType: { readonly heading1: "heading1"; readonly heading2: "heading2"; readonly heading3: "heading3"; readonly heading4: "heading4"; readonly heading5: "heading5"; readonly heading6: "heading6"; readonly paragraph: "paragraph"; readonly strong: "strong"; readonly em: "em"; readonly preformatted: "preformatted"; readonly hyperlink: "hyperlink"; readonly image: "image"; readonly embed: "embed"; readonly list: "list-item"; readonly orderedList: "o-list-item"; readonly rtl: "rtl"; }; export declare const RichTextNodeTypeCodec: t.KeyofC<{ heading1: null; heading2: null; heading3: null; heading4: null; heading5: null; heading6: null; paragraph: null; strong: null; em: null; preformatted: null; hyperlink: null; image: null; embed: null; "list-item": null; "o-list-item": null; rtl: null; }>; export declare const RichTextConfig: t.ExactC<t.PartialC<{ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; placeholder: t.StringC; useAsTitle: t.BooleanC; single: t.Type<string, string, unknown>; multi: t.Type<string, string, unknown>; imageConstraint: t.PartialC<{ width: t.Type<number | null, unknown, unknown>; height: t.Type<number | null, unknown, unknown>; }>; labels: t.Type<readonly string[], object, unknown>; allowTargetBlank: t.BooleanC; }>>; export declare type RichTextConfig = t.TypeOf<typeof RichTextConfig>; export declare const RichText: t.ExactC<t.IntersectionC<[t.TypeC<{ type: t.LiteralC<"StructuredText">; }>, t.PartialC<{ fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; config: t.ExactC<t.PartialC<{ label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; placeholder: t.StringC; useAsTitle: t.BooleanC; single: t.Type<string, string, unknown>; multi: t.Type<string, string, unknown>; imageConstraint: t.PartialC<{ width: t.Type<number | null, unknown, unknown>; height: t.Type<number | null, unknown, unknown>; }>; labels: t.Type<readonly string[], object, unknown>; allowTargetBlank: t.BooleanC; }>>; }>]>>; export declare type RichText = t.TypeOf<typeof RichText>;