You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stitches.config.ts 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import { createStitches, defaultThemeMap } from '@stitches/react'
  2. const { styled, globalCss, createTheme, getCssText } = createStitches({
  3. themeMap: {
  4. ...defaultThemeMap,
  5. },
  6. theme: {
  7. colors: {
  8. codeHl: 'rgba(144, 144, 144, .15)',
  9. brushFill: 'rgba(0,0,0,.05)',
  10. brushStroke: 'rgba(0,0,0,.25)',
  11. hint: 'rgba(216, 226, 249, 1.000)',
  12. selected: 'rgba(66, 133, 244, 1.000)',
  13. bounds: 'rgba(65, 132, 244, 1.000)',
  14. boundsBg: 'rgba(65, 132, 244, 0.05)',
  15. highlight: 'rgba(65, 132, 244, 0.15)',
  16. overlay: 'rgba(0, 0, 0, 0.15)',
  17. overlayContrast: 'rgba(255, 255, 255, 0.15)',
  18. border: '#aaaaaa',
  19. canvas: '#f8f9fa',
  20. panel: '#fefefe',
  21. inactive: '#cccccf',
  22. hover: '#efefef',
  23. text: '#333333',
  24. tooltip: '#1d1d1d',
  25. tooltipContrast: '#ffffff',
  26. muted: '#777777',
  27. input: '#f3f3f3',
  28. inputBorder: '#dddddd',
  29. warn: 'rgba(255, 100, 100, 1)',
  30. lineError: 'rgba(255, 0, 0, .1)',
  31. },
  32. shadows: {
  33. 2: '0px 1px 1px rgba(0, 0, 0, 0.14)',
  34. 3: '0px 2px 3px rgba(0, 0, 0, 0.14)',
  35. 4: '0px 4px 5px -1px rgba(0, 0, 0, 0.14)',
  36. 8: '0px 12px 17px rgba(0, 0, 0, 0.14)',
  37. 12: '0px 12px 17px rgba(0, 0, 0, 0.14)',
  38. 24: '0px 24px 38px rgba(0, 0, 0, 0.14)',
  39. key: '1px 1px rgba(0,0,0,1)',
  40. },
  41. space: {
  42. 0: '2px',
  43. 1: '3px',
  44. 2: '4px',
  45. 3: '8px',
  46. 4: '12px',
  47. 5: '16px',
  48. },
  49. fontSizes: {
  50. 0: '10px',
  51. 1: '12px',
  52. 2: '13px',
  53. 3: '16px',
  54. 4: '18px',
  55. },
  56. fonts: {
  57. ui: '"Recursive", system-ui, sans-serif',
  58. body: '"Recursive", system-ui, sans-serif',
  59. mono: '"Recursive Mono", monospace',
  60. },
  61. fontWeights: {},
  62. lineHeights: {},
  63. letterSpacings: {},
  64. sizes: {},
  65. borderWidths: {
  66. 0: '$1',
  67. },
  68. borderStyles: {},
  69. radii: {
  70. 0: '2px',
  71. 1: '4px',
  72. 2: '8px',
  73. },
  74. zIndices: {},
  75. transitions: {},
  76. },
  77. media: {
  78. micro: '(min-width: 0px)',
  79. sm: '(min-width: 640px)',
  80. md: '(min-width: 768px)',
  81. },
  82. utils: {
  83. zDash: () => (value: number) => {
  84. return {
  85. strokeDasharray: `calc(${value}px / var(--camera-zoom)) calc(${value}px / var(--camera-zoom))`,
  86. }
  87. },
  88. zStrokeWidth: () => (value: number | number[]) => {
  89. if (Array.isArray(value)) {
  90. return {
  91. strokeWidth: `calc(${value[0]}px / var(--camera-zoom))`,
  92. }
  93. }
  94. return {
  95. strokeWidth: `calc(${value}px / var(--camera-zoom))`,
  96. }
  97. },
  98. },
  99. })
  100. const light = createTheme({})
  101. const dark = createTheme({
  102. colors: {
  103. brushFill: 'rgba(180, 180, 180, .05)',
  104. brushStroke: 'rgba(180, 180, 180, .25)',
  105. hint: 'rgba(216, 226, 249, 1.000)',
  106. selected: 'rgba(38, 150, 255, 1.000)',
  107. bounds: 'rgba(38, 150, 255, 1.000)',
  108. boundsBg: 'rgba(38, 150, 255, 0.05)',
  109. highlight: 'rgba(38, 150, 255, 0.15)',
  110. overlay: 'rgba(0, 0, 0, 0.15)',
  111. overlayContrast: 'rgba(255, 255, 255, 0.15)',
  112. border: '#202529',
  113. canvas: '#343d45',
  114. panel: '#49555f',
  115. inactive: '#aaaaad',
  116. hover: '#343d45',
  117. text: '#f8f9fa',
  118. muted: '#e0e2e6',
  119. input: '#f3f3f3',
  120. inputBorder: '#ddd',
  121. tooltip: '#1d1d1d',
  122. tooltipContrast: '#ffffff',
  123. codeHl: 'rgba(144, 144, 144, .15)',
  124. lineError: 'rgba(255, 0, 0, .1)',
  125. },
  126. shadows: {
  127. 2: '0px 1px 1px rgba(0, 0, 0, 0.24)',
  128. 3: '0px 2px 3px rgba(0, 0, 0, 0.24)',
  129. 4: '0px 4px 5px -1px rgba(0, 0, 0, 0.24)',
  130. 8: '0px 12px 17px rgba(0, 0, 0, 0.24)',
  131. 12: '0px 12px 17px rgba(0, 0, 0, 0.24)',
  132. 24: '0px 24px 38px rgba(0, 0, 0, 0.24)',
  133. },
  134. })
  135. const globalStyles = globalCss({
  136. '*': { boxSizing: 'border-box' },
  137. })
  138. export { styled, getCssText, globalStyles, light, dark }