@atjson/contenttype-html
Advanced tools
Comparing version 0.5.4 to 0.5.5
@@ -7,35 +7,5 @@ import { Annotation } from '@atjson/core'; | ||
parse(): Annotation[]; | ||
newAnnotation(type: string, location: parse5.MarkupData.Location, extra?: {}): { | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} & undefined); | ||
parseElement(type: string, location: parse5.MarkupData.Location): { | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} & undefined); | ||
parseToken(type: string, location: parse5.MarkupData.Location): { | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
} & undefined); | ||
newAnnotation(type: string, location: parse5.MarkupData.Location, extra?: {}): any; | ||
parseElement(type: string, location: parse5.MarkupData.Location): any; | ||
parseToken(type: string, location: parse5.MarkupData.Location): any; | ||
walkNode(node: parse5.AST.Default.Element): Annotation[]; | ||
@@ -51,8 +21,3 @@ walkChildren(children: parse5.AST.Default.Node[]): Annotation[]; | ||
convertSelfClosingNodeToAnnotations(type: string, node: parse5.AST.Default.Element): Annotation[]; | ||
convertEnclosedNodeToAnnotations(type: string, node: parse5.AST.Default.Element): { | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
}[]; | ||
convertEnclosedNodeToAnnotations(type: string, node: parse5.AST.Default.Element): any[]; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const parse5 = require("parse5"); | ||
const TAG_MAP = { | ||
var parse5 = require("parse5"); | ||
var TAG_MAP = { | ||
p: 'paragraph', | ||
@@ -11,3 +11,3 @@ ul: 'unordered-list', | ||
}; | ||
const isElement = (node) => { | ||
var isElement = function (node) { | ||
return (node.nodeName !== undefined && | ||
@@ -17,18 +17,18 @@ node.nodeName !== '#text' && | ||
}; | ||
const isParentNode = (node) => { | ||
var isParentNode = function (node) { | ||
return node.nodeName === '#document-fragment'; | ||
}; | ||
class Parser { | ||
constructor(content) { | ||
var Parser = (function () { | ||
function Parser(content) { | ||
this.content = content; | ||
} | ||
parse() { | ||
let tree = parse5.parseFragment(this.content, { locationInfo: true }); | ||
Parser.prototype.parse = function () { | ||
var tree = parse5.parseFragment(this.content, { locationInfo: true }); | ||
if (isParentNode(tree)) | ||
return this.walkChildren(tree.childNodes); | ||
throw new Error('Invalid return from parser. Failing.'); | ||
} | ||
newAnnotation(type, location, extra) { | ||
}; | ||
Parser.prototype.newAnnotation = function (type, location, extra) { | ||
return Object.assign({ | ||
type, | ||
type: type, | ||
attributes: {}, | ||
@@ -38,17 +38,18 @@ start: location.startOffset, | ||
}, extra); | ||
} | ||
parseElement(type, location) { | ||
}; | ||
Parser.prototype.parseElement = function (type, location) { | ||
return this.newAnnotation('parse-element', location, { htmlType: type }); | ||
} | ||
parseToken(type, location) { | ||
}; | ||
Parser.prototype.parseToken = function (type, location) { | ||
return this.newAnnotation('parse-token', location, { htmlType: type }); | ||
} | ||
walkNode(node) { | ||
let annotations = this.convertNodeToAnnotations(node); | ||
}; | ||
Parser.prototype.walkNode = function (node) { | ||
var annotations = this.convertNodeToAnnotations(node); | ||
return annotations.concat(this.walkChildren(node.childNodes)); | ||
} | ||
walkChildren(children) { | ||
return (children || []).reduce((annotations, child) => { | ||
}; | ||
Parser.prototype.walkChildren = function (children) { | ||
var _this = this; | ||
return (children || []).reduce(function (annotations, child) { | ||
if (isElement(child)) { | ||
return annotations.concat(this.walkNode(child)); | ||
return annotations.concat(_this.walkNode(child)); | ||
} | ||
@@ -59,5 +60,5 @@ else { | ||
}, []); | ||
} | ||
convertNodeToAnnotations(node) { | ||
let type; | ||
}; | ||
Parser.prototype.convertNodeToAnnotations = function (node) { | ||
var type; | ||
if (TAG_MAP[node.tagName]) { | ||
@@ -87,12 +88,12 @@ type = TAG_MAP[node.tagName]; | ||
} | ||
} | ||
convertElementToAttrObject(attrs, attr) { | ||
}; | ||
Parser.prototype.convertElementToAttrObject = function (attrs, attr) { | ||
attrs[attr.name] = attr.value; | ||
return attrs; | ||
} | ||
attributesForNode(node) { | ||
}; | ||
Parser.prototype.attributesForNode = function (node) { | ||
return (node.attrs || []).reduce(this.convertElementToAttrObject, {}); | ||
} | ||
convertSelfClosingNodeToAnnotations(type, node) { | ||
let annotations = []; | ||
}; | ||
Parser.prototype.convertSelfClosingNodeToAnnotations = function (type, node) { | ||
var annotations = []; | ||
if (node.__location !== undefined) { | ||
@@ -106,5 +107,5 @@ annotations.push(this.parseToken(type, node.__location.startTag)); | ||
return annotations; | ||
} | ||
convertEnclosedNodeToAnnotations(type, node) { | ||
let annotations = []; | ||
}; | ||
Parser.prototype.convertEnclosedNodeToAnnotations = function (type, node) { | ||
var annotations = []; | ||
if (node.__location) { | ||
@@ -114,3 +115,3 @@ annotations.push(this.parseToken(type, node.__location.startTag)); | ||
annotations.push({ | ||
type, | ||
type: type, | ||
attributes: this.attributesForNode(node), | ||
@@ -122,5 +123,6 @@ start: node.__location.startTag.endOffset, | ||
return annotations; | ||
} | ||
} | ||
}; | ||
return Parser; | ||
}()); | ||
exports.Parser = Parser; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQSxpQ0FBaUM7QUFFakMsTUFBTSxPQUFPLEdBQStCO0lBQzFDLENBQUMsRUFBRSxXQUFXO0lBQ2QsRUFBRSxFQUFFLGdCQUFnQjtJQUNwQixFQUFFLEVBQUUsY0FBYztJQUNsQixFQUFFLEVBQUUsV0FBVztJQUNmLEdBQUcsRUFBRSxPQUFPO0NBQ2IsQ0FBQztBQUVGLE1BQU0sU0FBUyxHQUF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 import { Annotation } from '@atjson/core'; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} & undefined); | ||
@@ -22,9 +22,9 @@ parseElement(type: string, location: parse5.MarkupData.Location): { | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} & undefined); | ||
@@ -34,9 +34,9 @@ parseToken(type: string, location: parse5.MarkupData.Location): { | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} | ({ | ||
type: string; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
} & undefined); | ||
@@ -56,5 +56,5 @@ walkNode(node: parse5.AST.Default.Element): Annotation[]; | ||
attributes: {}; | ||
start: number; | ||
end: number; | ||
start: any; | ||
end: any; | ||
}[]; | ||
} |
{ | ||
"name": "@atjson/contenttype-html", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"description": "A brand new TypeScript library.", | ||
@@ -18,8 +18,8 @@ "main": "dist/commonjs/index.js", | ||
"devDependencies": { | ||
"@atjson/hir": "^0.5.4", | ||
"@atjson/renderer-hir": "^0.5.4", | ||
"@atjson/hir": "^0.5.5", | ||
"@atjson/renderer-hir": "^0.5.5", | ||
"typescript": "^2.4.2" | ||
}, | ||
"dependencies": { | ||
"@atjson/core": "^0.5.4", | ||
"@atjson/core": "^0.5.5", | ||
"entities": "^1.1.1", | ||
@@ -26,0 +26,0 @@ "parse5": "^3.0.2" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27042
436
Updated@atjson/core@^0.5.5