html-validate 7.5.0 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.d.ts +1 -1
- package/dist/cjs/browser.js +5 -0
- package/dist/cjs/browser.js.map +1 -1
- package/dist/cjs/core.d.ts +52 -1
- package/dist/cjs/core.js +363 -130
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/jest.d.ts +1 -1
- package/dist/cjs/test-utils.d.ts +1 -1
- package/dist/es/browser.d.ts +1 -1
- package/dist/es/browser.js +1 -1
- package/dist/es/cli.js +1 -1
- package/dist/es/core.d.ts +52 -1
- package/dist/es/core.js +355 -123
- package/dist/es/core.js.map +1 -1
- package/dist/es/html-validate.js +1 -1
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +1 -1
- package/dist/es/jest-lib.js +1 -1
- package/dist/es/jest.d.ts +1 -1
- package/dist/es/test-utils.d.ts +1 -1
- package/package.json +9 -9
package/dist/cjs/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AttributeData,
|
|
1
|
+
export { A as AttributeData, a2 as AttributeEvent, f as CSSStyleDeclaration, a4 as ConditionalEvent, C as Config, a as ConfigData, b as ConfigError, c as ConfigLoader, Q as ConfigReadyEvent, a7 as DOMLoadEvent, a8 as DOMReadyEvent, x as DeferredMessage, a5 as DirectiveEvent, a6 as DoctypeEvent, D as DynamicValue, a1 as ElementReadyEvent, O as Event, K as EventCallback, E as EventDump, J as EventHandler, e as HtmlElement, H as HtmlValidate, aa as ListenEventMap, L as Location, u as Message, m as MetaCopyableProperty, M as MetaData, j as MetaDataTable, k as MetaElement, l as MetaTable, i as NestedError, N as NodeClosed, G as Parser, F as Plugin, P as ProcessElementContext, s as Report, t as Reporter, w as Result, R as Rule, n as RuleDocumentation, h as SchemaValidationError, S as Severity, r as Source, V as SourceReadyEvent, d as StaticConfigLoader, $ as TagCloseEvent, _ as TagEndEvent, Z as TagOpenEvent, a0 as TagReadyEvent, Y as TagStartEvent, B as TemplateExtractor, q as TextClassification, T as TextNode, g as TokenDump, X as TokenEvent, y as TransformContext, z as Transformer, a9 as TriggerEventMap, U as UserError, a3 as WhitespaceEvent, W as WrappedError, o as classifyNodeText, p as configPresets, I as ruleExists, v as version } from './core.js';
|
|
2
2
|
import 'ajv';
|
package/dist/cjs/browser.js
CHANGED
|
@@ -41,9 +41,14 @@ Object.defineProperty(exports, 'Severity', {
|
|
|
41
41
|
});
|
|
42
42
|
exports.StaticConfigLoader = core.StaticConfigLoader;
|
|
43
43
|
exports.TemplateExtractor = core.TemplateExtractor;
|
|
44
|
+
Object.defineProperty(exports, 'TextClassification', {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return core.TextClassification; }
|
|
47
|
+
});
|
|
44
48
|
exports.TextNode = core.TextNode;
|
|
45
49
|
exports.UserError = core.UserError;
|
|
46
50
|
exports.WrappedError = core.WrappedError;
|
|
51
|
+
exports.classifyNodeText = core.classifyNodeText;
|
|
47
52
|
exports.configPresets = core.presets;
|
|
48
53
|
exports.ruleExists = core.ruleExists;
|
|
49
54
|
exports.version = core.version;
|
package/dist/cjs/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/core.d.ts
CHANGED
|
@@ -1262,6 +1262,15 @@ declare class HtmlElement extends DOMNode {
|
|
|
1262
1262
|
* E.g. `my-annotation` or `<div>`.
|
|
1263
1263
|
*/
|
|
1264
1264
|
get annotatedName(): string;
|
|
1265
|
+
/**
|
|
1266
|
+
* Get list of IDs referenced by `aria-labelledby`.
|
|
1267
|
+
*
|
|
1268
|
+
* If the attribute is unset or empty this getter returns null.
|
|
1269
|
+
* If the attribute is dynamic the original {@link DynamicValue} is returned.
|
|
1270
|
+
*
|
|
1271
|
+
* @public
|
|
1272
|
+
*/
|
|
1273
|
+
get ariaLabelledby(): string[] | DynamicValue | null;
|
|
1265
1274
|
/**
|
|
1266
1275
|
* Similar to childNodes but only elements.
|
|
1267
1276
|
*/
|
|
@@ -2239,6 +2248,48 @@ declare class StaticConfigLoader extends ConfigLoader {
|
|
|
2239
2248
|
/** @public */
|
|
2240
2249
|
declare const version: string;
|
|
2241
2250
|
|
|
2251
|
+
declare const HTML_CACHE_KEY: unique symbol;
|
|
2252
|
+
declare const A11Y_CACHE_KEY: unique symbol;
|
|
2253
|
+
declare const IGNORE_HIDDEN_ROOT_HTML_CACHE_KEY: unique symbol;
|
|
2254
|
+
declare const IGNORE_HIDDEN_ROOT_A11Y_CACHE_KEY: unique symbol;
|
|
2255
|
+
/**
|
|
2256
|
+
* @public
|
|
2257
|
+
*/
|
|
2258
|
+
declare enum TextClassification {
|
|
2259
|
+
EMPTY_TEXT = 0,
|
|
2260
|
+
DYNAMIC_TEXT = 1,
|
|
2261
|
+
STATIC_TEXT = 2
|
|
2262
|
+
}
|
|
2263
|
+
/**
|
|
2264
|
+
* @public
|
|
2265
|
+
*/
|
|
2266
|
+
interface TextClassificationOptions {
|
|
2267
|
+
/** If `true` only accessible text is considered (default false) */
|
|
2268
|
+
accessible?: boolean;
|
|
2269
|
+
/** If `true` the `hidden` and `aria-hidden` attribute is ignored on the root
|
|
2270
|
+
* (and parents) elements (default false) */
|
|
2271
|
+
ignoreHiddenRoot?: boolean;
|
|
2272
|
+
}
|
|
2273
|
+
declare module "../../dom/cache" {
|
|
2274
|
+
interface DOMNodeCache {
|
|
2275
|
+
[HTML_CACHE_KEY]: TextClassification;
|
|
2276
|
+
[A11Y_CACHE_KEY]: TextClassification;
|
|
2277
|
+
[IGNORE_HIDDEN_ROOT_HTML_CACHE_KEY]: TextClassification;
|
|
2278
|
+
[IGNORE_HIDDEN_ROOT_A11Y_CACHE_KEY]: TextClassification;
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
/**
|
|
2282
|
+
* Checks text content of an element.
|
|
2283
|
+
*
|
|
2284
|
+
* Any text is considered including text from descendant elements. Whitespace is
|
|
2285
|
+
* ignored.
|
|
2286
|
+
*
|
|
2287
|
+
* If any text is dynamic `TextClassification.DYNAMIC_TEXT` is returned.
|
|
2288
|
+
*
|
|
2289
|
+
* @public
|
|
2290
|
+
*/
|
|
2291
|
+
declare function classifyNodeText(node: HtmlElement, options?: TextClassificationOptions): TextClassification;
|
|
2292
|
+
|
|
2242
2293
|
/**
|
|
2243
2294
|
* @public
|
|
2244
2295
|
*/
|
|
@@ -2345,4 +2396,4 @@ declare type Formatter = (results: Result[]) => string;
|
|
|
2345
2396
|
*/
|
|
2346
2397
|
declare function getFormatter(name: string): Formatter | null;
|
|
2347
2398
|
|
|
2348
|
-
export {
|
|
2399
|
+
export { TagCloseEvent as $, AttributeData as A, TemplateExtractor as B, Config as C, DynamicValue as D, EventDump as E, Plugin as F, Parser as G, HtmlValidate as H, ruleExists as I, EventHandler as J, EventCallback as K, Location as L, MetaData as M, NodeClosed as N, Event as O, ProcessElementContext as P, ConfigReadyEvent as Q, Rule as R, Severity as S, TextNode as T, UserError as U, SourceReadyEvent as V, WrappedError as W, TokenEvent as X, TagStartEvent as Y, TagOpenEvent as Z, TagEndEvent as _, ConfigData as a, TagReadyEvent as a0, ElementReadyEvent as a1, AttributeEvent as a2, WhitespaceEvent as a3, ConditionalEvent as a4, DirectiveEvent as a5, DoctypeEvent as a6, DOMLoadEvent as a7, DOMReadyEvent as a8, TriggerEventMap as a9, ListenEventMap as aa, FileSystemConfigLoader as ab, Formatter as ac, getFormatter as ad, compatibilityCheck as ae, CompatibilityOptions as af, ConfigError as b, ConfigLoader as c, StaticConfigLoader as d, HtmlElement as e, CSSStyleDeclaration as f, TokenDump as g, SchemaValidationError as h, NestedError as i, MetaDataTable as j, MetaElement as k, MetaTable as l, MetaCopyableProperty as m, RuleDocumentation as n, classifyNodeText as o, presets as p, TextClassification as q, Source as r, Report as s, Reporter as t, Message as u, version as v, Result as w, DeferredMessage as x, TransformContext as y, Transformer as z };
|