@fairyhunter13/opentui-core 0.1.121 → 0.1.122

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.
@@ -167,7 +167,7 @@ import {
167
167
  white,
168
168
  wrapWithDelegates,
169
169
  yellow
170
- } from "./index-7xsz0ndw.js";
170
+ } from "./index-c4vtensm.js";
171
171
 
172
172
  // src/index.ts
173
173
  var exports_src2 = {};
@@ -3668,10 +3668,18 @@ class BoxRenderable extends Renderable {
3668
3668
  }
3669
3669
  }
3670
3670
  renderSelf(buffer) {
3671
- const currentBorderColor = this._focused ? this._focusedBorderColor : this._borderColor;
3671
+ const hasBorder = this.borderSides.top || this.borderSides.right || this.borderSides.bottom || this.borderSides.left;
3672
+ const hasVisibleFill = this.shouldFill && this._backgroundColor.a > 0;
3673
+ if (!hasBorder && !hasVisibleFill) {
3674
+ return;
3675
+ }
3676
+ const hasFocusWithin = this._focusable && (this._focused || this._hasFocusedDescendant);
3677
+ const currentBorderColor = hasFocusWithin ? this._focusedBorderColor : this._borderColor;
3678
+ const screenX = this._screenX;
3679
+ const screenY = this._screenY;
3672
3680
  buffer.drawBox({
3673
- x: this.x,
3674
- y: this.y,
3681
+ x: screenX,
3682
+ y: screenY,
3675
3683
  width: this.width,
3676
3684
  height: this.height,
3677
3685
  borderStyle: this._borderStyle,
@@ -4083,16 +4091,18 @@ class TextBufferRenderable extends Renderable {
4083
4091
  render(buffer, deltaTime) {
4084
4092
  if (!this.visible)
4085
4093
  return;
4094
+ const screenX = this._screenX;
4095
+ const screenY = this._screenY;
4086
4096
  this.markClean();
4087
- this._ctx.addToHitGrid(this.x, this.y, this.width, this.height, this.num);
4097
+ this._ctx.addToHitGrid(screenX, screenY, this.width, this.height, this.num);
4088
4098
  this.renderSelf(buffer);
4089
4099
  if (this.buffered && this.frameBuffer) {
4090
- buffer.drawFrameBuffer(this.x, this.y, this.frameBuffer);
4100
+ buffer.drawFrameBuffer(screenX, screenY, this.frameBuffer);
4091
4101
  }
4092
4102
  }
4093
4103
  renderSelf(buffer) {
4094
4104
  if (this.textBuffer.ptr) {
4095
- buffer.drawTextBuffer(this.textBufferView, this.x, this.y);
4105
+ buffer.drawTextBuffer(this.textBufferView, this._screenX, this._screenY);
4096
4106
  }
4097
4107
  }
4098
4108
  destroy() {
@@ -10834,11 +10844,19 @@ class ContentRenderable extends BoxRenderable {
10834
10844
  set viewportCulling(value) {
10835
10845
  this._viewportCulling = value;
10836
10846
  }
10847
+ _hasVisibleChildFilter() {
10848
+ return this._viewportCulling;
10849
+ }
10837
10850
  _getVisibleChildren() {
10838
10851
  if (this._viewportCulling) {
10839
- return getObjectsInViewport(this.viewport, this.getChildrenSortedByPrimaryAxis(), this.primaryAxis, 0).map((child) => child.num);
10852
+ return getObjectsInViewport({
10853
+ x: this.viewport.screenX,
10854
+ y: this.viewport.screenY,
10855
+ width: this.viewport.width,
10856
+ height: this.viewport.height
10857
+ }, this.getChildrenSortedByPrimaryAxis(), this.primaryAxis, 0).map((child) => child.num);
10840
10858
  }
10841
- return this.getChildrenSortedByPrimaryAxis().map((child) => child.num);
10859
+ return super._getVisibleChildren();
10842
10860
  }
10843
10861
  }
10844
10862
  var SCROLLBOX_PADDING_KEYS = [
@@ -12271,5 +12289,5 @@ class TimeToFirstDrawRenderable extends Renderable {
12271
12289
  }
12272
12290
  export { TextBufferView, convertThemeToStyles, SyntaxStyle, DistortionEffect, VignetteEffect, CloudsEffect, FlamesEffect, CRTRollingBarEffect, RainbowTextEffect, applyScanlines, applyInvert, applyNoise, applyChromaticAberration, applyAsciiArt, applyBrightness, applyGain, applySaturation, BloomEffect, SEPIA_MATRIX, PROTANOPIA_SIM_MATRIX, DEUTERANOPIA_SIM_MATRIX, TRITANOPIA_SIM_MATRIX, ACHROMATOPSIA_MATRIX, PROTANOPIA_COMP_MATRIX, DEUTERANOPIA_COMP_MATRIX, TRITANOPIA_COMP_MATRIX, TECHNICOLOR_MATRIX, SOLARIZATION_MATRIX, SYNTHWAVE_MATRIX, GREENSCALE_MATRIX, GRAYSCALE_MATRIX, INVERT_MATRIX, Timeline, engine, createTimeline, SlotRegistry, createSlotRegistry, createCoreSlotRegistry, registerCorePlugin, resolveCoreSlot, SlotRenderable, NativeSpanFeed, FrameBufferRenderable, ASCIIFontRenderable, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, TextRenderable, DiffRenderable, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
12273
12291
 
12274
- //# debugId=16294237721C954264756E2164756E21
12275
- //# sourceMappingURL=index-tza7yced.js.map
12292
+ //# debugId=1D1B6F62C2F2A1BF64756E2164756E21
12293
+ //# sourceMappingURL=index-csrjta4j.js.map