@tamagui/web 1.39.6 → 1.39.8

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 (72) hide show
  1. package/dist/cjs/createComponent.js +43 -105
  2. package/dist/cjs/createComponent.js.map +2 -2
  3. package/dist/cjs/helpers/getThemeCSSRules.js +1 -1
  4. package/dist/cjs/helpers/getThemeCSSRules.js.map +1 -1
  5. package/dist/cjs/helpers/mergeVariants.js +69 -0
  6. package/dist/cjs/helpers/mergeVariants.js.map +6 -0
  7. package/dist/cjs/helpers/parseStaticConfig.js +40 -0
  8. package/dist/cjs/helpers/parseStaticConfig.js.map +6 -0
  9. package/dist/cjs/helpers/styledToStaticConfig.js +2 -0
  10. package/dist/cjs/helpers/styledToStaticConfig.js.map +6 -0
  11. package/dist/cjs/index.js +0 -2
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/styled.js +13 -4
  14. package/dist/cjs/styled.js.map +1 -1
  15. package/dist/cjs/views/Stack.js +3 -1
  16. package/dist/cjs/views/Stack.js.map +1 -1
  17. package/dist/cjs/views/Text.js.map +1 -1
  18. package/dist/cjs/views/Theme.js +3 -2
  19. package/dist/cjs/views/Theme.js.map +1 -1
  20. package/dist/cjs/views/View.js +3 -1
  21. package/dist/cjs/views/View.js.map +1 -1
  22. package/dist/esm/createComponent.js +44 -106
  23. package/dist/esm/createComponent.js.map +2 -2
  24. package/dist/esm/helpers/getThemeCSSRules.js +1 -1
  25. package/dist/esm/helpers/getThemeCSSRules.js.map +1 -1
  26. package/dist/esm/helpers/mergeVariants.js +45 -0
  27. package/dist/esm/helpers/mergeVariants.js.map +6 -0
  28. package/dist/esm/helpers/parseStaticConfig.js +16 -0
  29. package/dist/esm/helpers/parseStaticConfig.js.map +6 -0
  30. package/dist/esm/helpers/styledToStaticConfig.js +1 -0
  31. package/dist/esm/helpers/styledToStaticConfig.js.map +6 -0
  32. package/dist/esm/index.js +0 -2
  33. package/dist/esm/index.js.map +1 -1
  34. package/dist/esm/styled.js +13 -4
  35. package/dist/esm/styled.js.map +1 -1
  36. package/dist/esm/views/Stack.js +3 -1
  37. package/dist/esm/views/Stack.js.map +1 -1
  38. package/dist/esm/views/Text.js.map +1 -1
  39. package/dist/esm/views/Theme.js +4 -3
  40. package/dist/esm/views/Theme.js.map +1 -1
  41. package/dist/esm/views/View.js +3 -1
  42. package/dist/esm/views/View.js.map +1 -1
  43. package/package.json +9 -9
  44. package/src/createComponent.tsx +41 -138
  45. package/src/helpers/getThemeCSSRules.ts +1 -1
  46. package/src/helpers/mergeVariants.ts +59 -0
  47. package/src/helpers/parseStaticConfig.ts +14 -0
  48. package/src/index.ts +0 -1
  49. package/src/styled.tsx +16 -7
  50. package/src/types.tsx +1 -3
  51. package/src/views/Stack.tsx +3 -0
  52. package/src/views/Text.tsx +1 -1
  53. package/src/views/Theme.tsx +6 -3
  54. package/src/views/View.tsx +3 -0
  55. package/types/createComponent.d.ts +2 -2
  56. package/types/createComponent.d.ts.map +1 -1
  57. package/types/helpers/extendStaticConfig.d.ts +2 -2
  58. package/types/helpers/mergeVariants.d.ts +3 -0
  59. package/types/helpers/mergeVariants.d.ts.map +1 -0
  60. package/types/helpers/parseStaticConfig.d.ts +3 -0
  61. package/types/helpers/parseStaticConfig.d.ts.map +1 -0
  62. package/types/helpers/styledToStaticConfig.d.ts +1 -0
  63. package/types/helpers/styledToStaticConfig.d.ts.map +1 -0
  64. package/types/index.d.ts +1 -1
  65. package/types/index.d.ts.map +1 -1
  66. package/types/styled.d.ts.map +1 -1
  67. package/types/types.d.ts +1 -1
  68. package/types/types.d.ts.map +1 -1
  69. package/types/views/Stack.d.ts.map +1 -1
  70. package/types/views/Theme.d.ts.map +1 -1
  71. package/types/views/View.d.ts.map +1 -1
  72. package/src/helpers/extendStaticConfig.ts +0 -93
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Text.tsx"],
4
- "mappings": "AAAA,SAAS,oB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AAA,EACL;AACF,CAAC;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { isWeb } from "@tamagui/constants";
3
- import { Children, cloneElement, isValidElement } from "react";
3
+ import { Children, cloneElement, isValidElement, useMemo } from "react";
4
4
  import { variableToString } from "../createVariable";
