@markuplint/types 4.7.7 → 4.8.1
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/CHANGELOG.md +20 -0
- package/README.md +68 -64
- package/lib/check-base.d.ts +10 -0
- package/lib/check-base.js +50 -0
- package/lib/check.d.ts +1 -8
- package/lib/check.js +4 -48
- package/lib/css-defs.d.ts +2 -0
- package/lib/css-defs.js +246 -0
- package/lib/css-overrides.d.ts +1 -0
- package/lib/css-overrides.js +21 -0
- package/lib/css-syntax.js +4 -3
- package/lib/css-tokenizers.d.ts +2 -0
- package/lib/css-tokenizers.js +11 -0
- package/lib/defs.d.ts +2 -4
- package/lib/defs.js +34 -267
- package/lib/directive.d.ts +2 -2
- package/lib/directive.js +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/keyword-type.d.ts +2 -2
- package/lib/keyword-type.js +5 -6
- package/lib/list.d.ts +2 -2
- package/lib/list.js +3 -3
- package/lib/token/token-collection.js +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/types.schema.d.ts +1 -1
- package/lib/whatwg/check-link-type.d.ts +8 -0
- package/lib/whatwg/check-link-type.js +568 -0
- package/package.json +5 -5
- package/types.schema.json +4 -0
package/lib/css-syntax.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { fork } from 'css-tree';
|
|
2
2
|
import { log } from './debug.js';
|
|
3
|
-
import { tokenizers, overrides } from './defs.js';
|
|
4
3
|
import { matched } from './match-result.js';
|
|
4
|
+
import { cssTokenizers } from './css-tokenizers.js';
|
|
5
|
+
import { cssOverrides } from './css-overrides.js';
|
|
5
6
|
const MIMIC_TAG_L = 'mimiccases---';
|
|
6
7
|
const MIMIC_TAG_R = '---mimiccases';
|
|
7
8
|
const MIMIC_LENGTH = (MIMIC_TAG_L + MIMIC_TAG_R).length;
|
|
@@ -27,7 +28,7 @@ export function cssSyntaxMatch(value, type) {
|
|
|
27
28
|
return matched();
|
|
28
29
|
}
|
|
29
30
|
const types = {
|
|
30
|
-
...
|
|
31
|
+
...cssTokenizers,
|
|
31
32
|
...type.syntax.def,
|
|
32
33
|
};
|
|
33
34
|
for (const key of Object.keys(types)) {
|
|
@@ -53,7 +54,7 @@ export function cssSyntaxMatch(value, type) {
|
|
|
53
54
|
// @ts-ignore
|
|
54
55
|
const lexer = fork({
|
|
55
56
|
types: {
|
|
56
|
-
...
|
|
57
|
+
...cssOverrides,
|
|
57
58
|
...typesExtended,
|
|
58
59
|
},
|
|
59
60
|
properties: propsExtended,
|
package/lib/defs.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import type { Defs
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const overrides: Record<string, string>;
|
|
4
|
-
export declare const tokenizers: Record<string, CssSyntaxTokenizer>;
|
|
1
|
+
import type { Defs } from './types.js';
|
|
2
|
+
export declare const defs: Defs;
|
package/lib/defs.js
CHANGED
|
@@ -13,7 +13,8 @@ import { isBrowserContextName } from './whatwg/is-browser-context-name.js';
|
|
|
13
13
|
import { isCustomElementName } from './whatwg/is-custom-element-name.js';
|
|
14
14
|
import { isItempropName } from './whatwg/is-itemprop-name.js';
|
|
15
15
|
import { isNavigableTargetName } from './whatwg/is-navigable-target-name.js';
|
|
16
|
-
|
|
16
|
+
import { checkLinkType } from './whatwg/check-link-type.js';
|
|
17
|
+
export const defs = {
|
|
17
18
|
Any: {
|
|
18
19
|
ref: '',
|
|
19
20
|
is: () => matched(),
|
|
@@ -636,278 +637,44 @@ export const types = {
|
|
|
636
637
|
});
|
|
637
638
|
},
|
|
638
639
|
},
|
|
639
|
-
|
|
640
|
-
ref: 'https://
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
},
|
|
646
|
-
},
|
|
647
|
-
},
|
|
648
|
-
// DO NOT USE: Issue #564
|
|
649
|
-
'<class-list>': {
|
|
650
|
-
ref: 'https://www.w3.org/TR/SVG/styling.html#ClassAttribute',
|
|
651
|
-
syntax: {
|
|
652
|
-
apply: '<class-list>',
|
|
653
|
-
def: {
|
|
654
|
-
'class-list': '<ident-token>*',
|
|
655
|
-
},
|
|
656
|
-
},
|
|
657
|
-
},
|
|
658
|
-
'<svg-font-size>': {
|
|
659
|
-
ref: 'https://drafts.csswg.org/css-fonts-5/#descdef-font-face-font-size',
|
|
660
|
-
// TODO:
|
|
661
|
-
is: () => matched(),
|
|
662
|
-
},
|
|
663
|
-
'<svg-font-size-adjust>': {
|
|
664
|
-
ref: 'https://drafts.csswg.org/css-fonts-5/#propdef-font-size-adjust',
|
|
665
|
-
// TODO:
|
|
666
|
-
is: () => matched(),
|
|
667
|
-
},
|
|
668
|
-
"<'color-profile'>": {
|
|
669
|
-
ref: 'https://www.w3.org/TR/SVG11/color.html#ColorProfileProperty',
|
|
670
|
-
// TODO:
|
|
671
|
-
is: () => matched(),
|
|
672
|
-
},
|
|
673
|
-
"<'color-rendering'>": {
|
|
674
|
-
ref: 'https://www.w3.org/TR/SVG11/painting.html#ColorRenderingProperty',
|
|
675
|
-
// TODO:
|
|
676
|
-
is: () => matched(),
|
|
677
|
-
},
|
|
678
|
-
"<'enable-background'>": {
|
|
679
|
-
ref: 'https://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty',
|
|
680
|
-
// TODO:
|
|
681
|
-
is: () => matched(),
|
|
682
|
-
},
|
|
683
|
-
'<list-of-svg-feature-string>': {
|
|
684
|
-
ref: 'https://www.w3.org/TR/SVG11/feature.html',
|
|
685
|
-
// TODO:
|
|
686
|
-
is: () => matched(),
|
|
687
|
-
},
|
|
688
|
-
'<animatable-value>': {
|
|
689
|
-
ref: 'https://svgwg.org/specs/animations/#FromAttribute',
|
|
690
|
-
// TODO:
|
|
691
|
-
is: () => matched(),
|
|
692
|
-
},
|
|
693
|
-
'<begin-value-list>': {
|
|
694
|
-
ref: 'https://svgwg.org/specs/animations/#BeginValueListSyntax',
|
|
695
|
-
// TODO:
|
|
696
|
-
is: () => matched(),
|
|
697
|
-
},
|
|
698
|
-
'<end-value-list>': {
|
|
699
|
-
ref: 'https://svgwg.org/specs/animations/#EndValueListSyntax',
|
|
700
|
-
// TODO:
|
|
701
|
-
is: () => matched(),
|
|
702
|
-
},
|
|
703
|
-
'<list-of-value>': {
|
|
704
|
-
ref: 'https://svgwg.org/specs/animations/#ValuesAttribute',
|
|
705
|
-
// TODO:
|
|
706
|
-
is: () => matched(),
|
|
707
|
-
},
|
|
708
|
-
'<clock-value>': {
|
|
709
|
-
ref: 'https://www.w3.org/TR/2001/REC-smil-animation-20010904/#Timing-ClockValueSyntax',
|
|
710
|
-
syntax: {
|
|
711
|
-
// TODO:
|
|
712
|
-
apply: '<clock-value>',
|
|
713
|
-
def: {
|
|
714
|
-
'clock-value': '<any-value>',
|
|
715
|
-
},
|
|
716
|
-
},
|
|
717
|
-
},
|
|
718
|
-
'<color-matrix>': {
|
|
719
|
-
ref: 'https://drafts.fxtf.org/filter-effects/#element-attrdef-fecolormatrix-values',
|
|
720
|
-
syntax: {
|
|
721
|
-
apply: '<color-matrix>',
|
|
722
|
-
def: {
|
|
723
|
-
'color-matrix': '[ <number-zero-one> [,]? ]{19} <number-zero-one>',
|
|
724
|
-
},
|
|
725
|
-
},
|
|
726
|
-
},
|
|
727
|
-
'<dasharray>': {
|
|
728
|
-
ref: 'https://svgwg.org/svg2-draft/painting.html#StrokeDasharrayProperty',
|
|
729
|
-
syntax: {
|
|
730
|
-
apply: '<dasharray>',
|
|
731
|
-
def: {
|
|
732
|
-
dasharray: '[ [ <svg-length> | <percentage> | <number> ]+ ]#',
|
|
733
|
-
},
|
|
734
|
-
},
|
|
735
|
-
},
|
|
736
|
-
'<key-points>': {
|
|
737
|
-
ref: 'https://svgwg.org/specs/animations/#KeyPointsAttribute',
|
|
738
|
-
syntax: {
|
|
739
|
-
apply: '<key-points>',
|
|
740
|
-
def: {
|
|
741
|
-
'key-points': '<number> [; <number>]* [;]?',
|
|
742
|
-
},
|
|
743
|
-
},
|
|
744
|
-
},
|
|
745
|
-
'<key-splines>': {
|
|
746
|
-
ref: 'https://svgwg.org/specs/animations/#KeyTimesAttribute',
|
|
747
|
-
syntax: {
|
|
748
|
-
apply: '<key-splines>',
|
|
749
|
-
def: {
|
|
750
|
-
'key-splines': '<control-point> [; <control-point>]* [;]?',
|
|
751
|
-
'control-point': '<number> [,]? <number> [,]? <number> [,]? <number>',
|
|
752
|
-
},
|
|
753
|
-
},
|
|
754
|
-
},
|
|
755
|
-
'<key-times>': {
|
|
756
|
-
ref: 'https://svgwg.org/specs/animations/#KeyTimesAttribute',
|
|
757
|
-
syntax: {
|
|
758
|
-
apply: '<key-times>',
|
|
759
|
-
def: {
|
|
760
|
-
'key-times': '<number> [; <number>]* [;]?',
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
},
|
|
764
|
-
'<system-language>': {
|
|
765
|
-
ref: 'https://svgwg.org/svg2-draft/struct.html#SystemLanguageAttribute',
|
|
766
|
-
syntax: {
|
|
767
|
-
apply: '<system-language>',
|
|
768
|
-
def: {
|
|
769
|
-
'system-language': '<bcp-47>#',
|
|
770
|
-
},
|
|
771
|
-
},
|
|
772
|
-
},
|
|
773
|
-
'<origin>': {
|
|
774
|
-
ref: 'https://www.w3.org/TR/2001/REC-smil-animation-20010904/#MotionOriginAttribute',
|
|
775
|
-
syntax: {
|
|
776
|
-
apply: '<origin>',
|
|
777
|
-
def: {
|
|
778
|
-
origin: 'default',
|
|
779
|
-
},
|
|
780
|
-
},
|
|
781
|
-
},
|
|
782
|
-
'<svg-path>': {
|
|
783
|
-
ref: 'https://svgwg.org/svg2-draft/paths.html#PathDataBNF',
|
|
784
|
-
syntax: {
|
|
785
|
-
apply: '<svg-path>',
|
|
786
|
-
// TODO:
|
|
787
|
-
def: {
|
|
788
|
-
'svg-path': '<any-value>',
|
|
789
|
-
},
|
|
790
|
-
},
|
|
791
|
-
},
|
|
792
|
-
'<points>': {
|
|
793
|
-
ref: 'https://svgwg.org/svg2-draft/shapes.html#DataTypePoints',
|
|
794
|
-
syntax: {
|
|
795
|
-
apply: '<points>',
|
|
796
|
-
def: {
|
|
797
|
-
points: '[ <number>+ ]#',
|
|
798
|
-
},
|
|
799
|
-
},
|
|
800
|
-
},
|
|
801
|
-
'<preserve-aspect-ratio>': {
|
|
802
|
-
ref: 'https://svgwg.org/svg2-draft/coords.html#PreserveAspectRatioAttribute',
|
|
803
|
-
syntax: {
|
|
804
|
-
apply: '<preserve-aspect-ratio>',
|
|
805
|
-
def: {
|
|
806
|
-
'preserve-aspect-ratio': '<align> <meet-or-slice>?',
|
|
807
|
-
align: 'none | xMinYMin | xMidYMin | xMaxYMin | xMinYMid | xMidYMid | xMaxYMid| xMinYMax | xMidYMax | xMaxYMax',
|
|
808
|
-
'meet-or-slice': 'meet | slice',
|
|
809
|
-
},
|
|
810
|
-
// A new spec
|
|
811
|
-
// @see https://drafts.fxtf.org/filter-effects/#element-attrdef-feimage-preserveaspectratio
|
|
812
|
-
// > preserveAspectRatio = "[defer] <align> [<meetOrSlice>]"
|
|
813
|
-
},
|
|
814
|
-
},
|
|
815
|
-
'<view-box>': {
|
|
816
|
-
ref: 'https://svgwg.org/svg2-draft/coords.html#ViewBoxAttribute',
|
|
817
|
-
syntax: {
|
|
818
|
-
apply: '<view-box>',
|
|
819
|
-
def: {
|
|
820
|
-
'view-box': '<min-x> [,]? <min-y> [,]? <width> [,]? <height>', // As '[<min-x>,? <min-y>,? <width>,? <height>]',
|
|
821
|
-
'min-x': '<number>',
|
|
822
|
-
'min-y': '<number>',
|
|
823
|
-
width: '<number>',
|
|
824
|
-
height: '<number>',
|
|
825
|
-
},
|
|
826
|
-
},
|
|
827
|
-
},
|
|
828
|
-
'<rotate>': {
|
|
829
|
-
ref: 'https://svgwg.org/specs/animations/#RotateAttribute',
|
|
830
|
-
syntax: {
|
|
831
|
-
apply: '<rotate>',
|
|
832
|
-
def: {
|
|
833
|
-
rotate: '<number> | auto | auto-reverse',
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
},
|
|
837
|
-
'<text-coordinate>': {
|
|
838
|
-
ref: 'https://svgwg.org/svg2-draft/text.html#TSpanAttributes',
|
|
839
|
-
syntax: {
|
|
840
|
-
apply: '<text-coordinate>',
|
|
841
|
-
def: {
|
|
842
|
-
'text-coordinate': '[ [ <svg-length> | <percentage> | <number> ]+ ]#',
|
|
843
|
-
},
|
|
844
|
-
},
|
|
845
|
-
},
|
|
846
|
-
'<list-of-lengths>': {
|
|
847
|
-
ref: 'https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts',
|
|
848
|
-
syntax: {
|
|
849
|
-
apply: '<list-of-lengths>',
|
|
850
|
-
def: {
|
|
851
|
-
'list-of-lengths': '[ <svg-length> [,]? ]* <svg-length>',
|
|
640
|
+
LinkTypeForLinkElement: {
|
|
641
|
+
ref: 'https://html.spec.whatwg.org/multipage/links.html#linkTypes',
|
|
642
|
+
expects: [
|
|
643
|
+
{
|
|
644
|
+
type: 'const',
|
|
645
|
+
value: 'Link types allowed in the `link` element when used in the `body` element',
|
|
852
646
|
},
|
|
853
|
-
|
|
647
|
+
],
|
|
648
|
+
is: checkLinkType({ el: 'link' }),
|
|
854
649
|
},
|
|
855
|
-
|
|
856
|
-
ref: 'https://
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
650
|
+
LinkTypeForLinkElementInBody: {
|
|
651
|
+
ref: 'https://html.spec.whatwg.org/multipage/links.html#body-ok',
|
|
652
|
+
expects: [
|
|
653
|
+
{
|
|
654
|
+
type: 'const',
|
|
655
|
+
value: 'Link types allowed in the `link` element when used in the `body` element',
|
|
861
656
|
},
|
|
862
|
-
|
|
657
|
+
],
|
|
658
|
+
is: checkLinkType({ el: 'body link' }),
|
|
863
659
|
},
|
|
864
|
-
|
|
865
|
-
ref: 'https://
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
660
|
+
LinkTypeForAnchorAndAreaElement: {
|
|
661
|
+
ref: 'https://html.spec.whatwg.org/multipage/links.html#linkTypes',
|
|
662
|
+
expects: [
|
|
663
|
+
{
|
|
664
|
+
type: 'const',
|
|
665
|
+
value: 'Link types allowed in `a` and `area` elements',
|
|
870
666
|
},
|
|
871
|
-
|
|
667
|
+
],
|
|
668
|
+
is: checkLinkType({ el: 'a, area' }),
|
|
872
669
|
},
|
|
873
|
-
|
|
874
|
-
ref: 'https://
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
670
|
+
LinkTypeForFormElement: {
|
|
671
|
+
ref: 'https://html.spec.whatwg.org/multipage/links.html#linkTypes',
|
|
672
|
+
expects: [
|
|
673
|
+
{
|
|
674
|
+
type: 'const',
|
|
675
|
+
value: 'Link types allowed in the `form` element',
|
|
879
676
|
},
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
};
|
|
883
|
-
export const overrides = {
|
|
884
|
-
// Alias
|
|
885
|
-
'legacy-length-percentage': '<length> | <percentage> | <svg-length>',
|
|
886
|
-
'legacy-angle': '<angle> | <zero> | <number>',
|
|
887
|
-
/**
|
|
888
|
-
* @see https://www.w3.org/TR/css-transforms-1/#funcdef-transform-translate
|
|
889
|
-
*/
|
|
890
|
-
'translate()': 'translate( <legacy-length-percentage> , <legacy-length-percentage>? ) | translate( <legacy-length-percentage> <legacy-length-percentage>? )',
|
|
891
|
-
/**
|
|
892
|
-
* @see https://www.w3.org/TR/css-transforms-1/#funcdef-transform-scale
|
|
893
|
-
*/
|
|
894
|
-
'scale()': 'scale( [ <number> | <percentage> ]#{1,2} )',
|
|
895
|
-
/**
|
|
896
|
-
* @see https://www.w3.org/TR/css-transforms-1/#funcdef-transform-rotate
|
|
897
|
-
*/
|
|
898
|
-
'rotate()': 'rotate( <legacy-angle> )',
|
|
899
|
-
/**
|
|
900
|
-
* @see https://www.w3.org/TR/css-transforms-1/#funcdef-transform-skew
|
|
901
|
-
*/
|
|
902
|
-
'skew()': 'skew( <legacy-angle> , <legacy-angle>? ) | skew( <legacy-angle> <legacy-angle>? )',
|
|
903
|
-
};
|
|
904
|
-
export const tokenizers = {
|
|
905
|
-
// RFC
|
|
906
|
-
// https://tools.ietf.org/rfc/bcp/bcp47.html
|
|
907
|
-
'bcp-47'(token) {
|
|
908
|
-
if (!token) {
|
|
909
|
-
return 0;
|
|
910
|
-
}
|
|
911
|
-
return isBCP47()(token.value) ? 1 : 0;
|
|
677
|
+
],
|
|
678
|
+
is: checkLinkType({ el: 'form' }),
|
|
912
679
|
},
|
|
913
680
|
};
|
package/lib/directive.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Result, Directive } from './types.js';
|
|
1
|
+
import type { Result, Directive, Defs } from './types.js';
|
|
2
2
|
import type { ReadonlyDeep } from 'type-fest';
|
|
3
|
-
export declare function checkDirective(value: string, type: ReadonlyDeep<Directive>, ref?: string, cache?: boolean): Result;
|
|
3
|
+
export declare function checkDirective(value: string, type: ReadonlyDeep<Directive>, defs: Defs, ref?: string, cache?: boolean): Result;
|
package/lib/directive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { regexParser } from '@markuplint/shared';
|
|
2
|
-
import {
|
|
2
|
+
import { checkBase } from './check-base.js';
|
|
3
3
|
import { matched, unmatched } from './match-result.js';
|
|
4
|
-
export function checkDirective(value, type, ref, cache = true) {
|
|
4
|
+
export function checkDirective(value, type, defs, ref, cache = true) {
|
|
5
5
|
const unmatches = [];
|
|
6
6
|
for (const directive of type.directive) {
|
|
7
7
|
const directiveMatcher = regexParser(directive);
|
|
@@ -25,7 +25,7 @@ export function checkDirective(value, type, ref, cache = true) {
|
|
|
25
25
|
}
|
|
26
26
|
tokenPart = value.slice(directive.length);
|
|
27
27
|
}
|
|
28
|
-
const result =
|
|
28
|
+
const result = checkBase(tokenPart, type.token, defs, ref, cache);
|
|
29
29
|
if (result.matched) {
|
|
30
30
|
return result;
|
|
31
31
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/keyword-type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Result } from './types.js';
|
|
1
|
+
import type { Defs, Result } from './types.js';
|
|
2
2
|
import type { KeywordDefinedType } from './types.schema.js';
|
|
3
|
-
export declare function checkKeywordType(value: string, type: KeywordDefinedType, cache?: boolean): Result;
|
|
3
|
+
export declare function checkKeywordType(value: string, type: KeywordDefinedType, defs: Defs, cache?: boolean): Result;
|
package/lib/keyword-type.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { isCSSSyntax } from './check.js';
|
|
1
|
+
import { isCSSSyntax } from './check-base.js';
|
|
2
2
|
import { cssSyntaxMatch } from './css-syntax.js';
|
|
3
3
|
import { log } from './debug.js';
|
|
4
|
-
import { types } from './defs.js';
|
|
5
4
|
import { matched } from './match-result.js';
|
|
6
5
|
const resultCache = new Map();
|
|
7
6
|
const CACHE_KEY_PREFIX = '@markuplint/types/checkKeywordType/cache:::';
|
|
8
|
-
export function checkKeywordType(value, type, cache = true) {
|
|
7
|
+
export function checkKeywordType(value, type, defs, cache = true) {
|
|
9
8
|
const key = `${CACHE_KEY_PREFIX}${value}${type}`;
|
|
10
9
|
if (cache) {
|
|
11
10
|
const cachedResult = resultCache.get(key);
|
|
@@ -14,7 +13,7 @@ export function checkKeywordType(value, type, cache = true) {
|
|
|
14
13
|
return cachedResult;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
const result = _checkKeywordType(value, type);
|
|
16
|
+
const result = _checkKeywordType(value, type, defs);
|
|
18
17
|
if (cache) {
|
|
19
18
|
resultCache.set(key, result);
|
|
20
19
|
if (log.enabled) {
|
|
@@ -28,8 +27,8 @@ export function checkKeywordType(value, type, cache = true) {
|
|
|
28
27
|
}
|
|
29
28
|
return result;
|
|
30
29
|
}
|
|
31
|
-
function _checkKeywordType(value, type) {
|
|
32
|
-
const def =
|
|
30
|
+
function _checkKeywordType(value, type, defs) {
|
|
31
|
+
const def = defs[type];
|
|
33
32
|
if (!def) {
|
|
34
33
|
log('The "%s" type is not defined in custom type identifier markuplint specified', type);
|
|
35
34
|
try {
|
package/lib/list.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Result } from './types.js';
|
|
1
|
+
import type { Defs, Result } from './types.js';
|
|
2
2
|
import type { List } from './types.schema.js';
|
|
3
3
|
import type { ReadonlyDeep } from 'type-fest';
|
|
4
|
-
export declare function checkList(value: string, type: ReadonlyDeep<List>, ref?: string, cache?: boolean): Result;
|
|
4
|
+
export declare function checkList(value: string, type: ReadonlyDeep<List>, defs: Defs, ref?: string, cache?: boolean): Result;
|
package/lib/list.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { checkBase } from './check-base.js';
|
|
2
2
|
import { matched } from './match-result.js';
|
|
3
3
|
import { Token, TokenCollection } from './token/index.js';
|
|
4
|
-
export function checkList(value, type, ref, cache = true) {
|
|
4
|
+
export function checkList(value, type, defs, ref, cache = true) {
|
|
5
5
|
const tokens = new TokenCollection(value, type);
|
|
6
6
|
const matches = tokens.check({ ref });
|
|
7
7
|
if (!matches.matched) {
|
|
@@ -9,7 +9,7 @@ export function checkList(value, type, ref, cache = true) {
|
|
|
9
9
|
}
|
|
10
10
|
const identTokens = tokens.getIdentTokens();
|
|
11
11
|
for (const token of identTokens) {
|
|
12
|
-
const res =
|
|
12
|
+
const res = checkBase(token.value, type.token, defs, ref, cache);
|
|
13
13
|
if (!res.matched) {
|
|
14
14
|
const { offset, line, column } = Token.shiftLocation(token, res.offset);
|
|
15
15
|
return {
|
|
@@ -113,7 +113,7 @@ export class TokenCollection extends Array {
|
|
|
113
113
|
}
|
|
114
114
|
check(options = {}) {
|
|
115
115
|
const { expects, ref } = options;
|
|
116
|
-
if (this.disallowToSurroundBySpaces) {
|
|
116
|
+
if (this.separator !== 'space' && this.disallowToSurroundBySpaces) {
|
|
117
117
|
for (const token of this) {
|
|
118
118
|
if (token.type === 13) {
|
|
119
119
|
return token.unmatched({
|
package/lib/types.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export type Expect = {
|
|
|
43
43
|
};
|
|
44
44
|
export type FormattedPrimitiveTypeCheck = (value: string) => boolean;
|
|
45
45
|
export type FormattedPrimitiveTypeCreator<O = never> = (options?: O) => FormattedPrimitiveTypeCheck;
|
|
46
|
-
export type Defs = Record<string, CustomCssSyntax | CustomSyntax
|
|
46
|
+
export type Defs = Readonly<Record<string, CustomCssSyntax | CustomSyntax>>;
|
|
47
47
|
export type CustomSyntax = {
|
|
48
48
|
readonly ref: string;
|
|
49
49
|
readonly expects?: readonly Expect[];
|
package/lib/types.schema.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export type Type = KeywordDefinedType | List | Enum | Number | Directive;
|
|
7
7
|
export type KeywordDefinedType = CssSyntax | ExtendedType | HtmlAttrRequirement;
|
|
8
8
|
export type CssSyntax = "<'--*'>" | "<'-moz-appearance'>" | "<'-moz-background-clip'>" | "<'-moz-binding'>" | "<'-moz-border-bottom-colors'>" | "<'-moz-border-left-colors'>" | "<'-moz-border-radius-bottomleft'>" | "<'-moz-border-radius-bottomright'>" | "<'-moz-border-radius-topleft'>" | "<'-moz-border-radius-topright'>" | "<'-moz-border-right-colors'>" | "<'-moz-border-top-colors'>" | "<'-moz-context-properties'>" | "<'-moz-control-character-visibility'>" | "<'-moz-float-edge'>" | "<'-moz-force-broken-image-icon'>" | "<'-moz-image-region'>" | "<'-moz-orient'>" | "<'-moz-osx-font-smoothing'>" | "<'-moz-outline-radius'>" | "<'-moz-outline-radius-bottomleft'>" | "<'-moz-outline-radius-bottomright'>" | "<'-moz-outline-radius-topleft'>" | "<'-moz-outline-radius-topright'>" | "<'-moz-stack-sizing'>" | "<'-moz-text-blink'>" | "<'-moz-user-focus'>" | "<'-moz-user-input'>" | "<'-moz-user-modify'>" | "<'-moz-user-select'>" | "<'-moz-window-dragging'>" | "<'-moz-window-shadow'>" | "<'-ms-accelerator'>" | "<'-ms-block-progression'>" | "<'-ms-content-zoom-chaining'>" | "<'-ms-content-zoom-limit'>" | "<'-ms-content-zoom-limit-max'>" | "<'-ms-content-zoom-limit-min'>" | "<'-ms-content-zoom-snap'>" | "<'-ms-content-zoom-snap-points'>" | "<'-ms-content-zoom-snap-type'>" | "<'-ms-content-zooming'>" | "<'-ms-filter'>" | "<'-ms-flex-align'>" | "<'-ms-flex-item-align'>" | "<'-ms-flex-line-pack'>" | "<'-ms-flex-negative'>" | "<'-ms-flex-order'>" | "<'-ms-flex-pack'>" | "<'-ms-flex-positive'>" | "<'-ms-flex-preferred-size'>" | "<'-ms-flow-from'>" | "<'-ms-flow-into'>" | "<'-ms-grid-column-align'>" | "<'-ms-grid-columns'>" | "<'-ms-grid-row-align'>" | "<'-ms-grid-rows'>" | "<'-ms-high-contrast-adjust'>" | "<'-ms-hyphenate-limit-chars'>" | "<'-ms-hyphenate-limit-last'>" | "<'-ms-hyphenate-limit-lines'>" | "<'-ms-hyphenate-limit-zone'>" | "<'-ms-ime-align'>" | "<'-ms-interpolation-mode'>" | "<'-ms-overflow-style'>" | "<'-ms-scroll-chaining'>" | "<'-ms-scroll-limit'>" | "<'-ms-scroll-limit-x-max'>" | "<'-ms-scroll-limit-x-min'>" | "<'-ms-scroll-limit-y-max'>" | "<'-ms-scroll-limit-y-min'>" | "<'-ms-scroll-rails'>" | "<'-ms-scroll-snap-points-x'>" | "<'-ms-scroll-snap-points-y'>" | "<'-ms-scroll-snap-type'>" | "<'-ms-scroll-snap-x'>" | "<'-ms-scroll-snap-y'>" | "<'-ms-scroll-translation'>" | "<'-ms-scrollbar-3dlight-color'>" | "<'-ms-scrollbar-arrow-color'>" | "<'-ms-scrollbar-base-color'>" | "<'-ms-scrollbar-darkshadow-color'>" | "<'-ms-scrollbar-face-color'>" | "<'-ms-scrollbar-highlight-color'>" | "<'-ms-scrollbar-shadow-color'>" | "<'-ms-scrollbar-track-color'>" | "<'-ms-text-autospace'>" | "<'-ms-touch-select'>" | "<'-ms-user-select'>" | "<'-ms-wrap-flow'>" | "<'-ms-wrap-margin'>" | "<'-ms-wrap-through'>" | "<'-webkit-appearance'>" | "<'-webkit-background-clip'>" | "<'-webkit-border-before'>" | "<'-webkit-border-before-color'>" | "<'-webkit-border-before-style'>" | "<'-webkit-border-before-width'>" | "<'-webkit-box-reflect'>" | "<'-webkit-column-break-after'>" | "<'-webkit-column-break-before'>" | "<'-webkit-column-break-inside'>" | "<'-webkit-font-smoothing'>" | "<'-webkit-line-clamp'>" | "<'-webkit-mask'>" | "<'-webkit-mask-attachment'>" | "<'-webkit-mask-box-image'>" | "<'-webkit-mask-clip'>" | "<'-webkit-mask-composite'>" | "<'-webkit-mask-image'>" | "<'-webkit-mask-origin'>" | "<'-webkit-mask-position'>" | "<'-webkit-mask-position-x'>" | "<'-webkit-mask-position-y'>" | "<'-webkit-mask-repeat'>" | "<'-webkit-mask-repeat-x'>" | "<'-webkit-mask-repeat-y'>" | "<'-webkit-mask-size'>" | "<'-webkit-overflow-scrolling'>" | "<'-webkit-print-color-adjust'>" | "<'-webkit-tap-highlight-color'>" | "<'-webkit-text-fill-color'>" | "<'-webkit-text-security'>" | "<'-webkit-text-stroke'>" | "<'-webkit-text-stroke-color'>" | "<'-webkit-text-stroke-width'>" | "<'-webkit-touch-callout'>" | "<'-webkit-user-drag'>" | "<'-webkit-user-modify'>" | "<'-webkit-user-select'>" | "<'accent-color'>" | "<'align-content'>" | "<'align-items'>" | "<'align-self'>" | "<'align-tracks'>" | "<'alignment-baseline'>" | "<'all'>" | "<'anchor-name'>" | "<'anchor-scope'>" | "<'animation'>" | "<'animation-composition'>" | "<'animation-delay'>" | "<'animation-direction'>" | "<'animation-duration'>" | "<'animation-fill-mode'>" | "<'animation-iteration-count'>" | "<'animation-name'>" | "<'animation-play-state'>" | "<'animation-range'>" | "<'animation-range-end'>" | "<'animation-range-start'>" | "<'animation-timeline'>" | "<'animation-timing-function'>" | "<'appearance'>" | "<'aspect-ratio'>" | "<'azimuth'>" | "<'backdrop-filter'>" | "<'backface-visibility'>" | "<'background'>" | "<'background-attachment'>" | "<'background-blend-mode'>" | "<'background-clip'>" | "<'background-color'>" | "<'background-image'>" | "<'background-origin'>" | "<'background-position'>" | "<'background-position-x'>" | "<'background-position-y'>" | "<'background-repeat'>" | "<'background-size'>" | "<'baseline-shift'>" | "<'behavior'>" | "<'block-size'>" | "<'border'>" | "<'border-block'>" | "<'border-block-color'>" | "<'border-block-end'>" | "<'border-block-end-color'>" | "<'border-block-end-style'>" | "<'border-block-end-width'>" | "<'border-block-start'>" | "<'border-block-start-color'>" | "<'border-block-start-style'>" | "<'border-block-start-width'>" | "<'border-block-style'>" | "<'border-block-width'>" | "<'border-bottom'>" | "<'border-bottom-color'>" | "<'border-bottom-left-radius'>" | "<'border-bottom-right-radius'>" | "<'border-bottom-style'>" | "<'border-bottom-width'>" | "<'border-collapse'>" | "<'border-color'>" | "<'border-end-end-radius'>" | "<'border-end-start-radius'>" | "<'border-image'>" | "<'border-image-outset'>" | "<'border-image-repeat'>" | "<'border-image-slice'>" | "<'border-image-source'>" | "<'border-image-width'>" | "<'border-inline'>" | "<'border-inline-color'>" | "<'border-inline-end'>" | "<'border-inline-end-color'>" | "<'border-inline-end-style'>" | "<'border-inline-end-width'>" | "<'border-inline-start'>" | "<'border-inline-start-color'>" | "<'border-inline-start-style'>" | "<'border-inline-start-width'>" | "<'border-inline-style'>" | "<'border-inline-width'>" | "<'border-left'>" | "<'border-left-color'>" | "<'border-left-style'>" | "<'border-left-width'>" | "<'border-radius'>" | "<'border-right'>" | "<'border-right-color'>" | "<'border-right-style'>" | "<'border-right-width'>" | "<'border-spacing'>" | "<'border-start-end-radius'>" | "<'border-start-start-radius'>" | "<'border-style'>" | "<'border-top'>" | "<'border-top-color'>" | "<'border-top-left-radius'>" | "<'border-top-right-radius'>" | "<'border-top-style'>" | "<'border-top-width'>" | "<'border-width'>" | "<'bottom'>" | "<'box-align'>" | "<'box-decoration-break'>" | "<'box-direction'>" | "<'box-flex'>" | "<'box-flex-group'>" | "<'box-lines'>" | "<'box-ordinal-group'>" | "<'box-orient'>" | "<'box-pack'>" | "<'box-shadow'>" | "<'box-sizing'>" | "<'break-after'>" | "<'break-before'>" | "<'break-inside'>" | "<'caption-side'>" | "<'caret'>" | "<'caret-color'>" | "<'caret-shape'>" | "<'clear'>" | "<'clip'>" | "<'clip-path'>" | "<'clip-rule'>" | "<'color'>" | "<'color-interpolation-filters'>" | "<'color-scheme'>" | "<'column-count'>" | "<'column-fill'>" | "<'column-gap'>" | "<'column-rule'>" | "<'column-rule-color'>" | "<'column-rule-style'>" | "<'column-rule-width'>" | "<'column-span'>" | "<'column-width'>" | "<'columns'>" | "<'contain'>" | "<'contain-intrinsic-block-size'>" | "<'contain-intrinsic-height'>" | "<'contain-intrinsic-inline-size'>" | "<'contain-intrinsic-size'>" | "<'contain-intrinsic-width'>" | "<'container'>" | "<'container-name'>" | "<'container-type'>" | "<'content'>" | "<'content-visibility'>" | "<'counter-increment'>" | "<'counter-reset'>" | "<'counter-set'>" | "<'cue'>" | "<'cue-after'>" | "<'cue-before'>" | "<'cursor'>" | "<'cx'>" | "<'cy'>" | "<'d'>" | "<'direction'>" | "<'display'>" | "<'dominant-baseline'>" | "<'empty-cells'>" | "<'field-sizing'>" | "<'fill'>" | "<'fill-opacity'>" | "<'fill-rule'>" | "<'filter'>" | "<'flex'>" | "<'flex-basis'>" | "<'flex-direction'>" | "<'flex-flow'>" | "<'flex-grow'>" | "<'flex-shrink'>" | "<'flex-wrap'>" | "<'float'>" | "<'font'>" | "<'font-family'>" | "<'font-feature-settings'>" | "<'font-kerning'>" | "<'font-language-override'>" | "<'font-optical-sizing'>" | "<'font-palette'>" | "<'font-size'>" | "<'font-size-adjust'>" | "<'font-smooth'>" | "<'font-stretch'>" | "<'font-style'>" | "<'font-synthesis'>" | "<'font-synthesis-position'>" | "<'font-synthesis-small-caps'>" | "<'font-synthesis-style'>" | "<'font-synthesis-weight'>" | "<'font-variant'>" | "<'font-variant-alternates'>" | "<'font-variant-caps'>" | "<'font-variant-east-asian'>" | "<'font-variant-emoji'>" | "<'font-variant-ligatures'>" | "<'font-variant-numeric'>" | "<'font-variant-position'>" | "<'font-variation-settings'>" | "<'font-weight'>" | "<'forced-color-adjust'>" | "<'gap'>" | "<'glyph-orientation-horizontal'>" | "<'glyph-orientation-vertical'>" | "<'grid'>" | "<'grid-area'>" | "<'grid-auto-columns'>" | "<'grid-auto-flow'>" | "<'grid-auto-rows'>" | "<'grid-column'>" | "<'grid-column-end'>" | "<'grid-column-gap'>" | "<'grid-column-start'>" | "<'grid-gap'>" | "<'grid-row'>" | "<'grid-row-end'>" | "<'grid-row-gap'>" | "<'grid-row-start'>" | "<'grid-template'>" | "<'grid-template-areas'>" | "<'grid-template-columns'>" | "<'grid-template-rows'>" | "<'hanging-punctuation'>" | "<'height'>" | "<'hyphenate-character'>" | "<'hyphenate-limit-chars'>" | "<'hyphens'>" | "<'image-orientation'>" | "<'image-rendering'>" | "<'image-resolution'>" | "<'ime-mode'>" | "<'initial-letter'>" | "<'initial-letter-align'>" | "<'inline-size'>" | "<'input-security'>" | "<'inset'>" | "<'inset-block'>" | "<'inset-block-end'>" | "<'inset-block-start'>" | "<'inset-inline'>" | "<'inset-inline-end'>" | "<'inset-inline-start'>" | "<'interpolate-size'>" | "<'isolation'>" | "<'justify-content'>" | "<'justify-items'>" | "<'justify-self'>" | "<'justify-tracks'>" | "<'kerning'>" | "<'left'>" | "<'letter-spacing'>" | "<'line-break'>" | "<'line-clamp'>" | "<'line-height'>" | "<'line-height-step'>" | "<'list-style'>" | "<'list-style-image'>" | "<'list-style-position'>" | "<'list-style-type'>" | "<'margin'>" | "<'margin-block'>" | "<'margin-block-end'>" | "<'margin-block-start'>" | "<'margin-bottom'>" | "<'margin-inline'>" | "<'margin-inline-end'>" | "<'margin-inline-start'>" | "<'margin-left'>" | "<'margin-right'>" | "<'margin-top'>" | "<'margin-trim'>" | "<'marker'>" | "<'marker-end'>" | "<'marker-mid'>" | "<'marker-start'>" | "<'mask'>" | "<'mask-border'>" | "<'mask-border-mode'>" | "<'mask-border-outset'>" | "<'mask-border-repeat'>" | "<'mask-border-slice'>" | "<'mask-border-source'>" | "<'mask-border-width'>" | "<'mask-clip'>" | "<'mask-composite'>" | "<'mask-image'>" | "<'mask-mode'>" | "<'mask-origin'>" | "<'mask-position'>" | "<'mask-repeat'>" | "<'mask-size'>" | "<'mask-type'>" | "<'masonry-auto-flow'>" | "<'math-depth'>" | "<'math-shift'>" | "<'math-style'>" | "<'max-block-size'>" | "<'max-height'>" | "<'max-inline-size'>" | "<'max-lines'>" | "<'max-width'>" | "<'min-block-size'>" | "<'min-height'>" | "<'min-inline-size'>" | "<'min-width'>" | "<'mix-blend-mode'>" | "<'object-fit'>" | "<'object-position'>" | "<'offset'>" | "<'offset-anchor'>" | "<'offset-distance'>" | "<'offset-path'>" | "<'offset-position'>" | "<'offset-rotate'>" | "<'opacity'>" | "<'order'>" | "<'orphans'>" | "<'outline'>" | "<'outline-color'>" | "<'outline-offset'>" | "<'outline-style'>" | "<'outline-width'>" | "<'overflow'>" | "<'overflow-anchor'>" | "<'overflow-block'>" | "<'overflow-clip-box'>" | "<'overflow-clip-margin'>" | "<'overflow-inline'>" | "<'overflow-wrap'>" | "<'overflow-x'>" | "<'overflow-y'>" | "<'overlay'>" | "<'overscroll-behavior'>" | "<'overscroll-behavior-block'>" | "<'overscroll-behavior-inline'>" | "<'overscroll-behavior-x'>" | "<'overscroll-behavior-y'>" | "<'padding'>" | "<'padding-block'>" | "<'padding-block-end'>" | "<'padding-block-start'>" | "<'padding-bottom'>" | "<'padding-inline'>" | "<'padding-inline-end'>" | "<'padding-inline-start'>" | "<'padding-left'>" | "<'padding-right'>" | "<'padding-top'>" | "<'page'>" | "<'page-break-after'>" | "<'page-break-before'>" | "<'page-break-inside'>" | "<'paint-order'>" | "<'pause'>" | "<'pause-after'>" | "<'pause-before'>" | "<'perspective'>" | "<'perspective-origin'>" | "<'place-content'>" | "<'place-items'>" | "<'place-self'>" | "<'pointer-events'>" | "<'position'>" | "<'position-anchor'>" | "<'position-area'>" | "<'position-try'>" | "<'position-try-fallbacks'>" | "<'position-try-order'>" | "<'position-visibility'>" | "<'print-color-adjust'>" | "<'quotes'>" | "<'r'>" | "<'resize'>" | "<'rest'>" | "<'rest-after'>" | "<'rest-before'>" | "<'right'>" | "<'rotate'>" | "<'row-gap'>" | "<'ruby-align'>" | "<'ruby-merge'>" | "<'ruby-position'>" | "<'rx'>" | "<'ry'>" | "<'scale'>" | "<'scroll-behavior'>" | "<'scroll-margin'>" | "<'scroll-margin-block'>" | "<'scroll-margin-block-end'>" | "<'scroll-margin-block-start'>" | "<'scroll-margin-bottom'>" | "<'scroll-margin-inline'>" | "<'scroll-margin-inline-end'>" | "<'scroll-margin-inline-start'>" | "<'scroll-margin-left'>" | "<'scroll-margin-right'>" | "<'scroll-margin-top'>" | "<'scroll-padding'>" | "<'scroll-padding-block'>" | "<'scroll-padding-block-end'>" | "<'scroll-padding-block-start'>" | "<'scroll-padding-bottom'>" | "<'scroll-padding-inline'>" | "<'scroll-padding-inline-end'>" | "<'scroll-padding-inline-start'>" | "<'scroll-padding-left'>" | "<'scroll-padding-right'>" | "<'scroll-padding-top'>" | "<'scroll-snap-align'>" | "<'scroll-snap-coordinate'>" | "<'scroll-snap-destination'>" | "<'scroll-snap-points-x'>" | "<'scroll-snap-points-y'>" | "<'scroll-snap-stop'>" | "<'scroll-snap-type'>" | "<'scroll-snap-type-x'>" | "<'scroll-snap-type-y'>" | "<'scroll-timeline'>" | "<'scroll-timeline-axis'>" | "<'scroll-timeline-name'>" | "<'scrollbar-color'>" | "<'scrollbar-gutter'>" | "<'scrollbar-width'>" | "<'shape-image-threshold'>" | "<'shape-margin'>" | "<'shape-outside'>" | "<'shape-rendering'>" | "<'speak'>" | "<'speak-as'>" | "<'src'>" | "<'stroke'>" | "<'stroke-dasharray'>" | "<'stroke-dashoffset'>" | "<'stroke-linecap'>" | "<'stroke-linejoin'>" | "<'stroke-miterlimit'>" | "<'stroke-opacity'>" | "<'stroke-width'>" | "<'tab-size'>" | "<'table-layout'>" | "<'text-align'>" | "<'text-align-last'>" | "<'text-anchor'>" | "<'text-combine-upright'>" | "<'text-decoration'>" | "<'text-decoration-color'>" | "<'text-decoration-line'>" | "<'text-decoration-skip'>" | "<'text-decoration-skip-ink'>" | "<'text-decoration-style'>" | "<'text-decoration-thickness'>" | "<'text-emphasis'>" | "<'text-emphasis-color'>" | "<'text-emphasis-position'>" | "<'text-emphasis-style'>" | "<'text-indent'>" | "<'text-justify'>" | "<'text-orientation'>" | "<'text-overflow'>" | "<'text-rendering'>" | "<'text-shadow'>" | "<'text-size-adjust'>" | "<'text-spacing-trim'>" | "<'text-transform'>" | "<'text-underline-offset'>" | "<'text-underline-position'>" | "<'text-wrap'>" | "<'text-wrap-mode'>" | "<'text-wrap-style'>" | "<'timeline-scope'>" | "<'top'>" | "<'touch-action'>" | "<'transform'>" | "<'transform-box'>" | "<'transform-origin'>" | "<'transform-style'>" | "<'transition'>" | "<'transition-behavior'>" | "<'transition-delay'>" | "<'transition-duration'>" | "<'transition-property'>" | "<'transition-timing-function'>" | "<'translate'>" | "<'unicode-bidi'>" | "<'unicode-range'>" | "<'user-select'>" | "<'vector-effect'>" | "<'vertical-align'>" | "<'view-timeline'>" | "<'view-timeline-axis'>" | "<'view-timeline-inset'>" | "<'view-timeline-name'>" | "<'view-transition-name'>" | "<'visibility'>" | "<'voice-balance'>" | "<'voice-duration'>" | "<'voice-family'>" | "<'voice-pitch'>" | "<'voice-range'>" | "<'voice-rate'>" | "<'voice-stress'>" | "<'voice-volume'>" | "<'white-space'>" | "<'white-space-collapse'>" | "<'white-space-trim'>" | "<'widows'>" | "<'width'>" | "<'will-change'>" | "<'word-break'>" | "<'word-spacing'>" | "<'word-wrap'>" | "<'writing-mode'>" | "<'x'>" | "<'y'>" | "<'z-index'>" | "<'zoom'>" | '<(-token>' | '<)-token>' | '<-legacy-gradient>' | '<-legacy-linear-gradient-arguments>' | '<-legacy-linear-gradient>' | '<-legacy-radial-gradient-arguments>' | '<-legacy-radial-gradient-shape>' | '<-legacy-radial-gradient-size>' | '<-legacy-radial-gradient>' | '<-legacy-repeating-linear-gradient>' | '<-legacy-repeating-radial-gradient>' | '<-ms-filter-function-legacy>' | '<-ms-filter-function-list>' | '<-ms-filter-function-progid>' | '<-ms-filter-function>' | '<-non-standard-color>' | '<-non-standard-display>' | '<-non-standard-font>' | '<-non-standard-generic-family>' | '<-non-standard-image-rendering>' | '<-non-standard-overflow>' | '<-non-standard-size>' | '<-webkit-gradient()>' | '<-webkit-gradient-color-stop>' | '<-webkit-gradient-point>' | '<-webkit-gradient-radius>' | '<-webkit-gradient-type>' | '<-webkit-mask-box-repeat>' | '<CDC-token>' | '<CDO-token>' | '<[-token>' | '<]-token>' | '<abs()>' | '<absolute-color-base>' | '<absolute-color-function>' | '<absolute-size>' | '<acos()>' | '<age>' | '<alpha-value>' | '<an-plus-b>' | '<anchor()>' | '<anchor-element>' | '<anchor-name>' | '<anchor-side>' | '<anchor-size()>' | '<anchor-size>' | '<angle-percentage>' | '<angle>' | '<angular-color-hint>' | '<angular-color-stop-list>' | '<angular-color-stop>' | '<animateable-feature>' | '<any-value>' | '<asin()>' | '<at-keyword-token>' | '<atan()>' | '<atan2()>' | '<attachment>' | '<attr()>' | '<attr-fallback>' | '<attr-matcher>' | '<attr-modifier>' | '<attr-name>' | '<attribute-selector>' | '<auto-repeat>' | '<auto-track-list>' | '<axis>' | '<bad-string-token>' | '<bad-url-token>' | '<baseline-position>' | '<basic-shape>' | '<bcp-47>' | '<bg-clip>' | '<bg-image>' | '<bg-layer>' | '<bg-position>' | '<bg-size>' | '<blend-mode>' | '<blur()>' | '<bottom>' | '<box>' | '<brightness()>' | '<calc()>' | '<calc-constant>' | '<calc-product>' | '<calc-sum>' | '<calc-value>' | '<cf-final-image>' | '<cf-mixing-image>' | '<circle()>' | '<clamp()>' | '<class-selector>' | '<clip-source>' | '<cmyk-component>' | '<colon-token>' | '<color()>' | '<color-base>' | '<color-function>' | '<color-interpolation-method>' | '<color-mix()>' | '<color-space>' | '<color-stop-angle>' | '<color-stop-length>' | '<color-stop-list>' | '<color-stop>' | '<color>' | '<colorspace-params>' | '<combinator>' | '<comma-token>' | '<common-lig-values>' | '<compat-auto>' | '<complex-real-selector-list>' | '<complex-real-selector>' | '<complex-selector-list>' | '<complex-selector-unit>' | '<complex-selector>' | '<composite-style>' | '<compositing-operator>' | '<compound-selector-list>' | '<compound-selector>' | '<conic-gradient()>' | '<container-condition>' | '<container-name>' | '<content-distribution>' | '<content-list>' | '<content-position>' | '<content-replacement>' | '<contextual-alt-values>' | '<contrast()>' | '<coord-box>' | '<cos()>' | '<counter()>' | '<counter-name>' | '<counter-style-name>' | '<counter-style>' | '<counter>' | '<counters()>' | '<cross-fade()>' | '<cubic-bezier-timing-function>' | '<custom-color-space>' | '<custom-ident>' | '<custom-property-name>' | '<dashed-ident>' | '<decibel>' | '<declaration-list>' | '<declaration-value>' | '<declaration>' | '<delim-token>' | '<deprecated-system-color>' | '<device-cmyk()>' | '<dimension-token>' | '<dimension>' | '<discretionary-lig-values>' | '<display-box>' | '<display-inside>' | '<display-internal>' | '<display-legacy>' | '<display-listitem>' | '<display-outside>' | '<drop-shadow()>' | '<easing-function>' | '<east-asian-variant-values>' | '<east-asian-width-values>' | '<element()>' | '<ellipse()>' | '<ending-shape>' | '<env()>' | '<exp()>' | '<explicit-track-list>' | '<family-name>' | '<feature-tag-value>' | '<feature-type>' | '<feature-value-block-list>' | '<feature-value-block>' | '<feature-value-declaration-list>' | '<feature-value-declaration>' | '<feature-value-name>' | '<fill-rule>' | '<filter-function-list>' | '<filter-function>' | '<final-bg-layer>' | '<fixed-breadth>' | '<fixed-repeat>' | '<fixed-size>' | '<flex>' | '<font-stretch-absolute>' | '<font-variant-css21>' | '<font-variant-css2>' | '<font-weight-absolute>' | '<font-width-css3>' | '<forgiving-relative-selector-list>' | '<forgiving-selector-list>' | '<frequency-percentage>' | '<frequency>' | '<function-token>' | '<gender>' | '<general-enclosed>' | '<generic-complete>' | '<generic-family>' | '<generic-incomplete>' | '<generic-name>' | '<generic-script-specific>' | '<generic-voice>' | '<geometry-box>' | '<gradient>' | '<grayscale()>' | '<grid-line>' | '<hash-token>' | '<hex-color>' | '<historical-lig-values>' | '<hsl()>' | '<hsla()>' | '<hue-interpolation-method>' | '<hue-rotate()>' | '<hue>' | '<hwb()>' | '<hypot()>' | '<id-selector>' | '<ident-token>' | '<ident>' | '<image()>' | '<image-set()>' | '<image-set-option>' | '<image-src>' | '<image-tags>' | '<image>' | '<inflexible-breadth>' | '<inset()>' | '<inset-area>' | '<integer>' | '<invert()>' | '<keyframe-block-list>' | '<keyframe-block>' | '<keyframe-selector>' | '<keyframes-name>' | '<lab()>' | '<layer()>' | '<layer-name>' | '<lch()>' | '<leader()>' | '<leader-type>' | '<left>' | '<legacy-device-cmyk-syntax>' | '<legacy-pseudo-element-selector>' | '<length-percentage>' | '<length>' | '<light-dark()>' | '<line-name-list>' | '<line-names>' | '<line-style>' | '<line-width>' | '<linear-color-hint>' | '<linear-color-stop>' | '<linear-gradient()>' | '<log()>' | '<mask-layer>' | '<mask-position>' | '<mask-reference>' | '<mask-source>' | '<masking-mode>' | '<matrix()>' | '<matrix3d()>' | '<max()>' | '<media-and>' | '<media-condition-without-or>' | '<media-condition>' | '<media-feature>' | '<media-in-parens>' | '<media-not>' | '<media-or>' | '<media-query-list>' | '<media-query>' | '<media-type>' | '<mf-boolean>' | '<mf-name>' | '<mf-plain>' | '<mf-range>' | '<mf-value>' | '<min()>' | '<minmax()>' | '<mod()>' | '<modern-device-cmyk-syntax>' | '<name-repeat>' | '<named-color>' | '<namespace-prefix>' | '<ns-prefix>' | '<nth>' | '<number-one-or-greater>' | '<number-percentage>' | '<number-token>' | '<number-zero-one>' | '<number>' | '<numeric-figure-values>' | '<numeric-fraction-values>' | '<numeric-spacing-values>' | '<offset-path>' | '<oklab()>' | '<oklch()>' | '<opacity()>' | '<outline-radius>' | '<overflow-position>' | '<page-body>' | '<page-margin-box-type>' | '<page-margin-box>' | '<page-selector-list>' | '<page-selector>' | '<page-size>' | '<paint()>' | '<paint>' | '<palette-identifier>' | '<path()>' | '<percentage-token>' | '<percentage>' | '<perspective()>' | '<polar-color-space>' | '<polygon()>' | '<position-area>' | '<position>' | '<pow()>' | '<predefined-rgb-params>' | '<predefined-rgb>' | '<pseudo-class-selector>' | '<pseudo-compound-selector>' | '<pseudo-element-selector>' | '<pseudo-page>' | '<query-in-parens>' | '<quote>' | '<radial-gradient()>' | '<ratio>' | '<ray()>' | '<ray-size>' | '<rect()>' | '<rectangular-color-space>' | '<relative-real-selector-list>' | '<relative-real-selector>' | '<relative-selector-list>' | '<relative-selector>' | '<relative-size>' | '<rem()>' | '<repeat-style>' | '<repeating-conic-gradient()>' | '<repeating-linear-gradient()>' | '<repeating-radial-gradient()>' | '<resolution>' | '<reversed-counter-name>' | '<rgb()>' | '<rgba()>' | '<right>' | '<rotate()>' | '<rotate3d()>' | '<rotateX()>' | '<rotateY()>' | '<rotateZ()>' | '<round()>' | '<rounding-strategy>' | '<saturate()>' | '<scale()>' | '<scale3d()>' | '<scaleX()>' | '<scaleY()>' | '<scaleZ()>' | '<scope-end>' | '<scope-start>' | '<scroll()>' | '<scroller>' | '<selector-list>' | '<self-position>' | '<semicolon-token>' | '<semitones>' | '<sepia()>' | '<shadow-t>' | '<shadow>' | '<shape-box>' | '<shape-radius>' | '<shape>' | '<side-or-corner>' | '<sign()>' | '<simple-selector-list>' | '<simple-selector>' | '<sin()>' | '<single-animation-composition>' | '<single-animation-direction>' | '<single-animation-fill-mode>' | '<single-animation-iteration-count>' | '<single-animation-play-state>' | '<single-animation-timeline>' | '<single-animation>' | '<single-transition-property>' | '<single-transition>' | '<size-feature>' | '<size>' | '<skew()>' | '<skewX()>' | '<skewY()>' | '<sqrt()>' | '<step-position>' | '<step-timing-function>' | '<string-token>' | '<string>' | '<style-condition>' | '<style-feature>' | '<style-in-parens>' | '<style-query>' | '<subclass-selector>' | '<supports-condition>' | '<supports-decl>' | '<supports-feature>' | '<supports-in-parens>' | '<supports-selector-fn>' | '<svg-length>' | '<svg-writing-mode>' | '<symbol>' | '<system-color>' | '<system-family-name>' | '<tan()>' | '<target-counter()>' | '<target-counters()>' | '<target-text()>' | '<target>' | '<time-percentage>' | '<time>' | '<timeline-range-name>' | '<top>' | '<track-breadth>' | '<track-list>' | '<track-repeat>' | '<track-size>' | '<transform-function>' | '<transform-list>' | '<transition-behavior-value>' | '<translate()>' | '<translate3d()>' | '<translateX()>' | '<translateY()>' | '<translateZ()>' | '<try-size>' | '<try-tactic>' | '<type-or-unit>' | '<type-selector>' | '<urange>' | '<url-modifier>' | '<url-token>' | '<url>' | '<var()>' | '<view()>' | '<viewport-length>' | '<visual-box>' | '<whitespace-token>' | '<wq-name>' | '<x>' | '<xywh()>' | '<xyz-params>' | '<xyz-space>' | '<y>' | '<zero>' | '<{-token>' | '<}-token>';
|
|
9
|
-
export type ExtendedType = "<'color-profile'>" | "<'color-rendering'>" | "<'enable-background'>" | '<animatable-value>' | '<begin-value-list>' | '<class-list>' | '<clock-value>' | '<color-matrix>' | '<css-declaration-list>' | '<dasharray>' | '<end-value-list>' | '<key-points>' | '<key-splines>' | '<key-times>' | '<list-of-lengths>' | '<list-of-numbers>' | '<list-of-percentages>' | '<list-of-svg-feature-string>' | '<list-of-value>' | '<number-optional-number>' | '<origin>' | '<points>' | '<preserve-aspect-ratio>' | '<rotate>' | '<svg-font-size-adjust>' | '<svg-font-size>' | '<svg-path>' | '<system-language>' | '<text-coordinate>' | '<view-box>' | 'AbsoluteURL' | 'Accept' | 'Any' | 'AutoComplete' | 'BCP47' | 'BaseURL' | 'BrowsingContextName' | 'BrowsingContextNameOrKeyword' | 'CustomElementName' | 'DOMID' | 'DateTime' | 'FunctionBody' | 'HTTPSchemaURL' | 'HashName' | 'IconSize' | 'Int' | 'ItemProp' | 'JSON' | 'MIMEType' | 'NavigableTargetName' | 'NavigableTargetNameOrKeyword' | 'NoEmptyAny' | 'Number' | 'OneCodePointChar' | 'OneLineAny' | 'Pattern' | 'SerializedPermissionsPolicy' | 'SourceSizeList' | 'Srcset' | 'TabIndex' | 'URL' | 'Uint' | 'ValidCustomCommand' | 'XMLName' | 'Zero';
|
|
9
|
+
export type ExtendedType = "<'color-profile'>" | "<'color-rendering'>" | "<'enable-background'>" | '<animatable-value>' | '<begin-value-list>' | '<class-list>' | '<clock-value>' | '<color-matrix>' | '<css-declaration-list>' | '<dasharray>' | '<end-value-list>' | '<key-points>' | '<key-splines>' | '<key-times>' | '<list-of-lengths>' | '<list-of-numbers>' | '<list-of-percentages>' | '<list-of-svg-feature-string>' | '<list-of-value>' | '<number-optional-number>' | '<origin>' | '<points>' | '<preserve-aspect-ratio>' | '<rotate>' | '<svg-font-size-adjust>' | '<svg-font-size>' | '<svg-path>' | '<system-language>' | '<text-coordinate>' | '<view-box>' | 'AbsoluteURL' | 'Accept' | 'Any' | 'AutoComplete' | 'BCP47' | 'BaseURL' | 'BrowsingContextName' | 'BrowsingContextNameOrKeyword' | 'CustomElementName' | 'DOMID' | 'DateTime' | 'FunctionBody' | 'HTTPSchemaURL' | 'HashName' | 'IconSize' | 'Int' | 'ItemProp' | 'JSON' | 'LinkTypeForAnchorAndAreaElement' | 'LinkTypeForFormElement' | 'LinkTypeForLinkElement' | 'LinkTypeForLinkElementInBody' | 'MIMEType' | 'NavigableTargetName' | 'NavigableTargetNameOrKeyword' | 'NoEmptyAny' | 'Number' | 'OneCodePointChar' | 'OneLineAny' | 'Pattern' | 'SerializedPermissionsPolicy' | 'SourceSizeList' | 'Srcset' | 'TabIndex' | 'URL' | 'Uint' | 'ValidCustomCommand' | 'XMLName' | 'Zero';
|
|
10
10
|
export type HtmlAttrRequirement = 'Boolean';
|
|
11
11
|
export interface TypesSchema {
|
|
12
12
|
type?: Type;
|