@opentui/core 0.1.20 → 0.1.21
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/Renderable.d.ts +26 -4
- package/{index-23dkhv32.js → index-8sac0sgm.js} +141 -97
- package/{index-23dkhv32.js.map → index-8sac0sgm.js.map} +6 -5
- package/index.js +7 -6
- package/index.js.map +4 -4
- package/lib/objects-in-viewport.d.ts +10 -0
- package/package.json +7 -7
- package/renderables/Text.d.ts +1 -0
package/index.js
CHANGED
|
@@ -66,6 +66,7 @@ import {
|
|
|
66
66
|
getBorderSides,
|
|
67
67
|
getCharacterPositions,
|
|
68
68
|
getKeyHandler,
|
|
69
|
+
getObjectsInViewport,
|
|
69
70
|
green,
|
|
70
71
|
h,
|
|
71
72
|
hastToStyledText,
|
|
@@ -119,7 +120,7 @@ import {
|
|
|
119
120
|
white,
|
|
120
121
|
wrapWithDelegates,
|
|
121
122
|
yellow
|
|
122
|
-
} from "./index-
|
|
123
|
+
} from "./index-8sac0sgm.js";
|
|
123
124
|
// src/post/filters.ts
|
|
124
125
|
function applyScanlines(buffer, strength = 0.8, step = 2) {
|
|
125
126
|
const width = buffer.width;
|
|
@@ -1893,12 +1894,12 @@ class TextRenderable extends Renderable {
|
|
|
1893
1894
|
getSelection() {
|
|
1894
1895
|
return this.textBuffer.getSelection();
|
|
1895
1896
|
}
|
|
1897
|
+
onUpdate(deltaTime) {
|
|
1898
|
+
this.updateTextFromNodes();
|
|
1899
|
+
}
|
|
1896
1900
|
render(buffer, deltaTime) {
|
|
1897
1901
|
if (!this.visible)
|
|
1898
1902
|
return;
|
|
1899
|
-
this.onUpdate(deltaTime);
|
|
1900
|
-
this.updateFromLayout();
|
|
1901
|
-
this.updateTextFromNodes();
|
|
1902
1903
|
this.markClean();
|
|
1903
1904
|
this._ctx.addToHitGrid(this.x, this.y, this.width, this.height, this.num);
|
|
1904
1905
|
this.renderSelf(buffer);
|
|
@@ -3418,7 +3419,7 @@ class ContentRenderable extends BoxRenderable {
|
|
|
3418
3419
|
this.viewport = viewport;
|
|
3419
3420
|
}
|
|
3420
3421
|
_getChildren() {
|
|
3421
|
-
return this.
|
|
3422
|
+
return getObjectsInViewport(this.viewport, this.getChildrenSortedByPrimaryAxis(), this.primaryAxis);
|
|
3422
3423
|
}
|
|
3423
3424
|
}
|
|
3424
3425
|
|
|
@@ -3988,5 +3989,5 @@ export {
|
|
|
3988
3989
|
ASCIIFont
|
|
3989
3990
|
};
|
|
3990
3991
|
|
|
3991
|
-
//# debugId=
|
|
3992
|
+
//# debugId=8F19C97D909538BC64756E2164756E21
|
|
3992
3993
|
//# sourceMappingURL=index.js.map
|