@symbiote-native/battery 1.0.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.
- package/README.md +15 -15
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -89,11 +89,11 @@ function BatteryScreen() {
|
|
|
89
89
|
|
|
90
90
|
return (
|
|
91
91
|
<>
|
|
92
|
-
<
|
|
93
|
-
<
|
|
92
|
+
<text>{batteryLevelLabel}</text>
|
|
93
|
+
<text>
|
|
94
94
|
{batteryState === BatteryState.CHARGING ? 'Charging' : 'Not charging'}
|
|
95
|
-
</
|
|
96
|
-
<
|
|
95
|
+
</text>
|
|
96
|
+
<text>{lowPowerMode ? 'On' : 'Off'}</text>
|
|
97
97
|
</>
|
|
98
98
|
);
|
|
99
99
|
}
|
|
@@ -120,8 +120,8 @@ const batteryLevelText = computed(() =>
|
|
|
120
120
|
);
|
|
121
121
|
</script>
|
|
122
122
|
<template>
|
|
123
|
-
<
|
|
124
|
-
<
|
|
123
|
+
<text>{{ batteryLevelText }}</text>
|
|
124
|
+
<text>{{ lowPowerMode ? 'ON' : 'OFF' }}</text>
|
|
125
125
|
</template>
|
|
126
126
|
```
|
|
127
127
|
|
|
@@ -148,11 +148,11 @@ const batteryLevelText = computed(() =>
|
|
|
148
148
|
);
|
|
149
149
|
</script>
|
|
150
150
|
|
|
151
|
-
<
|
|
152
|
-
<
|
|
151
|
+
<text>{batteryLevelLabel}</text>
|
|
152
|
+
<text>
|
|
153
153
|
{batteryState.current === BatteryState.CHARGING ? 'Charging' : 'Not charging'}
|
|
154
|
-
</
|
|
155
|
-
<
|
|
154
|
+
</text>
|
|
155
|
+
<text>{lowPowerMode.current ? 'On' : 'Off'}</text>
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
```tsx
|
|
@@ -172,15 +172,15 @@ function BatteryScreen() {
|
|
|
172
172
|
|
|
173
173
|
return (
|
|
174
174
|
<>
|
|
175
|
-
<
|
|
175
|
+
<text>
|
|
176
176
|
{batteryLevel() < 0
|
|
177
177
|
? 'unknown'
|
|
178
178
|
: `${Math.round(batteryLevel() * 100)}%`}
|
|
179
|
-
</
|
|
180
|
-
<
|
|
179
|
+
</text>
|
|
180
|
+
<text>
|
|
181
181
|
{batteryState() === BatteryState.CHARGING ? 'Charging' : 'Not charging'}
|
|
182
|
-
</
|
|
183
|
-
<
|
|
182
|
+
</text>
|
|
183
|
+
<text>{lowPowerMode() ? 'On' : 'Off'}</text>
|
|
184
184
|
</>
|
|
185
185
|
);
|
|
186
186
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/battery",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "expo-battery wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Battery level and state (charging/full/unplugged/unknown), low-power-mode detection, plus event listeners for level and 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": "^
|
|
84
|
-
"@symbiote-native/engine": "^0.
|
|
85
|
-
"@symbiote-native/react": "^
|
|
86
|
-
"@symbiote-native/solid": "^
|
|
87
|
-
"@symbiote-native/svelte": "^
|
|
88
|
-
"@symbiote-native/vue": "^
|
|
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"
|
|
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": "
|
|
137
|
-
"@symbiote-native/engine": "0.
|
|
138
|
-
"@symbiote-native/react": "
|
|
139
|
-
"@symbiote-native/solid": "
|
|
140
|
-
"@symbiote-native/svelte": "
|
|
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
141
|
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
-
"@symbiote-native/vue": "
|
|
142
|
+
"@symbiote-native/vue": "2.0.0"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|