@tamagui/web 1.115.4 → 1.115.5
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/helpers/getSplitStyles.cjs +9 -10
- package/dist/cjs/helpers/getSplitStyles.cjs.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.native.js +4 -7
- package/dist/cjs/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/cjs/helpers/isActivePlatform.cjs +1 -0
- package/dist/cjs/helpers/isActivePlatform.cjs.map +1 -1
- package/dist/cjs/helpers/isActivePlatform.native.js +2 -0
- package/dist/cjs/helpers/isActivePlatform.native.js.map +2 -2
- package/dist/cjs/helpers/isActiveTheme.cjs +28 -0
- package/dist/cjs/helpers/isActiveTheme.cjs.map +6 -0
- package/dist/cjs/helpers/isActiveTheme.native.js +29 -0
- package/dist/cjs/helpers/isActiveTheme.native.js.map +6 -0
- package/dist/esm/helpers/getSplitStyles.js +7 -9
- package/dist/esm/helpers/getSplitStyles.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +7 -8
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +7 -9
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/isActivePlatform.js +2 -0
- package/dist/esm/helpers/isActivePlatform.js.map +1 -1
- package/dist/esm/helpers/isActivePlatform.mjs +1 -0
- package/dist/esm/helpers/isActivePlatform.mjs.map +1 -1
- package/dist/esm/helpers/isActivePlatform.native.js +2 -0
- package/dist/esm/helpers/isActivePlatform.native.js.map +2 -2
- package/dist/esm/helpers/isActiveTheme.js +8 -0
- package/dist/esm/helpers/isActiveTheme.js.map +6 -0
- package/dist/esm/helpers/isActiveTheme.mjs +5 -0
- package/dist/esm/helpers/isActiveTheme.mjs.map +1 -0
- package/dist/esm/helpers/isActiveTheme.native.js +8 -0
- package/dist/esm/helpers/isActiveTheme.native.js.map +6 -0
- package/package.json +11 -11
- package/src/helpers/getSplitStyles.tsx +10 -12
- package/src/helpers/isActivePlatform.ts +3 -0
- package/src/helpers/isActiveTheme.ts +4 -0
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/isActivePlatform.d.ts.map +1 -1
- package/types/helpers/isActiveTheme.d.ts +2 -0
- package/types/helpers/isActiveTheme.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isActiveTheme","key","activeThemeName","startsWith","slice"],"sources":["../../../src/helpers/isActiveTheme.ts"],"sourcesContent":[null],"mappings":"AAAO,SAASA,cAAcC,GAAA,EAAaC,eAAA,EAAyB;EAClE,IAAKD,GAAA,CAAIE,UAAA,CAAW,SAAS,GAC7B,OAAOF,GAAA,CAAIG,KAAA,CAAM,CAAC,EAAED,UAAA,CAAWD,eAAe;AAChD","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/helpers/Users/n8/tamagui/code/core/web/src/helpers/isActiveTheme.ts"],
|
|
4
|
+
"mappings": "AAAO,SAASA,cAAcC,KAAaC,iBAAuB;AAChE,MAAKD,IAAIE,WAAW,SAAA;AACpB,WAAOF,IAAIG,MAAM,CAAA,EAAGD,WAAWD,eAAAA;AACjC;",
|
|
5
|
+
"names": ["isActiveTheme", "key", "activeThemeName", "startsWith", "slice"]
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.115.
|
|
3
|
+
"version": "1.115.5",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.115.
|
|
31
|
-
"@tamagui/constants": "1.115.
|
|
32
|
-
"@tamagui/helpers": "1.115.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.115.
|
|
34
|
-
"@tamagui/timer": "1.115.
|
|
35
|
-
"@tamagui/types": "1.115.
|
|
36
|
-
"@tamagui/use-did-finish-ssr": "1.115.
|
|
37
|
-
"@tamagui/use-event": "1.115.
|
|
38
|
-
"@tamagui/use-force-update": "1.115.
|
|
30
|
+
"@tamagui/compose-refs": "1.115.5",
|
|
31
|
+
"@tamagui/constants": "1.115.5",
|
|
32
|
+
"@tamagui/helpers": "1.115.5",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.115.5",
|
|
34
|
+
"@tamagui/timer": "1.115.5",
|
|
35
|
+
"@tamagui/types": "1.115.5",
|
|
36
|
+
"@tamagui/use-did-finish-ssr": "1.115.5",
|
|
37
|
+
"@tamagui/use-event": "1.115.5",
|
|
38
|
+
"@tamagui/use-force-update": "1.115.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.115.
|
|
41
|
+
"@tamagui/build": "1.115.5",
|
|
42
42
|
"@testing-library/react": "^16.0.1",
|
|
43
43
|
"csstype": "^3.0.10",
|
|
44
44
|
"typescript": "^5.5.2",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
import {
|
|
3
2
|
isAndroid,
|
|
4
3
|
isClient,
|
|
@@ -17,6 +16,7 @@ import {
|
|
|
17
16
|
validPseudoKeys,
|
|
18
17
|
validStyles,
|
|
19
18
|
} from '@tamagui/helpers'
|
|
19
|
+
import React from 'react'
|
|
20
20
|
|
|
21
21
|
import { getConfig, getFont } from '../config'
|
|
22
22
|
import { accessibilityDirectMap } from '../constants/accessibilityDirectMap'
|
|
@@ -61,6 +61,8 @@ import {
|
|
|
61
61
|
shouldInsertStyleRules,
|
|
62
62
|
updateRules,
|
|
63
63
|
} from './insertStyleRule'
|
|
64
|
+
import { isActivePlatform } from './isActivePlatform'
|
|
65
|
+
import { isActiveTheme } from './isActiveTheme'
|
|
64
66
|
import { log } from './log'
|
|
65
67
|
import {
|
|
66
68
|
normalizeValueWithProperty,
|
|
@@ -69,9 +71,8 @@ import {
|
|
|
69
71
|
import { getPropMappedFontFamily, propMapper } from './propMapper'
|
|
70
72
|
import { pseudoDescriptors, pseudoPriorities } from './pseudoDescriptors'
|
|
71
73
|
import { skipProps } from './skipProps'
|
|
72
|
-
import { transformsToString } from './transformsToString'
|
|
73
|
-
import { isActivePlatform } from './isActivePlatform'
|
|
74
74
|
import { sortString } from './sortString'
|
|
75
|
+
import { transformsToString } from './transformsToString'
|
|
75
76
|
|
|
76
77
|
const consoleGroupCollapsed = isWeb ? console.groupCollapsed : console.info
|
|
77
78
|
|
|
@@ -874,10 +875,8 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
874
875
|
// for now we're doing weird stuff, getStylesAtomic will put the
|
|
875
876
|
// $platform-web into property so we can check it here
|
|
876
877
|
const property = style[0]
|
|
877
|
-
if (property[0] === '$') {
|
|
878
|
-
|
|
879
|
-
continue
|
|
880
|
-
}
|
|
878
|
+
if (property[0] === '$' && !isActivePlatform(property)) {
|
|
879
|
+
continue
|
|
881
880
|
}
|
|
882
881
|
|
|
883
882
|
const out = createMediaStyle(
|
|
@@ -930,8 +929,8 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
930
929
|
if (isThemeMedia) {
|
|
931
930
|
// needed to get updates when theme changes
|
|
932
931
|
dynamicThemeAccess = true
|
|
933
|
-
|
|
934
|
-
if (!(themeName ===
|
|
932
|
+
|
|
933
|
+
if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) {
|
|
935
934
|
continue
|
|
936
935
|
}
|
|
937
936
|
} else if (isGroupMedia) {
|
|
@@ -1024,9 +1023,8 @@ export const getSplitStyles: StyleSplitter = (
|
|
|
1024
1023
|
continue
|
|
1025
1024
|
}
|
|
1026
1025
|
if (subKey[0] === '$') {
|
|
1027
|
-
if (!isActivePlatform(subKey))
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1026
|
+
if (!isActivePlatform(subKey)) continue
|
|
1027
|
+
if (!isActiveTheme(subKey, themeName)) continue
|
|
1030
1028
|
for (const subSubKey in mediaStyle[subKey]) {
|
|
1031
1029
|
mergeMediaStyle(subSubKey, mediaStyle[subKey][subSubKey])
|
|
1032
1030
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAOb,eAAe,EACf,YAAY,EAGZ,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"getSplitStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/getSplitStyles.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,KAAK,EAEV,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,aAAa,EAOb,eAAe,EACf,YAAY,EAGZ,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAA;AA2BjB,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;AA+B7B,eAAO,MAAM,cAAc,EAAE,aA0wC5B,CAAA;AAgED,eAAO,MAAM,WAAW,eACV,aAAa,UACjB,MAAM,WACL,MAAM,wBACO,OAAO,KAC5B,SAiCF,CAAA;AAQD,eAAO,MAAM,cAAc,EAAE,aAa5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isActivePlatform.d.ts","sourceRoot":"","sources":["../../src/helpers/isActivePlatform.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"isActivePlatform.d.ts","sourceRoot":"","sources":["../../src/helpers/isActivePlatform.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,WAW3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isActiveTheme.d.ts","sourceRoot":"","sources":["../../src/helpers/isActiveTheme.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,uBAGjE"}
|