@opentui/core 0.1.65 → 0.1.67

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 CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  __export,
6
6
  __require,
7
7
  __toESM
8
- } from "./index-h33hh1n5.js";
8
+ } from "./index-zj0wwh9d.js";
9
9
 
10
10
  // ../../node_modules/.bun/omggif@1.0.10/node_modules/omggif/omggif.js
11
11
  var require_omggif = __commonJS((exports) => {
@@ -10169,6 +10169,17 @@ var MeasureResultStruct = defineStruct([
10169
10169
  ["lineCount", "u32"],
10170
10170
  ["maxWidth", "u32"]
10171
10171
  ]);
10172
+ var CursorStateStruct = defineStruct([
10173
+ ["x", "u32"],
10174
+ ["y", "u32"],
10175
+ ["visible", "bool_u8"],
10176
+ ["style", "u8"],
10177
+ ["blinking", "bool_u8"],
10178
+ ["r", "f32"],
10179
+ ["g", "f32"],
10180
+ ["b", "f32"],
10181
+ ["a", "f32"]
10182
+ ]);
10172
10183
 
10173
10184
  // src/zig.ts
10174
10185
  var module = await import(`@opentui/core-${process.platform}-${process.arch}/index.ts`);
@@ -10373,6 +10384,10 @@ function getOpenTUILib(libPath) {
10373
10384
  args: ["ptr", "ptr"],
10374
10385
  returns: "void"
10375
10386
  },
10387
+ getCursorState: {
10388
+ args: ["ptr", "ptr"],
10389
+ returns: "void"
10390
+ },
10376
10391
  setDebugOverlay: {
10377
10392
  args: ["ptr", "bool", "u8"],
10378
10393
  returns: "void"
@@ -11468,6 +11483,24 @@ class FFIRenderLib {
11468
11483
  setCursorColor(renderer, color) {
11469
11484
  this.opentui.symbols.setCursorColor(renderer, color.buffer);
11470
11485
  }
11486
+ getCursorState(renderer) {
11487
+ const cursorBuffer = new ArrayBuffer(CursorStateStruct.size);
11488
+ this.opentui.symbols.getCursorState(renderer, ptr3(cursorBuffer));
11489
+ const struct = CursorStateStruct.unpack(cursorBuffer);
11490
+ const styleMap = {
11491
+ 0: "block",
11492
+ 1: "line",
11493
+ 2: "underline"
11494
+ };
11495
+ return {
11496
+ x: struct.x,
11497
+ y: struct.y,
11498
+ visible: struct.visible,
11499
+ style: styleMap[struct.style] || "block",
11500
+ blinking: struct.blinking,
11501
+ color: RGBA.fromValues(struct.r, struct.g, struct.b, struct.a)
11502
+ };
11503
+ }
11471
11504
  render(renderer, force) {
11472
11505
  this.opentui.symbols.render(renderer, force);
11473
11506
  }
@@ -15544,7 +15577,7 @@ Captured output:
15544
15577
  this.memorySnapshotInterval = config.memorySnapshotInterval ?? 0;
15545
15578
  this.gatherStats = config.gatherStats || false;
15546
15579
  this.maxStatSamples = config.maxStatSamples || 300;
15547
- this.enableMouseMovement = config.enableMouseMovement || true;
15580
+ this.enableMouseMovement = config.enableMouseMovement ?? true;
15548
15581
  this._useMouse = config.useMouse ?? true;
15549
15582
  this._useAlternateScreen = config.useAlternateScreen ?? env.OTUI_USE_ALTERNATE_SCREEN;
15550
15583
  this.nextRenderBuffer = this.lib.getNextBuffer(this.rendererPtr);
@@ -16233,6 +16266,9 @@ Captured output:
16233
16266
  setCursorColor(color) {
16234
16267
  this.lib.setCursorColor(this.rendererPtr, color);
16235
16268
  }
16269
+ getCursorState() {
16270
+ return this.lib.getCursorState(this.rendererPtr);
16271
+ }
16236
16272
  addPostProcessFn(processFn) {
16237
16273
  this.postProcessFns.push(processFn);
16238
16274
  }
@@ -16678,5 +16714,5 @@ Captured output:
16678
16714
 
16679
16715
  export { __toESM, __commonJS, __export, __require, Edge, Gutter, MeasureMode, exports_src, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, nonAlphanumericKeys, parseKeypress, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, createTextAttributes, attributesWithLink, getLinkId, 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, link, t, hastToStyledText, LinearScrollAccel, MacOSScrollAccel, StdinBuffer, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extToFiletype, pathToFiletype, main, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, TextBuffer, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, isValidPercentage, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, ANSI, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingKey, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
16680
16716
 
16681
- //# debugId=2A8F4167DDD29BBD64756E2164756E21
16682
- //# sourceMappingURL=index-h33hh1n5.js.map
16717
+ //# debugId=E5F92C3AE627580664756E2164756E21
16718
+ //# sourceMappingURL=index-zj0wwh9d.js.map