@flowtty/core 1.0.0-alpha.1 → 1.0.0-alpha.2
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/dist/host/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Container } from '../host-
|
|
2
|
-
export { B as BORDER_CHARS, H as HostType, I as Instance, R as Rect, T as TextInstance, Y as Yoga,
|
|
1
|
+
import { C as Container } from '../host-zpuR6C1c.js';
|
|
2
|
+
export { B as BORDER_CHARS, H as HostType, I as Instance, R as Rect, T as TextInstance, Y as Yoga, a as YogaNode, b as appendChild, c as applyProps, d as computeLayout, e as createInstance, f as createTextInstance, g as getYoga, i as insertBefore, l as layoutOf, m as measureText, o as ownText, r as refreshMeasure, h as removeChild } from '../host-zpuR6C1c.js';
|
|
3
3
|
import { B as Buffer } from '../cells-CaXEx4lH.js';
|
|
4
4
|
import 'yoga-layout/load';
|
|
5
5
|
|
package/dist/host/index.js
CHANGED
|
@@ -255,13 +255,15 @@ function intersectRects(a, b) {
|
|
|
255
255
|
if (right <= left || bottom <= top) return { left, top, width: 0, height: 0 };
|
|
256
256
|
return { left, top, width: right - left, height: bottom - top };
|
|
257
257
|
}
|
|
258
|
-
function paintBorder(inst, buffer, box, clip) {
|
|
258
|
+
function paintBorder(inst, buffer, box, clip, effectiveBg) {
|
|
259
259
|
const style = inst.props.border;
|
|
260
260
|
if (!style) return;
|
|
261
261
|
if (box.width < 2 || box.height < 2) return;
|
|
262
262
|
const chars = BORDER_CHARS[style];
|
|
263
263
|
const cellStyle = {};
|
|
264
264
|
if (inst.props.borderColor !== void 0) cellStyle.fg = inst.props.borderColor;
|
|
265
|
+
const bg = inst.props.borderBackgroundColor ?? effectiveBg;
|
|
266
|
+
if (bg !== void 0 && bg !== "default") cellStyle.bg = bg;
|
|
265
267
|
const x0 = box.left;
|
|
266
268
|
const y0 = box.top;
|
|
267
269
|
const x1 = box.left + box.width - 1;
|
|
@@ -319,7 +321,7 @@ function paintInstance(inst, buffer, offsetX, offsetY, inheritedBg = void 0, cli
|
|
|
319
321
|
}
|
|
320
322
|
}
|
|
321
323
|
}
|
|
322
|
-
paintBorder(inst, buffer, box, clip);
|
|
324
|
+
paintBorder(inst, buffer, box, clip, effectiveBg);
|
|
323
325
|
const text = ownText(inst);
|
|
324
326
|
if (text) {
|
|
325
327
|
const content = contentRectOf(inst, box);
|
|
@@ -62,6 +62,7 @@ interface BoxProps {
|
|
|
62
62
|
backgroundColor?: string;
|
|
63
63
|
border?: BorderStyle;
|
|
64
64
|
borderColor?: string;
|
|
65
|
+
borderBackgroundColor?: string;
|
|
65
66
|
borderTitle?: string;
|
|
66
67
|
padding?: number;
|
|
67
68
|
paddingX?: number;
|
|
@@ -148,4 +149,4 @@ declare function appendChild(parent: Instance, child: Instance | TextInstance, Y
|
|
|
148
149
|
declare function removeChild(parent: Instance, child: Instance | TextInstance, Yoga: Yoga): void;
|
|
149
150
|
declare function insertBefore(parent: Instance, child: Instance | TextInstance, before: Instance | TextInstance, Yoga: Yoga): void;
|
|
150
151
|
|
|
151
|
-
export { BORDER_CHARS as B, type Container as C, DEFAULT_BORDER_STYLE as D, GRID_CHARS as G, type HostType as H, type Instance as I, type Rect as R, type TextInstance as T, type Yoga as Y, type
|
|
152
|
+
export { BORDER_CHARS as B, type Container as C, DEFAULT_BORDER_STYLE as D, GRID_CHARS as G, type HostType as H, type Instance as I, type Rect as R, type TextInstance as T, type Yoga as Y, type YogaNode as a, appendChild as b, applyProps as c, computeLayout as d, createInstance as e, createTextInstance as f, getYoga as g, removeChild as h, insertBefore as i, type BorderChars as j, type BorderStyle as k, layoutOf as l, measureText as m, type BoxProps as n, ownText as o, type GridChars as p, refreshMeasure as r };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { B as Buffer, C as Cell, S as Style } from './cells-CaXEx4lH.js';
|
|
2
2
|
import { K as Key } from './backend-BcB7VR87.js';
|
|
3
3
|
export { B as Backend } from './backend-BcB7VR87.js';
|
|
4
|
-
export {
|
|
4
|
+
export { j as BorderChars, k as BorderStyle, n as BoxProps, D as DEFAULT_BORDER_STYLE, G as GRID_CHARS, p as GridChars } from './host-zpuR6C1c.js';
|
|
5
5
|
import 'yoga-layout/load';
|
|
6
6
|
|
|
7
7
|
type WrapMode = 'wrap' | 'truncate' | 'none';
|