@dazl/shorthands-opener 4.2.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.
Files changed (237) hide show
  1. package/README.md +3 -0
  2. package/dist/compounds/compound-css-data.d.ts +22 -0
  3. package/dist/compounds/compound-css-data.d.ts.map +1 -0
  4. package/dist/compounds/compound-css-data.js +2 -0
  5. package/dist/compounds/compound-css-data.js.map +1 -0
  6. package/dist/compounds/compound-mapper.d.ts +4 -0
  7. package/dist/compounds/compound-mapper.d.ts.map +1 -0
  8. package/dist/compounds/compound-mapper.js +10 -0
  9. package/dist/compounds/compound-mapper.js.map +1 -0
  10. package/dist/compounds/compound-parser-utils.d.ts +3 -0
  11. package/dist/compounds/compound-parser-utils.d.ts.map +1 -0
  12. package/dist/compounds/compound-parser-utils.js +33 -0
  13. package/dist/compounds/compound-parser-utils.js.map +1 -0
  14. package/dist/compounds/compound-types.d.ts +26 -0
  15. package/dist/compounds/compound-types.d.ts.map +1 -0
  16. package/dist/compounds/compound-types.js +2 -0
  17. package/dist/compounds/compound-types.js.map +1 -0
  18. package/dist/compounds/compound-value-parsers.d.ts +6 -0
  19. package/dist/compounds/compound-value-parsers.d.ts.map +1 -0
  20. package/dist/compounds/compound-value-parsers.js +5 -0
  21. package/dist/compounds/compound-value-parsers.js.map +1 -0
  22. package/dist/compounds/index.d.ts +6 -0
  23. package/dist/compounds/index.d.ts.map +1 -0
  24. package/dist/compounds/index.js +6 -0
  25. package/dist/compounds/index.js.map +1 -0
  26. package/dist/compounds/parsers/index.d.ts +2 -0
  27. package/dist/compounds/parsers/index.d.ts.map +1 -0
  28. package/dist/compounds/parsers/index.js +2 -0
  29. package/dist/compounds/parsers/index.js.map +1 -0
  30. package/dist/compounds/parsers/shadow-compound.d.ts +5 -0
  31. package/dist/compounds/parsers/shadow-compound.d.ts.map +1 -0
  32. package/dist/compounds/parsers/shadow-compound.js +39 -0
  33. package/dist/compounds/parsers/shadow-compound.js.map +1 -0
  34. package/dist/css-data-types/data-types-consts.d.ts +212 -0
  35. package/dist/css-data-types/data-types-consts.d.ts.map +1 -0
  36. package/dist/css-data-types/data-types-consts.js +790 -0
  37. package/dist/css-data-types/data-types-consts.js.map +1 -0
  38. package/dist/css-data-types/data-types-predicates.d.ts +32 -0
  39. package/dist/css-data-types/data-types-predicates.d.ts.map +1 -0
  40. package/dist/css-data-types/data-types-predicates.js +353 -0
  41. package/dist/css-data-types/data-types-predicates.js.map +1 -0
  42. package/dist/css-data-types/data-types-state-machines.d.ts +14 -0
  43. package/dist/css-data-types/data-types-state-machines.d.ts.map +1 -0
  44. package/dist/css-data-types/data-types-state-machines.js +129 -0
  45. package/dist/css-data-types/data-types-state-machines.js.map +1 -0
  46. package/dist/css-data-types/data-types-types.d.ts +26 -0
  47. package/dist/css-data-types/data-types-types.d.ts.map +1 -0
  48. package/dist/css-data-types/data-types-types.js +2 -0
  49. package/dist/css-data-types/data-types-types.js.map +1 -0
  50. package/dist/css-data-types/data-types-utils.d.ts +31 -0
  51. package/dist/css-data-types/data-types-utils.d.ts.map +1 -0
  52. package/dist/css-data-types/data-types-utils.js +176 -0
  53. package/dist/css-data-types/data-types-utils.js.map +1 -0
  54. package/dist/css-data-types/data-types.d.ts +64 -0
  55. package/dist/css-data-types/data-types.d.ts.map +1 -0
  56. package/dist/css-data-types/data-types.js +304 -0
  57. package/dist/css-data-types/data-types.js.map +1 -0
  58. package/dist/css-data-types/index.d.ts +7 -0
  59. package/dist/css-data-types/index.d.ts.map +1 -0
  60. package/dist/css-data-types/index.js +7 -0
  61. package/dist/css-data-types/index.js.map +1 -0
  62. package/dist/index.d.ts +5 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +5 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/shorthands/index.d.ts +8 -0
  67. package/dist/shorthands/index.d.ts.map +1 -0
  68. package/dist/shorthands/index.js +8 -0
  69. package/dist/shorthands/index.js.map +1 -0
  70. package/dist/shorthands/openers/background-position-shorthand.d.ts +5 -0
  71. package/dist/shorthands/openers/background-position-shorthand.d.ts.map +1 -0
  72. package/dist/shorthands/openers/background-position-shorthand.js +173 -0
  73. package/dist/shorthands/openers/background-position-shorthand.js.map +1 -0
  74. package/dist/shorthands/openers/background-shorthand.d.ts +5 -0
  75. package/dist/shorthands/openers/background-shorthand.d.ts.map +1 -0
  76. package/dist/shorthands/openers/background-shorthand.js +88 -0
  77. package/dist/shorthands/openers/background-shorthand.js.map +1 -0
  78. package/dist/shorthands/openers/border-image-shorthand.d.ts +5 -0
  79. package/dist/shorthands/openers/border-image-shorthand.d.ts.map +1 -0
  80. package/dist/shorthands/openers/border-image-shorthand.js +16 -0
  81. package/dist/shorthands/openers/border-image-shorthand.js.map +1 -0
  82. package/dist/shorthands/openers/border-radius-shorthand.d.ts +5 -0
  83. package/dist/shorthands/openers/border-radius-shorthand.d.ts.map +1 -0
  84. package/dist/shorthands/openers/border-radius-shorthand.js +61 -0
  85. package/dist/shorthands/openers/border-radius-shorthand.js.map +1 -0
  86. package/dist/shorthands/openers/border-shorthand.d.ts +20 -0
  87. package/dist/shorthands/openers/border-shorthand.d.ts.map +1 -0
  88. package/dist/shorthands/openers/border-shorthand.js +90 -0
  89. package/dist/shorthands/openers/border-shorthand.js.map +1 -0
  90. package/dist/shorthands/openers/flex-flow-shorthand.d.ts +5 -0
  91. package/dist/shorthands/openers/flex-flow-shorthand.d.ts.map +1 -0
  92. package/dist/shorthands/openers/flex-flow-shorthand.js +13 -0
  93. package/dist/shorthands/openers/flex-flow-shorthand.js.map +1 -0
  94. package/dist/shorthands/openers/flex-shorthand.d.ts +5 -0
  95. package/dist/shorthands/openers/flex-shorthand.d.ts.map +1 -0
  96. package/dist/shorthands/openers/flex-shorthand.js +55 -0
  97. package/dist/shorthands/openers/flex-shorthand.js.map +1 -0
  98. package/dist/shorthands/openers/font-shorthand.d.ts +5 -0
  99. package/dist/shorthands/openers/font-shorthand.d.ts.map +1 -0
  100. package/dist/shorthands/openers/font-shorthand.js +60 -0
  101. package/dist/shorthands/openers/font-shorthand.js.map +1 -0
  102. package/dist/shorthands/openers/gap-shorthand.d.ts +5 -0
  103. package/dist/shorthands/openers/gap-shorthand.d.ts.map +1 -0
  104. package/dist/shorthands/openers/gap-shorthand.js +28 -0
  105. package/dist/shorthands/openers/gap-shorthand.js.map +1 -0
  106. package/dist/shorthands/openers/grid-axis-shorthand.d.ts +6 -0
  107. package/dist/shorthands/openers/grid-axis-shorthand.d.ts.map +1 -0
  108. package/dist/shorthands/openers/grid-axis-shorthand.js +36 -0
  109. package/dist/shorthands/openers/grid-axis-shorthand.js.map +1 -0
  110. package/dist/shorthands/openers/grid-gap-shorthand.d.ts +5 -0
  111. package/dist/shorthands/openers/grid-gap-shorthand.d.ts.map +1 -0
  112. package/dist/shorthands/openers/grid-gap-shorthand.js +21 -0
  113. package/dist/shorthands/openers/grid-gap-shorthand.js.map +1 -0
  114. package/dist/shorthands/openers/grid-shorthand.d.ts +8 -0
  115. package/dist/shorthands/openers/grid-shorthand.d.ts.map +1 -0
  116. package/dist/shorthands/openers/grid-shorthand.js +145 -0
  117. package/dist/shorthands/openers/grid-shorthand.js.map +1 -0
  118. package/dist/shorthands/openers/grid-template-shorthand.d.ts +10 -0
  119. package/dist/shorthands/openers/grid-template-shorthand.d.ts.map +1 -0
  120. package/dist/shorthands/openers/grid-template-shorthand.js +113 -0
  121. package/dist/shorthands/openers/grid-template-shorthand.js.map +1 -0
  122. package/dist/shorthands/openers/index.d.ts +22 -0
  123. package/dist/shorthands/openers/index.d.ts.map +1 -0
  124. package/dist/shorthands/openers/index.js +22 -0
  125. package/dist/shorthands/openers/index.js.map +1 -0
  126. package/dist/shorthands/openers/list-style-shorthand.d.ts +5 -0
  127. package/dist/shorthands/openers/list-style-shorthand.d.ts.map +1 -0
  128. package/dist/shorthands/openers/list-style-shorthand.js +15 -0
  129. package/dist/shorthands/openers/list-style-shorthand.js.map +1 -0
  130. package/dist/shorthands/openers/margin-shorthand.d.ts +5 -0
  131. package/dist/shorthands/openers/margin-shorthand.d.ts.map +1 -0
  132. package/dist/shorthands/openers/margin-shorthand.js +11 -0
  133. package/dist/shorthands/openers/margin-shorthand.js.map +1 -0
  134. package/dist/shorthands/openers/outline-shorthand.d.ts +5 -0
  135. package/dist/shorthands/openers/outline-shorthand.d.ts.map +1 -0
  136. package/dist/shorthands/openers/outline-shorthand.js +14 -0
  137. package/dist/shorthands/openers/outline-shorthand.js.map +1 -0
  138. package/dist/shorthands/openers/overflow-shorthand.d.ts +5 -0
  139. package/dist/shorthands/openers/overflow-shorthand.d.ts.map +1 -0
  140. package/dist/shorthands/openers/overflow-shorthand.js +21 -0
  141. package/dist/shorthands/openers/overflow-shorthand.js.map +1 -0
  142. package/dist/shorthands/openers/padding-shorthand.d.ts +5 -0
  143. package/dist/shorthands/openers/padding-shorthand.d.ts.map +1 -0
  144. package/dist/shorthands/openers/padding-shorthand.js +11 -0
  145. package/dist/shorthands/openers/padding-shorthand.js.map +1 -0
  146. package/dist/shorthands/openers/place-content-shorthand.d.ts +5 -0
  147. package/dist/shorthands/openers/place-content-shorthand.d.ts.map +1 -0
  148. package/dist/shorthands/openers/place-content-shorthand.js +29 -0
  149. package/dist/shorthands/openers/place-content-shorthand.js.map +1 -0
  150. package/dist/shorthands/openers/place-items-shorthand.d.ts +5 -0
  151. package/dist/shorthands/openers/place-items-shorthand.d.ts.map +1 -0
  152. package/dist/shorthands/openers/place-items-shorthand.js +23 -0
  153. package/dist/shorthands/openers/place-items-shorthand.js.map +1 -0
  154. package/dist/shorthands/openers/text-decoration-shorthand.d.ts +5 -0
  155. package/dist/shorthands/openers/text-decoration-shorthand.d.ts.map +1 -0
  156. package/dist/shorthands/openers/text-decoration-shorthand.js +14 -0
  157. package/dist/shorthands/openers/text-decoration-shorthand.js.map +1 -0
  158. package/dist/shorthands/shorthand-css-data.d.ts +120 -0
  159. package/dist/shorthands/shorthand-css-data.d.ts.map +1 -0
  160. package/dist/shorthands/shorthand-css-data.js +48 -0
  161. package/dist/shorthands/shorthand-css-data.js.map +1 -0
  162. package/dist/shorthands/shorthand-mapper.d.ts +6 -0
  163. package/dist/shorthands/shorthand-mapper.d.ts.map +1 -0
  164. package/dist/shorthands/shorthand-mapper.js +72 -0
  165. package/dist/shorthands/shorthand-mapper.js.map +1 -0
  166. package/dist/shorthands/shorthand-parser-errors.d.ts +25 -0
  167. package/dist/shorthands/shorthand-parser-errors.d.ts.map +1 -0
  168. package/dist/shorthands/shorthand-parser-errors.js +41 -0
  169. package/dist/shorthands/shorthand-parser-errors.js.map +1 -0
  170. package/dist/shorthands/shorthand-parser-utils.d.ts +24 -0
  171. package/dist/shorthands/shorthand-parser-utils.d.ts.map +1 -0
  172. package/dist/shorthands/shorthand-parser-utils.js +398 -0
  173. package/dist/shorthands/shorthand-parser-utils.js.map +1 -0
  174. package/dist/shorthands/shorthand-types.d.ts +64 -0
  175. package/dist/shorthands/shorthand-types.d.ts.map +1 -0
  176. package/dist/shorthands/shorthand-types.js +2 -0
  177. package/dist/shorthands/shorthand-types.js.map +1 -0
  178. package/dist/shorthands/shorthands-ast-evaluation.d.ts +5 -0
  179. package/dist/shorthands/shorthands-ast-evaluation.d.ts.map +1 -0
  180. package/dist/shorthands/shorthands-ast-evaluation.js +19 -0
  181. package/dist/shorthands/shorthands-ast-evaluation.js.map +1 -0
  182. package/dist/tokenizers/css-value-tokenizer.d.ts +43 -0
  183. package/dist/tokenizers/css-value-tokenizer.d.ts.map +1 -0
  184. package/dist/tokenizers/css-value-tokenizer.js +154 -0
  185. package/dist/tokenizers/css-value-tokenizer.js.map +1 -0
  186. package/dist/tokenizers/index.d.ts +2 -0
  187. package/dist/tokenizers/index.d.ts.map +1 -0
  188. package/dist/tokenizers/index.js +2 -0
  189. package/dist/tokenizers/index.js.map +1 -0
  190. package/package.json +54 -0
  191. package/src/compounds/compound-css-data.ts +24 -0
  192. package/src/compounds/compound-mapper.ts +21 -0
  193. package/src/compounds/compound-parser-utils.ts +47 -0
  194. package/src/compounds/compound-types.ts +35 -0
  195. package/src/compounds/compound-value-parsers.ts +12 -0
  196. package/src/compounds/index.ts +5 -0
  197. package/src/compounds/parsers/index.ts +1 -0
  198. package/src/compounds/parsers/shadow-compound.ts +56 -0
  199. package/src/css-data-types/data-types-consts.ts +877 -0
  200. package/src/css-data-types/data-types-predicates.ts +477 -0
  201. package/src/css-data-types/data-types-state-machines.ts +169 -0
  202. package/src/css-data-types/data-types-types.ts +43 -0
  203. package/src/css-data-types/data-types-utils.ts +258 -0
  204. package/src/css-data-types/data-types.ts +435 -0
  205. package/src/css-data-types/index.ts +6 -0
  206. package/src/index.ts +4 -0
  207. package/src/shorthands/index.ts +7 -0
  208. package/src/shorthands/openers/background-position-shorthand.ts +180 -0
  209. package/src/shorthands/openers/background-shorthand.ts +161 -0
  210. package/src/shorthands/openers/border-image-shorthand.ts +35 -0
  211. package/src/shorthands/openers/border-radius-shorthand.ts +93 -0
  212. package/src/shorthands/openers/border-shorthand.ts +198 -0
  213. package/src/shorthands/openers/flex-flow-shorthand.ts +24 -0
  214. package/src/shorthands/openers/flex-shorthand.ts +79 -0
  215. package/src/shorthands/openers/font-shorthand.ts +85 -0
  216. package/src/shorthands/openers/gap-shorthand.ts +47 -0
  217. package/src/shorthands/openers/grid-axis-shorthand.ts +61 -0
  218. package/src/shorthands/openers/grid-gap-shorthand.ts +40 -0
  219. package/src/shorthands/openers/grid-shorthand.ts +260 -0
  220. package/src/shorthands/openers/grid-template-shorthand.ts +176 -0
  221. package/src/shorthands/openers/index.ts +21 -0
  222. package/src/shorthands/openers/list-style-shorthand.ts +33 -0
  223. package/src/shorthands/openers/margin-shorthand.ts +20 -0
  224. package/src/shorthands/openers/outline-shorthand.ts +27 -0
  225. package/src/shorthands/openers/overflow-shorthand.ts +40 -0
  226. package/src/shorthands/openers/padding-shorthand.ts +21 -0
  227. package/src/shorthands/openers/place-content-shorthand.ts +49 -0
  228. package/src/shorthands/openers/place-items-shorthand.ts +43 -0
  229. package/src/shorthands/openers/text-decoration-shorthand.ts +27 -0
  230. package/src/shorthands/shorthand-css-data.ts +210 -0
  231. package/src/shorthands/shorthand-mapper.ts +157 -0
  232. package/src/shorthands/shorthand-parser-errors.ts +47 -0
  233. package/src/shorthands/shorthand-parser-utils.ts +602 -0
  234. package/src/shorthands/shorthand-types.ts +107 -0
  235. package/src/shorthands/shorthands-ast-evaluation.ts +38 -0
  236. package/src/tokenizers/css-value-tokenizer.ts +220 -0
  237. package/src/tokenizers/index.ts +1 -0
