@fairyhunter13/opentui-core 0.1.103 → 0.1.104

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
@@ -6,7 +6,7 @@ import {
6
6
  __export,
7
7
  __require,
8
8
  __toESM
9
- } from "./index-3zw722ea.js";
9
+ } from "./index-8z2zcznw.js";
10
10
 
11
11
  // ../../node_modules/.bun/omggif@1.0.10/node_modules/omggif/omggif.js
12
12
  var require_omggif = __commonJS((exports) => {
@@ -40,24 +40,37 @@
40
40
  "]" @conceal)
41
41
  (#set! conceal " "))
42
42
 
43
- ; Conceal image links
43
+ ; Style image link brackets and parens
44
44
  (image
45
- [
46
- "!"
47
- "["
48
- "]"
49
- "("
50
- (link_destination)
51
- ")"
52
- ] @markup.link
45
+ ["[" "(" ")"] @markup.link)
46
+
47
+ (image
48
+ "]" @markup.link)
49
+
50
+ ; Conceal image ! prefix
51
+ ((image
52
+ "!" @conceal)
53
+ (#set! conceal ""))
54
+
55
+ ; Conceal image opening bracket
56
+ ((image
57
+ "[" @conceal)
53
58
  (#set! conceal ""))
54
59
 
55
- ; Conceal full reference links
60
+ ; Conceal image closing bracket with space replacement (matches inline link behavior)
61
+ ((image
62
+ "]" @conceal)
63
+ (#set! conceal " "))
64
+
65
+ ; Style image link destination
66
+ (image
67
+ (link_destination) @markup.link.url)
68
+
69
+ ; Conceal full reference links - only conceal brackets, keep link_label visible
56
70
  (full_reference_link
57
71
  [
58
72
  "["
59
73
  "]"
60
- (link_label)
61
74
  ] @markup.link
62
75
  (#set! conceal ""))
63
76
 
@@ -92,7 +105,7 @@
92
105
  ; Replace common HTML entities.
93
106
  ((entity_reference) @character.special
94
107
  (#eq? @character.special " ")
95
- (#set! conceal ""))
108
+ (#set! conceal " "))
96
109
 
97
110
  ((entity_reference) @character.special
98
111
  (#eq? @character.special "<")
package/buffer.d.ts CHANGED
@@ -74,6 +74,8 @@ export declare class OptimizedBuffer {
74
74
  shouldFill?: boolean;
75
75
  title?: string;
76
76
  titleAlignment?: "left" | "center" | "right";
77
+ bottomTitle?: string;
78
+ bottomTitleAlignment?: "left" | "center" | "right";
77
79
  }): void;
78
80
  pushScissorRect(x: number, y: number, width: number, height: number): void;
79
81
  popScissorRect(): void;
@@ -8812,13 +8812,6 @@ class TreeSitterClient extends EventEmitter2 {
8812
8812
  const { logType, data } = event.data;
8813
8813
  const message = data.join(" ");
8814
8814
  this.emit("worker:log", logType, message);
8815
- if (logType === "log") {
8816
- console.log("TSWorker:", ...data);
8817
- } else if (logType === "error") {
8818
- console.error("TSWorker:", ...data);
8819
- } else if (logType === "warn") {
8820
- console.warn("TSWorker:", ...data);
8821
- }
8822
8815
  return;
8823
8816
  }
8824
8817
  }
@@ -9446,7 +9439,7 @@ class DownloadUtils {
9446
9439
 
9447
9440
  // src/lib/tree-sitter/assets/update.ts
9448
9441
  import { readdir } from "fs/promises";
9449
- var __dirname = "/home/hafiz/git/github.com/fairyhunter13/opentui/packages/core/src/lib/tree-sitter/assets";
9442
+ var __dirname = "/home/hafiz/git/github.com/fairyhunter13/opencode/vendor/opentui/packages/core/src/lib/tree-sitter/assets";
9450
9443
  function getDefaultOptions() {
9451
9444
  return {
9452
9445
  configPath: path4.resolve(__dirname, "../parsers-config"),
@@ -10700,7 +10693,7 @@ import { EventEmitter as EventEmitter4 } from "events";
10700
10693
 
10701
10694
  // src/buffer.ts
10702
10695
  import { toArrayBuffer, ptr } from "bun:ffi";
10703
- function packDrawOptions(border2, shouldFill, titleAlignment) {
10696
+ function packDrawOptions(border2, shouldFill, titleAlignment, bottomTitleAlignment) {
10704
10697
  let packed = 0;
10705
10698
  if (border2 === true) {
10706
10699
  packed |= 15;
@@ -10723,7 +10716,9 @@ function packDrawOptions(border2, shouldFill, titleAlignment) {
10723
10716
  right: 2
10724
10717
  };
10725
10718
  const alignment = alignmentMap[titleAlignment];
10719
+ const bottomAlignment = alignmentMap[bottomTitleAlignment];
10726
10720
  packed |= alignment << 5;
10721
+ packed |= bottomAlignment << 7;
10727
10722
  return packed;
10728
10723
  }
10729
10724
 
@@ -10955,8 +10950,8 @@ class OptimizedBuffer {
10955
10950
  this.guard();
10956
10951
  const style = parseBorderStyle(options.borderStyle, "single");
10957
10952
  const borderChars = options.customBorderChars ?? BorderCharArrays[style];
10958
- const packedOptions = packDrawOptions(options.border, options.shouldFill ?? false, options.titleAlignment || "left");
10959
- this.lib.bufferDrawBox(this.bufferPtr, options.x, options.y, options.width, options.height, borderChars, packedOptions, options.borderColor, options.backgroundColor, options.title ?? null);
10953
+ const packedOptions = packDrawOptions(options.border, options.shouldFill ?? false, options.titleAlignment || "left", options.bottomTitleAlignment || "left");
10954
+ this.lib.bufferDrawBox(this.bufferPtr, options.x, options.y, options.width, options.height, borderChars, packedOptions, options.borderColor, options.backgroundColor, options.title ?? null, options.bottomTitle ?? null);
10960
10955
  }
10961
10956
  pushScissorRect(x, y, width, height) {
10962
10957
  this.guard();
@@ -12084,7 +12079,7 @@ function getOpenTUILib(libPath) {
12084
12079
  returns: "void"
12085
12080
  },
12086
12081
  bufferDrawBox: {
12087
- args: ["ptr", "i32", "i32", "u32", "u32", "ptr", "u32", "ptr", "ptr", "ptr", "u32"],
12082
+ args: ["ptr", "i32", "i32", "u32", "u32", "ptr", "u32", "ptr", "ptr", "ptr", "u32", "ptr", "u32"],
12088
12083
  returns: "void"
12089
12084
  },
12090
12085
  bufferPushScissorRect: {
@@ -13252,11 +13247,14 @@ class FFIRenderLib {
13252
13247
  });
13253
13248
  this.opentui.symbols.bufferDrawGrid(buffer, borderChars, borderFg.buffer, borderBg.buffer, columnOffsets, columnCount, rowOffsets, rowCount, ptr4(optionsBuffer));
13254
13249
  }
13255
- bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, title) {
13250
+ bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, title, bottomTitle) {
13256
13251
  const titleBytes = title ? this.encoder.encode(title) : null;
13257
13252
  const titleLen = title ? titleBytes.length : 0;
13258
13253
  const titlePtr = title ? titleBytes : null;
13259
- this.opentui.symbols.bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor.buffer, backgroundColor.buffer, titlePtr, titleLen);
13254
+ const bottomTitleBytes = bottomTitle ? this.encoder.encode(bottomTitle) : null;
13255
+ const bottomTitleLen = bottomTitle ? bottomTitleBytes.length : 0;
13256
+ const bottomTitlePtr = bottomTitle ? bottomTitleBytes : null;
13257
+ this.opentui.symbols.bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor.buffer, backgroundColor.buffer, titlePtr, titleLen, bottomTitlePtr, bottomTitleLen);
13260
13258
  }
13261
13259
  bufferResize(buffer, width, height) {
13262
13260
  this.opentui.symbols.bufferResize(buffer, width, height);
@@ -19093,8 +19091,7 @@ Captured output:
19093
19091
  "SIGHUP",
19094
19092
  "SIGBREAK",
19095
19093
  "SIGPIPE",
19096
- "SIGBUS",
19097
- "SIGFPE"
19094
+ "SIGBUS"
19098
19095
  ];
19099
19096
  this.clipboard = new Clipboard(this.lib, this.rendererPtr);
19100
19097
  this.resizeDebounceDelay = config.debounceDelay || 100;
@@ -20604,5 +20601,5 @@ Captured output:
20604
20601
 
20605
20602
  export { __toESM, __commonJS, __export, __require, Edge, Gutter, MeasureMode, exports_src, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, RGBA, hexToRgb, rgbToHex, hsvToRgb, parseColor, fonts, measureText, getCharacterPositions, coordinateToCharacterIndex, renderFontToFrameBuffer, TextAttributes, ATTRIBUTE_BASE_BITS, ATTRIBUTE_BASE_MASK, getBaseAttributes, DebugOverlayCorner, TargetChannel, 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, SystemClock, nonAlphanumericKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, 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, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, main, getTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, decodePasteBytes, stripAnsiSequences, detectLinks, TextBuffer, SpanInfoStruct, LogLevel2 as LogLevel, setRenderLibPath, resolveRenderLib, OptimizedBuffer, h, isVNode, maybeMakeRenderable, wrapWithDelegates, instantiate, delegate, isValidPercentage, LayoutEvents, RenderableEvents, isRenderable, BaseRenderable, Renderable, RootRenderable, EditBuffer, EditorView, ANSI, defaultKeyAliases, mergeKeyAliases, mergeKeyBindings, getKeyBindingKey, buildKeyBindingsMap, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, EditBufferRenderableEvents, isEditBufferRenderable, EditBufferRenderable, buildKittyKeyboardFlags, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
20606
20603
 
20607
- //# debugId=3CFEF67BF8CCE60C64756E2164756E21
20608
- //# sourceMappingURL=index-3zw722ea.js.map
20604
+ //# debugId=8662AB2ADD41165D64756E2164756E21
20605
+ //# sourceMappingURL=index-8z2zcznw.js.map