@nacelle/rich-text-utils
Version:
A set of Typescript types and helpers to work with Rich Text fields.
84 lines • 3.32 kB
JavaScript
"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.paragraphNodeType],
[]: [],
[]: [],
[]: 'inlineNodes',
[]: [],
[]: 'inlineNodes',
[]: 'inlineNodes',
[]: [exports.paragraphNodeType, exports.listNodeType],
[]: [exports.listItemNodeType],
[]: 'inlineNodes',
[]: [
exports.blockquoteNodeType,
exports.codeNodeType,
exports.listNodeType,
exports.paragraphNodeType,
exports.headingNodeType,
exports.blockNodeType,
exports.thematicBreakNodeType,
],
[]: [],
[]: [],
};
exports.inlineNodeTypes = [
exports.spanNodeType,
exports.linkNodeType,
exports.entryLinkNodeType,
exports.inlineEntryNodeType,
];
exports.allowedAttributes = {
[]: ['children', 'attribution'],
[]: ['entry'],
[]: ['language', 'highlight', 'code'],
[]: ['level', 'children'],
[]: ['entry'],
[]: ['entry', 'children', 'meta'],
[]: ['url', 'children', 'meta'],
[]: ['children'],
[]: ['style', 'children'],
[]: ['children'],
[]: ['children'],
[]: ['value', 'marks'],
[]: [],
};
exports.allowedMarks = [
'strong',
'code',
'emphasis',
'underline',
'strikethrough',
'highlight',
];
//# sourceMappingURL=definitions.js.map