@markuplint/rules 4.0.0-alpha.6 → 4.0.0-alpha.7
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/LICENSE +1 -1
- package/lib/permitted-contents/content-model.js +6 -3
- package/lib/permitted-contents/debug.browser.d.ts +2 -2
- package/lib/permitted-contents/debug.d.ts +2 -2
- package/lib/require-accessible-name/index.js +0 -3
- package/lib/wai-aria/checkings/required-owned-elements.js +1 -1
- package/package.json +10 -10
package/LICENSE
CHANGED
|
@@ -3,7 +3,7 @@ import { start } from './start.js';
|
|
|
3
3
|
export function contentModel(
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
5
5
|
el, rules, options) {
|
|
6
|
-
const model = createModel(el, rules);
|
|
6
|
+
const { model, specs } = createModel(el, rules);
|
|
7
7
|
if (model == null) {
|
|
8
8
|
return [
|
|
9
9
|
{
|
|
@@ -14,7 +14,7 @@ el, rules, options) {
|
|
|
14
14
|
},
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
|
-
const result = start(model, el,
|
|
17
|
+
const result = start(model, el, specs, options);
|
|
18
18
|
return result;
|
|
19
19
|
}
|
|
20
20
|
function createModel(
|
|
@@ -22,7 +22,10 @@ function createModel(
|
|
|
22
22
|
el, rules) {
|
|
23
23
|
const specs = cachedSpecs(el.ownerMLDocument.specs, rules);
|
|
24
24
|
const model = getContentModel(el, specs.specs);
|
|
25
|
-
return
|
|
25
|
+
return {
|
|
26
|
+
model,
|
|
27
|
+
specs,
|
|
28
|
+
};
|
|
26
29
|
}
|
|
27
30
|
const caches = new Map();
|
|
28
31
|
function cachedSpecs(specs, rules) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Log } from '../debug.js';
|
|
2
2
|
import color from 'ansi-colors';
|
|
3
|
-
export declare const cmLog:
|
|
3
|
+
export declare const cmLog: Log;
|
|
4
4
|
export declare const bgGreen: color.StyleFunction;
|
|
5
5
|
export declare const green: color.StyleFunction;
|
|
6
6
|
export declare const bgRed: color.StyleFunction;
|
|
@@ -75,7 +75,7 @@ export const checkingRequiredOwnedElements = ({ el, role }) => t => {
|
|
|
75
75
|
if (mayBeBeforeCreated(el)) {
|
|
76
76
|
return {
|
|
77
77
|
scope: el,
|
|
78
|
-
message: t('{0}. Or, {1}', t('
|
|
78
|
+
message: t('{0}. Or, {1}', t('{0} requires {1}', t('the {0}', 'child element'), role.requiredOwnedElements.length === 1 && role.requiredOwnedElements[0]
|
|
79
79
|
? t('the "{0*}" {1}', role.requiredOwnedElements[0], 'role')
|
|
80
80
|
: t('the {0}', 'roles') + `: ${t(role.requiredOwnedElements)}`), t('require {0}', 'aria-busy="true"')),
|
|
81
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
4
|
"description": "Built-in rules of markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@markuplint/html-spec": "4.0.0-alpha.
|
|
29
|
-
"@markuplint/ml-core": "4.0.0-alpha.
|
|
30
|
-
"@markuplint/ml-spec": "4.0.0-alpha.
|
|
31
|
-
"@markuplint/selector": "4.0.0-alpha.
|
|
32
|
-
"@markuplint/shared": "4.0.0-alpha.
|
|
33
|
-
"@markuplint/types": "4.0.0-alpha.
|
|
28
|
+
"@markuplint/html-spec": "4.0.0-alpha.7",
|
|
29
|
+
"@markuplint/ml-core": "4.0.0-alpha.7",
|
|
30
|
+
"@markuplint/ml-spec": "4.0.0-alpha.7",
|
|
31
|
+
"@markuplint/selector": "4.0.0-alpha.7",
|
|
32
|
+
"@markuplint/shared": "4.0.0-alpha.7",
|
|
33
|
+
"@markuplint/types": "4.0.0-alpha.7",
|
|
34
34
|
"@types/debug": "^4.1.12",
|
|
35
35
|
"@ungap/structured-clone": "^1.2.0",
|
|
36
36
|
"ansi-colors": "^4.1.3",
|
|
37
|
-
"chrono-node": "^2.7.
|
|
37
|
+
"chrono-node": "^2.7.4",
|
|
38
38
|
"debug": "^4.3.4",
|
|
39
|
-
"type-fest": "^4.
|
|
39
|
+
"type-fest": "^4.9.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "571129bf6498541125e1e7c3907d5ed9af53459a"
|
|
42
42
|
}
|