5
5
  import { ThemeManagerContext } from "../helpers/ThemeManagerContext";
6
6
  import { useServerRef } from "../hooks/useServerHooks";
@@ -31,8 +31,9 @@ function useThemedChildren(themeState, children, props, isRoot = false) {
31
31
  hasEverThemed.current = true;
32
32
  }
33
33
  const shouldRenderChildrenWithTheme = isNewTheme || hasEverThemed.current || forceClassName || isRoot;
34
+ const childrenMemo = useMemo(() => children, [children]);
34
35
  if (!shouldRenderChildrenWithTheme) {
35
- return children;
36
+ return childrenMemo;
36
37
  }
37
38
  if (shallow && themeManager) {
38
39
  let next = Children.toArray(children);
@@ -44,7 +45,7 @@ function useThemedChildren(themeState, children, props, isRoot = false) {
44
45
  ) : child;
45
46
  });
46
47
  }
47
- const elementsWithContext = /* @__PURE__ */ jsx(ThemeManagerContext.Provider, { value: themeManager, children });
48
+ const elementsWithContext = /* @__PURE__ */ jsx(ThemeManagerContext.Provider, { value: themeManager, children: childrenMemo });
48
49
  if (forceClassName === false) {
49
50
  return elementsWithContext;
50
51
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/Theme.tsx"],
4
- "mappings": "AA4BQ;AA5BR,SAAS,aAAa;AACtB,SAAgB,UAAU,cAAc,sBAAsB;AAE9D,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAA+B,4BAA4B;AAE3D,SAAS,kBAAkB;AAEpB,SAAS,MAAM,OAAmB;AAEvC,MAAI,MAAM,SAAS;AACjB,WAAO,MAAM;AAAA,EACf;AAEA,QAAM,SAAS,CAAC,CAAC,MAAM,SAAS;AAChC,QAAM,aAAa,qBAA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AW,aAAa;AAAA,MACtC,OAAO;AAAA,MAEN;AAAA;AAAA,EACH;AAGF,MAAI,aAAa;AACf,qBACE,oBAAC,UAAK,WAAW,KAAK,6CACnB,0BACH;AAAA,EAEJ;AAEA,SAAO;AACT;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,8 @@
1
+ import { validStyles } from "@tamagui/helpers";
1
2
  import { createComponent } from "../createComponent";
2
3
  const View = createComponent({
3
- acceptsClassName: true
4
+ acceptsClassName: true,
5
+ validStyles
4
6
  });
5
7
  export {
6
8
  View
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/views/View.tsx"],
4
- "mappings": "AAAA,SAAS,uBAAuB;AAGzB,MAAM,OAAO,gBAA4D;AAAA,EAC9E,kBAAkB;AACpB,CAAC;",
4
+ "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,uBAAuB;AAGzB,MAAM,OAAO,gBAA4D;AAAA,EAC9E,kBAAkB;AAAA,EAClB;AACF,CAAC;",
5
5
  "names": []
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/web",
3
- "version": "1.39.6",
3
+ "version": "1.39.8",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,19 +27,19 @@
27
27
  "reset.css"
28
28
  ],
29
29
  "dependencies": {
30
- "@tamagui/compose-refs": "1.39.6",
31
- "@tamagui/constants": "1.39.6",
32
- "@tamagui/helpers": "1.39.6",
33
- "@tamagui/normalize-css-color": "1.39.6",
34
- "@tamagui/use-did-finish-ssr": "1.39.6",
35
- "@tamagui/use-event": "1.39.6",
36
- "@tamagui/use-force-update": "1.39.6"
30
+ "@tamagui/compose-refs": "1.39.8",
31
+ "@tamagui/constants": "1.39.8",
32
+ "@tamagui/helpers": "1.39.8",
33
+ "@tamagui/normalize-css-color": "1.39.8",
34
+ "@tamagui/use-did-finish-ssr": "1.39.8",
35
+ "@tamagui/use-event": "1.39.8",
36
+ "@tamagui/use-force-update": "1.39.8"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.39.6",
42
+ "@tamagui/build": "1.39.8",
43
43
  "@testing-library/react": "^13.4.0",
44
44
  "csstype": "^3.0.10",
45
45
  "react": "^18.2.0",
@@ -6,7 +6,7 @@ import {
6
6
  isWeb,
7
7
  useIsomorphicLayoutEffect,
8
8
  } from '@tamagui/constants'
9
- import { stylePropsView, validStyles } from '@tamagui/helpers'
9
+ import { validStyles } from '@tamagui/helpers'
10
10
  import React, {
11
11
  Children,
12
12
  Fragment,
@@ -25,9 +25,9 @@ import { stackDefaultStyles } from './constants/constants'
25
25
  import { FontLanguageContext } from './contexts/FontLanguageContext'
26
26
  import { TextAncestorContext } from './contexts/TextAncestorContext'
27
27
  import { didGetVariableValue, setDidGetVariableValue } from './createVariable'
28
- import { extendStaticConfig, parseStaticConfig } from './helpers/extendStaticConfig'
29
28
  import { useSplitStyles } from './helpers/getSplitStyles'
30
29
  import { mergeProps } from './helpers/mergeProps'
30
+ import { parseStaticConfig } from './helpers/parseStaticConfig'
31
31
  import { proxyThemeVariables } from './helpers/proxyThemeVariables'
32
32
  import { themeable } from './helpers/themeable'
33
33
  import { useShallowSetState } from './helpers/useShallowSetState'
@@ -43,7 +43,6 @@ import {
43
43
  SpacerProps,
44
44
  StaticConfig,
45
45
  StaticConfigParsed,
46
- StylableComponent,
47
46
  TamaguiComponent,
48
47
  TamaguiComponentEvents,
49
48
  TamaguiComponentState,
@@ -121,19 +120,26 @@ export function createComponent<
121
120
  ComponentPropTypes extends Object = {},
122
121
  Ref = TamaguiElement,
123
122
  BaseProps = never
124
- >(
125
- staticConfigIn: Partial<StaticConfig> | StaticConfigParsed,
126
- ParentComponent?: StylableComponent
127
- ) {
128
- const staticConfig = (() => {
129
- const next = extendStaticConfig(staticConfigIn, ParentComponent)
130
-
131
- if ('parsed' in next) {
132
- return next
133
- } else {
134
- return parseStaticConfig(next)
123
+ >(staticConfigIn: Partial<StaticConfig> | StaticConfigParsed) {
124
+ const staticConfig = parseStaticConfig(staticConfigIn)
125
+
126
+ onConfiguredOnce((conf) => {
127
+ // one time only setup
128
+ if (!tamaguiConfig) {
129
+ tamaguiConfig = conf
130
+
131
+ if (!initialTheme) {
132
+ const next = conf.themes[Object.keys(conf.themes)[0]]
133
+ initialTheme = proxyThemeVariables(next)
134
+ if (process.env.NODE_ENV === 'development') {
135
+ if (!initialTheme) {
136
+ // rome-ignore lint/nursery/noConsoleLog: <explanation>
137
+ console.log('Warning: Missing theme')
138
+ }
139
+ }
140
+ }
135
141
  }
136
- })()
142
+ })
137
143
 
138
144
  const {
139
145
  Component,
@@ -145,10 +151,19 @@ export function createComponent<
145
151
  } = staticConfig
146
152
 
147
153
  const defaultComponentClassName = `is_${staticConfig.componentName}`
148
- let defaultProps: any
149
- let defaultTag: string | undefined
154
+ const defaultProps = staticConfig.defaultProps
155
+
156
+ if (process.env.NODE_ENV === 'development' && staticConfigIn.defaultProps?.['debug']) {
157
+ if (process.env.IS_STATIC !== 'is_static') {
158
+ // rome-ignore lint/nursery/noConsoleLog: <explanation>
159
+ console.log(`🐛 [${staticConfig.componentName || 'Component'}]`, {
160
+ staticConfig,
161
+ defaultProps,
162
+ defaultPropsKeyOrder: Object.keys(defaultProps),
163
+ })
164
+ }
165
+ }
150
166
 
151
- // see onConfiguredOnce below which attaches a name then to this component
152
167
  const component = forwardRef<Ref, ComponentPropTypes>((propsIn: any, forwardedRef) => {
153
168
  if (process.env.TAMAGUI_TARGET === 'native') {
154
169
  // todo this could be moved to a cleaner location
@@ -302,11 +317,7 @@ export function createComponent<
302
317
 
303
318
  const isTaggable = !Component || typeof Component === 'string'
304
319
  // default to tag, fallback to component (when both strings)
305
- const element = isWeb
306
- ? isTaggable
307
- ? props.tag || defaultTag || Component
308
- : Component
309
- : Component
320
+ const element = isWeb ? (isTaggable ? props.tag || Component : Component) : Component
310
321
 
311
322
  const BaseTextComponent = BaseText || element || 'span'
312
323
  const BaseViewComponent = BaseView || element || (hasTextAncestor ? 'span' : 'div')
@@ -927,93 +938,22 @@ export function createComponent<
927
938
  component.displayName = staticConfig.componentName
928
939
  }
929
940
 
930
- onConfiguredOnce((conf) => {
931
- // one time only setup
932
- if (!tamaguiConfig) {
933
- tamaguiConfig = conf
934
-
935
- if (!initialTheme) {
936
- const next = conf.themes[Object.keys(conf.themes)[0]]
937
- initialTheme = proxyThemeVariables(next)
938
- if (process.env.NODE_ENV === 'development') {
939
- if (!initialTheme) {
940
- // rome-ignore lint/nursery/noConsoleLog: <explanation>
941
- console.log('Warning: Missing theme')
942
- }
943
- }
944
- }
945
- }
946
-
947
- // HOC doesn't use defaultProps those already come in below
948
- let defaultPropsIn = staticConfig.defaultProps || {}
949
-
950
- // because we run createTamagui after styled() defs, have to do some work here
951
- // gather defaults props one time and merge downwards
952
- // find last unprocessed and process
953
- const parentNames = [...(staticConfig.parentNames || []), staticConfig.componentName]
954
-
955
- if (tamaguiConfig.defaultProps && parentNames && staticConfig.componentName) {
956
- defaultPropsIn = mergeConfigDefaultProps(
957
- staticConfig.componentName,
958
- defaultPropsIn,
959
- tamaguiConfig.defaultProps,
960
- parentNames,
961
- tamaguiConfig
962
- )
963
- }
964
-
965
- const debug = defaultPropsIn['debug']
966
-
967
- if (defaultPropsIn.tag) {
968
- defaultTag = defaultPropsIn.tag
969
- }
970
-
971
- const { name, variants, defaultVariants, ...restProps } = defaultPropsIn
972
-
973
- defaultProps = restProps
974
-
975
- if (staticConfig.isText && !defaultProps.fontFamily && conf.defaultFont) {
976
- defaultProps.fontFamily = `$${conf.defaultFont}`
977
- }
978
-
979
- // add debug logs
980
- if (process.env.NODE_ENV === 'development' && debug) {
981
- if (process.env.IS_STATIC !== 'is_static') {
982
- // rome-ignore lint/nursery/noConsoleLog: <explanation>
983
- console.log(`🐛 [${staticConfig.componentName || 'Component'}]`, {
984
- staticConfig,
985
- defaultPropsIn,
986
- defaultProps,
987
- defaultPropsKeyOrder: Object.keys(defaultProps),
988
- defaultTag,
989
- })
990
- }
991
- }
992
- })
993
-
994
941
  type ComponentType = TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>
995
942
 
996
943
  let res: ComponentType = component as any
997
944
 
998
- if (staticConfigIn.memo) {
945
+ if (staticConfig.memo) {
999
946
  res = memo(res) as any
1000
947
  }
1001
948
 
1002
- // is this necessary?
1003
- res.staticConfig = {
1004
- validStyles: staticConfig.validStyles || stylePropsView,
1005
- ...staticConfig,
1006
- }
949
+ res.staticConfig = staticConfig
1007
950
 
1008
951
  function extendStyledConfig() {
1009
- return extendStaticConfig(
1010
- {
1011
- ...staticConfig,
1012
- neverFlatten: true,
1013
- isHOC: true,
1014
- },
1015
- res
1016
- )
952
+ return {
953
+ ...staticConfig,
954
+ neverFlatten: true,
955
+ isHOC: true,
956
+ }
1017
957
  }
1018
958
 
1019
959
  function extractable(Component: any) {
@@ -1228,43 +1168,6 @@ function isUnspaced(child: React.ReactNode) {
1228
1168
 
1229
1169
  const DefaultProps = new Map()
1230
1170
 
1231
- function mergeConfigDefaultProps(
1232
- name: string,
1233
- props: Record<string, any>,
1234
- configDefaults: Record<string, Object>,
1235
- parentNames: (string | undefined)[],
1236
- conf: TamaguiInternalConfig
1237
- ) {
1238
- const len = parentNames.length
1239
- let prev
1240
-
1241
- for (let i = 0; i < len; i++) {
1242
- const n = parentNames[i]
1243
- if (!n) continue
1244
- if (DefaultProps.has(n)) {
1245
- prev = DefaultProps.get(n)
1246
- continue
1247
- }
1248
- const props = configDefaults[n]
1249
- if (!props) {
1250
- if (prev) {
1251
- DefaultProps.set(n, prev)
1252
- }
1253
- continue
1254
- }
1255
- prev = mergeProps(prev || {}, props, false, conf.inverseShorthands)[0]
1256
- DefaultProps.set(n, prev)
1257
- }
1258
-
1259
- // overwrite the user defined defaults on top of internal defined defaults
1260
- const ourDefaultsMerged = DefaultProps.get(name)
1261
- if (ourDefaultsMerged) {
1262
- return mergeProps(props, ourDefaultsMerged, false, conf.inverseShorthands)[0]
1263
- }
1264
-
1265
- return props
1266
- }
1267
-
1268
1171
  const AbsoluteFill: any = createComponent({
1269
1172
  defaultProps: {
1270
1173
  ...stackDefaultStyles,
@@ -104,7 +104,7 @@ export function getThemeCSSRules({
104
104
  }
105
105
  }
106
106
 
107
- const selectors = [...selectorsSet]
107
+ const selectors = [...selectorsSet].sort((a, b) => a.localeCompare(b))
108
108
 
109
109
  // only do our :root attach if it's not light/dark - not support sub themes on root saves a lot of effort/size
110
110
  // this isBaseTheme logic could probably be done more efficiently above
@@ -0,0 +1,59 @@
1
+ import type { GenericVariantDefinitions } from '../types'
2
+
3
+ // deep merge variants
4
+ // except for functions which override any parents
5
+
6
+ export const mergeVariants = (
7
+ parentVariants: GenericVariantDefinitions,
8
+ ourVariants: GenericVariantDefinitions
9
+ ) => {
10
+ const variants = {}
11
+
12
+ for (const key in ourVariants) {
13
+ const parentVariant = parentVariants?.[key]
14
+ const ourVariant = ourVariants[key]
15
+
16
+ // do some early checks to avoid bad merges
17
+ if (!parentVariant || typeof ourVariant === 'function') {
18
+ variants[key] = ourVariant
19
+ continue
20
+ }
21
+
22
+ // do some early checks to avoid bad merges
23
+ if (parentVariant && !ourVariant) {
24
+ variants[key] = parentVariant[key]
25
+ continue
26
+ }
27
+
28
+ variants[key] = {}
29
+
30
+ for (const subKey in ourVariant) {
31
+ const val = ourVariant[subKey]
32
+ const parentVal = parentVariant?.[subKey]
33
+ if (typeof val === 'function') {
34
+ variants[key][subKey] = val
35
+ } else if (!parentVal || typeof parentVal === 'function') {
36
+ variants[key][subKey] = val
37
+ } else {
38
+ variants[key][subKey] = {
39
+ // keep order
40
+ ...parentVal,
41
+ ...val,
42
+ }
43
+ }
44
+ }
45
+
46
+ // merge parent variant keys that are superset
47
+ if (parentVariant) {
48
+ variants[key] = {
49
+ ...parentVariant,
50
+ ...variants[key],
51
+ }
52
+ }
53
+ }
54
+
55
+ return {
56
+ ...parentVariants,
57
+ ...variants,
58
+ }
59
+ }
@@ -0,0 +1,14 @@
1
+ import type { StaticConfig, StaticConfigParsed } from '../types'
2
+ import { createPropMapper } from './createPropMapper'
3
+
4
+ export const parseStaticConfig = (config: Partial<StaticConfig>): StaticConfigParsed => {
5
+ const parsed = {
6
+ defaultProps: {},
7
+ ...config,
8
+ parsed: true,
9
+ } as const
10
+ return {
11
+ ...parsed,
12
+ propMapper: createPropMapper(parsed as StaticConfigParsed),
13
+ }
14
+ }
package/src/index.ts CHANGED
@@ -16,7 +16,6 @@ export {
16
16
  getConfig,
17
17
  getThemes,
18
18
  getTokens,
19
- onConfiguredOnce,
20
19
  updateConfig,
21
20
  getToken,
22
21
  getTokenValue,
package/src/styled.tsx CHANGED
@@ -2,7 +2,7 @@ import { stylePropsAll } from '@tamagui/helpers'
2
2
 
3
3
  import { createComponent } from './createComponent'
4
4
  import { StyledContext } from './helpers/createStyledContext'
5
- import { mergeVariants } from './helpers/extendStaticConfig'
5
+ import { mergeVariants } from './helpers/mergeVariants'
6
6
  import { getReactNativeConfig } from './setupReactNative'
7
7
  import type {
8
8
  GetProps,
@@ -13,7 +13,6 @@ import type {
13
13
  StaticConfig,
14
14
  StylableComponent,
15
15
  TamaguiComponent,
16
- TamaguiElement,
17
16
  VariantDefinitions,
18
17
  VariantSpreadFunction,
19
18
  } from './types'
@@ -74,8 +73,7 @@ export function styled<
74
73
  }
75
74
  }
76
75
 
77
- const parentStaticConfig =
78
- 'staticConfig' in ComponentIn ? (ComponentIn.staticConfig as StaticConfig) : null
76
+ const parentStaticConfig = ComponentIn['staticConfig'] as StaticConfig | undefined
79
77
 
80
78
  const isPlainStyledComponent =
81
79
  !!parentStaticConfig &&
@@ -113,6 +111,10 @@ export function styled<
113
111
  ...defaultVariants,
114
112
  }
115
113
  }
114
+
115
+ if (parentStaticConfig.variants) {
116
+ variants = mergeVariants(parentStaticConfig.variants, variants)
117
+ }
116
118
  }
117
119
 
118
120
  if (defaultVariants) {
@@ -123,8 +125,6 @@ export function styled<
123
125
  }
124
126
 
125
127
  if (parentStaticConfig?.isHOC) {
126
- variants = mergeVariants(parentStaticConfig.variants, variants)
127
-
128
128
  // if HOC we map name => componentName as we have a difference in how we name prop vs styled() there
129
129
  if (name) {
130
130
  // @ts-ignore
@@ -135,13 +135,22 @@ export function styled<
135
135
  const isText = Boolean(
136
136
  staticExtractionOptions?.isText || parentStaticConfig?.isText
137
137
  )
138
+
138
139
  const acceptsClassName =
139
140
  acceptsClassNameProp ??
140
141
  (isPlainStyledComponent ||
141
142
  isReactNative ||
142
143
  (parentStaticConfig?.isHOC && parentStaticConfig?.acceptsClassName))
143
144
 
145
+ if (process.env.NODE_ENV === 'development') {
146
+ // dont inherit the debug prop so we can debug specific styled() more accurately
147
+ if (parentStaticConfig?.defaultProps?.debug && !options.debug) {
148
+ delete defaultProps.debug
149
+ }
150
+ }
151
+
144
152
  const conf: Partial<StaticConfig> = {
153
+ ...parentStaticConfig,
145
154
  ...staticExtractionOptions,
146
155
  ...(!isPlainStyledComponent && {
147
156
  Component,
@@ -169,7 +178,7 @@ export function styled<
169
178
  }
170
179
  })()
171
180
 
172
- const component = createComponent(staticConfigProps || {}, Component)
181
+ const component = createComponent(staticConfigProps || {})
173
182
 
174
183
  // get parent props without pseudos and medias so we can rebuild both with new variants
175
184
  // get parent props without pseudos and medias so we can rebuild both with new variants
package/src/types.tsx CHANGED
@@ -28,9 +28,7 @@ import type {
28
28
  import type { Variable } from './createVariable'
29
29
  import type { ResolveVariableTypes } from './helpers/createPropMapper'
30
30
  import { StyledContext } from './helpers/createStyledContext'
31
- import { styled } from './styled'
32
31
  import type { FontLanguageProps, LanguageContextType } from './views/FontLanguage.types'
33
- import { Text } from './views/Text'
34
32
  import type { ThemeProviderProps } from './views/ThemeProvider'
35
33
 
36
34
  export type { MediaStyleObject, StyleObject } from '@tamagui/helpers'
@@ -2080,7 +2078,7 @@ type FillInFontValues<
2080
2078
  export type GetRef<C> = C extends TamaguiComponent<any, infer Ref>
2081
2079
  ? Ref
2082
2080
  : C extends new (props: any) => Component
2083
- ? C
2081
+ ? InstanceType<C>
2084
2082
  : C extends abstract new (...args: any) => any
2085
2083
  ? InstanceType<C>
2086
2084
  : C extends Component
@@ -1,3 +1,5 @@
1
+ import { validStyles } from '@tamagui/helpers'
2
+
1
3
  import { stackDefaultStyles } from '../constants/constants'
2
4
  import { createComponent } from '../createComponent'
3
5
  import type { StackProps, StackPropsBase, TamaguiElement } from '../types'
@@ -8,6 +10,7 @@ export const Stack = createComponent<StackProps, TamaguiElement, StackPropsBase>
8
10
  ...stackDefaultStyles,
9
11
  flexDirection: 'column',
10
12
  },
13
+ validStyles,
11
14
  })
12
15
 
13
16
  // test types
@@ -1,4 +1,4 @@
1
- import { stylePropsTextOnly, validStyles } from '@tamagui/helpers'
1
+ import { stylePropsText, stylePropsTextOnly, validStyles } from '@tamagui/helpers'
2
2
 
3
3
  import { createComponent } from '../createComponent'
4
4
  import { TamaguiTextElement, TextProps, TextPropsBase } from '../types'
@@ -1,8 +1,9 @@
1
1
  import { isWeb } from '@tamagui/constants'
2
- import React, { Children, cloneElement, isValidElement } from 'react'
2
+ import React, { Children, cloneElement, isValidElement, useMemo } from 'react'
3
3
 
4
4
  import { variableToString } from '../createVariable'
5
5
  import { ThemeManagerContext } from '../helpers/ThemeManagerContext'
6
+ import { useMemoDebug } from '../hooks/useMemoDebug'
6
7
  import { useServerRef } from '../hooks/useServerHooks'
7
8
  import { ChangedThemeResponse, useChangeThemeEffect } from '../hooks/useTheme'
8
9
  import type { DebugProp, ThemeProps } from '../types'
@@ -57,8 +58,10 @@ export function useThemedChildren(
57
58
  const shouldRenderChildrenWithTheme =
58
59
  isNewTheme || hasEverThemed.current || forceClassName || isRoot
59
60
 
61
+ const childrenMemo = useMemo(() => children, [children])
62
+
60
63
  if (!shouldRenderChildrenWithTheme) {
61
- return children
64
+ return childrenMemo
62
65
  }
63
66
 
64
67
  // be sure to memoize shouldReset to avoid reparenting
@@ -81,7 +84,7 @@ export function useThemedChildren(
81
84
 
82
85
  const elementsWithContext = (
83
86
  <ThemeManagerContext.Provider value={themeManager}>
84
- {children}
87
+ {childrenMemo}
85
88
  </ThemeManagerContext.Provider>
86
89
  )
87
90
 
@@ -1,6 +1,9 @@
1
+ import { validStyles } from '@tamagui/helpers'
2
+
1
3
  import { createComponent } from '../createComponent'
2
4
  import type { StackProps, StackPropsBase, TamaguiElement } from '../types'
3
5
 
4
6
  export const View = createComponent<StackProps, TamaguiElement, StackPropsBase>({
5
7
  acceptsClassName: true,
8
+ validStyles,
6
9
  })
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { DebugProp, SpaceDirection, SpaceValue, SpacerProps, StaticConfig, StaticConfigParsed, StylableComponent, TamaguiComponent, TamaguiComponentState, TamaguiElement } from './types';
2
+ import { DebugProp, SpaceDirection, SpaceValue, SpacerProps, StaticConfig, StaticConfigParsed, TamaguiComponent, TamaguiComponentState, TamaguiElement } from './types';
3
3
  export declare const defaultComponentState: TamaguiComponentState;
4
4
  export declare const mouseUps: Set<Function>;
5
- export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = TamaguiElement, BaseProps = never>(staticConfigIn: Partial<StaticConfig> | StaticConfigParsed, ParentComponent?: StylableComponent): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
5
+ export declare function createComponent<ComponentPropTypes extends Object = {}, Ref = TamaguiElement, BaseProps = never>(staticConfigIn: Partial<StaticConfig> | StaticConfigParsed): TamaguiComponent<ComponentPropTypes, Ref, BaseProps, {}>;
6
6
  export declare const Unspaced: {
7
7
  (props: {
8
8
  children?: any;
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AASA,OAAO,KAWN,MAAM,OAAO,CAAA;AAkBd,OAAO,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,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AA;AAqB3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,MAAM,GAAG,EAAE,EACtC,GAAG,GAAG,cAAc,EACpB,SAAS,GAAG,KAAK,EACjB,cAAc,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,kBAAkB,4DA21B3D;AAGD,eAAO,MAAM,QAAQ;YAAW;QAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE;;CAAmB,CAAA;AAMrE,eAAO,MAAM,MAAM,0DA8CjB,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,mBAkGxD"}
@@ -2,9 +2,9 @@ import type { GenericVariantDefinitions, StaticConfig, StaticConfigParsed, Styla
2
2
  export declare function extendStaticConfig(config: Partial<StaticConfig>, parent?: StylableComponent): StaticConfigParsed;
3
3
  export declare const mergeVariants: (parentVariants?: GenericVariantDefinitions, ourVariants?: GenericVariantDefinitions) => {
4
4
  [x: string]: {
5
- [key: string]: ((a: any, b: any) => any) | {
5
+ [key: string]: {
6
6
  [key: string]: any;
7
- };
7
+ } | ((a: any, b: any) => any);
8
8
  };
9
9
  };
10
10
  export declare const parseStaticConfig: (config: Partial<StaticConfig>) => StaticConfigParsed;
@@ -0,0 +1,3 @@
1
+ import type { GenericVariantDefinitions } from '../types';
2
+ export declare const mergeVariants: (parentVariants: GenericVariantDefinitions, ourVariants: GenericVariantDefinitions) => {};
3
+ //# sourceMappingURL=mergeVariants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeVariants.d.ts","sourceRoot":"","sources":["../../src/helpers/mergeVariants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAKzD,eAAO,MAAM,aAAa,mBACR,yBAAyB,eAC5B,yBAAyB,OAmDvC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { StaticConfig, StaticConfigParsed } from '../types';
2
+ export declare const parseStaticConfig: (config: Partial<StaticConfig>) => StaticConfigParsed;
3
+ //# sourceMappingURL=parseStaticConfig.d.ts.map