@opentui/core 0.6.4 → 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/Renderable.d.ts +27 -9
- package/{chunk-bun-qphgryjx.js → chunk-bun-6qjat6qa.js} +128 -133
- package/{chunk-node-j1h89sfg.js.map → chunk-bun-6qjat6qa.js.map} +8 -8
- package/{chunk-bun-e2gttx65.js → chunk-bun-jztcnb74.js} +22 -15
- package/chunk-bun-jztcnb74.js.map +35 -0
- package/{chunk-node-j1h89sfg.js → chunk-node-2rg7pskw.js} +128 -133
- package/{chunk-bun-qphgryjx.js.map → chunk-node-2rg7pskw.js.map} +8 -8
- package/{chunk-node-6rc18den.js → chunk-node-p43t2gam.js} +22 -15
- package/chunk-node-p43t2gam.js.map +34 -0
- package/index.bun.js +39 -12
- package/index.bun.js.map +8 -8
- package/index.node.js +39 -12
- package/index.node.js.map +8 -8
- package/package.json +9 -9
- package/renderables/ASCIIFont.d.ts +1 -0
- package/renderables/Box.d.ts +4 -3
- package/renderables/EmbeddedTerminal.d.ts +2 -0
- package/renderables/Input.d.ts +1 -0
- package/renderables/ScrollBar.d.ts +2 -0
- package/renderables/TabSelect.d.ts +1 -0
- package/renderables/TimeToFirstDraw.d.ts +1 -0
- package/testing.bun.js +2 -2
- package/testing.js +2 -2
- package/yoga.bun.js +1 -1
- package/yoga.js +1 -1
- package/zig.d.ts +3 -3
- package/chunk-bun-e2gttx65.js.map +0 -35
- package/chunk-node-6rc18den.js.map +0 -34
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
sceneSetEnum,
|
|
24
24
|
sceneGetEnum,
|
|
25
25
|
sceneSetFloat,
|
|
26
|
+
sceneGetFloat,
|
|
26
27
|
sceneSetValue,
|
|
27
28
|
sceneGetValue,
|
|
28
29
|
sceneSetDimension,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
PositionType2,
|
|
63
64
|
Unit2,
|
|
64
65
|
Wrap2
|
|
65
|
-
} from "./chunk-node-
|
|
66
|
+
} from "./chunk-node-p43t2gam.js";
|
|
66
67
|
|
|
67
68
|
// src/lib/border.ts
|
|
68
69
|
var VALID_BORDER_STYLES = ["single", "double", "rounded", "heavy"];
|
|
@@ -3342,7 +3343,7 @@ class SyntaxStyle2 {
|
|
|
3342
3343
|
static create(source) {
|
|
3343
3344
|
const owner = source?.resourceContext;
|
|
3344
3345
|
if (!owner)
|
|
3345
|
-
throw new Error("SyntaxStyle requires an explicit resource owner");
|
|
3346
|
+
throw new Error("SyntaxStyle requires an explicit resource owner: pass renderer.nativeScene, or a ResourceContext when there is no renderer");
|
|
3346
3347
|
owner.assertAlive();
|
|
3347
3348
|
const lib = owner.renderLib;
|
|
3348
3349
|
const handle = lib.createContextSyntaxStyle(owner.context);
|
|
@@ -10005,7 +10006,7 @@ class OptimizedBuffer2 {
|
|
|
10005
10006
|
static create(width, height, widthMethod, options) {
|
|
10006
10007
|
const owner = options?.owner?.resourceContext;
|
|
10007
10008
|
if (!owner)
|
|
10008
|
-
throw new Error("OptimizedBuffer requires an explicit resource owner");
|
|
10009
|
+
throw new Error("OptimizedBuffer requires an explicit resource owner: pass { owner: renderer.nativeScene }, or a ResourceContext when there is no renderer");
|
|
10009
10010
|
owner.assertAlive();
|
|
10010
10011
|
const { renderLib: lib, context } = owner;
|
|
10011
10012
|
const buffer = lib.createContextBuffer(context, {
|
|
@@ -10569,6 +10570,7 @@ var RenderableEvents2;
|
|
|
10569
10570
|
RenderableEvents["BLURRED"] = "blurred";
|
|
10570
10571
|
RenderableEvents["DESTROYED"] = "destroyed";
|
|
10571
10572
|
})(RenderableEvents2 ||= {});
|
|
10573
|
+
var positionKeys = ["left", "top", "right", "bottom"];
|
|
10572
10574
|
function isRenderable2(obj) {
|
|
10573
10575
|
return !!obj?.[BrandedRenderable];
|
|
10574
10576
|
}
|
|
@@ -10787,6 +10789,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
10787
10789
|
return isRowFlexDirection(this.getFlexDirection()) ? "row" : "column";
|
|
10788
10790
|
}
|
|
10789
10791
|
set visible(value) {
|
|
10792
|
+
value ??= true;
|
|
10790
10793
|
if (this._visible === value)
|
|
10791
10794
|
return;
|
|
10792
10795
|
this.runMutation(() => {
|
|
@@ -11011,32 +11014,32 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11011
11014
|
return this._position.top;
|
|
11012
11015
|
}
|
|
11013
11016
|
set top(value) {
|
|
11014
|
-
if (isPositionType(value) || value
|
|
11015
|
-
this.setPosition({ top: value });
|
|
11017
|
+
if (isPositionType(value) || value == null) {
|
|
11018
|
+
this.setPosition({ top: value ?? undefined });
|
|
11016
11019
|
}
|
|
11017
11020
|
}
|
|
11018
11021
|
get right() {
|
|
11019
11022
|
return this._position.right;
|
|
11020
11023
|
}
|
|
11021
11024
|
set right(value) {
|
|
11022
|
-
if (isPositionType(value) || value
|
|
11023
|
-
this.setPosition({ right: value });
|
|
11025
|
+
if (isPositionType(value) || value == null) {
|
|
11026
|
+
this.setPosition({ right: value ?? undefined });
|
|
11024
11027
|
}
|
|
11025
11028
|
}
|
|
11026
11029
|
get bottom() {
|
|
11027
11030
|
return this._position.bottom;
|
|
11028
11031
|
}
|
|
11029
11032
|
set bottom(value) {
|
|
11030
|
-
if (isPositionType(value) || value
|
|
11031
|
-
this.setPosition({ bottom: value });
|
|
11033
|
+
if (isPositionType(value) || value == null) {
|
|
11034
|
+
this.setPosition({ bottom: value ?? undefined });
|
|
11032
11035
|
}
|
|
11033
11036
|
}
|
|
11034
11037
|
get left() {
|
|
11035
11038
|
return this._position.left;
|
|
11036
11039
|
}
|
|
11037
11040
|
set left(value) {
|
|
11038
|
-
if (isPositionType(value) || value
|
|
11039
|
-
this.setPosition({ left: value });
|
|
11041
|
+
if (isPositionType(value) || value == null) {
|
|
11042
|
+
this.setPosition({ left: value ?? undefined });
|
|
11040
11043
|
}
|
|
11041
11044
|
}
|
|
11042
11045
|
get y() {
|
|
@@ -11059,10 +11062,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11059
11062
|
return this._destroyedLayout?.width ?? this.styledDimension("width");
|
|
11060
11063
|
}
|
|
11061
11064
|
set width(value) {
|
|
11062
|
-
|
|
11063
|
-
return;
|
|
11064
|
-
}
|
|
11065
|
-
this.setDimension(Dimension2.Width, value);
|
|
11065
|
+
this.setDimension("width", value);
|
|
11066
11066
|
}
|
|
11067
11067
|
get height() {
|
|
11068
11068
|
if (!this.isFreed()) {
|
|
@@ -11071,6 +11071,9 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11071
11071
|
}
|
|
11072
11072
|
return this._destroyedLayout?.height ?? this.styledDimension("height");
|
|
11073
11073
|
}
|
|
11074
|
+
defaultDimension(_kind) {
|
|
11075
|
+
return "auto";
|
|
11076
|
+
}
|
|
11074
11077
|
styledDimension(kind) {
|
|
11075
11078
|
const value = kind === "width" ? this._width : this._height;
|
|
11076
11079
|
return typeof value === "number" ? value : 0;
|
|
@@ -11096,15 +11099,18 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11096
11099
|
return layout;
|
|
11097
11100
|
}
|
|
11098
11101
|
set height(value) {
|
|
11099
|
-
|
|
11100
|
-
return;
|
|
11101
|
-
}
|
|
11102
|
-
this.setDimension(Dimension2.Height, value);
|
|
11102
|
+
this.setDimension("height", value);
|
|
11103
11103
|
}
|
|
11104
|
-
setDimension(
|
|
11104
|
+
setDimension(kind, input) {
|
|
11105
|
+
if (this.isFreed())
|
|
11106
|
+
return;
|
|
11107
|
+
const value = input ?? this.defaultDimension(kind);
|
|
11108
|
+
const key = kind === "width" ? "_width" : "_height";
|
|
11109
|
+
if (!isDimensionType(value) || this[key] === value)
|
|
11110
|
+
return;
|
|
11105
11111
|
this.runMutation(() => {
|
|
11106
|
-
const key = dimension === Dimension2.Width ? "_width" : "_height";
|
|
11107
11112
|
const disableShrink = typeof value === "number" && this._flexShrink === 1;
|
|
11113
|
+
const dimension = kind === "width" ? Dimension2.Width : Dimension2.Height;
|
|
11108
11114
|
sceneSetDimension(this._ctx.nativeScene, this, dimension, value, disableShrink);
|
|
11109
11115
|
this[key] = value;
|
|
11110
11116
|
if (disableShrink)
|
|
@@ -11168,6 +11174,9 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11168
11174
|
yogaGetEnum(kind, fallback) {
|
|
11169
11175
|
return this.isFreed() ? fallback : sceneGetEnum(this._ctx.nativeScene, this, kind);
|
|
11170
11176
|
}
|
|
11177
|
+
yogaGetFloat(kind) {
|
|
11178
|
+
return this.isFreed() ? NaN : sceneGetFloat(this._ctx.nativeScene, this, kind);
|
|
11179
|
+
}
|
|
11171
11180
|
yogaSetFloat(kind, value) {
|
|
11172
11181
|
if (this.isFreed())
|
|
11173
11182
|
return;
|
|
@@ -11250,19 +11259,50 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11250
11259
|
getWidth() {
|
|
11251
11260
|
return this.yogaGetValue(YogaValueKind.Width, NATIVE_EDGE_NONE2);
|
|
11252
11261
|
}
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11262
|
+
getFlexWrap() {
|
|
11263
|
+
return this.yogaGetEnum(YogaEnumKind.FlexWrap, Wrap2.NoWrap);
|
|
11264
|
+
}
|
|
11265
|
+
getAlignItems() {
|
|
11266
|
+
return this.yogaGetEnum(YogaEnumKind.AlignItems, Align2.Stretch);
|
|
11267
|
+
}
|
|
11268
|
+
getJustifyContent() {
|
|
11269
|
+
return this.yogaGetEnum(YogaEnumKind.JustifyContent, Justify2.FlexStart);
|
|
11270
|
+
}
|
|
11271
|
+
getAlignSelf() {
|
|
11272
|
+
return this.yogaGetEnum(YogaEnumKind.AlignSelf, Align2.Auto);
|
|
11273
|
+
}
|
|
11274
|
+
getPositionType() {
|
|
11275
|
+
return this.yogaGetEnum(YogaEnumKind.PositionType, PositionType2.Relative);
|
|
11276
|
+
}
|
|
11277
|
+
getFlexGrow() {
|
|
11278
|
+
return this.yogaGetFloat(YogaFloatKind.FlexGrow);
|
|
11279
|
+
}
|
|
11280
|
+
getFlexShrink() {
|
|
11281
|
+
return this.yogaGetFloat(YogaFloatKind.FlexShrink);
|
|
11282
|
+
}
|
|
11283
|
+
getFlexBasis() {
|
|
11284
|
+
return this.yogaGetValue(YogaValueKind.FlexBasis, NATIVE_EDGE_NONE2);
|
|
11285
|
+
}
|
|
11286
|
+
getHeight() {
|
|
11287
|
+
return this.yogaGetValue(YogaValueKind.Height, NATIVE_EDGE_NONE2);
|
|
11288
|
+
}
|
|
11289
|
+
getMinWidth() {
|
|
11290
|
+
return this.yogaGetValue(YogaValueKind.MinWidth, NATIVE_EDGE_NONE2);
|
|
11291
|
+
}
|
|
11292
|
+
getMinHeight() {
|
|
11293
|
+
return this.yogaGetValue(YogaValueKind.MinHeight, NATIVE_EDGE_NONE2);
|
|
11294
|
+
}
|
|
11295
|
+
getMaxWidth() {
|
|
11296
|
+
return this.yogaGetValue(YogaValueKind.MaxWidth, NATIVE_EDGE_NONE2);
|
|
11297
|
+
}
|
|
11298
|
+
getMaxHeight() {
|
|
11299
|
+
return this.yogaGetValue(YogaValueKind.MaxHeight, NATIVE_EDGE_NONE2);
|
|
11300
|
+
}
|
|
11301
|
+
getPadding(edge) {
|
|
11302
|
+
return this.yogaGetValue(YogaValueKind.Padding, edge);
|
|
11303
|
+
}
|
|
11304
|
+
getGap(gutter) {
|
|
11305
|
+
return this.yogaGetValue(YogaValueKind.Gap, gutter);
|
|
11266
11306
|
}
|
|
11267
11307
|
getComputedLayout() {
|
|
11268
11308
|
const scene = this._ctx.nativeScene;
|
|
@@ -11396,6 +11436,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11396
11436
|
}
|
|
11397
11437
|
}
|
|
11398
11438
|
set position(positionType) {
|
|
11439
|
+
positionType ??= "relative";
|
|
11399
11440
|
if (!isPositionTypeType(positionType) || this._positionType === positionType)
|
|
11400
11441
|
return;
|
|
11401
11442
|
this.runMutation(() => {
|
|
@@ -11408,6 +11449,7 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11408
11449
|
return this._overflow;
|
|
11409
11450
|
}
|
|
11410
11451
|
set overflow(overflow) {
|
|
11452
|
+
overflow ??= "visible";
|
|
11411
11453
|
if (!isOverflowType(overflow) || this._overflow === overflow)
|
|
11412
11454
|
return;
|
|
11413
11455
|
this.runMutation(() => {
|
|
@@ -11424,13 +11466,20 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11424
11466
|
});
|
|
11425
11467
|
}
|
|
11426
11468
|
updateYogaPosition(position) {
|
|
11427
|
-
const
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11469
|
+
const units = new Uint32Array(positionKeys.length);
|
|
11470
|
+
const values = new Float32Array(positionKeys.length);
|
|
11471
|
+
let mask = 0;
|
|
11472
|
+
for (let edge = 0;edge < positionKeys.length; edge++) {
|
|
11473
|
+
const key = positionKeys[edge];
|
|
11474
|
+
const input = position[key] ?? undefined;
|
|
11475
|
+
if (!(key in position) || input !== undefined && !isPositionType(input))
|
|
11476
|
+
continue;
|
|
11477
|
+
const value = parseYogaValue(input);
|
|
11478
|
+
mask |= 1 << edge;
|
|
11479
|
+
units[edge] = value.unit;
|
|
11480
|
+
values[edge] = value.value;
|
|
11481
|
+
}
|
|
11482
|
+
this._ctx.nativeScene.setPositions(this, mask, units, values);
|
|
11434
11483
|
}
|
|
11435
11484
|
set flexGrow(grow) {
|
|
11436
11485
|
if (grow == null) {
|
|
@@ -11469,121 +11518,70 @@ class Renderable2 extends BaseRenderable2 {
|
|
|
11469
11518
|
this.requestRender();
|
|
11470
11519
|
}
|
|
11471
11520
|
set flexBasis(basis) {
|
|
11472
|
-
|
|
11473
|
-
this.setFlexBasis(basis);
|
|
11474
|
-
this.requestRender();
|
|
11475
|
-
}
|
|
11521
|
+
this.setStyleValue(YogaValueKind.FlexBasis, NATIVE_EDGE_NONE2, basis, isFlexBasisType);
|
|
11476
11522
|
}
|
|
11477
11523
|
set minWidth(minWidth) {
|
|
11478
|
-
|
|
11479
|
-
this.setMinWidth(minWidth);
|
|
11480
|
-
this.requestRender();
|
|
11481
|
-
}
|
|
11524
|
+
this.setStyleValue(YogaValueKind.MinWidth, NATIVE_EDGE_NONE2, minWidth, isSizeType);
|
|
11482
11525
|
}
|
|
11483
11526
|
set maxWidth(maxWidth) {
|
|
11484
|
-
|
|
11485
|
-
this.setMaxWidth(maxWidth);
|
|
11486
|
-
this.requestRender();
|
|
11487
|
-
}
|
|
11527
|
+
this.setStyleValue(YogaValueKind.MaxWidth, NATIVE_EDGE_NONE2, maxWidth, isSizeType);
|
|
11488
11528
|
}
|
|
11489
11529
|
set minHeight(minHeight) {
|
|
11490
|
-
|
|
11491
|
-
this.setMinHeight(minHeight);
|
|
11492
|
-
this.requestRender();
|
|
11493
|
-
}
|
|
11530
|
+
this.setStyleValue(YogaValueKind.MinHeight, NATIVE_EDGE_NONE2, minHeight, isSizeType);
|
|
11494
11531
|
}
|
|
11495
11532
|
set maxHeight(maxHeight) {
|
|
11496
|
-
|
|
11497
|
-
this.setMaxHeight(maxHeight);
|
|
11498
|
-
this.requestRender();
|
|
11499
|
-
}
|
|
11533
|
+
this.setStyleValue(YogaValueKind.MaxHeight, NATIVE_EDGE_NONE2, maxHeight, isSizeType);
|
|
11500
11534
|
}
|
|
11501
11535
|
set margin(margin) {
|
|
11502
|
-
|
|
11503
|
-
this.setMargin(Edge2.All, margin);
|
|
11504
|
-
this.requestRender();
|
|
11505
|
-
}
|
|
11536
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.All, margin, isMarginType);
|
|
11506
11537
|
}
|
|
11507
11538
|
set marginX(marginX) {
|
|
11508
|
-
|
|
11509
|
-
this.setMargin(Edge2.Horizontal, marginX);
|
|
11510
|
-
this.requestRender();
|
|
11511
|
-
}
|
|
11539
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Horizontal, marginX, isMarginType);
|
|
11512
11540
|
}
|
|
11513
11541
|
set marginY(marginY) {
|
|
11514
|
-
|
|
11515
|
-
this.setMargin(Edge2.Vertical, marginY);
|
|
11516
|
-
this.requestRender();
|
|
11517
|
-
}
|
|
11542
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Vertical, marginY, isMarginType);
|
|
11518
11543
|
}
|
|
11519
11544
|
set marginTop(margin) {
|
|
11520
|
-
|
|
11521
|
-
this.setMargin(Edge2.Top, margin);
|
|
11522
|
-
this.requestRender();
|
|
11523
|
-
}
|
|
11545
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Top, margin, isMarginType);
|
|
11524
11546
|
}
|
|
11525
11547
|
get marginTop() {
|
|
11526
11548
|
return this.getMargin(Edge2.Top).value;
|
|
11527
11549
|
}
|
|
11528
11550
|
set marginRight(margin) {
|
|
11529
|
-
|
|
11530
|
-
this.setMargin(Edge2.Right, margin);
|
|
11531
|
-
this.requestRender();
|
|
11532
|
-
}
|
|
11551
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Right, margin, isMarginType);
|
|
11533
11552
|
}
|
|
11534
11553
|
set marginBottom(margin) {
|
|
11535
|
-
|
|
11536
|
-
this.setMargin(Edge2.Bottom, margin);
|
|
11537
|
-
this.requestRender();
|
|
11538
|
-
}
|
|
11554
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Bottom, margin, isMarginType);
|
|
11539
11555
|
}
|
|
11540
11556
|
set marginLeft(margin) {
|
|
11541
|
-
|
|
11542
|
-
this.setMargin(Edge2.Left, margin);
|
|
11543
|
-
this.requestRender();
|
|
11544
|
-
}
|
|
11557
|
+
this.setStyleValue(YogaValueKind.Margin, Edge2.Left, margin, isMarginType);
|
|
11545
11558
|
}
|
|
11546
11559
|
set padding(padding) {
|
|
11547
|
-
|
|
11548
|
-
this.setPadding(Edge2.All, padding);
|
|
11549
|
-
this.requestRender();
|
|
11550
|
-
}
|
|
11560
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.All, padding, isPaddingType);
|
|
11551
11561
|
}
|
|
11552
11562
|
set paddingX(paddingX) {
|
|
11553
|
-
|
|
11554
|
-
this.setPadding(Edge2.Horizontal, paddingX);
|
|
11555
|
-
this.requestRender();
|
|
11556
|
-
}
|
|
11563
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Horizontal, paddingX, isPaddingType);
|
|
11557
11564
|
}
|
|
11558
11565
|
set paddingY(paddingY) {
|
|
11559
|
-
|
|
11560
|
-
this.setPadding(Edge2.Vertical, paddingY);
|
|
11561
|
-
this.requestRender();
|
|
11562
|
-
}
|
|
11566
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Vertical, paddingY, isPaddingType);
|
|
11563
11567
|
}
|
|
11564
11568
|
set paddingTop(padding) {
|
|
11565
|
-
|
|
11566
|
-
this.setPadding(Edge2.Top, padding);
|
|
11567
|
-
this.requestRender();
|
|
11568
|
-
}
|
|
11569
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Top, padding, isPaddingType);
|
|
11569
11570
|
}
|
|
11570
11571
|
set paddingRight(padding) {
|
|
11571
|
-
|
|
11572
|
-
this.setPadding(Edge2.Right, padding);
|
|
11573
|
-
this.requestRender();
|
|
11574
|
-
}
|
|
11572
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Right, padding, isPaddingType);
|
|
11575
11573
|
}
|
|
11576
11574
|
set paddingBottom(padding) {
|
|
11577
|
-
|
|
11578
|
-
this.setPadding(Edge2.Bottom, padding);
|
|
11579
|
-
this.requestRender();
|
|
11580
|
-
}
|
|
11575
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Bottom, padding, isPaddingType);
|
|
11581
11576
|
}
|
|
11582
11577
|
set paddingLeft(padding) {
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11578
|
+
this.setStyleValue(YogaValueKind.Padding, Edge2.Left, padding, isPaddingType);
|
|
11579
|
+
}
|
|
11580
|
+
setStyleValue(kind, edge, value, isValid) {
|
|
11581
|
+
if (value != null && !isValid(value))
|
|
11582
|
+
return;
|
|
11583
|
+
this.yogaSetValue(kind, edge, value ?? undefined);
|
|
11584
|
+
this.requestRender();
|
|
11587
11585
|
}
|
|
11588
11586
|
setMeasureProvider(provider) {
|
|
11589
11587
|
if (this.isFreed())
|
|
@@ -12767,7 +12765,7 @@ class TextBuffer2 {
|
|
|
12767
12765
|
static create(widthMethod, source) {
|
|
12768
12766
|
const owner = source?.resourceContext;
|
|
12769
12767
|
if (!owner)
|
|
12770
|
-
throw new Error("TextBuffer requires an explicit resource owner");
|
|
12768
|
+
throw new Error("TextBuffer requires an explicit resource owner: pass renderer.nativeScene, or a ResourceContext when there is no renderer");
|
|
12771
12769
|
owner.assertAlive();
|
|
12772
12770
|
const lib = owner.renderLib;
|
|
12773
12771
|
const handle = lib.createContextTextBuffer(owner.context, { widthMethod });
|
|
@@ -13223,7 +13221,7 @@ class EditBuffer2 extends EventEmitter5 {
|
|
|
13223
13221
|
static create(widthMethod, source) {
|
|
13224
13222
|
const owner = source?.resourceContext;
|
|
13225
13223
|
if (!owner)
|
|
13226
|
-
throw new Error("EditBuffer requires an explicit resource owner");
|
|
13224
|
+
throw new Error("EditBuffer requires an explicit resource owner: pass renderer.nativeScene, or a ResourceContext when there is no renderer");
|
|
13227
13225
|
owner.assertAlive();
|
|
13228
13226
|
const lib = owner.renderLib;
|
|
13229
13227
|
const handle = lib.createContextEditBuffer(owner.context, { widthMethod });
|
|
@@ -14509,22 +14507,19 @@ class BoxRenderable2 extends Renderable2 {
|
|
|
14509
14507
|
}
|
|
14510
14508
|
}
|
|
14511
14509
|
set gap(gap) {
|
|
14512
|
-
|
|
14513
|
-
this.setGap(Gutter2.All, gap);
|
|
14514
|
-
this.requestRender();
|
|
14515
|
-
}
|
|
14510
|
+
this.setGapStyle(Gutter2.All, gap);
|
|
14516
14511
|
}
|
|
14517
14512
|
set rowGap(rowGap) {
|
|
14518
|
-
|
|
14519
|
-
this.setGap(Gutter2.Row, rowGap);
|
|
14520
|
-
this.requestRender();
|
|
14521
|
-
}
|
|
14513
|
+
this.setGapStyle(Gutter2.Row, rowGap);
|
|
14522
14514
|
}
|
|
14523
14515
|
set columnGap(columnGap) {
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14516
|
+
this.setGapStyle(Gutter2.Column, columnGap);
|
|
14517
|
+
}
|
|
14518
|
+
setGapStyle(gutter, gap) {
|
|
14519
|
+
if (gap != null && !isGapType(gap))
|
|
14520
|
+
return;
|
|
14521
|
+
this.setGap(gutter, gap ?? undefined);
|
|
14522
|
+
this.requestRender();
|
|
14528
14523
|
}
|
|
14529
14524
|
}
|
|
14530
14525
|
|
|
@@ -24887,5 +24882,5 @@ Captured external output:
|
|
|
24887
24882
|
|
|
24888
24883
|
export { isValidBorderStyle2, parseBorderStyle2, BorderChars2, getBorderFromSides2, getBorderSides2, borderCharsToArray2, BorderCharArrays2, KeyEvent2, PasteEvent2, KeyHandler2, InternalKeyHandler2, fonts2, measureText2, getCharacterPositions2, coordinateToCharacterIndex2, renderFontToFrameBuffer2, convertThemeToStyles2, SyntaxStyle2, hastToStyledText2, SystemClock2, nonAlphanumericKeys2, terminalNamedSingleStrokeKeys2, parseKeypress2, LinearScrollAccel2, MacOSScrollAccel2, parseAlign2, parseAlignItems2, parseBoxSizing2, parseDimension2, parseDirection2, parseDisplay2, parseEdge2, parseFlexDirection2, parseGutter2, parseJustify2, parseLogLevel2, parseMeasureMode2, parseOverflow2, parsePositionType2, parseUnit2, parseWrap2, MouseParser2, Selection2, convertGlobalToLocalSelection2, ASCIIFontSelectionHelper2, StdinParser2, addDefaultParsers2, TreeSitterClient2, treeSitterToTextChunks2, treeSitterToStyledText2, DataPathsManager2, getDataPaths2, extensionToFiletype2, basenameToFiletype2, extToFiletype2, pathToFiletype2, infoStringToFiletype2, getTreeSitterClient2, destroyTreeSitterClient2, ExtmarksController2, createExtmarksController2, TerminalPalette2, createTerminalPalette2, normalizeTerminalPalette2, buildTerminalPaletteSignature2, decodePasteBytes2, stripAnsiSequences2, createHostClipboard2, createClipboard2, ClipboardTarget2, createRendererClipboardAdapter2, normalizeMarkdownLinkTarget, detectLinks2, acquireSessionBufferLease2, ResourceContext2, OptimizedBuffer2, h2, isVNode2, maybeMakeRenderable2, wrapWithDelegates2, instantiate2, delegate2, LayoutEvents2, RenderableEvents2, isRenderable2, BaseRenderable2, Renderable2, RootRenderable2, TextBuffer2, TextBufferView2, EditBuffer2, measureEditText2, EditorView2, Timeline2, engine2, getTimelineEngine2, createTimeline2, ANSI, BoxRenderable2, TextBufferRenderable2, CodeRenderable2, ImageLoadError2, ImageError2, imageInfo2, NativeImage2, NativeImagePool2, resolveImageRenderProtocol2, ImageRenderable2, isTextNodeRenderable2, TextNodeRenderable2, RootTextNodeRenderable2, TextRenderable2, NativeSession2, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture2, ConsolePosition2, TerminalConsole2, EditBufferRenderableEvents2, isEditBufferRenderable2, EditBufferRenderable2, buildKittyKeyboardFlags2, MouseEvent2, MouseButton2, createCliRenderer2, CliRenderEvents2, RendererControlState2, CliRenderer2 };
|
|
24889
24884
|
|
|
24890
|
-
//# debugId=
|
|
24891
|
-
//# sourceMappingURL=chunk-node-
|
|
24885
|
+
//# debugId=BDA74430A2417B1764756E2164756E21
|
|
24886
|
+
//# sourceMappingURL=chunk-node-2rg7pskw.js.map
|