UNPKG

alinea

Version:
53 lines (51 loc) 1.28 kB
import "../chunks/chunk-NZLE2WMY.js"; // src/core/TextDoc.ts var Node; ((Node2) => { Node2.type = "_type"; function isText(node) { return node[Node2.type] === "text"; } Node2.isText = isText; function isElement(node) { const typeName = node[Node2.type]; return typeof typeName === "string" && typeName !== "text" && typeName[0]?.toLowerCase() === typeName[0]; } Node2.isElement = isElement; function isBlock(node) { const typeName = node[Node2.type]; return typeof typeName === "string" && typeName !== "text" && typeName[0]?.toUpperCase() === typeName[0]; } Node2.isBlock = isBlock; })(Node || (Node = {})); var Mark; ((Mark2) => { Mark2.type = "_type"; })(Mark || (Mark = {})); var LinkMark; ((LinkMark2) => { LinkMark2.id = "_id"; LinkMark2.link = "_link"; LinkMark2.entry = "_entry"; })(LinkMark || (LinkMark = {})); var TextNode; ((TextNode2) => { TextNode2.text = "text"; TextNode2.marks = "marks"; })(TextNode || (TextNode = {})); var ElementNode; ((ElementNode2) => { ElementNode2.content = "content"; })(ElementNode || (ElementNode = {})); var BlockNode; ((BlockNode2) => { BlockNode2.id = "_id"; })(BlockNode || (BlockNode = {})); export { BlockNode, ElementNode, LinkMark, Mark, Node, TextNode };