@symbiote-native/keep-awake 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -13,13 +13,27 @@ depended on directly and never the `expo` meta-package, why the upstream JS is h
|
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
|
+
**New app:**
|
|
17
|
+
|
|
16
18
|
```bash
|
|
17
|
-
|
|
19
|
+
npx @symbiote-native/cli new my-app --keep-awake
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Existing SymbioteNative app:**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @symbiote-native/cli add --keep-awake
|
|
18
26
|
```
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
Either way: installs `@symbiote-native/keep-awake` and wires the native autolinking automatically
|
|
29
|
+
— see [`@symbiote-native/cli`](../cli).
|
|
30
|
+
|
|
31
|
+
<details>
|
|
32
|
+
<summary>Manual install (no CLI — installing and wiring native autolinking by hand)</summary>
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @symbiote-native/keep-awake
|
|
36
|
+
```
|
|
23
37
|
|
|
24
38
|
Depends on `expo-keep-awake` and `expo-modules-core` directly (regular dependencies, pinned to
|
|
25
39
|
exact versions — never a caret range, since this package's `core/` is hand-ported against one
|
|
@@ -55,6 +69,8 @@ README for the full mechanism. Full mechanics — the Podfile pieces that normal
|
|
|
55
69
|
No platform permission string is needed — keeping the screen awake has no runtime permission
|
|
56
70
|
prompt on either platform.
|
|
57
71
|
|
|
72
|
+
</details>
|
|
73
|
+
|
|
58
74
|
## Shape
|
|
59
75
|
|
|
60
76
|
```
|
|
@@ -28,5 +28,10 @@ export function useKeepAwake(tag, options) {
|
|
|
28
28
|
deactivateKeepAwake(tagOrDefault);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
+
// options is read only at effect-setup/teardown time, matching upstream expo-keep-awake's own
|
|
32
|
+
// useKeepAwake exactly (same [tagOrDefault]-only deps) — the effect is keyed on the tag, not on
|
|
33
|
+
// options identity, so a caller passing a fresh inline options object each render doesn't tear
|
|
34
|
+
// down and reattach the listener every render.
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
31
36
|
}, [tagOrDefault]);
|
|
32
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/keep-awake",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "expo-keep-awake wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Keeps the screen awake for the lifetime of a mounted component/composable/service, with an optional listener for keep-awake state changes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"solid-js": ">=1.9.0",
|
|
81
81
|
"svelte": ">=5.56.0",
|
|
82
82
|
"vue": ">=3.5.0",
|
|
83
|
-
"@symbiote-native/angular": "^3.
|
|
84
|
-
"@symbiote-native/engine": "^1.
|
|
85
|
-
"@symbiote-native/react": "^3.0.
|
|
86
|
-
"@symbiote-native/solid": "^3.0.
|
|
87
|
-
"@symbiote-native/svelte": "^3.0.
|
|
88
|
-
"@symbiote-native/vue": "^3.0.
|
|
83
|
+
"@symbiote-native/angular": "^3.1.2",
|
|
84
|
+
"@symbiote-native/engine": "^1.3.1",
|
|
85
|
+
"@symbiote-native/react": "^3.0.4",
|
|
86
|
+
"@symbiote-native/solid": "^3.0.4",
|
|
87
|
+
"@symbiote-native/svelte": "^3.0.4",
|
|
88
|
+
"@symbiote-native/vue": "^3.0.4"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@symbiote-native/angular": {
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
"solid-js": "^1.9.14",
|
|
134
134
|
"svelte": "^5.56.0",
|
|
135
135
|
"typescript": "~6.0.0",
|
|
136
|
-
"@symbiote-native/angular": "3.
|
|
137
|
-
"@symbiote-native/engine": "1.
|
|
138
|
-
"@symbiote-native/react": "3.0.
|
|
139
|
-
"@symbiote-native/solid": "3.0.
|
|
140
|
-
"@symbiote-native/svelte": "3.0.
|
|
141
|
-
"@symbiote-native/test-utils": "0.
|
|
142
|
-
"@symbiote-native/vue": "3.0.
|
|
136
|
+
"@symbiote-native/angular": "3.1.2",
|
|
137
|
+
"@symbiote-native/engine": "1.3.1",
|
|
138
|
+
"@symbiote-native/react": "3.0.4",
|
|
139
|
+
"@symbiote-native/solid": "3.0.4",
|
|
140
|
+
"@symbiote-native/svelte": "3.0.4",
|
|
141
|
+
"@symbiote-native/test-utils": "0.4.4",
|
|
142
|
+
"@symbiote-native/vue": "3.0.4"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|
|
@@ -38,5 +38,10 @@ export function useKeepAwake(tag?: string, options?: KeepAwakeOptions): void {
|
|
|
38
38
|
deactivateKeepAwake(tagOrDefault);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
// options is read only at effect-setup/teardown time, matching upstream expo-keep-awake's own
|
|
42
|
+
// useKeepAwake exactly (same [tagOrDefault]-only deps) — the effect is keyed on the tag, not on
|
|
43
|
+
// options identity, so a caller passing a fresh inline options object each render doesn't tear
|
|
44
|
+
// down and reattach the listener every render.
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
46
|
}, [tagOrDefault]);
|
|
42
47
|
}
|