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

3
node_modules/expo-keep-awake/.babelrc generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"presets": ["babel-preset-expo"]
}

2
node_modules/expo-keep-awake/.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');

333
node_modules/expo-keep-awake/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,333 @@
# Changelog
## Unpublished
### 🛠 Breaking changes
### 🎉 New features
### 🐛 Bug fixes
### 💡 Others
## 55.0.4 — 2026-02-20
_This version does not introduce any user-facing changes._
## 55.0.3 — 2026-02-16
_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
### 💡 Others
- Removed references to legacy native modules API. ([#41657](https://github.com/expo/expo/pull/41657) by [@tsapeta](https://github.com/tsapeta))
## 15.0.8 - 2025-12-05
_This version does not introduce any user-facing changes._
## 15.0.7 — 2025-09-11
_This version does not introduce any user-facing changes._
## 15.0.6 — 2025-09-02
_This version does not introduce any user-facing changes._
## 15.0.5 — 2025-08-31
_This version does not introduce any user-facing changes._
## 15.0.4 — 2025-08-27
_This version does not introduce any user-facing changes._
## 15.0.3 — 2025-08-25
_This version does not introduce any user-facing changes._
## 15.0.2 — 2025-08-16
_This version does not introduce any user-facing changes._
## 15.0.1 — 2025-08-15
_This version does not introduce any user-facing changes._
## 15.0.0 — 2025-08-13
### 💡 Others
- Migrate to package exports ([#37298](https://github.com/expo/expo/pull/37298) by [@EvanBacon](https://github.com/EvanBacon))
## 14.1.4 — 2025-04-30
_This version does not introduce any user-facing changes._
## 14.1.3 — 2025-04-25
_This version does not introduce any user-facing changes._
## 14.1.2 — 2025-04-14
_This version does not introduce any user-facing changes._
## 14.1.1 — 2025-04-09
_This version does not introduce any user-facing changes._
## 14.1.0 — 2025-04-04
### 🛠 Breaking changes
- Bump minimum macOS version to 11.0. ([#34980](https://github.com/expo/expo/pull/34980) by [@gabrieldonadel](https://github.com/gabrieldonadel))
### 💡 Others
- [android] Remove deactivation warning. ([#35760](https://github.com/expo/expo/pull/35760) by [@aleqsio](https://github.com/aleqsio))
- [Android] Started using expo modules gradle plugin. ([#34176](https://github.com/expo/expo/pull/34176) by [@lukmccall](https://github.com/lukmccall))
## 14.0.3 - 2025-02-19
_This version does not introduce any user-facing changes._
## 14.0.2 - 2025-01-10
_This version does not introduce any user-facing changes._
## 14.0.1 — 2024-10-22
_This version does not introduce any user-facing changes._
## 14.0.0 — 2024-10-22
### 🛠 Breaking changes
- Bumped iOS and tvOS deployment target to 15.1. ([#30840](https://github.com/expo/expo/pull/30840) by [@tsapeta](https://github.com/tsapeta))
### 🐛 Bug fixes
- Add missing `react` peer dependencies for isolated modules. ([#30470](https://github.com/expo/expo/pull/30470) by [@byCedric](https://github.com/byCedric))
### 💡 Others
- Use `EventSubscription` type instead of `Subscription`. ([#28946](https://github.com/expo/expo/pull/28946) by [@tsapeta](https://github.com/tsapeta))
- Replaced `@testing-library/react-hooks` with `@testing-library/react-native`. ([#30742](https://github.com/expo/expo/pull/30742) by [@byCedric](https://github.com/byCedric))
## 13.0.2 — 2024-05-15
### 🐛 Bug fixes
- Stop useKeepAwake calls deactivating each other by default. ([#28884](https://github.com/expo/expo/pull/28884) by [@macksal](https://github.com/macksal))
## 13.0.1 — 2024-04-23
_This version does not introduce any user-facing changes._
## 13.0.0 — 2024-04-18
### 💡 Others
- Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
## 12.8.2 - 2024-01-18
_This version does not introduce any user-facing changes._
## 12.8.1 - 2024-01-10
### 🎉 New features
- Added support for macOS platform. ([#26221](https://github.com/expo/expo/pull/26221) by [@tsapeta](https://github.com/tsapeta))
## 12.8.0 — 2023-11-14
### 🛠 Breaking changes
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
## 12.7.0 — 2023-10-17
### 🛠 Breaking changes
- Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
## 12.6.0 — 2023-09-15
### 🎉 New features
- Added support for Apple tvOS. ([#24329](https://github.com/expo/expo/pull/24329) by [@douglowder](https://github.com/douglowder))
## 12.5.0 — 2023-09-04
### 🎉 New features
- Added support for React Native 0.73. ([#24018](https://github.com/expo/expo/pull/24018) by [@kudo](https://github.com/kudo))
### 💡 Others
- On Android, migrate to Expo Modules Api. ([#24012](https://github.com/expo/expo/pull/24012) by [@alanjhughes](https://github.com/alanjhughes))
## 12.4.1 — 2023-08-02
_This version does not introduce any user-facing changes._
## 12.4.0 — 2023-07-28
_This version does not introduce any user-facing changes._
## 12.3.0 — 2023-06-21
_This version does not introduce any user-facing changes._
## 12.2.0 — 2023-06-13
### 🐛 Bug fixes
- Fixed Android build warnings for Gradle version 8. ([#22537](https://github.com/expo/expo/pull/22537), [#22609](https://github.com/expo/expo/pull/22609) by [@kudo](https://github.com/kudo))
## 12.1.0 — 2023-05-08
_This version does not introduce any user-facing changes._
## 12.0.1 — 2023-02-09
_This version does not introduce any user-facing changes._
## 12.0.0 — 2023-02-03
### 🛠 Breaking changes
- `KeepAwake.activateKeepAwake` has been deprecated in favor of `KeepAwake.activateKeepAwakeAsync`. ([#15826](https://github.com/expo/expo/pull/15826) by [@EvanBacon](https://github.com/EvanBacon))
### 🎉 New features
- Added web support. ([#15826](https://github.com/expo/expo/pull/15826) by [@EvanBacon](https://github.com/EvanBacon))
- Added `KeepAwake.isAvailableAsync` which returns false on certain web browsers. ([#15826](https://github.com/expo/expo/pull/15826) by [@EvanBacon](https://github.com/EvanBacon))
- Added `KeepAwake.addListener` to observe state changes on web. ([#15826](https://github.com/expo/expo/pull/15826) by [@EvanBacon](https://github.com/EvanBacon))
### 💡 Others
- Define `KeepAwakeOptions` type, update the doc comments. ([#20489](https://github.com/expo/expo/pull/20489) by [@Simek](https://github.com/Simek))
- On Android bump `compileSdkVersion` and `targetSdkVersion` to `33`. ([#20721](https://github.com/expo/expo/pull/20721) by [@lukmccall](https://github.com/lukmccall))
## 11.0.1 — 2022-10-28
_This version does not introduce any user-facing changes._
## 11.0.0 — 2022-10-06
### 🛠 Breaking changes
- Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. ([#18873](https://github.com/expo/expo/pull/18873) by [@tsapeta](https://github.com/tsapeta))
## 10.2.1 — 2022-08-08
### 🐛 Bug fixes
- Attempt to fix `EXC_BAD_ACCESS` and `NSInvalidArgumentException` crashes by not referencing to the class instance function. ([#18553](https://github.com/expo/expo/pull/18553) by [@tsapeta](https://github.com/tsapeta))
## 10.2.0 — 2022-07-07
### 🐛 Bug fixes
- Fixed `Unable to deactivate keep awake. However, it probably is deactivated already` unhandled promise rejection warning when resuming apps on Android. ([#17319](https://github.com/expo/expo/pull/17319) by [@kudo](https://github.com/kudo))
### 💡 Others
- Migrated Expo modules definitions to the new naming convention. ([#17193](https://github.com/expo/expo/pull/17193) by [@tsapeta](https://github.com/tsapeta))
## 10.1.0 — 2022-04-18
### 🎉 New features
- Native module on iOS is now written in Swift using the new API. ([#15705](https://github.com/expo/expo/pull/15705) by [@tsapeta](https://github.com/tsapeta))
### ⚠️ Notices
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
## 10.0.2 - 2022-02-01
### 🐛 Bug fixes
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
## 10.0.1 — 2021-11-17
_This version does not introduce any user-facing changes._
## 10.0.0 — 2021-09-28
### 🛠 Breaking changes
- Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
### 🐛 Bug fixes
- Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
## 9.3.0 — 2021-09-08
### 💡 Others
- Rewrite android code to Kotlin. ([#13996](https://github.com/expo/expo/pull/13996) by [@kkafar](https://github.com/kkafar))
## 9.2.0 — 2021-06-16
### 🐛 Bug fixes
- Enable kotlin in all modules. ([#12716](https://github.com/expo/expo/pull/12716) by [@wschurman](https://github.com/wschurman))
## 9.1.2 — 2021-04-13
_This version does not introduce any user-facing changes._
## 9.1.1 — 2021-04-01
_This version does not introduce any user-facing changes._
## 9.1.0 — 2021-03-10
### 🎉 New features
- Updated Android build configuration to target Android 11 (added support for Android SDK 30). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))
### 🐛 Bug fixes
- Remove peerDependencies and unimodulePeerDependencies from Expo modules. ([#11980](https://github.com/expo/expo/pull/11980) by [@brentvatne](https://github.com/brentvatne))
## 9.0.0 — 2021-01-15
### 🛠 Breaking changes
- Dropped support for iOS 10.0 ([#11344](https://github.com/expo/expo/pull/11344) by [@tsapeta](https://github.com/tsapeta))
## 8.4.0 — 2020-11-17
_This version does not introduce any user-facing changes._
## 8.3.0 — 2020-08-18
_This version does not introduce any user-facing changes._
## 8.2.1 — 2020-05-29
_This version does not introduce any user-facing changes._
## 8.2.0 — 2020-05-27
### 🐛 Bug fixes
- Fixed `KeepAwake.activateKeepAwake` not working with multiple tags on Android. ([#7197](https://github.com/expo/expo/pull/7197) by [@lukmccall](https://github.com/lukmccall))

41
node_modules/expo-keep-awake/README.md generated vendored Normal file
View File

@@ -0,0 +1,41 @@
<p>
<a href="https://docs.expo.dev/versions/latest/sdk/keep-awake/">
<img
src="../../.github/resources/expo-keep-awake.svg"
alt="expo-keep-awake"
height="64" />
</a>
</p>
Provides a React component that prevents the screen sleeping when rendered. It also exposes static methods to control the behavior imperatively.
# API documentation
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/keep-awake/)
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/keep-awake/)
# 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/keep-awake/).
# 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-keep-awake
```
### Configure for Android
No additional set up necessary.
### 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).

15
node_modules/expo-keep-awake/android/build.gradle generated vendored Normal file
View File

@@ -0,0 +1,15 @@
plugins {
id 'com.android.library'
id 'expo-module-gradle-plugin'
}
group = 'host.exp.exponent'
version = '55.0.4'
android {
namespace "expo.modules.keepawake"
defaultConfig {
versionCode 16
versionName "55.0.4"
}
}

View File

@@ -0,0 +1,3 @@
<manifest>
</manifest>

View File

@@ -0,0 +1,38 @@
package expo.modules.keepawake
import android.app.Activity
import android.view.WindowManager
import expo.modules.kotlin.AppContext
import expo.modules.kotlin.exception.Exceptions
class ExpoKeepAwakeManager(
private val appContext: AppContext?
) {
private val tags = mutableSetOf<String>()
private val currentActivity: Activity
get() = (appContext ?: throw Exceptions.AppContextLost()).throwingActivity
val isActivated: Boolean
get() = tags.isNotEmpty()
fun activate(tag: String) {
val activity = currentActivity
if (!isActivated) {
activity.runOnUiThread {
activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
}
tags.add(tag)
}
fun deactivate(tag: String) {
val activity = currentActivity
if (tags.size == 1 && tags.contains(tag)) {
activity.runOnUiThread {
activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
}
tags.remove(tag)
}
}

View File

@@ -0,0 +1,6 @@
package expo.modules.keepawake
import expo.modules.kotlin.exception.CodedException
internal class ActivateKeepAwakeException :
CodedException("Unable to activate keep awake")

View File

@@ -0,0 +1,25 @@
// Copyright 2015-present 650 Industries. All rights reserved.
package expo.modules.keepawake
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
class KeepAwakeModule : Module() {
private val keepAwakeManager by lazy { ExpoKeepAwakeManager(appContext) }
override fun definition() = ModuleDefinition {
Name("ExpoKeepAwake")
AsyncFunction("activate") { tag: String ->
keepAwakeManager.activate(tag)
}
AsyncFunction("deactivate") { tag: String ->
keepAwakeManager.deactivate(tag)
}
AsyncFunction<Boolean>("isActivated") {
keepAwakeManager.isActivated
}
}
}

View File

@@ -0,0 +1,3 @@
declare const _default: any;
export default _default;
//# sourceMappingURL=ExpoKeepAwake.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoKeepAwake.d.ts","sourceRoot":"","sources":["../src/ExpoKeepAwake.ts"],"names":[],"mappings":";AACA,wBAAoD"}

View File

@@ -0,0 +1,11 @@
import { type EventSubscription } from 'expo-modules-core';
import { KeepAwakeListener } from './KeepAwake.types';
/** Wraps the webWakeLock API https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API */
declare const _default: {
isAvailableAsync(): Promise<boolean>;
activate(tag: string): Promise<void>;
deactivate(tag: string): Promise<void>;
addListenerForTag(tag: string, listener: KeepAwakeListener): EventSubscription;
};
export default _default;
//# sourceMappingURL=ExpoKeepAwake.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoKeepAwake.web.d.ts","sourceRoot":"","sources":["../src/ExpoKeepAwake.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAuB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAoB3E,sGAAsG;;;kBAQhF,MAAM;oBAOJ,MAAM;2BAcL,MAAM,YAAY,iBAAiB,GAAG,iBAAiB;;AA5BhF,wBAqDE"}

View File

@@ -0,0 +1,24 @@
export type KeepAwakeEvent = {
/** Keep awake state. */
state: KeepAwakeEventState;
};
export declare enum KeepAwakeEventState {
RELEASE = "release"
}
/**
* @platform web
*/
export type KeepAwakeListener = (event: KeepAwakeEvent) => void;
export type KeepAwakeOptions = {
/**
* The call will throw an unhandled promise rejection on Android when the original Activity is dead or deactivated.
* Set the value to `true` for suppressing the uncaught exception.
*/
suppressDeactivateWarnings?: boolean;
/**
* A callback that is invoked when the keep-awake state changes.
* @platform web
*/
listener?: KeepAwakeListener;
};
//# sourceMappingURL=KeepAwake.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"KeepAwake.types.d.ts","sourceRoot":"","sources":["../src/KeepAwake.types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,cAAc,GAAG;IAC3B,wBAAwB;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC;AAGF,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;CACpB;AAGD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;OAGG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B,CAAC"}

64
node_modules/expo-keep-awake/build/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,64 @@
import { type EventSubscription } from 'expo-modules-core';
import { KeepAwakeListener, KeepAwakeOptions } from './KeepAwake.types';
/** Default tag, used when no tag has been specified in keep awake method calls. */
export declare const ExpoKeepAwakeTag = "ExpoKeepAwakeDefaultTag";
/** @returns `true` on all platforms except [unsupported web browsers](https://caniuse.com/wake-lock). */
export declare function isAvailableAsync(): Promise<boolean>;
/**
* A React hook to keep the screen awake for as long as the owner component is mounted.
* The optionally provided `tag` argument is used when activating and deactivating the keep-awake
* feature. If unspecified, an ID unique to the owner component is used. See the documentation for
* `activateKeepAwakeAsync` below to learn more about the `tag` argument.
*
* @param tag Tag to lock screen sleep prevention. If not provided, an ID unique to the owner component is used.
* @param options Additional options for the keep awake hook.
*/
export declare function useKeepAwake(tag?: string, options?: KeepAwakeOptions): void;
/**
* Prevents the screen from sleeping until `deactivateKeepAwake` is called with the same `tag` value.
*
* If the `tag` argument is specified, the screen will not sleep until you call `deactivateKeepAwake`
* with the same `tag` argument. When using multiple `tags` for activation you'll have to deactivate
* each one in order to re-enable screen sleep. If tag is unspecified, the default `tag` is used.
*
* Web support [is limited](https://caniuse.com/wake-lock).
*
* @param tag Tag to lock screen sleep prevention. If not provided, the default tag is used.
* @deprecated use `activateKeepAwakeAsync` instead.
*/
export declare function activateKeepAwake(tag?: string): Promise<void>;
/**
* Prevents the screen from sleeping until `deactivateKeepAwake` is called with the same `tag` value.
*
* If the `tag` argument is specified, the screen will not sleep until you call `deactivateKeepAwake`
* with the same `tag` argument. When using multiple `tags` for activation you'll have to deactivate
* each one in order to re-enable screen sleep. If tag is unspecified, the default `tag` is used.
*
* Web support [is limited](https://caniuse.com/wake-lock).
*
* @param tag Tag to lock screen sleep prevention. If not provided, the default tag is used.
*/
export declare function activateKeepAwakeAsync(tag?: string): Promise<void>;
/**
* Releases the lock on screen-sleep prevention associated with the given `tag` value. If `tag`
* is unspecified, it defaults to the same default tag that `activateKeepAwake` uses.
*
* @param tag Tag to release the lock on screen sleep prevention. If not provided,
* the default tag is used.
*/
export declare function deactivateKeepAwake(tag?: string): Promise<void>;
/**
* Observe changes to the keep awake timer.
* On web, this changes when navigating away from the active window/tab. No-op on native.
* @platform web
*
* @example
* ```ts
* KeepAwake.addListener(({ state }) => {
* // ...
* });
* ```
*/
export declare function addListener(tagOrListener: string | KeepAwakeListener, listener?: KeepAwakeListener): EventSubscription;
export * from './KeepAwake.types';
//# sourceMappingURL=index.d.ts.map

1
node_modules/expo-keep-awake/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,KAAK,iBAAiB,EAAuB,MAAM,mBAAmB,CAAC;AAIhF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAExE,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAE1D,yGAAyG;AACzG,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,CAKzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAoB3E;AAGD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/E;AAGD;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1F;AAGD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,GAAE,MAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,aAAa,EAAE,MAAM,GAAG,iBAAiB,EACzC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,iBAAiB,CAUnB;AAED,cAAc,mBAAmB,CAAC"}

15
node_modules/expo-keep-awake/expo-module.config.json generated vendored Normal file
View File

@@ -0,0 +1,15 @@
{
"platforms": ["apple", "android"],
"apple": {
"modules": ["KeepAwakeModule"]
},
"android": {
"modules": ["expo.modules.keepawake.KeepAwakeModule"],
"publication": {
"groupId": "host.exp.exponent",
"artifactId": "expo.modules.keepawake",
"version": "55.0.4",
"repository": "local-maven-repo"
}
}
}

36
node_modules/expo-keep-awake/ios/ExpoKeepAwake.podspec generated vendored Normal file
View File

@@ -0,0 +1,36 @@
require 'json'
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
Pod::Spec.new do |s|
s.name = 'ExpoKeepAwake'
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',
:osx => '11.0',
:tvos => '15.1'
}
s.swift_version = '5.9'
s.source = { git: 'https://github.com/expo/expo.git' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
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

57
node_modules/expo-keep-awake/ios/KeepAwakeModule.swift generated vendored Normal file
View File

@@ -0,0 +1,57 @@
// Copyright 2021-present 650 Industries. All rights reserved.
import ExpoModulesCore
public final class KeepAwakeModule: Module {
private var activeTags = Set<String>()
public func definition() -> ModuleDefinition {
Name("ExpoKeepAwake")
AsyncFunction("activate") { (tag: String) -> Bool in
if self.activeTags.isEmpty {
setActivated(true)
}
self.activeTags.insert(tag)
return true
}
AsyncFunction("deactivate") { (tag: String) -> Bool in
self.activeTags.remove(tag)
if self.activeTags.isEmpty {
setActivated(false)
}
return true
}
AsyncFunction("isActivated") { () -> Bool in
#if os(iOS) || os(tvOS)
return DispatchQueue.main.sync {
return UIApplication.shared.isIdleTimerDisabled
}
#elseif os(macOS)
return false
#endif
}
OnAppEntersForeground {
if !self.activeTags.isEmpty {
setActivated(true)
}
}
OnAppEntersBackground {
if !self.activeTags.isEmpty {
setActivated(false)
}
}
}
}
private func setActivated(_ activated: Bool) {
#if os(iOS) || os(tvOS)
DispatchQueue.main.async {
UIApplication.shared.isIdleTimerDisabled = activated
}
#endif
}

View File

@@ -0,0 +1 @@
c4315bd2c6061f18abd23205c779b359

View File

@@ -0,0 +1 @@
aec6265b5795822dd60e975cddf0cdd40aa10bee

View File

@@ -0,0 +1 @@
f491abf3901c42dd5c889d2b4864f4444faa528a687c60491e3565d9707124c6

View File

@@ -0,0 +1 @@
e79b60f9fb0ba0bb2e91dff2720b9d8e4ae8fc298ccfa54eb005f8ccfaa58dd227399912879c307a0ff4f4e1c94727fdf68a2378cfbe508085ab8ab53da5be0e

View File

@@ -0,0 +1 @@
17662ca957a0310ba3b77e7f4fa4269a

View File

@@ -0,0 +1 @@
6d0989aa4d78dd1d8ce952690400c77c78b8009f

View File

@@ -0,0 +1 @@
3cb80fd7e7d05a0a51a6c33116c3932e4c67abe3c0be794dfd29de153158916b

View File

@@ -0,0 +1 @@
1c7400af7b68b2eaf14833edfcb6b40a5127e2d079d1d22ce126eeaae5fd1f8facd565a22768d3903766041f9211b5eae9085d36cdc16291911761765506b08b

View File

@@ -0,0 +1,87 @@
{
"formatVersion": "1.1",
"component": {
"group": "host.exp.exponent",
"module": "expo.modules.keepawake",
"version": "55.0.4",
"attributes": {
"org.gradle.status": "release"
}
},
"createdBy": {
"gradle": {
"version": "9.0.0"
}
},
"variants": [
{
"name": "releaseVariantReleaseApiPublication",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.libraryelements": "aar",
"org.gradle.usage": "java-api"
},
"files": [
{
"name": "expo.modules.keepawake-55.0.4.aar",
"url": "expo.modules.keepawake-55.0.4.aar",
"size": 14876,
"sha512": "1c7400af7b68b2eaf14833edfcb6b40a5127e2d079d1d22ce126eeaae5fd1f8facd565a22768d3903766041f9211b5eae9085d36cdc16291911761765506b08b",
"sha256": "3cb80fd7e7d05a0a51a6c33116c3932e4c67abe3c0be794dfd29de153158916b",
"sha1": "6d0989aa4d78dd1d8ce952690400c77c78b8009f",
"md5": "17662ca957a0310ba3b77e7f4fa4269a"
}
]
},
{
"name": "releaseVariantReleaseRuntimePublication",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.libraryelements": "aar",
"org.gradle.usage": "java-runtime"
},
"dependencies": [
{
"group": "org.jetbrains.kotlin",
"module": "kotlin-stdlib-jdk7",
"version": {
"requires": "2.1.20"
}
}
],
"files": [
{
"name": "expo.modules.keepawake-55.0.4.aar",
"url": "expo.modules.keepawake-55.0.4.aar",
"size": 14876,
"sha512": "1c7400af7b68b2eaf14833edfcb6b40a5127e2d079d1d22ce126eeaae5fd1f8facd565a22768d3903766041f9211b5eae9085d36cdc16291911761765506b08b",
"sha256": "3cb80fd7e7d05a0a51a6c33116c3932e4c67abe3c0be794dfd29de153158916b",
"sha1": "6d0989aa4d78dd1d8ce952690400c77c78b8009f",
"md5": "17662ca957a0310ba3b77e7f4fa4269a"
}
]
},
{
"name": "releaseVariantReleaseSourcePublication",
"attributes": {
"org.gradle.category": "documentation",
"org.gradle.dependency.bundling": "external",
"org.gradle.docstype": "sources",
"org.gradle.usage": "java-runtime"
},
"files": [
{
"name": "expo.modules.keepawake-55.0.4-sources.jar",
"url": "expo.modules.keepawake-55.0.4-sources.jar",
"size": 2234,
"sha512": "e79b60f9fb0ba0bb2e91dff2720b9d8e4ae8fc298ccfa54eb005f8ccfaa58dd227399912879c307a0ff4f4e1c94727fdf68a2378cfbe508085ab8ab53da5be0e",
"sha256": "f491abf3901c42dd5c889d2b4864f4444faa528a687c60491e3565d9707124c6",
"sha1": "aec6265b5795822dd60e975cddf0cdd40aa10bee",
"md5": "c4315bd2c6061f18abd23205c779b359"
}
]
}
]
}

View File

@@ -0,0 +1 @@
21c9577f9f1138ecc492fcabeca4c7e4

View File

@@ -0,0 +1 @@
455195e0a8326fa151c71fc4451376762f997ba7

View File

@@ -0,0 +1 @@
86d6667256092089a833a641c2c7c31f31976deec092a7af7ebb49e1a378a79b

View File

@@ -0,0 +1 @@
d76113e84f320175551d11e0c52cb9833e68e88e7bdf00f2f82d1c728838f6a9216ecdebdcb05a9b6370aec9d02bc7b333a1ac1560e6f1dfe29496c5695d1261

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>host.exp.exponent</groupId>
<artifactId>expo.modules.keepawake</artifactId>
<version>55.0.4</version>
<packaging>aar</packaging>
<name>expo.modules.keepawake</name>
<url>https://github.com/expo/expo</url>
<organization>
<name>650 Industries, Inc. (“Expo”)</name>
<url>https://expo.dev/home</url>
</organization>
<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/expo/expo/blob/main/LICENSE</url>
<distribution>https://github.com/expo/expo/blob/main/LICENSE</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Expo Maintainers</name>
<email>support@expo.dev</email>
<url>https://github.com/orgs/expo/people</url>
</developer>
</developers>
<scm>
<connection>https://github.com/expo/expo.git</connection>
<developerConnection>https://github.com/expo/expo.git</developerConnection>
<url>https://github.com/expo/expo</url>
</scm>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<version>2.1.20</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1 @@
1b7340bd99476103b90b00d32b691491

View File

@@ -0,0 +1 @@
67e1ad23093c3312719520a8a5657a57decfd5c6

View File

@@ -0,0 +1 @@
c8875c25a92557864806ed7657088e2a568fcdcac51d58c8db49457df882a3a4

View File

@@ -0,0 +1 @@
2de7fe95a80d8a652f20c720d2472e9bf84ec05b8f357d4b4ef55533904d24537d8304ed08737cde021befb25c20901641016a87e18a19303f768de205b957ae

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>host.exp.exponent</groupId>
<artifactId>expo.modules.keepawake</artifactId>
<versioning>
<latest>55.0.4</latest>
<release>55.0.4</release>
<versions>
<version>55.0.4</version>
</versions>
<lastUpdated>20260220174550</lastUpdated>
</versioning>
</metadata>

View File

@@ -0,0 +1 @@
454ea1d9feefd11282d7a6f731e086be

View File

@@ -0,0 +1 @@
2c59526fa43512b4bdb8e758da19db38c548d5ff

View File

@@ -0,0 +1 @@
6a6db202444570e488de7b4c5406e6dc7442fc5c7bb6cf2e79c4a1ebf0abefe7

View File

@@ -0,0 +1 @@
80213ed936a15bceedb45ea64038c042d80a8d85649142dee5ba2f72be1b7ccc8c2f831d28777dedafdbf5aa8bdb336a6cd9571bf9b19e898efe2c2d8cded154

54
node_modules/expo-keep-awake/package.json generated vendored Normal file
View File

@@ -0,0 +1,54 @@
{
"name": "expo-keep-awake",
"version": "55.0.4",
"description": "Provides a React component that prevents the screen sleeping when rendered. It also exposes static methods to control the behavior imperatively.",
"main": "src/index.ts",
"types": "build/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./build/index.d.ts",
"default": "./src/index.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"
},
"keywords": [
"react-native",
"expo",
"awake",
"keep-awake"
],
"repository": {
"type": "git",
"url": "https://github.com/expo/expo.git",
"directory": "packages/expo-keep-awake"
},
"bugs": {
"url": "https://github.com/expo/expo/issues"
},
"author": "650 Industries, Inc.",
"license": "MIT",
"homepage": "https://docs.expo.dev/versions/latest/sdk/keep-awake/",
"dependencies": {},
"devDependencies": {
"@testing-library/react-native": "^13.3.0",
"expo-module-scripts": "^55.0.2"
},
"peerDependencies": {
"expo": "*",
"react": "*"
},
"jest": {
"preset": "expo-module-scripts"
},
"gitHead": "e37001d25bfeec4ee4fa1b7da1769e99d099d75e"
}

2
node_modules/expo-keep-awake/src/ExpoKeepAwake.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import { requireNativeModule } from 'expo-modules-core';
export default requireNativeModule('ExpoKeepAwake');

77
node_modules/expo-keep-awake/src/ExpoKeepAwake.web.ts generated vendored Normal file
View File

@@ -0,0 +1,77 @@
import { CodedError, Platform, type EventSubscription } from 'expo-modules-core';
import { KeepAwakeEventState, KeepAwakeListener } from './KeepAwake.types';
const wakeLockMap: Record<string, WakeLockSentinel> = {};
type WakeLockSentinel = {
onrelease: null | ((event: any) => void);
released: boolean;
type: 'screen';
release?: Function;
addEventListener?: (event: string, listener: (event: any) => void) => void;
removeEventListener?: (event: string, listener: (event: any) => void) => void;
};
declare const navigator: {
wakeLock: {
request(type: 'screen'): Promise<WakeLockSentinel>;
};
};
/** Wraps the webWakeLock API https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API */
export default {
async isAvailableAsync() {
if (Platform.isDOMAvailable) {
return 'wakeLock' in navigator;
}
return false;
},
async activate(tag: string) {
if (!Platform.isDOMAvailable) {
return;
}
const wakeLock = await navigator.wakeLock.request('screen');
wakeLockMap[tag] = wakeLock;
},
async deactivate(tag: string) {
if (!Platform.isDOMAvailable) {
return;
}
if (wakeLockMap[tag]) {
wakeLockMap[tag].release?.();
delete wakeLockMap[tag];
} else {
throw new CodedError(
'ERR_KEEP_AWAKE_TAG_INVALID',
`The wake lock with tag ${tag} has not activated yet`
);
}
},
addListenerForTag(tag: string, listener: KeepAwakeListener): EventSubscription {
const eventListener = () => {
listener({ state: KeepAwakeEventState.RELEASE });
};
const sentinel = wakeLockMap[tag];
if (sentinel) {
if ('addEventListener' in sentinel) {
sentinel.addEventListener?.('release', eventListener);
} else {
sentinel.onrelease = eventListener;
}
}
return {
remove: () => {
const sentinel = wakeLockMap[tag];
if (sentinel) {
if (sentinel.removeEventListener) {
sentinel.removeEventListener('release', eventListener);
} else {
sentinel.onrelease = null;
}
}
},
};
},
};

30
node_modules/expo-keep-awake/src/KeepAwake.types.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
// @needsAudit
export type KeepAwakeEvent = {
/** Keep awake state. */
state: KeepAwakeEventState;
};
// @needsAudit
export enum KeepAwakeEventState {
RELEASE = 'release',
}
// @needsAudit
/**
* @platform web
*/
export type KeepAwakeListener = (event: KeepAwakeEvent) => void;
export type KeepAwakeOptions = {
/**
* The call will throw an unhandled promise rejection on Android when the original Activity is dead or deactivated.
* Set the value to `true` for suppressing the uncaught exception.
*/
suppressDeactivateWarnings?: boolean;
/**
* A callback that is invoked when the keep-awake state changes.
* @platform web
*/
listener?: KeepAwakeListener;
};

122
node_modules/expo-keep-awake/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,122 @@
import { type EventSubscription, UnavailabilityError } from 'expo-modules-core';
import { useEffect, useId } from 'react';
import ExpoKeepAwake from './ExpoKeepAwake';
import { KeepAwakeListener, KeepAwakeOptions } from './KeepAwake.types';
/** Default tag, used when no tag has been specified in keep awake method calls. */
export const ExpoKeepAwakeTag = 'ExpoKeepAwakeDefaultTag';
/** @returns `true` on all platforms except [unsupported web browsers](https://caniuse.com/wake-lock). */
export async function isAvailableAsync(): Promise<boolean> {
if (ExpoKeepAwake.isAvailableAsync) {
return await ExpoKeepAwake.isAvailableAsync();
}
return true;
}
/**
* A React hook to keep the screen awake for as long as the owner component is mounted.
* The optionally provided `tag` argument is used when activating and deactivating the keep-awake
* feature. If unspecified, an ID unique to the owner component is used. See the documentation for
* `activateKeepAwakeAsync` below to learn more about the `tag` argument.
*
* @param tag Tag to lock screen sleep prevention. If not provided, an ID unique to the owner component is used.
* @param options Additional options for the keep awake hook.
*/
export function useKeepAwake(tag?: string, options?: KeepAwakeOptions): void {
const defaultTag = useId();
const tagOrDefault = tag ?? defaultTag;
useEffect(() => {
let isMounted = true;
activateKeepAwakeAsync(tagOrDefault).then(() => {
if (isMounted && ExpoKeepAwake.addListenerForTag && options?.listener) {
addListener(tagOrDefault, options.listener);
}
});
return () => {
isMounted = false;
if (options?.suppressDeactivateWarnings) {
deactivateKeepAwake(tagOrDefault).catch(() => {});
} else {
deactivateKeepAwake(tagOrDefault);
}
};
}, [tagOrDefault]);
}
// @needsAudit
/**
* Prevents the screen from sleeping until `deactivateKeepAwake` is called with the same `tag` value.
*
* If the `tag` argument is specified, the screen will not sleep until you call `deactivateKeepAwake`
* with the same `tag` argument. When using multiple `tags` for activation you'll have to deactivate
* each one in order to re-enable screen sleep. If tag is unspecified, the default `tag` is used.
*
* Web support [is limited](https://caniuse.com/wake-lock).
*
* @param tag Tag to lock screen sleep prevention. If not provided, the default tag is used.
* @deprecated use `activateKeepAwakeAsync` instead.
*/
export function activateKeepAwake(tag: string = ExpoKeepAwakeTag): Promise<void> {
console.warn('`activateKeepAwake` is deprecated. Use `activateKeepAwakeAsync` instead.');
return activateKeepAwakeAsync(tag);
}
// @needsAudit
/**
* Prevents the screen from sleeping until `deactivateKeepAwake` is called with the same `tag` value.
*
* If the `tag` argument is specified, the screen will not sleep until you call `deactivateKeepAwake`
* with the same `tag` argument. When using multiple `tags` for activation you'll have to deactivate
* each one in order to re-enable screen sleep. If tag is unspecified, the default `tag` is used.
*
* Web support [is limited](https://caniuse.com/wake-lock).
*
* @param tag Tag to lock screen sleep prevention. If not provided, the default tag is used.
*/
export async function activateKeepAwakeAsync(tag: string = ExpoKeepAwakeTag): Promise<void> {
await ExpoKeepAwake.activate?.(tag);
}
// @needsAudit
/**
* Releases the lock on screen-sleep prevention associated with the given `tag` value. If `tag`
* is unspecified, it defaults to the same default tag that `activateKeepAwake` uses.
*
* @param tag Tag to release the lock on screen sleep prevention. If not provided,
* the default tag is used.
*/
export async function deactivateKeepAwake(tag: string = ExpoKeepAwakeTag): Promise<void> {
await ExpoKeepAwake.deactivate?.(tag);
}
/**
* Observe changes to the keep awake timer.
* On web, this changes when navigating away from the active window/tab. No-op on native.
* @platform web
*
* @example
* ```ts
* KeepAwake.addListener(({ state }) => {
* // ...
* });
* ```
*/
export function addListener(
tagOrListener: string | KeepAwakeListener,
listener?: KeepAwakeListener
): EventSubscription {
// Assert so the type is non-nullable.
if (!ExpoKeepAwake.addListenerForTag) {
throw new UnavailabilityError('ExpoKeepAwake', 'addListenerForTag');
}
const tag = typeof tagOrListener === 'string' ? tagOrListener : ExpoKeepAwakeTag;
const _listener = typeof tagOrListener === 'function' ? tagOrListener : listener;
return ExpoKeepAwake.addListenerForTag(tag, _listener);
}
export * from './KeepAwake.types';

9
node_modules/expo-keep-awake/tsconfig.json generated vendored Normal file
View File

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