@capgo/capacitor-light-sensor 8.1.17 → 8.1.19
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 +20 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# @capgo/capacitor-light-sensor
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Read the ambient light level from the device sensor in your Capacitor app, to adapt themes, brightness or camera hints to the room.
|
|
4
|
+
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_light_sensor"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-light-sensor" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
3
6
|
|
|
4
7
|
<div align="center">
|
|
5
|
-
<
|
|
6
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_light_sensor">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_light_sensor">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
7
12
|
</div>
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-light-sensor/main/assets/github-social-preview.png" alt="@capgo/capacitor-light-sensor for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Live readings**: `start()` streams lux values through the `lightSensorChange` event.
|
|
21
|
+
- **Sampling control**: pass an update interval to `start()`.
|
|
22
|
+
- **Availability**: `isAvailable()` checks for a light sensor first.
|
|
23
|
+
- **Stop**: `stop()` ends updates to save battery.
|
|
24
|
+
- **Permissions**: `checkPermissions()` and `requestPermissions()` for high sampling rate sensors.
|
|
25
|
+
- **Platforms**: Android. Android only. iOS has no public ambient light sensor API, and web is not available.
|
|
10
26
|
|
|
11
27
|
## Why Capacitor Light Sensor?
|
|
12
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-light-sensor",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.19",
|
|
4
4
|
"description": "Capacitor plugin for accessing the device light sensor (Android only)",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"watch": "tsc --watch",
|
|
56
56
|
"prepublishOnly": "bun run build",
|
|
57
57
|
"check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
|
|
58
|
+
"check:cap9-deprecated": "node scripts/check-cap9-deprecated.mjs",
|
|
58
59
|
"example:install": "cd example-app && bun install --frozen-lockfile",
|
|
59
60
|
"example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
|
|
60
61
|
"changelog:ai": "node scripts/generate-ai-changelog.mjs"
|