peachsim 0.1.829 → 0.1.831
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-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1 -1
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +14 -2
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +14 -2
- package/dist-lib/native-app-identity.cjs +18 -3
- package/dist-lib/native-app-identity.mjs +18 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +5 -5
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/kotlin/fork/NOTICE +11 -2
- package/kotlin/fork/README.md +15 -4
- package/kotlin/fork/SKIA_LICENSE +29 -0
- package/kotlin/fork/build.sh +8 -2
- package/kotlin/fork/compose-worker-globals.patch +92 -0
- package/kotlin/fork/fork.json +10 -1
- package/kotlin/fork/publish.ts +1 -1
- package/kotlin/fork/skia-android-shaping.patch +21 -0
- package/kotlin/toolchain.json +6 -6
- package/package.json +1 -1
- package/src/native-app-identity.ts +20 -3
package/dist-lib/skills.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -4535,7 +4535,7 @@ var init_supported_native_packages = __esm({
|
|
|
4535
4535
|
"@react-native-masked-view/masked-view",
|
|
4536
4536
|
// seam+coverage
|
|
4537
4537
|
"@react-native-menu/menu",
|
|
4538
|
-
// coverage
|
|
4538
|
+
// seam+coverage
|
|
4539
4539
|
"@react-native-ml-kit/barcode-scanning",
|
|
4540
4540
|
// seam
|
|
4541
4541
|
"@react-native-picker/picker",
|
|
@@ -7827,9 +7827,9 @@ var init_registry = __esm({
|
|
|
7827
7827
|
{
|
|
7828
7828
|
range: ">=5.0.0",
|
|
7829
7829
|
coverage: 0.9,
|
|
7830
|
-
note: "
|
|
7831
|
-
working: "DatePicker (inline), date, onDateChange, mode (date/time/datetime), locale (month names, y/m/d column order, 12/24h cycle, day-period labels), minimumDate, maximumDate (settle-clamp bounce), minuteInterval, timeZoneOffsetInMinutes, textColor, theme",
|
|
7832
|
-
missing: "modal/open mode
|
|
7830
|
+
note: "the real package JS runs from the bundle; requireNativeComponent('RNDatePicker') resolves to the shared wheel picker. Inline changes emit the upstream timestamp event. The iOS modal presents those wheels through the native action sheet, with Confirm, Cancel and programmatic dismissal; the package converts the confirmed timestamp to Date.",
|
|
7831
|
+
working: "DatePicker (inline), iOS modal/open with onConfirm/onCancel and closePicker, date, onDateChange, mode (date/time/datetime), locale (month names, y/m/d column order, 12/24h cycle, day-period labels), minimumDate, maximumDate (settle-clamp bounce), minuteInterval, timeZoneOffsetInMinutes, textColor, theme",
|
|
7832
|
+
missing: "Android modal/open mode, wheel wrap-around for month/day columns, cylindrical row compression (edge fade only), datetime day wheel spans min/max or \xB12 years instead of the UIKit range"
|
|
7833
7833
|
}
|
|
7834
7834
|
]
|
|
7835
7835
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/vite-swift.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.831 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/kotlin/fork/NOTICE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Peach's patched builds of JetBrains Compose Multiplatform UI and Skiko
|
|
2
2
|
|
|
3
|
-
This directory records modified builds
|
|
4
|
-
|
|
3
|
+
This directory records modified Compose and Skiko builds under Apache License
|
|
4
|
+
2.0 (LICENSE), and a modified Skia shaping unit under BSD-3-Clause (SKIA_LICENSE).
|
|
5
5
|
|
|
6
6
|
- JetBrains/compose-multiplatform-core at tag v1.13.0-alpha01
|
|
7
7
|
(commit a9e47e8aa04c95cfe572ab4297c770f3cbfb234e), a fork of the Android
|
|
@@ -16,6 +16,9 @@ The license text is in LICENSE beside this file.
|
|
|
16
16
|
|
|
17
17
|
https://android.googlesource.com/platform/frameworks/base
|
|
18
18
|
|
|
19
|
+
- JetBrains/skia at tag m152-2ca5fe6a81
|
|
20
|
+
(commit 2ca5fe6a8170e2f55f519d9de083be4dccc06e70). Copyright Google Inc. and respective authors.
|
|
21
|
+
|
|
19
22
|
Modifications: compose-worker-globals.patch and skiko-worker-clock.patch
|
|
20
23
|
change clock and clipboard reads to globalThis rather than window, and add an
|
|
21
24
|
explicit ui-text locale provider and Skiko host OS provider whose defaults
|
|
@@ -30,3 +33,9 @@ material3-wasm-js 1.13.0-alpha01, navigation-compose-wasm-js 2.10.0-beta01,
|
|
|
30
33
|
and skiko-wasm-js 0.152.0-alpha02 compiled from the patched sources.
|
|
31
34
|
skiko-wasm-0.152.0-alpha02.jar contains that worker-safe loader and
|
|
32
35
|
Skiko's own wasm runtime.
|
|
36
|
+
|
|
37
|
+
The Compose patch also selects integer static glyph advances on Android and
|
|
38
|
+
scales letter spacing to the integer shaping size, retaining fractional Animated
|
|
39
|
+
text. skia-android-shaping.patch truncates only the measurement-font copy for
|
|
40
|
+
non-subpixel, non-linear shaping. The original run font retains its painting
|
|
41
|
+
size and metrics. The modified Skia unit compiles into the Skiko Wasm runtime.
|
package/kotlin/fork/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Peach runs Compose in a React Native tenant worker, with no `window`,
|
|
|
5
5
|
Compose UI 1.13.0-alpha01 and Skiko 0.152.0-alpha02 platform actuals assume
|
|
6
6
|
browser globals that this native host does not publish. Peach carries patched
|
|
7
7
|
builds until upstream supplies equivalent worker and native host hooks, and
|
|
8
|
-
Android behavior for the
|
|
8
|
+
Android behavior for the approved web differences and static text shaping below.
|
|
9
9
|
|
|
10
10
|
| module | file | native host binding |
|
|
11
11
|
| --- | --- | --- |
|
|
@@ -14,6 +14,8 @@ Android behavior for the three approved web differences below.
|
|
|
14
14
|
| Compose `ui` | `SystemTheme.kt` | `LocalSystemTheme` visible to the host, which provides the device's night mode |
|
|
15
15
|
| Compose `ui-text` | `PlatformLocale.web.kt` | explicit `setPlatformLocaleProvider`; its default keeps upstream navigator behavior |
|
|
16
16
|
| Compose `ui-skiko` | `SkiaBackedPaint.nonAndroid.kt` | initial Miter join agrees with the backing paint and Android |
|
|
17
|
+
| Compose `ui-skiko` | `SkikoText.nonAndroid.kt`, `SkikoParagraphBuilder.nonAndroid.kt` | Android static advances and letter-spacing scale; Animated text retains fractional shaping |
|
|
18
|
+
| Skia shaper | `SkShaper_harfbuzz.cpp` | measurement-font copy truncates static shaping size; the painted run font retains the requested size |
|
|
17
19
|
| Compose `material3` | `PlatformDateFormat.web.kt` | timestamp formatting uses UTC, as Android does |
|
|
18
20
|
| Navigation `navigation-compose` | `DefaultNavTransitions.web.kt` | Android forward fades and predictive pop defaults |
|
|
19
21
|
| Skiko | `OsArch.web.kt` | explicit `setHostOsProvider`; its default lazily retains upstream OS detection |
|
|
@@ -28,8 +30,12 @@ this contract.
|
|
|
28
30
|
|
|
29
31
|
`fork.json` pins repositories, commits, patch hashes, JDK and Android tools.
|
|
30
32
|
Every changed upstream file carries a modification notice. `LICENSE` and
|
|
31
|
-
`NOTICE` travel with the patches. `build.sh` builds the changed KLIBs and Skiko
|
|
32
|
-
runtime jar with the upstream Gradle builds on the Linux builder.
|
|
33
|
+
`NOTICE` travel with the patches. `SKIA_LICENSE` records the shaping unit’s BSD license. `build.sh` builds the changed KLIBs and Skiko
|
|
34
|
+
runtime jar with the upstream Gradle builds on the Linux builder. The Skia shaping
|
|
35
|
+
unit is fetched at its pinned commit, patched, and compiled into Skiko; the linker
|
|
36
|
+
uses it instead of the same unit in the pinned Skia archive. All other Skia
|
|
37
|
+
objects retain their upstream build. This adds no allocation beyond the existing
|
|
38
|
+
measurement-font copy, and truncates once per shaped font, outside the glyph loop.
|
|
33
39
|
|
|
34
40
|
```sh
|
|
35
41
|
delivery="scripts/tmp/kotlin-fork-$(date +%s)-$$"
|
|
@@ -53,6 +59,11 @@ with an en-US browser.
|
|
|
53
59
|
|
|
54
60
|
Delete the fork when official releases provide worker-safe clocks/clipboard,
|
|
55
61
|
a location-independent loader and equivalent native locale/host OS provider hooks,
|
|
56
|
-
plus UTC date formatting, Android navigation defaults
|
|
62
|
+
plus UTC date formatting, Android navigation defaults, the correct initial paint join
|
|
63
|
+
and Android static shaping size/advances,
|
|
57
64
|
then rematch the Android pins in `plans/peach/kotlin-everywhere.md`. The prepared
|
|
58
65
|
upstream issue names these hooks and the full guest regression vehicle.
|
|
66
|
+
|
|
67
|
+
The static shaping correction is measured against the original `textwidth`
|
|
68
|
+
fixture. Styled line-end letter spacing and Animated whole-width rounding
|
|
69
|
+
remain open in the lane plan; the shaping correction does not close those grades.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Copyright (c) 2011 Google Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
|
12
|
+
the documentation and/or other materials provided with the
|
|
13
|
+
distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived
|
|
17
|
+
from this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/kotlin/fork/build.sh
CHANGED
|
@@ -116,8 +116,14 @@ checkout 0
|
|
|
116
116
|
)
|
|
117
117
|
|
|
118
118
|
checkout 1
|
|
119
|
+
SKIKO_SOURCE=${SOURCE}
|
|
120
|
+
checkout 2
|
|
121
|
+
# compile the patched shaping unit in Skiko so the linker uses it in place of
|
|
122
|
+
# the upstream archive unit. all other Skia objects remain pinned upstream.
|
|
123
|
+
cmp "${SOURCE}/LICENSE" "${FORK}/SKIA_LICENSE"
|
|
124
|
+
cp "${SOURCE}/modules/skshaper/src/SkShaper_harfbuzz.cpp" "${SKIKO_SOURCE}/skiko/src/nativeJsMain/cpp/AndroidShaper.cpp"
|
|
119
125
|
(
|
|
120
|
-
cd "${
|
|
126
|
+
cd "${SKIKO_SOURCE}/skiko"
|
|
121
127
|
gradle -Pdeploy.version=0.152.0-alpha02 -Pdeploy.release=true \
|
|
122
128
|
-Pskiko.wasm.enabled=true -Pskiko.awt.enabled=false \
|
|
123
129
|
:publishWasmJsPublicationToMavenLocal :skikoWasmJar
|
|
@@ -133,5 +139,5 @@ cp "${M2}/org/jetbrains/compose/ui/ui-wasm-js/1.13.0-alpha01/ui-wasm-js-1.13.0-a
|
|
|
133
139
|
"${DELIVER}/"
|
|
134
140
|
# the record travels with the klibs it describes, so publishing attaches what
|
|
135
141
|
# this build used, not whatever the checkout holds later
|
|
136
|
-
cp "${FORK}/fork.json" "${FORK}/LICENSE" "${FORK}/NOTICE" "${FORK}"/*.patch "${DELIVER}/"
|
|
142
|
+
cp "${FORK}/fork.json" "${FORK}/LICENSE" "${FORK}/NOTICE" "${FORK}/SKIA_LICENSE" "${FORK}"/*.patch "${DELIVER}/"
|
|
137
143
|
(cd "${DELIVER}" && sha256sum -- *.klib *.jar > artifacts.sha256 && cat artifacts.sha256)
|
|
@@ -237,3 +237,95 @@ diff --git a/navigation/navigation-compose/src/webMain/kotlin/androidx/navigatio
|
|
|
237
237
|
|
|
238
238
|
|
|
239
239
|
public actual val sizeTransform:
|
|
240
|
+
diff --git a/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/SkikoText.nonAndroid.kt b/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/SkikoText.nonAndroid.kt
|
|
241
|
+
--- a/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/SkikoText.nonAndroid.kt
|
|
242
|
+
+++ b/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/SkikoText.nonAndroid.kt
|
|
243
|
+
@@ -1,3 +1,4 @@
|
|
244
|
+
+// modified for Peach: Android static text uses integer glyph advances.
|
|
245
|
+
/*
|
|
246
|
+
* Copyright 2026 The Android Open Source Project
|
|
247
|
+
*
|
|
248
|
+
@@ -123,7 +124,7 @@
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
Platform.Android -> FontRasterizationSettings(
|
|
252
|
+
- subpixelPositioning = true,
|
|
253
|
+
+ subpixelPositioning = false,
|
|
254
|
+
smoothing = FontSmoothing.AntiAlias,
|
|
255
|
+
hinting = FontHinting.Slight,
|
|
256
|
+
autoHintingForced = false,
|
|
257
|
+
diff --git a/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/platform/SkikoParagraphBuilder.nonAndroid.kt b/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/platform/SkikoParagraphBuilder.nonAndroid.kt
|
|
258
|
+
--- a/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/platform/SkikoParagraphBuilder.nonAndroid.kt
|
|
259
|
+
+++ b/compose/ui/ui-skiko/src/nonAndroidMain/kotlin/androidx/compose/ui/text/platform/SkikoParagraphBuilder.nonAndroid.kt
|
|
260
|
+
@@ -1,3 +1,4 @@
|
|
261
|
+
+// modified for Peach: Android static font sizes and advances follow the native paint.
|
|
262
|
+
/*
|
|
263
|
+
* Copyright 2020 The Android Open Source Project
|
|
264
|
+
*
|
|
265
|
+
@@ -19,6 +20,10 @@
|
|
266
|
+
package androidx.compose.ui.text.platform
|
|
267
|
+
|
|
268
|
+
import androidx.compose.ui.InternalComposeUiApi
|
|
269
|
+
+import androidx.compose.ui.text.platform.Platform
|
|
270
|
+
+import androidx.compose.ui.text.platform.currentPlatform
|
|
271
|
+
+import androidx.compose.ui.text.style.TextMotion
|
|
272
|
+
+import kotlin.math.floor
|
|
273
|
+
import androidx.compose.ui.geometry.Size
|
|
274
|
+
import androidx.compose.ui.graphics.BlendMode
|
|
275
|
+
import androidx.compose.ui.graphics.Color
|
|
276
|
+
@@ -163,6 +168,8 @@
|
|
277
|
+
|
|
278
|
+
fun toSkTextStyle(fontFamilyResolver: FontFamily.Resolver): SkTextStyle {
|
|
279
|
+
val res = SkTextStyle()
|
|
280
|
+
+ val resolvedFontSize = if (currentPlatform() == Platform.Android &&
|
|
281
|
+
+ !fontRasterizationSettings.subpixelPositioning) floor(fontSize) else fontSize
|
|
282
|
+
if (textForegroundStyle.color.isSpecified) {
|
|
283
|
+
res.color = textForegroundStyle.color.toArgb()
|
|
284
|
+
}
|
|
285
|
+
@@ -194,7 +201,7 @@
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
letterSpacing?.let {
|
|
289
|
+
- res.letterSpacing = it
|
|
290
|
+
+ res.letterSpacing = if (fontSize == 0f) it else it * resolvedFontSize / fontSize
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
res.addFontFeatures(FontFeature.parseW3(fontFeatureSettings.orEmpty()))
|
|
294
|
+
@@ -338,6 +345,7 @@
|
|
295
|
+
blendMode: BlendMode = DrawScope.DefaultBlendMode,
|
|
296
|
+
lineHeight: TextUnit,
|
|
297
|
+
lineHeightStyle: LineHeightStyle?,
|
|
298
|
+
+ textMotion: TextMotion?,
|
|
299
|
+
) = ComputedStyle.Mutable(
|
|
300
|
+
textForegroundStyle = spanStyle.toParagraphTextForegroundStyle(),
|
|
301
|
+
brushSize = brushSize,
|
|
302
|
+
@@ -347,7 +355,10 @@
|
|
303
|
+
fontSynthesis = spanStyle.fontSynthesis,
|
|
304
|
+
fontFamily = spanStyle.fontFamily,
|
|
305
|
+
fontFeatureSettings = spanStyle.fontFeatureSettings,
|
|
306
|
+
- fontRasterizationSettings = platformParagraphStyle?.fontRasterizationSettings ?: FontRasterizationSettings.PlatformDefault,
|
|
307
|
+
+ fontRasterizationSettings = platformParagraphStyle?.fontRasterizationSettings ?:
|
|
308
|
+
+ if (currentPlatform() == Platform.Android && textMotion === TextMotion.Animated) {
|
|
309
|
+
+ FontRasterizationSettings(FontSmoothing.AntiAlias, FontHinting.Slight, true, false)
|
|
310
|
+
+ } else FontRasterizationSettings.PlatformDefault,
|
|
311
|
+
letterSpacing = if (spanStyle.letterSpacing.isSpecified) {
|
|
312
|
+
with(density) { spanStyle.letterSpacing.toPx() }
|
|
313
|
+
} else null,
|
|
314
|
+
@@ -401,6 +412,7 @@
|
|
315
|
+
blendMode = blendMode,
|
|
316
|
+
lineHeight = textStyle.lineHeight,
|
|
317
|
+
lineHeightStyle = textStyle.lineHeightStyle,
|
|
318
|
+
+ textMotion = textStyle.textMotion,
|
|
319
|
+
).toImmutable()
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@@ -609,7 +621,8 @@
|
|
323
|
+
brushSize = brushSize,
|
|
324
|
+
blendMode = blendMode,
|
|
325
|
+
lineHeight = textStyle.lineHeight,
|
|
326
|
+
- lineHeightStyle = textStyle.lineHeightStyle
|
|
327
|
+
+ lineHeightStyle = textStyle.lineHeightStyle,
|
|
328
|
+
+ textMotion = textStyle.textMotion,
|
|
329
|
+
)
|
|
330
|
+
for (i in 1 until activeStyles.size) {
|
|
331
|
+
style.merge(density, activeStyles[i])
|
package/kotlin/fork/fork.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"tag": "v1.13.0-alpha01",
|
|
19
19
|
"commit": "a9e47e8aa04c95cfe572ab4297c770f3cbfb234e",
|
|
20
20
|
"patch": "compose-worker-globals.patch",
|
|
21
|
-
"patchSha256": "
|
|
21
|
+
"patchSha256": "7a4002f6ea07fc78b23e8d16851b586521b221ba3e7a9690420b3c1d6be69cd9"
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "skiko",
|
|
@@ -28,6 +28,15 @@
|
|
|
28
28
|
"commit": "96378296bb23c23c5f30cd2b0d42d6f8fdeff730",
|
|
29
29
|
"patch": "skiko-worker-clock.patch",
|
|
30
30
|
"patchSha256": "735a42f7a9d3be1ab288f4d67bef44924ec2b6bbcd59f5a5f76edf22f912c347"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "skia",
|
|
34
|
+
"repository": "https://github.com/JetBrains/skia",
|
|
35
|
+
"license": "BSD-3-Clause",
|
|
36
|
+
"tag": "m152-2ca5fe6a81",
|
|
37
|
+
"commit": "2ca5fe6a8170e2f55f519d9de083be4dccc06e70",
|
|
38
|
+
"patch": "skia-android-shaping.patch",
|
|
39
|
+
"patchSha256": "1f1b656d8ae1144e3599dd900859202003784d14a52b3bb1da9349f3f8a322df"
|
|
31
40
|
}
|
|
32
41
|
]
|
|
33
42
|
}
|
package/kotlin/fork/publish.ts
CHANGED
|
@@ -22,7 +22,7 @@ const files = readdirSync(delivered)
|
|
|
22
22
|
const record = files.filter(
|
|
23
23
|
(name) =>
|
|
24
24
|
name.endsWith('.patch') ||
|
|
25
|
-
['fork.json', 'LICENSE', 'NOTICE', 'artifacts.sha256'].includes(name),
|
|
25
|
+
['fork.json', 'LICENSE', 'SKIA_LICENSE', 'NOTICE', 'artifacts.sha256'].includes(name),
|
|
26
26
|
)
|
|
27
27
|
if (
|
|
28
28
|
record.length !==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
diff --git a/modules/skshaper/src/SkShaper_harfbuzz.cpp b/modules/skshaper/src/SkShaper_harfbuzz.cpp
|
|
2
|
+
--- a/modules/skshaper/src/SkShaper_harfbuzz.cpp
|
|
3
|
+
+++ b/modules/skshaper/src/SkShaper_harfbuzz.cpp
|
|
4
|
+
@@ -346,10 +346,15 @@
|
|
5
|
+
// Creating a sub font means that non-available functions
|
|
6
|
+
// are found from the parent.
|
|
7
|
+
HBFont skFont(hb_font_create_sub_font(typefaceFont.get()));
|
|
8
|
+
+ // modified for the Android host: truncate static shaping size, preserving the run font.
|
|
9
|
+
+ auto* measurementFont = new SkFont(font);
|
|
10
|
+
+ if (!font.isSubpixel() && !font.isLinearMetrics()) {
|
|
11
|
+
+ measurementFont->setSize(SkScalarFloorToScalar(font.getSize()));
|
|
12
|
+
+ }
|
|
13
|
+
hb_font_set_funcs(skFont.get(), skhb_get_font_funcs(),
|
|
14
|
+
- reinterpret_cast<void *>(new SkFont(font)),
|
|
15
|
+
+ reinterpret_cast<void *>(measurementFont),
|
|
16
|
+
[](void* user_data){ delete reinterpret_cast<SkFont*>(user_data); });
|
|
17
|
+
- int scale = skhb_position(font.getSize());
|
|
18
|
+
+ int scale = skhb_position(measurementFont->getSize());
|
|
19
|
+
hb_font_set_scale(skFont.get(), scale, scale);
|
|
20
|
+
|
|
21
|
+
return skFont;
|
package/kotlin/toolchain.json
CHANGED
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"sha256": "63f16892ab6435778c60e217a0959516f4fcd46cad8862d6831f055ac30f09d8"
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
"name": "ui-skiko-wasm-js-1.13.0-alpha01-peach-
|
|
72
|
-
"url": "https://r2.rnxsim.com/peach-kotlin-fork/
|
|
73
|
-
"sha256": "
|
|
71
|
+
"name": "ui-skiko-wasm-js-1.13.0-alpha01-peach-1aa9f1b32539.klib",
|
|
72
|
+
"url": "https://r2.rnxsim.com/peach-kotlin-fork/1aa9f1b3253964ff20f60d6b057aa0ddaed0343e93d7b4defc613b3ed5b65c3d/ui-skiko-wasm-js-1.13.0-alpha01.klib",
|
|
73
|
+
"sha256": "1aa9f1b3253964ff20f60d6b057aa0ddaed0343e93d7b4defc613b3ed5b65c3d"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"name": "ui-text-wasm-js-1.13.0-alpha01-peach-10c54ff0fa5f.klib",
|
|
@@ -325,9 +325,9 @@
|
|
|
325
325
|
"skiko": "0.152.0-alpha02"
|
|
326
326
|
},
|
|
327
327
|
"composeRuntime": {
|
|
328
|
-
"name": "skiko-wasm-0.152.0-alpha02-peach-
|
|
329
|
-
"url": "https://r2.rnxsim.com/peach-kotlin-fork/
|
|
330
|
-
"sha256": "
|
|
328
|
+
"name": "skiko-wasm-0.152.0-alpha02-peach-637f2f8ae1fa.jar",
|
|
329
|
+
"url": "https://r2.rnxsim.com/peach-kotlin-fork/637f2f8ae1fa804fd5ef85259d7b45877b07dd98e439eb4f3cc9560db3eba651/skiko-wasm-0.152.0-alpha02.jar",
|
|
330
|
+
"sha256": "637f2f8ae1fa804fd5ef85259d7b45877b07dd98e439eb4f3cc9560db3eba651"
|
|
331
331
|
},
|
|
332
332
|
"composeJsLibraries": [
|
|
333
333
|
{
|
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export interface NativeAppIdentity {
|
|
|
23
23
|
bundleIdentifier: string
|
|
24
24
|
platform: NativeAppIdentityPlatform
|
|
25
25
|
permissionUsageDescriptions?: Readonly<Record<string, unknown>>
|
|
26
|
+
urlQuerySchemes?: readonly unknown[]
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export type NativeAppIdentityFiles = Record<string, string>
|
|
@@ -47,6 +48,8 @@ export function isNativeAppIdentity(value: unknown): value is NativeAppIdentity
|
|
|
47
48
|
if (!isRecord(value)) return false
|
|
48
49
|
const descriptions = value.permissionUsageDescriptions
|
|
49
50
|
if (descriptions !== undefined && !isRecord(descriptions)) return false
|
|
51
|
+
if (value.urlQuerySchemes !== undefined && !Array.isArray(value.urlQuerySchemes))
|
|
52
|
+
return false
|
|
50
53
|
const platform = value.platform
|
|
51
54
|
if (platform !== 'ios' && platform !== 'android') return false
|
|
52
55
|
const applicationName = value.applicationName
|
|
@@ -80,6 +83,9 @@ export function readNativeAppIdentity(value: unknown): NativeAppIdentity | null
|
|
|
80
83
|
: {
|
|
81
84
|
permissionUsageDescriptions: { ...value.permissionUsageDescriptions },
|
|
82
85
|
}),
|
|
86
|
+
...(value.urlQuerySchemes === undefined
|
|
87
|
+
? {}
|
|
88
|
+
: { urlQuerySchemes: [...value.urlQuerySchemes] }),
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -372,11 +378,21 @@ function nativeAppIdentityFromIos(
|
|
|
372
378
|
identityFieldFrom(settings, plistString(plist, 'CFBundleDisplayName'), undefined) ??
|
|
373
379
|
bundleName
|
|
374
380
|
|
|
375
|
-
//
|
|
376
|
-
//
|
|
377
|
-
// strings survive; the browser identity transport has no XML dependency.
|
|
381
|
+
// native purpose strings and URL query declarations travel here. parse XML
|
|
382
|
+
// with the build-side parser; the browser transport has no XML dependency.
|
|
378
383
|
const dictionary = parseInfoPlist(plist)
|
|
379
384
|
if (!isRecord(dictionary)) throw new Error('native app Info.plist is not a dictionary')
|
|
385
|
+
const querySchemes = dictionary.LSApplicationQueriesSchemes
|
|
386
|
+
if (querySchemes !== undefined && !Array.isArray(querySchemes)) {
|
|
387
|
+
throw new Error('native app Info.plist LSApplicationQueriesSchemes is not an array')
|
|
388
|
+
}
|
|
389
|
+
const urlQuerySchemes = (querySchemes ?? []).map((value: unknown) => {
|
|
390
|
+
if (typeof value !== 'string') return value
|
|
391
|
+
const resolved = resolveBuildSetting(value, settings)
|
|
392
|
+
if (resolved === null)
|
|
393
|
+
throw new Error('native app Info.plist LSApplicationQueriesSchemes is unresolved')
|
|
394
|
+
return resolved
|
|
395
|
+
})
|
|
380
396
|
const permissionUsageDescriptions: Record<string, unknown> = {}
|
|
381
397
|
for (const [key, value] of Object.entries(dictionary)) {
|
|
382
398
|
if (!/^NS.*UsageDescription$/.test(key)) continue
|
|
@@ -411,6 +427,7 @@ function nativeAppIdentityFromIos(
|
|
|
411
427
|
bundleIdentifier,
|
|
412
428
|
platform: 'ios',
|
|
413
429
|
permissionUsageDescriptions,
|
|
430
|
+
urlQuerySchemes,
|
|
414
431
|
}
|
|
415
432
|
}
|
|
416
433
|
|