@@ -0,0 +1,790 @@
1
+ export var DataTypeType;
2
+ (function (DataTypeType) {
3
+ DataTypeType["Unknown"] = "UNKNOWN";
4
+ DataTypeType["Common"] = "COMMON";
5
+ DataTypeType["Universal"] = "<universal>";
6
+ DataTypeType["Number"] = "<number>";
7
+ DataTypeType["Length"] = "<length>";
8
+ DataTypeType["Percentage"] = "<percentage>";
9
+ DataTypeType["LengthPercentage"] = "<length-percentage>";
10
+ DataTypeType["Angle"] = "<angle>";
11
+ DataTypeType["Width"] = "<width>";
12
+ DataTypeType["CustomIdent"] = "<custom-ident>";
13
+ DataTypeType["LineStyle"] = "<line-style>";
14
+ DataTypeType["OutlineStyle"] = "<'outline-style'>";
15
+ DataTypeType["LineWidth"] = "<line-width>";
16
+ DataTypeType["Color"] = "<color>";
17
+ DataTypeType["OutlineColor"] = "<'outline-color'>";
18
+ DataTypeType["BorderImageSlice"] = "<'border-image-slice'>";
19
+ DataTypeType["BorderImageOutset"] = "<'border-image-outset'>";
20
+ DataTypeType["BorderImageRepeat"] = "<'border-image-repeat'>";
21
+ DataTypeType["BorderImageWidth"] = "<'border-image-width'>";
22
+ DataTypeType["Gradient"] = "<gradient>";
23
+ DataTypeType["Image"] = "<image>";
24
+ DataTypeType["ImageSource"] = "<image-source>";
25
+ DataTypeType["BgPosition"] = "<bg-position>";
26
+ DataTypeType["BgSize"] = "<bg-size>";
27
+ DataTypeType["RepeatStyle"] = "<repeat-style>";
28
+ DataTypeType["Attachment"] = "<attachment>";
29
+ DataTypeType["Box"] = "<box>";
30
+ DataTypeType["FontStyle"] = "<font-style>";
31
+ DataTypeType["FontVariant"] = "<font-variant>";
32
+ DataTypeType["FontWeight"] = "<font-weight>";
33
+ DataTypeType["FontStretch"] = "<font-stretch>";
34
+ DataTypeType["FontSize"] = "<font-size>";
35
+ DataTypeType["LineHeight"] = "<line-height>";
36
+ DataTypeType["FontFamily"] = "<font-family>";
37
+ DataTypeType["Font"] = "<font>";
38
+ DataTypeType["AlignContent"] = "<'align-content'>";
39
+ DataTypeType["JustifyContent"] = "<'justify-content'>";
40
+ DataTypeType["AlignItems"] = "<'align-items'>";
41
+ DataTypeType["JustifyItems"] = "<'justify-items'>";
42
+ DataTypeType["FlexGrow"] = "<flex-grow>";
43
+ DataTypeType["FlexShrink"] = "<flex-shrink>";
44
+ DataTypeType["FlexBasis"] = "<flex-basis>";
45
+ DataTypeType["FlexDirection"] = "<flex-direction>";
46
+ DataTypeType["FlexWrap"] = "<flex-wrap>";
47
+ DataTypeType["Flex"] = "<'flex'>";
48
+ DataTypeType["GridLine"] = "<grid-line>";
49
+ DataTypeType["GridLineEnd"] = "<grid-line-end>";
50
+ DataTypeType["LineNames"] = "<line-names>";
51
+ DataTypeType["TrackList"] = "<track-list>";
52
+ DataTypeType["AutoTrackList"] = "<auto-track-list>";
53
+ DataTypeType["ExplicitTrackList"] = "<explicit-track-list>";
54
+ DataTypeType["TrackListWithStrings"] = "<track-list-with-strings>";
55
+ DataTypeType["GridTemplateAreas"] = "<grid-template-areas>";
56
+ DataTypeType["GridTemplateRows"] = "<grid-template-rows>";
57
+ DataTypeType["GridTemplateColumns"] = "<grid-template-columns>";
58
+ DataTypeType["GridTemplate"] = "<grid-template>";
59
+ DataTypeType["GridAutoFlow"] = "<grid-auto-flow>";
60
+ DataTypeType["GridAutoRows"] = "<grid-auto-rows>";
61
+ DataTypeType["GridAutoColumns"] = "<grid-auto-columns>";
62
+ DataTypeType["Grid"] = "<grid>";
63
+ DataTypeType["Overflow"] = "<overflow>";
64
+ DataTypeType["TextDecorationLine"] = "<'text-decoration-line'>";
65
+ DataTypeType["TextDecorationStyle"] = "<'text-decoration-style'>";
66
+ DataTypeType["ListStyle"] = "<'list-style'>";
67
+ DataTypeType["ListStylePosition"] = "<'list-style-position'>";
68
+ DataTypeType["ListStyleType"] = "<'list-style-type'>";
69
+ DataTypeType["Inset"] = "<'inset'>";
70
+ DataTypeType["Shadow"] = "<shadow>";
71
+ })(DataTypeType || (DataTypeType = {}));
72
+ export const keywordsMap = (keywords) => new Map(keywords.map((keyword) => [keyword, true]));
73
+ export const DATA_TYPES_MAP = new Map();
74
+ export const DEFAULT_LAYER_SEPERATOR = ',';
75
+ export const INTERNAL_VALUE_SEPERATOR = '/';
76
+ export const AUTO_KEYWORD = 'auto';
77
+ export const NONE_KEYWORD = 'none';
78
+ export const NORMAL_KEYWORD = 'normal';
79
+ // <universal>
80
+ export const INITIAL_UNIVERSAL = 'initial';
81
+ export const UNIVERSAL_KEYWORDS = keywordsMap(['inherit', INITIAL_UNIVERSAL, 'unset', 'revert']);
82
+ DATA_TYPES_MAP.set(DataTypeType.Universal, {
83
+ initial: INITIAL_UNIVERSAL,
84
+ keywords: UNIVERSAL_KEYWORDS,
85
+ });
86
+ export const getInitialValue = (dataType) => DATA_TYPES_MAP.get(dataType)?.initial ?? INITIAL_UNIVERSAL;
87
+ // <length> / <length-percentage> / <width> / <margin> / <padding> / <border-radius>
88
+ export const DEFAULT_DIMENSION = '0';
89
+ DATA_TYPES_MAP.set(DataTypeType.Length, { initial: DEFAULT_DIMENSION });
90
+ DATA_TYPES_MAP.set(DataTypeType.LengthPercentage, { initial: DEFAULT_DIMENSION });
91
+ DATA_TYPES_MAP.set(DataTypeType.Width, { initial: DEFAULT_DIMENSION });
92
+ // <length>
93
+ const ABSOLUTE_LENGTH_UNITS = ['px', 'cm', 'mm', 'Q', 'in', 'pc', 'pt'];
94
+ const RELATIVE_LENGTH_UNITS = [
95
+ 'em',
96
+ 'rem',
97
+ 'vw',
98
+ 'vh',
99
+ 'vi',
100
+ 'vb',
101
+ 'vmin',
102
+ 'vmax',
103
+ 'ex',
104
+ 'cap',
105
+ 'ch',
106
+ 'ic',
107
+ 'lh',
108
+ 'rlh',
109
+ 'cqw',
110
+ 'cqh',
111
+ 'cqi',
112
+ 'cqb',
113
+ 'cqmin',
114
+ 'cqmax',
115
+ ];
116
+ export const LENGTH_UNITS = ABSOLUTE_LENGTH_UNITS.concat(RELATIVE_LENGTH_UNITS);
117
+ export const LENGTH_UNITS_MAP = keywordsMap(LENGTH_UNITS);
118
+ export const BASIC_MATH_FUNCTIONS = keywordsMap(['calc', 'min', 'max', 'clamp']);
119
+ // <percentage>
120
+ export const PERCENTAGE_UNIT = '%';
121
+ export const LENGTH_PERCENTAGE_UNITS = keywordsMap(LENGTH_UNITS.concat(PERCENTAGE_UNIT));
122
+ // <angle>
123
+ export const ANGLE_UNITS = keywordsMap(['deg', 'grad', 'rad', 'turn']);
124
+ // <flex>
125
+ export const FLEX_UNIT = 'fr';
126
+ export const FLEX_NUMBER_RANGE_MIN = 0;
127
+ // <line-style>
128
+ export const LINE_STYLE_KEYWORDS = keywordsMap([
129
+ NONE_KEYWORD,
130
+ 'hidden',
131
+ 'dotted',
132
+ 'dashed',
133
+ 'solid',
134
+ 'double',
135
+ 'groove',
136
+ 'ridge',
137
+ 'inset',
138
+ 'outset',
139
+ ]);
140
+ export const INITIAL_LINE_STYLE = NONE_KEYWORD;
141
+ DATA_TYPES_MAP.set(DataTypeType.LineStyle, {
142
+ initial: INITIAL_LINE_STYLE,
143
+ keywords: LINE_STYLE_KEYWORDS,
144
+ });
145
+ DATA_TYPES_MAP.set(DataTypeType.OutlineStyle, { initial: INITIAL_LINE_STYLE });
146
+ // <line-width>
147
+ export const LINE_WIDTH_KEYWORDS = keywordsMap(['thin', 'medium', 'thick']);
148
+ export const INITIAL_LINE_WIDTH = 'medium';
149
+ DATA_TYPES_MAP.set(DataTypeType.LineWidth, { initial: INITIAL_LINE_WIDTH });
150
+ // <color-function>
151
+ export const COLOR_FUNCTIONS = keywordsMap([
152
+ 'rgb',
153
+ 'rgba',
154
+ 'hsl',
155
+ 'hsla',
156
+ 'hwb',
157
+ 'lab',
158
+ 'lch',
159
+ 'oklab',
160
+ 'oklch',
161
+ 'color',
162
+ ]);
163
+ // <named-color>
164
+ export const NAMED_COLOR_KEYWORDS = keywordsMap([
165
+ 'aliceblue',
166
+ 'antiquewhite',
167
+ 'aqua',
168
+ 'aquamarine',
169
+ 'azure',
170
+ 'beige',
171
+ 'bisque',
172
+ 'black',
173
+ 'blanchedalmond',
174
+ 'blue',
175
+ 'blueviolet',
176
+ 'brown',
177
+ 'burlywood',
178
+ 'cadetblue',
179
+ 'chartreuse',
180
+ 'chocolate',
181
+ 'coral',
182
+ 'cornflowerblue',
183
+ 'cornsilk',
184
+ 'crimson',
185
+ 'cyan',
186
+ 'darkblue',
187
+ 'darkcyan',
188
+ 'darkgoldenrod',
189
+ 'darkgray',
190
+ 'darkgreen',
191
+ 'darkgrey',
192
+ 'darkkhaki',
193
+ 'darkmagenta',
194
+ 'darkolivegreen',
195
+ 'darkorange',
196
+ 'darkorchid',
197
+ 'darkred',
198
+ 'darksalmon',
199
+ 'darkseagreen',
200
+ 'darkslateblue',
201
+ 'darkslategray',
202
+ 'darkslategrey',
203
+ 'darkturquoise',
204
+ 'darkviolet',
205
+ 'deeppink',
206
+ 'deepskyblue',
207
+ 'dimgray',
208
+ 'dimgrey',
209
+ 'dodgerblue',
210
+ 'firebrick',
211
+ 'floralwhite',
212
+ 'forestgreen',
213
+ 'fuchsia',
214
+ 'gainsboro',
215
+ 'ghostwhite',
216
+ 'gold',
217
+ 'goldenrod',
218
+ 'gray',
219
+ 'green',
220
+ 'greenyellow',
221
+ 'grey',
222
+ 'honeydew',
223
+ 'hotpink',
224
+ 'indianred',
225
+ 'indigo',
226
+ 'ivory',
227
+ 'khaki',
228
+ 'lavender',
229
+ 'lavenderblush',
230
+ 'lawngreen',
231
+ 'lemonchiffon',
232
+ 'lightblue',
233
+ 'lightcoral',
234
+ 'lightcyan',
235
+ 'lightgoldenrodyellow',
236
+ 'lightgray',
237
+ 'lightgreen',
238
+ 'lightgrey',
239
+ 'lightpink',
240
+ 'lightsalmon',
241
+ 'lightseagreen',
242
+ 'lightskyblue',
243
+ 'lightslategray',
244
+ 'lightslategrey',
245
+ 'lightsteelblue',
246
+ 'lightyellow',
247
+ 'lime',
248
+ 'limegreen',
249
+ 'linen',
250
+ 'magenta',
251
+ 'maroon',
252
+ 'mediumaquamarine',
253
+ 'mediumblue',
254
+ 'mediumorchid',
255
+ 'mediumpurple',
256
+ 'mediumseagreen',
257
+ 'mediumslateblue',
258
+ 'mediumspringgreen',
259
+ 'mediumturquoise',
260
+ 'mediumvioletred',
261
+ 'midnightblue',
262
+ 'mintcream',
263
+ 'mistyrose',
264
+ 'moccasin',
265
+ 'navajowhite',
266
+ 'navy',
267
+ 'oldlace',
268
+ 'olive',
269
+ 'olivedrab',
270
+ 'orange',
271
+ 'orangered',
272
+ 'orchid',
273
+ 'palegoldenrod',
274
+ 'palegreen',
275
+ 'paleturquoise',
276
+ 'palevioletred',
277
+ 'papayawhip',
278
+ 'peachpuff',
279
+ 'peru',
280
+ 'pink',
281
+ 'plum',
282
+ 'powderblue',
283
+ 'purple',
284
+ 'rebeccapurple',
285
+ 'red',
286
+ 'rosybrown',
287
+ 'royalblue',
288
+ 'saddlebrown',
289
+ 'salmon',
290
+ 'sandybrown',
291
+ 'seagreen',
292
+ 'seashell',
293
+ 'sienna',
294
+ 'silver',
295
+ 'skyblue',
296
+ 'slateblue',
297
+ 'slategray',
298
+ 'slategrey',
299
+ 'snow',
300
+ 'springgreen',
301
+ 'steelblue',
302
+ 'tan',
303
+ 'teal',
304
+ 'thistle',
305
+ 'tomato',
306
+ 'turquoise',
307
+ 'violet',
308
+ 'wheat',
309
+ 'white',
310
+ 'whitesmoke',
311
+ 'yellow',
312
+ 'yellowgreen',
313
+ ]);
314
+ export const CURRENT_COLOR_KEYWORD = 'currentcolor';
315
+ export const TRANSPARENT_COLOR_KEYWORD = 'transparent';
316
+ // <system-color>
317
+ export const SYSTEM_COLOR_KEYWORDS = keywordsMap([
318
+ 'AccentColor',
319
+ 'AccentColorText',
320
+ 'ActiveText',
321
+ 'ButtonBorder',
322
+ 'ButtonFace',
323
+ 'ButtonText',
324
+ 'Canvas',
325
+ 'CanvasText',
326
+ 'Field',
327
+ 'FieldText',
328
+ 'GrayText',
329
+ 'Highlight',
330
+ 'HighlightText',
331
+ 'LinkText',
332
+ 'Mark',
333
+ 'MarkText',
334
+ 'SelectedItem',
335
+ 'SelectedItemText',
336
+ 'VisitedText',
337
+ // <deprecated-color>
338
+ 'ActiveBorder',
339
+ 'ActiveCaption',
340
+ 'AppWorkspace',
341
+ 'Background',
342
+ 'ButtonHighlight',
343
+ 'ButtonShadow',
344
+ 'CaptionText',
345
+ 'InactiveBorder',
346
+ 'InactiveCaption',
347
+ 'InactiveCaptionText',
348
+ 'InfoBackground',
349
+ 'InfoText',
350
+ 'Menu',
351
+ 'MenuText',
352
+ 'Scrollbar',
353
+ 'ThreeDDarkShadow',
354
+ 'ThreeDFace',
355
+ 'ThreeDHighlight',
356
+ 'ThreeDLightShadow',
357
+ 'ThreeDShadow',
358
+ 'Window',
359
+ 'WindowFrame',
360
+ 'WindowText',
361
+ ]);
362
+ export const INITIAL_COLOR = CURRENT_COLOR_KEYWORD;
363
+ DATA_TYPES_MAP.set(DataTypeType.Color, { initial: INITIAL_COLOR });
364
+ // <'outline-color'>
365
+ export const OUTLINE_COLOR_INVERT_KEYWORD = 'invert';
366
+ DATA_TYPES_MAP.set(DataTypeType.OutlineColor, { initial: INITIAL_COLOR });
367
+ // <background-color>
368
+ export const INITIAL_BACKGROUND_COLOR = 'transparent';
369
+ // <border-image-slice>
370
+ export const BORDER_IMAGE_SLICE_FILL_KEYWORD = 'fill';
371
+ export const INITIAL_BORDER_IMAGE_SLICE = '100%';
372
+ DATA_TYPES_MAP.set(DataTypeType.BorderImageSlice, { initial: INITIAL_BORDER_IMAGE_SLICE });
373
+ // <border-image-outset>
374
+ export const INITIAL_BORDER_IMAGE_OUTSET = DEFAULT_DIMENSION;
375
+ DATA_TYPES_MAP.set(DataTypeType.BorderImageOutset, {
376
+ initial: INITIAL_BORDER_IMAGE_OUTSET,
377
+ prefix: DataTypeType.BorderImageWidth,
378
+ });
379
+ // <border-image-repeat>
380
+ export const BORDER_IMAGE_REPEAT_MULTIPLE_KEYWORDS = keywordsMap(['stretch', 'repeat', 'round', 'space']);
381
+ export const INITIAL_BORDER_IMAGE_REPEAT = 'stretch';
382
+ DATA_TYPES_MAP.set(DataTypeType.BorderImageRepeat, { initial: INITIAL_BORDER_IMAGE_REPEAT });
383
+ // <border-image-width>
384
+ export const INITIAL_BORDER_IMAGE_WIDTH = '1';
385
+ DATA_TYPES_MAP.set(DataTypeType.BorderImageWidth, {
386
+ initial: INITIAL_BORDER_IMAGE_WIDTH,
387
+ prefix: DataTypeType.BorderImageSlice,
388
+ });
389
+ // <gradient>
390
+ export const GRADIENT_FUNCTIONS = keywordsMap([
391
+ 'linear-gradient',
392
+ 'repeating-linear-gradient',
393
+ 'radial-gradient',
394
+ 'repeating-radial-gradient',
395
+ 'conic-gradient',
396
+ 'repeating-conic-gradient',
397
+ ]);
398
+ // <image>
399
+ export const IMAGE_FUNCTIONS = keywordsMap(['url', 'image', 'image-set', 'element', 'paint', 'cross-fade']);
400
+ // <image-source>
401
+ export const IMAGE_SOURCE_NONE_KEYWORD = NONE_KEYWORD;
402
+ export const INITIAL_IMAGE_SOURCE = IMAGE_SOURCE_NONE_KEYWORD;
403
+ DATA_TYPES_MAP.set(DataTypeType.ImageSource, { initial: INITIAL_IMAGE_SOURCE });
404
+ // <bg-position>
405
+ export const BG_POSITION_CENTER_KEYWORD = 'center';
406
+ export const BG_POSITION_VERTICAL_KEYWORDS = ['top', 'bottom'];
407
+ export const BG_POSITION_VERTICAL_KEYWORDS_MAP = keywordsMap(BG_POSITION_VERTICAL_KEYWORDS);
408
+ export const BG_POSITION_HORIZONTAL_KEYWORDS = ['left', 'right'];
409
+ export const BG_POSITION_HORIZONTAL_KEYWORDS_MAP = keywordsMap(BG_POSITION_HORIZONTAL_KEYWORDS);
410
+ export const BG_POSITION_ALL_EDGES_KEYWORDS = keywordsMap(BG_POSITION_HORIZONTAL_KEYWORDS.concat(BG_POSITION_VERTICAL_KEYWORDS));
411
+ export const INITIAL_BG_POSITION = '0% 0%';
412
+ DATA_TYPES_MAP.set(DataTypeType.BgPosition, { initial: INITIAL_BG_POSITION });
413
+ // <bg-size>
414
+ export const BG_SIZE_KEYWORDS = keywordsMap(['cover', 'contain']);
415
+ export const INITIAL_BG_SIZE = AUTO_KEYWORD;
416
+ DATA_TYPES_MAP.set(DataTypeType.BgSize, {
417
+ initial: INITIAL_BG_SIZE,
418
+ prefix: DataTypeType.BgPosition,
419
+ });
420
+ // <repeat-style>
421
+ export const REPEAT_STYLE_SINGLE_KEYWORDS = keywordsMap(['repeat-x', 'repeat-y']);
422
+ export const REPEAT_STYLE_MULTIPLE_KEYWORDS = keywordsMap(['repeat', 'space', 'round', 'no-repeat']);
423
+ export const INITIAL_REPEAT_STYLE = 'repeat';
424
+ DATA_TYPES_MAP.set(DataTypeType.RepeatStyle, { initial: INITIAL_REPEAT_STYLE });
425
+ // <attachment>
426
+ export const ATTACHMENT_KEYWORDS = keywordsMap(['scroll', 'fixed', 'local']);
427
+ export const INITIAL_ATTACHMENT = 'scroll';
428
+ DATA_TYPES_MAP.set(DataTypeType.Attachment, {
429
+ initial: INITIAL_ATTACHMENT,
430
+ keywords: ATTACHMENT_KEYWORDS,
431
+ });
432
+ // <box>
433
+ export const BOX_KEYWORDS = keywordsMap(['border-box', 'padding-box', 'content-box']);
434
+ export const INITIAL_BACKGROUND_ORIGIN = 'padding-box';
435
+ export const INITIAL_BACKGROUND_CLIP = 'border-box';
436
+ DATA_TYPES_MAP.set(DataTypeType.Box, { keywords: BOX_KEYWORDS });
437
+ // <font>
438
+ export const FONT_SINGLE_VALUE_KEYWORDS = keywordsMap([
439
+ 'caption',
440
+ 'icon',
441
+ 'menu',
442
+ 'message-box',
443
+ 'small-caption',
444
+ 'status-bar',
445
+ ]);
446
+ DATA_TYPES_MAP.set(DataTypeType.Font, { keywords: FONT_SINGLE_VALUE_KEYWORDS });
447
+ export const COMMON_FONT_PREFIX_NORMAL = NORMAL_KEYWORD;
448
+ // <font-style>
449
+ export const FONT_STYLE_KEYWORDS = keywordsMap([COMMON_FONT_PREFIX_NORMAL, 'italic']);
450
+ export const FONT_STYLE_OBLIQUE_KEYWORD = 'oblique';
451
+ export const INITIAL_FONT_STYLE = COMMON_FONT_PREFIX_NORMAL;
452
+ DATA_TYPES_MAP.set(DataTypeType.FontStyle, { initial: INITIAL_FONT_STYLE });
453
+ // <font-variant>
454
+ const FONT_VARIANT_LIGATURES_KEYWORDS = [
455
+ 'common-ligatures',
456
+ 'no-common-ligatures',
457
+ 'discretionary-ligatures',
458
+ 'no-discretionary-ligatures',
459
+ 'historical-ligatures',
460
+ 'no-historical-ligatures',
461
+ 'contextual',
462
+ 'no-contextual',
463
+ ];
464
+ const FONT_VARIANT_CAPS_KEYWORDS = [
465
+ 'small-caps',
466
+ 'all-small-caps',
467
+ 'petite-caps',
468
+ 'all-petite-caps',
469
+ 'unicase',
470
+ 'titling-caps',
471
+ ];
472
+ const FONT_VARIANT_NUMERIC_KEYWORDS = [
473
+ 'lining-nums',
474
+ 'oldstyle-nums',
475
+ 'proportional-nums',
476
+ 'tabular-nums',
477
+ 'diagonal-fractions',
478
+ 'stacked-fractions',
479
+ 'ordinal',
480
+ 'slashed-zero',
481
+ ];
482
+ const FONT_VARIANT_EAST_ASIAN_KEYWORDS = [
483
+ 'jis78',
484
+ 'jis83',
485
+ 'jis90',
486
+ 'jis04',
487
+ 'simplified',
488
+ 'traditional',
489
+ 'full-width',
490
+ 'proportional-width',
491
+ 'ruby',
492
+ ];
493
+ export const FONT_VARIANT_KEYWORDS = keywordsMap([COMMON_FONT_PREFIX_NORMAL, NONE_KEYWORD]
494
+ .concat(FONT_VARIANT_LIGATURES_KEYWORDS)
495
+ .concat(FONT_VARIANT_CAPS_KEYWORDS)
496
+ .concat(FONT_VARIANT_NUMERIC_KEYWORDS)
497
+ .concat(FONT_VARIANT_EAST_ASIAN_KEYWORDS));
498
+ export const INITIAL_FONT_VARIANT = COMMON_FONT_PREFIX_NORMAL;
499
+ DATA_TYPES_MAP.set(DataTypeType.FontVariant, {
500
+ initial: INITIAL_FONT_VARIANT,
501
+ keywords: FONT_VARIANT_KEYWORDS,
502
+ });
503
+ // <font-weight>
504
+ const FONT_WEIGHT_ABSOLUTE_KEYWORDS = [COMMON_FONT_PREFIX_NORMAL, 'bold'];
505
+ const FONT_WEIGHT_RELATIVE_KEYWORDS = ['lighter', 'bolder'];
506
+ export const FONT_WEIGHT_KEYWORDS = keywordsMap(FONT_WEIGHT_ABSOLUTE_KEYWORDS.concat(FONT_WEIGHT_RELATIVE_KEYWORDS));
507
+ export const FONT_WEIGHT_NUMBER_RANGE_MIN = 1;
508
+ export const FONT_WEIGHT_NUMBER_RANGE_MAX = 1000;
509
+ export const INITIAL_FONT_WEIGHT = COMMON_FONT_PREFIX_NORMAL;
510
+ DATA_TYPES_MAP.set(DataTypeType.FontWeight, { initial: INITIAL_FONT_WEIGHT });
511
+ // <font-stretch>
512
+ export const FONT_STRETCH_KEYWORDS = keywordsMap([
513
+ COMMON_FONT_PREFIX_NORMAL,
514
+ 'ultra-condensed',
515
+ 'extra-condensed',
516
+ 'condensed',
517
+ 'semi-condensed',
518
+ 'semi-expanded',
519
+ 'expanded',
520
+ 'extra-expanded',
521
+ 'ultra-expanded',
522
+ ]);
523
+ export const INITIAL_FONT_STRETCH = COMMON_FONT_PREFIX_NORMAL;
524
+ DATA_TYPES_MAP.set(DataTypeType.FontStretch, {
525
+ initial: INITIAL_FONT_STRETCH,
526
+ keywords: FONT_STRETCH_KEYWORDS,
527
+ });
528
+ // <font-size>
529
+ const FONT_SIZE_ABSOLUTE_KEYWORDS = [
530
+ 'xx-small',
531
+ 'x-small',
532
+ 'small',
533
+ 'medium',
534
+ 'large',
535
+ 'x-large',
536
+ 'xx-large',
537
+ 'xxx-large',
538
+ ];
539
+ const FONT_SIZE_RELATIVE_KEYWORDS = ['larger', 'smaller'];
540
+ export const FONT_SIZE_KEYWORDS = keywordsMap(FONT_SIZE_ABSOLUTE_KEYWORDS.concat(FONT_SIZE_RELATIVE_KEYWORDS));
541
+ export const INITIAL_FONT_SIZE = 'medium';
542
+ DATA_TYPES_MAP.set(DataTypeType.FontSize, { initial: INITIAL_FONT_SIZE });
543
+ // <line-height>
544
+ export const LINE_HEIGHT_KEYWORD = NORMAL_KEYWORD;
545
+ export const INITIAL_LINE_HEIGHT = LINE_HEIGHT_KEYWORD;
546
+ DATA_TYPES_MAP.set(DataTypeType.LineHeight, {
547
+ initial: INITIAL_LINE_HEIGHT,
548
+ prefix: DataTypeType.FontSize,
549
+ });
550
+ export const INITIAL_FONT_FAMILY = '';
551
+ DATA_TYPES_MAP.set(DataTypeType.FontFamily, { initial: INITIAL_FONT_FAMILY });
552
+ // <baseline-position>
553
+ const BASELINE_KEYWORD = 'baseline';
554
+ const STRETCH_KEYWORD = 'stretch';
555
+ // <content-distribution>
556
+ export const CONTENT_DISTRIBUTION_KEYWORDS = keywordsMap([
557
+ 'space-between',
558
+ 'space-around',
559
+ 'space-evenly',
560
+ STRETCH_KEYWORD,
561
+ ]);
562
+ // <content-position>
563
+ const CONTENT_POSITION_LIST = ['center', 'start', 'end', 'flex-start', 'flex-end'];
564
+ export const CONTENT_POSITION_KEYWORDS = keywordsMap(CONTENT_POSITION_LIST);
565
+ // <align-content>
566
+ export const ALIGN_CONTENT_KEYWORDS = keywordsMap([NORMAL_KEYWORD, BASELINE_KEYWORD]);
567
+ export const INITIAL_ALIGN_CONTENT = NORMAL_KEYWORD;
568
+ DATA_TYPES_MAP.set(DataTypeType.AlignContent, { initial: INITIAL_ALIGN_CONTENT });
569
+ // <self-position>
570
+ export const SELF_POSITION_KEYWORDS = keywordsMap(CONTENT_POSITION_LIST.concat(['start', 'end', 'self-start', 'self-end']));
571
+ // <justify-content>
572
+ export const JUSTIFY_CONTENT_KEYWORDS = keywordsMap([NORMAL_KEYWORD, 'left', 'right']);
573
+ export const INITIAL_JUSTIFY_CONTENT = NORMAL_KEYWORD;
574
+ DATA_TYPES_MAP.set(DataTypeType.JustifyContent, { initial: INITIAL_JUSTIFY_CONTENT });
575
+ // <align-items>
576
+ export const ALIGN_ITEMS_KEYWORDS = keywordsMap([NORMAL_KEYWORD, STRETCH_KEYWORD, BASELINE_KEYWORD]);
577
+ export const INITIAL_ALIGN_ITEMS = NORMAL_KEYWORD;
578
+ DATA_TYPES_MAP.set(DataTypeType.AlignItems, { initial: INITIAL_ALIGN_ITEMS });
579
+ // <justify-items>
580
+ export const JUSTIFY_ITEMS_KEYWORDS = keywordsMap(['legacy', 'left', 'right', 'center']);
581
+ export const INITIAL_JUSTIFY_ITEMS = 'legacy';
582
+ DATA_TYPES_MAP.set(DataTypeType.JustifyItems, { initial: INITIAL_JUSTIFY_ITEMS });
583
+ // <'flex'>
584
+ export const FLEX_SINGLE_VALUE_KEYWORDS = keywordsMap([INITIAL_UNIVERSAL, AUTO_KEYWORD, NONE_KEYWORD]);
585
+ DATA_TYPES_MAP.set(DataTypeType.Flex, { keywords: FLEX_SINGLE_VALUE_KEYWORDS });
586
+ // <flex-grow>
587
+ export const INITIAL_FLEX_GROW = DEFAULT_DIMENSION;
588
+ export const AUTO_FLEX_GROW = '1';
589
+ DATA_TYPES_MAP.set(DataTypeType.FlexGrow, { initial: INITIAL_FLEX_GROW });
590
+ // <flex-shrink>
591
+ export const INITIAL_FLEX_SHRINK = '1';
592
+ export const NONE_FLEX_SHRINK = DEFAULT_DIMENSION;
593
+ DATA_TYPES_MAP.set(DataTypeType.FlexShrink, { initial: INITIAL_FLEX_SHRINK });
594
+ // <flex-basis>
595
+ const FLEX_BASIS_CONTENT_KEYWORD = 'content';
596
+ const FLEX_BASIS_INTRINSIC_SIZING_KEYWORDS = ['fill', 'max-content', 'min-content', 'fit-content'];
597
+ export const FLEX_BASIS_KEYWORDS = keywordsMap(FLEX_BASIS_INTRINSIC_SIZING_KEYWORDS.concat(FLEX_BASIS_CONTENT_KEYWORD));
598
+ export const AUTO_FLEX_BASIS = AUTO_KEYWORD;
599
+ export const INITIAL_FLEX_BASIS = DEFAULT_DIMENSION;
600
+ DATA_TYPES_MAP.set(DataTypeType.FlexBasis, { initial: INITIAL_FLEX_BASIS });
601
+ // <flex-direction>
602
+ export const FLEX_DIRECTION_KEYWORDS = keywordsMap(['row', 'row-reverse', 'column', 'column-reverse']);
603
+ export const INITIAL_FLEX_DIRECTION = 'row';
604
+ DATA_TYPES_MAP.set(DataTypeType.FlexDirection, {
605
+ initial: INITIAL_FLEX_DIRECTION,
606
+ keywords: FLEX_DIRECTION_KEYWORDS,
607
+ });
608
+ // <flex-wrap>
609
+ export const FLEX_WRAP_KEYWORDS = keywordsMap(['nowrap', 'wrap', 'wrap-reverse']);
610
+ export const INITIAL_FLEX_WRAP = 'nowrap';
611
+ DATA_TYPES_MAP.set(DataTypeType.FlexWrap, {
612
+ initial: INITIAL_FLEX_WRAP,
613
+ keywords: FLEX_WRAP_KEYWORDS,
614
+ });
615
+ // <grid-line>
616
+ export const GRID_LINE_SPAN_KEYWORD = 'span';
617
+ export const GRID_LINE_AUTO_KEYWORD = AUTO_KEYWORD;
618
+ export const INITIAL_GRID_LINE = AUTO_KEYWORD;
619
+ DATA_TYPES_MAP.set(DataTypeType.GridLine, { initial: INITIAL_GRID_LINE });
620
+ DATA_TYPES_MAP.set(DataTypeType.GridLineEnd, {
621
+ initial: INITIAL_GRID_LINE,
622
+ prefix: DataTypeType.GridLine,
623
+ });
624
+ // <track-breadth> / <inflexible-breadth>
625
+ export const BREADTH_KEYWORDS = keywordsMap(['min-content', 'max-content', AUTO_KEYWORD]);
626
+ // <line-names>
627
+ export const LINE_NAMES_EXCLUDE_KEYWORDS = keywordsMap(['span', AUTO_KEYWORD]);
628
+ export const MINMAX_FUNCTION = 'minmax';
629
+ export const REPEAT_FUNCTION = 'repeat';
630
+ // <track-size>
631
+ export const TRACK_SIZE_FUNCTIONS = keywordsMap([MINMAX_FUNCTION, 'fit-content']);
632
+ export const INITIAL_TRACK_SIZE = AUTO_KEYWORD;
633
+ // <explicit-track-list>
634
+ DATA_TYPES_MAP.set(DataTypeType.ExplicitTrackList, { prefix: DataTypeType.GridTemplateRows });
635
+ // <auto-repeat>
636
+ export const AUTO_REPEAT_FIRST_ARGUMENT_KEYWORDS = keywordsMap(['auto-fill', 'auto-fit']);
637
+ // <grid-template-areas>
638
+ export const GRID_TEMPLATE_AREAS_NONE_KEYWORD = NONE_KEYWORD;
639
+ export const INITIAL_GRID_TEMPLATE_AREAS = GRID_TEMPLATE_AREAS_NONE_KEYWORD;
640
+ DATA_TYPES_MAP.set(DataTypeType.GridTemplateAreas, { initial: INITIAL_GRID_TEMPLATE_AREAS });
641
+ // <grid-template-rows> / <grid-template-columns>
642
+ export const GRID_TEMPLATE_AXIS_NONE_KEYWORD = NONE_KEYWORD;
643
+ export const INITIAL_GRID_TEMPLATE_AXIS = GRID_TEMPLATE_AXIS_NONE_KEYWORD;
644
+ DATA_TYPES_MAP.set(DataTypeType.GridTemplateRows, { initial: INITIAL_GRID_TEMPLATE_AXIS });
645
+ DATA_TYPES_MAP.set(DataTypeType.GridTemplateColumns, {
646
+ initial: INITIAL_GRID_TEMPLATE_AXIS,
647
+ prefix: DataTypeType.GridTemplateRows,
648
+ });
649
+ // <grid-template>
650
+ export const GRID_TEMPLATE_SINGLE_VALUE_KEYWORD = NONE_KEYWORD;
651
+ DATA_TYPES_MAP.set(DataTypeType.GridTemplate, { keywords: GRID_TEMPLATE_SINGLE_VALUE_KEYWORD });
652
+ // <grid-auto-flow>
653
+ export const GRID_AUTO_FLOW_KEYWORD = 'auto-flow';
654
+ export const GRID_AUTO_FLOW_ROW_KEYWORD = 'row';
655
+ export const GRID_AUTO_FLOW_COLUMN_KEYWORD = 'column';
656
+ export const GRID_AUTO_FLOW_DENSE_KEYWORD = 'dense';
657
+ export const INITIAL_GRID_AUTO_FLOW = GRID_AUTO_FLOW_ROW_KEYWORD;
658
+ DATA_TYPES_MAP.set(DataTypeType.GridAutoFlow, { initial: INITIAL_GRID_AUTO_FLOW });
659
+ // <grid-auto-rows> / <grid-auto-columns>
660
+ export const INITIAL_GRID_AUTO_AXIS = AUTO_KEYWORD;
661
+ DATA_TYPES_MAP.set(DataTypeType.GridAutoRows, { initial: INITIAL_GRID_AUTO_AXIS });
662
+ DATA_TYPES_MAP.set(DataTypeType.GridAutoColumns, { initial: INITIAL_GRID_AUTO_AXIS });
663
+ // <grid>
664
+ export const GRID_SINGLE_VALUE_KEYWORD = NONE_KEYWORD;
665
+ DATA_TYPES_MAP.set(DataTypeType.Grid, { keywords: GRID_SINGLE_VALUE_KEYWORD });
666
+ // <overflow>
667
+ export const OVERFLOW_KEYWORDS = keywordsMap(['visible', 'hidden', 'clip', 'scroll', AUTO_KEYWORD]);
668
+ export const INITIAL_OVERFLOW = 'visible';
669
+ DATA_TYPES_MAP.set(DataTypeType.Overflow, {
670
+ initial: INITIAL_OVERFLOW,
671
+ keywords: OVERFLOW_KEYWORDS,
672
+ });
673
+ // <text-decoration-line>
674
+ export const TEXT_DECORATION_LINE_NONE_KEYWORD = NONE_KEYWORD;
675
+ export const TEXT_DECORATION_LINE_KEYWORDS = keywordsMap(['underline', 'overline', 'line-through']);
676
+ export const INITIAL_TEXT_DECORATION_LINE = TEXT_DECORATION_LINE_NONE_KEYWORD;
677
+ DATA_TYPES_MAP.set(DataTypeType.TextDecorationLine, { initial: INITIAL_TEXT_DECORATION_LINE });
678
+ // <text-decoration-style>
679
+ export const TEXT_DECORATION_STYLE_KEYWORDS = keywordsMap(['solid', 'double', 'dotted', 'dashed', 'wavy']);
680
+ export const INITIAL_TEXT_DECORATION_STYLE = 'solid';
681
+ DATA_TYPES_MAP.set(DataTypeType.TextDecorationStyle, {
682
+ initial: INITIAL_TEXT_DECORATION_STYLE,
683
+ keywords: TEXT_DECORATION_STYLE_KEYWORDS,
684
+ });
685
+ // <list-style>
686
+ export const LIST_STYLE_SINGLE_VALUE_KEYWORD = NONE_KEYWORD;
687
+ DATA_TYPES_MAP.set(DataTypeType.ListStyle, { keywords: LIST_STYLE_SINGLE_VALUE_KEYWORD });
688
+ // <list-style-position>
689
+ export const LIST_STYLE_POSITION_KEYWORDS = keywordsMap(['inside', 'outside']);
690
+ export const INITIAL_LIST_STYLE_POSITION = 'outside';
691
+ DATA_TYPES_MAP.set(DataTypeType.ListStylePosition, {
692
+ initial: INITIAL_LIST_STYLE_POSITION,
693
+ keywords: LIST_STYLE_POSITION_KEYWORDS,
694
+ });
695
+ // <list-style-type>
696
+ export const LIST_STYLE_TYPE_KEYWORDS = keywordsMap([
697
+ NONE_KEYWORD,
698
+ 'disc',
699
+ 'circle',
700
+ 'square',
701
+ 'decimal',
702
+ 'cjk-decimal',
703
+ 'decimal-leading-zero',
704
+ 'lower-roman',
705
+ 'upper-roman',
706
+ 'lower-greek',
707
+ 'lower-alpha',
708
+ 'lower-latin',
709
+ 'upper-alpha',
710
+ 'upper-latin',
711
+ 'arabic-indic',
712
+ '-moz-arabic-indic',
713
+ 'armenian',
714
+ 'bengali',
715
+ '-moz-bengali',
716
+ 'cambodian',
717
+ 'khmer',
718
+ 'cjk-earthly-branch',
719
+ '-moz-cjk-earthly-branch',
720
+ 'cjk-heavenly-stem',
721
+ '-moz-cjk-heavenly-stem',
722
+ 'cjk-ideographic',
723
+ 'devanagari',
724
+ '-moz-devanagari',
725
+ 'ethiopic-numeric',
726
+ 'georgian',
727
+ 'gujarati',
728
+ '-moz-gujarati',
729
+ 'gurmukhi',
730
+ '-moz-gurmukhi',
731
+ 'hebrew',
732
+ 'hiragana',
733
+ 'hiragana-iroha',
734
+ 'japanese-formal',
735
+ 'japanese-informal',
736
+ 'kannada',
737
+ '-moz-kannada',
738
+ 'katakana',
739
+ 'katakana-iroha',
740
+ 'korean-hangul-formal',
741
+ 'korean-hanja-formal',
742
+ 'korean-hanja-informal',
743
+ 'lao',
744
+ '-moz-lao',
745
+ 'lower-armenian',
746
+ 'malayalam',
747
+ '-moz-malayalam',
748
+ 'mongolian',
749
+ 'myanmar',
750
+ '-moz-myanmar',
751
+ 'oriya',
752
+ '-moz-oriya',
753
+ 'persian',
754
+ '-moz-persian',
755
+ 'simp-chinese-formal',
756
+ 'simp-chinese-informal',
757
+ 'tamil',
758
+ '-moz-tamil',
759
+ 'telugu',
760
+ '-moz-telugu',
761
+ 'thai',
762
+ '-moz-thai',
763
+ 'tibetan',
764
+ 'trad-chinese-formal',
765
+ 'trad-chinese-informal',
766
+ 'upper-armenian',
767
+ 'disclosure-open',
768
+ 'disclosure-closed',
769
+ '-moz-ethiopic-halehame',
770
+ '-moz-ethiopic-halehame-am',
771
+ 'ethiopic-halehame-ti-er',
772
+ '-moz-ethiopic-halehame-ti-er',
773
+ 'ethiopic-halehame-ti-et',
774
+ '-moz-ethiopic-halehame-ti-et',
775
+ 'hangul',
776
+ '-moz-hangul',
777
+ 'hangul-consonant',
778
+ '-moz-hangul-consonant',
779
+ 'urdu',
780
+ '-moz-urdu',
781
+ ]);
782
+ export const INITIAL_LIST_STYLE_TYPE = 'disc';
783
+ DATA_TYPES_MAP.set(DataTypeType.ListStyleType, { initial: INITIAL_LIST_STYLE_TYPE });
784
+ // <inset>
785
+ export const INSET_KEYWORD = 'inset';
786
+ DATA_TYPES_MAP.set(DataTypeType.Inset, { keywords: INSET_KEYWORD });
787
+ // <shadow>
788
+ export const SHADOW_SINGLE_VALUE_KEYWORDS = keywordsMap([NONE_KEYWORD]);
789
+ DATA_TYPES_MAP.set(DataTypeType.Shadow, { keywords: SHADOW_SINGLE_VALUE_KEYWORDS });
790
+ //# sourceMappingURL=data-types-consts.js.map