blit-browser 0.2.2 → 0.2.3

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
@@ -7,6 +7,11 @@ export class Terminal {
7
7
  app_cursor(): boolean;
8
8
  background_ops(): Uint32Array;
9
9
  bracketed_paste(): boolean;
10
+ /**
11
+ * DECSCUSR cursor style: 0=default, 1=blinking block, 2=steady block,
12
+ * 3=blinking underline, 4=steady underline, 5=blinking bar, 6=steady bar.
13
+ */
14
+ cursor_style(): number;
10
15
  cursor_visible(): boolean;
11
16
  echo(): boolean;
12
17
  feed_compressed(data: Uint8Array): void;
@@ -34,7 +39,9 @@ export class Terminal {
34
39
  overflow_text_op(index: number): any;
35
40
  prepare_full_render_ops(): void;
36
41
  prepare_render_ops(): void;
42
+ set_ansi_color(idx: number, r: number, g: number, b: number): void;
37
43
  set_cell_size(cell_width: number, cell_height: number): void;
44
+ set_default_colors(fg_r: number, fg_g: number, fg_b: number, bg_r: number, bg_g: number, bg_b: number): void;
38
45
  set_font_family(font_family: string): void;
39
46
  title(): string;
40
47
  readonly cols: number;
@@ -54,6 +61,7 @@ export interface InitOutput {
54
61
  readonly terminal_cols: (a: number) => number;
55
62
  readonly terminal_cursor_col: (a: number) => number;
56
63
  readonly terminal_cursor_row: (a: number) => number;
64
+ readonly terminal_cursor_style: (a: number) => number;
57
65
  readonly terminal_cursor_visible: (a: number) => number;
58
66
  readonly terminal_echo: (a: number) => number;
59
67
  readonly terminal_feed_compressed: (a: number, b: number, c: number) => void;
@@ -79,7 +87,9 @@ export interface InitOutput {
79
87
  readonly terminal_prepare_full_render_ops: (a: number) => void;
80
88
  readonly terminal_prepare_render_ops: (a: number) => void;
81
89
  readonly terminal_rows: (a: number) => number;
90
+ readonly terminal_set_ansi_color: (a: number, b: number, c: number, d: number, e: number) => void;
82
91
  readonly terminal_set_cell_size: (a: number, b: number, c: number) => void;
92
+ readonly terminal_set_default_colors: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
83
93
  readonly terminal_set_font_family: (a: number, b: number, c: number) => void;
84
94
  readonly terminal_title: (a: number) => [number, number];
85
95
  readonly __wbindgen_exn_store: (a: number) => void;
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-3cf46cd3055f488b/inline0.js';
2
+ import { blitFillTextCodePoint } from './snippets/blit-browser-5cd769ccebe3fdb4/inline0.js';
3
3
 
4
4
  export class Terminal {
5
5
  __destroy_into_raw() {
@@ -56,6 +56,15 @@ export class Terminal {
56
56
  const ret = wasm.terminal_cursor_row(this.__wbg_ptr);
57
57
  return ret;
58
58
  }
59
+ /**
60
+ * DECSCUSR cursor style: 0=default, 1=blinking block, 2=steady block,
61
+ * 3=blinking underline, 4=steady underline, 5=blinking bar, 6=steady bar.
62
+ * @returns {number}
63
+ */
64
+ cursor_style() {
65
+ const ret = wasm.terminal_cursor_style(this.__wbg_ptr);
66
+ return ret;
67
+ }
59
68
  /**
60
69
  * @returns {boolean}
61
70
  */
@@ -254,6 +263,15 @@ export class Terminal {
254
263
  const ret = wasm.terminal_rows(this.__wbg_ptr);
255
264
  return ret;
256
265
  }
266
+ /**
267
+ * @param {number} idx
268
+ * @param {number} r
269
+ * @param {number} g
270
+ * @param {number} b
271
+ */
272
+ set_ansi_color(idx, r, g, b) {
273
+ wasm.terminal_set_ansi_color(this.__wbg_ptr, idx, r, g, b);
274
+ }
257
275
  /**
258
276
  * @param {number} cell_width
259
277
  * @param {number} cell_height
@@ -261,6 +279,17 @@ export class Terminal {
261
279
  set_cell_size(cell_width, cell_height) {
262
280
  wasm.terminal_set_cell_size(this.__wbg_ptr, cell_width, cell_height);
263
281
  }
282
+ /**
283
+ * @param {number} fg_r
284
+ * @param {number} fg_g
285
+ * @param {number} fg_b
286
+ * @param {number} bg_r
287
+ * @param {number} bg_g
288
+ * @param {number} bg_b
289
+ */
290
+ set_default_colors(fg_r, fg_g, fg_b, bg_r, bg_g, bg_b) {
291
+ wasm.terminal_set_default_colors(this.__wbg_ptr, fg_r, fg_g, fg_b, bg_r, bg_g, bg_b);
292
+ }
264
293
  /**
265
294
  * @param {string} font_family
266
295
  */
@@ -300,7 +329,7 @@ function __wbg_get_imports() {
300
329
  __wbg_beginPath_596efed55075dbc3: function(arg0) {
301
330
  arg0.beginPath();
302
331
  },
303
- __wbg_blitFillTextCodePoint_802d83a445175d1b: function(arg0, arg1, arg2, arg3) {
332
+ __wbg_blitFillTextCodePoint_105b30afda512629: function(arg0, arg1, arg2, arg3) {
304
333
  blitFillTextCodePoint(arg0, arg1 >>> 0, arg2, arg3);
305
334
  },
306
335
  __wbg_clearRect_ea4f3d34d76f4bc5: function(arg0, arg1, arg2, arg3, arg4) {
@@ -389,6 +418,9 @@ function __wbg_get_imports() {
389
418
  __wbg_set_strokeStyle_a5baa9565d8b6485: function(arg0, arg1, arg2) {
390
419
  arg0.strokeStyle = getStringFromWasm0(arg1, arg2);
391
420
  },
421
+ __wbg_set_textAlign_8f846effafbae46d: function(arg0, arg1, arg2) {
422
+ arg0.textAlign = getStringFromWasm0(arg1, arg2);
423
+ },
392
424
  __wbg_set_textBaseline_a9304886c3f7ea50: function(arg0, arg1, arg2) {
393
425
  arg0.textBaseline = getStringFromWasm0(arg1, arg2);
394
426
  },
Binary file
@@ -8,6 +8,7 @@ export const terminal_bracketed_paste: (a: number) => number;
8
8
  export const terminal_cols: (a: number) => number;
9
9
  export const terminal_cursor_col: (a: number) => number;
10
10
  export const terminal_cursor_row: (a: number) => number;
11
+ export const terminal_cursor_style: (a: number) => number;
11
12
  export const terminal_cursor_visible: (a: number) => number;
12
13
  export const terminal_echo: (a: number) => number;
13
14
  export const terminal_feed_compressed: (a: number, b: number, c: number) => void;
@@ -33,7 +34,9 @@ export const terminal_overflow_text_op: (a: number, b: number) => any;
33
34
  export const terminal_prepare_full_render_ops: (a: number) => void;
34
35
  export const terminal_prepare_render_ops: (a: number) => void;
35
36
  export const terminal_rows: (a: number) => number;
37
+ export const terminal_set_ansi_color: (a: number, b: number, c: number, d: number, e: number) => void;
36
38
  export const terminal_set_cell_size: (a: number, b: number, c: number) => void;
39
+ export const terminal_set_default_colors: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
37
40
  export const terminal_set_font_family: (a: number, b: number, c: number) => void;
38
41
  export const terminal_title: (a: number) => [number, number];
39
42
  export const __wbindgen_exn_store: (a: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blit-browser",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Low-latency terminal streaming — browser WASM renderer",
6
6
  "main": "blit_browser.js",