html-validate 8.28.0 → 8.29.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 +25 -9
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/elements.js +3 -1
- package/dist/cjs/elements.js.map +1 -1
- package/dist/es/core.js +25 -9
- package/dist/es/core.js.map +1 -1
- package/dist/es/elements.js +3 -1
- package/dist/es/elements.js.map +1 -1
- package/dist/schema/config.json +2 -2
- package/dist/schema/elements.json +5 -1
- package/dist/types/browser.d.ts +20 -4
- package/dist/types/index.d.ts +20 -4
- package/package.json +1 -1
package/dist/schema/config.json
CHANGED
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"transform": {
|
|
51
51
|
"type": "object",
|
|
52
52
|
"additionalProperties": {
|
|
53
|
-
"type": "string"
|
|
53
|
+
"anyOf": [{ "type": "string" }, { "function": true }]
|
|
54
54
|
},
|
|
55
55
|
"title": "File transformations to use.",
|
|
56
|
-
"description": "Object where key is regular expression to match filename and value is name of transformer.",
|
|
56
|
+
"description": "Object where key is regular expression to match filename and value is name of transformer or a function.",
|
|
57
57
|
"examples": [
|
|
58
58
|
{
|
|
59
59
|
"^.*\\.foo$": "my-transformer",
|
|
@@ -127,7 +127,11 @@
|
|
|
127
127
|
"labelable": {
|
|
128
128
|
"title": "Mark this element as labelable",
|
|
129
129
|
"description": "This element may contain an associated label element.",
|
|
130
|
-
"anyOf": [
|
|
130
|
+
"anyOf": [
|
|
131
|
+
{ "type": "boolean" },
|
|
132
|
+
{ "function": true },
|
|
133
|
+
{ "$ref": "#/definitions/expression" }
|
|
134
|
+
]
|
|
131
135
|
},
|
|
132
136
|
|
|
133
137
|
"deprecatedAttributes": {
|
package/dist/types/browser.d.ts
CHANGED
|
@@ -1523,7 +1523,7 @@ export declare interface MetaData {
|
|
|
1523
1523
|
form?: boolean;
|
|
1524
1524
|
/** Mark element as a form-associated element */
|
|
1525
1525
|
formAssociated?: Partial<FormAssociated>;
|
|
1526
|
-
labelable?: boolean | PropertyExpression;
|
|
1526
|
+
labelable?: boolean | PropertyExpression | MetaLabelableCallback;
|
|
1527
1527
|
/** @deprecated use {@link MetaAria.implicitRole} instead */
|
|
1528
1528
|
implicitRole?: MetaImplicitRoleCallback;
|
|
1529
1529
|
/** WAI-ARIA attributes */
|
|
@@ -1609,6 +1609,17 @@ export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
|
|
|
1609
1609
|
*/
|
|
1610
1610
|
export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string | null;
|
|
1611
1611
|
|
|
1612
|
+
/**
|
|
1613
|
+
* Callback for the `labelable` properties of `MetaData`. It takes a node and
|
|
1614
|
+
* returns whenever the element is labelable or not.
|
|
1615
|
+
*
|
|
1616
|
+
* @public
|
|
1617
|
+
* @since 8.29.0
|
|
1618
|
+
* @param node - The node to determine if it is labelable.
|
|
1619
|
+
* @returns `true` if the node is labelable.
|
|
1620
|
+
*/
|
|
1621
|
+
export declare type MetaLabelableCallback = (node: HtmlElementLike) => boolean;
|
|
1622
|
+
|
|
1612
1623
|
/**
|
|
1613
1624
|
* Properties listed here can be used to reverse search elements with the given
|
|
1614
1625
|
* property enabled. See [[MetaTable.getTagsWithProperty]].
|
|
@@ -2690,15 +2701,20 @@ export { Transformer_2 as Transformer }
|
|
|
2690
2701
|
/**
|
|
2691
2702
|
* @public
|
|
2692
2703
|
*/
|
|
2693
|
-
export declare
|
|
2704
|
+
export declare type TransformerEntry = {
|
|
2705
|
+
kind: "import";
|
|
2694
2706
|
pattern: RegExp;
|
|
2695
2707
|
name: string;
|
|
2696
|
-
}
|
|
2708
|
+
} | {
|
|
2709
|
+
kind: "function";
|
|
2710
|
+
pattern: RegExp;
|
|
2711
|
+
function: Transformer_2;
|
|
2712
|
+
};
|
|
2697
2713
|
|
|
2698
2714
|
/**
|
|
2699
2715
|
* @public
|
|
2700
2716
|
*/
|
|
2701
|
-
export declare type TransformMap = Record<string, string>;
|
|
2717
|
+
export declare type TransformMap = Record<string, string | Transformer_2>;
|
|
2702
2718
|
|
|
2703
2719
|
/**
|
|
2704
2720
|
* @public
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1750,7 +1750,7 @@ export declare interface MetaData {
|
|
|
1750
1750
|
form?: boolean;
|
|
1751
1751
|
/** Mark element as a form-associated element */
|
|
1752
1752
|
formAssociated?: Partial<FormAssociated>;
|
|
1753
|
-
labelable?: boolean | PropertyExpression;
|
|
1753
|
+
labelable?: boolean | PropertyExpression | MetaLabelableCallback;
|
|
1754
1754
|
/** @deprecated use {@link MetaAria.implicitRole} instead */
|
|
1755
1755
|
implicitRole?: MetaImplicitRoleCallback;
|
|
1756
1756
|
/** WAI-ARIA attributes */
|
|
@@ -1836,6 +1836,17 @@ export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
|
|
|
1836
1836
|
*/
|
|
1837
1837
|
export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string | null;
|
|
1838
1838
|
|
|
1839
|
+
/**
|
|
1840
|
+
* Callback for the `labelable` properties of `MetaData`. It takes a node and
|
|
1841
|
+
* returns whenever the element is labelable or not.
|
|
1842
|
+
*
|
|
1843
|
+
* @public
|
|
1844
|
+
* @since 8.29.0
|
|
1845
|
+
* @param node - The node to determine if it is labelable.
|
|
1846
|
+
* @returns `true` if the node is labelable.
|
|
1847
|
+
*/
|
|
1848
|
+
export declare type MetaLabelableCallback = (node: HtmlElementLike) => boolean;
|
|
1849
|
+
|
|
1839
1850
|
/**
|
|
1840
1851
|
* Properties listed here can be used to reverse search elements with the given
|
|
1841
1852
|
* property enabled. See [[MetaTable.getTagsWithProperty]].
|
|
@@ -2942,15 +2953,20 @@ export { Transformer_2 as Transformer }
|
|
|
2942
2953
|
/**
|
|
2943
2954
|
* @public
|
|
2944
2955
|
*/
|
|
2945
|
-
export declare
|
|
2956
|
+
export declare type TransformerEntry = {
|
|
2957
|
+
kind: "import";
|
|
2946
2958
|
pattern: RegExp;
|
|
2947
2959
|
name: string;
|
|
2948
|
-
}
|
|
2960
|
+
} | {
|
|
2961
|
+
kind: "function";
|
|
2962
|
+
pattern: RegExp;
|
|
2963
|
+
function: Transformer_2;
|
|
2964
|
+
};
|
|
2949
2965
|
|
|
2950
2966
|
/**
|
|
2951
2967
|
* @public
|
|
2952
2968
|
*/
|
|
2953
|
-
export declare type TransformMap = Record<string, string>;
|
|
2969
|
+
export declare type TransformMap = Record<string, string | Transformer_2>;
|
|
2954
2970
|
|
|
2955
2971
|
/**
|
|
2956
2972
|
* @public
|