@craft-native/ios 0.0.374 → 0.0.375
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
|
@@ -63,7 +63,16 @@ struct CraftLiveActivityWidget: Widget {
|
|
|
63
63
|
} compactTrailing: {
|
|
64
64
|
timer(context).monospacedDigit().frame(width: 64, alignment: .trailing)
|
|
65
65
|
} minimal: {
|
|
66
|
-
|
|
66
|
+
// When another activity (for example Music) shares the island,
|
|
67
|
+
// the minimal presentation must still carry useful live state.
|
|
68
|
+
if context.state.remainingSeconds != nil || context.state.timerEndsAt != nil {
|
|
69
|
+
timer(context).font(.caption2.monospacedDigit().weight(.semibold))
|
|
70
|
+
.frame(width: 48).minimumScaleFactor(0.65)
|
|
71
|
+
} else if let bpm = context.state.heartRate, bpm > 0 {
|
|
72
|
+
Text("\(Int(bpm))").font(.caption.monospacedDigit()).foregroundStyle(.pink)
|
|
73
|
+
} else {
|
|
74
|
+
timer(context).font(.caption2.monospacedDigit()).frame(width: 48)
|
|
75
|
+
}
|
|
67
76
|
}
|
|
68
77
|
.widgetURL(context.attributes.deepLink.flatMap(URL.init(string:)))
|
|
69
78
|
.keylineTint(tint(context))
|
|
@@ -104,6 +113,9 @@ struct CraftLiveActivityWidget: Widget {
|
|
|
104
113
|
.lineLimit(1)
|
|
105
114
|
.minimumScaleFactor(0.8)
|
|
106
115
|
}
|
|
116
|
+
// Dynamic Island is black even when the host app uses light mode.
|
|
117
|
+
// Explicit ink also applies to the ticking Text inside the overlay.
|
|
118
|
+
.foregroundStyle(.white)
|
|
107
119
|
}
|
|
108
120
|
|
|
109
121
|
@ViewBuilder
|