@opentui/core 0.1.55 → 0.1.56

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-0razn4m6.js";
8
+ } from "./index-rrt84m8j.js";
9
9
 
10
10
  // ../../node_modules/omggif/omggif.js
11
11
  var require_omggif = __commonJS((exports) => {
@@ -7205,9 +7205,22 @@ function getParsers() {
7205
7205
  }
7206
7206
 
7207
7207
  // src/lib/tree-sitter/client.ts
7208
- import { resolve as resolve2, isAbsolute } from "path";
7208
+ import { resolve as resolve2, isAbsolute, parse } from "path";
7209
7209
  import { existsSync } from "fs";
7210
- import { parse } from "path";
7210
+
7211
+ // src/lib/bunfs.ts
7212
+ import { basename, join } from "path";
7213
+ function isBunfsPath(path) {
7214
+ return path.includes("$bunfs") || /^B:[\\/]~BUN/i.test(path);
7215
+ }
7216
+ function getBunfsRootPath() {
7217
+ return process.platform === "win32" ? "B:\\~BUN\\root" : "/$bunfs/root";
7218
+ }
7219
+ function normalizeBunfsPath(fileName) {
7220
+ return join(getBunfsRootPath(), basename(fileName));
7221
+ }
7222
+
7223
+ // src/lib/tree-sitter/client.ts
7211
7224
  registerEnvVar({
7212
7225
  name: "OTUI_TREE_SITTER_WORKER_PATH",
7213
7226
  description: "Path to the TreeSitter worker",
@@ -7329,8 +7342,8 @@ class TreeSitterClient extends EventEmitter3 {
7329
7342
  if (isUrl(path)) {
7330
7343
  return path;
7331
7344
  }
7332
- if (/\$bunfs/.test(path)) {
7333
- return "/$bunfs/root/" + parse(path).base;
7345
+ if (isBunfsPath(path)) {
7346
+ return normalizeBunfsPath(parse(path).base);
7334
7347
  }
7335
7348
  if (!isAbsolute(path)) {
7336
7349
  return resolve2(path);
@@ -10080,7 +10093,7 @@ var MeasureResultStruct = defineStruct([
10080
10093
  // src/zig.ts
10081
10094
  var module = await import(`@opentui/core-${process.platform}-${process.arch}/index.ts`);
10082
10095
  var targetLibPath = module.default;
10083
- if (/\$bunfs/.test(targetLibPath)) {
10096
+ if (isBunfsPath(targetLibPath)) {
10084
10097
  targetLibPath = targetLibPath.replace("../", "");
10085
10098
  }
10086
10099
  if (!existsSync2(targetLibPath)) {
@@ -15900,5 +15913,5 @@ Captured output:
15900
15913
 
15901
15914
  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, 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, hastToStyledText, LinearScrollAccel, MacOSScrollAccel, StdinBuffer, parseAlign, 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, capture, ConsolePosition, TerminalConsole, getObjectsInViewport, MouseEvent, MouseButton, createCliRenderer, CliRenderEvents, RendererControlState, CliRenderer };
15902
15915
 
15903
- //# debugId=E61ED12D8C1C497964756E2164756E21
15904
- //# sourceMappingURL=index-0razn4m6.js.map
15916
+ //# debugId=01E9CC866B57E71564756E2164756E21
15917
+ //# sourceMappingURL=index-rrt84m8j.js.map