keywords.cjs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const uniteSets = require('../utils/uniteSets.cjs');
  5. /** @type {ReadonlySet<string>} */
  6. const basicKeywords = new Set(['initial', 'inherit', 'revert', 'revert-layer', 'unset']);
  7. /** @type {ReadonlySet<string>} */
  8. const systemFontKeywords = uniteSets(basicKeywords, [
  9. 'caption',
  10. 'icon',
  11. 'menu',
  12. 'message-box',
  13. 'small-caption',
  14. 'status-bar',
  15. ]);
  16. /** @type {ReadonlySet<string>} */
  17. const fontFamilyKeywords = uniteSets(basicKeywords, [
  18. 'serif',
  19. 'sans-serif',
  20. 'cursive',
  21. 'fantasy',
  22. 'monospace',
  23. 'system-ui',
  24. 'ui-serif',
  25. 'ui-sans-serif',
  26. 'ui-monospace',
  27. 'ui-rounded',
  28. 'emoji',
  29. 'math',
  30. 'fangsong',
  31. ]);
  32. /** @type {ReadonlySet<string>} */
  33. const appleSystemFonts = new Set([
  34. '-apple-system',
  35. '-apple-system-headline',
  36. '-apple-system-body',
  37. '-apple-system-subheadline',
  38. '-apple-system-footnote',
  39. '-apple-system-caption1',
  40. '-apple-system-caption2',
  41. '-apple-system-short-headline',
  42. '-apple-system-short-body',
  43. '-apple-system-short-subheadline',
  44. '-apple-system-short-footnote',
  45. '-apple-system-short-caption1',
  46. '-apple-system-tall-body',
  47. '-apple-system-title0',
  48. '-apple-system-title1',
  49. '-apple-system-title2',
  50. '-apple-system-title3',
  51. '-apple-system-title4',
  52. ]);
  53. /** @type {ReadonlySet<string>} */
  54. const mozillaSystemFonts = new Set([
  55. '-moz-button',
  56. '-moz-desktop',
  57. '-moz-dialog',
  58. '-moz-document',
  59. '-moz-field',
  60. '-moz-fixed',
  61. '-moz-info',
  62. '-moz-list',
  63. '-moz-pull-down-menu',
  64. '-moz-window',
  65. '-moz-workspace',
  66. ]);
  67. /** @type {ReadonlySet<string>} */
  68. const webkitSystemFonts = new Set([
  69. '-webkit-body',
  70. '-webkit-control',
  71. '-webkit-mini-control',
  72. '-webkit-pictograph',
  73. '-webkit-small-control',
  74. '-webkit-standard',
  75. ]);
  76. /** @type {ReadonlySet<string>} */
  77. const prefixedSystemFonts = uniteSets(
  78. appleSystemFonts,
  79. mozillaSystemFonts,
  80. webkitSystemFonts,
  81. );
  82. /** @type {ReadonlySet<string>} */
  83. const fontWeightRelativeKeywords = new Set(['bolder', 'lighter']);
  84. /** @type {ReadonlySet<string>} */
  85. const fontWeightAbsoluteKeywords = new Set(['normal', 'bold']);
  86. /** @type {ReadonlySet<string>} */
  87. const fontWeightNonNumericKeywords = uniteSets(
  88. fontWeightRelativeKeywords,
  89. fontWeightAbsoluteKeywords,
  90. );
  91. /** @type {ReadonlySet<string>} */
  92. const fontWeightNumericKeywords = new Set([
  93. '100',
  94. '200',
  95. '300',
  96. '400',
  97. '500',
  98. '600',
  99. '700',
  100. '800',
  101. '900',
  102. ]);
  103. /** @type {ReadonlySet<string>} */
  104. const fontWeightKeywords = uniteSets(
  105. basicKeywords,
  106. fontWeightNonNumericKeywords,
  107. fontWeightNumericKeywords,
  108. );
  109. /** @type {ReadonlySet<string>} */
  110. const fontStyleKeywords = uniteSets(basicKeywords, ['normal', 'italic', 'oblique']);
  111. /** @type {ReadonlySet<string>} */
  112. const fontVariantCSS2Keywords = uniteSets(basicKeywords, ['normal', 'none', 'small-caps']);
  113. /** @type {ReadonlySet<string>} */
  114. const fontStretchKeywords = uniteSets(basicKeywords, [
  115. 'semi-condensed',
  116. 'condensed',
  117. 'extra-condensed',
  118. 'ultra-condensed',
  119. 'semi-expanded',
  120. 'expanded',
  121. 'extra-expanded',
  122. 'ultra-expanded',
  123. ]);
  124. /** @type {ReadonlySet<string>} */
  125. const fontSizeKeywords = uniteSets(basicKeywords, [
  126. 'xx-small',
  127. 'x-small',
  128. 'small',
  129. 'medium',
  130. 'large',
  131. 'x-large',
  132. 'xx-large',
  133. 'xxx-large',
  134. 'larger',
  135. 'smaller',
  136. 'math',
  137. '-konq-xxx-large',
  138. '-webkit-xxx-large',
  139. ]);
  140. /** @type {ReadonlySet<string>} */
  141. const lineHeightKeywords = uniteSets(basicKeywords, ['normal']);
  142. /** @type {ReadonlySet<string>} */
  143. const fontShorthandKeywords = uniteSets(
  144. basicKeywords,
  145. fontStyleKeywords,
  146. fontVariantCSS2Keywords,
  147. fontWeightKeywords,
  148. fontStretchKeywords,
  149. fontSizeKeywords,
  150. lineHeightKeywords,
  151. fontFamilyKeywords,
  152. );
  153. /** @type {ReadonlySet<string>} */
  154. const animationNameKeywords = uniteSets(basicKeywords, ['none']);
  155. /** @type {ReadonlySet<string>} */
  156. const animationTimingFunctionKeywords = uniteSets(basicKeywords, [
  157. 'linear',
  158. 'ease',
  159. 'ease-in',
  160. 'ease-in-out',
  161. 'ease-out',
  162. 'step-start',
  163. 'step-end',
  164. 'steps',
  165. 'cubic-bezier',
  166. ]);
  167. /** @type {ReadonlySet<string>} */
  168. const animationIterationCountKeywords = new Set(['infinite']);
  169. /** @type {ReadonlySet<string>} */
  170. const animationDirectionKeywords = uniteSets(basicKeywords, [
  171. 'normal',
  172. 'reverse',
  173. 'alternate',
  174. 'alternate-reverse',
  175. ]);
  176. /** @type {ReadonlySet<string>} */
  177. const animationFillModeKeywords = new Set(['none', 'forwards', 'backwards', 'both']);
  178. /** @type {ReadonlySet<string>} */
  179. const animationPlayStateKeywords = uniteSets(basicKeywords, ['running', 'paused']);
  180. /**
  181. * @see https://developer.mozilla.org/docs/Web/CSS/animation
  182. * @type {ReadonlySet<string>}
  183. */
  184. const animationShorthandKeywords = uniteSets(
  185. basicKeywords,
  186. animationNameKeywords,
  187. animationTimingFunctionKeywords,
  188. animationIterationCountKeywords,
  189. animationDirectionKeywords,
  190. animationFillModeKeywords,
  191. animationPlayStateKeywords,
  192. );
  193. /** @type {ReadonlySet<string>} */
  194. const gridRowKeywords = uniteSets(basicKeywords, ['auto', 'span']);
  195. /** @type {ReadonlySet<string>} */
  196. const gridColumnKeywords = uniteSets(basicKeywords, ['auto', 'span']);
  197. /** @type {ReadonlySet<string>} */
  198. const gridAreaKeywords = uniteSets(basicKeywords, ['auto', 'span']);
  199. /**
  200. * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment
  201. * @type {ReadonlySet<string>}
  202. */
  203. const counterIncrementKeywords = uniteSets(basicKeywords, ['none']);
  204. /** @type {ReadonlySet<string>} */
  205. const counterResetKeywords = uniteSets(basicKeywords, ['none']);
  206. /**
  207. * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type
  208. * @type {ReadonlySet<string>}
  209. */
  210. const listStyleTypeKeywords = uniteSets(basicKeywords, [
  211. 'none',
  212. 'disc',
  213. 'circle',
  214. 'square',
  215. 'decimal',
  216. 'decimal-leading-zero',
  217. 'cjk-decimal',
  218. 'cjk-earthly-branch',
  219. 'cjk-heavenly-stem',
  220. 'cjk-ideographic',
  221. 'lower-alpha',
  222. 'upper-alpha',
  223. 'lower-armenian',
  224. 'upper-armenian',
  225. 'lower-greek',
  226. 'upper-greek',
  227. 'lower-hexadecimal',
  228. 'upper-hexadecimal',
  229. 'lower-latin',
  230. 'upper-latin',
  231. 'lower-norwegian',
  232. 'upper-norwegian',
  233. 'lower-roman',
  234. 'upper-roman',
  235. 'afar',
  236. 'amharic',
  237. 'amharic-abegede',
  238. 'arabic-indic',
  239. 'armenian',
  240. 'bengali',
  241. 'cambodian',
  242. 'devanagari',
  243. 'ethiopic-abegede',
  244. 'ethiopic-abegede-am-et',
  245. 'ethiopic-abegede-gez',
  246. 'ethiopic-abegede-ti-er',
  247. 'ethiopic-abegede-ti-et',
  248. 'ethiopic-halehame',
  249. 'ethiopic-halehame-aa-er',
  250. 'ethiopic-halehame-aa-et',
  251. 'ethiopic-halehame-am',
  252. 'ethiopic-halehame-am-et',
  253. 'ethiopic-halehame-gez',
  254. 'ethiopic-halehame-om-et',
  255. 'ethiopic-halehame-sid-et',
  256. 'ethiopic-halehame-so-et',
  257. 'ethiopic-halehame-ti-er',
  258. 'ethiopic-halehame-ti-et',
  259. 'ethiopic-halehame-tig',
  260. 'ethiopic-numeric',
  261. 'georgian',
  262. 'gujarati',
  263. 'gurmukhi',
  264. 'hangul',
  265. 'hangul-consonant',
  266. 'hebrew',
  267. 'hiragana',
  268. 'hiragana-iroha',
  269. 'japanese-formal',
  270. 'japanese-informal',
  271. 'kannada',
  272. 'katakana',
  273. 'katakana-iroha',
  274. 'khmer',
  275. 'korean-hangul-formal',
  276. 'korean-hanja-formal',
  277. 'korean-hanja-informal',
  278. 'lao',
  279. 'malayalam',
  280. 'mongolian',
  281. 'myanmar',
  282. 'oriya',
  283. 'oromo',
  284. 'persian',
  285. 'sidama',
  286. 'somali',
  287. 'simp-chinese-formal',
  288. 'simp-chinese-informal',
  289. 'tamil',
  290. 'telugu',
  291. 'thai',
  292. 'tibetan',
  293. 'tigre',
  294. 'tigrinya-er',
  295. 'tigrinya-er-abegede',
  296. 'tigrinya-et',
  297. 'tigrinya-et-abegede',
  298. 'trad-chinese-formal',
  299. 'trad-chinese-informal',
  300. 'urdu',
  301. 'disclosure-open',
  302. 'disclosure-closed',
  303. 'asterisks',
  304. 'binary',
  305. 'footnotes',
  306. 'octal',
  307. ]);
  308. /** @type {ReadonlySet<string>} */
  309. const listStylePositionKeywords = uniteSets(basicKeywords, ['inside', 'outside']);
  310. /** @type {ReadonlySet<string>} */
  311. const listStyleImageKeywords = uniteSets(basicKeywords, ['none']);
  312. /** @type {ReadonlySet<string>} */
  313. const listStyleShorthandKeywords = uniteSets(
  314. basicKeywords,
  315. listStyleTypeKeywords,
  316. listStylePositionKeywords,
  317. listStyleImageKeywords,
  318. );
  319. /** @type {ReadonlySet<string>} */
  320. const camelCaseKeywords = new Set([
  321. 'optimizeSpeed',
  322. 'optimizeQuality',
  323. 'optimizeLegibility',
  324. 'geometricPrecision',
  325. 'currentColor',
  326. 'crispEdges',
  327. 'visiblePainted',
  328. 'visibleFill',
  329. 'visibleStroke',
  330. 'sRGB',
  331. 'linearRGB',
  332. ]);
  333. /** @type {ReadonlySet<string>} */
  334. const keyframeSelectorKeywords = new Set(['from', 'to']);
  335. /**
  336. * @see https://drafts.csswg.org/scroll-animations-1/#view-progress-timelines
  337. * @type {ReadonlySet<string>}
  338. */
  339. const namedTimelineRangeKeywords = new Set([
  340. 'contain',
  341. 'cover',
  342. 'entry',
  343. 'entry-crossing',
  344. 'exit',
  345. 'exit-crossing',
  346. ]);
  347. /**
  348. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Mozilla_Extensions#color_keywords
  349. * @type {ReadonlySet<string>}
  350. */
  351. const prefixedSystemColorKeywords = new Set([
  352. '-moz-buttondefault',
  353. '-moz-buttonhoverface',
  354. '-moz-buttonhovertext',
  355. '-moz-cellhighlight',
  356. '-moz-cellhighlighttext',
  357. '-moz-combobox',
  358. '-moz-comboboxtext',
  359. '-moz-dialog',
  360. '-moz-dialogtext',
  361. '-moz-dragtargetzone',
  362. '-moz-eventreerow',
  363. '-moz-field',
  364. '-moz-fieldtext',
  365. '-moz-html-cellhighlight',
  366. '-moz-html-cellhighlighttext',
  367. '-moz-mac-accentdarkestshadow',
  368. '-moz-mac-accentdarkshadow',
  369. '-moz-mac-accentface',
  370. '-moz-mac-accentlightesthighlight',
  371. '-moz-mac-accentlightshadow',
  372. '-moz-mac-accentregularhighlight',
  373. '-moz-mac-accentregularshadow',
  374. '-moz-mac-chrome-active',
  375. '-moz-mac-chrome-inactive',
  376. '-moz-mac-focusring',
  377. '-moz-mac-menuselect',
  378. '-moz-mac-menushadow',
  379. '-moz-mac-menutextselect',
  380. '-moz-menubarhovertext',
  381. '-moz-menubartext',
  382. '-moz-menuhover',
  383. '-moz-menuhovertext',
  384. '-moz-nativehyperlinktext',
  385. '-moz-oddtreerow',
  386. '-moz-win-accentcolor',
  387. '-moz-win-accentcolortext',
  388. '-moz-win-communicationstext',
  389. '-moz-win-mediatext',
  390. '-ms-hotlight',
  391. ]);
  392. /** @type {ReadonlySet<string>} */
  393. const deprecatedSystemColorKeywords = new Set([
  394. 'activeborder',
  395. 'activecaption',
  396. 'appworkspace',
  397. 'background',
  398. 'buttonhighlight',
  399. 'buttonshadow',
  400. 'captiontext',
  401. 'inactiveborder',
  402. 'inactivecaption',
  403. 'inactivecaptiontext',
  404. 'infobackground',
  405. 'infotext',
  406. 'menu',
  407. 'menutext',
  408. 'scrollbar',
  409. 'threeddarkshadow',
  410. 'threedface',
  411. 'threedhighlight',
  412. 'threedlightshadow',
  413. 'threedshadow',
  414. 'window',
  415. 'windowframe',
  416. 'windowtext',
  417. ]);
  418. /** @type {ReadonlySet<string>} */
  419. const systemColorsKeywords = uniteSets(
  420. prefixedSystemColorKeywords,
  421. deprecatedSystemColorKeywords,
  422. [
  423. // https://www.w3.org/TR/css-color-4/#css-system-colors
  424. 'accentcolor',
  425. 'accentcolortext',
  426. 'activetext',
  427. 'buttonborder',
  428. 'buttonface',
  429. 'buttontext',
  430. 'canvas',
  431. 'canvastext',
  432. 'field',
  433. 'fieldtext',
  434. 'graytext',
  435. 'highlight',
  436. 'highlighttext',
  437. 'linktext',
  438. 'mark',
  439. 'marktext',
  440. 'selecteditem',
  441. 'selecteditemtext',
  442. 'visitedtext',
  443. ],
  444. );
  445. /**
  446. * @see https://www.w3.org/TR/css-color-4/#named-colors
  447. * @type {ReadonlySet<string>}
  448. */
  449. const namedColorsKeywords = new Set([
  450. 'aliceblue',
  451. 'antiquewhite',
  452. 'aqua',
  453. 'aquamarine',
  454. 'azure',
  455. 'beige',
  456. 'bisque',
  457. 'black',
  458. 'blanchedalmond',
  459. 'blue',
  460. 'blueviolet',
  461. 'brown',
  462. 'burlywood',
  463. 'cadetblue',
  464. 'chartreuse',
  465. 'chocolate',
  466. 'coral',
  467. 'cornflowerblue',
  468. 'cornsilk',
  469. 'crimson',
  470. 'cyan',
  471. 'darkblue',
  472. 'darkcyan',
  473. 'darkgoldenrod',
  474. 'darkgray',
  475. 'darkgreen',
  476. 'darkgrey',
  477. 'darkkhaki',
  478. 'darkmagenta',
  479. 'darkolivegreen',
  480. 'darkorange',
  481. 'darkorchid',
  482. 'darkred',
  483. 'darksalmon',
  484. 'darkseagreen',
  485. 'darkslateblue',
  486. 'darkslategray',
  487. 'darkslategrey',
  488. 'darkturquoise',
  489. 'darkviolet',
  490. 'deeppink',
  491. 'deepskyblue',
  492. 'dimgray',
  493. 'dimgrey',
  494. 'dodgerblue',
  495. 'firebrick',
  496. 'floralwhite',
  497. 'forestgreen',
  498. 'fuchsia',
  499. 'gainsboro',
  500. 'ghostwhite',
  501. 'gold',
  502. 'goldenrod',
  503. 'gray',
  504. 'green',
  505. 'greenyellow',
  506. 'grey',
  507. 'honeydew',
  508. 'hotpink',
  509. 'indianred',
  510. 'indigo',
  511. 'ivory',
  512. 'khaki',
  513. 'lavender',
  514. 'lavenderblush',
  515. 'lawngreen',
  516. 'lemonchiffon',
  517. 'lightblue',
  518. 'lightcoral',
  519. 'lightcyan',
  520. 'lightgoldenrodyellow',
  521. 'lightgray',
  522. 'lightgreen',
  523. 'lightgrey',
  524. 'lightpink',
  525. 'lightsalmon',
  526. 'lightseagreen',
  527. 'lightskyblue',
  528. 'lightslategray',
  529. 'lightslategrey',
  530. 'lightsteelblue',
  531. 'lightyellow',
  532. 'lime',
  533. 'limegreen',
  534. 'linen',
  535. 'magenta',
  536. 'maroon',
  537. 'mediumaquamarine',
  538. 'mediumblue',
  539. 'mediumorchid',
  540. 'mediumpurple',
  541. 'mediumseagreen',
  542. 'mediumslateblue',
  543. 'mediumspringgreen',
  544. 'mediumturquoise',
  545. 'mediumvioletred',
  546. 'midnightblue',
  547. 'mintcream',
  548. 'mistyrose',
  549. 'moccasin',
  550. 'navajowhite',
  551. 'navy',
  552. 'oldlace',
  553. 'olive',
  554. 'olivedrab',
  555. 'orange',
  556. 'orangered',
  557. 'orchid',
  558. 'palegoldenrod',
  559. 'palegreen',
  560. 'paleturquoise',
  561. 'palevioletred',
  562. 'papayawhip',
  563. 'peachpuff',
  564. 'peru',
  565. 'pink',
  566. 'plum',
  567. 'powderblue',
  568. 'purple',
  569. 'rebeccapurple',
  570. 'red',
  571. 'rosybrown',
  572. 'royalblue',
  573. 'saddlebrown',
  574. 'salmon',
  575. 'sandybrown',
  576. 'seagreen',
  577. 'seashell',
  578. 'sienna',
  579. 'silver',
  580. 'skyblue',
  581. 'slateblue',
  582. 'slategray',
  583. 'slategrey',
  584. 'snow',
  585. 'springgreen',
  586. 'steelblue',
  587. 'tan',
  588. 'teal',
  589. 'thistle',
  590. 'tomato',
  591. 'turquoise',
  592. 'violet',
  593. 'wheat',
  594. 'white',
  595. 'whitesmoke',
  596. 'yellow',
  597. 'yellowgreen',
  598. ]);
  599. exports.animationNameKeywords = animationNameKeywords;
  600. exports.animationShorthandKeywords = animationShorthandKeywords;
  601. exports.basicKeywords = basicKeywords;
  602. exports.camelCaseKeywords = camelCaseKeywords;
  603. exports.counterIncrementKeywords = counterIncrementKeywords;
  604. exports.counterResetKeywords = counterResetKeywords;
  605. exports.deprecatedSystemColorKeywords = deprecatedSystemColorKeywords;
  606. exports.fontFamilyKeywords = fontFamilyKeywords;
  607. exports.fontShorthandKeywords = fontShorthandKeywords;
  608. exports.fontSizeKeywords = fontSizeKeywords;
  609. exports.fontWeightAbsoluteKeywords = fontWeightAbsoluteKeywords;
  610. exports.fontWeightKeywords = fontWeightKeywords;
  611. exports.fontWeightNonNumericKeywords = fontWeightNonNumericKeywords;
  612. exports.fontWeightRelativeKeywords = fontWeightRelativeKeywords;
  613. exports.gridAreaKeywords = gridAreaKeywords;
  614. exports.gridColumnKeywords = gridColumnKeywords;
  615. exports.gridRowKeywords = gridRowKeywords;
  616. exports.keyframeSelectorKeywords = keyframeSelectorKeywords;
  617. exports.listStyleImageKeywords = listStyleImageKeywords;
  618. exports.listStylePositionKeywords = listStylePositionKeywords;
  619. exports.listStyleShorthandKeywords = listStyleShorthandKeywords;
  620. exports.listStyleTypeKeywords = listStyleTypeKeywords;
  621. exports.namedColorsKeywords = namedColorsKeywords;
  622. exports.namedTimelineRangeKeywords = namedTimelineRangeKeywords;
  623. exports.prefixedSystemFonts = prefixedSystemFonts;
  624. exports.systemColorsKeywords = systemColorsKeywords;
  625. exports.systemFontKeywords = systemFontKeywords;