@opentui/core 0.0.0-20250912-12c969f4 → 0.0.0-20250915-7be4d9eb

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/index.js CHANGED
@@ -121,7 +121,7 @@ import {
121
121
  white,
122
122
  wrapWithDelegates,
123
123
  yellow
124
- } from "./index-mh94hn7d.js";
124
+ } from "./index-dgjbzqw3.js";
125
125
  // src/post/filters.ts
126
126
  function applyScanlines(buffer, strength = 0.8, step = 2) {
127
127
  const width = buffer.width;
@@ -1626,18 +1626,37 @@ class TextNodeRenderable extends BaseRenderable {
1626
1626
  getRenderable(id) {
1627
1627
  return this._children.find((child) => typeof child !== "string" && child.id === id);
1628
1628
  }
1629
+ get fg() {
1630
+ return this._fg;
1631
+ }
1629
1632
  set fg(fg2) {
1633
+ if (!fg2) {
1634
+ this._fg = undefined;
1635
+ this.requestRender();
1636
+ return;
1637
+ }
1630
1638
  this._fg = parseColor(fg2);
1631
1639
  this.requestRender();
1632
1640
  }
1633
1641
  set bg(bg2) {
1642
+ if (!bg2) {
1643
+ this._bg = undefined;
1644
+ this.requestRender();
1645
+ return;
1646
+ }
1634
1647
  this._bg = parseColor(bg2);
1635
1648
  this.requestRender();
1636
1649
  }
1650
+ get bg() {
1651
+ return this._bg;
1652
+ }
1637
1653
  set attributes(attributes) {
1638
1654
  this._attributes = attributes;
1639
1655
  this.requestRender();
1640
1656
  }
1657
+ get attributes() {
1658
+ return this._attributes;
1659
+ }
1641
1660
  }
1642
1661
 
1643
1662
  class RootTextNodeRenderable extends TextNodeRenderable {
@@ -3190,7 +3209,7 @@ class SliderRenderable extends Renderable {
3190
3209
  const virtualThumbEnd = virtualThumbStart + virtualThumbSize;
3191
3210
  buffer.fillRect(this.x, this.y, this.width, this.height, this._backgroundColor);
3192
3211
  const realStartCell = Math.floor(virtualThumbStart / 2);
3193
- const realEndCell = Math.floor((virtualThumbEnd - 1) / 2);
3212
+ const realEndCell = Math.ceil(virtualThumbEnd / 2) - 1;
3194
3213
  const startX = Math.max(0, realStartCell);
3195
3214
  const endX = Math.min(this.width - 1, realEndCell);
3196
3215
  for (let realX = startX;realX <= endX; realX++) {
@@ -3221,7 +3240,7 @@ class SliderRenderable extends Renderable {
3221
3240
  const virtualThumbEnd = virtualThumbStart + virtualThumbSize;
3222
3241
  buffer.fillRect(this.x, this.y, this.width, this.height, this._backgroundColor);
3223
3242
  const realStartCell = Math.floor(virtualThumbStart / 2);
3224
- const realEndCell = Math.floor((virtualThumbEnd - 1) / 2);
3243
+ const realEndCell = Math.ceil(virtualThumbEnd / 2) - 1;
3225
3244
  const startY = Math.max(0, realStartCell);
3226
3245
  const endY = Math.min(this.height - 1, realEndCell);
3227
3246
  for (let realY = startY;realY <= endY; realY++) {
@@ -3728,9 +3747,7 @@ class ScrollBoxRenderable extends BoxRenderable {
3728
3747
  }) {
3729
3748
  super(ctx, {
3730
3749
  flexShrink: 1,
3731
- flexGrow: 1,
3732
3750
  flexDirection: "row",
3733
- flexWrap: "wrap",
3734
3751
  alignItems: "stretch",
3735
3752
  ...options,
3736
3753
  ...rootOptions
@@ -3742,9 +3759,6 @@ class ScrollBoxRenderable extends BoxRenderable {
3742
3759
  flexDirection: "column",
3743
3760
  flexGrow: 1,
3744
3761
  flexShrink: 1,
3745
- flexBasis: "auto",
3746
- maxHeight: "100%",
3747
- maxWidth: "100%",
3748
3762
  ...wrapperOptions,
3749
3763
  id: `scroll-box-wrapper-${this.internalId}`
3750
3764
  });
@@ -3753,10 +3767,7 @@ class ScrollBoxRenderable extends BoxRenderable {
3753
3767
  flexDirection: "column",
3754
3768
  flexGrow: 1,
3755
3769
  flexShrink: 1,
3756
- flexBasis: "auto",
3757
- maxHeight: "100%",
3758
- maxWidth: "100%",
3759
- overflow: "scroll",
3770
+ overflow: "hidden",
3760
3771
  onSizeChange: () => {
3761
3772
  this.recalculateBarProps();
3762
3773
  },
@@ -4280,5 +4291,5 @@ export {
4280
4291
  ASCIIFont
4281
4292
  };
4282
4293
 
4283
- //# debugId=4D8A7644AF667D7864756E2164756E21
4294
+ //# debugId=C24A2E933E87A1F264756E2164756E21
4284
4295
  //# sourceMappingURL=index.js.map