html-validate 8.11.1 → 8.13.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.
@@ -207,7 +207,7 @@
207
207
  },
208
208
 
209
209
  "contentCategory": {
210
- "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/expression" }]
210
+ "anyOf": [{ "type": "boolean" }, { "$ref": "#/definitions/expression" }, { "function": true }]
211
211
  },
212
212
 
213
213
  "expression": {
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.41.0"
8
+ "packageVersion": "7.42.3"
9
9
  }
10
10
  ]
11
11
  }
@@ -1441,6 +1441,17 @@ export declare interface MetaAttribute {
1441
1441
  */
1442
1442
  export declare type MetaAttributeAllowedCallback = (node: HtmlElementLike, attr: string | DynamicValue | null | undefined) => string | null | undefined;
1443
1443
 
1444
+ /**
1445
+ * Callback for content category properties of `MetaData`. It takes a node and
1446
+ * returns whenever the element belongs to the content group or not.
1447
+ *
1448
+ * @public
1449
+ * @since 8.13.0
1450
+ * @param node - The node to determine if it belongs in the content category.
1451
+ * @returns `true` if the node belongs to the category.
1452
+ */
1453
+ export declare type MetaCategoryCallback = (node: HtmlElementLike) => boolean;
1454
+
1444
1455
  /**
1445
1456
  * Properties listed here can be copied (loaded) onto another element using
1446
1457
  * [[HtmlElement.loadMeta]].
@@ -1454,13 +1465,13 @@ export declare const MetaCopyableProperty: Array<keyof MetaElement>;
1454
1465
  */
1455
1466
  export declare interface MetaData {
1456
1467
  inherit?: string;
1457
- metadata?: boolean | PropertyExpression;
1458
- flow?: boolean | PropertyExpression;
1459
- sectioning?: boolean | PropertyExpression;
1460
- heading?: boolean | PropertyExpression;
1461
- phrasing?: boolean | PropertyExpression;
1462
- embedded?: boolean | PropertyExpression;
1463
- interactive?: boolean | PropertyExpression;
1468
+ metadata?: boolean | PropertyExpression | MetaCategoryCallback;
1469
+ flow?: boolean | PropertyExpression | MetaCategoryCallback;
1470
+ sectioning?: boolean | PropertyExpression | MetaCategoryCallback;
1471
+ heading?: boolean | PropertyExpression | MetaCategoryCallback;
1472
+ phrasing?: boolean | PropertyExpression | MetaCategoryCallback;
1473
+ embedded?: boolean | PropertyExpression | MetaCategoryCallback;
1474
+ interactive?: boolean | PropertyExpression | MetaCategoryCallback;
1464
1475
  deprecated?: boolean | string | DeprecatedElement;
1465
1476
  foreign?: boolean;
1466
1477
  void?: boolean;
@@ -1907,6 +1918,7 @@ export declare interface ProcessElementContext {
1907
1918
 
1908
1919
  /**
1909
1920
  * @public
1921
+ * @deprecated Use callback variant instead.
1910
1922
  */
1911
1923
  export declare type PropertyExpression = string | [string, any];
1912
1924
 
@@ -1666,6 +1666,17 @@ export declare interface MetaAttribute {
1666
1666
  */
1667
1667
  export declare type MetaAttributeAllowedCallback = (node: HtmlElementLike, attr: string | DynamicValue | null | undefined) => string | null | undefined;
1668
1668
 
1669
+ /**
1670
+ * Callback for content category properties of `MetaData`. It takes a node and
1671
+ * returns whenever the element belongs to the content group or not.
1672
+ *
1673
+ * @public
1674
+ * @since 8.13.0
1675
+ * @param node - The node to determine if it belongs in the content category.
1676
+ * @returns `true` if the node belongs to the category.
1677
+ */
1678
+ export declare type MetaCategoryCallback = (node: HtmlElementLike) => boolean;
1679
+
1669
1680
  /**
1670
1681
  * Properties listed here can be copied (loaded) onto another element using
1671
1682
  * [[HtmlElement.loadMeta]].
@@ -1679,13 +1690,13 @@ export declare const MetaCopyableProperty: Array<keyof MetaElement>;
1679
1690
  */
1680
1691
  export declare interface MetaData {
1681
1692
  inherit?: string;
1682
- metadata?: boolean | PropertyExpression;
1683
- flow?: boolean | PropertyExpression;
1684
- sectioning?: boolean | PropertyExpression;
1685
- heading?: boolean | PropertyExpression;
1686
- phrasing?: boolean | PropertyExpression;
1687
- embedded?: boolean | PropertyExpression;
1688
- interactive?: boolean | PropertyExpression;
1693
+ metadata?: boolean | PropertyExpression | MetaCategoryCallback;
1694
+ flow?: boolean | PropertyExpression | MetaCategoryCallback;
1695
+ sectioning?: boolean | PropertyExpression | MetaCategoryCallback;
1696
+ heading?: boolean | PropertyExpression | MetaCategoryCallback;
1697
+ phrasing?: boolean | PropertyExpression | MetaCategoryCallback;
1698
+ embedded?: boolean | PropertyExpression | MetaCategoryCallback;
1699
+ interactive?: boolean | PropertyExpression | MetaCategoryCallback;
1689
1700
  deprecated?: boolean | string | DeprecatedElement;
1690
1701
  foreign?: boolean;
1691
1702
  void?: boolean;
@@ -2157,6 +2168,7 @@ export declare interface ProcessElementContext {
2157
2168
 
2158
2169
  /**
2159
2170
  * @public
2171
+ * @deprecated Use callback variant instead.
2160
2172
  */
2161
2173
  export declare type PropertyExpression = string | [string, any];
2162
2174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-validate",
3
- "version": "8.11.1",
3
+ "version": "8.13.0",
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.30",
205
- "@html-validate/eslint-config": "5.13.2",
206
- "@html-validate/eslint-config-jest": "5.13.2",
207
- "@html-validate/eslint-config-typescript": "5.13.1",
208
- "@html-validate/eslint-config-typescript-typeinfo": "5.13.1",
204
+ "@html-validate/commitlint-config": "3.2.0",
205
+ "@html-validate/eslint-config": "5.14.0",
206
+ "@html-validate/eslint-config-jest": "5.14.0",
207
+ "@html-validate/eslint-config-typescript": "5.14.0",
208
+ "@html-validate/eslint-config-typescript-typeinfo": "5.14.0",
209
209
  "@html-validate/jest-config": "3.9.0",
210
210
  "@html-validate/prettier-config": "2.4.12",
211
211
  "@html-validate/release-scripts": "6.2.0",
212
- "@microsoft/api-extractor": "7.41.0",
212
+ "@microsoft/api-extractor": "7.42.3",
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.12",
221
221
  "@types/minimist": "1.2.5",
222
- "@types/node": "16.18.83",
222
+ "@types/node": "16.18.86",
223
223
  "@types/prompts": "2.4.9",
224
224
  "@types/semver": "7.5.8",
225
225
  "@types/stream-buffers": "3.0.7",
@@ -233,7 +233,7 @@
233
233
  "jsdom": "20.0.3",
234
234
  "marked": "12.0.0",
235
235
  "memfs": "4.7.7",
236
- "npm-pkg-lint": "2.1.0",
236
+ "npm-pkg-lint": "2.2.0",
237
237
  "npm-run-all2": "6.1.2",
238
238
  "rollup": "4.12.0",
239
239
  "rollup-plugin-esbuild": "6.1.1",
@@ -278,10 +278,5 @@
278
278
  ],
279
279
  "overrides": {
280
280
  "marked": "12.0.0"
281
- },
282
- "renovate": {
283
- "extends": [
284
- "gitlab>html-validate/renovate-config"
285
- ]
286
281
  }
287
282
  }