@symbiote-native/brightness 0.0.1 → 0.2.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/build/angular/index.d.ts +1 -1
- package/build/angular/index.js +1 -1
- package/build/angular/services/permissions.service/index.d.ts +4 -0
- package/build/angular/services/permissions.service/index.js +20 -3
- package/build/core/brightness.d.ts +5 -2
- package/build/core/brightness.js +5 -2
- package/build/react/hooks/use-permissions/index.d.ts +2 -1
- package/build/react/hooks/use-permissions/index.js +18 -5
- package/build/react/index.d.ts +1 -1
- package/build/react/index.js +1 -1
- package/build/svelte/index.d.ts +2 -0
- package/build/svelte/index.js +6 -0
- package/build/svelte/runes/use-permissions.svelte.d.ts +7 -0
- package/build/svelte/runes/use-permissions.svelte.js +55 -0
- package/build/vue/composables/use-permissions/index.d.ts +1 -0
- package/build/vue/composables/use-permissions/index.js +13 -3
- package/build/vue/index.d.ts +1 -1
- package/build/vue/index.js +1 -1
- package/build-ngc/angular/index.d.ts +1 -1
- package/build-ngc/angular/index.js +1 -1
- package/build-ngc/angular/index.js.map +1 -1
- package/build-ngc/angular/services/permissions.service/index.d.ts +4 -0
- package/build-ngc/angular/services/permissions.service/index.js +23 -5
- package/build-ngc/angular/services/permissions.service/index.js.map +1 -1
- package/build-ngc/core/brightness.d.ts +5 -2
- package/build-ngc/core/brightness.js +5 -2
- package/build-ngc/core/brightness.js.map +1 -1
- package/package.json +30 -13
- package/src/angular/index.ts +1 -20
- package/src/angular/services/permissions.service/index.ts +20 -2
- package/src/core/brightness.ts +5 -2
- package/src/react/hooks/use-permissions/index.ts +19 -4
- package/src/react/index.ts +1 -20
- package/src/svelte/index.ts +7 -0
- package/src/svelte/runes/use-permissions.svelte.ts +65 -0
- package/src/svelte/svelte-ambient.d.ts +6 -0
- package/src/vue/composables/use-permissions/index.ts +13 -2
- package/src/vue/index.ts +1 -20
- package/src/angular/services/permissions.service/permissions.service.test.ts +0 -107
- package/src/core/brightness.test.ts +0 -334
- package/src/react/hooks/use-permissions/use-permissions.test.tsx +0 -100
- package/src/vue/composables/use-permissions/use-permissions.test.ts +0 -99
package/build/angular/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { PermissionsService } from './services/permissions.service';
|
|
2
|
-
export
|
|
2
|
+
export * from '../core';
|
package/build/angular/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// PermissionsService is the Angular-only lifecycle half; the free functions and event
|
|
2
2
|
// subscription plumbing all live in core, shared with React/Vue.
|
|
3
3
|
export { PermissionsService } from './services/permissions.service/index.js';
|
|
4
|
-
export
|
|
4
|
+
export * from '../core/index.js';
|
|
@@ -2,6 +2,10 @@ import { type Signal } from '@angular/core';
|
|
|
2
2
|
import { type PermissionResponse } from '../../../core';
|
|
3
3
|
export declare class PermissionsService {
|
|
4
4
|
private readonly status;
|
|
5
|
+
private readonly fetchError;
|
|
6
|
+
private isAutoFetchStarted;
|
|
7
|
+
/** Why the auto-fetch left `status` at null. Cleared by the next successful get()/request(). */
|
|
8
|
+
readonly error: Signal<Error | null>;
|
|
5
9
|
connect(): Signal<PermissionResponse | null>;
|
|
6
10
|
get(): Promise<PermissionResponse>;
|
|
7
11
|
request(): Promise<PermissionResponse>;
|
|
@@ -39,8 +39,13 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
39
39
|
//
|
|
40
40
|
// readonly status = inject(PermissionsService).connect();
|
|
41
41
|
// // template: {{ status()?.granted }}
|
|
42
|
+
//
|
|
43
|
+
// The auto-fetch has nobody to reject to, so its failure lands in the `error` signal instead of
|
|
44
|
+
// escaping as an unhandled rejection: a null status with a non-null error is how a consumer tells
|
|
45
|
+
// "the fetch failed" from "not fetched yet". get()/request() still reject to their direct caller —
|
|
46
|
+
// only the automatic call is made safe.
|
|
42
47
|
import { Injectable, signal } from '@angular/core';
|
|
43
|
-
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core';
|
|
48
|
+
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core/index.js';
|
|
44
49
|
let PermissionsService = (() => {
|
|
45
50
|
let _classDecorators = [Injectable({ providedIn: 'root' })];
|
|
46
51
|
let _classDescriptor;
|
|
@@ -56,20 +61,32 @@ let PermissionsService = (() => {
|
|
|
56
61
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
57
62
|
}
|
|
58
63
|
status = signal(null);
|
|
64
|
+
fetchError = signal(null);
|
|
65
|
+
isAutoFetchStarted = false;
|
|
66
|
+
/** Why the auto-fetch left `status` at null. Cleared by the next successful get()/request(). */
|
|
67
|
+
error = this.fetchError.asReadonly();
|
|
59
68
|
connect() {
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
// Latched rather than guarded on `status() === null`: a failed fetch leaves status null
|
|
70
|
+
// forever, so the old guard turned every later connect() into another native call — unbounded
|
|
71
|
+
// once connect() is reached from a change-detected expression instead of a field initializer.
|
|
72
|
+
if (!this.isAutoFetchStarted) {
|
|
73
|
+
this.isAutoFetchStarted = true;
|
|
74
|
+
this.get().catch((cause) => {
|
|
75
|
+
this.fetchError.set(cause instanceof Error ? cause : new Error(String(cause)));
|
|
76
|
+
});
|
|
62
77
|
}
|
|
63
78
|
return this.status.asReadonly();
|
|
64
79
|
}
|
|
65
80
|
async get() {
|
|
66
81
|
const response = await getPermissionsAsync();
|
|
67
82
|
this.status.set(response);
|
|
83
|
+
this.fetchError.set(null);
|
|
68
84
|
return response;
|
|
69
85
|
}
|
|
70
86
|
async request() {
|
|
71
87
|
const response = await requestPermissionsAsync();
|
|
72
88
|
this.status.set(response);
|
|
89
|
+
this.fetchError.set(null);
|
|
73
90
|
return response;
|
|
74
91
|
}
|
|
75
92
|
};
|
|
@@ -28,8 +28,11 @@ export declare function setSystemBrightnessAsync(brightnessValue: number): Promi
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function restoreSystemBrightnessAsync(): Promise<void>;
|
|
30
30
|
/**
|
|
31
|
-
* Whether the
|
|
32
|
-
*
|
|
31
|
+
* Whether the activity's window has NO brightness override of its own, so the system-wide
|
|
32
|
+
* brightness is what the screen shows. Native reads `screenBrightness == BRIGHTNESS_OVERRIDE_NONE`,
|
|
33
|
+
* which cannot tell "the app set the system value" apart from "the app never touched brightness" —
|
|
34
|
+
* it reports only that `setBrightnessAsync` is not currently overriding this window.
|
|
35
|
+
* Always `false` on every platform except Android.
|
|
33
36
|
* @platform android
|
|
34
37
|
*/
|
|
35
38
|
export declare function isUsingSystemBrightnessAsync(): Promise<boolean>;
|
package/build/core/brightness.js
CHANGED
|
@@ -79,8 +79,11 @@ export async function restoreSystemBrightnessAsync() {
|
|
|
79
79
|
await expoBrightness.restoreSystemBrightnessAsync();
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Whether the
|
|
83
|
-
*
|
|
82
|
+
* Whether the activity's window has NO brightness override of its own, so the system-wide
|
|
83
|
+
* brightness is what the screen shows. Native reads `screenBrightness == BRIGHTNESS_OVERRIDE_NONE`,
|
|
84
|
+
* which cannot tell "the app set the system value" apart from "the app never touched brightness" —
|
|
85
|
+
* it reports only that `setBrightnessAsync` is not currently overriding this window.
|
|
86
|
+
* Always `false` on every platform except Android.
|
|
84
87
|
* @platform android
|
|
85
88
|
*/
|
|
86
89
|
export async function isUsingSystemBrightnessAsync() {
|
|
@@ -2,29 +2,42 @@
|
|
|
2
2
|
// the current permission status on mount, then exposes get/request as imperative callbacks.
|
|
3
3
|
// Mirrors the shape @symbiote-native/cellular's own usePermissions ships in parallel, so both
|
|
4
4
|
// stay byte-for-byte consistent.
|
|
5
|
+
//
|
|
6
|
+
// The mount fetch has nobody to reject to, so its failure lands in the 4th tuple slot (`error`)
|
|
7
|
+
// instead of escaping as an unhandled rejection: a null status with a non-null error is how a
|
|
8
|
+
// consumer tells "the fetch failed" from "not fetched yet". get()/request() still reject to their
|
|
9
|
+
// direct caller — only the automatic call is made safe.
|
|
5
10
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
|
-
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core';
|
|
11
|
+
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core/index.js';
|
|
7
12
|
export function usePermissions() {
|
|
8
13
|
const isMounted = useRef(true);
|
|
9
14
|
const [status, setStatus] = useState(null);
|
|
15
|
+
const [error, setError] = useState(null);
|
|
10
16
|
const getPermission = useCallback(async () => {
|
|
11
17
|
const response = await getPermissionsAsync();
|
|
12
|
-
if (isMounted.current)
|
|
18
|
+
if (isMounted.current) {
|
|
13
19
|
setStatus(response);
|
|
20
|
+
setError(null);
|
|
21
|
+
}
|
|
14
22
|
return response;
|
|
15
23
|
}, []);
|
|
16
24
|
const requestPermission = useCallback(async () => {
|
|
17
25
|
const response = await requestPermissionsAsync();
|
|
18
|
-
if (isMounted.current)
|
|
26
|
+
if (isMounted.current) {
|
|
19
27
|
setStatus(response);
|
|
28
|
+
setError(null);
|
|
29
|
+
}
|
|
20
30
|
return response;
|
|
21
31
|
}, []);
|
|
22
32
|
useEffect(() => {
|
|
23
33
|
isMounted.current = true;
|
|
24
|
-
|
|
34
|
+
getPermission().catch((cause) => {
|
|
35
|
+
if (isMounted.current)
|
|
36
|
+
setError(cause instanceof Error ? cause : new Error(String(cause)));
|
|
37
|
+
});
|
|
25
38
|
return () => {
|
|
26
39
|
isMounted.current = false;
|
|
27
40
|
};
|
|
28
41
|
}, [getPermission]);
|
|
29
|
-
return [status, requestPermission, getPermission];
|
|
42
|
+
return [status, requestPermission, getPermission, error];
|
|
30
43
|
}
|
package/build/react/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { usePermissions } from './hooks/use-permissions';
|
|
2
|
-
export
|
|
2
|
+
export * from '../core';
|
package/build/react/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// every other export is a stateless async function or one-shot listener, re-exported verbatim —
|
|
4
4
|
// mirrors the lifecycle-bucket naming convention of adapters/react/src/hooks.
|
|
5
5
|
export { usePermissions } from './hooks/use-permissions/index.js';
|
|
6
|
-
export
|
|
6
|
+
export * from '../core/index.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @symbiote-native/brightness/svelte: the Svelte entry over the framework-agnostic core. Same
|
|
2
|
+
// reasoning as the React and Vue entries — only the permission surface gets a lifecycle rune,
|
|
3
|
+
// every other export is a plain re-export — mirrors the lifecycle-bucket naming convention of
|
|
4
|
+
// adapters/svelte/src/runes (never `hooks/`/`composables/`, those are React's and Vue's terms).
|
|
5
|
+
export { usePermissions } from './runes/use-permissions.svelte';
|
|
6
|
+
export * from '../core/index.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PermissionResponse } from '../../core';
|
|
2
|
+
export declare function usePermissions(): {
|
|
3
|
+
readonly status: PermissionResponse | null;
|
|
4
|
+
readonly error: Error | null;
|
|
5
|
+
request: () => Promise<PermissionResponse>;
|
|
6
|
+
get: () => Promise<PermissionResponse>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Svelte lifecycle wiring over the framework-agnostic core (core/brightness.ts) — auto-fetches
|
|
2
|
+
// the current permission status on mount, then exposes get/request as imperative callbacks. The
|
|
3
|
+
// Svelte twin of vue/composables/use-permissions and react/hooks/use-permissions.
|
|
4
|
+
//
|
|
5
|
+
// `.svelte.ts` (not `.ts`): runes ($state/$effect) are only usable in a file with this extension
|
|
6
|
+
// outside an actual `.svelte` component. `runes/` is Svelte's own term for the bucket React calls
|
|
7
|
+
// `hooks/` and Vue calls `composables/` — see adapters/svelte/src/runes.
|
|
8
|
+
//
|
|
9
|
+
// Vue's onMounted collapses into a `$effect` with no teardown (there is no ongoing subscription
|
|
10
|
+
// here, just a one-shot get). The effect only WRITES `status` (through `get()`), never reads it,
|
|
11
|
+
// so its dependency set stays empty and it fires exactly once on mount.
|
|
12
|
+
//
|
|
13
|
+
// `status` comes back as a GETTER on the returned object rather than a raw `$state` variable:
|
|
14
|
+
// Svelte 5 reactivity is lexically scoped to the declaring module, so a raw `let x = $state(...)`
|
|
15
|
+
// handed out of a plain function arrives dead at the caller. Reading `.status` is the Svelte
|
|
16
|
+
// equivalent of unwrapping Vue's `Ref` via `.value`.
|
|
17
|
+
//
|
|
18
|
+
// The mount fetch has nobody to reject to, so its failure lands in `error` (a second boxed getter,
|
|
19
|
+
// same reason as `status`) instead of escaping as an unhandled rejection: a null status with a
|
|
20
|
+
// non-null error is how a consumer tells "the fetch failed" from "not fetched yet".
|
|
21
|
+
// get()/request() still reject to their direct caller — only the automatic call is made safe.
|
|
22
|
+
import { getPermissionsAsync, requestPermissionsAsync } from '../../core/index.js';
|
|
23
|
+
export function usePermissions() {
|
|
24
|
+
let status = $state(null);
|
|
25
|
+
let error = $state(null);
|
|
26
|
+
const get = async () => {
|
|
27
|
+
const response = await getPermissionsAsync();
|
|
28
|
+
status = response;
|
|
29
|
+
error = null;
|
|
30
|
+
return response;
|
|
31
|
+
};
|
|
32
|
+
const request = async () => {
|
|
33
|
+
const response = await requestPermissionsAsync();
|
|
34
|
+
status = response;
|
|
35
|
+
error = null;
|
|
36
|
+
return response;
|
|
37
|
+
};
|
|
38
|
+
$effect(() => {
|
|
39
|
+
// The catch runs after the effect has settled, so writing `error` there adds no dependency and
|
|
40
|
+
// the effect still fires exactly once.
|
|
41
|
+
get().catch((cause) => {
|
|
42
|
+
error = cause instanceof Error ? cause : new Error(String(cause));
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
get status() {
|
|
47
|
+
return status;
|
|
48
|
+
},
|
|
49
|
+
get error() {
|
|
50
|
+
return error;
|
|
51
|
+
},
|
|
52
|
+
request,
|
|
53
|
+
get,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -2,6 +2,7 @@ import { type Ref } from '@vue/runtime-core';
|
|
|
2
2
|
import { type PermissionResponse } from '../../../core';
|
|
3
3
|
export declare function usePermissions(): {
|
|
4
4
|
status: Ref<PermissionResponse | null>;
|
|
5
|
+
error: Ref<Error | null>;
|
|
5
6
|
request: () => Promise<PermissionResponse>;
|
|
6
7
|
get: () => Promise<PermissionResponse>;
|
|
7
8
|
};
|
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
// current permission status on mount (mirrors use-battery-level's onMounted/onUnmounted style,
|
|
3
3
|
// but there is no ongoing subscription to tear down here, just a one-shot get), then exposes
|
|
4
4
|
// get/request as imperative callbacks.
|
|
5
|
+
//
|
|
6
|
+
// The mount fetch has nobody to reject to, so its failure lands in the `error` ref instead of
|
|
7
|
+
// escaping as an unhandled rejection: a null status with a non-null error is how a consumer tells
|
|
8
|
+
// "the fetch failed" from "not fetched yet". get()/request() still reject to their direct caller —
|
|
9
|
+
// only the automatic call is made safe.
|
|
5
10
|
import { onMounted, ref } from '@vue/runtime-core';
|
|
6
|
-
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core';
|
|
11
|
+
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core/index.js';
|
|
7
12
|
export function usePermissions() {
|
|
8
13
|
const status = ref(null);
|
|
14
|
+
const error = ref(null);
|
|
9
15
|
const get = async () => {
|
|
10
16
|
const response = await getPermissionsAsync();
|
|
11
17
|
status.value = response;
|
|
18
|
+
error.value = null;
|
|
12
19
|
return response;
|
|
13
20
|
};
|
|
14
21
|
const request = async () => {
|
|
15
22
|
const response = await requestPermissionsAsync();
|
|
16
23
|
status.value = response;
|
|
24
|
+
error.value = null;
|
|
17
25
|
return response;
|
|
18
26
|
};
|
|
19
27
|
onMounted(() => {
|
|
20
|
-
|
|
28
|
+
get().catch((cause) => {
|
|
29
|
+
error.value = cause instanceof Error ? cause : new Error(String(cause));
|
|
30
|
+
});
|
|
21
31
|
});
|
|
22
|
-
return { status, request, get };
|
|
32
|
+
return { status, error, request, get };
|
|
23
33
|
}
|
package/build/vue/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { usePermissions } from './composables/use-permissions';
|
|
2
|
-
export
|
|
2
|
+
export * from '../core';
|
package/build/vue/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
// other export is a plain re-export — mirrors the lifecycle-bucket naming convention of
|
|
4
4
|
// adapters/vue/src/composables (never `hooks/`, that's React's term).
|
|
5
5
|
export { usePermissions } from './composables/use-permissions/index.js';
|
|
6
|
-
export
|
|
6
|
+
export * from '../core/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { PermissionsService } from './services/permissions.service';
|
|
2
|
-
export
|
|
2
|
+
export * from '../core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// PermissionsService is the Angular-only lifecycle half; the free functions and event
|
|
2
2
|
// subscription plumbing all live in core, shared with React/Vue.
|
|
3
3
|
export { PermissionsService } from './services/permissions.service';
|
|
4
|
-
export
|
|
4
|
+
export * from '../core';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,iEAAiE;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,iEAAiE;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,cAAc,SAAS,CAAC"}
|
|
@@ -3,6 +3,10 @@ import { type PermissionResponse } from '../../../core';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class PermissionsService {
|
|
5
5
|
private readonly status;
|
|
6
|
+
private readonly fetchError;
|
|
7
|
+
private isAutoFetchStarted;
|
|
8
|
+
/** Why the auto-fetch left `status` at null. Cleared by the next successful get()/request(). */
|
|
9
|
+
readonly error: Signal<Error | null>;
|
|
6
10
|
connect(): Signal<PermissionResponse | null>;
|
|
7
11
|
get(): Promise<PermissionResponse>;
|
|
8
12
|
request(): Promise<PermissionResponse>;
|
|
@@ -5,32 +5,50 @@
|
|
|
5
5
|
//
|
|
6
6
|
// readonly status = inject(PermissionsService).connect();
|
|
7
7
|
// // template: {{ status()?.granted }}
|
|
8
|
+
//
|
|
9
|
+
// The auto-fetch has nobody to reject to, so its failure lands in the `error` signal instead of
|
|
10
|
+
// escaping as an unhandled rejection: a null status with a non-null error is how a consumer tells
|
|
11
|
+
// "the fetch failed" from "not fetched yet". get()/request() still reject to their direct caller —
|
|
12
|
+
// only the automatic call is made safe.
|
|
8
13
|
import { Injectable, signal } from '@angular/core';
|
|
9
14
|
import { getPermissionsAsync, requestPermissionsAsync, } from '../../../core';
|
|
10
15
|
import * as i0 from "@angular/core";
|
|
11
16
|
export class PermissionsService {
|
|
12
17
|
status = signal(null, /* @ts-ignore */
|
|
13
18
|
...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
19
|
+
fetchError = signal(null, /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "fetchError" }] : /* istanbul ignore next */ []));
|
|
21
|
+
isAutoFetchStarted = false;
|
|
22
|
+
/** Why the auto-fetch left `status` at null. Cleared by the next successful get()/request(). */
|
|
23
|
+
error = this.fetchError.asReadonly();
|
|
14
24
|
connect() {
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
// Latched rather than guarded on `status() === null`: a failed fetch leaves status null
|
|
26
|
+
// forever, so the old guard turned every later connect() into another native call — unbounded
|
|
27
|
+
// once connect() is reached from a change-detected expression instead of a field initializer.
|
|
28
|
+
if (!this.isAutoFetchStarted) {
|
|
29
|
+
this.isAutoFetchStarted = true;
|
|
30
|
+
this.get().catch((cause) => {
|
|
31
|
+
this.fetchError.set(cause instanceof Error ? cause : new Error(String(cause)));
|
|
32
|
+
});
|
|
17
33
|
}
|
|
18
34
|
return this.status.asReadonly();
|
|
19
35
|
}
|
|
20
36
|
async get() {
|
|
21
37
|
const response = await getPermissionsAsync();
|
|
22
38
|
this.status.set(response);
|
|
39
|
+
this.fetchError.set(null);
|
|
23
40
|
return response;
|
|
24
41
|
}
|
|
25
42
|
async request() {
|
|
26
43
|
const response = await requestPermissionsAsync();
|
|
27
44
|
this.status.set(response);
|
|
45
|
+
this.fetchError.set(null);
|
|
28
46
|
return response;
|
|
29
47
|
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
31
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PermissionsService, providedIn: 'root' });
|
|
32
50
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PermissionsService, decorators: [{
|
|
34
52
|
type: Injectable,
|
|
35
53
|
args: [{ providedIn: 'root' }]
|
|
36
54
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/permissions.service/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,4FAA4F;AAC5F,yFAAyF;AACzF,+BAA+B;AAC/B,EAAE;AACF,4DAA4D;AAC5D,yCAAyC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,eAAe,CAAC;;AAGvB,MAAM,OAAO,kBAAkB;IACZ,MAAM,GAAG,MAAM,CAA4B,IAAI;+EAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"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,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,QAAQ,GAAG,MAAM,uBAAuB,EAAE,CAAC;QACjD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC;IAClB,CAAC;uGAjCU,kBAAkB;2GAAlB,kBAAkB,cADL,MAAM;;2FACnB,kBAAkB;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
|
|
@@ -28,8 +28,11 @@ export declare function setSystemBrightnessAsync(brightnessValue: number): Promi
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function restoreSystemBrightnessAsync(): Promise<void>;
|
|
30
30
|
/**
|
|
31
|
-
* Whether the
|
|
32
|
-
*
|
|
31
|
+
* Whether the activity's window has NO brightness override of its own, so the system-wide
|
|
32
|
+
* brightness is what the screen shows. Native reads `screenBrightness == BRIGHTNESS_OVERRIDE_NONE`,
|
|
33
|
+
* which cannot tell "the app set the system value" apart from "the app never touched brightness" —
|
|
34
|
+
* it reports only that `setBrightnessAsync` is not currently overriding this window.
|
|
35
|
+
* Always `false` on every platform except Android.
|
|
33
36
|
* @platform android
|
|
34
37
|
*/
|
|
35
38
|
export declare function isUsingSystemBrightnessAsync(): Promise<boolean>;
|
|
@@ -79,8 +79,11 @@ export async function restoreSystemBrightnessAsync() {
|
|
|
79
79
|
await expoBrightness.restoreSystemBrightnessAsync();
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
* Whether the
|
|
83
|
-
*
|
|
82
|
+
* Whether the activity's window has NO brightness override of its own, so the system-wide
|
|
83
|
+
* brightness is what the screen shows. Native reads `screenBrightness == BRIGHTNESS_OVERRIDE_NONE`,
|
|
84
|
+
* which cannot tell "the app set the system value" apart from "the app never touched brightness" —
|
|
85
|
+
* it reports only that `setBrightnessAsync` is not currently overriding this window.
|
|
86
|
+
* Always `false` on every platform except Android.
|
|
84
87
|
* @platform android
|
|
85
88
|
*/
|
|
86
89
|
export async function isUsingSystemBrightnessAsync() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brightness.js","sourceRoot":"","sources":["../../src/core/brightness.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,yFAAyF;AACzF,+FAA+F;AAC/F,+EAA+E;AAC/E,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAiD,MAAM,SAAS,CAAC;AAExF,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAE7C,SAAS,eAAe,CAAC,eAAuB,EAAE,UAAkB;IAClE,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,SAAS,CAAC,GAAG,UAAU,0BAA0B,eAAe,EAAE,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC;AAC7C,CAAC;AAED,0FAA0F;AAC1F,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACvC,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,cAAc,CAAC,kBAAkB,EAAE,CAAC;AAC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Ac,CAAC,4BAA4B,CAAC,cAAc,CAAC,CAAC;AACpE,CAAC;AAED,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACvC,OAAO,cAAc,CAAC,mBAAmB,EAAE,CAAC;AAC9C,CAAC;AAED,oEAAoE;AACpE,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAC3C,OAAO,cAAc,CAAC,uBAAuB,EAAE,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAA0C;IAE1C,OAAO,cAAc,CAAC,WAAW,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/brightness",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "expo-brightness wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Screen brightness get/set, Android-only system-brightness-mode control, an iOS-only brightness-change listener, and permission get/request.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./build/react/index.d.ts",
|
|
31
31
|
"default": "./build/react/index.js"
|
|
32
32
|
},
|
|
33
|
+
"./svelte": {
|
|
34
|
+
"types": "./build/svelte/index.d.ts",
|
|
35
|
+
"default": "./build/svelte/index.js"
|
|
36
|
+
},
|
|
33
37
|
"./angular": {
|
|
34
38
|
"types": "./build-ngc/angular/index.d.ts",
|
|
35
39
|
"react-native": "./build-ngc/angular/index.js",
|
|
@@ -40,7 +44,10 @@
|
|
|
40
44
|
"src",
|
|
41
45
|
"build",
|
|
42
46
|
"build-ngc",
|
|
43
|
-
"native-link.json"
|
|
47
|
+
"native-link.json",
|
|
48
|
+
"!src/**/*.test.*",
|
|
49
|
+
"!src/**/*.spec.*",
|
|
50
|
+
"!src/**/*.detox.*"
|
|
44
51
|
],
|
|
45
52
|
"publishConfig": {
|
|
46
53
|
"access": "public"
|
|
@@ -50,15 +57,17 @@
|
|
|
50
57
|
"expo-modules-core": "57.0.5"
|
|
51
58
|
},
|
|
52
59
|
"peerDependencies": {
|
|
60
|
+
"@symbiote-native/angular": ">=0.6.2",
|
|
53
61
|
"@symbiote-native/engine": ">=0.1.7",
|
|
62
|
+
"@symbiote-native/react": ">=0.2.8",
|
|
63
|
+
"@symbiote-native/svelte": ">=0.1.0",
|
|
64
|
+
"@symbiote-native/vue": ">=0.3.8",
|
|
54
65
|
"@angular/core": ">=20",
|
|
55
66
|
"@vue/runtime-core": "^3.5.13",
|
|
56
67
|
"react": ">=19.0.0",
|
|
57
68
|
"react-native": ">=0.86",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"@symbiote-native/react": "0.2.8",
|
|
61
|
-
"@symbiote-native/vue": "0.3.8"
|
|
69
|
+
"svelte": ">=5.56.0",
|
|
70
|
+
"vue": ">=3.5.0"
|
|
62
71
|
},
|
|
63
72
|
"peerDependenciesMeta": {
|
|
64
73
|
"@symbiote-native/angular": {
|
|
@@ -67,6 +76,9 @@
|
|
|
67
76
|
"@symbiote-native/react": {
|
|
68
77
|
"optional": true
|
|
69
78
|
},
|
|
79
|
+
"@symbiote-native/svelte": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
70
82
|
"@symbiote-native/vue": {
|
|
71
83
|
"optional": true
|
|
72
84
|
},
|
|
@@ -79,24 +91,29 @@
|
|
|
79
91
|
"react": {
|
|
80
92
|
"optional": true
|
|
81
93
|
},
|
|
94
|
+
"svelte": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
82
97
|
"vue": {
|
|
83
98
|
"optional": true
|
|
84
99
|
}
|
|
85
100
|
},
|
|
86
101
|
"devDependencies": {
|
|
87
|
-
"@angular/compiler": "
|
|
88
|
-
"@angular/compiler-cli": "
|
|
89
|
-
"@angular/core": "
|
|
102
|
+
"@angular/compiler": "~22.0.8",
|
|
103
|
+
"@angular/compiler-cli": "~22.0.8",
|
|
104
|
+
"@angular/core": "~22.0.8",
|
|
90
105
|
"@types/node": "^26.0.0",
|
|
91
106
|
"@types/react": "^19.2.0",
|
|
92
107
|
"@vue/runtime-core": "^3.5.13",
|
|
93
108
|
"react": "19.2.3",
|
|
109
|
+
"svelte": "^5.56.0",
|
|
94
110
|
"typescript": "~6.0.0",
|
|
95
|
-
"@symbiote-native/angular": "0.
|
|
111
|
+
"@symbiote-native/angular": "0.7.0",
|
|
112
|
+
"@symbiote-native/engine": "0.2.0",
|
|
113
|
+
"@symbiote-native/react": "0.3.0",
|
|
114
|
+
"@symbiote-native/svelte": "0.2.0",
|
|
96
115
|
"@symbiote-native/test-utils": "0.1.6",
|
|
97
|
-
"@symbiote-native/
|
|
98
|
-
"@symbiote-native/react": "0.2.8",
|
|
99
|
-
"@symbiote-native/vue": "0.3.8"
|
|
116
|
+
"@symbiote-native/vue": "0.4.0"
|
|
100
117
|
},
|
|
101
118
|
"scripts": {
|
|
102
119
|
"typecheck": "tsc --build",
|
package/src/angular/index.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
// PermissionsService is the Angular-only lifecycle half; the free functions and event
|
|
2
2
|
// subscription plumbing all live in core, shared with React/Vue.
|
|
3
3
|
export { PermissionsService } from './services/permissions.service';
|
|
4
|
-
export
|
|
5
|
-
isAvailableAsync,
|
|
6
|
-
getBrightnessAsync,
|
|
7
|
-
setBrightnessAsync,
|
|
8
|
-
getSystemBrightnessAsync,
|
|
9
|
-
setSystemBrightnessAsync,
|
|
10
|
-
restoreSystemBrightnessAsync,
|
|
11
|
-
isUsingSystemBrightnessAsync,
|
|
12
|
-
getSystemBrightnessModeAsync,
|
|
13
|
-
setSystemBrightnessModeAsync,
|
|
14
|
-
getPermissionsAsync,
|
|
15
|
-
requestPermissionsAsync,
|
|
16
|
-
addBrightnessListener,
|
|
17
|
-
BrightnessMode,
|
|
18
|
-
PermissionStatus,
|
|
19
|
-
type BrightnessEvent,
|
|
20
|
-
type PermissionExpiration,
|
|
21
|
-
type PermissionResponse,
|
|
22
|
-
type EventSubscription,
|
|
23
|
-
} from '../core';
|
|
4
|
+
export * from '../core';
|