@symbiote-native/keep-awake 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -3
- package/package.json +27 -15
package/README.md
CHANGED
|
@@ -40,9 +40,11 @@ with zero further changes:
|
|
|
40
40
|
|
|
41
41
|
The recurring per-package half of the Android wiring (`app/build.gradle`'s
|
|
42
42
|
`implementation project(':expo-keep-awake')` line and `MainApplication.kt`'s module-name map
|
|
43
|
-
entry) is automated by
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
entry) is automated by installing `@symbiote-native/expo-modules-link` in the consuming app —
|
|
44
|
+
its own `postinstall` hook scans `node_modules` for every installed package's `native-link.json`
|
|
45
|
+
(this one included) and regenerates the registration blocks. This package ships no `postinstall`
|
|
46
|
+
of its own — `native-link.json` above is passive data the aggregator reads. See that package's
|
|
47
|
+
README for the full mechanism. Full mechanics — the Podfile pieces that normally ship inside the
|
|
46
48
|
`expo` package, the `expo` peer-dependency exclusion list — live in the
|
|
47
49
|
`symbiote-expo-native-module` skill.
|
|
48
50
|
|
|
@@ -98,6 +100,27 @@ useKeepAwake();
|
|
|
98
100
|
</template>
|
|
99
101
|
```
|
|
100
102
|
|
|
103
|
+
```svelte
|
|
104
|
+
<!-- Svelte -->
|
|
105
|
+
<script lang="ts">
|
|
106
|
+
import { useKeepAwake } from '@symbiote-native/keep-awake/svelte';
|
|
107
|
+
|
|
108
|
+
useKeepAwake(); // screen stays on for as long as this component is mounted
|
|
109
|
+
</script>
|
|
110
|
+
<Text>Screen will not sleep</Text>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
// Solid
|
|
115
|
+
import { createKeepAwake } from '@symbiote-native/keep-awake/solid';
|
|
116
|
+
|
|
117
|
+
function KeepAwakeScreen() {
|
|
118
|
+
createKeepAwake(); // activates in the primitive body, releases via onCleanup on dispose
|
|
119
|
+
|
|
120
|
+
return <Text>Screen will not sleep</Text>;
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
101
124
|
```ts
|
|
102
125
|
// Angular — examples/expo-angular/src/screens/KeepAwakeScreen.ts
|
|
103
126
|
import { Component, inject } from '@angular/core';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/keep-awake",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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": {
|
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
"url": "https://github.com/OneEyed1366/symbiote-native/issues"
|
|
14
14
|
},
|
|
15
15
|
"author": "Andrey Prokopenko <psevdoproger@gmail.com>",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"react-native",
|
|
18
|
+
"symbiote-native",
|
|
19
|
+
"expo-keep-awake",
|
|
20
|
+
"react",
|
|
21
|
+
"vue",
|
|
22
|
+
"svelte",
|
|
23
|
+
"solid",
|
|
24
|
+
"angular",
|
|
25
|
+
"wake-lock",
|
|
26
|
+
"screen-on"
|
|
27
|
+
],
|
|
16
28
|
"type": "module",
|
|
17
29
|
"main": "./build/core/index.js",
|
|
18
30
|
"module": "./build/core/index.js",
|
|
@@ -61,19 +73,19 @@
|
|
|
61
73
|
"expo-modules-core": "57.0.5"
|
|
62
74
|
},
|
|
63
75
|
"peerDependencies": {
|
|
64
|
-
"@symbiote-native/angular": ">=0.6.2",
|
|
65
|
-
"@symbiote-native/engine": ">=0.1.7",
|
|
66
|
-
"@symbiote-native/react": ">=0.2.8",
|
|
67
|
-
"@symbiote-native/solid": ">=0.0.1",
|
|
68
|
-
"@symbiote-native/svelte": ">=0.1.0",
|
|
69
|
-
"@symbiote-native/vue": ">=0.3.8",
|
|
70
76
|
"@angular/core": ">=20",
|
|
71
77
|
"@vue/runtime-core": "^3.5.13",
|
|
72
78
|
"react": ">=19.0.0",
|
|
73
79
|
"react-native": ">=0.86",
|
|
74
80
|
"solid-js": ">=1.9.0",
|
|
75
81
|
"svelte": ">=5.56.0",
|
|
76
|
-
"vue": ">=3.5.0"
|
|
82
|
+
"vue": ">=3.5.0",
|
|
83
|
+
"@symbiote-native/angular": "^1.0.0",
|
|
84
|
+
"@symbiote-native/engine": "^0.4.0",
|
|
85
|
+
"@symbiote-native/react": "^1.0.0",
|
|
86
|
+
"@symbiote-native/solid": "^1.0.0",
|
|
87
|
+
"@symbiote-native/svelte": "^1.0.0",
|
|
88
|
+
"@symbiote-native/vue": "^1.0.0"
|
|
77
89
|
},
|
|
78
90
|
"peerDependenciesMeta": {
|
|
79
91
|
"@symbiote-native/angular": {
|
|
@@ -121,13 +133,13 @@
|
|
|
121
133
|
"solid-js": "^1.9.14",
|
|
122
134
|
"svelte": "^5.56.0",
|
|
123
135
|
"typescript": "~6.0.0",
|
|
124
|
-
"@symbiote-native/angular": "0.
|
|
125
|
-
"@symbiote-native/engine": "0.
|
|
126
|
-
"@symbiote-native/react": "0.
|
|
127
|
-
"@symbiote-native/solid": "
|
|
128
|
-
"@symbiote-native/svelte": "0.
|
|
129
|
-
"@symbiote-native/test-utils": "0.
|
|
130
|
-
"@symbiote-native/vue": "0.
|
|
136
|
+
"@symbiote-native/angular": "1.0.0",
|
|
137
|
+
"@symbiote-native/engine": "0.4.0",
|
|
138
|
+
"@symbiote-native/react": "1.0.0",
|
|
139
|
+
"@symbiote-native/solid": "1.0.0",
|
|
140
|
+
"@symbiote-native/svelte": "1.0.0",
|
|
141
|
+
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
+
"@symbiote-native/vue": "1.0.0"
|
|
131
143
|
},
|
|
132
144
|
"scripts": {
|
|
133
145
|
"typecheck": "tsc --build",
|