@livx.cc/native-kit 0.44.0 → 0.45.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livx.cc/native-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Isomorphic native-capabilities kit for PWAs
|
|
3
|
+
"version": "0.45.0",
|
|
4
|
+
"description": "Isomorphic native-capabilities kit for PWAs — same API in browser and in an appwrap native shell. Zero dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Elya Livshitz",
|
|
7
7
|
"homepage": "https://github.com/Livshitz/appwrap#readme",
|
package/src/core/NativeKit.ts
CHANGED
|
@@ -113,7 +113,7 @@ export class NativeKit {
|
|
|
113
113
|
/**
|
|
114
114
|
* Additive, string-keyed registry mirroring the eager fields above (SAME instances) — a new
|
|
115
115
|
* capability-access path out-of-repo module packs register into (e.g. the billing/health/widget
|
|
116
|
-
*
|
|
116
|
+
* out-of-tree packs call `kit.modules.registerModule(...)`). For core modules `kit.getModule('haptics')
|
|
117
117
|
* === kit.haptics`. Fails loud on miss.
|
|
118
118
|
*/
|
|
119
119
|
public readonly modules = new ModuleRegistry();
|
|
@@ -142,7 +142,7 @@ export class NativeKit {
|
|
|
142
142
|
this.options = { ...new NativeKitOptions(), ...options };
|
|
143
143
|
// Mirror the eager CORE fields into the string-keyed registry (same instances, no behaviour
|
|
144
144
|
// change). Typed as a plain string map — not `Record<keyof KitModuleRegistry, unknown>` — because
|
|
145
|
-
// out-of-repo packs augment KitModuleRegistry with keys
|
|
145
|
+
// out-of-repo packs augment KitModuleRegistry with keys the core never mounts (billing/health/widget);
|
|
146
146
|
// those are registered by the pack's register<Name>Kit(), not here.
|
|
147
147
|
const eager: Record<string, unknown> = {
|
|
148
148
|
haptics: this.haptics, share: this.share, screen: this.screen, keyboard: this.keyboard,
|
|
@@ -30,6 +30,20 @@ export interface ScheduleOptions {
|
|
|
30
30
|
* badge unchanged. Set 0 to clear on delivery.
|
|
31
31
|
*/
|
|
32
32
|
badge?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Deliver WITHOUT the alert sound. Default (omitted/false) plays the system alert sound on
|
|
35
|
+
* both platforms — a scheduled notification is an alert, and a silent one is almost never
|
|
36
|
+
* what the caller meant. Android honours this on API 29+ only.
|
|
37
|
+
*/
|
|
38
|
+
silent?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Custom alert sound — either a file name the app already bundles, or an http(s) URL to audio in
|
|
41
|
+
* any format (mp3 included). iOS never fetches a sound itself and only plays LinearPCM in a
|
|
42
|
+
* caf/aiff/wav container under 30s, so the shell downloads a URL once, transcodes it, caches it in
|
|
43
|
+
* `Library/Sounds`, and hands the OS the resulting file name. Anything that fails along the way
|
|
44
|
+
* falls back to the DEFAULT alert — never to silence. iOS only; Android uses its channel sound.
|
|
45
|
+
*/
|
|
46
|
+
sound?: string;
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
export class NotificationsModule {
|