@devries-cameron20 / t3code Mirror · read-only / commits / 1efe762be3
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 22:00 UTC

chore(mobile): upgrade Uniwind to 1.13.0 (#22173)

Hubert Bieszczad committed Oct 20, 2026 at 09:03 UTC 1efe762be330f2ed2ccb1cb7c6c18d5ee5f02934
5 files changed +45 -35
apps/mobile/package.json
+1 -1
@@ -143,7 +143,7 @@
143 "shiki": "4.2.0",
144 "tailwind-merge": "^3.5.0",
145 "unified": "catalog:",
146 - "uniwind": "1.12.1"
146 + "uniwind": "1.13.0"
147 },
148 "devDependencies": {
149 "@babel/core": "^7.29.7",
apps/mobile/src/lib/uniwind-platform-variants.fixture.cjs
+20 -11
@@ -99,18 +99,27 @@ async function main() {
99 const compiled = addMetaToStylesTemplate(processor, platform);
100 const payload = compileNativeCSS(bundlerConfig, tailwindCSS);
101 const styles = {};
102 + // Compiled entries keep only their generated `matches` predicate; the
103 + // conditions they were built from live on the processor's style metadata.
104 for (const [className, entries] of Object.entries(compiled)) {
103 - styles[className] = entries.map(
104 - ({ native, minWidth, maxWidth, active, focus, disabled, dataAttributes }) => ({
105 - native,
106 - minWidth,
107 - maxWidth,
108 - active: active ?? null,
109 - focus: focus ?? null,
110 - disabled: disabled ?? null,
111 - dataAttributes: dataAttributes ?? null,
112 - }),
113 - );
105 + styles[className] = entries.map(({ index }) => {
106 + const {
107 + platform: guard,
108 + conditions,
109 + active,
110 + focus,
111 + disabled,
112 + dataAttributes,
113 + } = processor.stylesheets[className][index].meta;
114 + return {
115 + platform: guard,
116 + responsive: conditions.some((condition) => condition.includes("rt.screen.width")),
117 + active,
118 + focus,
119 + disabled,
120 + dataAttributes,
121 + };
122 + });
123 }
124 platforms[platform] = {
125 styles,
apps/mobile/src/lib/uniwind-platform-variants.test.ts
+16 -15
@@ -6,9 +6,8 @@ import * as NodeURL from "node:url";
6 import { beforeAll, describe, expect, it } from "vite-plus/test";
7
8 interface CompiledStyle {
9 - native: boolean;
10 - minWidth: number;
11 - maxWidth: number;
9 + platform: string | null;
10 + responsive: boolean;
11 active: boolean | null;
12 focus: boolean | null;
13 disabled: boolean | null;
@@ -101,7 +100,9 @@ describe("uniwind platform variants compile per platform", () => {
100 `android has ${className}`,
101 ).toBeUndefined();
102 expect(output.platforms.ios?.styles[className], `ios lacks ${className}`).toBeDefined();
104 - expect(output.platforms.ios?.styles[className]?.every((style) => style.native)).toBe(true);
103 + expect(
104 + output.platforms.ios?.styles[className]?.every((style) => style.platform === "ios"),
105 + ).toBe(true);
106 }
107 });
108
@@ -112,9 +113,9 @@ describe("uniwind platform variants compile per platform", () => {
113 output.platforms.android?.styles[className],
114 `android lacks ${className}`,
115 ).toBeDefined();
115 - expect(output.platforms.android?.styles[className]?.every((style) => style.native)).toBe(
116 - true,
117 - );
116 + expect(
117 + output.platforms.android?.styles[className]?.every((style) => style.platform === "android"),
118 + ).toBe(true);
119 }
120 });
121
@@ -123,13 +124,13 @@ describe("uniwind platform variants compile per platform", () => {
124 for (const platform of ["ios", "android"]) {
125 const styles = output.platforms[platform]?.styles[className];
126 expect(styles, `${platform} lacks ${className}`).toBeDefined();
126 - expect(styles?.every((style) => !style.native)).toBe(true);
127 + expect(styles?.every((style) => style.platform === null)).toBe(true);
128 }
129 }
130 for (const platform of ["ios", "android"]) {
131 for (const className of RESPONSIVE_CLASSES) {
132 const style = output.platforms[platform]?.styles[className]?.at(-1);
132 - expect(style?.minWidth, `${className} lost its breakpoint`).toBeGreaterThan(0);
133 + expect(style?.responsive, `${className} lost its breakpoint`).toBe(true);
134 }
135 }
136 });
@@ -174,19 +175,19 @@ describe("uniwind keeps media rules nested inside class rules attached to the cl
175 for (const platform of ["ios", "android"]) {
176 const entries = nested.platforms[platform]?.styles["container-x"];
177 expect(entries, `${platform} lacks container-x`).toBeDefined();
177 - expect(entries?.some((style) => !style.native && style.minWidth === 0)).toBe(true);
178 - expect(entries?.some((style) => !style.native && style.minWidth > 0)).toBe(true);
178 + expect(entries?.some((style) => style.platform === null && !style.responsive)).toBe(true);
179 + expect(entries?.some((style) => style.platform === null && style.responsive)).toBe(true);
180 }
181 });
182
183 it("keeps @variant declarations inside @utility on their platform", () => {
184 const iosEntries = nested.platforms.ios?.styles["foo-x"];
184 - expect(iosEntries?.some((style) => !style.native)).toBe(true);
185 - expect(iosEntries?.some((style) => style.native)).toBe(true);
185 + expect(iosEntries?.some((style) => style.platform === null)).toBe(true);
186 + expect(iosEntries?.some((style) => style.platform === "ios")).toBe(true);
187
188 const androidEntries = nested.platforms.android?.styles["foo-x"];
188 - expect(androidEntries?.some((style) => !style.native)).toBe(true);
189 - expect(androidEntries?.some((style) => style.native)).toBe(false);
189 + expect(androidEntries?.some((style) => style.platform === null)).toBe(true);
190 + expect(androidEntries?.some((style) => style.platform !== null)).toBe(false);
191 });
192 });
193
pnpm-lock.yaml
+7 -7
@@ -621,8 +621,8 @@ importers:
621 specifier: 'catalog:'
622 version: 11.0.5
623 uniwind:
624 - specifier: 1.12.1
625 - version: 1.12.1(@expo/metro-config@58.0.14(patch_hash=90fa980e8b6480631fb2fbb04559834e3c612db40c550cd828f11be297d8d760)(bufferutil@4.1.0)(expo@58.0.14)(typescript@7.0.2)(utf-8-validate@6.0.6))(metro-cache@0.87.1)(metro-transform-worker@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(metro@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)(tailwindcss@4.3.3)
624 + specifier: 1.13.0
625 + version: 1.13.0(@expo/metro-config@58.0.14(patch_hash=90fa980e8b6480631fb2fbb04559834e3c612db40c550cd828f11be297d8d760)(bufferutil@4.1.0)(expo@58.0.14)(typescript@7.0.2)(utf-8-validate@6.0.6))(metro-cache@0.87.1)(metro-transform-worker@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(metro@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)(tailwindcss@4.3.3)
626 devDependencies:
627 '@babel/core':
628 specifier: ^7.29.7
@@ -12177,8 +12177,8 @@ packages:
12177 resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
12178 engines: {node: '>= 10.0.0'}
12179
12180 - uniwind@1.12.1:
12181 - resolution: {integrity: sha512-u0OVMVqefGchOpsPIwIYvcF2Jl9JtVVaXBb+wfqAYoyLrhN27Ll50aQ7aFT81k73JSq+He6dNlcbTl2Qb9cTMw==}
12180 + uniwind@1.13.0:
12181 + resolution: {integrity: sha512-kr9mFYQIUmYlyV6Pm663EsE9UVJSRZM1XYOwQ8BVUpRIhfKw6dOoqqZCFzCj9PqVIcVXY16J702C8rFmUjNR6Q==}
12182 hasBin: true
12183 peerDependencies:
12184 '@expo/metro-config': 58.0.14
@@ -16843,7 +16843,7 @@ snapshots:
16843 jiti: 2.7.0
16844 lightningcss: 1.33.0
16845 magic-string: 0.30.21
16846 - source-map-js: 1.2.1
16846 + source-map-js: 1.2.2
16847 tailwindcss: 4.3.3
16848
16849 '@tailwindcss/oxide-android-arm64@4.3.3':
@@ -18910,7 +18910,7 @@ snapshots:
18910 css-tree@2.2.1:
18911 dependencies:
18912 mdn-data: 2.0.28
18913 - source-map-js: 1.2.1
18913 + source-map-js: 1.2.2
18914
18915 css-tree@3.2.1:
18916 dependencies:
@@ -23771,7 +23771,7 @@ snapshots:
23771
23772 universalify@2.0.1: {}
23773
23774 - uniwind@1.12.1(@expo/metro-config@58.0.14(patch_hash=90fa980e8b6480631fb2fbb04559834e3c612db40c550cd828f11be297d8d760)(bufferutil@4.1.0)(expo@58.0.14)(typescript@7.0.2)(utf-8-validate@6.0.6))(metro-cache@0.87.1)(metro-transform-worker@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(metro@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)(tailwindcss@4.3.3):
23774 + uniwind@1.13.0(@expo/metro-config@58.0.14(patch_hash=90fa980e8b6480631fb2fbb04559834e3c612db40c550cd828f11be297d8d760)(bufferutil@4.1.0)(expo@58.0.14)(typescript@7.0.2)(utf-8-validate@6.0.6))(metro-cache@0.87.1)(metro-transform-worker@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(metro@0.87.1(bufferutil@4.1.0)(utf-8-validate@6.0.6))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7)(bufferutil@4.1.0)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(utf-8-validate@6.0.6))(react@19.3.0)(tailwindcss@4.3.3):
23775 dependencies:
23776 '@tailwindcss/node': 4.3.3
23777 '@tailwindcss/oxide': 4.3.3
pnpm-workspace.yaml
+1 -1
@@ -165,7 +165,7 @@ minimumReleaseAgeExclude:
165 - "@distilled.cloud/stripe@1.0.0-rc.13"
166 - "@shadcn/lint@0.1.5"
167 - cn@0.3.2
168 - - uniwind@1.12.1
168 + - uniwind@1.13.0
169 - "@expo/dom-webview@58.0.2"
170 - "expo-auth-session@58.0.13"
171 - "expo-camera@58.0.10"