@buntui/extensions 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
@@ -1,5 +1,4 @@
1
- import nodeBuffer from 'node:buffer';
2
- import nodeProcess from 'node:process';
1
+ import process from 'node:process';
3
2
  import { TUI_CONTEXT_INSTANCE, TuiWidgetEntity, } from '@buntui/core';
4
3
  const COLOR_BG = 0x18_10_10_F0;
5
4
  const COLOR_BORDER = 0xF3_86_AB_FF;
@@ -26,8 +25,9 @@ export function mountHmrErrorOverlay(scene, error) {
26
25
  };
27
26
  }
28
27
  function writeToClipboard(text) {
29
- const encoded = nodeBuffer.Buffer.from(text, 'utf-8').toString('base64');
30
- nodeProcess.stdout.write(`\u001B]52;c;${encoded}\u0007`);
28
+ const encoded = btoa(new TextEncoder().encode(text).reduce((s, b) => s + String.fromCodePoint(b), ''));
29
+ const sequence = `\u001B]52;c;${encoded}\u0007`;
30
+ process.stdout.write(sequence);
31
31
  }
32
32
  class HmrErrorOverlayWidget extends TuiWidgetEntity {
33
33
  #lines;
@@ -71,7 +71,7 @@ class HmrErrorOverlayWidget extends TuiWidgetEntity {
71
71
  });
72
72
  }
73
73
  get zIndex() {
74
- return 9999;
74
+ return this.getZIndexOverride() ?? 9999;
75
75
  }
76
76
  get rect() {
77
77
  const { rows, cols } = TUI_CONTEXT_INSTANCE;
@@ -54,7 +54,7 @@ export class LoggerWidget extends TuiWidgetEntity {
54
54
  borderBottom: true,
55
55
  borderLeft: true,
56
56
  borderStyle: 'solid',
57
- borderColor: this.#colorFg,
57
+ colorBorder: this.#colorFg,
58
58
  });
59
59
  this.#panel.setVisible(false);
60
60
  this.addChild(this.#toggleBtn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buntui/extensions",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AlphaFoxz/buntui.git",
@@ -46,9 +46,9 @@
46
46
  "build": "tsc --project ./tsconfig.json"
47
47
  },
48
48
  "dependencies": {
49
- "@buntui/core": "^0.1.0-alpha.2"
49
+ "@buntui/core": "^0.1.0-alpha.4"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/bun": "^1.3.14"
52
+ "@types/bun": "1.3.14"
53
53
  }
54
54
  }