html-validate 8.8.0 → 8.9.1
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/cli.js +36 -21
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/core.js +345 -71
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/elements.js +18 -0
- package/dist/cjs/elements.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/cli.js +37 -22
- package/dist/es/cli.js.map +1 -1
- package/dist/es/core.js +345 -71
- package/dist/es/core.js.map +1 -1
- package/dist/es/elements.js +18 -0
- package/dist/es/elements.js.map +1 -1
- package/dist/schema/elements.json +6 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +24 -2
- package/dist/types/index.d.ts +24 -2
- package/package.json +12 -12
package/dist/tsdoc-metadata.json
CHANGED
package/dist/types/browser.d.ts
CHANGED
|
@@ -689,7 +689,7 @@ export declare type EventCallback = (event: string, data: any) => void;
|
|
|
689
689
|
* @public
|
|
690
690
|
*/
|
|
691
691
|
export declare class EventHandler {
|
|
692
|
-
listeners
|
|
692
|
+
private listeners;
|
|
693
693
|
constructor();
|
|
694
694
|
/**
|
|
695
695
|
* Add an event listener.
|
|
@@ -715,6 +715,7 @@ export declare class EventHandler {
|
|
|
715
715
|
* @param data - Event data.
|
|
716
716
|
*/
|
|
717
717
|
trigger(event: string, data: any): void;
|
|
718
|
+
private getCallbacks;
|
|
718
719
|
}
|
|
719
720
|
|
|
720
721
|
/**
|
|
@@ -814,6 +815,13 @@ export declare class HtmlElement extends DOMNode {
|
|
|
814
815
|
*/
|
|
815
816
|
matches(selector: string): boolean;
|
|
816
817
|
get meta(): MetaElement | null;
|
|
818
|
+
/**
|
|
819
|
+
* Get current role for this element (explicit with `role` attribute or mapped
|
|
820
|
+
* with implicit role).
|
|
821
|
+
*
|
|
822
|
+
* @since 8.9.1
|
|
823
|
+
*/
|
|
824
|
+
get role(): string | DynamicValue | null;
|
|
817
825
|
/**
|
|
818
826
|
* Set annotation for this element.
|
|
819
827
|
*/
|
|
@@ -1414,6 +1422,8 @@ export declare interface MetaData {
|
|
|
1414
1422
|
transparent?: boolean | string[];
|
|
1415
1423
|
implicitClosed?: string[];
|
|
1416
1424
|
scriptSupporting?: boolean;
|
|
1425
|
+
/** Mark element as able to receive focus (without explicit `tabindex`) */
|
|
1426
|
+
focusable?: boolean | MetaFocusableCallback;
|
|
1417
1427
|
form?: boolean;
|
|
1418
1428
|
/** Mark element as a form-associated element */
|
|
1419
1429
|
formAssociated?: Partial<FormAssociated>;
|
|
@@ -1468,12 +1478,24 @@ export declare type MetaDataTable = Record<string, MetaData>;
|
|
|
1468
1478
|
*/
|
|
1469
1479
|
export declare interface MetaElement extends Omit<MetaData, "deprecatedAttributes" | "requiredAttributes"> {
|
|
1470
1480
|
tagName: string;
|
|
1481
|
+
focusable: boolean | MetaFocusableCallback;
|
|
1471
1482
|
formAssociated?: FormAssociated;
|
|
1472
1483
|
implicitRole: MetaImplicitRoleCallback;
|
|
1473
1484
|
attributes: Record<string, MetaAttribute>;
|
|
1474
1485
|
textContent?: TextContent;
|
|
1475
1486
|
}
|
|
1476
1487
|
|
|
1488
|
+
/**
|
|
1489
|
+
* Callback for the `focusable` property of `MetaData`. It takes a node and
|
|
1490
|
+
* returns whenever the element is focusable or not.
|
|
1491
|
+
*
|
|
1492
|
+
* @public
|
|
1493
|
+
* @since 8.9.0
|
|
1494
|
+
* @param node - The node to determine if it is focusable.
|
|
1495
|
+
* @returns `true` if the node is focusable.
|
|
1496
|
+
*/
|
|
1497
|
+
export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
|
|
1498
|
+
|
|
1477
1499
|
/**
|
|
1478
1500
|
* Callback for the `implicitRole` property of `MetaData`. It takes a node and
|
|
1479
1501
|
* returns the implicit ARIA role, if any.
|
|
@@ -1491,7 +1513,7 @@ export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string
|
|
|
1491
1513
|
*
|
|
1492
1514
|
* @public
|
|
1493
1515
|
*/
|
|
1494
|
-
export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "form" | "formAssociated" | "labelable";
|
|
1516
|
+
export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "focusable" | "form" | "formAssociated" | "labelable";
|
|
1495
1517
|
|
|
1496
1518
|
/**
|
|
1497
1519
|
* @public
|
package/dist/types/index.d.ts
CHANGED
|
@@ -785,7 +785,7 @@ export declare type EventCallback = (event: string, data: any) => void;
|
|
|
785
785
|
* @public
|
|
786
786
|
*/
|
|
787
787
|
export declare class EventHandler {
|
|
788
|
-
listeners
|
|
788
|
+
private listeners;
|
|
789
789
|
constructor();
|
|
790
790
|
/**
|
|
791
791
|
* Add an event listener.
|
|
@@ -811,6 +811,7 @@ export declare class EventHandler {
|
|
|
811
811
|
* @param data - Event data.
|
|
812
812
|
*/
|
|
813
813
|
trigger(event: string, data: any): void;
|
|
814
|
+
private getCallbacks;
|
|
814
815
|
}
|
|
815
816
|
|
|
816
817
|
/**
|
|
@@ -1032,6 +1033,13 @@ export declare class HtmlElement extends DOMNode {
|
|
|
1032
1033
|
*/
|
|
1033
1034
|
matches(selector: string): boolean;
|
|
1034
1035
|
get meta(): MetaElement | null;
|
|
1036
|
+
/**
|
|
1037
|
+
* Get current role for this element (explicit with `role` attribute or mapped
|
|
1038
|
+
* with implicit role).
|
|
1039
|
+
*
|
|
1040
|
+
* @since 8.9.1
|
|
1041
|
+
*/
|
|
1042
|
+
get role(): string | DynamicValue | null;
|
|
1035
1043
|
/**
|
|
1036
1044
|
* Set annotation for this element.
|
|
1037
1045
|
*/
|
|
@@ -1639,6 +1647,8 @@ export declare interface MetaData {
|
|
|
1639
1647
|
transparent?: boolean | string[];
|
|
1640
1648
|
implicitClosed?: string[];
|
|
1641
1649
|
scriptSupporting?: boolean;
|
|
1650
|
+
/** Mark element as able to receive focus (without explicit `tabindex`) */
|
|
1651
|
+
focusable?: boolean | MetaFocusableCallback;
|
|
1642
1652
|
form?: boolean;
|
|
1643
1653
|
/** Mark element as a form-associated element */
|
|
1644
1654
|
formAssociated?: Partial<FormAssociated>;
|
|
@@ -1693,12 +1703,24 @@ export declare type MetaDataTable = Record<string, MetaData>;
|
|
|
1693
1703
|
*/
|
|
1694
1704
|
export declare interface MetaElement extends Omit<MetaData, "deprecatedAttributes" | "requiredAttributes"> {
|
|
1695
1705
|
tagName: string;
|
|
1706
|
+
focusable: boolean | MetaFocusableCallback;
|
|
1696
1707
|
formAssociated?: FormAssociated;
|
|
1697
1708
|
implicitRole: MetaImplicitRoleCallback;
|
|
1698
1709
|
attributes: Record<string, MetaAttribute>;
|
|
1699
1710
|
textContent?: TextContent;
|
|
1700
1711
|
}
|
|
1701
1712
|
|
|
1713
|
+
/**
|
|
1714
|
+
* Callback for the `focusable` property of `MetaData`. It takes a node and
|
|
1715
|
+
* returns whenever the element is focusable or not.
|
|
1716
|
+
*
|
|
1717
|
+
* @public
|
|
1718
|
+
* @since 8.9.0
|
|
1719
|
+
* @param node - The node to determine if it is focusable.
|
|
1720
|
+
* @returns `true` if the node is focusable.
|
|
1721
|
+
*/
|
|
1722
|
+
export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
|
|
1723
|
+
|
|
1702
1724
|
/**
|
|
1703
1725
|
* Callback for the `implicitRole` property of `MetaData`. It takes a node and
|
|
1704
1726
|
* returns the implicit ARIA role, if any.
|
|
@@ -1716,7 +1738,7 @@ export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string
|
|
|
1716
1738
|
*
|
|
1717
1739
|
* @public
|
|
1718
1740
|
*/
|
|
1719
|
-
export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "form" | "formAssociated" | "labelable";
|
|
1741
|
+
export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "focusable" | "form" | "formAssociated" | "labelable";
|
|
1720
1742
|
|
|
1721
1743
|
/**
|
|
1722
1744
|
* @public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-validate",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.1",
|
|
4
4
|
"description": "Offline html5 validator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"html",
|
|
@@ -201,15 +201,15 @@
|
|
|
201
201
|
"semver": "^7.0.0"
|
|
202
202
|
},
|
|
203
203
|
"devDependencies": {
|
|
204
|
-
"@html-validate/commitlint-config": "3.0.
|
|
205
|
-
"@html-validate/eslint-config": "5.12.
|
|
206
|
-
"@html-validate/eslint-config-jest": "5.12.
|
|
207
|
-
"@html-validate/eslint-config-typescript": "5.12.
|
|
208
|
-
"@html-validate/eslint-config-typescript-typeinfo": "5.12.
|
|
204
|
+
"@html-validate/commitlint-config": "3.0.28",
|
|
205
|
+
"@html-validate/eslint-config": "5.12.6",
|
|
206
|
+
"@html-validate/eslint-config-jest": "5.12.6",
|
|
207
|
+
"@html-validate/eslint-config-typescript": "5.12.6",
|
|
208
|
+
"@html-validate/eslint-config-typescript-typeinfo": "5.12.6",
|
|
209
209
|
"@html-validate/jest-config": "3.7.7",
|
|
210
210
|
"@html-validate/prettier-config": "2.4.10",
|
|
211
|
-
"@html-validate/release-scripts": "
|
|
212
|
-
"@microsoft/api-extractor": "7.39.
|
|
211
|
+
"@html-validate/release-scripts": "6.1.0",
|
|
212
|
+
"@microsoft/api-extractor": "7.39.1",
|
|
213
213
|
"@rollup/plugin-commonjs": "25.0.7",
|
|
214
214
|
"@rollup/plugin-json": "6.1.0",
|
|
215
215
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
"@types/babel__code-frame": "7.0.6",
|
|
220
220
|
"@types/jest": "29.5.11",
|
|
221
221
|
"@types/minimist": "1.2.5",
|
|
222
|
-
"@types/node": "16.18.
|
|
222
|
+
"@types/node": "16.18.70",
|
|
223
223
|
"@types/prompts": "2.4.9",
|
|
224
224
|
"@types/semver": "7.5.6",
|
|
225
225
|
"@types/stream-buffers": "3.0.7",
|
|
@@ -230,11 +230,11 @@
|
|
|
230
230
|
"jest-diff": "29.7.0",
|
|
231
231
|
"jest-environment-jsdom": "29.7.0",
|
|
232
232
|
"jest-snapshot": "29.7.0",
|
|
233
|
-
"marked": "11.1.
|
|
233
|
+
"marked": "11.1.1",
|
|
234
234
|
"memfs": "4.6.0",
|
|
235
235
|
"npm-pkg-lint": "2.1.0",
|
|
236
236
|
"npm-run-all": "4.1.5",
|
|
237
|
-
"rollup": "4.9.
|
|
237
|
+
"rollup": "4.9.4",
|
|
238
238
|
"rollup-plugin-esbuild": "6.1.0",
|
|
239
239
|
"stream-buffers": "3.0.2",
|
|
240
240
|
"ts-jest": "29.1.1",
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
"semver"
|
|
276
276
|
],
|
|
277
277
|
"overrides": {
|
|
278
|
-
"marked": "11.1.
|
|
278
|
+
"marked": "11.1.1"
|
|
279
279
|
},
|
|
280
280
|
"renovate": {
|
|
281
281
|
"extends": [
|