@opentui/core 0.4.1 → 0.4.2

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
@@ -43,13 +43,15 @@ import {
43
43
  mergeKeyAliases,
44
44
  mergeKeyBindings,
45
45
  wrapWithDelegates
46
- } from "./index-07zpr2dg.js";
46
+ } from "./index-6xr3rbbe.js";
47
47
  import {
48
48
  ASCIIFontSelectionHelper,
49
49
  ATTRIBUTE_BASE_BITS,
50
50
  ATTRIBUTE_BASE_MASK,
51
51
  BorderCharArrays,
52
52
  BorderChars,
53
+ Clipboard,
54
+ ClipboardTarget,
53
55
  DEFAULT_BACKGROUND_RGB,
54
56
  DEFAULT_FOREGROUND_RGB,
55
57
  DataPathsManager,
@@ -182,7 +184,7 @@ import {
182
184
  visualizeRenderableTree,
183
185
  white,
184
186
  yellow
185
- } from "./index-pcvh9d34.js";
187
+ } from "./index-x7n320jr.js";
186
188
  // src/post/effects.ts
187
189
  function toU8(value) {
188
190
  return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
@@ -10750,6 +10752,7 @@ class SelectRenderable extends Renderable {
10750
10752
  this._keyBindings = options.keyBindings || [];
10751
10753
  const mergedBindings = mergeKeyBindings(defaultSelectKeybindings, this._keyBindings);
10752
10754
  this._keyBindingsMap = buildKeyBindingsMap(mergedBindings, this._keyAliasMap);
10755
+ this.updateScrollOffset();
10753
10756
  this.requestRender();
10754
10757
  }
10755
10758
  renderSelf(buffer, deltaTime) {
@@ -10814,7 +10817,8 @@ class SelectRenderable extends Renderable {
10814
10817
  renderScrollIndicatorToFrameBuffer(contentX, contentY, contentWidth, contentHeight) {
10815
10818
  if (!this.frameBuffer)
10816
10819
  return;
10817
- const scrollPercent = this._selectedIndex / Math.max(1, this._options.length - 1);
10820
+ const maxScrollOffset = this._options.length - this.maxVisibleItems;
10821
+ const scrollPercent = this.scrollOffset / maxScrollOffset;
10818
10822
  const indicatorHeight = Math.max(1, contentHeight - 2);
10819
10823
  const indicatorY = contentY + 1 + Math.floor(scrollPercent * indicatorHeight);
10820
10824
  const indicatorX = contentX + contentWidth - 1;
@@ -11657,6 +11661,8 @@ export {
11657
11661
  CodeRenderable,
11658
11662
  Code,
11659
11663
  CloudsEffect,
11664
+ ClipboardTarget,
11665
+ Clipboard,
11660
11666
  CliRenderer,
11661
11667
  CliRenderEvents,
11662
11668
  CRTRollingBarEffect,
@@ -11676,5 +11682,5 @@ export {
11676
11682
  ACHROMATOPSIA_MATRIX
11677
11683
  };
11678
11684
 
11679
- //# debugId=0C019ED1790BA7F464756E2164756E21
11685
+ //# debugId=C226AD7FDBC68DA164756E2164756E21
11680
11686
  //# sourceMappingURL=index.js.map