@multiplatform.one/theme 7.49.1 → 7.49.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/theme",
3
- "version": "7.49.1",
3
+ "version": "7.49.3",
4
4
  "description": "Tamagui theme system for multiplatform.one",
5
5
  "keywords": [
6
6
  "multiplatform",
@@ -72,8 +72,8 @@
72
72
  "access": "public"
73
73
  },
74
74
  "dependencies": {
75
- "@multiplatform.one/platform": "^7.49.1",
76
- "@multiplatform.one/store": "^7.49.1",
75
+ "@multiplatform.one/platform": "^7.49.3",
76
+ "@multiplatform.one/store": "^7.49.3",
77
77
  "@tamagui/animations-react-native": "2.7.6",
78
78
  "@tamagui/colors": "2.7.6",
79
79
  "@tamagui/config": "2.7.6",
@@ -89,8 +89,8 @@
89
89
  },
90
90
  "devDependencies": {
91
91
  "@expo/prebuild-config": "55.0.18",
92
- "@multiplatform.one/config": "7.49.1",
93
- "@multiplatform.one/test-utils": "7.49.1",
92
+ "@multiplatform.one/config": "7.49.3",
93
+ "@multiplatform.one/test-utils": "7.49.3",
94
94
  "@tamagui/animations-css": "2.7.6",
95
95
  "@tamagui/animations-reanimated": "2.7.6",
96
96
  "@tamagui/font-inter": "2.7.6",
@@ -20,13 +20,32 @@ export function transitionProps(
20
20
  const transition = isRole ? role.transition : role;
21
21
  if (transition === undefined) return {};
22
22
  if (!isRole) return { transition };
23
- const properties = [...role.animateOnly, ...extra];
23
+ const properties = [...role.animateOnly, ...extra].flatMap(
24
+ (property) => nativeLonghands[property] ?? [property],
25
+ );
24
26
  return {
25
27
  transition,
26
28
  animateOnly: properties,
27
29
  };
28
30
  }
29
31
 
32
+ /**
33
+ * FZ-7919: tamagui expands `borderColor` into its four sides before the React
34
+ * Native driver sees the style, and the driver matches `animateOnly` by exact
35
+ * key. A render therefore painted the sides as static, while a pseudo state
36
+ * (the bubbled focus of a field's text input) animated them. The animated
37
+ * copy outranked the static one and held the previous focus or theme colour.
38
+ */
39
+ const nativeLonghands: Record<string, readonly string[]> = {
40
+ borderColor: [
41
+ "borderColor",
42
+ "borderTopColor",
43
+ "borderRightColor",
44
+ "borderBottomColor",
45
+ "borderLeftColor",
46
+ ],
47
+ };
48
+
30
49
  function isMotionRole(value: MotionRole | TransitionProp | undefined): value is MotionRole {
31
50
  return (
32
51
  typeof value === "object" &&
@@ -42,7 +42,18 @@ describe("role property scopes", () => {
42
42
  expect(nativeTransitionProps("quick")).toEqual({ transition: "quick" });
43
43
  expect(nativeTransitionProps(motionFor("quick").control, ["maxHeight"])).toEqual({
44
44
  transition: "quick",
45
- animateOnly: ["backgroundColor", "borderColor", "color", "opacity", "transform", "maxHeight"],
45
+ animateOnly: [
46
+ "backgroundColor",
47
+ "borderColor",
48
+ "borderTopColor",
49
+ "borderRightColor",
50
+ "borderBottomColor",
51
+ "borderLeftColor",
52
+ "color",
53
+ "opacity",
54
+ "transform",
55
+ "maxHeight",
56
+ ],
46
57
  });
47
58
  });
48
59
  });
@@ -1 +1 @@
1
- {"version":3,"file":"transitionProps.native.d.ts","sourceRoot":"","sources":["../../src/theme/transitionProps.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,EAC7C,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B;IACD,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAUA"}
1
+ {"version":3,"file":"transitionProps.native.d.ts","sourceRoot":"","sources":["../../src/theme/transitionProps.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,SAAS,EAC7C,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B;IACD,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAYA"}