@opentui/core 0.5.13 → 0.5.15

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.
@@ -41,7 +41,7 @@ import {
41
41
  NativeMeasureTargetKind2,
42
42
  resolveRenderLib2,
43
43
  yoga_default
44
- } from "./chunk-node-80p7e6t6.js";
44
+ } from "./chunk-node-tfvyz31s.js";
45
45
 
46
46
  // src/syntax-style.ts
47
47
  function convertThemeToStyles2(theme) {
@@ -7253,6 +7253,7 @@ class CliRenderer2 extends EventEmitter5 {
7253
7253
  hasLoggedStdinParserError = false;
7254
7254
  animationRequest = new Map;
7255
7255
  resizeTimeoutId = null;
7256
+ pendingResizeSawDifferentSize = false;
7256
7257
  capabilityTimeoutId = null;
7257
7258
  kittyTransportTimer = null;
7258
7259
  kittyTransportMode;
@@ -7699,14 +7700,14 @@ Captured external output:
7699
7700
  this.capturedRenderable = renderable;
7700
7701
  }
7701
7702
  addToHitGrid(x, y, width, height, id) {
7702
- if (!this._useMouse)
7703
+ if (!this._useMouse || width <= 0 || height <= 0)
7703
7704
  return;
7704
7705
  if (id !== this.capturedRenderable?.num) {
7705
7706
  this.lib.addToHitGrid(this.rendererPtr, x, y, width, height, id);
7706
7707
  }
7707
7708
  }
7708
7709
  pushHitGridScissorRect(x, y, width, height) {
7709
- this.lib.hitGridPushScissorRect(this.rendererPtr, x, y, width, height);
7710
+ this.lib.hitGridPushScissorRect(this.rendererPtr, x, y, Math.max(0, width), Math.max(0, height));
7710
7711
  }
7711
7712
  popHitGridScissorRect() {
7712
7713
  this.lib.hitGridPopScissorRect(this.rendererPtr);
@@ -9504,19 +9505,26 @@ Captured external output:
9504
9505
  handleResize(width, height) {
9505
9506
  if (this._isDestroyed)
9506
9507
  return;
9507
- if (this._splitHeight > 0) {
9508
- this.processResize(width, height);
9509
- return;
9510
- }
9508
+ if (width !== this._terminalWidth || height !== this._terminalHeight)
9509
+ this.pendingResizeSawDifferentSize = true;
9511
9510
  if (this.resizeTimeoutId !== null) {
9512
9511
  this.clock.clearTimeout(this.resizeTimeoutId);
9513
9512
  this.resizeTimeoutId = null;
9514
9513
  }
9514
+ if (this._splitHeight > 0) {
9515
+ this.applyPendingResize(width, height);
9516
+ return;
9517
+ }
9515
9518
  this.resizeTimeoutId = this.clock.setTimeout(() => {
9516
9519
  this.resizeTimeoutId = null;
9517
- this.processResize(width, height);
9520
+ this.applyPendingResize(width, height);
9518
9521
  }, this.resizeDebounceDelay);
9519
9522
  }
9523
+ applyPendingResize(width, height) {
9524
+ const sawDifferentSize = this.pendingResizeSawDifferentSize;
9525
+ this.pendingResizeSawDifferentSize = false;
9526
+ this.processResize(width, height, sawDifferentSize);
9527
+ }
9520
9528
  queryPixelResolution() {
9521
9529
  this.pixelResolutionRequeryPending = true;
9522
9530
  if (this._controlState === "explicit_suspended" /* EXPLICIT_SUSPENDED */ || this.waitingForPixelResolution)
@@ -9526,9 +9534,14 @@ Captured external output:
9526
9534
  this.updateStdinParserProtocolContext({ pixelResolutionQueryActive: true });
9527
9535
  this.lib.queryPixelResolution(this.rendererPtr);
9528
9536
  }
9529
- processResize(width, height) {
9530
- if (width === this._terminalWidth && height === this._terminalHeight)
9537
+ processResize(width, height, repaintIfUnchanged = false) {
9538
+ if (width === this._terminalWidth && height === this._terminalHeight) {
9539
+ if (repaintIfUnchanged) {
9540
+ this.forceFullRepaintRequested = true;
9541
+ this.requestRender();
9542
+ }
9531
9543
  return;
9544
+ }
9532
9545
  if (this._terminalIsSetup && this._controlState !== "explicit_suspended" /* EXPLICIT_SUSPENDED */ && !this.isSplitCursorSeedFrameBlocked()) {
9533
9546
  this.flushPendingSplitOutputBeforeTransition();
9534
9547
  }
@@ -10513,5 +10526,5 @@ Captured external output:
10513
10526
 
10514
10527
  export { convertThemeToStyles2, SyntaxStyle2, h2, isVNode2, maybeMakeRenderable2, wrapWithDelegates2, instantiate2, delegate2, LayoutEvents2, RenderableEvents2, isRenderable2, BaseRenderable2, Renderable2, RootRenderable2, TextBufferView2, EditBuffer2, EditorView2, ANSI, BoxRenderable2, TextBufferRenderable2, CodeRenderable2, isTextNodeRenderable2, TextNodeRenderable2, RootTextNodeRenderable2, TextRenderable2, NativeSpanFeed2, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingAction, buildKeyBindingsMap, capture2, ConsolePosition2, TerminalConsole2, getObjectsInViewport, EditBufferRenderableEvents2, isEditBufferRenderable2, EditBufferRenderable2, buildKittyKeyboardFlags2, MouseEvent2, MouseButton2, createCliRenderer2, CliRenderEvents2, RendererControlState2, CliRenderer2 };
10515
10528
 
10516
- //# debugId=1E9C4A614B22FBD464756E2164756E21
10517
- //# sourceMappingURL=chunk-node-fz19wge8.js.map
10529
+ //# debugId=25E7741C866268EA64756E2164756E21
10530
+ //# sourceMappingURL=chunk-node-f3yste6w.js.map