@moddable/typings 1.0.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/Resource.d.ts +30 -0
- package/base64.d.ts +27 -0
- package/ble/hidclient.d.ts +95 -0
- package/ble/index.d.ts +1 -0
- package/ble.d.ts +732 -0
- package/commodetto/Bitmap.d.ts +53 -0
- package/commodetto/PixelsOut.d.ts +67 -0
- package/commodetto/Poco.d.ts +104 -0
- package/commodetto/index.d.ts +1 -0
- package/commodetto/outline.d.ts +101 -0
- package/commodetto/parseBMF.d.ts +34 -0
- package/commodetto/parseBMP.d.ts +25 -0
- package/commodetto/parseRLE.d.ts +25 -0
- package/commodetto/readJPEG.d.ts +39 -0
- package/console.d.ts +39 -0
- package/crc.d.ts +35 -0
- package/debug.d.ts +26 -0
- package/deepEqual.d.ts +23 -0
- package/dns/index.d.ts +1 -0
- package/dns/parser.d.ts +37 -0
- package/dns/serializer.d.ts +41 -0
- package/dns/server.d.ts +27 -0
- package/dns.d.ts +55 -0
- package/embedded_io/_common.d.ts +27 -0
- package/embedded_io/analog.d.ts +39 -0
- package/embedded_io/digital.d.ts +65 -0
- package/embedded_io/digitalbank.d.ts +56 -0
- package/embedded_io/i2c.d.ts +44 -0
- package/embedded_io/index.d.ts +1 -0
- package/embedded_io/pulsecount.d.ts +39 -0
- package/embedded_io/pwm.d.ts +38 -0
- package/embedded_io/serial.d.ts +61 -0
- package/embedded_io/smbus.d.ts +43 -0
- package/embedded_io/socket/listener.d.ts +36 -0
- package/embedded_io/socket/tcp.d.ts +51 -0
- package/embedded_io/socket/udp.d.ts +46 -0
- package/embedded_io/spi.d.ts +45 -0
- package/embedded_io/system.d.ts +36 -0
- package/embedded_provider/builtin.d.ts +57 -0
- package/embedded_provider/index.d.ts +1 -0
- package/file.d.ts +67 -0
- package/flash.d.ts +33 -0
- package/global.d.ts +9 -0
- package/hex.d.ts +27 -0
- package/http.d.ts +125 -0
- package/instrumentation.d.ts +60 -0
- package/mc/config.d.ts +24 -0
- package/mc/index.d.ts +1 -0
- package/mcpack.d.ts +41 -0
- package/mdns.d.ts +47 -0
- package/modules.d.ts +28 -0
- package/net.d.ts +67 -0
- package/package.json +14 -0
- package/ping.d.ts +38 -0
- package/pins/analog.d.ts +26 -0
- package/pins/audioin.d.ts +31 -0
- package/pins/audioout.d.ts +85 -0
- package/pins/digital/monitor.d.ts +41 -0
- package/pins/digital.d.ts +46 -0
- package/pins/i2c.d.ts +40 -0
- package/pins/index.d.ts +1 -0
- package/pins/pwm.d.ts +28 -0
- package/pins/rmt.d.ts +48 -0
- package/pins/servo.d.ts +28 -0
- package/pins/smbus.d.ts +47 -0
- package/piu/CombTransition.d.ts +25 -0
- package/piu/MC.d.ts +580 -0
- package/piu/Sound.d.ts +43 -0
- package/piu/Timeline.d.ts +50 -0
- package/piu/WipeTransition.d.ts +25 -0
- package/piu/index.d.ts +1 -0
- package/piu/shape.d.ts +43 -0
- package/preference.d.ts +29 -0
- package/securesocket.d.ts +38 -0
- package/sntp.d.ts +42 -0
- package/socket.d.ts +97 -0
- package/structuredClone.d.ts +23 -0
- package/telnet.d.ts +27 -0
- package/text/decoder.d.ts +46 -0
- package/text/encoder.d.ts +38 -0
- package/text/index.d.ts +1 -0
- package/time.d.ts +31 -0
- package/timer.d.ts +47 -0
- package/uuid.d.ts +24 -0
- package/websocket.d.ts +58 -0
- package/wifi.d.ts +61 -0
- package/worker.d.ts +44 -0
- package/xs.d.ts +89 -0
- package/zip.d.ts +29 -0
package/Resource.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2019-2020 Bradley Farias
|
|
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 module "Resource" {
|
|
22
|
+
class Resource extends HostBuffer {
|
|
23
|
+
constructor(path: string);
|
|
24
|
+
slice(begin: number, end?: number): ArrayBuffer;
|
|
25
|
+
slice(begin: number, end?: number, copy?: boolean): HostBuffer;
|
|
26
|
+
static exists(path: string): boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export {Resource as default};
|
|
30
|
+
}
|
package/base64.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2019-2020 Bradley Farias
|
|
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 module "base64" {
|
|
22
|
+
var Base64: {
|
|
23
|
+
decode: (str: string) => ArrayBuffer;
|
|
24
|
+
encode: (source: BufferLike | string) => string;
|
|
25
|
+
}
|
|
26
|
+
export {Base64 as default};
|
|
27
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022 Richard Lea
|
|
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 module "hidclient" {
|
|
22
|
+
|
|
23
|
+
import { BLEClient } from "bleclient";
|
|
24
|
+
import { Service } from "gatt";
|
|
25
|
+
|
|
26
|
+
type BondedInfo = {
|
|
27
|
+
device: {
|
|
28
|
+
address: ArrayBuffer,
|
|
29
|
+
addressType: number,
|
|
30
|
+
services: Service[],
|
|
31
|
+
},
|
|
32
|
+
reports: number[],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const enum ReportType {
|
|
36
|
+
NONE = 0x00,
|
|
37
|
+
INPUT = 0x01,
|
|
38
|
+
OUTPUT = 0x02,
|
|
39
|
+
FEATURE = 0x03,
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const enum UsageID {
|
|
43
|
+
POINTER = 1,
|
|
44
|
+
MOUSE = 2,
|
|
45
|
+
JOYSTICK = 4,
|
|
46
|
+
GAMEPAD = 5,
|
|
47
|
+
KEYBOARD = 6,
|
|
48
|
+
KEYPAD = 7,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const enum Appearance {
|
|
52
|
+
GENERIC = 960,
|
|
53
|
+
KEYBOARD = 961,
|
|
54
|
+
MOUSE = 962,
|
|
55
|
+
JOYSTICK = 963,
|
|
56
|
+
GAMEPAD = 964,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export class BLEHIDClient extends BLEClient {
|
|
60
|
+
constructor();
|
|
61
|
+
|
|
62
|
+
configure(params: {
|
|
63
|
+
usageID: UsageID,
|
|
64
|
+
reportTypes: ReportType[],
|
|
65
|
+
bonding: boolean,
|
|
66
|
+
}): void;
|
|
67
|
+
|
|
68
|
+
onReady(): void;
|
|
69
|
+
|
|
70
|
+
onSecurityParameters(params: any): void;
|
|
71
|
+
|
|
72
|
+
onDeviceReportMap(value: any): void;
|
|
73
|
+
|
|
74
|
+
onDeviceReports(value: number[]): void;
|
|
75
|
+
|
|
76
|
+
onDeviceDisconnected(): void;
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class Bonded {
|
|
81
|
+
static get(usageID: UsageID): BondedInfo;
|
|
82
|
+
|
|
83
|
+
static set(usageID: UsageID, device: BLEClient, reports: number[]): void;
|
|
84
|
+
|
|
85
|
+
static readonly PREFERENCE_DOMAIN = "hid";
|
|
86
|
+
static readonly PREFERENCE_KEY_POINTER = "poin";
|
|
87
|
+
static readonly PREFERENCE_KEY_MOUSE = "mous";
|
|
88
|
+
static readonly PREFERENCE_KEY_JOYSTICK = "joys";
|
|
89
|
+
static readonly PREFERENCE_KEY_GAMEPAD = "gamp";
|
|
90
|
+
static readonly PREFERENCE_KEY_KEYBOARD = "keyb";
|
|
91
|
+
static readonly PREFERENCE_KEY_KEYPAD = "keyp";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { BLEHIDClient as default, ReportType, UsageID };
|
|
95
|
+
}
|
package/ble/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Blank
|