@moddable/typings 8.0.1 → 8.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/embedded_network/interface/wifi.d.ts +1 -1
- package/package.json +1 -1
- package/pebble/dictation.d.ts +42 -0
- package/pebble/global.d.ts +33 -1
- package/pebble/vibes.d.ts +29 -0
- package/pebble/wakeup.d.ts +32 -0
- package/web/webstorage.d.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Tools.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface DictationOptions {
|
|
22
|
+
byteLength?: number;
|
|
23
|
+
onReadable?: (this: Dictation) => void;
|
|
24
|
+
onError?: (this: Dictation, status: number) => void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface DictationConfigureOptions {
|
|
28
|
+
confirm?: boolean;
|
|
29
|
+
errorDialogs?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class Dictation {
|
|
33
|
+
constructor(options: DictationOptions);
|
|
34
|
+
close(): void;
|
|
35
|
+
configure(options: DictationConfigureOptions): void;
|
|
36
|
+
start(): void;
|
|
37
|
+
stop(): void;
|
|
38
|
+
read(): string | undefined;
|
|
39
|
+
readonly format: "string";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default Dictation;
|
package/pebble/global.d.ts
CHANGED
|
@@ -41,9 +41,25 @@ interface ConnectionState {
|
|
|
41
41
|
pebblekit: boolean;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
interface FirmwareVersion {
|
|
45
|
+
major: number;
|
|
46
|
+
minor: number;
|
|
47
|
+
patch: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface LaunchInfo {
|
|
51
|
+
reason: number;
|
|
52
|
+
arguments: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface WakeupEvent {
|
|
56
|
+
id: number;
|
|
57
|
+
cookie: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
44
60
|
type TimeEventType = "secondchange" | "minutechange" | "hourchange" | "daychange";
|
|
45
61
|
|
|
46
|
-
type PebbleEventType = TimeEventType | "connected" | "resize";
|
|
62
|
+
type PebbleEventType = TimeEventType | "connected" | "resize" | "willFocus" | "didFocus" | "wakeup";
|
|
47
63
|
|
|
48
64
|
type TimeChangeCallback = (event: TimeChangeEvent) => void;
|
|
49
65
|
|
|
@@ -51,14 +67,30 @@ type ConnectedCallback = () => void;
|
|
|
51
67
|
|
|
52
68
|
type ResizeCallback = (progress: number) => void;
|
|
53
69
|
|
|
70
|
+
type FocusCallback = (inFocus: boolean) => void;
|
|
71
|
+
|
|
72
|
+
type WakeupCallback = (event: WakeupEvent) => void;
|
|
73
|
+
|
|
54
74
|
interface watch {
|
|
55
75
|
addEventListener(event: TimeEventType, callback: TimeChangeCallback): void;
|
|
56
76
|
addEventListener(event: "connected", callback: ConnectedCallback): void;
|
|
57
77
|
addEventListener(event: "resize", callback: ResizeCallback): void;
|
|
78
|
+
addEventListener(event: "willFocus", callback: FocusCallback): void;
|
|
79
|
+
addEventListener(event: "didFocus", callback: FocusCallback): void;
|
|
80
|
+
addEventListener(event: "wakeup", callback: WakeupCallback): void;
|
|
58
81
|
removeEventListener(event: TimeEventType, callback: TimeChangeCallback): void;
|
|
59
82
|
removeEventListener(event: "connected", callback: ConnectedCallback): void;
|
|
60
83
|
removeEventListener(event: "resize", callback: ResizeCallback): void;
|
|
84
|
+
removeEventListener(event: "willFocus", callback: FocusCallback): void;
|
|
85
|
+
removeEventListener(event: "didFocus", callback: FocusCallback): void;
|
|
86
|
+
removeEventListener(event: "wakeup", callback: WakeupCallback): void;
|
|
87
|
+
light(enable?: boolean): void;
|
|
61
88
|
readonly connected: ConnectionState;
|
|
89
|
+
readonly hour12: boolean;
|
|
90
|
+
readonly model: number;
|
|
91
|
+
readonly firmwareVersion: FirmwareVersion;
|
|
92
|
+
readonly launch: LaunchInfo;
|
|
93
|
+
readonly wake: WakeupEvent | undefined;
|
|
62
94
|
}
|
|
63
95
|
|
|
64
96
|
declare const watch: watch;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Tools.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
declare class Vibes {
|
|
22
|
+
static cancel(): void;
|
|
23
|
+
static shortPulse(): void;
|
|
24
|
+
static longPulse(): void;
|
|
25
|
+
static doublePulse(): void;
|
|
26
|
+
static pattern(durations: number[]): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default Vibes;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Tools.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface WakeupQueryResult {
|
|
22
|
+
time: number;
|
|
23
|
+
scheduled: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare class Wakeup {
|
|
27
|
+
static cancel(id?: number): void;
|
|
28
|
+
static query(id: number): WakeupQueryResult;
|
|
29
|
+
static schedule(time: number, cookie: number, notifyIfMissed: boolean): number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default Wakeup;
|
package/web/webstorage.d.ts
CHANGED