@swiftbrowser/swift 0.5.4 → 0.5.5
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/Sources/SwiftUI/API/Glass.swift +13 -12
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// iOS 26 Liquid Glass. The page has no refracting glass, so a glass effect
|
|
2
|
-
// is approximated by what it looks like at rest:
|
|
3
|
-
// (`
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
// as
|
|
10
|
-
// `.
|
|
2
|
+
// is approximated by what it looks like at rest: the `glass` material
|
|
3
|
+
// (`glassClear` for `.clear`: the bar buttons' translucent fill over a
|
|
4
|
+
// blurred backdrop, with the rim that catches the light; see styles.css)
|
|
5
|
+
// filling the given shape behind the view, under the glass's tint when it
|
|
6
|
+
// has one. The `interactive` response to touches (the glass swelling under
|
|
7
|
+
// a finger), the merging of nearby glass shapes in a `GlassEffectContainer`
|
|
8
|
+
// and the morphing between `glassEffectID`s are not drawn: containers lay
|
|
9
|
+
// their content out as given and ids are accepted. `.buttonStyle(.glass)`
|
|
10
|
+
// is a glass capsule (`glass`); `.glassProminent` draws as
|
|
11
|
+
// `.borderedProminent`.
|
|
11
12
|
|
|
12
13
|
/// The material of a glass effect.
|
|
13
14
|
public struct Glass: Equatable, Sendable {
|
|
@@ -36,7 +37,7 @@ public struct Glass: Equatable, Sendable {
|
|
|
36
37
|
Glass(variant: variant, tintColor: tintColor, isInteractive: isEnabled)
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
var material: Material { variant == .clear ?
|
|
40
|
+
var material: Material { Material(name: variant == .clear ? "glassClear" : "glass") }
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
/// The glass behind a view: the material, then the tint, in the shape.
|
|
@@ -104,11 +105,11 @@ extension GlassEffectContainer: _GroupView {
|
|
|
104
105
|
|
|
105
106
|
// MARK: - Glass button styles
|
|
106
107
|
|
|
107
|
-
/// `.buttonStyle(.glass)`:
|
|
108
|
+
/// `.buttonStyle(.glass)`: a Liquid Glass capsule (sized like `.bordered`).
|
|
108
109
|
public struct GlassButtonStyle: PrimitiveButtonStyle {
|
|
109
110
|
public init() {}
|
|
110
111
|
public init(_ glass: Glass) {}
|
|
111
|
-
public var _name: String { "
|
|
112
|
+
public var _name: String { "glass" }
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/// `.buttonStyle(.glassProminent)`: drawn as `.borderedProminent` (a tinted capsule).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swiftbrowser/swift",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "The SwiftBrowser Swift package (the SwiftUI shim, Charts, SwiftData and FoundationBridge) as an npm package, so @swiftbrowser/cli builds apps against the exact version it ships with.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|