UNPKG

@nacelle/rich-text-utils

Version:

A set of Typescript types and helpers to work with Rich Text fields.

84 lines 3.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.allowedMarks = exports.allowedAttributes = exports.inlineNodeTypes = exports.allowedChildren = exports.allowedNodeTypes = exports.thematicBreakNodeType = exports.spanNodeType = exports.rootNodeType = exports.paragraphNodeType = exports.listNodeType = exports.listItemNodeType = exports.linkNodeType = exports.entryLinkNodeType = exports.inlineEntryNodeType = exports.headingNodeType = exports.codeNodeType = exports.blockNodeType = exports.blockquoteNodeType = void 0; exports.blockquoteNodeType = 'blockquote'; exports.blockNodeType = 'block'; exports.codeNodeType = 'code'; exports.headingNodeType = 'heading'; exports.inlineEntryNodeType = 'inlineEntry'; exports.entryLinkNodeType = 'entryLink'; exports.linkNodeType = 'link'; exports.listItemNodeType = 'listItem'; exports.listNodeType = 'list'; exports.paragraphNodeType = 'paragraph'; exports.rootNodeType = 'root'; exports.spanNodeType = 'span'; exports.thematicBreakNodeType = 'thematicBreak'; exports.allowedNodeTypes = [ exports.blockquoteNodeType, exports.blockNodeType, exports.codeNodeType, exports.headingNodeType, exports.inlineEntryNodeType, exports.entryLinkNodeType, exports.linkNodeType, exports.listItemNodeType, exports.listNodeType, exports.paragraphNodeType, exports.rootNodeType, exports.spanNodeType, exports.thematicBreakNodeType, ]; exports.allowedChildren = { [exports.blockquoteNodeType]: [exports.paragraphNodeType], [exports.blockNodeType]: [], [exports.codeNodeType]: [], [exports.headingNodeType]: 'inlineNodes', [exports.inlineEntryNodeType]: [], [exports.entryLinkNodeType]: 'inlineNodes', [exports.linkNodeType]: 'inlineNodes', [exports.listItemNodeType]: [exports.paragraphNodeType, exports.listNodeType], [exports.listNodeType]: [exports.listItemNodeType], [exports.paragraphNodeType]: 'inlineNodes', [exports.rootNodeType]: [ exports.blockquoteNodeType, exports.codeNodeType, exports.listNodeType, exports.paragraphNodeType, exports.headingNodeType, exports.blockNodeType, exports.thematicBreakNodeType, ], [exports.spanNodeType]: [], [exports.thematicBreakNodeType]: [], }; exports.inlineNodeTypes = [ exports.spanNodeType, exports.linkNodeType, exports.entryLinkNodeType, exports.inlineEntryNodeType, ]; exports.allowedAttributes = { [exports.blockquoteNodeType]: ['children', 'attribution'], [exports.blockNodeType]: ['entry'], [exports.codeNodeType]: ['language', 'highlight', 'code'], [exports.headingNodeType]: ['level', 'children'], [exports.inlineEntryNodeType]: ['entry'], [exports.entryLinkNodeType]: ['entry', 'children', 'meta'], [exports.linkNodeType]: ['url', 'children', 'meta'], [exports.listItemNodeType]: ['children'], [exports.listNodeType]: ['style', 'children'], [exports.paragraphNodeType]: ['children'], [exports.rootNodeType]: ['children'], [exports.spanNodeType]: ['value', 'marks'], [exports.thematicBreakNodeType]: [], }; exports.allowedMarks = [ 'strong', 'code', 'emphasis', 'underline', 'strikethrough', 'highlight', ]; //# sourceMappingURL=definitions.js.map