@inglorious/web 6.1.0 → 6.1.1
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/package.json +1 -1
- package/src/compass/handlers.js +6 -6
- package/types/compass.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/web",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
|
|
5
5
|
"author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
package/src/compass/handlers.js
CHANGED
|
@@ -13,8 +13,8 @@ const DEFAULT_ERROR_CODE = 0
|
|
|
13
13
|
export function create(entity) {
|
|
14
14
|
entity.error ??= null
|
|
15
15
|
entity.heading ??= null
|
|
16
|
-
entity.
|
|
17
|
-
entity.
|
|
16
|
+
entity.isActive ??= false
|
|
17
|
+
entity.isPermissionGranted ??= false
|
|
18
18
|
entity.isLoading ??= false
|
|
19
19
|
entity.isSupported = isCompassSupported()
|
|
20
20
|
entity.manualOffset ??= 0
|
|
@@ -49,7 +49,7 @@ export function compassUnwatch(entity) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
entity.isLoading = false
|
|
52
|
-
entity.
|
|
52
|
+
entity.isActive = false
|
|
53
53
|
entity.compassTimeout = NO_TIMEOUT
|
|
54
54
|
entity._orientationListener = null
|
|
55
55
|
entity._absoluteListener = null
|
|
@@ -59,7 +59,7 @@ export function compassUnwatch(entity) {
|
|
|
59
59
|
export function compassError(entity, error) {
|
|
60
60
|
entity.error = normalizeError(error)
|
|
61
61
|
entity.isLoading = false
|
|
62
|
-
entity.
|
|
62
|
+
entity.isPermissionGranted = false
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export async function compassPermissionsRequest(entity, _, api) {
|
|
@@ -97,7 +97,7 @@ export async function compassPermissionsRequest(entity, _, api) {
|
|
|
97
97
|
|
|
98
98
|
export function compassPermissionsGrant(entity) {
|
|
99
99
|
entity.isLoading = false
|
|
100
|
-
entity.
|
|
100
|
+
entity.isPermissionGranted = true
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
export function compassWatch(entity, _, api) {
|
|
@@ -135,7 +135,7 @@ function checkTimeout(entity, api) {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
export function compassActiveChange(entity, value) {
|
|
138
|
-
entity.
|
|
138
|
+
entity.isActive = value
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
export function compassHeadingChange(entity, value) {
|
package/types/compass.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export interface CompassEntity {
|
|
|
5
5
|
type?: "Compass"
|
|
6
6
|
error: CompassError | null
|
|
7
7
|
heading: number | null
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
isActive: boolean
|
|
9
|
+
isPermissionGranted: boolean
|
|
10
10
|
isLoading: boolean
|
|
11
11
|
isSupported: boolean
|
|
12
12
|
manualOffset: number | null
|