@opentui/core 0.0.0-20250926-77b41db5 → 0.0.0-20250930-6541ec7f
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/3d.js +1 -1
- package/{index-tg3c4jgq.js → index-kvwmgj67.js} +37 -23
- package/{index-tg3c4jgq.js.map → index-kvwmgj67.js.map} +4 -4
- package/index.js +1 -1
- package/package.json +7 -7
- package/renderer.d.ts +2 -1
- package/testing.js +1 -1
package/3d.js
CHANGED
|
@@ -6645,13 +6645,13 @@ class Renderable extends BaseRenderable {
|
|
|
6645
6645
|
this.requestRender();
|
|
6646
6646
|
this.keypressHandler = (key) => {
|
|
6647
6647
|
this._keyListeners["down"]?.(key);
|
|
6648
|
-
if (this.handleKeyPress) {
|
|
6648
|
+
if (!key.defaultPrevented && this.handleKeyPress) {
|
|
6649
6649
|
this.handleKeyPress(key);
|
|
6650
6650
|
}
|
|
6651
6651
|
};
|
|
6652
6652
|
this.pasteHandler = (event) => {
|
|
6653
6653
|
this._pasteListener?.call(this, event.text);
|
|
6654
|
-
if (this.handlePaste) {
|
|
6654
|
+
if (!event.defaultPrevented && this.handlePaste) {
|
|
6655
6655
|
this.handlePaste(event.text);
|
|
6656
6656
|
}
|
|
6657
6657
|
};
|
|
@@ -7318,6 +7318,16 @@ class Renderable extends BaseRenderable {
|
|
|
7318
7318
|
if (zIndexIndex !== -1) {
|
|
7319
7319
|
this._childrenInZIndexOrder.splice(zIndexIndex, 1);
|
|
7320
7320
|
}
|
|
7321
|
+
if (this._forceLayoutUpdateFor) {
|
|
7322
|
+
const forceIndex = this._forceLayoutUpdateFor.findIndex((obj2) => obj2.id === id);
|
|
7323
|
+
if (forceIndex !== -1) {
|
|
7324
|
+
this._forceLayoutUpdateFor?.splice(forceIndex, 1);
|
|
7325
|
+
}
|
|
7326
|
+
}
|
|
7327
|
+
const newChildIndex = this._newChildren.findIndex((obj2) => obj2.id === id);
|
|
7328
|
+
if (newChildIndex !== -1) {
|
|
7329
|
+
this._newChildren?.splice(newChildIndex, 1);
|
|
7330
|
+
}
|
|
7321
7331
|
this.childrenPrimarySortDirty = true;
|
|
7322
7332
|
}
|
|
7323
7333
|
}
|
|
@@ -7426,7 +7436,8 @@ class Renderable extends BaseRenderable {
|
|
|
7426
7436
|
} catch (e) {}
|
|
7427
7437
|
}
|
|
7428
7438
|
destroyRecursively() {
|
|
7429
|
-
|
|
7439
|
+
const children = [...this._childrenInLayoutOrder];
|
|
7440
|
+
for (const child of children) {
|
|
7430
7441
|
child.destroyRecursively();
|
|
7431
7442
|
}
|
|
7432
7443
|
this.destroy();
|
|
@@ -8624,7 +8635,7 @@ class CliRenderer extends EventEmitter5 {
|
|
|
8624
8635
|
stdin;
|
|
8625
8636
|
stdout;
|
|
8626
8637
|
exitOnCtrlC;
|
|
8627
|
-
|
|
8638
|
+
_isDestroyed = false;
|
|
8628
8639
|
nextRenderBuffer;
|
|
8629
8640
|
currentRenderBuffer;
|
|
8630
8641
|
_isRunning = false;
|
|
@@ -8830,6 +8841,9 @@ Captured output:
|
|
|
8830
8841
|
}
|
|
8831
8842
|
this.setupInput();
|
|
8832
8843
|
}
|
|
8844
|
+
get isDestroyed() {
|
|
8845
|
+
return this._isDestroyed;
|
|
8846
|
+
}
|
|
8833
8847
|
registerLifecyclePass(renderable) {
|
|
8834
8848
|
this.lifecyclePasses.add(renderable);
|
|
8835
8849
|
}
|
|
@@ -9193,7 +9207,7 @@ Captured output:
|
|
|
9193
9207
|
return false;
|
|
9194
9208
|
}
|
|
9195
9209
|
takeMemorySnapshot() {
|
|
9196
|
-
if (this.
|
|
9210
|
+
if (this._isDestroyed)
|
|
9197
9211
|
return;
|
|
9198
9212
|
const memoryUsage = process.memoryUsage();
|
|
9199
9213
|
this.lastMemorySnapshot = {
|
|
@@ -9226,7 +9240,7 @@ Captured output:
|
|
|
9226
9240
|
}
|
|
9227
9241
|
}
|
|
9228
9242
|
handleResize(width, height) {
|
|
9229
|
-
if (this.
|
|
9243
|
+
if (this._isDestroyed)
|
|
9230
9244
|
return;
|
|
9231
9245
|
if (this._splitHeight > 0) {
|
|
9232
9246
|
this.processResize(width, height);
|
|
@@ -9385,7 +9399,7 @@ Captured output:
|
|
|
9385
9399
|
this.controlState = this._isRunning ? "auto_started" /* AUTO_STARTED */ : "idle" /* IDLE */;
|
|
9386
9400
|
}
|
|
9387
9401
|
internalStart() {
|
|
9388
|
-
if (!this._isRunning && !this.
|
|
9402
|
+
if (!this._isRunning && !this._isDestroyed) {
|
|
9389
9403
|
this._isRunning = true;
|
|
9390
9404
|
if (this.memorySnapshotInterval > 0) {
|
|
9391
9405
|
this.startMemorySnapshotTimer();
|
|
@@ -9405,7 +9419,7 @@ Captured output:
|
|
|
9405
9419
|
this.internalStop();
|
|
9406
9420
|
}
|
|
9407
9421
|
internalStop() {
|
|
9408
|
-
if (this.isRunning && !this.
|
|
9422
|
+
if (this.isRunning && !this._isDestroyed) {
|
|
9409
9423
|
this._isRunning = false;
|
|
9410
9424
|
if (this.memorySnapshotTimer) {
|
|
9411
9425
|
clearInterval(this.memorySnapshotTimer);
|
|
@@ -9426,9 +9440,9 @@ Captured output:
|
|
|
9426
9440
|
if (this.memorySnapshotTimer) {
|
|
9427
9441
|
clearInterval(this.memorySnapshotTimer);
|
|
9428
9442
|
}
|
|
9429
|
-
if (this.
|
|
9443
|
+
if (this._isDestroyed)
|
|
9430
9444
|
return;
|
|
9431
|
-
this.
|
|
9445
|
+
this._isDestroyed = true;
|
|
9432
9446
|
if (this.renderTimeout) {
|
|
9433
9447
|
clearTimeout(this.renderTimeout);
|
|
9434
9448
|
this.renderTimeout = null;
|
|
@@ -9461,7 +9475,7 @@ Captured output:
|
|
|
9461
9475
|
this.loop();
|
|
9462
9476
|
}
|
|
9463
9477
|
async loop() {
|
|
9464
|
-
if (this.rendering || this.
|
|
9478
|
+
if (this.rendering || this._isDestroyed)
|
|
9465
9479
|
return;
|
|
9466
9480
|
this.rendering = true;
|
|
9467
9481
|
if (this.renderTimeout) {
|
|
@@ -9505,17 +9519,17 @@ Captured output:
|
|
|
9505
9519
|
postProcessFn(this.nextRenderBuffer, deltaTime);
|
|
9506
9520
|
}
|
|
9507
9521
|
this._console.renderToBuffer(this.nextRenderBuffer);
|
|
9508
|
-
if (!this.
|
|
9522
|
+
if (!this._isDestroyed) {
|
|
9509
9523
|
this.renderNative();
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9524
|
+
const overallFrameTime = performance.now() - overallStart;
|
|
9525
|
+
this.lib.updateStats(this.rendererPtr, overallFrameTime, this.renderStats.fps, this.renderStats.frameCallbackTime);
|
|
9526
|
+
if (this.gatherStats) {
|
|
9527
|
+
this.collectStatSample(overallFrameTime);
|
|
9528
|
+
}
|
|
9529
|
+
if (this._isRunning) {
|
|
9530
|
+
const delay = Math.max(1, this.targetFrameTime - Math.floor(overallFrameTime));
|
|
9531
|
+
this.renderTimeout = setTimeout(() => this.loop(), delay);
|
|
9532
|
+
}
|
|
9519
9533
|
}
|
|
9520
9534
|
this.rendering = false;
|
|
9521
9535
|
if (this.immediateRerenderRequested) {
|
|
@@ -9676,5 +9690,5 @@ Captured output:
|
|
|
9676
9690
|
|
|
9677
9691
|
export { __toESM, __commonJS, __export, __require, Edge, Gutter, exports_src, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, nonAlphanumericKeys, parseKeypress, ANSI, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, DebugOverlayCorner, createTextAttributes, visualizeRenderableTree, isStyledText, StyledText, stringToStyledText, black, red, green, yellow, blue, magenta, cyan, white, brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bold, italic, underline, strikethrough, dim, reverse, blink, fg, bg, t, SyntaxStyle, hastToStyledText, parseAlign, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, generateEnvMarkdown, generateEnvColored, env, TextBuffer, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, isValidPercentage, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, CliRenderer };
|
|
9678
9692
|
|
|
9679
|
-
//# debugId=
|
|
9680
|
-
//# sourceMappingURL=index-
|
|
9693
|
+
//# debugId=B65C4E4D90FC9D3564756E2164756E21
|
|
9694
|
+
//# sourceMappingURL=index-kvwmgj67.js.map
|