@momo-kits/native-kits 0.163.1-beta.18-debug → 0.163.1-beta.19-debug
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/.claude/settings.local.json +27 -1
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/gradle.properties +1 -1
- package/ios/Button/Button.swift +21 -1
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/package.json +1 -1
|
@@ -80,7 +80,33 @@
|
|
|
80
80
|
"Bash(git rm *)",
|
|
81
81
|
"Bash(echo \"EXIT=$?\")",
|
|
82
82
|
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits diff sample/iosApp/iosApp/Demo/ButtonDemo.swift)",
|
|
83
|
-
"Bash(python3 *)"
|
|
83
|
+
"Bash(python3 *)",
|
|
84
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits status --short)",
|
|
85
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits log --oneline -3)",
|
|
86
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits log --oneline -5 -- ios/Button/Button.swift)",
|
|
87
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits diff ios/native-kits.podspec compose/compose.podspec gradle.properties package.json)",
|
|
88
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits show HEAD:ios/Button/Button.swift)",
|
|
89
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits diff package.json ios/native-kits.podspec)",
|
|
90
|
+
"Bash(grep -n \"must be a \\\\`.background\\\\` of the label\" /Users/sophia/Workspace/momo/momo-app/node_modules/@momo-kits/native-kits/ios/Button/Button.swift)",
|
|
91
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-native-kits show -s --format=\"%h %ci %s\" 953b234d)",
|
|
92
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-app show -s --format=\"%h %ci %s\" f8757a14437)",
|
|
93
|
+
"Bash(git -C /Users/sophia/Workspace/momo/momo-app log -S '\"@momo-kits/native-kits\": \"0.163.1-beta.18\"' --format=\"%h %ci %s\" -- package.json)",
|
|
94
|
+
"Bash(swiftc -O repro_isfull.swift -o repro_isfull)",
|
|
95
|
+
"Bash(./repro_isfull)",
|
|
96
|
+
"Bash(grep -n '^\\\\[32;1m$\\\\|section_start\\\\|xcodebuild.*-workspace\\\\|xcodebuild.*archive\\\\|Prebuilt\\\\|prebuilt\\\\|framework.*download\\\\|rugby\\\\|Rugby' /private/tmp/claude-503/-Users-sophia-Workspace-momo-momo-native-kits/7e2b5bd7-f8b3-42f7-b242-127fa8eabd12/scratchpad/job_trace.log)",
|
|
97
|
+
"Bash(grep -n '\\\\[32;1m\\\\$' /private/tmp/claude-503/-Users-sophia-Workspace-momo-momo-native-kits/7e2b5bd7-f8b3-42f7-b242-127fa8eabd12/scratchpad/job_trace.log)",
|
|
98
|
+
"Bash(npm pack *)",
|
|
99
|
+
"Bash(mkdir -p b13 b18)",
|
|
100
|
+
"Bash(tar xzf *)",
|
|
101
|
+
"Bash(git *)",
|
|
102
|
+
"Bash(tar -tzf momo-kits-native-kits-0.163.1-beta.18.tgz)",
|
|
103
|
+
"Bash(tar -xzf momo-kits-native-kits-0.163.1-beta.18.tgz package/ios/Button/Button.swift)",
|
|
104
|
+
"Bash(tar -xzf momo-kits-native-kits-0.162.28.tgz package/ios/Button/Button.swift -C .)",
|
|
105
|
+
"Bash(mkdir -p old)",
|
|
106
|
+
"Bash(tar -xzf momo-kits-native-kits-0.162.28.tgz -C old package/ios/Button/Button.swift)",
|
|
107
|
+
"Bash(nm '/private/tmp/claude-503/-Users-sophia-Workspace-momo-momo-native-kits/7e2b5bd7-f8b3-42f7-b242-127fa8eabd12/scratchpad/ipa_extract/Payload/MoMoPlatform UAT.app/MoMoPlatform UAT')",
|
|
108
|
+
"Bash(xcodebuild -workspace /Users/sophia/Workspace/momo/momo-native-kits/sample/iosApp/iosApp.xcworkspace -list)",
|
|
109
|
+
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme MoMoUIKits -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build)"
|
|
84
110
|
]
|
|
85
111
|
}
|
|
86
112
|
}
|
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
package/gradle.properties
CHANGED
package/ios/Button/Button.swift
CHANGED
|
@@ -249,7 +249,8 @@ public struct Button: View {
|
|
|
249
249
|
border: border,
|
|
250
250
|
borderWidth: borderWidth,
|
|
251
251
|
radius: size.radius,
|
|
252
|
-
height: size.height
|
|
252
|
+
height: size.height,
|
|
253
|
+
isFull: isFull
|
|
253
254
|
))
|
|
254
255
|
.disabled(!isEnabled)
|
|
255
256
|
}
|
|
@@ -277,11 +278,13 @@ private struct ButtonPressFeedbackStyle: ButtonStyle {
|
|
|
277
278
|
let borderWidth: CGFloat
|
|
278
279
|
let radius: CGFloat
|
|
279
280
|
let height: CGFloat
|
|
281
|
+
let isFull: Bool
|
|
280
282
|
|
|
281
283
|
func makeBody(configuration: Configuration) -> some View {
|
|
282
284
|
let pressed = configuration.isPressed && isEnabled
|
|
283
285
|
|
|
284
286
|
configuration.label
|
|
287
|
+
.modifier(HugContentOnLegacyOS(isFull: isFull))
|
|
285
288
|
.opacity(pressed ? 0.5 : 1)
|
|
286
289
|
.background(
|
|
287
290
|
RoundedRectangle(cornerRadius: radius)
|
|
@@ -297,3 +300,20 @@ private struct ButtonPressFeedbackStyle: ButtonStyle {
|
|
|
297
300
|
.animation(.easeInOut(duration: 0.1), value: pressed)
|
|
298
301
|
}
|
|
299
302
|
}
|
|
303
|
+
|
|
304
|
+
/// `ButtonStyleConfiguration.Label` is greedy on iOS 16 and earlier — it accepts
|
|
305
|
+
/// the full proposed width, so the background drawn in `makeBody` stretches past
|
|
306
|
+
/// the content even when `isFull == false`. iOS 17 fixed the label to hug its
|
|
307
|
+
/// content, so only legacy OSes need the `fixedSize` clamp (kept off on 17+ to
|
|
308
|
+
/// preserve tail truncation of long titles).
|
|
309
|
+
private struct HugContentOnLegacyOS: ViewModifier {
|
|
310
|
+
let isFull: Bool
|
|
311
|
+
|
|
312
|
+
func body(content: Content) -> some View {
|
|
313
|
+
if #available(iOS 17.0, *) {
|
|
314
|
+
content
|
|
315
|
+
} else {
|
|
316
|
+
content.fixedSize(horizontal: !isFull, vertical: false)
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
package/ios/native-kits.podspec
CHANGED