@ajuarezso/capacitor-liquid-glass 0.2.0 → 0.3.0

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.
@@ -16,8 +16,11 @@ export interface LiquidGlassTabItem {
16
16
  * more see-through than default.
17
17
  * - `'transparent'`: no background, no blur — content behind shows through 100%.
18
18
  * Trade-off: legibilidad puede sufrir sobre contenido caótico.
19
+ * - `'liquidGlass'`: REAL iOS 26 `UIGlassEffect` — el mismo material que usan
20
+ * Music y App Store. En iOS < 26 cae a `UIBlurEffect.systemThinMaterial`
21
+ * (aproximación cercana con system vibrancy).
19
22
  */
20
- export type TabBarStyle = 'default' | 'ultraThin' | 'transparent';
23
+ export type TabBarStyle = 'default' | 'ultraThin' | 'transparent' | 'liquidGlass';
21
24
  export interface ShowTabBarOptions {
22
25
  items: LiquidGlassTabItem[];
23
26
  /** Index of the initially selected item. Defaults to 0. */
@@ -29,6 +29,9 @@ enum LiquidGlassTabBarStyle: String {
29
29
  case ultraThin
30
30
  /// No background, no blur — content behind shows through 100%.
31
31
  case transparent
32
+ /// REAL iOS 26 `UIGlassEffect` (Music + App Store material).
33
+ /// Fallback en iOS < 26 → `UIBlurEffect.systemThinMaterial`.
34
+ case liquidGlass
32
35
  }
33
36
 
34
37
  /// A floating UITabBar overlay that adopts iOS 26 Liquid Glass automatically
@@ -87,6 +90,23 @@ final class LiquidGlassTabBarOverlay: NSObject {
87
90
  appearance.backgroundEffect = nil
88
91
  appearance.backgroundColor = UIColor.clear
89
92
  appearance.shadowColor = UIColor.clear
93
+ case .liquidGlass:
94
+ // REAL iOS 26 Liquid Glass — el mismo material que usan Music y
95
+ // App Store. `UIGlassEffect` solo está disponible compilando con
96
+ // el SDK iOS 26+ (Xcode 26+). En iOS < 26 runtime cae a
97
+ // `systemThinMaterial`, que es la mejor aproximación legacy con
98
+ // vibrancy del sistema.
99
+ appearance.configureWithDefaultBackground()
100
+ #if compiler(>=6.1)
101
+ if #available(iOS 26.0, *) {
102
+ appearance.backgroundEffect = UIGlassEffect()
103
+ } else {
104
+ appearance.backgroundEffect = UIBlurEffect(style: .systemThinMaterial)
105
+ }
106
+ #else
107
+ appearance.backgroundEffect = UIBlurEffect(style: .systemThinMaterial)
108
+ #endif
109
+ appearance.backgroundColor = UIColor.clear
90
110
  }
91
111
  tabBar.standardAppearance = appearance
92
112
  if #available(iOS 15.0, *) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ajuarezso/capacitor-liquid-glass",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "iOS 26 Liquid Glass native chrome (TabBar, NavigationBar, Alerts, Sheets) for Capacitor apps. Falls back gracefully on iOS < 26 and Android.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",