first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

2
node_modules/expo-glass-effect/.eslintrc.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');

105
node_modules/expo-glass-effect/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,105 @@
# Changelog
## Unpublished
### 🛠 Breaking changes
### 🎉 New features
### 🐛 Bug fixes
### 💡 Others
## 55.0.7 — 2026-02-25
### 🐛 Bug fixes
- Fix `isInteractive` not applying when `glassEffectStyle` has `animate: true`. ([#43330](https://github.com/expo/expo/pull/43330) by [@nishan](https://github.com/intergalacticspacehighway))
- Fix glass effect not rendering on first visit to a non-initial tab in tab navigator. ([#43330](https://github.com/expo/expo/pull/43330) by [@nishan](https://github.com/intergalacticspacehighway))
## 55.0.6 — 2026-02-16
_This version does not introduce any user-facing changes._
## 55.0.5 — 2026-02-08
### 🎉 New features
- Add animation config to `glassEffectStyle` ([#42005](https://github.com/expo/expo/pull/42005) by [@nishan](https://github.com/intergalacticspacehighway))
## 55.0.4 — 2026-02-03
_This version does not introduce any user-facing changes._
## 55.0.3 — 2026-01-27
_This version does not introduce any user-facing changes._
## 55.0.2 — 2026-01-26
_This version does not introduce any user-facing changes._
## 55.0.1 — 2026-01-22
_This version does not introduce any user-facing changes._
## 55.0.0 — 2026-01-21
- Add ref prop type to `GlassContainer` and `GlassView` components ([#41799](https://github.com/expo/expo/pull/41799) by [@pchalupa](https://github.com/pchalupa))
### 🎉 New features
- Add `isGlassEffectAPIAvailable` API to prevent some iOS 26 beta version crashes ([#40992](https://github.com/expo/expo/pull/40992) by [@nishan](https://github.com/intergalacticspacehighway))
- Add `tvOS` support ([#41962](https://github.com/expo/expo/pull/41962) by [@nishan](https://github.com/intergalacticspacehighway))
- Add `colorScheme` prop to override user interface style of `GlassView` ([#42164](https://github.com/expo/expo/pull/42164) by [@nishan](https://github.com/intergalacticspacehighway))
## 0.1.8 - 2025-12-05
_This version does not introduce any user-facing changes._
## 0.1.7 - 2025-11-13
_This version does not introduce any user-facing changes._
## 0.1.6 - 2025-11-03
### 🐛 Bug fixes
- Fix `border(Left|Right|Start|End)Radius` ([#40780](https://github.com/expo/expo/pull/40780) by [@nishan](https://github.com/intergalacticspacehighway)) ([#40780](https://github.com/expo/expo/pull/40780) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- Fix crash on `UIGlassEffect` initialiser on iOS 26 beta ([#40920](https://github.com/expo/expo/pull/40920) by [@nishan](https://github.com/intergalacticspacehighway)) ([#40920](https://github.com/expo/expo/pull/40920) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
### 💡 Others
- Fixed XCode 16.4 compilation ([#40686](https://github.com/expo/expo/pull/40686) by [@nishan](https://github.com/intergalacticspacehighway)) ([#40686](https://github.com/expo/expo/pull/40686) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
## 0.1.5 - 2025-10-28
### 🎉 New features
- Add non-uniform border radius support to `GlassView` ([#40570](https://github.com/expo/expo/pull/40570) by [@nishan](https://github.com/intergalacticspacehighway)) ([#40570](https://github.com/expo/expo/pull/40570) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
## 0.1.4 - 2025-09-17
### 🐛 Bug fixes
- Set default glass style to regular ([#39732](https://github.com/expo/expo/pull/39732) by [@brentvatne](https://github.com/brentvatne))
## 0.1.3 — 2025-09-12
### 🎉 New features
Add child view support to <GlassView />, allowing child views to inherit animations from the parent view. ([#39595](https://github.com/expo/expo/pull/39595) by [@patrikduksin](https://github.com/patrikduksin))
## 0.1.2 — 2025-09-11
_This version does not introduce any user-facing changes._
## 0.1.1 — 2025-09-04
### 💡 Others
- Move `isLiquidGlassAvailable` function to `ExpoGlassEffect` ([#39349](https://github.com/expo/expo/pull/39349) by [@Ubax](https://github.com/Ubax))
## 0.1.0 — 2025-09-03
_This version does not introduce any user-facing changes._

35
node_modules/expo-glass-effect/README.md generated vendored Normal file
View File

@@ -0,0 +1,35 @@
# Expo GlassEffect
React components that render native iOS liquid glass effect using [UIVisualEffectView](https://developer.apple.com/documentation/uikit/uivisualeffectview). Supports customizable glass styles and tint color.
# API documentation
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/glass-effect/)
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/glass-effect/)
# Installation in managed Expo projects
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/glass-effect/).
# Installation in bare React Native projects
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
### Add the package to your npm dependencies
```
npx expo install expo-glass-effect
```
### Configure for Android
> [!note]
> This package only supports iOS 26+. On unsupported platforms, it will fallback to a regular `View`.
### Configure for iOS
Run `npx pod-install` after installing the npm package.
# Contributing
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).

View File

@@ -0,0 +1,4 @@
import React from 'react';
import { GlassContainerProps } from './GlassContainer.types';
export default function GlassContainer(props: GlassContainerProps): React.JSX.Element;
//# sourceMappingURL=GlassContainer.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.d.ts","sourceRoot":"","sources":["../src/GlassContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAEhE"}

View File

@@ -0,0 +1,4 @@
import { GlassContainerProps } from './GlassContainer.types';
declare const NativeGlassContainer: import("react").ComponentType<GlassContainerProps>;
export default NativeGlassContainer;
//# sourceMappingURL=GlassContainer.ios.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.ios.d.ts","sourceRoot":"","sources":["../src/GlassContainer.ios.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,QAAA,MAAM,oBAAoB,oDAGzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}

View File

@@ -0,0 +1,6 @@
// Copyright © 2024 650 Industries.
'use client';
import { requireNativeViewManager } from 'expo-modules-core';
const NativeGlassContainer = requireNativeViewManager('ExpoGlassEffect', 'GlassContainer');
export default NativeGlassContainer;
//# sourceMappingURL=GlassContainer.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.ios.js","sourceRoot":"","sources":["../src/GlassContainer.ios.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC,YAAY,CAAC;AAEb,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,oBAAoB,GAAG,wBAAwB,CACnD,iBAAiB,EACjB,gBAAgB,CACjB,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n\n'use client';\n\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nimport { GlassContainerProps } from './GlassContainer.types';\n\nconst NativeGlassContainer = requireNativeViewManager<GlassContainerProps>(\n 'ExpoGlassEffect',\n 'GlassContainer'\n);\n\nexport default NativeGlassContainer;\n"]}

View File

@@ -0,0 +1,8 @@
// Copyright © 2024 650 Industries.
'use client';
import React from 'react';
import { View } from 'react-native';
export default function GlassContainer(props) {
return <View {...props}/>;
}
//# sourceMappingURL=GlassContainer.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.js","sourceRoot":"","sources":["../src/GlassContainer.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n\n'use client';\n\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { GlassContainerProps } from './GlassContainer.types';\n\nexport default function GlassContainer(props: GlassContainerProps) {\n return <View {...props} />;\n}\n"]}

View File

@@ -0,0 +1,12 @@
import { type Ref } from 'react';
import { View, type ViewProps } from 'react-native';
export type GlassContainerProps = {
/**
* The distance at which glass elements start affecting each other.
* Controls when glass elements begin to merge together.
* @default undefined
*/
spacing?: number;
ref?: Ref<View>;
} & ViewProps;
//# sourceMappingURL=GlassContainer.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.types.d.ts","sourceRoot":"","sources":["../src/GlassContainer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;CACjB,GAAG,SAAS,CAAC"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=GlassContainer.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassContainer.types.js","sourceRoot":"","sources":["../src/GlassContainer.types.ts"],"names":[],"mappings":"","sourcesContent":["import { type Ref } from 'react';\nimport { View, type ViewProps } from 'react-native';\n\nexport type GlassContainerProps = {\n /**\n * The distance at which glass elements start affecting each other.\n * Controls when glass elements begin to merge together.\n * @default undefined\n */\n spacing?: number;\n ref?: Ref<View>;\n} & ViewProps;\n"]}

4
node_modules/expo-glass-effect/build/GlassView.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import React from 'react';
import { GlassViewProps } from './GlassView.types';
export default function GlassView(props: GlassViewProps): React.JSX.Element;
//# sourceMappingURL=GlassView.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.d.ts","sourceRoot":"","sources":["../src/GlassView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,qBAEtD"}

View File

@@ -0,0 +1,4 @@
import { GlassViewProps } from './GlassView.types';
declare const GlassView: (props: GlassViewProps) => import("react").JSX.Element;
export default GlassView;
//# sourceMappingURL=GlassView.ios.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.ios.d.ts","sourceRoot":"","sources":["../src/GlassView.ios.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,QAAA,MAAM,SAAS,GAAI,OAAO,cAAc,gCAEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}

View File

@@ -0,0 +1,9 @@
// Copyright © 2024 650 Industries.
'use client';
import { requireNativeViewManager } from 'expo-modules-core';
const NativeGlassView = requireNativeViewManager('ExpoGlassEffect', 'GlassView');
const GlassView = (props) => {
return <NativeGlassView {...props}/>;
};
export default GlassView;
//# sourceMappingURL=GlassView.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.ios.js","sourceRoot":"","sources":["../src/GlassView.ios.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC,YAAY,CAAC;AAEb,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,MAAM,eAAe,GAAG,wBAAwB,CAAiB,iBAAiB,EAAE,WAAW,CAAC,CAAC;AAEjG,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC1C,OAAO,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n\n'use client';\n\nimport { requireNativeViewManager } from 'expo-modules-core';\n\nimport { GlassViewProps } from './GlassView.types';\n\nconst NativeGlassView = requireNativeViewManager<GlassViewProps>('ExpoGlassEffect', 'GlassView');\n\nconst GlassView = (props: GlassViewProps) => {\n return <NativeGlassView {...props} />;\n};\n\nexport default GlassView;\n"]}

8
node_modules/expo-glass-effect/build/GlassView.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
// Copyright © 2024 650 Industries.
'use client';
import React from 'react';
import { View } from 'react-native';
export default function GlassView(props) {
return <View {...props}/>;
}
//# sourceMappingURL=GlassView.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.js","sourceRoot":"","sources":["../src/GlassView.tsx"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AAC7B,CAAC","sourcesContent":["// Copyright © 2024 650 Industries.\n\n'use client';\n\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { GlassViewProps } from './GlassView.types';\n\nexport default function GlassView(props: GlassViewProps) {\n return <View {...props} />;\n}\n"]}

View File

@@ -0,0 +1,45 @@
import { type Ref } from 'react';
import { View, type ViewProps } from 'react-native';
export type GlassStyle = 'clear' | 'regular' | 'none';
export type GlassEffectStyleConfig = {
/**
* The glass effect style to apply.
*/
style: GlassStyle;
/**
* Whether to animate the style change.
* @default false
*/
animate?: boolean;
/**
* Duration of the animation in seconds. Uses system default if not specified.
*/
animationDuration?: number;
};
export type GlassColorScheme = 'auto' | 'light' | 'dark';
export type GlassViewProps = {
/**
* Glass effect style to apply to the view.
* Can be a simple string ('clear', 'regular', 'none') or a config object
* for controlling animation behavior.
* @default 'regular'
*/
glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
/**
* Tint color to apply to the glass effect.
*/
tintColor?: string;
/**
* Whether the glass effect should be interactive.
* @default false
*/
isInteractive?: boolean;
/**
* The color scheme for the glass effect appearance.
* Use this to override the system appearance when your app has its own theme toggle.
* @default 'auto'
*/
colorScheme?: GlassColorScheme;
ref?: Ref<View>;
} & ViewProps;
//# sourceMappingURL=GlassView.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.types.d.ts","sourceRoot":"","sources":["../src/GlassView.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,UAAU,GAAG,sBAAsB,CAAC;IACvD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;CACjB,GAAG,SAAS,CAAC"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=GlassView.types.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"GlassView.types.js","sourceRoot":"","sources":["../src/GlassView.types.ts"],"names":[],"mappings":"","sourcesContent":["import { type Ref } from 'react';\nimport { View, type ViewProps } from 'react-native';\n\nexport type GlassStyle = 'clear' | 'regular' | 'none';\n\nexport type GlassEffectStyleConfig = {\n /**\n * The glass effect style to apply.\n */\n style: GlassStyle;\n /**\n * Whether to animate the style change.\n * @default false\n */\n animate?: boolean;\n /**\n * Duration of the animation in seconds. Uses system default if not specified.\n */\n animationDuration?: number;\n};\n\nexport type GlassColorScheme = 'auto' | 'light' | 'dark';\n\nexport type GlassViewProps = {\n /**\n * Glass effect style to apply to the view.\n * Can be a simple string ('clear', 'regular', 'none') or a config object\n * for controlling animation behavior.\n * @default 'regular'\n */\n glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;\n /**\n * Tint color to apply to the glass effect.\n */\n tintColor?: string;\n /**\n * Whether the glass effect should be interactive.\n * @default false\n */\n isInteractive?: boolean;\n /**\n * The color scheme for the glass effect appearance.\n * Use this to override the system appearance when your app has its own theme toggle.\n * @default 'auto'\n */\n colorScheme?: GlassColorScheme;\n ref?: Ref<View>;\n} & ViewProps;\n"]}

7
node_modules/expo-glass-effect/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export { default as GlassView } from './GlassView';
export { GlassColorScheme, GlassEffectStyleConfig, GlassStyle, GlassViewProps, } from './GlassView.types';
export { default as GlassContainer } from './GlassContainer';
export { GlassContainerProps } from './GlassContainer.types';
export { isLiquidGlassAvailable } from './isLiquidGlassAvailable';
export { isGlassEffectAPIAvailable } from './isGlassEffectAPIAvailable';
//# sourceMappingURL=index.d.ts.map

1
node_modules/expo-glass-effect/build/index.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,UAAU,EACV,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}

5
node_modules/expo-glass-effect/build/index.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export { default as GlassView } from './GlassView';
export { default as GlassContainer } from './GlassContainer';
export { isLiquidGlassAvailable } from './isLiquidGlassAvailable';
export { isGlassEffectAPIAvailable } from './isGlassEffectAPIAvailable';
//# sourceMappingURL=index.js.map

1
node_modules/expo-glass-effect/build/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAOnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { default as GlassView } from './GlassView';\nexport {\n GlassColorScheme,\n GlassEffectStyleConfig,\n GlassStyle,\n GlassViewProps,\n} from './GlassView.types';\nexport { default as GlassContainer } from './GlassContainer';\nexport { GlassContainerProps } from './GlassContainer.types';\nexport { isLiquidGlassAvailable } from './isLiquidGlassAvailable';\nexport { isGlassEffectAPIAvailable } from './isGlassEffectAPIAvailable';\n"]}

View File

@@ -0,0 +1,10 @@
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export declare function isGlassEffectAPIAvailable(): boolean;
//# sourceMappingURL=isGlassEffectAPIAvailable.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isGlassEffectAPIAvailable.d.ts","sourceRoot":"","sources":["../src/isGlassEffectAPIAvailable.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD"}

View File

@@ -0,0 +1,10 @@
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export declare function isGlassEffectAPIAvailable(): boolean;
//# sourceMappingURL=isGlassEffectAPIAvailable.ios.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isGlassEffectAPIAvailable.ios.d.ts","sourceRoot":"","sources":["../src/isGlassEffectAPIAvailable.ios.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAMnD"}

View File

@@ -0,0 +1,18 @@
import { requireNativeModule } from 'expo-modules-core';
let IS_GLASS_EFFECT_API_AVAILABLE;
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export function isGlassEffectAPIAvailable() {
if (IS_GLASS_EFFECT_API_AVAILABLE === undefined) {
IS_GLASS_EFFECT_API_AVAILABLE =
requireNativeModule('ExpoGlassEffect').isGlassEffectAPIAvailable;
}
return !!IS_GLASS_EFFECT_API_AVAILABLE;
}
//# sourceMappingURL=isGlassEffectAPIAvailable.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isGlassEffectAPIAvailable.ios.js","sourceRoot":"","sources":["../src/isGlassEffectAPIAvailable.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,IAAI,6BAAkD,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB;IACvC,IAAI,6BAA6B,KAAK,SAAS,EAAE,CAAC;QAChD,6BAA6B;YAC3B,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,yBAAyB,CAAC;IACrE,CAAC;IACD,OAAO,CAAC,CAAC,6BAA6B,CAAC;AACzC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nlet IS_GLASS_EFFECT_API_AVAILABLE: boolean | undefined;\n\n/**\n * Checks whether the Liquid Glass API is available at runtime on the device.\n *\n * This method was added because some iOS 26 beta versions do not have this API available, which can\n * lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.\n * @see https://github.com/expo/expo/issues/40911\n * @platform ios\n */\nexport function isGlassEffectAPIAvailable(): boolean {\n if (IS_GLASS_EFFECT_API_AVAILABLE === undefined) {\n IS_GLASS_EFFECT_API_AVAILABLE =\n requireNativeModule('ExpoGlassEffect').isGlassEffectAPIAvailable;\n }\n return !!IS_GLASS_EFFECT_API_AVAILABLE;\n}\n"]}

View File

@@ -0,0 +1,12 @@
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export function isGlassEffectAPIAvailable() {
return false;
}
//# sourceMappingURL=isGlassEffectAPIAvailable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isGlassEffectAPIAvailable.js","sourceRoot":"","sources":["../src/isGlassEffectAPIAvailable.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,UAAU,yBAAyB;IACvC,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Checks whether the Liquid Glass API is available at runtime on the device.\n *\n * This method was added because some iOS 26 beta versions do not have this API available, which can\n * lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.\n * @see https://github.com/expo/expo/issues/40911\n * @platform ios\n */\n\nexport function isGlassEffectAPIAvailable(): boolean {\n return false;\n}\n"]}

View File

@@ -0,0 +1,11 @@
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*/
export declare function isLiquidGlassAvailable(): boolean;
//# sourceMappingURL=isLiquidGlassAvailable.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isLiquidGlassAvailable.d.ts","sourceRoot":"","sources":["../src/isLiquidGlassAvailable.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}

View File

@@ -0,0 +1,13 @@
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*
* @platform ios
*/
export declare function isLiquidGlassAvailable(): boolean;
//# sourceMappingURL=isLiquidGlassAvailable.ios.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isLiquidGlassAvailable.ios.d.ts","sourceRoot":"","sources":["../src/isLiquidGlassAvailable.ios.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAKhD"}

View File

@@ -0,0 +1,20 @@
import { requireNativeModule } from 'expo-modules-core';
let IS_LIQUID_GLASS_AVAILABLE;
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*
* @platform ios
*/
export function isLiquidGlassAvailable() {
if (IS_LIQUID_GLASS_AVAILABLE === undefined) {
IS_LIQUID_GLASS_AVAILABLE = requireNativeModule('ExpoGlassEffect').isLiquidGlassAvailable;
}
return !!IS_LIQUID_GLASS_AVAILABLE;
}
//# sourceMappingURL=isLiquidGlassAvailable.ios.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isLiquidGlassAvailable.ios.js","sourceRoot":"","sources":["../src/isLiquidGlassAvailable.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,IAAI,yBAA8C,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sBAAsB;IACpC,IAAI,yBAAyB,KAAK,SAAS,EAAE,CAAC;QAC5C,yBAAyB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,sBAAsB,CAAC;IAC5F,CAAC;IACD,OAAO,CAAC,CAAC,yBAAyB,CAAC;AACrC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nlet IS_LIQUID_GLASS_AVAILABLE: boolean | undefined;\n\n/**\n * Indicates whether the app is using the Liquid Glass design. The value will be `true` when the\n * Liquid Glass components are available in the app.\n *\n * This only checks for component availability. The value may also be `true` if the user has enabled\n * accessibility settings that limit the Liquid Glass effect.\n * To check if the user has disabled the Liquid Glass effect via accessibility settings, use\n * [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).\n *\n * @platform ios\n */\nexport function isLiquidGlassAvailable(): boolean {\n if (IS_LIQUID_GLASS_AVAILABLE === undefined) {\n IS_LIQUID_GLASS_AVAILABLE = requireNativeModule('ExpoGlassEffect').isLiquidGlassAvailable;\n }\n return !!IS_LIQUID_GLASS_AVAILABLE;\n}\n"]}

View File

@@ -0,0 +1,13 @@
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*/
export function isLiquidGlassAvailable() {
return false;
}
//# sourceMappingURL=isLiquidGlassAvailable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"isLiquidGlassAvailable.js","sourceRoot":"","sources":["../src/isLiquidGlassAvailable.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Indicates whether the app is using the Liquid Glass design. The value will be `true` when the\n * Liquid Glass components are available in the app.\n *\n * This only checks for component availability. The value may also be `true` if the user has enabled\n * accessibility settings that limit the Liquid Glass effect.\n * To check if the user has disabled the Liquid Glass effect via accessibility settings, use\n * [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).\n */\nexport function isLiquidGlassAvailable(): boolean {\n return false;\n}\n"]}

View File

@@ -0,0 +1,7 @@
{
"platforms": ["apple"],
"apple": {
"modules": ["GlassEffectModule"]
},
"android": {}
}

View File

@@ -0,0 +1,28 @@
require 'json'
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
Pod::Spec.new do |s|
s.name = 'ExpoGlassEffect'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = package['license']
s.author = package['author']
s.homepage = package['homepage']
s.platforms = {
:ios => '15.1',
:tvos => '15.1',
}
s.source = { git: 'https://github.com/expo/expo.git' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
s.source_files = "**/*.h"
s.vendored_frameworks = "#{s.name}.xcframework"
else
s.source_files = "**/*.{h,m,swift}"
end
end

View File

@@ -0,0 +1,56 @@
// Copyright 2022-present 650 Industries. All rights reserved.
import ExpoModulesCore
public final class GlassContainer: ExpoView {
private var containerEffect: Any?
private var containerEffectView = UIVisualEffectView()
private var containerSpacing: CGFloat?
public required init(appContext: AppContext? = nil) {
super.init(appContext: appContext)
containerEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(containerEffectView)
}
// UIGlassEffect initialiser is failing for iOS 26 beta versions for some reason, so we need to check if it's available at runtime
// https://github.com/expo/expo/issues/40911
private func isGlassContainerEffectAvailable() -> Bool {
#if compiler(>=6.2)
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
return NSClassFromString("UIGlassContainerEffect") != nil
}
#endif
return false
}
func setSpacing(_ spacing: CGFloat?) {
if containerSpacing != spacing {
containerSpacing = spacing
guard isGlassContainerEffectAvailable() else {
return
}
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
#if compiler(>=6.2) // Xcode 26
let effect = UIGlassContainerEffect()
if let spacing = spacing {
effect.spacing = spacing
}
containerEffectView.effect = effect
containerEffect = effect
#endif
}
}
}
public override func mountChildComponentView(_ childComponentView: UIView, index: Int) {
containerEffectView.contentView.insertSubview(childComponentView, at: index)
}
public override func unmountChildComponentView(_ childComponentView: UIView, index: Int) {
childComponentView.removeFromSuperview()
}
}

View File

@@ -0,0 +1,106 @@
// Copyright 2022-present 650 Industries. All rights reserved.
import ExpoModulesCore
public final class GlassEffectModule: Module {
public func definition() -> ModuleDefinition {
Name("ExpoGlassEffect")
Constant("isLiquidGlassAvailable") {
#if compiler(>=6.2) // Xcode 26
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) { // iOS 26
if let infoPlist = Bundle.main.infoDictionary,
let requiresCompatibility = infoPlist["UIDesignRequiresCompatibility"] as? Bool {
// TODO(@uabx): Add a check for maximum SDK version when apple disables this flag
return !requiresCompatibility // If the app requires compatibility then it will not use liquid glass
}
return true
}
#endif
return false
}
Constant("isGlassEffectAPIAvailable") {
#if compiler(>=6.2)
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else {
return false
}
let respondsToSelector = glassEffectClass.responds(to: Selector(("effectWithStyle:")))
return respondsToSelector
}
#endif
return false
}
View(GlassView.self) {
Prop("glassEffectStyle") { (view, config: Either<GlassStyle, GlassEffectStyleConfig>?) in
if let styleConfig: GlassEffectStyleConfig = config?.get() {
view.setGlassStyle(styleConfig)
} else if let style: GlassStyle = config?.get() {
view.setGlassStyle(style)
} else {
view.setGlassStyle(.regular)
}
}
Prop("tintColor") { (view, tintColor: UIColor?) in
view.setTintColor(tintColor)
}
Prop("isInteractive") { (view, interactive: Bool) in
view.setInteractive(interactive)
}
Prop("colorScheme", .auto) { (view, colorScheme: GlassColorScheme) in
view.setColorScheme(colorScheme)
}
Prop("borderRadius") { (view, border: CGFloat?) in
view.setBorderRadius(border)
}
Prop("borderBottomLeftRadius") { (view, radius: CGFloat?) in
view.setBorderBottomLeftRadius(radius)
}
Prop("borderBottomRightRadius") { (view, radius: CGFloat?) in
view.setBorderBottomRightRadius(radius)
}
Prop("borderTopLeftRadius") { (view, radius: CGFloat?) in
view.setBorderTopLeftRadius(radius)
}
Prop("borderTopRightRadius") { (view, radius: CGFloat?) in
view.setBorderTopRightRadius(radius)
}
Prop("borderTopStartRadius") { (view, radius: CGFloat?) in
view.setBorderTopStartRadius(radius)
}
Prop("borderTopEndRadius") { (view, radius: CGFloat?) in
view.setBorderTopEndRadius(radius)
}
Prop("borderBottomStartRadius") { (view, radius: CGFloat?) in
view.setBorderBottomStartRadius(radius)
}
Prop("borderBottomEndRadius") { (view, radius: CGFloat?) in
view.setBorderBottomEndRadius(radius)
}
Prop("borderCurve") { (view, curve: String?) in
view.setBorderCurve(curve)
}
}
View(GlassContainer.self) {
Prop("spacing") { (view, spacing: CGFloat?) in
view.setSpacing(spacing)
}
}
}
}

50
node_modules/expo-glass-effect/ios/GlassStyle.swift generated vendored Normal file
View File

@@ -0,0 +1,50 @@
import ExpoModulesCore
import UIKit
public enum GlassStyle: String, Enumerable {
case clear
case regular
case none
#if compiler(>=6.2) // Xcode 26
@available(iOS 26.0, tvOS 26.0, macOS 26.0, *)
func toUIGlassEffectStyle() -> UIGlassEffect.Style? {
switch self {
case .clear:
return .clear
case .regular:
return .regular
case .none:
return nil
}
}
#endif
}
internal struct GlassEffectStyleConfig: Record {
@Field
var style: GlassStyle = .regular
@Field
var animate: Bool = false
@Field
var animationDuration: Double?
}
internal enum GlassColorScheme: String, Enumerable {
case auto
case light
case dark
func toUIUserInterfaceStyle() -> UIUserInterfaceStyle {
switch self {
case .auto:
return .unspecified
case .light:
return .light
case .dark:
return .dark
}
}
}

254
node_modules/expo-glass-effect/ios/GlassView.swift generated vendored Normal file
View File

@@ -0,0 +1,254 @@
// Copyright 2022-present 650 Industries. All rights reserved.
import ExpoModulesCore
import React
public final class GlassView: ExpoView {
private var glassEffect: Any?
private var glassEffectView = UIVisualEffectView()
// TODO: Find a better fix
// Glass effect does not work sometimes if view has not been laid out yet
// https://github.com/expo/expo/issues/41024#issuecomment-3867466289
private var isMounted = false
private var glassStyle: GlassStyle?
private var glassTintColor: UIColor?
private var glassIsInteractive: Bool?
private var radius: CGFloat?
private var bottomLeftRadius: CGFloat?
private var bottomRightRadius: CGFloat?
private var topLeftRadius: CGFloat?
private var topRightRadius: CGFloat?
private var bottomStartRadius: CGFloat?
private var bottomEndRadius: CGFloat?
private var topStartRadius: CGFloat?
private var topEndRadius: CGFloat?
public required init(appContext: AppContext? = nil) {
super.init(appContext: appContext)
glassEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
addSubview(glassEffectView)
}
// UIGlassEffect initialiser is crashing for iOS 26 beta versions for some reason, so we need to check if it's available at runtime
// https://github.com/expo/expo/issues/40911
private func isGlassEffectAvailable() -> Bool {
#if compiler(>=6.2)
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else {
return false
}
let respondsToSelector = glassEffectClass.responds(to: Selector(("effectWithStyle:")))
return respondsToSelector
}
#endif
return false
}
override public func layoutSubviews() {
super.layoutSubviews()
if !isMounted {
isMounted = true
updateEffect()
}
}
func updateBorderRadius() {
guard isGlassEffectAvailable() else {
return
}
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
#if compiler(>=6.2) // Xcode 26
let isRTL = RCTI18nUtil.sharedInstance()?.isRTL() ?? false
let finalTopLeft: CGFloat
let finalTopRight: CGFloat
let finalBottomLeft: CGFloat
let finalBottomRight: CGFloat
if isRTL {
finalTopLeft = topLeftRadius ?? topEndRadius ?? radius ?? 0
finalTopRight = topRightRadius ?? topStartRadius ?? radius ?? 0
finalBottomLeft = bottomLeftRadius ?? bottomEndRadius ?? radius ?? 0
finalBottomRight = bottomRightRadius ?? bottomStartRadius ?? radius ?? 0
} else {
finalTopLeft = topLeftRadius ?? topStartRadius ?? radius ?? 0
finalTopRight = topRightRadius ?? topEndRadius ?? radius ?? 0
finalBottomLeft = bottomLeftRadius ?? bottomStartRadius ?? radius ?? 0
finalBottomRight = bottomRightRadius ?? bottomEndRadius ?? radius ?? 0
}
let topLeft = UICornerRadius(floatLiteral: finalTopLeft)
let topRight = UICornerRadius(floatLiteral: finalTopRight)
let bottomLeft = UICornerRadius(floatLiteral: finalBottomLeft)
let bottomRight = UICornerRadius(floatLiteral: finalBottomRight)
glassEffectView.cornerConfiguration = .corners(
topLeftRadius: topLeft,
topRightRadius: topRight,
bottomLeftRadius: bottomLeft,
bottomRightRadius: bottomRight
)
#endif
}
}
func setGlassStyle(_ config: GlassEffectStyleConfig) {
applyGlassStyle(config.style, animate: config.animate, animationDuration: config.animationDuration)
}
func setGlassStyle(_ style: GlassStyle) {
applyGlassStyle(style)
}
private func applyGlassStyle(_ newStyle: GlassStyle, animate: Bool = false, animationDuration: Double? = nil) {
if glassStyle != newStyle {
glassStyle = newStyle
guard isGlassEffectAvailable() else {
return
}
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
#if compiler(>=6.2) // Xcode 26
let applyEffect = {
if let uiStyle = newStyle.toUIGlassEffectStyle() {
self.glassEffect = UIGlassEffect(style: uiStyle)
self.updateEffect()
} else {
// TODO: revisit this in newer versions of iOS
// setting `nil` does not work as expected, so we need to set a visual effect with no effect
self.glassEffectView.effect = UIVisualEffect()
self.glassEffect = self.glassEffectView.effect
}
}
if animate {
if let duration = animationDuration {
UIView.animate(withDuration: duration, animations: applyEffect)
} else {
UIView.animate(animations: applyEffect)
}
} else {
applyEffect()
}
#endif
}
}
}
// TODO: support UIVisualEffectView with ExpoFabricView?
func setBorderRadius(_ _radius: CGFloat?) {
if _radius != radius {
radius = _radius
updateBorderRadius()
}
}
func setBorderCurve(_: String?) {
glassEffectView.layer.cornerCurve = self.layer.cornerCurve
}
func setBorderBottomLeftRadius(_ radius: CGFloat?) {
if radius != bottomLeftRadius {
bottomLeftRadius = radius
updateBorderRadius()
}
}
func setBorderBottomRightRadius(_ radius: CGFloat?) {
if radius != bottomRightRadius {
bottomRightRadius = radius
updateBorderRadius()
}
}
func setBorderTopLeftRadius(_ radius: CGFloat?) {
if radius != topLeftRadius {
topLeftRadius = radius
updateBorderRadius()
}
}
func setBorderTopRightRadius(_ radius: CGFloat?) {
if radius != topRightRadius {
topRightRadius = radius
updateBorderRadius()
}
}
func setBorderBottomStartRadius(_ radius: CGFloat?) {
if radius != bottomStartRadius {
bottomStartRadius = radius
updateBorderRadius()
}
}
func setBorderBottomEndRadius(_ radius: CGFloat?) {
if radius != bottomEndRadius {
bottomEndRadius = radius
updateBorderRadius()
}
}
func setBorderTopStartRadius(_ radius: CGFloat?) {
if radius != topStartRadius {
topStartRadius = radius
updateBorderRadius()
}
}
func setBorderTopEndRadius(_ radius: CGFloat?) {
if radius != topEndRadius {
topEndRadius = radius
updateBorderRadius()
}
}
func setTintColor(_ color: UIColor?) {
if color != glassTintColor {
glassTintColor = color
updateEffect()
}
}
func setInteractive(_ interactive: Bool) {
if interactive != glassIsInteractive {
glassIsInteractive = interactive
updateEffect()
}
}
func setColorScheme(_ colorScheme: GlassColorScheme) {
overrideUserInterfaceStyle = colorScheme.toUIUserInterfaceStyle()
}
private func updateEffect() {
if !isMounted {
return
}
guard isGlassEffectAvailable() else {
return
}
if #available(iOS 26.0, tvOS 26.0, macOS 26.0, *) {
#if compiler(>=6.2) // Xcode 26
if let effect = glassEffect as? UIGlassEffect {
effect.tintColor = glassTintColor
effect.isInteractive = glassIsInteractive ?? false
// we need to set the effect again or it has no effect!
glassEffectView.effect = effect
updateBorderRadius()
setBorderCurve(nil)
}
#endif
}
}
public override func mountChildComponentView(_ childComponentView: UIView, index: Int) {
glassEffectView.contentView.insertSubview(childComponentView, at: index)
}
public override func unmountChildComponentView(_ childComponentView: UIView, index: Int) {
childComponentView.removeFromSuperview()
}
}

52
node_modules/expo-glass-effect/package.json generated vendored Normal file
View File

@@ -0,0 +1,52 @@
{
"name": "expo-glass-effect",
"version": "55.0.7",
"description": "A component that renders a native glass effect view on iOS.",
"main": "build/index.js",
"types": "build/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint": "expo-module lint",
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"expo-module": "expo-module"
},
"jest": {
"preset": "expo-module-scripts"
},
"keywords": [
"react-native",
"apple",
"liquid-glass",
"expo",
"expo-glass-effect"
],
"repository": {
"type": "git",
"url": "https://github.com/expo/expo.git",
"directory": "packages/expo-glass-effect"
},
"bugs": {
"url": "https://github.com/expo/expo/issues"
},
"author": "650 Industries, Inc.",
"license": "MIT",
"homepage": "https://docs.expo.dev/versions/latest/sdk/glass-effect/",
"dependencies": {},
"devDependencies": {
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/react-native": "^13.3.0",
"expo-module-scripts": "^55.0.2"
},
"peerDependencies": {
"expo": "*",
"react": "*",
"react-native": "*"
},
"gitHead": "b183e5cbd95eb6ee54a878291c7077d8d63e4850"
}

View File

@@ -0,0 +1,14 @@
// Copyright © 2024 650 Industries.
'use client';
import { requireNativeViewManager } from 'expo-modules-core';
import { GlassContainerProps } from './GlassContainer.types';
const NativeGlassContainer = requireNativeViewManager<GlassContainerProps>(
'ExpoGlassEffect',
'GlassContainer'
);
export default NativeGlassContainer;

12
node_modules/expo-glass-effect/src/GlassContainer.tsx generated vendored Normal file
View File

@@ -0,0 +1,12 @@
// Copyright © 2024 650 Industries.
'use client';
import React from 'react';
import { View } from 'react-native';
import { GlassContainerProps } from './GlassContainer.types';
export default function GlassContainer(props: GlassContainerProps) {
return <View {...props} />;
}

View File

@@ -0,0 +1,12 @@
import { type Ref } from 'react';
import { View, type ViewProps } from 'react-native';
export type GlassContainerProps = {
/**
* The distance at which glass elements start affecting each other.
* Controls when glass elements begin to merge together.
* @default undefined
*/
spacing?: number;
ref?: Ref<View>;
} & ViewProps;

15
node_modules/expo-glass-effect/src/GlassView.ios.tsx generated vendored Normal file
View File

@@ -0,0 +1,15 @@
// Copyright © 2024 650 Industries.
'use client';
import { requireNativeViewManager } from 'expo-modules-core';
import { GlassViewProps } from './GlassView.types';
const NativeGlassView = requireNativeViewManager<GlassViewProps>('ExpoGlassEffect', 'GlassView');
const GlassView = (props: GlassViewProps) => {
return <NativeGlassView {...props} />;
};
export default GlassView;

12
node_modules/expo-glass-effect/src/GlassView.tsx generated vendored Normal file
View File

@@ -0,0 +1,12 @@
// Copyright © 2024 650 Industries.
'use client';
import React from 'react';
import { View } from 'react-native';
import { GlassViewProps } from './GlassView.types';
export default function GlassView(props: GlassViewProps) {
return <View {...props} />;
}

48
node_modules/expo-glass-effect/src/GlassView.types.ts generated vendored Normal file
View File

@@ -0,0 +1,48 @@
import { type Ref } from 'react';
import { View, type ViewProps } from 'react-native';
export type GlassStyle = 'clear' | 'regular' | 'none';
export type GlassEffectStyleConfig = {
/**
* The glass effect style to apply.
*/
style: GlassStyle;
/**
* Whether to animate the style change.
* @default false
*/
animate?: boolean;
/**
* Duration of the animation in seconds. Uses system default if not specified.
*/
animationDuration?: number;
};
export type GlassColorScheme = 'auto' | 'light' | 'dark';
export type GlassViewProps = {
/**
* Glass effect style to apply to the view.
* Can be a simple string ('clear', 'regular', 'none') or a config object
* for controlling animation behavior.
* @default 'regular'
*/
glassEffectStyle?: GlassStyle | GlassEffectStyleConfig;
/**
* Tint color to apply to the glass effect.
*/
tintColor?: string;
/**
* Whether the glass effect should be interactive.
* @default false
*/
isInteractive?: boolean;
/**
* The color scheme for the glass effect appearance.
* Use this to override the system appearance when your app has its own theme toggle.
* @default 'auto'
*/
colorScheme?: GlassColorScheme;
ref?: Ref<View>;
} & ViewProps;

11
node_modules/expo-glass-effect/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export { default as GlassView } from './GlassView';
export {
GlassColorScheme,
GlassEffectStyleConfig,
GlassStyle,
GlassViewProps,
} from './GlassView.types';
export { default as GlassContainer } from './GlassContainer';
export { GlassContainerProps } from './GlassContainer.types';
export { isLiquidGlassAvailable } from './isLiquidGlassAvailable';
export { isGlassEffectAPIAvailable } from './isGlassEffectAPIAvailable';

View File

@@ -0,0 +1,19 @@
import { requireNativeModule } from 'expo-modules-core';
let IS_GLASS_EFFECT_API_AVAILABLE: boolean | undefined;
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export function isGlassEffectAPIAvailable(): boolean {
if (IS_GLASS_EFFECT_API_AVAILABLE === undefined) {
IS_GLASS_EFFECT_API_AVAILABLE =
requireNativeModule('ExpoGlassEffect').isGlassEffectAPIAvailable;
}
return !!IS_GLASS_EFFECT_API_AVAILABLE;
}

View File

@@ -0,0 +1,12 @@
/**
* Checks whether the Liquid Glass API is available at runtime on the device.
*
* This method was added because some iOS 26 beta versions do not have this API available, which can
* lead to crashes. You should check this before using `GlassView` and `GlassContainer` in your app to ensure compatibility.
* @see https://github.com/expo/expo/issues/40911
* @platform ios
*/
export function isGlassEffectAPIAvailable(): boolean {
return false;
}

View File

@@ -0,0 +1,21 @@
import { requireNativeModule } from 'expo-modules-core';
let IS_LIQUID_GLASS_AVAILABLE: boolean | undefined;
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*
* @platform ios
*/
export function isLiquidGlassAvailable(): boolean {
if (IS_LIQUID_GLASS_AVAILABLE === undefined) {
IS_LIQUID_GLASS_AVAILABLE = requireNativeModule('ExpoGlassEffect').isLiquidGlassAvailable;
}
return !!IS_LIQUID_GLASS_AVAILABLE;
}

View File

@@ -0,0 +1,12 @@
/**
* Indicates whether the app is using the Liquid Glass design. The value will be `true` when the
* Liquid Glass components are available in the app.
*
* This only checks for component availability. The value may also be `true` if the user has enabled
* accessibility settings that limit the Liquid Glass effect.
* To check if the user has disabled the Liquid Glass effect via accessibility settings, use
* [`AccessibilityInfo.isReduceTransparencyEnabled()`](https://reactnative.dev/docs/accessibilityinfo#isreducetransparencyenabled-ios).
*/
export function isLiquidGlassAvailable(): boolean {
return false;
}

9
node_modules/expo-glass-effect/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,9 @@
// @generated by expo-module-scripts
{
"extends": "expo-module-scripts/tsconfig.base",
"compilerOptions": {
"outDir": "./build"
},
"include": ["./src"],
"exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__rsc_tests__/*"]
}