@moddable/typings 8.3.0 → 8.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moddable/typings",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "main": "",
5
5
  "types": [
6
6
  "xs.d.ts",
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Copyright (c) 2026 Moddable Tech, Inc.
3
+ *
4
+ * This file is part of the Moddable SDK Runtime.
5
+ *
6
+ * The Moddable SDK Runtime is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Lesser 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 Runtime 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 Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public License
17
+ * along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+
21
+
22
+ declare module "piu/ImageBuffer" {
23
+ import { Content, ContentDictionary } from "piu/MC";
24
+
25
+ interface ImageBuffer extends Content {
26
+ buffer: ByteBuffer;
27
+ }
28
+ interface ImageBufferDictionary extends ContentDictionary {
29
+ imageType?: number;
30
+ imageWidth: number;
31
+ imageHeight: number;
32
+ }
33
+ interface ImageBufferConstructor {
34
+ new(behaviorData?: any, dictionary?: ImageBufferDictionary): ImageBuffer;
35
+ (behaviorData?: any, dictionary?: ImageBufferDictionary): ImageBuffer;
36
+
37
+ template<T>(this: T, fn: (arg: any) => ImageBufferDictionary): T;
38
+ }
39
+
40
+ global {
41
+ const ImageBuffer: ImageBufferConstructor
42
+ }
43
+ }
package/piu/MC-types.d.ts CHANGED
@@ -77,7 +77,7 @@ export interface Behavior<T extends Content = Content> {
77
77
  onTimeChanged?(content: T): void;
78
78
  onTouchBegan?(content: T, id: number, x: number, y: number, ticks: number): void;
79
79
  onTouchCancelled?(content: T, id: number): void;
80
- onTouchended?(content: T, id: number, x: number, y: number, ticks: number): void;
80
+ onTouchEnded?(content: T, id: number, x: number, y: number, ticks: number): void;
81
81
  onTouchMoved?(content: T, id: number, x: number, y: number, ticks: number): void;
82
82
  // TODO: complete callbacks
83
83
  }
@@ -259,9 +259,9 @@ export interface Container extends Content {
259
259
  add(content: Content): void;
260
260
  content(at: number | string): Content | undefined;
261
261
  empty(start?: number, stop?: number): void;
262
- firstThat(id: string, ...extras: any[]): void;
262
+ firstThat(id: string, ...extras: any[]): Content | undefined;
263
263
  insert(content: Content, before: Content): void;
264
- lastThat(id: string, ...extras: any[]): void;
264
+ lastThat(id: string, ...extras: any[]): Content | undefined;
265
265
  remove(content: Content): void;
266
266
  replace(content: Content, by: Content): void;
267
267
  run(transition: Transition, ...extras: any[]): void;
@@ -454,7 +454,7 @@ export interface LayoutConstructor extends ContainerConstructor {
454
454
  }
455
455
 
456
456
  export interface Image extends Content {
457
- readonly frameCount: never;
457
+ readonly frameCount: number;
458
458
  frameIndex: number;
459
459
  }
460
460
  export interface ImageDictionary extends ContentDictionary {