@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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020-2022 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 module "commodetto/Bitmap" {
|
|
22
|
+
type PixelFormat = number
|
|
23
|
+
|
|
24
|
+
class Bitmap {
|
|
25
|
+
constructor(width: number, height: number, format: PixelFormat, buffer: BufferLike, offset: number, byteLength?: number)
|
|
26
|
+
|
|
27
|
+
readonly pixelFormat: PixelFormat
|
|
28
|
+
readonly offset: number
|
|
29
|
+
readonly width: number
|
|
30
|
+
readonly height: number
|
|
31
|
+
|
|
32
|
+
static depth(pixelFormat: PixelFormat): number
|
|
33
|
+
|
|
34
|
+
static readonly Default = 1
|
|
35
|
+
static readonly Monochrome = 3
|
|
36
|
+
static readonly Gray16 = 4
|
|
37
|
+
static readonly Gray256 = 5
|
|
38
|
+
static readonly RGB332 = 6
|
|
39
|
+
static readonly RGB565LE = 7
|
|
40
|
+
static readonly RGB565BE = 8
|
|
41
|
+
static readonly RGB24 = 9
|
|
42
|
+
static readonly RGBA32 = 10
|
|
43
|
+
static readonly CLUT16 = 11
|
|
44
|
+
static readonly ARGB4444 = 12
|
|
45
|
+
static readonly RGB444 = 13
|
|
46
|
+
static readonly JPEG = 14
|
|
47
|
+
static readonly PNG = 15
|
|
48
|
+
|
|
49
|
+
static readonly RLE = 0x80
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {Bitmap as default};
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 "commodetto/PixelsOut" {
|
|
22
|
+
class PixelsOut {
|
|
23
|
+
constructor(width: number, height: number, pixelFormat: number);
|
|
24
|
+
begin(x: number, y: number, width: number, height: number): void;
|
|
25
|
+
end(): void;
|
|
26
|
+
continue(x: number, y: number, width: number, height: number): void;
|
|
27
|
+
send(
|
|
28
|
+
pixels: ArrayBuffer | HostBuffer,
|
|
29
|
+
offset: number,
|
|
30
|
+
count: number
|
|
31
|
+
): void;
|
|
32
|
+
|
|
33
|
+
adaptInvalid(area: { x: number, y: number, width: number, height: number }): void;
|
|
34
|
+
pixelsToBytes(count: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* The width of the PixelsOut instance in pixels.
|
|
37
|
+
*/
|
|
38
|
+
readonly width: number;
|
|
39
|
+
/**
|
|
40
|
+
* The height of the PixelsOut instance in pixels.
|
|
41
|
+
*/
|
|
42
|
+
readonly height: number;
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if the PixelsOut supports asynchronous rendering.
|
|
45
|
+
* This means pixels passed to send are not copied, and must remain unchanged through the completion of the next call to send or end.
|
|
46
|
+
*/
|
|
47
|
+
readonly pixelFormat: number;
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the PixelsOut supports asynchronous rendering.
|
|
50
|
+
* This means pixels passed to send are not copied, and must remain unchanged through the completion of the next call to send or end.
|
|
51
|
+
*/
|
|
52
|
+
readonly async: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Optionally returns a pointer to a HostBuffer that contains a native PixelsOutDispatchRecord.
|
|
55
|
+
* Returns undefined if no native dispatch table is available.
|
|
56
|
+
* The native PixelsOutDispatchRecord allows native code to call the PixelsOut's begin, send, continue, end, and adaptInvalid functions directly, without going through the XS virtual machine.
|
|
57
|
+
* The native dispatch table is strictly an optimization and provides only functionality in the JavaScript API.
|
|
58
|
+
*/
|
|
59
|
+
readonly c_dispatch: HostBuffer | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* (Not documented yet)
|
|
62
|
+
*/
|
|
63
|
+
clut: unknown;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {PixelsOut as default};
|
|
67
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020 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
|
+
|
|
22
|
+
declare module "commodetto/Poco" {
|
|
23
|
+
import PixelsOut from "commodetto/PixelsOut"
|
|
24
|
+
import Bitmap from "commodetto/Bitmap"
|
|
25
|
+
|
|
26
|
+
type Rectangle = {
|
|
27
|
+
x: number,
|
|
28
|
+
y: number,
|
|
29
|
+
width: number,
|
|
30
|
+
height: number,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type Font = any //@@ share full interface with commodetto/parseBMF
|
|
34
|
+
|
|
35
|
+
export interface PocoPrototype {
|
|
36
|
+
close(): void
|
|
37
|
+
begin(x?: number, y?: number, width?: number, height?: number): void
|
|
38
|
+
begin(rectangle: Rectangle): void
|
|
39
|
+
end(): void
|
|
40
|
+
continue(x: number, y: number, width: number, height: number): void
|
|
41
|
+
|
|
42
|
+
clip(x: number, y: number, width: number, height: number): void
|
|
43
|
+
clip(): void
|
|
44
|
+
origin(x: number, y: number): void
|
|
45
|
+
origin(): void
|
|
46
|
+
|
|
47
|
+
makeColor(r: number, g: number, b: number): number
|
|
48
|
+
fillRectangle(color: number, x: number, y: number, width: number, height: number): void
|
|
49
|
+
blendRectangle(color: number, blend: number, x: number, y: number, width: number, height: number): void
|
|
50
|
+
drawPixel(color: number, x: number, y: number): void
|
|
51
|
+
|
|
52
|
+
drawBitmap(bits: Bitmap, x: number, y: number): void
|
|
53
|
+
drawBitmap(bits: Bitmap, x: number, y: number, sx: number, sy: number): void
|
|
54
|
+
drawBitmap(bits: Bitmap, x: number, y: number, sx: number, sy: number, sw: number, sh: number): void
|
|
55
|
+
|
|
56
|
+
drawMonochrome(monochrome: object, fore: number | undefined, back: number | undefined, x: number, y: number): void
|
|
57
|
+
drawMonochrome(monochrome: object, fore: number | undefined, back: number | undefined, x: number, y: number, sx: number, sy: number): void
|
|
58
|
+
drawMonochrome(monochrome: object, fore: number | undefined, back: number | undefined, x: number, y: number, sx: number, sy: number, sw: number, sh: number): void
|
|
59
|
+
|
|
60
|
+
drawGray(bits: Bitmap, color: number, x: number, y: number): void
|
|
61
|
+
drawGray(bits: Bitmap, color: number, x: number, y: number, sx: number, sy: number): void
|
|
62
|
+
drawGray(bits: Bitmap, color: number, x: number, y: number, sx: number, sy: number, sw: number, sh: number): void
|
|
63
|
+
drawGray(bits: Bitmap, color: number, x: number, y: number, sx: number, sy: number, sw: number, sh: number, blend: number): void
|
|
64
|
+
|
|
65
|
+
drawMasked(bits: Bitmap, x: number, y: number, sx: number, sy: number, sw: number, sh: number, mask: Bitmap, mask_sx: number, mask_sy: number): void
|
|
66
|
+
drawMasked(bits: Bitmap, x: number, y: number, sx: number, sy: number, sw: number, sh: number, mask: Bitmap, mask_sx: number, mask_sy: number, blend: number): void
|
|
67
|
+
|
|
68
|
+
fillPattern(bits: Bitmap, x: number, y: number, w: number, h: number): void
|
|
69
|
+
fillPattern(bits: Bitmap, x: number, y: number, w: number, h: number, sx: number, sy: number, sw: number, sh: number): void
|
|
70
|
+
|
|
71
|
+
drawFrame(frame: ArrayBuffer | HostBuffer, stream: { width: number, height: number }, x: number, y: number): void
|
|
72
|
+
|
|
73
|
+
drawText(text: string, font: Font, color: number, x: number, y: number, width?: number): void
|
|
74
|
+
getTextWidth(text: string, font: Font): number
|
|
75
|
+
|
|
76
|
+
adaptInvalid(area: Rectangle): void
|
|
77
|
+
|
|
78
|
+
bitmapChanged(bits: Bitmap): void
|
|
79
|
+
bitmapRemove(bits: Bitmap): void
|
|
80
|
+
compact(): void
|
|
81
|
+
|
|
82
|
+
readonly width: number
|
|
83
|
+
readonly height: number
|
|
84
|
+
readonly pixelsOut: PixelsOut
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface PocoDictionary {
|
|
88
|
+
pixels?: number,
|
|
89
|
+
displayListLength?: number,
|
|
90
|
+
rotation?: (0 | 90 | 180 | 270)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface PocoConstructor {
|
|
94
|
+
new(pixelsOut: PixelsOut, options?: PocoDictionary): PocoPrototype
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
var Poco: PocoConstructor
|
|
98
|
+
|
|
99
|
+
global {
|
|
100
|
+
const screen: PixelsOut
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export default Poco
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Blank
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021-2022 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 module "commodetto/outline" {
|
|
22
|
+
type CommodettoPath = Array<ArrayBuffer>
|
|
23
|
+
|
|
24
|
+
interface CanvasPath extends CommodettoPath {
|
|
25
|
+
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void
|
|
26
|
+
arcTo(x1: number, y1: number, x2: number, y2: number, r: number) : void
|
|
27
|
+
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number) : void
|
|
28
|
+
closePath() : void
|
|
29
|
+
ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean) : void
|
|
30
|
+
lineTo(x: number, y: number) : void
|
|
31
|
+
moveTo(x: number, y: number) : void
|
|
32
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number) : void
|
|
33
|
+
rect(x: number, y: number, w: number, h: number) : void
|
|
34
|
+
}
|
|
35
|
+
interface CanvasPathConstructor {
|
|
36
|
+
new(): CanvasPath;
|
|
37
|
+
}
|
|
38
|
+
interface FreeTypePath extends CommodettoPath {
|
|
39
|
+
beginSubpath(x: number, y: number, open?: boolean): void
|
|
40
|
+
conicTo(cx: number, cy: number, x: number, y: number): void
|
|
41
|
+
cubicTo(c1x: number, c1y: number, c2x: number, c2y: number, x: number, y: number): void
|
|
42
|
+
endSubpath(): void
|
|
43
|
+
lineTo(x: number, y: number): void
|
|
44
|
+
}
|
|
45
|
+
interface FreeTypePathConstructor {
|
|
46
|
+
new(): FreeTypePath;
|
|
47
|
+
}
|
|
48
|
+
interface PolygonPath {
|
|
49
|
+
(...points: Array<number>): CommodettoPath
|
|
50
|
+
}
|
|
51
|
+
interface RoundRectPath {
|
|
52
|
+
(x: number, y: number, w: number, h: number, r: number): CommodettoPath
|
|
53
|
+
}
|
|
54
|
+
interface SVGPath {
|
|
55
|
+
(path: string): CommodettoPath
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export class Outline {
|
|
59
|
+
clone(): Outline
|
|
60
|
+
rotate(angle: number): Outline
|
|
61
|
+
rotate(angle: number, cx: number, cy: number): Outline
|
|
62
|
+
scale(x: number, y: number): Outline
|
|
63
|
+
translate(x: number, y: number): Outline
|
|
64
|
+
|
|
65
|
+
readonly bounds: {
|
|
66
|
+
x: number,
|
|
67
|
+
y: number,
|
|
68
|
+
width: number,
|
|
69
|
+
height: number,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static CanvasPath: CanvasPathConstructor
|
|
73
|
+
static FreeTypePath: FreeTypePathConstructor
|
|
74
|
+
static PolygonPath: PolygonPath
|
|
75
|
+
static RoundRectPath: RoundRectPath
|
|
76
|
+
static SVGPath: SVGPath
|
|
77
|
+
|
|
78
|
+
static fill(path: CommodettoPath, rule?: number): Outline
|
|
79
|
+
static stroke(path: CommodettoPath, weight?: number, linecap?: number, linejoin?: number, miterLimit?: number): Outline
|
|
80
|
+
|
|
81
|
+
static readonly NON_ZERO_RULE: number
|
|
82
|
+
static readonly EVEN_ODD_RULE: number
|
|
83
|
+
|
|
84
|
+
static readonly LINECAP_BUTT: number
|
|
85
|
+
static readonly LINECAP_ROUND: number
|
|
86
|
+
static readonly LINECAP_SQUARE: number
|
|
87
|
+
|
|
88
|
+
static readonly LINEJOIN_ROUND: number
|
|
89
|
+
static readonly LINEJOIN_BEVEL: number
|
|
90
|
+
static readonly LINEJOIN_MITER: number
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
declare module "commodetto/Poco" {
|
|
95
|
+
import {Outline} from "commodetto/outline"
|
|
96
|
+
|
|
97
|
+
interface PocoPrototype {
|
|
98
|
+
blendOutline(color: number, blend: number, outline: Outline, x?: number, y?: number): void
|
|
99
|
+
blendPolygon(color: number, blend: number, ...points: Array<number>): void
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020-2022 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 module "commodetto/parseBMF" {
|
|
22
|
+
import Bitmap from "commodetto/Bitmap"
|
|
23
|
+
|
|
24
|
+
type Font = {
|
|
25
|
+
readonly byteLength: number
|
|
26
|
+
height: number
|
|
27
|
+
ascent: number
|
|
28
|
+
position: number
|
|
29
|
+
charCount: number,
|
|
30
|
+
bitmap: Bitmap
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default function (bmp: BufferLike): Font
|
|
34
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020 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 module "commodetto/parseBMP" {
|
|
22
|
+
import Bitmap from "commodetto/Bitmap"
|
|
23
|
+
|
|
24
|
+
export default function (bmp: HostBuffer): Bitmap
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020 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 module "commodetto/parseRLE" {
|
|
22
|
+
import Bitmap from "commodetto/Bitmap"
|
|
23
|
+
|
|
24
|
+
export default function (bmp: HostBuffer): Bitmap
|
|
25
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020-2022 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 module "commodetto/readJPEG" {
|
|
22
|
+
import Bitmap from "commodetto/Bitmap"
|
|
23
|
+
|
|
24
|
+
type Block = Bitmap & {
|
|
25
|
+
x: number,
|
|
26
|
+
y: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class JPEG {
|
|
30
|
+
constructor(buffer: (BufferLike), options?: { pixelFormat: number })
|
|
31
|
+
|
|
32
|
+
read(): Block
|
|
33
|
+
push(buffer: BufferLike): void
|
|
34
|
+
|
|
35
|
+
readonly ready: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {JPEG as default};
|
|
39
|
+
}
|
package/console.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
22
|
+
* The `console` module uses `cli` modules to implement the terminal commands.
|
|
23
|
+
*/
|
|
24
|
+
declare module "console" {
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The `Console` class implements a serial terminal for debugging and diagnostic purposes.
|
|
28
|
+
*/
|
|
29
|
+
export class Console {
|
|
30
|
+
receive(): number;
|
|
31
|
+
write(...items: string[]): void;
|
|
32
|
+
resume(): void;
|
|
33
|
+
suspend(): void;
|
|
34
|
+
prompt(): void;
|
|
35
|
+
line(...items: string[]): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { Console as default };
|
|
39
|
+
}
|
package/crc.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021 Satoshi Tanaka
|
|
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 "crc" {
|
|
22
|
+
class CRC8 {
|
|
23
|
+
constructor(polynomial: number, initial_value?: number, reflectInput?: boolean, reflectOutput?: boolean, xorOutput?: number)
|
|
24
|
+
close(): void
|
|
25
|
+
checksum(bytes: BufferLike): number
|
|
26
|
+
reset(): this
|
|
27
|
+
}
|
|
28
|
+
class CRC16 {
|
|
29
|
+
constructor(polynomial: number, initial_value?: number, reflectInput?: boolean, reflectOutput?: boolean, xorOutput?: number)
|
|
30
|
+
close(): void
|
|
31
|
+
checksum(bytes: BufferLike): number
|
|
32
|
+
reset(): this
|
|
33
|
+
}
|
|
34
|
+
export {CRC8 as default, CRC8, CRC16};
|
|
35
|
+
}
|
package/debug.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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 "debug" {
|
|
22
|
+
var Debug: {
|
|
23
|
+
gc: (enable?: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
export {Debug as default};
|
|
26
|
+
}
|
package/deepEqual.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2022 Shinya Ishikawa
|
|
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 "deepEqual" {
|
|
22
|
+
export default function deepEqual(a: any, b: any): boolean
|
|
23
|
+
}
|
package/dns/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Blank
|
package/dns/parser.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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 "dns/parser" {
|
|
22
|
+
class Parser {
|
|
23
|
+
constructor(buffer: ArrayBuffer);
|
|
24
|
+
get id(): number;
|
|
25
|
+
get flags(): number;
|
|
26
|
+
get questions(): number;
|
|
27
|
+
get answers(): number;
|
|
28
|
+
get authorities(): number;
|
|
29
|
+
get additionals(): number;
|
|
30
|
+
// TODO: not use unknown
|
|
31
|
+
question(index: number): unknown;
|
|
32
|
+
answer(index: number): unknown;
|
|
33
|
+
authority(index: number): unknown;
|
|
34
|
+
additional(index: number): unknown;
|
|
35
|
+
}
|
|
36
|
+
export {Parser as default};
|
|
37
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 "dns/serializer" {
|
|
22
|
+
import DNS from "dns";
|
|
23
|
+
class Serializer {
|
|
24
|
+
constructor(options: {
|
|
25
|
+
opcode?: (typeof DNS.OPCODE)[keyof (typeof DNS.OPCODE)],
|
|
26
|
+
query?: boolean,
|
|
27
|
+
authoritative?: boolean,
|
|
28
|
+
id?: number
|
|
29
|
+
});
|
|
30
|
+
add(
|
|
31
|
+
section: (typeof DNS.SECTION)[keyof (typeof DNS.SECTION)],
|
|
32
|
+
name: string,
|
|
33
|
+
type: (typeof DNS.RR)[keyof (typeof DNS.RR)],
|
|
34
|
+
classType: (typeof DNS.CLASS)[keyof (typeof DNS.CLASS)],
|
|
35
|
+
ttl: number,
|
|
36
|
+
data?: ArrayBuffer
|
|
37
|
+
): void;
|
|
38
|
+
build(): ArrayBuffer;
|
|
39
|
+
}
|
|
40
|
+
export {Serializer as default};
|
|
41
|
+
}
|