@symbiote-native/keep-awake 0.3.0 → 2.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.
Files changed (2) hide show
  1. package/README.md +29 -5
  2. 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 this package's own `postinstall` script via
44
- `@symbiote-native/expo-modules-link` — see that package's README for how the `native-link.json`
45
- manifest above drives it. Full mechanics — the Podfile pieces that normally ship inside the
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
 
@@ -82,7 +84,7 @@ import { useKeepAwake } from '@symbiote-native/keep-awake/react';
82
84
  function KeepAwakeScreen() {
83
85
  useKeepAwake(); // screen stays on for as long as this component is mounted
84
86
 
85
- return <Text>Screen will not sleep</Text>;
87
+ return <text>Screen will not sleep</text>;
86
88
  }
87
89
  ```
88
90
 
@@ -94,10 +96,32 @@ import { useKeepAwake } from '@symbiote-native/keep-awake/vue';
94
96
  useKeepAwake();
95
97
  </script>
96
98
  <template>
97
- <Text>Screen will not sleep</Text>
99
+ <text>Screen will not sleep</text>
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
+
111
+ <text>Screen will not sleep</text>
112
+ ```
113
+
114
+ ```tsx
115
+ // Solid
116
+ import { createKeepAwake } from '@symbiote-native/keep-awake/solid';
117
+
118
+ function KeepAwakeScreen() {
119
+ createKeepAwake(); // activates in the primitive body, releases via onCleanup on dispose
120
+
121
+ return <text>Screen will not sleep</text>;
122
+ }
123
+ ```
124
+
101
125
  ```ts
102
126
  // Angular — examples/expo-angular/src/screens/KeepAwakeScreen.ts
103
127
  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.0",
3
+ "version": "2.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": "^2.0.0",
84
+ "@symbiote-native/engine": "^0.5.0",
85
+ "@symbiote-native/react": "^2.0.0",
86
+ "@symbiote-native/solid": "^2.0.0",
87
+ "@symbiote-native/svelte": "^2.0.0",
88
+ "@symbiote-native/vue": "^2.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.8.0",
125
- "@symbiote-native/engine": "0.3.0",
126
- "@symbiote-native/react": "0.4.0",
127
- "@symbiote-native/solid": "0.1.0",
128
- "@symbiote-native/svelte": "0.3.0",
129
- "@symbiote-native/test-utils": "0.2.0",
130
- "@symbiote-native/vue": "0.5.0"
136
+ "@symbiote-native/angular": "2.0.0",
137
+ "@symbiote-native/engine": "0.5.0",
138
+ "@symbiote-native/react": "2.0.0",
139
+ "@symbiote-native/solid": "2.0.0",
140
+ "@symbiote-native/svelte": "2.0.0",
141
+ "@symbiote-native/test-utils": "0.3.0",
142
+ "@symbiote-native/vue": "2.0.0"
131
143
  },
132
144
  "scripts": {
133
145
  "typecheck": "tsc --build",