html-validate 11.2.0 → 11.4.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/core.js +184 -39
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/elements.js +127 -3
- package/dist/cjs/elements.js.map +1 -1
- package/dist/esm/core.js +184 -39
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/elements.js +127 -3
- package/dist/esm/elements.js.map +1 -1
- package/dist/schema/elements.json +5 -0
- package/dist/types/browser.d.ts +23 -0
- package/dist/types/index.d.ts +23 -0
- package/package.json +1 -1
|
@@ -351,6 +351,11 @@
|
|
|
351
351
|
"type": "boolean",
|
|
352
352
|
"title": "Set to true if this attribute can optionally omit its value"
|
|
353
353
|
},
|
|
354
|
+
"reference": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"enum": ["id"],
|
|
357
|
+
"title": "Set when the attribute references another element."
|
|
358
|
+
},
|
|
354
359
|
"required": {
|
|
355
360
|
"title": "Set to true or a function to evaluate if this attribute is required",
|
|
356
361
|
"oneOf": [{ "type": "boolean" }, { "function": true }]
|
package/dist/types/browser.d.ts
CHANGED
|
@@ -1475,6 +1475,16 @@ export declare interface MetaAttribute {
|
|
|
1475
1475
|
* If `true` this attribute can omit the value.
|
|
1476
1476
|
*/
|
|
1477
1477
|
omit?: boolean;
|
|
1478
|
+
/**
|
|
1479
|
+
* When set, this attribute references another element by the given type. If
|
|
1480
|
+
* `list` is also set, each individual token in the attribute value references another
|
|
1481
|
+
* element.
|
|
1482
|
+
*
|
|
1483
|
+
* - `id`: the attribute value references the id of another element in the document.
|
|
1484
|
+
*
|
|
1485
|
+
* @since 11.4.0
|
|
1486
|
+
*/
|
|
1487
|
+
reference?: "id";
|
|
1478
1488
|
/**
|
|
1479
1489
|
* If set this attribute is required to be present on the element.
|
|
1480
1490
|
*/
|
|
@@ -1650,6 +1660,7 @@ export declare interface MetaElement extends Omit<MetaData, "deprecatedAttribute
|
|
|
1650
1660
|
/** WAI-ARIA attributes */
|
|
1651
1661
|
aria: NormalizedMetaAria;
|
|
1652
1662
|
attributes: Record<string, MetaAttribute>;
|
|
1663
|
+
patternAttributes: NormalizedPatternAttribute[];
|
|
1653
1664
|
textContent?: TextContent;
|
|
1654
1665
|
}
|
|
1655
1666
|
|
|
@@ -1845,6 +1856,18 @@ export declare interface NormalizedMetaAria {
|
|
|
1845
1856
|
naming(node: HtmlElementLike): "allowed" | "prohibited";
|
|
1846
1857
|
}
|
|
1847
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* A pattern attribute name with associated validation rules.
|
|
1861
|
+
*
|
|
1862
|
+
* @public
|
|
1863
|
+
*/
|
|
1864
|
+
export declare interface NormalizedPatternAttribute extends MetaAttribute {
|
|
1865
|
+
/** Original glob pattern */
|
|
1866
|
+
pattern: string;
|
|
1867
|
+
/** Compiled regular expression */
|
|
1868
|
+
regexp: RegExp;
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1848
1871
|
/* Excluded from this release type: ParseBeginEvent */
|
|
1849
1872
|
|
|
1850
1873
|
/* Excluded from this release type: ParseEndEvent */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1718,6 +1718,16 @@ export declare interface MetaAttribute {
|
|
|
1718
1718
|
* If `true` this attribute can omit the value.
|
|
1719
1719
|
*/
|
|
1720
1720
|
omit?: boolean;
|
|
1721
|
+
/**
|
|
1722
|
+
* When set, this attribute references another element by the given type. If
|
|
1723
|
+
* `list` is also set, each individual token in the attribute value references another
|
|
1724
|
+
* element.
|
|
1725
|
+
*
|
|
1726
|
+
* - `id`: the attribute value references the id of another element in the document.
|
|
1727
|
+
*
|
|
1728
|
+
* @since 11.4.0
|
|
1729
|
+
*/
|
|
1730
|
+
reference?: "id";
|
|
1721
1731
|
/**
|
|
1722
1732
|
* If set this attribute is required to be present on the element.
|
|
1723
1733
|
*/
|
|
@@ -1893,6 +1903,7 @@ export declare interface MetaElement extends Omit<MetaData, "deprecatedAttribute
|
|
|
1893
1903
|
/** WAI-ARIA attributes */
|
|
1894
1904
|
aria: NormalizedMetaAria;
|
|
1895
1905
|
attributes: Record<string, MetaAttribute>;
|
|
1906
|
+
patternAttributes: NormalizedPatternAttribute[];
|
|
1896
1907
|
textContent?: TextContent;
|
|
1897
1908
|
}
|
|
1898
1909
|
|
|
@@ -2088,6 +2099,18 @@ export declare interface NormalizedMetaAria {
|
|
|
2088
2099
|
naming(node: HtmlElementLike): "allowed" | "prohibited";
|
|
2089
2100
|
}
|
|
2090
2101
|
|
|
2102
|
+
/**
|
|
2103
|
+
* A pattern attribute name with associated validation rules.
|
|
2104
|
+
*
|
|
2105
|
+
* @public
|
|
2106
|
+
*/
|
|
2107
|
+
export declare interface NormalizedPatternAttribute extends MetaAttribute {
|
|
2108
|
+
/** Original glob pattern */
|
|
2109
|
+
pattern: string;
|
|
2110
|
+
/** Compiled regular expression */
|
|
2111
|
+
regexp: RegExp;
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2091
2114
|
/* Excluded from this release type: ParseBeginEvent */
|
|
2092
2115
|
|
|
2093
2116
|
/* Excluded from this release type: ParseEndEvent */
|