datocms-structured-text-utils
Version:
A set of Typescript types and helpers to work with DatoCMS Structured Text fields.
23 lines (22 loc) • 1.21 kB
TypeScript
import { DefaultMark, NodeType } from './types';
export declare const blockquoteNodeType: "blockquote";
export declare const blockNodeType: "block";
export declare const inlineBlockNodeType: "inlineBlock";
export declare const codeNodeType: "code";
export declare const headingNodeType: "heading";
export declare const inlineItemNodeType: "inlineItem";
export declare const itemLinkNodeType: "itemLink";
export declare const linkNodeType: "link";
export declare const listItemNodeType: "listItem";
export declare const listNodeType: "list";
export declare const paragraphNodeType: "paragraph";
export declare const rootNodeType: "root";
export declare const spanNodeType: "span";
export declare const thematicBreakNodeType: "thematicBreak";
export declare const allowedNodeTypes: NodeType[];
export declare type AllowedChildren = Record<NodeType, 'inlineNodes' | NodeType[]>;
export declare const allowedChildren: AllowedChildren;
export declare const inlineNodeTypes: ("inlineBlock" | "span" | "link" | "itemLink" | "inlineItem")[];
export declare type AllowedAttributes = Record<NodeType, string[]>;
export declare const allowedAttributes: AllowedAttributes;
export declare const defaultMarks: DefaultMark[];