@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.
@@ -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
  }
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.163.1-beta.18-debug"
43
+ version = "0.163.1-beta.19-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.163.1-beta.18-debug'
3
+ spec.version = '0.163.1-beta.19-debug'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.163.1-beta.18
21
+ version=0.163.1-beta.19
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
@@ -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
+ }
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'MoMoUIKits'
3
- s.version = '0.163.1-beta.18'
3
+ s.version = '0.163.1-beta.19'
4
4
  s.summary = 'MoMoUIKits for iOS'
5
5
  s.homepage = 'https://momo.vn'
6
6
  s.license = { :type => 'MIT' }
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = 'MoMoUIKitsDemo'
3
- s.version = '0.163.1-beta.18'
3
+ s.version = '0.163.1-beta.19'
4
4
  s.summary = 'Demo browser for MoMoUIKits SwiftUI components'
5
5
  s.homepage = 'https://momo.vn'
6
6
  s.license = { :type => 'MIT' }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.163.1-beta.18-debug",
3
+ "version": "0.163.1-beta.19-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},