UNPKG

datocms-structured-text-utils

Version:

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

90 lines 3.67 kB
"use strict"; var _a, _b; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultMarks = exports.allowedAttributes = exports.inlineNodeTypes = exports.allowedChildren = exports.allowedNodeTypes = exports.thematicBreakNodeType = exports.spanNodeType = exports.rootNodeType = exports.paragraphNodeType = exports.listNodeType = exports.listItemNodeType = exports.linkNodeType = exports.itemLinkNodeType = exports.inlineItemNodeType = exports.headingNodeType = exports.codeNodeType = exports.inlineBlockNodeType = exports.blockNodeType = exports.blockquoteNodeType = void 0; exports.blockquoteNodeType = 'blockquote'; exports.blockNodeType = 'block'; exports.inlineBlockNodeType = 'inlineBlock'; exports.codeNodeType = 'code'; exports.headingNodeType = 'heading'; exports.inlineItemNodeType = 'inlineItem'; exports.itemLinkNodeType = 'itemLink'; 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.inlineBlockNodeType, exports.codeNodeType, exports.headingNodeType, exports.inlineItemNodeType, exports.itemLinkNodeType, exports.linkNodeType, exports.listItemNodeType, exports.listNodeType, exports.paragraphNodeType, exports.rootNodeType, exports.spanNodeType, exports.thematicBreakNodeType, ]; exports.allowedChildren = (_a = {}, _a[exports.blockquoteNodeType] = [exports.paragraphNodeType], _a[exports.blockNodeType] = [], _a[exports.inlineBlockNodeType] = [], _a[exports.codeNodeType] = [], _a[exports.headingNodeType] = 'inlineNodes', _a[exports.inlineItemNodeType] = [], _a[exports.itemLinkNodeType] = 'inlineNodes', _a[exports.linkNodeType] = 'inlineNodes', _a[exports.listItemNodeType] = [exports.paragraphNodeType, exports.listNodeType], _a[exports.listNodeType] = [exports.listItemNodeType], _a[exports.paragraphNodeType] = 'inlineNodes', _a[exports.rootNodeType] = [ exports.blockquoteNodeType, exports.codeNodeType, exports.listNodeType, exports.paragraphNodeType, exports.headingNodeType, exports.blockNodeType, exports.thematicBreakNodeType, ], _a[exports.spanNodeType] = [], _a[exports.thematicBreakNodeType] = [], _a); exports.inlineNodeTypes = [ exports.spanNodeType, exports.linkNodeType, exports.itemLinkNodeType, exports.inlineItemNodeType, exports.inlineBlockNodeType, ]; exports.allowedAttributes = (_b = {}, _b[exports.blockquoteNodeType] = ['children', 'attribution'], _b[exports.blockNodeType] = ['item'], _b[exports.inlineBlockNodeType] = ['item'], _b[exports.codeNodeType] = ['language', 'highlight', 'code'], _b[exports.headingNodeType] = ['level', 'children', 'style'], _b[exports.inlineItemNodeType] = ['item'], _b[exports.itemLinkNodeType] = ['item', 'children', 'meta'], _b[exports.linkNodeType] = ['url', 'children', 'meta'], _b[exports.listItemNodeType] = ['children'], _b[exports.listNodeType] = ['style', 'children'], _b[exports.paragraphNodeType] = ['children', 'style'], _b[exports.rootNodeType] = ['children'], _b[exports.spanNodeType] = ['value', 'marks'], _b[exports.thematicBreakNodeType] = [], _b); exports.defaultMarks = [ 'strong', 'code', 'emphasis', 'underline', 'strikethrough', 'highlight', ]; //# sourceMappingURL=definitions.js.map