@markuplint/ml-spec
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -6,3 +6,2 @@ "use strict"; | ||
const get_spec_by_tag_name_1 = require("../specs/get-spec-by-tag-name"); | ||
const is_palpable_elements_1 = require("../specs/is-palpable-elements"); | ||
const is_presentational_1 = require("../specs/is-presentational"); | ||
@@ -33,3 +32,3 @@ const resolve_namespace_1 = require("../utils/resolve-namespace"); | ||
{ | ||
if (!(0, is_palpable_elements_1.isPalpableElement)(el, specs, { extendsSvg: true, extendsExposableElements: true })) { | ||
if (!isExposedElement(el, specs)) { | ||
return false; | ||
@@ -192,1 +191,17 @@ } | ||
} | ||
function isExposedElement(el, specs) { | ||
var _a; | ||
const svgRenderedConditions = (_a = specs.def['#contentModels']['#SVGRenderable']) === null || _a === void 0 ? void 0 : _a.join(','); | ||
if (svgRenderedConditions && el.matches(svgRenderedConditions)) { | ||
return true; | ||
} | ||
return isNotMetaOrHiddenHTMLElement(el, specs); | ||
} | ||
function isNotMetaOrHiddenHTMLElement(el, specs) { | ||
var _a; | ||
const metadataConditions = (_a = specs.def['#contentModels']['#metadata']) === null || _a === void 0 ? void 0 : _a.join(','); | ||
if (metadataConditions && el.matches(metadataConditions)) { | ||
return false; | ||
} | ||
return !el.matches('input[type=hidden i]'); | ||
} |
@@ -15,4 +15,3 @@ /** | ||
'#HTMLGlobalAttrs'?: boolean; | ||
'#GlobalEventAttrs'?: boolean | ('onabort' | 'onauxclick' | 'onbeforeinput' | 'onbeforematch' | 'onblur' | 'oncancel' | 'oncanplay' | 'oncanplaythrough' | 'onchange' | 'onclick' | 'onclose' | 'oncontextlost' | 'oncompositionstart' | 'oncompositionupdate' | 'oncompositionend' | 'oncontextmenu' | 'oncontextrestored' | 'oncuechange' | 'ondblclick' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'ondurationchange' | 'onemptied' | 'onended' | 'onerror' | 'onfocus' | 'onformdata' | 'onfocusin' | 'onfocusout' | 'oninput' | 'oninvalid' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onload' | 'onloadeddata' | 'onloadedmetadata' | 'onloadstart' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onpause' | 'onplay' | 'onplaying' | 'onprogress' | 'onratechange' | 'onreset' | 'onresize' | 'onscroll' | 'onsecuritypolicyviolation' | 'onseeked' | 'onseeking' | 'onselect' | 'onslotchange' | 'onstalled' | 'onsubmit' | 'onsuspend' | 'ontimeupdate' | 'ontoggle' | 'onvolumechange' | 'onwaiting' | 'onwebkitanimationend' | 'onwebkitanimationiteration' | 'onwebkitanimationstart' | 'onwebkittransitionend' | 'onunload' | 'onwheel')[]; | ||
'#DocumentElementEventAttrs'?: boolean | ('oncopy' | 'oncut' | 'onpaste')[]; | ||
'#GlobalEventAttrs'?: boolean | ('onabort' | 'onauxclick' | 'onbeforeinput' | 'onbeforematch' | 'onblur' | 'oncancel' | 'oncanplay' | 'oncanplaythrough' | 'onchange' | 'onclick' | 'onclose' | 'oncompositionend' | 'oncompositionstart' | 'oncompositionupdate' | 'oncontextlost' | 'oncontextmenu' | 'oncontextrestored' | 'oncopy' | 'oncuechange' | 'oncut' | 'ondblclick' | 'ondrag' | 'ondragend' | 'ondragenter' | 'ondragleave' | 'ondragover' | 'ondragstart' | 'ondrop' | 'ondurationchange' | 'onemptied' | 'onended' | 'onerror' | 'onfocus' | 'onfocusin' | 'onfocusout' | 'onformdata' | 'oninput' | 'oninvalid' | 'onkeydown' | 'onkeypress' | 'onkeyup' | 'onload' | 'onloadeddata' | 'onloadedmetadata' | 'onloadstart' | 'onmousedown' | 'onmouseenter' | 'onmouseleave' | 'onmousemove' | 'onmouseout' | 'onmouseover' | 'onmouseup' | 'onpaste' | 'onpause' | 'onplay' | 'onplaying' | 'onprogress' | 'onratechange' | 'onreset' | 'onresize' | 'onscroll' | 'onsecuritypolicyviolation' | 'onseeked' | 'onseeking' | 'onselect' | 'onslotchange' | 'onstalled' | 'onsubmit' | 'onsuspend' | 'ontimeupdate' | 'ontoggle' | 'onunload' | 'onvolumechange' | 'onwaiting' | 'onwebkitanimationend' | 'onwebkitanimationiteration' | 'onwebkitanimationstart' | 'onwebkittransitionend' | 'onwheel')[]; | ||
/** | ||
@@ -19,0 +18,0 @@ * @minItems 0 |
{ | ||
"name": "@markuplint/ml-spec", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Types and schema that specs of the Markup languages for markuplint", | ||
@@ -34,3 +34,3 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
}, | ||
"gitHead": "4ade31aab89b4bcc3527d4b00bcbfa3dbd6eb032" | ||
"gitHead": "0e75df6944f453bc19d2a6e05ad264788a8dc149" | ||
} |
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
126736
76
2940