@tamagui/web 1.75.9 → 1.77.0
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.
- package/dist/cjs/createComponent.js +10 -17
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createComponent.native.js +10 -17
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.js +4 -1
- package/dist/cjs/createTamagui.js.map +1 -1
- package/dist/cjs/createTamagui.native.js +4 -1
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/helpers/createMediaStyle.js +1 -1
- package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
- package/dist/cjs/helpers/createMediaStyle.native.js +1 -1
- package/dist/cjs/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +20 -18
- package/dist/cjs/helpers/getSplitStyles.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +17 -15
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/log.js +28 -0
- package/dist/cjs/helpers/log.js.map +6 -0
- package/dist/cjs/helpers/log.native.js +29 -0
- package/dist/cjs/helpers/log.native.js.map +6 -0
- package/dist/cjs/hooks/useProps.js.map +1 -1
- package/dist/cjs/hooks/useProps.native.js.map +1 -1
- package/dist/cjs/hooks/useTheme.js +7 -0
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useTheme.native.js +7 -0
- package/dist/cjs/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/createComponent.js +10 -16
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createComponent.native.js +10 -16
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.js +4 -1
- package/dist/esm/createTamagui.js.map +1 -1
- package/dist/esm/createTamagui.native.js +4 -1
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.js +1 -1
- package/dist/esm/helpers/createMediaStyle.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.native.js +1 -1
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +20 -17
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +17 -14
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/log.js +8 -0
- package/dist/esm/helpers/log.js.map +6 -0
- package/dist/esm/helpers/log.native.js +8 -0
- package/dist/esm/helpers/log.native.js.map +6 -0
- package/dist/esm/hooks/useProps.js.map +1 -1
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.js +7 -0
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +7 -0
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/package.json +10 -10
- package/src/createComponent.tsx +16 -22
- package/src/createTamagui.ts +4 -1
- package/src/helpers/createMediaStyle.ts +3 -1
- package/src/helpers/getSplitStyles.tsx +25 -21
- package/src/helpers/log.ts +9 -0
- package/src/hooks/useProps.tsx +4 -4
- package/src/hooks/useTheme.tsx +11 -0
- package/src/types.tsx +15 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/helpers/createMediaStyle.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/log.d.ts +2 -0
- package/types/helpers/log.d.ts.map +1 -0
- package/types/hooks/useConfiguration.d.ts +1 -0
- package/types/hooks/useConfiguration.d.ts.map +1 -1
- package/types/hooks/useProps.d.ts +4 -4
- package/types/hooks/useProps.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/types.d.ts +6 -1
- package/types/types.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.77.0",
|
|
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.
|
|
31
|
-
"@tamagui/constants": "1.
|
|
32
|
-
"@tamagui/helpers": "1.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.
|
|
34
|
-
"@tamagui/timer": "1.
|
|
35
|
-
"@tamagui/use-did-finish-ssr": "1.
|
|
36
|
-
"@tamagui/use-force-update": "1.
|
|
30
|
+
"@tamagui/compose-refs": "1.77.0",
|
|
31
|
+
"@tamagui/constants": "1.77.0",
|
|
32
|
+
"@tamagui/helpers": "1.77.0",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.77.0",
|
|
34
|
+
"@tamagui/timer": "1.77.0",
|
|
35
|
+
"@tamagui/use-did-finish-ssr": "1.77.0",
|
|
36
|
+
"@tamagui/use-force-update": "1.77.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "1.
|
|
42
|
+
"@tamagui/build": "1.77.0",
|
|
43
43
|
"@testing-library/react": "^14.0.0",
|
|
44
44
|
"csstype": "^3.0.10",
|
|
45
45
|
"react": "^18.2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"repository": {
|
|
68
68
|
"type": "git",
|
|
69
69
|
"url": "https://github.com/tamagui/tamagui.git",
|
|
70
|
-
"directory": "packages/
|
|
70
|
+
"directory": "packages/web"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
package/src/createComponent.tsx
CHANGED
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
mergeIfNotShallowEqual,
|
|
32
32
|
} from './helpers/createShallowSetState'
|
|
33
33
|
import { useSplitStyles } from './helpers/getSplitStyles'
|
|
34
|
+
import { log } from './helpers/log'
|
|
34
35
|
import { mergeProps } from './helpers/mergeProps'
|
|
35
36
|
import { proxyThemeVariables } from './helpers/proxyThemeVariables'
|
|
36
37
|
import { themeable } from './helpers/themeable'
|
|
@@ -160,7 +161,7 @@ export function createComponent<
|
|
|
160
161
|
initialTheme = proxyThemeVariables(next)
|
|
161
162
|
if (process.env.NODE_ENV === 'development') {
|
|
162
163
|
if (!initialTheme) {
|
|
163
|
-
|
|
164
|
+
log('Warning: Missing theme')
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
}
|
|
@@ -181,7 +182,7 @@ export function createComponent<
|
|
|
181
182
|
|
|
182
183
|
if (process.env.NODE_ENV === 'development' && staticConfig.defaultProps?.['debug']) {
|
|
183
184
|
if (process.env.IS_STATIC !== 'is_static') {
|
|
184
|
-
|
|
185
|
+
log(`🐛 [${staticConfig.componentName || 'Component'}]`, {
|
|
185
186
|
staticConfig,
|
|
186
187
|
defaultProps,
|
|
187
188
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : [],
|
|
@@ -545,7 +546,7 @@ export function createComponent<
|
|
|
545
546
|
}${state.focus ? 'FOCUSED' : ' '}`
|
|
546
547
|
)
|
|
547
548
|
|
|
548
|
-
|
|
549
|
+
log({
|
|
549
550
|
propsIn,
|
|
550
551
|
props,
|
|
551
552
|
state,
|
|
@@ -649,19 +650,12 @@ export function createComponent<
|
|
|
649
650
|
if (debugProp && debugProp !== 'profile') {
|
|
650
651
|
console.groupCollapsed('>>>')
|
|
651
652
|
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
props,
|
|
657
|
-
'in order',
|
|
658
|
-
Object.keys(props)
|
|
659
|
-
)
|
|
660
|
-
console.info('splitStyles', splitStyles)
|
|
661
|
-
console.info('media', { shouldListenForMedia, isMediaArray, mediaListeningKeys })
|
|
662
|
-
console.info('className', Object.values(splitStyles.classNames))
|
|
653
|
+
log('props in', propsIn, 'mapped to', props, 'in order', Object.keys(props))
|
|
654
|
+
log('splitStyles', splitStyles)
|
|
655
|
+
log('media', { shouldListenForMedia, isMediaArray, mediaListeningKeys })
|
|
656
|
+
log('className', Object.values(splitStyles.classNames))
|
|
663
657
|
if (isClient) {
|
|
664
|
-
|
|
658
|
+
log('ref', hostRef, '(click to view)')
|
|
665
659
|
}
|
|
666
660
|
console.groupEnd()
|
|
667
661
|
if (debugProp === 'break') {
|
|
@@ -1091,7 +1085,7 @@ export function createComponent<
|
|
|
1091
1085
|
if (process.env.NODE_ENV === 'development' && time) time`events`
|
|
1092
1086
|
|
|
1093
1087
|
if (process.env.NODE_ENV === 'development' && debugProp === 'verbose') {
|
|
1094
|
-
|
|
1088
|
+
log(`events`, { events, isHoverable, attachPress })
|
|
1095
1089
|
}
|
|
1096
1090
|
|
|
1097
1091
|
// EVENTS native
|
|
@@ -1244,14 +1238,14 @@ export function createComponent<
|
|
|
1244
1238
|
const element = typeof elementType === 'string' ? elementType : 'Component'
|
|
1245
1239
|
console.groupCollapsed(`render <${element} /> with props`)
|
|
1246
1240
|
try {
|
|
1247
|
-
|
|
1248
|
-
|
|
1241
|
+
log('viewProps', viewProps)
|
|
1242
|
+
log('viewPropsOrder', Object.keys(viewProps))
|
|
1249
1243
|
for (const key in viewProps) {
|
|
1250
|
-
|
|
1244
|
+
log(' - ', key, viewProps[key])
|
|
1251
1245
|
}
|
|
1252
|
-
|
|
1246
|
+
log('children', content)
|
|
1253
1247
|
if (typeof window !== 'undefined') {
|
|
1254
|
-
|
|
1248
|
+
log({
|
|
1255
1249
|
viewProps,
|
|
1256
1250
|
state,
|
|
1257
1251
|
styleProps,
|
|
@@ -1540,7 +1534,7 @@ export function spacedChildren(props: SpacedChildrenProps) {
|
|
|
1540
1534
|
|
|
1541
1535
|
if (process.env.NODE_ENV === 'development') {
|
|
1542
1536
|
if (props.debug) {
|
|
1543
|
-
|
|
1537
|
+
log(` Spaced children`, final, props)
|
|
1544
1538
|
}
|
|
1545
1539
|
}
|
|
1546
1540
|
|
package/src/createTamagui.ts
CHANGED
|
@@ -256,12 +256,15 @@ ${runtimeStyles}`
|
|
|
256
256
|
|
|
257
257
|
const config: TamaguiInternalConfig = {
|
|
258
258
|
fonts: {},
|
|
259
|
-
settings: {},
|
|
260
259
|
onlyAllowShorthands: false,
|
|
261
260
|
fontLanguages: [],
|
|
262
261
|
animations: {} as any,
|
|
263
262
|
media: {},
|
|
264
263
|
...configIn,
|
|
264
|
+
settings: {
|
|
265
|
+
webContainerType: 'size',
|
|
266
|
+
...configIn.settings,
|
|
267
|
+
},
|
|
265
268
|
tokens: tokens as any,
|
|
266
269
|
// vite made this into a function if it wasn't set
|
|
267
270
|
shorthands,
|
|
@@ -118,7 +118,9 @@ export const createMediaStyle = (
|
|
|
118
118
|
|
|
119
119
|
// add @supports for legacy browser support to not break container queries
|
|
120
120
|
if (groupMediaKey) {
|
|
121
|
-
styleRule = `@supports (contain:
|
|
121
|
+
styleRule = `@supports (contain: ${
|
|
122
|
+
conf.settings.webContainerType || 'inline-size'
|
|
123
|
+
}) {${styleRule}}`
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -69,6 +69,7 @@ import {
|
|
|
69
69
|
shouldInsertStyleRules,
|
|
70
70
|
updateRules,
|
|
71
71
|
} from './insertStyleRule'
|
|
72
|
+
import { log } from './log'
|
|
72
73
|
import {
|
|
73
74
|
normalizeValueWithProperty,
|
|
74
75
|
reverseMapClassNameToValue,
|
|
@@ -209,8 +210,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
209
210
|
isClient
|
|
210
211
|
) {
|
|
211
212
|
console.groupCollapsed('getSplitStyles (collapsed)')
|
|
212
|
-
|
|
213
|
-
console.info({
|
|
213
|
+
log({
|
|
214
214
|
props,
|
|
215
215
|
staticConfig,
|
|
216
216
|
shouldDoClasses,
|
|
@@ -274,11 +274,12 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
274
274
|
if (process.env.TAMAGUI_TARGET === 'web') {
|
|
275
275
|
// add container style
|
|
276
276
|
const identifier = `t_group_${valInit}`
|
|
277
|
+
const containerType = conf.settings.webContainerType || 'size'
|
|
277
278
|
const containerCSS = {
|
|
278
279
|
identifier,
|
|
279
280
|
property: 'container',
|
|
280
281
|
rules: [
|
|
281
|
-
`.${identifier} { container-name: ${valInit}; container-type:
|
|
282
|
+
`.${identifier} { container-name: ${valInit}; container-type: ${containerType}; }`,
|
|
282
283
|
],
|
|
283
284
|
}
|
|
284
285
|
addStyleToInsertRules(rulesToInsert, containerCSS)
|
|
@@ -296,7 +297,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
296
297
|
if (valInitType === 'string' && valInit[0] === '_') {
|
|
297
298
|
if (keyInit in validStyleProps || keyInit.includes('-')) {
|
|
298
299
|
if (process.env.NODE_ENV === 'development' && debug) {
|
|
299
|
-
|
|
300
|
+
log(`Adding compiled style ${keyInit}: ${valInit}`)
|
|
300
301
|
}
|
|
301
302
|
|
|
302
303
|
if (shouldDoClasses) {
|
|
@@ -498,7 +499,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
498
499
|
|
|
499
500
|
if (isValidClassName || isMediaOrPseudo) {
|
|
500
501
|
if (process.env.NODE_ENV === 'development' && debug) {
|
|
501
|
-
|
|
502
|
+
log('tamagui classname prop', keyInit, valInit)
|
|
502
503
|
}
|
|
503
504
|
|
|
504
505
|
if (shouldDoClasses) {
|
|
@@ -569,9 +570,9 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
569
570
|
shouldPassThrough ? '(pass)' : ''
|
|
570
571
|
} 🔹🔹🔹🔹`
|
|
571
572
|
)
|
|
572
|
-
|
|
573
|
+
log({ isVariant, valInit, shouldPassProp })
|
|
573
574
|
if (isClient) {
|
|
574
|
-
|
|
575
|
+
log({
|
|
575
576
|
variants,
|
|
576
577
|
variant: variants?.[keyInit],
|
|
577
578
|
isVariant,
|
|
@@ -655,7 +656,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
655
656
|
console.groupCollapsed(' 💠 expanded', keyInit, valInit)
|
|
656
657
|
try {
|
|
657
658
|
if (!isServer && isDevTools) {
|
|
658
|
-
|
|
659
|
+
log({
|
|
659
660
|
expanded,
|
|
660
661
|
styleProps,
|
|
661
662
|
componentState,
|
|
@@ -667,7 +668,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
667
668
|
usedKeys: { ...usedKeys },
|
|
668
669
|
curProps: { ...styleState.curProps },
|
|
669
670
|
})
|
|
670
|
-
|
|
671
|
+
log('expanded', expanded, '\nusedKeys', { ...usedKeys }, '\ncurrent', {
|
|
671
672
|
...style,
|
|
672
673
|
})
|
|
673
674
|
}
|
|
@@ -702,7 +703,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
702
703
|
passDownProp(viewProps, key, val, isMediaOrPseudo)
|
|
703
704
|
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
704
705
|
console.groupCollapsed(` - passing down prop ${key}`)
|
|
705
|
-
|
|
706
|
+
log({ val, after: { ...viewProps[key] } })
|
|
706
707
|
console.groupEnd()
|
|
707
708
|
}
|
|
708
709
|
continue
|
|
@@ -761,7 +762,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
761
762
|
// prettier-ignore
|
|
762
763
|
console.groupCollapsed("pseudo (classes)", key);
|
|
763
764
|
|
|
764
|
-
|
|
765
|
+
log({ pseudoStyleObject, pseudoStyles })
|
|
765
766
|
console.groupEnd()
|
|
766
767
|
}
|
|
767
768
|
|
|
@@ -800,7 +801,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
800
801
|
// prettier-ignore
|
|
801
802
|
console.groupCollapsed("pseudo", key, { isDisabled });
|
|
802
803
|
|
|
803
|
-
|
|
804
|
+
log(pseudoStyleObject, {
|
|
804
805
|
isDisabled,
|
|
805
806
|
descriptorKey,
|
|
806
807
|
descriptor,
|
|
@@ -833,7 +834,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
833
834
|
}
|
|
834
835
|
|
|
835
836
|
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
836
|
-
|
|
837
|
+
log(' subKey', pkey, shouldMerge, {
|
|
837
838
|
importance,
|
|
838
839
|
curImportance,
|
|
839
840
|
pkey,
|
|
@@ -888,7 +889,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
888
889
|
const mediaKeyShort = key.slice(1)
|
|
889
890
|
|
|
890
891
|
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
891
|
-
|
|
892
|
+
log(` 📺 ${key}`, {
|
|
892
893
|
key,
|
|
893
894
|
val,
|
|
894
895
|
mediaStyle,
|
|
@@ -923,7 +924,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
923
924
|
space = val['space']
|
|
924
925
|
usedKeys['space'] = importance
|
|
925
926
|
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
926
|
-
|
|
927
|
+
log(
|
|
927
928
|
`Found more important space for current media ${mediaKeyShort}: ${val} (importance: ${importance})`
|
|
928
929
|
)
|
|
929
930
|
}
|
|
@@ -944,6 +945,9 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
944
945
|
false,
|
|
945
946
|
priority
|
|
946
947
|
)
|
|
948
|
+
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
949
|
+
log(`📺 media style:`, out)
|
|
950
|
+
}
|
|
947
951
|
const fullKey = `${style.property}${PROP_SPLIT}${mediaKeyShort}`
|
|
948
952
|
if (fullKey in usedKeys) continue
|
|
949
953
|
addStyleToInsertRules(rulesToInsert, out as any)
|
|
@@ -1063,9 +1067,9 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1063
1067
|
if (process.env.NODE_ENV === 'development' && debug === 'verbose') {
|
|
1064
1068
|
console.groupCollapsed(` ✔️ expand complete`, keyInit)
|
|
1065
1069
|
try {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1070
|
+
log('style', { ...style })
|
|
1071
|
+
log('transforms', { ...transforms })
|
|
1072
|
+
log('viewProps', { ...viewProps })
|
|
1069
1073
|
} catch {
|
|
1070
1074
|
// RN can run into PayloadTooLargeError: request entity too large
|
|
1071
1075
|
}
|
|
@@ -1089,7 +1093,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1089
1093
|
if (!avoidNormalize) {
|
|
1090
1094
|
fixStyles(style)
|
|
1091
1095
|
|
|
1092
|
-
//
|
|
1096
|
+
// shouldn't this be better? but breaks some tests weirdly, need to check
|
|
1093
1097
|
// if (isWeb && !staticConfig.isReactNative) {
|
|
1094
1098
|
if (isWeb && !staticConfig.isReactNative) {
|
|
1095
1099
|
styleToCSS(style)
|
|
@@ -1295,7 +1299,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1295
1299
|
}
|
|
1296
1300
|
}
|
|
1297
1301
|
if (process.env.NODE_ENV === 'development' && debug && debug !== 'profile') {
|
|
1298
|
-
|
|
1302
|
+
log(`Found fontFamily native: ${style.fontFamily}`, faceInfo)
|
|
1299
1303
|
}
|
|
1300
1304
|
}
|
|
1301
1305
|
}
|
|
@@ -1320,7 +1324,7 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1320
1324
|
parentSplitStyles,
|
|
1321
1325
|
};
|
|
1322
1326
|
for (const key in logs) {
|
|
1323
|
-
|
|
1327
|
+
log(key, logs[key])
|
|
1324
1328
|
}
|
|
1325
1329
|
} catch {
|
|
1326
1330
|
// RN can run into PayloadTooLargeError: request entity too large
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function log(...args: any[]) {
|
|
2
|
+
if (process.env.NODE_ENV === 'production') return
|
|
3
|
+
if (process.env.TAMAGUI_TARGET === 'web') {
|
|
4
|
+
return console.info(...args)
|
|
5
|
+
}
|
|
6
|
+
// react native doesn't log in the cli unless it's log
|
|
7
|
+
// biome-ignore lint/suspicious/noConsoleLog: <explanation>
|
|
8
|
+
return console.log(...args)
|
|
9
|
+
}
|
package/src/hooks/useProps.tsx
CHANGED
|
@@ -16,7 +16,7 @@ type UsePropsOptions = Pick<
|
|
|
16
16
|
forComponent?: { staticConfig: StaticConfig }
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
type
|
|
19
|
+
type PropsWithoutMediaStyles<A> = {
|
|
20
20
|
// remove all media
|
|
21
21
|
[Key in keyof A extends `$${string}` ? never : keyof A]?: A[Key]
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ type FlattenedProps<A> = {
|
|
|
30
30
|
export function useProps<A extends Object>(
|
|
31
31
|
props: A,
|
|
32
32
|
opts?: UsePropsOptions
|
|
33
|
-
):
|
|
33
|
+
): PropsWithoutMediaStyles<A> {
|
|
34
34
|
const [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
35
35
|
...opts,
|
|
36
36
|
noExpand: true,
|
|
@@ -52,7 +52,7 @@ export function useProps<A extends Object>(
|
|
|
52
52
|
export function useStyle<A extends Object>(
|
|
53
53
|
props: A,
|
|
54
54
|
opts?: UsePropsOptions
|
|
55
|
-
):
|
|
55
|
+
): PropsWithoutMediaStyles<A> {
|
|
56
56
|
return usePropsAndStyle(props, opts)[1]
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -65,7 +65,7 @@ export function useStyle<A extends Object>(
|
|
|
65
65
|
export function usePropsAndStyle<A extends Object>(
|
|
66
66
|
props: A,
|
|
67
67
|
opts?: UsePropsOptions
|
|
68
|
-
): [
|
|
68
|
+
): [PropsWithoutMediaStyles<A>, PropsWithoutMediaStyles<A>, ThemeParsed, UseMediaState] {
|
|
69
69
|
const staticConfig = opts?.forComponent?.staticConfig ?? Stack.staticConfig
|
|
70
70
|
const [themeState, theme] = useThemeWithState({
|
|
71
71
|
componentName: staticConfig.componentName,
|
package/src/hooks/useTheme.tsx
CHANGED
|
@@ -236,6 +236,17 @@ export function getThemeProxied(
|
|
|
236
236
|
},
|
|
237
237
|
})
|
|
238
238
|
}
|
|
239
|
+
|
|
240
|
+
if (
|
|
241
|
+
process.env.NODE_ENV === 'development' &&
|
|
242
|
+
process.env.TAMAGUI_FEAT_THROW_ON_MISSING_THEME_VALUE === '1'
|
|
243
|
+
) {
|
|
244
|
+
throw new Error(
|
|
245
|
+
`[tamagui] No theme key "${key}" found in theme ${name}. \n Keys in theme: ${Object.keys(
|
|
246
|
+
theme
|
|
247
|
+
).join(', ')}`
|
|
248
|
+
)
|
|
249
|
+
}
|
|
239
250
|
}
|
|
240
251
|
|
|
241
252
|
return Reflect.get(_, key)
|
package/src/types.tsx
CHANGED
|
@@ -634,6 +634,20 @@ type GenericTamaguiSettings = {
|
|
|
634
634
|
* Then this feature is safe to turn on and will significantly speed up dark/light re-renders.
|
|
635
635
|
*/
|
|
636
636
|
fastSchemeChange?: boolean
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* On Web, this allows changing the behavior of container groups which by default uses
|
|
640
|
+
* `container-type: normal`.
|
|
641
|
+
*/
|
|
642
|
+
webContainerType?:
|
|
643
|
+
| 'normal'
|
|
644
|
+
| 'size'
|
|
645
|
+
| 'inline-size'
|
|
646
|
+
| 'inherit'
|
|
647
|
+
| 'initial'
|
|
648
|
+
| 'revert'
|
|
649
|
+
| 'revert-layer'
|
|
650
|
+
| 'unset'
|
|
637
651
|
}
|
|
638
652
|
|
|
639
653
|
export type TamaguiSettings = TamaguiConfig['settings']
|
|
@@ -651,7 +665,7 @@ export type CreateTamaguiProps = {
|
|
|
651
665
|
}
|
|
652
666
|
}
|
|
653
667
|
|
|
654
|
-
settings?: GenericTamaguiSettings
|
|
668
|
+
settings?: Partial<GenericTamaguiSettings>
|
|
655
669
|
|
|
656
670
|
/**
|
|
657
671
|
* Define a default font, for better types and default font on Text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAaN,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createComponent.d.ts","sourceRoot":"","sources":["../src/createComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAaN,MAAM,OAAO,CAAA;AAuBd,OAAO,EAEL,SAAS,EAKT,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EAEZ,gBAAgB,EAGhB,cAAc,EAEd,SAAS,EAKV,MAAM,SAAS,CAAA;AAoBhB,eAAO,MAAM,QAAQ,eAAsB,CAAA;AA6D3C,wBAAgB,eAAe,CAC7B,kBAAkB,SAAS,UAAU,GAAG,SAAS,GAAG,EAAE,EACtD,GAAG,GAAG,cAAc,EACpB,SAAS,GAAG,KAAK,EACjB,YAAY,EAAE,YAAY,8DAsrC3B;AAsBD,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,OAEjD;AAiBD,eAAO,MAAM,MAAM,4DAqCjB,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,mBAiGxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,kBAAkB,EAKlB,kBAAkB,EAMnB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"createTamagui.d.ts","sourceRoot":"","sources":["../src/createTamagui.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,kBAAkB,EAKlB,kBAAkB,EAMnB,MAAM,SAAS,CAAA;AAKhB,wBAAgB,aAAa,CAAC,IAAI,SAAS,kBAAkB,EAC3D,QAAQ,EAAE,IAAI,GACb,kBAAkB,CAAC,IAAI,CAAC,CA+Q1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAKxF,eAAO,MAAM,SAAS,MAAM,CAAA;AAS5B,eAAO,MAAM,gBAAgB,gBACd,WAAW,cACZ,MAAM,gBACJ,YAAY,QACpB,WAAW,WACR,OAAO,aACL,MAAM,KAChB,
|
|
1
|
+
{"version":3,"file":"createMediaStyle.d.ts","sourceRoot":"","sources":["../../src/helpers/createMediaStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAKxF,eAAO,MAAM,SAAS,MAAM,CAAA;AAS5B,eAAO,MAAM,gBAAgB,gBACd,WAAW,cACZ,MAAM,gBACJ,YAAY,QACpB,WAAW,WACR,OAAO,aACL,MAAM,KAChB,gBA4GF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAOb,eAAe,EACf,YAAY,EAEZ,qBAAqB,EAErB,cAAc,EACd,WAAW,EAEZ,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAOb,eAAe,EACf,YAAY,EAEZ,qBAAqB,EAErB,cAAc,EACd,WAAW,EAEZ,MAAM,UAAU,CAAA;AA8BjB,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAMhE,KAAK,aAAa,GAAG,CACnB,KAAK,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC7B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,qBAAqB,EACrC,UAAU,EAAE,eAAe,EAC3B,iBAAiB,CAAC,EAAE,cAAc,GAAG,IAAI,EACzC,OAAO,CAAC,EAAE,iBAAiB,EAE3B,WAAW,CAAC,EAAE,MAAM,EACpB,KAAK,CAAC,EAAE,SAAS,KACd,cAAc,CAAA;AAEnB,eAAO,MAAM,UAAU,MAAM,CAAA;AAuB7B,eAAO,MAAM,cAAc,EAAE,aAurC5B,CAAA;AA2DD,eAAO,MAAM,WAAW,eACV,aAAa,UACjB,MAAM,WACL,MAAM,wBACO,OAAO,KAC5B,cA2BF,CAAA;AAqBD,eAAO,MAAM,cAAc,EAAE,aAQ5B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/helpers/log.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,QAQjC"}
|
|
@@ -67,6 +67,7 @@ export declare const useConfiguration: () => {
|
|
|
67
67
|
autocompleteSpecificTokens?: (boolean | "except-special") | undefined;
|
|
68
68
|
mediaPropOrder?: boolean | undefined;
|
|
69
69
|
fastSchemeChange?: boolean | undefined;
|
|
70
|
+
webContainerType?: "size" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "normal" | "inline-size" | undefined;
|
|
70
71
|
};
|
|
71
72
|
tokens: Omit<{
|
|
72
73
|
[x: string]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"useConfiguration.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfiguration.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ5B,CAAA"}
|
|
@@ -5,7 +5,7 @@ type UsePropsOptions = Pick<SplitStyleProps, 'noExpand' | 'noNormalize' | 'noCla
|
|
|
5
5
|
staticConfig: StaticConfig;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
type
|
|
8
|
+
type PropsWithoutMediaStyles<A> = {
|
|
9
9
|
[Key in keyof A extends `$${string}` ? never : keyof A]?: A[Key];
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
@@ -14,20 +14,20 @@ type FlattenedProps<A> = {
|
|
|
14
14
|
* Use sparingly, it will loop props and trigger re-render on all media queries you access.
|
|
15
15
|
*
|
|
16
16
|
* */
|
|
17
|
-
export declare function useProps<A extends Object>(props: A, opts?: UsePropsOptions):
|
|
17
|
+
export declare function useProps<A extends Object>(props: A, opts?: UsePropsOptions): PropsWithoutMediaStyles<A>;
|
|
18
18
|
/**
|
|
19
19
|
* Returns only style values fully resolved and flattened with merged media queries and shorthands with all theme and token values resolved.
|
|
20
20
|
*
|
|
21
21
|
* Use sparingly, it will loop props and trigger re-render on all media queries you access.
|
|
22
22
|
*
|
|
23
23
|
* */
|
|
24
|
-
export declare function useStyle<A extends Object>(props: A, opts?: UsePropsOptions):
|
|
24
|
+
export declare function useStyle<A extends Object>(props: A, opts?: UsePropsOptions): PropsWithoutMediaStyles<A>;
|
|
25
25
|
/**
|
|
26
26
|
* Returns [props, styles] fully resolved and flattened with merged media queries and shorthands with all theme and token values resolved.
|
|
27
27
|
*
|
|
28
28
|
* Use sparingly, it will loop props and trigger re-render on all media queries you access.
|
|
29
29
|
*
|
|
30
30
|
* */
|
|
31
|
-
export declare function usePropsAndStyle<A extends Object>(props: A, opts?: UsePropsOptions): [
|
|
31
|
+
export declare function usePropsAndStyle<A extends Object>(props: A, opts?: UsePropsOptions): [PropsWithoutMediaStyles<A>, PropsWithoutMediaStyles<A>, ThemeParsed, UseMediaState];
|
|
32
32
|
export {};
|
|
33
33
|
//# sourceMappingURL=useProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useProps.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAKpF,KAAK,eAAe,GAAG,IAAI,CACzB,eAAe,EACf,UAAU,GAAG,aAAa,GAAG,cAAc,GAAG,eAAe,CAC9D,GAAG;IACF,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,YAAY,CAAC,EAAE;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,CAAA;CAC9C,CAAA;AAED,KAAK,
|
|
1
|
+
{"version":3,"file":"useProps.d.ts","sourceRoot":"","sources":["../../src/hooks/useProps.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,WA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EAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,KAAK,CAAC,EAAE,SAAS,GAChB,cAAc,CA8GhB;AAeD,eAAO,MAAM,mBAAmB,mBAA0B,CAAA;AAE1D,eAAO,MAAM,oBAAoB,UACxB,sBAAsB,2BAEtB,MAAM,EAAE,iBACA,MAAM,OAAO,GAAG,SAAS,KACvC,oBA4QF,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -410,6 +410,11 @@ type GenericTamaguiSettings = {
|
|
|
410
410
|
* Then this feature is safe to turn on and will significantly speed up dark/light re-renders.
|
|
411
411
|
*/
|
|
412
412
|
fastSchemeChange?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* On Web, this allows changing the behavior of container groups which by default uses
|
|
415
|
+
* `container-type: normal`.
|
|
416
|
+
*/
|
|
417
|
+
webContainerType?: 'normal' | 'size' | 'inline-size' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
413
418
|
};
|
|
414
419
|
export type TamaguiSettings = TamaguiConfig['settings'];
|
|
415
420
|
export type CreateTamaguiProps = {
|
|
@@ -424,7 +429,7 @@ export type CreateTamaguiProps = {
|
|
|
424
429
|
[key: string]: string | number | Variable;
|
|
425
430
|
};
|
|
426
431
|
};
|
|
427
|
-
settings?: GenericTamaguiSettings
|
|
432
|
+
settings?: Partial<GenericTamaguiSettings>;
|
|
428
433
|
/**
|
|
429
434
|
* Define a default font, for better types and default font on Text
|
|
430
435
|
*/
|