blit-browser 0.6.3 → 0.6.6
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/blit_browser.d.ts
CHANGED
|
@@ -5,7 +5,14 @@ export class Terminal {
|
|
|
5
5
|
free(): void;
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
app_cursor(): boolean;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Length of background vertex data (in f32 elements).
|
|
10
|
+
*/
|
|
11
|
+
bg_verts_len(): number;
|
|
12
|
+
/**
|
|
13
|
+
* Pointer to ready-to-upload background vertex data (f32).
|
|
14
|
+
*/
|
|
15
|
+
bg_verts_ptr(): number;
|
|
9
16
|
bracketed_paste(): boolean;
|
|
10
17
|
/**
|
|
11
18
|
* DECSCUSR cursor style: 0=default, 1=blinking block, 2=steady block,
|
|
@@ -20,7 +27,14 @@ export class Terminal {
|
|
|
20
27
|
get_text(start_row: number, start_col: number, end_row: number, end_col: number): string;
|
|
21
28
|
glyph_atlas_canvas(): HTMLCanvasElement | undefined;
|
|
22
29
|
glyph_atlas_version(): number;
|
|
23
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Length of glyph vertex data (in f32 elements).
|
|
32
|
+
*/
|
|
33
|
+
glyph_verts_len(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Pointer to ready-to-upload glyph vertex data (f32).
|
|
36
|
+
*/
|
|
37
|
+
glyph_verts_ptr(): number;
|
|
24
38
|
icanon(): boolean;
|
|
25
39
|
invalidate_render_cache(): void;
|
|
26
40
|
/**
|
|
@@ -47,13 +61,19 @@ export class Terminal {
|
|
|
47
61
|
readonly rows: number;
|
|
48
62
|
}
|
|
49
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Expose WASM linear memory for zero-copy typed array views.
|
|
66
|
+
*/
|
|
67
|
+
export function wasm_memory(): any;
|
|
68
|
+
|
|
50
69
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
51
70
|
|
|
52
71
|
export interface InitOutput {
|
|
53
72
|
readonly memory: WebAssembly.Memory;
|
|
54
73
|
readonly __wbg_terminal_free: (a: number, b: number) => void;
|
|
55
74
|
readonly terminal_app_cursor: (a: number) => number;
|
|
56
|
-
readonly
|
|
75
|
+
readonly terminal_bg_verts_len: (a: number) => number;
|
|
76
|
+
readonly terminal_bg_verts_ptr: (a: number) => number;
|
|
57
77
|
readonly terminal_bracketed_paste: (a: number) => number;
|
|
58
78
|
readonly terminal_cols: (a: number) => number;
|
|
59
79
|
readonly terminal_cursor_col: (a: number) => number;
|
|
@@ -67,7 +87,8 @@ export interface InitOutput {
|
|
|
67
87
|
readonly terminal_get_text: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
68
88
|
readonly terminal_glyph_atlas_canvas: (a: number) => any;
|
|
69
89
|
readonly terminal_glyph_atlas_version: (a: number) => number;
|
|
70
|
-
readonly
|
|
90
|
+
readonly terminal_glyph_verts_len: (a: number) => number;
|
|
91
|
+
readonly terminal_glyph_verts_ptr: (a: number) => number;
|
|
71
92
|
readonly terminal_icanon: (a: number) => number;
|
|
72
93
|
readonly terminal_invalidate_render_cache: (a: number) => void;
|
|
73
94
|
readonly terminal_is_wrapped: (a: number, b: number) => number;
|
|
@@ -83,11 +104,12 @@ export interface InitOutput {
|
|
|
83
104
|
readonly terminal_set_default_colors: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
84
105
|
readonly terminal_set_font_family: (a: number, b: number, c: number) => void;
|
|
85
106
|
readonly terminal_title: (a: number) => [number, number];
|
|
107
|
+
readonly wasm_memory: () => any;
|
|
86
108
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
87
109
|
readonly __externref_table_alloc: () => number;
|
|
88
110
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
89
|
-
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
90
111
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
112
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
91
113
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
92
114
|
readonly __wbindgen_start: () => void;
|
|
93
115
|
}
|
package/blit_browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* @ts-self-types="./blit_browser.d.ts" */
|
|
2
|
-
import { blitFillTextCodePoint } from './snippets/blit-browser-
|
|
2
|
+
import { blitFillTextCodePoint } from './snippets/blit-browser-f6f2387f975e5e42/inline0.js';
|
|
3
3
|
|
|
4
4
|
export class Terminal {
|
|
5
5
|
__destroy_into_raw() {
|
|
@@ -20,13 +20,20 @@ export class Terminal {
|
|
|
20
20
|
return ret !== 0;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Length of background vertex data (in f32 elements).
|
|
24
|
+
* @returns {number}
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
-
const ret = wasm.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
bg_verts_len() {
|
|
27
|
+
const ret = wasm.terminal_bg_verts_len(this.__wbg_ptr);
|
|
28
|
+
return ret >>> 0;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pointer to ready-to-upload background vertex data (f32).
|
|
32
|
+
* @returns {number}
|
|
33
|
+
*/
|
|
34
|
+
bg_verts_ptr() {
|
|
35
|
+
const ret = wasm.terminal_bg_verts_ptr(this.__wbg_ptr);
|
|
36
|
+
return ret >>> 0;
|
|
30
37
|
}
|
|
31
38
|
/**
|
|
32
39
|
* @returns {boolean}
|
|
@@ -148,13 +155,20 @@ export class Terminal {
|
|
|
148
155
|
return ret >>> 0;
|
|
149
156
|
}
|
|
150
157
|
/**
|
|
151
|
-
*
|
|
158
|
+
* Length of glyph vertex data (in f32 elements).
|
|
159
|
+
* @returns {number}
|
|
152
160
|
*/
|
|
153
|
-
|
|
154
|
-
const ret = wasm.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
glyph_verts_len() {
|
|
162
|
+
const ret = wasm.terminal_glyph_verts_len(this.__wbg_ptr);
|
|
163
|
+
return ret >>> 0;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Pointer to ready-to-upload glyph vertex data (f32).
|
|
167
|
+
* @returns {number}
|
|
168
|
+
*/
|
|
169
|
+
glyph_verts_ptr() {
|
|
170
|
+
const ret = wasm.terminal_glyph_verts_ptr(this.__wbg_ptr);
|
|
171
|
+
return ret >>> 0;
|
|
158
172
|
}
|
|
159
173
|
/**
|
|
160
174
|
* @returns {boolean}
|
|
@@ -280,6 +294,15 @@ export class Terminal {
|
|
|
280
294
|
}
|
|
281
295
|
if (Symbol.dispose) Terminal.prototype[Symbol.dispose] = Terminal.prototype.free;
|
|
282
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Expose WASM linear memory for zero-copy typed array views.
|
|
299
|
+
* @returns {any}
|
|
300
|
+
*/
|
|
301
|
+
export function wasm_memory() {
|
|
302
|
+
const ret = wasm.wasm_memory();
|
|
303
|
+
return ret;
|
|
304
|
+
}
|
|
305
|
+
|
|
283
306
|
function __wbg_get_imports() {
|
|
284
307
|
const import0 = {
|
|
285
308
|
__proto__: null,
|
|
@@ -287,13 +310,17 @@ function __wbg_get_imports() {
|
|
|
287
310
|
const ret = arg0 === undefined;
|
|
288
311
|
return ret;
|
|
289
312
|
},
|
|
313
|
+
__wbg___wbindgen_memory_edb3f01e3930bbf6: function() {
|
|
314
|
+
const ret = wasm.memory;
|
|
315
|
+
return ret;
|
|
316
|
+
},
|
|
290
317
|
__wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
|
|
291
318
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
292
319
|
},
|
|
293
320
|
__wbg_beginPath_596efed55075dbc3: function(arg0) {
|
|
294
321
|
arg0.beginPath();
|
|
295
322
|
},
|
|
296
|
-
|
|
323
|
+
__wbg_blitFillTextCodePoint_7ec39722e2409980: function(arg0, arg1, arg2, arg3) {
|
|
297
324
|
blitFillTextCodePoint(arg0, arg1 >>> 0, arg2, arg3);
|
|
298
325
|
},
|
|
299
326
|
__wbg_clearRect_ea4f3d34d76f4bc5: function(arg0, arg1, arg2, arg3, arg4) {
|
|
@@ -314,10 +341,6 @@ function __wbg_get_imports() {
|
|
|
314
341
|
const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
|
|
315
342
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
316
343
|
}, arguments); },
|
|
317
|
-
__wbg_height_6568c4427c3b889d: function(arg0) {
|
|
318
|
-
const ret = arg0.height;
|
|
319
|
-
return ret;
|
|
320
|
-
},
|
|
321
344
|
__wbg_instanceof_CanvasRenderingContext2d_08b9d193c22fa886: function(arg0) {
|
|
322
345
|
let result;
|
|
323
346
|
try {
|
|
@@ -410,10 +433,6 @@ function __wbg_get_imports() {
|
|
|
410
433
|
__wbg_stroke_affa71c0888c6f31: function(arg0) {
|
|
411
434
|
arg0.stroke();
|
|
412
435
|
},
|
|
413
|
-
__wbg_width_4d6fc7fecd877217: function(arg0) {
|
|
414
|
-
const ret = arg0.width;
|
|
415
|
-
return ret;
|
|
416
|
-
},
|
|
417
436
|
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
418
437
|
// Cast intrinsic for `F64 -> Externref`.
|
|
419
438
|
const ret = arg0;
|
|
@@ -450,24 +469,11 @@ function addToExternrefTable0(obj) {
|
|
|
450
469
|
return idx;
|
|
451
470
|
}
|
|
452
471
|
|
|
453
|
-
function getArrayU32FromWasm0(ptr, len) {
|
|
454
|
-
ptr = ptr >>> 0;
|
|
455
|
-
return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
472
|
function getStringFromWasm0(ptr, len) {
|
|
459
473
|
ptr = ptr >>> 0;
|
|
460
474
|
return decodeText(ptr, len);
|
|
461
475
|
}
|
|
462
476
|
|
|
463
|
-
let cachedUint32ArrayMemory0 = null;
|
|
464
|
-
function getUint32ArrayMemory0() {
|
|
465
|
-
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
466
|
-
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
467
|
-
}
|
|
468
|
-
return cachedUint32ArrayMemory0;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
477
|
let cachedUint8ArrayMemory0 = null;
|
|
472
478
|
function getUint8ArrayMemory0() {
|
|
473
479
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -566,7 +572,6 @@ let wasmModule, wasm;
|
|
|
566
572
|
function __wbg_finalize_init(instance, module) {
|
|
567
573
|
wasm = instance.exports;
|
|
568
574
|
wasmModule = module;
|
|
569
|
-
cachedUint32ArrayMemory0 = null;
|
|
570
575
|
cachedUint8ArrayMemory0 = null;
|
|
571
576
|
wasm.__wbindgen_start();
|
|
572
577
|
return wasm;
|
package/blit_browser_bg.wasm
CHANGED
|
Binary file
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_terminal_free: (a: number, b: number) => void;
|
|
5
5
|
export const terminal_app_cursor: (a: number) => number;
|
|
6
|
-
export const
|
|
6
|
+
export const terminal_bg_verts_len: (a: number) => number;
|
|
7
|
+
export const terminal_bg_verts_ptr: (a: number) => number;
|
|
7
8
|
export const terminal_bracketed_paste: (a: number) => number;
|
|
8
9
|
export const terminal_cols: (a: number) => number;
|
|
9
10
|
export const terminal_cursor_col: (a: number) => number;
|
|
@@ -17,7 +18,8 @@ export const terminal_get_html: (a: number, b: number, c: number, d: number, e:
|
|
|
17
18
|
export const terminal_get_text: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
18
19
|
export const terminal_glyph_atlas_canvas: (a: number) => any;
|
|
19
20
|
export const terminal_glyph_atlas_version: (a: number) => number;
|
|
20
|
-
export const
|
|
21
|
+
export const terminal_glyph_verts_len: (a: number) => number;
|
|
22
|
+
export const terminal_glyph_verts_ptr: (a: number) => number;
|
|
21
23
|
export const terminal_icanon: (a: number) => number;
|
|
22
24
|
export const terminal_invalidate_render_cache: (a: number) => void;
|
|
23
25
|
export const terminal_is_wrapped: (a: number, b: number) => number;
|
|
@@ -33,10 +35,11 @@ export const terminal_set_cell_size: (a: number, b: number, c: number) => void;
|
|
|
33
35
|
export const terminal_set_default_colors: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
34
36
|
export const terminal_set_font_family: (a: number, b: number, c: number) => void;
|
|
35
37
|
export const terminal_title: (a: number) => [number, number];
|
|
38
|
+
export const wasm_memory: () => any;
|
|
36
39
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
37
40
|
export const __externref_table_alloc: () => number;
|
|
38
41
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
39
|
-
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
40
42
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
43
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
41
44
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
42
45
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
/package/snippets/{blit-browser-ef4cecdc3aabc7c1 → blit-browser-f6f2387f975e5e42}/inline0.js
RENAMED
|
File without changes
|