@tamagui/themes 1.52.2 → 1.52.4

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.
@@ -20,6 +20,17 @@ const colorThemeDefinition = (colorName: string) => [
20
20
  },
21
21
  ]
22
22
 
23
+ const nonInherited = {
24
+ light: {
25
+ ...lightColors,
26
+ ...shadows.light,
27
+ },
28
+ dark: {
29
+ ...darkColors,
30
+ ...shadows.dark,
31
+ },
32
+ }
33
+
23
34
  const themesBuilder = createThemeBuilder()
24
35
  .addPalettes(palettes)
25
36
  .addTemplates(templates)
@@ -28,18 +39,12 @@ const themesBuilder = createThemeBuilder()
28
39
  light: {
29
40
  template: 'base',
30
41
  palette: 'light',
31
- nonInheritedValues: {
32
- ...lightColors,
33
- ...shadows.light,
34
- },
42
+ nonInheritedValues: nonInherited.light,
35
43
  },
36
44
  dark: {
37
45
  template: 'base',
38
46
  palette: 'dark',
39
- nonInheritedValues: {
40
- ...darkColors,
41
- ...shadows.dark,
42
- },
47
+ nonInheritedValues: nonInherited.dark,
43
48
  },
44
49
  })
45
50
  .addChildThemes({
@@ -177,4 +182,13 @@ const themesBuilder = createThemeBuilder()
177
182
  }
178
183
  )
179
184
 
180
- export const themes = themesBuilder.build()
185
+ const themesIn = themesBuilder.build()
186
+
187
+ // stupid typescript too deep types fix :/
188
+ type ThemesIn = typeof themesIn
189
+ type ThemesOut = Omit<ThemesIn, 'light' | 'dark'> & {
190
+ light: ThemesIn['light'] & typeof nonInherited.light
191
+ dark: ThemesIn['dark'] & typeof nonInherited.dark
192
+ }
193
+
194
+ export const themes = themesIn as ThemesOut
package/src/v2.tsx CHANGED
@@ -1,8 +1,3 @@
1
- import * as themes from './generated-v2'
2
- export { themes }
3
-
4
- // export { themes } from './themes-new'
5
-
6
1
  export * from './tokens'
7
2
  export * from './masks'
8
3
  export * from './componentThemeDefinitions'