@markuplint/rules 4.0.0-alpha.5 → 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/use-list/index.js +26 -26
- package/lib/wai-aria/checkings/required-owned-elements.js +1 -1
- package/package.json +11 -11
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;
|
package/lib/use-list/index.js
CHANGED
|
@@ -5,32 +5,32 @@ export default createRule({
|
|
|
5
5
|
/**
|
|
6
6
|
* @see https://en.wikipedia.org/wiki/Bullet_(typography)#In_Unicode
|
|
7
7
|
*/
|
|
8
|
-
'\u2022',
|
|
9
|
-
'\u2023',
|
|
10
|
-
'\u2043',
|
|
11
|
-
'\u204C',
|
|
12
|
-
'\u204D',
|
|
13
|
-
'\u2219',
|
|
14
|
-
'\u25CB',
|
|
15
|
-
'\u25CF',
|
|
16
|
-
'\u25D8',
|
|
17
|
-
'\u25E6',
|
|
18
|
-
'\u2619',
|
|
19
|
-
'\u2765',
|
|
20
|
-
'\u2767',
|
|
21
|
-
'\u29BE',
|
|
22
|
-
'\u29BF',
|
|
8
|
+
'\u2022', // • BULLET (HTML • · •, •)
|
|
9
|
+
'\u2023', // ‣ TRIANGULAR BULLET (HTML ‣)
|
|
10
|
+
'\u2043', // ⁃ HYPHEN BULLET (HTML ⁃ · ⁃)
|
|
11
|
+
'\u204C', // ⁌ BLACK LEFTWARDS BULLET (HTML ⁌)
|
|
12
|
+
'\u204D', // ⁍ BLACK RIGHTWARDS BULLET (HTML ⁍)
|
|
13
|
+
'\u2219', // ∙ BULLET OPERATOR (HTML ∙) for use in mathematical notation primarily as a dot product instead of interupt.
|
|
14
|
+
'\u25CB', // ○ WHITE CIRCLE (HTML ○ · ○)
|
|
15
|
+
'\u25CF', // ● BLACK CIRCLE (HTML ●)
|
|
16
|
+
'\u25D8', // ◘ INVERSE BULLET (HTML ◘)
|
|
17
|
+
'\u25E6', // ◦ WHITE BULLET (HTML ◦)
|
|
18
|
+
'\u2619', // ☙ REVERSED ROTATED FLORAL HEART BULLET (HTML ☙); see Fleuron (typography)
|
|
19
|
+
'\u2765', // ❥ ROTATED HEAVY BLACK HEART BULLET (HTML ❥)
|
|
20
|
+
'\u2767', // ❧ ROTATED FLORAL HEART BULLET (HTML ❧); see Fleuron (typography)
|
|
21
|
+
'\u29BE', // ⦾ CIRCLED WHITE BULLET (HTML ⦾ · ⦾)
|
|
22
|
+
'\u29BF', // ⦿ CIRCLED BULLET (HTML ⦿ · ⦿)
|
|
23
23
|
/**
|
|
24
24
|
* In Japanese
|
|
25
25
|
* @see https://ja.wikipedia.org/wiki/中黒#符号位置
|
|
26
26
|
*/
|
|
27
|
-
'\u00B7',
|
|
28
|
-
'\u0387',
|
|
29
|
-
'\u2022',
|
|
30
|
-
'\u2219',
|
|
31
|
-
'\u22C5',
|
|
32
|
-
'\u30FB',
|
|
33
|
-
'\uFF65',
|
|
27
|
+
'\u00B7', // MIDDLE DOT
|
|
28
|
+
'\u0387', // GREEK ANO TELIA
|
|
29
|
+
'\u2022', // BULLET
|
|
30
|
+
'\u2219', // BULLET OPERATOR
|
|
31
|
+
'\u22C5', // DOT OPERATOR
|
|
32
|
+
'\u30FB', // KATAKANA MIDDLE DOT
|
|
33
|
+
'\uFF65', // HALFWIDTH KATAKANA MIDDLE DOT
|
|
34
34
|
/**
|
|
35
35
|
* In Other Languages
|
|
36
36
|
*/
|
|
@@ -38,8 +38,8 @@ export default createRule({
|
|
|
38
38
|
/**
|
|
39
39
|
* From Markdown
|
|
40
40
|
*/
|
|
41
|
-
'-',
|
|
42
|
-
'*',
|
|
41
|
+
'-', // dashes
|
|
42
|
+
'*', // asterisks
|
|
43
43
|
'+', // plus signs
|
|
44
44
|
],
|
|
45
45
|
defaultOptions: {
|
|
@@ -47,8 +47,8 @@ export default createRule({
|
|
|
47
47
|
/**
|
|
48
48
|
* From Markdown
|
|
49
49
|
*/
|
|
50
|
-
'-',
|
|
51
|
-
'*',
|
|
50
|
+
'-', // dashes
|
|
51
|
+
'*', // asterisks
|
|
52
52
|
'+', // plus signs
|
|
53
53
|
],
|
|
54
54
|
noPrev: true,
|
|
@@ -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.
|
|
34
|
-
"@types/debug": "^4.1.
|
|
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
|
+
"@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
|
}
|