@markuplint/rules 3.9.0 → 3.10.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/lib/attr-duplication/index.d.ts +1 -3
- package/lib/attr-value-quotes/index.d.ts +2 -2
- package/lib/case-sensitive-attr-name/index.d.ts +1 -1
- package/lib/case-sensitive-tag-name/index.d.ts +1 -1
- package/lib/character-reference/index.d.ts +1 -1
- package/lib/class-naming/index.d.ts +1 -1
- package/lib/create-message.d.ts +2 -12
- package/lib/deprecated-attr/index.d.ts +1 -3
- package/lib/deprecated-element/index.d.ts +1 -3
- package/lib/disallowed-element/index.d.ts +1 -1
- package/lib/doctype/index.d.ts +2 -2
- package/lib/end-tag/index.d.ts +1 -1
- package/lib/helpers.d.ts +16 -34
- package/lib/id-duplication/index.d.ts +1 -3
- package/lib/index.d.ts +99 -240
- package/lib/ineffective-attr/index.d.ts +1 -3
- package/lib/invalid-attr/index.d.ts +31 -38
- package/lib/label-has-control/index.d.ts +1 -3
- package/lib/landmark-roles/index.d.ts +3 -3
- package/lib/no-boolean-attr-value/index.d.ts +1 -3
- package/lib/no-default-value/index.d.ts +1 -3
- package/lib/no-empty-palpable-content/index.d.ts +3 -3
- package/lib/no-hard-code-id/index.d.ts +1 -3
- package/lib/no-refer-to-non-existent-id/index.d.ts +4 -9
- package/lib/no-use-event-handler-attr/index.d.ts +2 -2
- package/lib/permitted-contents/choice.d.ts +1 -7
- package/lib/permitted-contents/complex-branch.d.ts +1 -7
- package/lib/permitted-contents/count-pattern.d.ts +2 -17
- package/lib/permitted-contents/debug.browser.d.ts +15 -15
- package/lib/permitted-contents/debug.d.ts +1 -1
- package/lib/permitted-contents/index.d.ts +1 -1
- package/lib/permitted-contents/matches-selector.d.ts +1 -6
- package/lib/permitted-contents/order.d.ts +1 -7
- package/lib/permitted-contents/recursive-branch.d.ts +1 -7
- package/lib/permitted-contents/represent-transparent-nodes.d.ts +3 -7
- package/lib/permitted-contents/start.d.ts +1 -6
- package/lib/permitted-contents/types.d.ts +29 -29
- package/lib/permitted-contents/utils.d.ts +41 -90
- package/lib/placeholder-label-option/index.d.ts +1 -1
- package/lib/require-accessible-name/index.d.ts +2 -2
- package/lib/require-datetime/index.d.ts +2 -2
- package/lib/require-datetime/types.d.ts +2 -2
- package/lib/required-attr/index.d.ts +3 -3
- package/lib/required-element/index.d.ts +2 -2
- package/lib/required-h1/index.d.ts +3 -3
- package/lib/use-list/index.d.ts +2 -2
- package/lib/wai-aria/checkings/default-value.d.ts +3 -7
- package/lib/wai-aria/checkings/deprecated-props.d.ts +4 -8
- package/lib/wai-aria/checkings/disallowed-prop.d.ts +4 -8
- package/lib/wai-aria/checkings/implicit-props.d.ts +4 -8
- package/lib/wai-aria/checkings/no-global-prop.d.ts +3 -7
- package/lib/wai-aria/checkings/required-owned-elements.d.ts +3 -7
- package/lib/wai-aria/checkings/required-prop.d.ts +6 -12
- package/lib/wai-aria/checkings/value.d.ts +6 -15
- package/lib/wai-aria/index.d.ts +1 -1
- package/lib/wai-aria/types.d.ts +10 -10
- package/package.json +11 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
extendsExposableElements?: boolean;
|
|
3
|
+
ignoreIfAriaBusy?: boolean;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
import('@markuplint/ml-core').RuleSeed<import('@markuplint/ml-core').RuleConfigValue, undefined>
|
|
3
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
|
|
4
2
|
export default _default;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
declare const _default: Readonly<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ariaVersion: '1.1' | '1.2' | '1.3';
|
|
6
|
-
fragmentRefersNameAttr: boolean;
|
|
7
|
-
}
|
|
8
|
-
>
|
|
9
|
-
>;
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, {
|
|
2
|
+
ariaVersion: "1.1" | "1.2" | "1.3";
|
|
3
|
+
fragmentRefersNameAttr: boolean;
|
|
4
|
+
}>>;
|
|
10
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
2
|
+
ignore?: string | string[];
|
|
3
3
|
};
|
|
4
|
-
declare const _default: Readonly<import(
|
|
4
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
2
|
import type { PermittedContentChoice } from '@markuplint/ml-spec';
|
|
3
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
4
|
-
export declare function choice(
|
|
5
|
-
pattern: ReadonlyDeep<PermittedContentChoice>,
|
|
6
|
-
elements: readonly ChildNode[],
|
|
7
|
-
specs: Specs,
|
|
8
|
-
options: Options,
|
|
9
|
-
depth: number,
|
|
10
|
-
): Result;
|
|
4
|
+
export declare function choice(pattern: ReadonlyDeep<PermittedContentChoice>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -11,10 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
11
11
|
* @param depth
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare function complexBranch(
|
|
15
|
-
pattern: ReadonlyDeep<PermittedContentPattern>,
|
|
16
|
-
elements: readonly ChildNode[],
|
|
17
|
-
specs: Specs,
|
|
18
|
-
options: Options,
|
|
19
|
-
depth: number,
|
|
20
|
-
): Result;
|
|
14
|
+
export declare function complexBranch(pattern: ReadonlyDeep<PermittedContentPattern>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
|
-
import type {
|
|
3
|
-
PermittedContentOneOrMore,
|
|
4
|
-
PermittedContentOptional,
|
|
5
|
-
PermittedContentRequire,
|
|
6
|
-
PermittedContentZeroOrMore,
|
|
7
|
-
} from '@markuplint/ml-spec';
|
|
2
|
+
import type { PermittedContentOneOrMore, PermittedContentOptional, PermittedContentRequire, PermittedContentZeroOrMore } from '@markuplint/ml-spec';
|
|
8
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
9
4
|
/**
|
|
10
5
|
* Check count
|
|
@@ -16,14 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
16
11
|
* @param depth
|
|
17
12
|
* @returns
|
|
18
13
|
*/
|
|
19
|
-
export declare function countPattern(
|
|
20
|
-
pattern:
|
|
21
|
-
| ReadonlyDeep<PermittedContentOneOrMore>
|
|
22
|
-
| ReadonlyDeep<PermittedContentOptional>
|
|
23
|
-
| ReadonlyDeep<PermittedContentRequire>
|
|
24
|
-
| ReadonlyDeep<PermittedContentZeroOrMore>,
|
|
25
|
-
elements: readonly ChildNode[],
|
|
26
|
-
specs: Specs,
|
|
27
|
-
options: Options,
|
|
28
|
-
depth: number,
|
|
29
|
-
): Result;
|
|
14
|
+
export declare function countPattern(pattern: ReadonlyDeep<PermittedContentOneOrMore> | ReadonlyDeep<PermittedContentOptional> | ReadonlyDeep<PermittedContentRequire> | ReadonlyDeep<PermittedContentZeroOrMore>, elements: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/// <reference types="debug" />
|
|
2
|
-
export declare const cmLog: import(
|
|
2
|
+
export declare const cmLog: import("debug").Debugger;
|
|
3
3
|
export declare const bgGreen: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
(): void;
|
|
5
|
+
bold(): void;
|
|
6
6
|
};
|
|
7
7
|
export declare const green: {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
(): void;
|
|
9
|
+
bold(): void;
|
|
10
10
|
};
|
|
11
11
|
export declare const bgRed: {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
(): void;
|
|
13
|
+
bold(): void;
|
|
14
14
|
};
|
|
15
15
|
export declare const bgBlue: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
(): void;
|
|
17
|
+
bold(): void;
|
|
18
18
|
};
|
|
19
19
|
export declare const blue: {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
(): void;
|
|
21
|
+
bold(): void;
|
|
22
22
|
};
|
|
23
23
|
export declare const bgMagenta: {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
(): void;
|
|
25
|
+
bold(): void;
|
|
26
26
|
};
|
|
27
27
|
export declare const cyan: {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
(): void;
|
|
29
|
+
bold(): void;
|
|
30
30
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import type { ChildNode, Result, Specs } from './types';
|
|
2
2
|
export type SelectorResult = Result<'UNMATCHED_SELECTOR_BUT_MAY_EMPTY' | 'MISSING_NODE' | 'UNMATCHED_SELECTORS'>;
|
|
3
|
-
export declare function matchesSelector(
|
|
4
|
-
query: string,
|
|
5
|
-
node: ChildNode | undefined,
|
|
6
|
-
specs: Specs,
|
|
7
|
-
depth: number,
|
|
8
|
-
): SelectorResult;
|
|
3
|
+
export declare function matchesSelector(query: string, node: ChildNode | undefined, specs: Specs, depth: number): SelectorResult;
|
|
@@ -11,10 +11,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
11
11
|
* @param depth
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
|
-
export declare function order(
|
|
15
|
-
contents: ReadonlyDeep<PermittedContentPattern[]>,
|
|
16
|
-
nodes: readonly ChildNode[],
|
|
17
|
-
specs: Specs,
|
|
18
|
-
options: Options,
|
|
19
|
-
depth: number,
|
|
20
|
-
): Result;
|
|
14
|
+
export declare function order(contents: ReadonlyDeep<PermittedContentPattern[]>, nodes: readonly ChildNode[], specs: Specs, options: Options, depth: number): Result;
|
|
@@ -2,10 +2,4 @@ import type { SelectorResult } from './matches-selector';
|
|
|
2
2
|
import type { ChildNode, Options, Specs } from './types';
|
|
3
3
|
import type { PermittedContentPattern, Model } from '@markuplint/ml-spec';
|
|
4
4
|
import type { ReadonlyDeep } from 'type-fest';
|
|
5
|
-
export declare function recursiveBranch(
|
|
6
|
-
model: ReadonlyDeep<Model | PermittedContentPattern[]>,
|
|
7
|
-
nodes: readonly ChildNode[],
|
|
8
|
-
specs: Specs,
|
|
9
|
-
options: Options,
|
|
10
|
-
depth: number,
|
|
11
|
-
): SelectorResult;
|
|
5
|
+
export declare function recursiveBranch(model: ReadonlyDeep<Model | PermittedContentPattern[]>, nodes: readonly ChildNode[], specs: Specs, options: Options, depth: number): SelectorResult;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { ChildNode, Options, Result, Specs } from './types';
|
|
2
2
|
export declare const transparentMode: Map<ChildNode, true>;
|
|
3
|
-
export declare function representTransparentNodes(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
options: Options,
|
|
7
|
-
): {
|
|
8
|
-
nodes: ChildNode[];
|
|
9
|
-
errors: Result[];
|
|
3
|
+
export declare function representTransparentNodes(nodes: ChildNode[], specs: Specs, options: Options): {
|
|
4
|
+
nodes: ChildNode[];
|
|
5
|
+
errors: Result[];
|
|
10
6
|
};
|
|
@@ -10,9 +10,4 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
10
10
|
* @param options
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
|
-
export declare function start(
|
|
14
|
-
contents: ReadonlyDeep<ContentModel['contents']>,
|
|
15
|
-
el: Element,
|
|
16
|
-
specs: Specs,
|
|
17
|
-
options: Options,
|
|
18
|
-
): ContentModelResult[];
|
|
13
|
+
export declare function start(contents: ReadonlyDeep<ContentModel['contents']>, el: Element, specs: Specs, options: Options): ContentModelResult[];
|
|
@@ -4,49 +4,49 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
4
4
|
export type Element = _Element<TagRule[], Options>;
|
|
5
5
|
export type ChildNode = _ChildNode<TagRule[], Options>;
|
|
6
6
|
export type Specs = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
readonly cites: MLMLSpec['cites'];
|
|
8
|
+
readonly def: MLMLSpec['def'];
|
|
9
|
+
readonly specs: readonly {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly contentModel: {
|
|
12
|
+
readonly contents: MLMLSpec['specs'][0]['contentModel']['contents'];
|
|
13
|
+
};
|
|
14
|
+
}[];
|
|
15
15
|
};
|
|
16
16
|
export type ContentModelResult = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
type: MatchedReason | UnmatchedReason;
|
|
18
|
+
scope: ChildNode;
|
|
19
|
+
query: Result['query'];
|
|
20
|
+
hint: Result['hint'];
|
|
21
21
|
};
|
|
22
22
|
export type Result<T extends string = MatchedReason> = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
type: MatchedReason | UnmatchedReason | T;
|
|
24
|
+
matched: ChildNode[];
|
|
25
|
+
unmatched: ChildNode[];
|
|
26
|
+
zeroMatch: boolean;
|
|
27
|
+
query: string;
|
|
28
|
+
hint: Hints;
|
|
29
29
|
};
|
|
30
30
|
export type Hints = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
max?: number;
|
|
32
|
+
not?: ChildNode;
|
|
33
|
+
transparent?: Element;
|
|
34
|
+
missing?: {
|
|
35
|
+
barelyMatchedElements?: number;
|
|
36
|
+
need?: string;
|
|
37
|
+
};
|
|
38
38
|
};
|
|
39
39
|
export type MatchedReason = 'MATCHED' | 'MATCHED_ZERO';
|
|
40
40
|
export type UnmatchedReason = 'NOTHING' | 'UNEXPECTED_EXTRA_NODE' | 'TRANSPARENT_MODEL_DISALLOWS' | MissingNodeReason;
|
|
41
41
|
export type MissingNodeReason = 'MISSING_NODE_REQUIRED' | 'MISSING_NODE_ONE_OR_MORE';
|
|
42
42
|
export type RepeatSign = '' | '?' | '+' | '*' | `{${number},${number}}`;
|
|
43
43
|
export type TransparentModel = {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
el: Element;
|
|
45
|
+
additionalCondition: string;
|
|
46
46
|
};
|
|
47
47
|
export type TagRule = {
|
|
48
|
-
|
|
48
|
+
readonly tag: string;
|
|
49
49
|
} & ReadonlyDeep<ContentModel>;
|
|
50
50
|
export type Options = {
|
|
51
|
-
|
|
51
|
+
readonly ignoreHasMutableChildren: boolean;
|
|
52
52
|
};
|
|
@@ -1,100 +1,51 @@
|
|
|
1
1
|
import type { ChildNode, Element, Hints, MissingNodeReason, RepeatSign, Specs } from './types';
|
|
2
|
-
import type {
|
|
3
|
-
PermittedContentPattern,
|
|
4
|
-
PermittedContentChoice,
|
|
5
|
-
PermittedContentOneOrMore,
|
|
6
|
-
PermittedContentOptional,
|
|
7
|
-
PermittedContentRequire,
|
|
8
|
-
PermittedContentTransparent,
|
|
9
|
-
PermittedContentZeroOrMore,
|
|
10
|
-
Model,
|
|
11
|
-
} from '@markuplint/ml-spec';
|
|
2
|
+
import type { PermittedContentPattern, PermittedContentChoice, PermittedContentOneOrMore, PermittedContentOptional, PermittedContentRequire, PermittedContentTransparent, PermittedContentZeroOrMore, Model } from '@markuplint/ml-spec';
|
|
12
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
13
4
|
export declare function getChildNodesWithoutWhitespaces(el: Element): ChildNode[];
|
|
14
5
|
export declare function isModel(model: ReadonlyDeep<Model | PermittedContentPattern[]>): model is ReadonlyDeep<Model>;
|
|
15
|
-
export declare function matches(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
matched: boolean;
|
|
22
|
-
not?: undefined;
|
|
23
|
-
}
|
|
24
|
-
| {
|
|
25
|
-
matched: boolean;
|
|
26
|
-
not: ChildNode | undefined;
|
|
27
|
-
};
|
|
28
|
-
export declare function isRequire(
|
|
29
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
30
|
-
): content is ReadonlyDeep<PermittedContentRequire>;
|
|
31
|
-
export declare function isOptional(
|
|
32
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
33
|
-
): content is ReadonlyDeep<PermittedContentOptional>;
|
|
34
|
-
export declare function isOneOrMore(
|
|
35
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
36
|
-
): content is ReadonlyDeep<PermittedContentOneOrMore>;
|
|
37
|
-
export declare function isZeroOrMore(
|
|
38
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
39
|
-
): content is ReadonlyDeep<PermittedContentZeroOrMore>;
|
|
40
|
-
export declare function isChoice(
|
|
41
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
42
|
-
): content is ReadonlyDeep<PermittedContentChoice>;
|
|
43
|
-
export declare function isTransparent(
|
|
44
|
-
content: ReadonlyDeep<PermittedContentPattern>,
|
|
45
|
-
): content is ReadonlyDeep<PermittedContentTransparent>;
|
|
46
|
-
export declare function normalizeModel(
|
|
47
|
-
pattern:
|
|
48
|
-
| ReadonlyDeep<PermittedContentRequire>
|
|
49
|
-
| ReadonlyDeep<PermittedContentOptional>
|
|
50
|
-
| ReadonlyDeep<PermittedContentOneOrMore>
|
|
51
|
-
| ReadonlyDeep<PermittedContentZeroOrMore>,
|
|
52
|
-
): {
|
|
53
|
-
model: ReadonlyDeep<PermittedContentPattern[] | Model>;
|
|
54
|
-
min: number;
|
|
55
|
-
max: number;
|
|
56
|
-
repeat: RepeatSign;
|
|
57
|
-
missingType: MissingNodeReason | undefined;
|
|
6
|
+
export declare function matches(selector: string, node: ChildNode, specs: Specs): {
|
|
7
|
+
matched: boolean;
|
|
8
|
+
not?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
matched: boolean;
|
|
11
|
+
not: ChildNode | undefined;
|
|
58
12
|
};
|
|
59
|
-
export declare function
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
):
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| import('packages/@markuplint/ml-core/lib').Element<import('./types').TagRule[], import('./types').Options>
|
|
81
|
-
| import('packages/@markuplint/ml-core/lib').Block<import('./types').TagRule[], import('./types').Options>
|
|
82
|
-
| undefined;
|
|
83
|
-
transparent?: Element | undefined;
|
|
13
|
+
export declare function isRequire(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentRequire>;
|
|
14
|
+
export declare function isOptional(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentOptional>;
|
|
15
|
+
export declare function isOneOrMore(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentOneOrMore>;
|
|
16
|
+
export declare function isZeroOrMore(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentZeroOrMore>;
|
|
17
|
+
export declare function isChoice(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentChoice>;
|
|
18
|
+
export declare function isTransparent(content: ReadonlyDeep<PermittedContentPattern>): content is ReadonlyDeep<PermittedContentTransparent>;
|
|
19
|
+
export declare function normalizeModel(pattern: ReadonlyDeep<PermittedContentRequire> | ReadonlyDeep<PermittedContentOptional> | ReadonlyDeep<PermittedContentOneOrMore> | ReadonlyDeep<PermittedContentZeroOrMore>): {
|
|
20
|
+
model: ReadonlyDeep<PermittedContentPattern[] | Model>;
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
repeat: RepeatSign;
|
|
24
|
+
missingType: MissingNodeReason | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare function mergeHints(a: Readonly<Hints>, b: Readonly<Hints>): Partial<{
|
|
27
|
+
missing: Partial<{
|
|
28
|
+
barelyMatchedElements?: number | undefined;
|
|
29
|
+
need?: string | undefined;
|
|
30
|
+
}> | undefined;
|
|
31
|
+
max?: number | undefined;
|
|
32
|
+
not?: import("packages/@markuplint/ml-core/lib").DocumentType<import("./types").TagRule[], import("./types").Options> | import("packages/@markuplint/ml-core/lib/ml-dom/node/character-data").MLCharacterData<import("./types").TagRule[], import("./types").Options, import("packages/@markuplint/ml-ast/lib").MLASTAbstractNode> | import("packages/@markuplint/ml-core/lib").Element<import("./types").TagRule[], import("./types").Options> | import("packages/@markuplint/ml-core/lib").Block<import("./types").TagRule[], import("./types").Options> | undefined;
|
|
33
|
+
transparent?: Element | undefined;
|
|
84
34
|
}>;
|
|
85
35
|
export declare function cleanObject<T extends Object>(object: T): Partial<T>;
|
|
86
36
|
export declare class Collection {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
37
|
+
#private;
|
|
38
|
+
constructor(origin: readonly ChildNode[]);
|
|
39
|
+
get matched(): ChildNode[];
|
|
40
|
+
get matchedCount(): number;
|
|
41
|
+
get nodes(): ChildNode[];
|
|
42
|
+
get unmatched(): ChildNode[];
|
|
43
|
+
addMatched(nodes: ChildNode[]): boolean;
|
|
44
|
+
back(): void;
|
|
45
|
+
lock(): void;
|
|
46
|
+
max(max: number): void;
|
|
47
|
+
toString(highlightExtraNodes?: boolean): string;
|
|
48
|
+
}
|
|
49
|
+
export declare class UnsupportedError extends Error {
|
|
98
50
|
}
|
|
99
|
-
export declare class UnsupportedError extends Error {}
|
|
100
51
|
export declare function modelLog(model: ReadonlyDeep<Model | PermittedContentPattern[]>, repeat: RepeatSign): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: Readonly<import(
|
|
1
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
|
|
2
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ARIAVersion } from '@markuplint/ml-spec';
|
|
2
2
|
type Option = {
|
|
3
|
-
|
|
3
|
+
ariaVersion: ARIAVersion;
|
|
4
4
|
};
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Option>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Lang } from './types';
|
|
2
2
|
type Options = {
|
|
3
|
-
|
|
3
|
+
langs?: Lang[];
|
|
4
4
|
};
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type DateTimeKey = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'ms';
|
|
2
2
|
export type DateTimeData = Partial<Record<DateTimeKey, number>>;
|
|
3
3
|
export type DateTime = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
datetime: DateTimeData;
|
|
5
|
+
zone?: number;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* @see https://github.com/wanasit/chrono#locales
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type RequiredAttributes = string | (string | Attr)[];
|
|
2
2
|
type Attr = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
name: string;
|
|
4
|
+
value?: string | string[];
|
|
5
5
|
};
|
|
6
|
-
declare const _default: Readonly<import(
|
|
6
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<RequiredAttributes, undefined>>;
|
|
7
7
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type Options = {
|
|
2
|
-
|
|
2
|
+
ignoreHasMutableContents: boolean;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: Readonly<import(
|
|
4
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<string[], Options>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface Options {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
'expected-once': boolean;
|
|
3
|
+
'in-document-fragment': boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
6
6
|
export default _default;
|
package/lib/use-list/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type Bullets = readonly string[];
|
|
2
2
|
type Options = {
|
|
3
|
-
|
|
3
|
+
spaceNeededBullets?: string[];
|
|
4
4
|
};
|
|
5
|
-
declare const _default: Readonly<import(
|
|
5
|
+
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<Bullets, Options>>;
|
|
6
6
|
export default _default;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingDefaultValue: AttrChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
propSpecs: readonly ARIAProperty[];
|
|
9
|
-
}
|
|
10
|
-
>;
|
|
4
|
+
export declare const checkingDefaultValue: AttrChecker<boolean, Options, {
|
|
5
|
+
propSpecs: readonly ARIAProperty[];
|
|
6
|
+
}>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingDeprecatedProps: AttrChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
role: ARIARole | null;
|
|
9
|
-
propSpecs: readonly ARIAProperty[];
|
|
10
|
-
}
|
|
11
|
-
>;
|
|
4
|
+
export declare const checkingDeprecatedProps: AttrChecker<boolean, Options, {
|
|
5
|
+
role: ARIARole | null;
|
|
6
|
+
propSpecs: readonly ARIAProperty[];
|
|
7
|
+
}>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingDisallowedProp: AttrChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
role: ARIARole | null;
|
|
9
|
-
propSpecs: readonly ARIAProperty[];
|
|
10
|
-
}
|
|
11
|
-
>;
|
|
4
|
+
export declare const checkingDisallowedProp: AttrChecker<boolean, Options, {
|
|
5
|
+
role: ARIARole | null;
|
|
6
|
+
propSpecs: readonly ARIAProperty[];
|
|
7
|
+
}>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty, Attribute } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingImplicitProps: AttrChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
propSpecs: readonly ARIAProperty[];
|
|
9
|
-
attrSpecs: readonly Attribute[] | null;
|
|
10
|
-
}
|
|
11
|
-
>;
|
|
4
|
+
export declare const checkingImplicitProps: AttrChecker<boolean, Options, {
|
|
5
|
+
propSpecs: readonly ARIAProperty[];
|
|
6
|
+
attrSpecs: readonly Attribute[] | null;
|
|
7
|
+
}>;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingNoGlobalProp: AttrChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
propSpecs: readonly ARIAProperty[];
|
|
9
|
-
}
|
|
10
|
-
>;
|
|
4
|
+
export declare const checkingNoGlobalProp: AttrChecker<boolean, Options, {
|
|
5
|
+
propSpecs: readonly ARIAProperty[];
|
|
6
|
+
}>;
|
|
@@ -6,10 +6,6 @@ import type { ARIARole } from '@markuplint/ml-spec';
|
|
|
6
6
|
*
|
|
7
7
|
* @see https://w3c.github.io/aria/#mustContain
|
|
8
8
|
*/
|
|
9
|
-
export declare const checkingRequiredOwnedElements: ElementChecker<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
role?: ARIARole | null;
|
|
14
|
-
}
|
|
15
|
-
>;
|
|
9
|
+
export declare const checkingRequiredOwnedElements: ElementChecker<boolean, Options, {
|
|
10
|
+
role?: ARIARole | null;
|
|
11
|
+
}>;
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import type { Options } from '../types';
|
|
2
2
|
import type { ElementChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
|
|
4
|
-
export declare const checkingRequiredProp: ElementChecker<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
isImplicit?: boolean;
|
|
11
|
-
})
|
|
12
|
-
| null;
|
|
13
|
-
propSpecs: readonly ARIAProperty[];
|
|
14
|
-
}
|
|
15
|
-
>;
|
|
4
|
+
export declare const checkingRequiredProp: ElementChecker<boolean, Options, {
|
|
5
|
+
role?: (ARIARole & {
|
|
6
|
+
isImplicit?: boolean;
|
|
7
|
+
}) | null;
|
|
8
|
+
propSpecs: readonly ARIAProperty[];
|
|
9
|
+
}>;
|