@flowtty/core 1.0.0-alpha.1 → 1.0.0-alpha.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/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';
|
package/dist/index.js
CHANGED
|
@@ -181,8 +181,42 @@ var ZERO_WIDTH = [
|
|
|
181
181
|
var WIDE = [
|
|
182
182
|
[4352, 4447],
|
|
183
183
|
// Hangul Jamo (leading consonants)
|
|
184
|
+
[8986, 8987],
|
|
185
|
+
// ⌚⌛ — from here to U+2B55: the BMP emoji that are East Asian Wide
|
|
184
186
|
[9001, 9002],
|
|
185
187
|
// angle brackets
|
|
188
|
+
[9193, 9196],
|
|
189
|
+
[9200, 9200],
|
|
190
|
+
[9203, 9203],
|
|
191
|
+
[9725, 9726],
|
|
192
|
+
[9748, 9749],
|
|
193
|
+
[9800, 9811],
|
|
194
|
+
[9855, 9855],
|
|
195
|
+
[9875, 9875],
|
|
196
|
+
[9889, 9889],
|
|
197
|
+
[9898, 9899],
|
|
198
|
+
[9917, 9918],
|
|
199
|
+
[9924, 9925],
|
|
200
|
+
[9934, 9934],
|
|
201
|
+
[9940, 9940],
|
|
202
|
+
[9962, 9962],
|
|
203
|
+
[9970, 9971],
|
|
204
|
+
[9973, 9973],
|
|
205
|
+
[9978, 9978],
|
|
206
|
+
[9981, 9981],
|
|
207
|
+
[9989, 9989],
|
|
208
|
+
[9994, 9995],
|
|
209
|
+
[10024, 10024],
|
|
210
|
+
[10060, 10060],
|
|
211
|
+
[10062, 10062],
|
|
212
|
+
[10067, 10069],
|
|
213
|
+
[10071, 10071],
|
|
214
|
+
[10133, 10135],
|
|
215
|
+
[10160, 10160],
|
|
216
|
+
[10175, 10175],
|
|
217
|
+
[11035, 11036],
|
|
218
|
+
[11088, 11088],
|
|
219
|
+
[11093, 11093],
|
|
186
220
|
[11904, 12350],
|
|
187
221
|
// CJK Radicals … Kangxi … CJK Symbols (stops before U+303F)
|
|
188
222
|
[12353, 13311],
|
|
@@ -213,8 +247,12 @@ var WIDE = [
|
|
|
213
247
|
// Enclosed Ideographic Supplement
|
|
214
248
|
[127744, 128591],
|
|
215
249
|
// Misc Symbols & Pictographs + Emoticons
|
|
250
|
+
[128640, 128767],
|
|
251
|
+
// Transport and Map Symbols
|
|
216
252
|
[129280, 129535],
|
|
217
253
|
// Supplemental Symbols and Pictographs
|
|
254
|
+
[129648, 129791],
|
|
255
|
+
// Symbols and Pictographs Extended-A
|
|
218
256
|
[131072, 262141]
|
|
219
257
|
// CJK Unified Ideographs Extension B and beyond
|
|
220
258
|
];
|