functions.cjs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. /** @type {ReadonlySet<string>} */
  5. const camelCaseFunctions = new Set([
  6. 'translateX',
  7. 'translateY',
  8. 'translateZ',
  9. 'scaleX',
  10. 'scaleY',
  11. 'scaleZ',
  12. 'rotateX',
  13. 'rotateY',
  14. 'rotateZ',
  15. 'skewX',
  16. 'skewY',
  17. ]);
  18. /** @type {ReadonlySet<string>} */
  19. const colorFunctions = new Set([
  20. 'color',
  21. 'color-mix',
  22. 'hsl',
  23. 'hsla',
  24. 'hwb',
  25. 'lab',
  26. 'lch',
  27. 'oklab',
  28. 'oklch',
  29. 'rgb',
  30. 'rgba',
  31. ]);
  32. /** @type {ReadonlySet<string>} */
  33. const singleArgumentMathFunctions = new Set([
  34. 'abs',
  35. 'acos',
  36. 'asin',
  37. 'atan',
  38. 'calc',
  39. 'cos',
  40. 'exp',
  41. 'sign',
  42. 'sin',
  43. 'sqrt',
  44. 'tan',
  45. ]);
  46. /** @type {ReadonlySet<string>} */
  47. const mathFunctions = new Set([
  48. ...singleArgumentMathFunctions,
  49. 'atan2',
  50. 'calc-size',
  51. 'clamp',
  52. 'hypot',
  53. 'log',
  54. 'max',
  55. 'min',
  56. 'mod',
  57. 'pow',
  58. 'rem',
  59. 'round',
  60. ]);
  61. exports.camelCaseFunctions = camelCaseFunctions;
  62. exports.colorFunctions = colorFunctions;
  63. exports.mathFunctions = mathFunctions;