@opentui/core 0.5.10 → 0.5.11

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.
Files changed (40) hide show
  1. package/README.md +2 -0
  2. package/audio.d.ts +6 -1
  3. package/{chunk-bun-9gqvxy8c.js → chunk-bun-37s3zwb6.js} +1181 -1036
  4. package/{chunk-bun-9gqvxy8c.js.map → chunk-bun-37s3zwb6.js.map} +7 -7
  5. package/{chunk-bun-bb3k0yt8.js → chunk-bun-bwjmgnxw.js} +647 -582
  6. package/chunk-bun-bwjmgnxw.js.map +32 -0
  7. package/{chunk-node-6bg8r2m7.js → chunk-node-54dhb2fr.js} +647 -582
  8. package/chunk-node-54dhb2fr.js.map +32 -0
  9. package/{chunk-node-f647ts9q.js → chunk-node-70eg2nhg.js} +1188 -1040
  10. package/{chunk-node-f647ts9q.js.map → chunk-node-70eg2nhg.js.map} +7 -7
  11. package/index.bun.js +1571 -1377
  12. package/index.bun.js.map +7 -7
  13. package/index.node.js +1571 -1377
  14. package/index.node.js.map +7 -7
  15. package/lib/detect-links.d.ts +5 -0
  16. package/lib/tree-sitter/update-assets.js +4 -4
  17. package/lib/tree-sitter/update-assets.js.map +2 -2
  18. package/lib/tree-sitter-styled-text.d.ts +4 -0
  19. package/package.json +13 -9
  20. package/parser.worker.js +7 -10
  21. package/parser.worker.js.map +2 -2
  22. package/renderables/Code.d.ts +6 -0
  23. package/renderables/Diff.d.ts +1 -2
  24. package/renderables/Markdown.d.ts +6 -0
  25. package/renderables/TextBufferRenderable.d.ts +2 -0
  26. package/renderer.d.ts +2 -0
  27. package/testing.bun.js +23 -23
  28. package/testing.bun.js.map +2 -2
  29. package/testing.js +23 -23
  30. package/testing.js.map +2 -2
  31. package/text-buffer-view.d.ts +1 -0
  32. package/types.d.ts +1 -0
  33. package/yoga.bun.js +187 -187
  34. package/yoga.bun.js.map +1 -1
  35. package/yoga.js +187 -187
  36. package/yoga.js.map +1 -1
  37. package/zig-structs.d.ts +8 -1
  38. package/zig.d.ts +4 -0
  39. package/chunk-bun-bb3k0yt8.js.map +0 -32
  40. package/chunk-node-6bg8r2m7.js.map +0 -32
@@ -17,13 +17,15 @@ var __toESM = (mod, isNodeMode, target) => {
17
17
  return cached;
18
18
  }
19
19
  target = mod != null ? __create(__getProtoOf(mod)) : {};
20
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
- for (let key of __getOwnPropNames(mod))
22
- if (!__hasOwnProp.call(to, key))
23
- __defProp(to, key, {
24
- get: __accessProp.bind(mod, key),
25
- enumerable: true
26
- });
20
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ if (mod && typeof mod === "object" || typeof mod === "function") {
22
+ for (let key of __getOwnPropNames(mod))
23
+ if (!__hasOwnProp.call(to, key))
24
+ __defProp(to, key, {
25
+ get: __accessProp.bind(mod, key),
26
+ enumerable: true
27
+ });
28
+ }
27
29
  if (canCache)
28
30
  cache.set(mod, to);
29
31
  return to;
@@ -44,7 +46,7 @@ var __export = (target, all) => {
44
46
  };
45
47
 
46
48
  // ../../node_modules/.bun/emoji-regex@10.6.0/node_modules/emoji-regex/index.js
47
- var require_emoji_regex = __commonJS((exports, module) => {
49
+ var require_emoji_regex = __commonJS(function(exports, module) {
48
50
  module.exports = () => {
49
51
  return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
50
52
  };
@@ -53,99 +55,99 @@ var require_emoji_regex = __commonJS((exports, module) => {
53
55
  // src/yoga.ts
54
56
  var exports_yoga = {};
55
57
  __export(exports_yoga, {
56
- default: () => yoga_default,
57
- Wrap: () => Wrap,
58
- WRAP_WRAP_REVERSE: () => WRAP_WRAP_REVERSE,
59
- WRAP_WRAP: () => WRAP_WRAP,
60
- WRAP_NO_WRAP: () => WRAP_NO_WRAP,
61
- Unit: () => Unit,
62
- UNIT_UNDEFINED: () => UNIT_UNDEFINED,
63
- UNIT_POINT: () => UNIT_POINT,
64
- UNIT_PERCENT: () => UNIT_PERCENT,
65
- UNIT_AUTO: () => UNIT_AUTO,
66
- PositionType: () => PositionType,
67
- POSITION_TYPE_STATIC: () => POSITION_TYPE_STATIC,
68
- POSITION_TYPE_RELATIVE: () => POSITION_TYPE_RELATIVE,
69
- POSITION_TYPE_ABSOLUTE: () => POSITION_TYPE_ABSOLUTE,
70
- Overflow: () => Overflow,
71
- OVERFLOW_VISIBLE: () => OVERFLOW_VISIBLE,
72
- OVERFLOW_SCROLL: () => OVERFLOW_SCROLL,
73
- OVERFLOW_HIDDEN: () => OVERFLOW_HIDDEN,
74
- NodeType: () => NodeType,
75
- Node: () => Node,
76
- NODE_TYPE_TEXT: () => NODE_TYPE_TEXT,
77
- NODE_TYPE_DEFAULT: () => NODE_TYPE_DEFAULT,
78
- MeasureMode: () => MeasureMode,
79
- MEASURE_MODE_UNDEFINED: () => MEASURE_MODE_UNDEFINED,
80
- MEASURE_MODE_EXACTLY: () => MEASURE_MODE_EXACTLY,
81
- MEASURE_MODE_AT_MOST: () => MEASURE_MODE_AT_MOST,
82
- LogLevel: () => LogLevel,
83
- LOG_LEVEL_WARN: () => LOG_LEVEL_WARN,
84
- LOG_LEVEL_VERBOSE: () => LOG_LEVEL_VERBOSE,
85
- LOG_LEVEL_INFO: () => LOG_LEVEL_INFO,
86
- LOG_LEVEL_FATAL: () => LOG_LEVEL_FATAL,
87
- LOG_LEVEL_ERROR: () => LOG_LEVEL_ERROR,
88
- LOG_LEVEL_DEBUG: () => LOG_LEVEL_DEBUG,
89
- Justify: () => Justify,
90
- JUSTIFY_SPACE_EVENLY: () => JUSTIFY_SPACE_EVENLY,
91
- JUSTIFY_SPACE_BETWEEN: () => JUSTIFY_SPACE_BETWEEN,
92
- JUSTIFY_SPACE_AROUND: () => JUSTIFY_SPACE_AROUND,
93
- JUSTIFY_FLEX_START: () => JUSTIFY_FLEX_START,
94
- JUSTIFY_FLEX_END: () => JUSTIFY_FLEX_END,
95
- JUSTIFY_CENTER: () => JUSTIFY_CENTER,
96
- Gutter: () => Gutter,
97
- GUTTER_ROW: () => GUTTER_ROW,
98
- GUTTER_COLUMN: () => GUTTER_COLUMN,
99
- GUTTER_ALL: () => GUTTER_ALL,
100
- FlexDirection: () => FlexDirection,
101
- FLEX_DIRECTION_ROW_REVERSE: () => FLEX_DIRECTION_ROW_REVERSE,
102
- FLEX_DIRECTION_ROW: () => FLEX_DIRECTION_ROW,
103
- FLEX_DIRECTION_COLUMN_REVERSE: () => FLEX_DIRECTION_COLUMN_REVERSE,
104
- FLEX_DIRECTION_COLUMN: () => FLEX_DIRECTION_COLUMN,
105
- ExperimentalFeature: () => ExperimentalFeature,
106
- Errata: () => Errata,
107
- Edge: () => Edge,
108
- EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: () => EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS,
109
- ERRATA_STRETCH_FLEX_BASIS: () => ERRATA_STRETCH_FLEX_BASIS,
110
- ERRATA_NONE: () => ERRATA_NONE,
111
- ERRATA_CLASSIC: () => ERRATA_CLASSIC,
112
- ERRATA_ALL: () => ERRATA_ALL,
113
- ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: () => ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING,
114
- ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: () => ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE,
115
- EDGE_VERTICAL: () => EDGE_VERTICAL,
116
- EDGE_TOP: () => EDGE_TOP,
117
- EDGE_START: () => EDGE_START,
118
- EDGE_RIGHT: () => EDGE_RIGHT,
119
- EDGE_LEFT: () => EDGE_LEFT,
120
- EDGE_HORIZONTAL: () => EDGE_HORIZONTAL,
121
- EDGE_END: () => EDGE_END,
122
- EDGE_BOTTOM: () => EDGE_BOTTOM,
123
- EDGE_ALL: () => EDGE_ALL,
124
- Display: () => Display,
125
- Direction: () => Direction,
126
- Dimension: () => Dimension,
127
- DISPLAY_NONE: () => DISPLAY_NONE,
128
- DISPLAY_FLEX: () => DISPLAY_FLEX,
129
- DISPLAY_CONTENTS: () => DISPLAY_CONTENTS,
130
- DIRECTION_RTL: () => DIRECTION_RTL,
131
- DIRECTION_LTR: () => DIRECTION_LTR,
132
- DIRECTION_INHERIT: () => DIRECTION_INHERIT,
133
- DIMENSION_WIDTH: () => DIMENSION_WIDTH,
134
- DIMENSION_HEIGHT: () => DIMENSION_HEIGHT,
135
- Config: () => Config,
136
- BoxSizing: () => BoxSizing,
137
- BOX_SIZING_CONTENT_BOX: () => BOX_SIZING_CONTENT_BOX,
138
- BOX_SIZING_BORDER_BOX: () => BOX_SIZING_BORDER_BOX,
139
- Align: () => Align,
140
- ALIGN_STRETCH: () => ALIGN_STRETCH,
141
- ALIGN_SPACE_EVENLY: () => ALIGN_SPACE_EVENLY,
142
- ALIGN_SPACE_BETWEEN: () => ALIGN_SPACE_BETWEEN,
143
- ALIGN_SPACE_AROUND: () => ALIGN_SPACE_AROUND,
144
- ALIGN_FLEX_START: () => ALIGN_FLEX_START,
145
- ALIGN_FLEX_END: () => ALIGN_FLEX_END,
146
- ALIGN_CENTER: () => ALIGN_CENTER,
147
- ALIGN_BASELINE: () => ALIGN_BASELINE,
148
- ALIGN_AUTO: () => ALIGN_AUTO
58
+ ALIGN_AUTO: () => ALIGN_AUTO2,
59
+ ALIGN_BASELINE: () => ALIGN_BASELINE2,
60
+ ALIGN_CENTER: () => ALIGN_CENTER2,
61
+ ALIGN_FLEX_END: () => ALIGN_FLEX_END2,
62
+ ALIGN_FLEX_START: () => ALIGN_FLEX_START2,
63
+ ALIGN_SPACE_AROUND: () => ALIGN_SPACE_AROUND2,
64
+ ALIGN_SPACE_BETWEEN: () => ALIGN_SPACE_BETWEEN2,
65
+ ALIGN_SPACE_EVENLY: () => ALIGN_SPACE_EVENLY2,
66
+ ALIGN_STRETCH: () => ALIGN_STRETCH2,
67
+ Align: () => Align2,
68
+ BOX_SIZING_BORDER_BOX: () => BOX_SIZING_BORDER_BOX2,
69
+ BOX_SIZING_CONTENT_BOX: () => BOX_SIZING_CONTENT_BOX2,
70
+ BoxSizing: () => BoxSizing2,
71
+ Config: () => Config2,
72
+ DIMENSION_HEIGHT: () => DIMENSION_HEIGHT2,
73
+ DIMENSION_WIDTH: () => DIMENSION_WIDTH2,
74
+ DIRECTION_INHERIT: () => DIRECTION_INHERIT2,
75
+ DIRECTION_LTR: () => DIRECTION_LTR2,
76
+ DIRECTION_RTL: () => DIRECTION_RTL2,
77
+ DISPLAY_CONTENTS: () => DISPLAY_CONTENTS2,
78
+ DISPLAY_FLEX: () => DISPLAY_FLEX2,
79
+ DISPLAY_NONE: () => DISPLAY_NONE2,
80
+ Dimension: () => Dimension2,
81
+ Direction: () => Direction2,
82
+ Display: () => Display2,
83
+ EDGE_ALL: () => EDGE_ALL2,
84
+ EDGE_BOTTOM: () => EDGE_BOTTOM2,
85
+ EDGE_END: () => EDGE_END2,
86
+ EDGE_HORIZONTAL: () => EDGE_HORIZONTAL2,
87
+ EDGE_LEFT: () => EDGE_LEFT2,
88
+ EDGE_RIGHT: () => EDGE_RIGHT2,
89
+ EDGE_START: () => EDGE_START2,
90
+ EDGE_TOP: () => EDGE_TOP2,
91
+ EDGE_VERTICAL: () => EDGE_VERTICAL2,
92
+ ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: () => ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2,
93
+ ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: () => ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2,
94
+ ERRATA_ALL: () => ERRATA_ALL2,
95
+ ERRATA_CLASSIC: () => ERRATA_CLASSIC2,
96
+ ERRATA_NONE: () => ERRATA_NONE2,
97
+ ERRATA_STRETCH_FLEX_BASIS: () => ERRATA_STRETCH_FLEX_BASIS2,
98
+ EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: () => EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2,
99
+ Edge: () => Edge2,
100
+ Errata: () => Errata2,
101
+ ExperimentalFeature: () => ExperimentalFeature2,
102
+ FLEX_DIRECTION_COLUMN: () => FLEX_DIRECTION_COLUMN2,
103
+ FLEX_DIRECTION_COLUMN_REVERSE: () => FLEX_DIRECTION_COLUMN_REVERSE2,
104
+ FLEX_DIRECTION_ROW: () => FLEX_DIRECTION_ROW2,
105
+ FLEX_DIRECTION_ROW_REVERSE: () => FLEX_DIRECTION_ROW_REVERSE2,
106
+ FlexDirection: () => FlexDirection2,
107
+ GUTTER_ALL: () => GUTTER_ALL2,
108
+ GUTTER_COLUMN: () => GUTTER_COLUMN2,
109
+ GUTTER_ROW: () => GUTTER_ROW2,
110
+ Gutter: () => Gutter2,
111
+ JUSTIFY_CENTER: () => JUSTIFY_CENTER2,
112
+ JUSTIFY_FLEX_END: () => JUSTIFY_FLEX_END2,
113
+ JUSTIFY_FLEX_START: () => JUSTIFY_FLEX_START2,
114
+ JUSTIFY_SPACE_AROUND: () => JUSTIFY_SPACE_AROUND2,
115
+ JUSTIFY_SPACE_BETWEEN: () => JUSTIFY_SPACE_BETWEEN2,
116
+ JUSTIFY_SPACE_EVENLY: () => JUSTIFY_SPACE_EVENLY2,
117
+ Justify: () => Justify2,
118
+ LOG_LEVEL_DEBUG: () => LOG_LEVEL_DEBUG2,
119
+ LOG_LEVEL_ERROR: () => LOG_LEVEL_ERROR2,
120
+ LOG_LEVEL_FATAL: () => LOG_LEVEL_FATAL2,
121
+ LOG_LEVEL_INFO: () => LOG_LEVEL_INFO2,
122
+ LOG_LEVEL_VERBOSE: () => LOG_LEVEL_VERBOSE2,
123
+ LOG_LEVEL_WARN: () => LOG_LEVEL_WARN2,
124
+ LogLevel: () => LogLevel3,
125
+ MEASURE_MODE_AT_MOST: () => MEASURE_MODE_AT_MOST2,
126
+ MEASURE_MODE_EXACTLY: () => MEASURE_MODE_EXACTLY2,
127
+ MEASURE_MODE_UNDEFINED: () => MEASURE_MODE_UNDEFINED2,
128
+ MeasureMode: () => MeasureMode2,
129
+ NODE_TYPE_DEFAULT: () => NODE_TYPE_DEFAULT2,
130
+ NODE_TYPE_TEXT: () => NODE_TYPE_TEXT2,
131
+ Node: () => Node2,
132
+ NodeType: () => NodeType2,
133
+ OVERFLOW_HIDDEN: () => OVERFLOW_HIDDEN2,
134
+ OVERFLOW_SCROLL: () => OVERFLOW_SCROLL2,
135
+ OVERFLOW_VISIBLE: () => OVERFLOW_VISIBLE2,
136
+ Overflow: () => Overflow2,
137
+ POSITION_TYPE_ABSOLUTE: () => POSITION_TYPE_ABSOLUTE2,
138
+ POSITION_TYPE_RELATIVE: () => POSITION_TYPE_RELATIVE2,
139
+ POSITION_TYPE_STATIC: () => POSITION_TYPE_STATIC2,
140
+ PositionType: () => PositionType2,
141
+ UNIT_AUTO: () => UNIT_AUTO2,
142
+ UNIT_PERCENT: () => UNIT_PERCENT2,
143
+ UNIT_POINT: () => UNIT_POINT2,
144
+ UNIT_UNDEFINED: () => UNIT_UNDEFINED2,
145
+ Unit: () => Unit2,
146
+ WRAP_NO_WRAP: () => WRAP_NO_WRAP2,
147
+ WRAP_WRAP: () => WRAP_WRAP2,
148
+ WRAP_WRAP_REVERSE: () => WRAP_WRAP_REVERSE2,
149
+ Wrap: () => Wrap2,
150
+ default: () => yoga_default
149
151
  });
150
152
 
151
153
  // src/platform/ffi.ts
@@ -695,7 +697,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
695
697
  var import_emoji_regex = __toESM(require_emoji_regex(), 1);
696
698
  var segmenter = new Intl.Segmenter;
697
699
  var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
698
- function stringWidth(string, options = {}) {
700
+ function stringWidth2(string, options = {}) {
699
701
  if (typeof string !== "string" || string.length === 0) {
700
702
  return 0;
701
703
  }
@@ -766,16 +768,16 @@ function destroySingleton(key) {
766
768
  }
767
769
 
768
770
  // src/lib/env.ts
769
- var envRegistry = singleton("env-registry", () => ({}));
770
- function registerEnvVar(config) {
771
- const existing = envRegistry[config.name];
771
+ var envRegistry2 = singleton("env-registry", () => ({}));
772
+ function registerEnvVar2(config) {
773
+ const existing = envRegistry2[config.name];
772
774
  if (existing) {
773
775
  if (existing.description !== config.description || existing.type !== config.type || existing.default !== config.default || existing.required !== config.required) {
774
776
  throw new Error(`Environment variable "${config.name}" is already registered with different configuration. ` + `Existing: ${JSON.stringify(existing)}, New: ${JSON.stringify(config)}`);
775
777
  }
776
778
  return;
777
779
  }
778
- envRegistry[config.name] = config;
780
+ envRegistry2[config.name] = config;
779
781
  }
780
782
  function normalizeBoolean(value) {
781
783
  const lowerValue = value.toLowerCase();
@@ -813,11 +815,11 @@ class EnvStore {
813
815
  if (this.parsedValues.has(key)) {
814
816
  return this.parsedValues.get(key);
815
817
  }
816
- if (!(key in envRegistry)) {
818
+ if (!(key in envRegistry2)) {
817
819
  throw new Error(`Environment variable ${key} is not registered.`);
818
820
  }
819
821
  try {
820
- const value = parseEnvValue(envRegistry[key]);
822
+ const value = parseEnvValue(envRegistry2[key]);
821
823
  this.parsedValues.set(key, value);
822
824
  return value;
823
825
  } catch (error) {
@@ -825,18 +827,18 @@ class EnvStore {
825
827
  }
826
828
  }
827
829
  has(key) {
828
- return key in envRegistry;
830
+ return key in envRegistry2;
829
831
  }
830
832
  clearCache() {
831
833
  this.parsedValues.clear();
832
834
  }
833
835
  }
834
836
  var envStore = singleton("env-store", () => new EnvStore);
835
- function clearEnvCache() {
837
+ function clearEnvCache2() {
836
838
  envStore.clearCache();
837
839
  }
838
- function generateEnvMarkdown() {
839
- const configs = Object.values(envRegistry);
840
+ function generateEnvMarkdown2() {
841
+ const configs = Object.values(envRegistry2);
840
842
  if (configs.length === 0) {
841
843
  return `# Environment Variables
842
844
 
@@ -871,8 +873,8 @@ No environment variables registered.
871
873
  }
872
874
  return markdown;
873
875
  }
874
- function generateEnvColored() {
875
- const configs = Object.values(envRegistry);
876
+ function generateEnvColored2() {
877
+ const configs = Object.values(envRegistry2);
876
878
  if (configs.length === 0) {
877
879
  return `\x1B[1;36mEnvironment Variables\x1B[0m
878
880
 
@@ -905,7 +907,7 @@ No environment variables registered.
905
907
  }
906
908
  return output;
907
909
  }
908
- var env = new Proxy({}, {
910
+ var env2 = new Proxy({}, {
909
911
  get(target, prop) {
910
912
  if (typeof prop !== "string") {
911
913
  return;
@@ -916,7 +918,7 @@ var env = new Proxy({}, {
916
918
  return envStore.has(prop);
917
919
  },
918
920
  ownKeys() {
919
- return Object.keys(envRegistry);
921
+ return Object.keys(envRegistry2);
920
922
  },
921
923
  getOwnPropertyDescriptor(target, prop) {
922
924
  if (envStore.has(prop)) {
@@ -931,7 +933,7 @@ var env = new Proxy({}, {
931
933
  });
932
934
 
933
935
  // src/platform/assets.ts
934
- registerEnvVar({
936
+ registerEnvVar2({
935
937
  name: "OTUI_ASSET_ROOT",
936
938
  description: "Absolute directory containing relocatable OpenTUI runtime assets",
937
939
  type: "string",
@@ -978,10 +980,10 @@ function validateAssetKey(key) {
978
980
  var TEXT_ENCODER = new TextEncoder;
979
981
  var bun = globalThis.Bun;
980
982
  var sleep = bun?.sleep ?? standardSleep;
981
- var stringWidth2 = bun?.stringWidth ?? stringWidth;
983
+ var stringWidth = bun?.stringWidth ?? stringWidth2;
982
984
  var stripANSI = bun?.stripANSI ?? stripAnsi;
983
985
  var writeFile = bun?.write ?? writeFilePortable;
984
- async function resolveBundledFilePath(key, loadBundledFile, fallbackPath, metaUrl, options = {}) {
986
+ async function resolveBundledFilePath2(key, loadBundledFile, fallbackPath, metaUrl, options = {}) {
985
987
  if (options.useAssetRoot ?? true) {
986
988
  const configuredPath = resolveAssetRootPath(key);
987
989
  if (configuredPath !== undefined) {
@@ -1040,7 +1042,7 @@ function extractBundledImportSpecifier(loadBundledFile) {
1040
1042
  }
1041
1043
  function standardSleep(msOrDate) {
1042
1044
  const ms = msOrDate instanceof Date ? msOrDate.getTime() - Date.now() : msOrDate;
1043
- return new Promise((resolve2) => setTimeout(resolve2, ms));
1045
+ return new Promise((resolve) => setTimeout(resolve, ms));
1044
1046
  }
1045
1047
  async function writeFilePortable(destination, data, options) {
1046
1048
  const destinationPath = destination instanceof URL ? fileURLToPath3(destination) : destination;
@@ -1057,8 +1059,8 @@ import { existsSync as existsSync3, writeFileSync } from "fs";
1057
1059
  import { EventEmitter as EventEmitter4 } from "events";
1058
1060
 
1059
1061
  // src/lib/RGBA.ts
1060
- var DEFAULT_FOREGROUND_RGB = [255, 255, 255];
1061
- var DEFAULT_BACKGROUND_RGB = [0, 0, 0];
1062
+ var DEFAULT_FOREGROUND_RGB2 = [255, 255, 255];
1063
+ var DEFAULT_BACKGROUND_RGB2 = [0, 0, 0];
1062
1064
  var INTENT_RGB = 0;
1063
1065
  var INTENT_INDEXED = 1;
1064
1066
  var INTENT_DEFAULT = 2;
@@ -1099,17 +1101,17 @@ function packRGBA8(r, g, b, a, meta) {
1099
1101
  ]);
1100
1102
  }
1101
1103
  function rgbaForAnsi256Index(index) {
1102
- const [r, g, b] = ansi256IndexToRgb(index);
1103
- return RGBA.fromInts(r, g, b);
1104
+ const [r, g, b] = ansi256IndexToRgb2(index);
1105
+ return RGBA2.fromInts(r, g, b);
1104
1106
  }
1105
- function normalizeIndexedColorIndex(index) {
1107
+ function normalizeIndexedColorIndex2(index) {
1106
1108
  if (!Number.isInteger(index) || index < 0 || index > 255) {
1107
1109
  throw new RangeError(`Indexed color must be an integer in the range 0..255, got ${index}`);
1108
1110
  }
1109
1111
  return index;
1110
1112
  }
1111
- function ansi256IndexToRgb(index) {
1112
- const normalizedIndex = normalizeIndexedColorIndex(index);
1113
+ function ansi256IndexToRgb2(index) {
1114
+ const normalizedIndex = normalizeIndexedColorIndex2(index);
1113
1115
  if (normalizedIndex < ANSI16_RGB.length) {
1114
1116
  return ANSI16_RGB[normalizedIndex];
1115
1117
  }
@@ -1124,42 +1126,42 @@ function ansi256IndexToRgb(index) {
1124
1126
  return [value, value, value];
1125
1127
  }
1126
1128
 
1127
- class RGBA {
1129
+ class RGBA2 {
1128
1130
  buffer;
1129
1131
  constructor(buffer) {
1130
1132
  this.buffer = new Uint16Array(4);
1131
1133
  this.buffer.set(buffer.subarray(0, 4));
1132
1134
  }
1133
1135
  static fromArray(array) {
1134
- return new RGBA(array);
1136
+ return new RGBA2(array);
1135
1137
  }
1136
1138
  static fromValues(r, g, b, a = 1) {
1137
- return new RGBA(packRGBA8(toU8(r), toU8(g), toU8(b), toU8(a), packMeta(INTENT_RGB)));
1139
+ return new RGBA2(packRGBA8(toU8(r), toU8(g), toU8(b), toU8(a), packMeta(INTENT_RGB)));
1138
1140
  }
1139
1141
  static clone(rgba) {
1140
- return new RGBA(rgba.buffer);
1142
+ return new RGBA2(rgba.buffer);
1141
1143
  }
1142
1144
  static fromInts(r, g, b, a = 255) {
1143
- return new RGBA(packRGBA8(r, g, b, a, packMeta(INTENT_RGB)));
1145
+ return new RGBA2(packRGBA8(r, g, b, a, packMeta(INTENT_RGB)));
1144
1146
  }
1145
1147
  static fromHex(hex) {
1146
- return hexToRgb(hex);
1148
+ return hexToRgb2(hex);
1147
1149
  }
1148
1150
  static fromIndex(index, snapshot) {
1149
- const normalized = normalizeIndexedColorIndex(index);
1150
- const rgba = snapshot ? parseColor(snapshot) : rgbaForAnsi256Index(normalized);
1151
+ const normalized = normalizeIndexedColorIndex2(index);
1152
+ const rgba = snapshot ? parseColor2(snapshot) : rgbaForAnsi256Index(normalized);
1151
1153
  const [r, g, b, a] = rgba.toInts();
1152
- return new RGBA(packRGBA8(r, g, b, a, packMeta(INTENT_INDEXED, normalized)));
1154
+ return new RGBA2(packRGBA8(r, g, b, a, packMeta(INTENT_INDEXED, normalized)));
1153
1155
  }
1154
1156
  static defaultForeground(snapshot) {
1155
- const rgba = snapshot ? parseColor(snapshot) : RGBA.fromInts(...DEFAULT_FOREGROUND_RGB);
1157
+ const rgba = snapshot ? parseColor2(snapshot) : RGBA2.fromInts(...DEFAULT_FOREGROUND_RGB2);
1156
1158
  const [r, g, b, a] = rgba.toInts();
1157
- return new RGBA(packRGBA8(r, g, b, a, packMeta(INTENT_DEFAULT)));
1159
+ return new RGBA2(packRGBA8(r, g, b, a, packMeta(INTENT_DEFAULT)));
1158
1160
  }
1159
1161
  static defaultBackground(snapshot) {
1160
- const rgba = snapshot ? parseColor(snapshot) : RGBA.fromInts(...DEFAULT_BACKGROUND_RGB);
1162
+ const rgba = snapshot ? parseColor2(snapshot) : RGBA2.fromInts(...DEFAULT_BACKGROUND_RGB2);
1161
1163
  const [r, g, b, a] = rgba.toInts();
1162
- return new RGBA(packRGBA8(r, g, b, a, packMeta(INTENT_DEFAULT)));
1164
+ return new RGBA2(packRGBA8(r, g, b, a, packMeta(INTENT_DEFAULT)));
1163
1165
  }
1164
1166
  toInts() {
1165
1167
  return [this.buffer[0] & 255, this.buffer[1] & 255, this.buffer[2] & 255, this.buffer[3] & 255];
@@ -1216,12 +1218,12 @@ class RGBA {
1216
1218
  return this.buffer[0] === other.buffer[0] && this.buffer[1] === other.buffer[1] && this.buffer[2] === other.buffer[2] && this.buffer[3] === other.buffer[3];
1217
1219
  }
1218
1220
  }
1219
- function normalizeColorValue(value) {
1221
+ function normalizeColorValue2(value) {
1220
1222
  if (value == null)
1221
1223
  return null;
1222
- return { rgba: parseColor(value) };
1224
+ return { rgba: parseColor2(value) };
1223
1225
  }
1224
- function hexToRgb(hex) {
1226
+ function hexToRgb2(hex) {
1225
1227
  hex = hex.replace(/^#/, "");
1226
1228
  if (hex.length === 3) {
1227
1229
  hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
@@ -1230,20 +1232,20 @@ function hexToRgb(hex) {
1230
1232
  }
1231
1233
  if (!/^[0-9A-Fa-f]{6}$/.test(hex) && !/^[0-9A-Fa-f]{8}$/.test(hex)) {
1232
1234
  console.warn(`Invalid hex color: ${hex}, defaulting to magenta`);
1233
- return RGBA.fromValues(1, 0, 1, 1);
1235
+ return RGBA2.fromValues(1, 0, 1, 1);
1234
1236
  }
1235
1237
  const r = parseInt(hex.substring(0, 2), 16);
1236
1238
  const g = parseInt(hex.substring(2, 4), 16);
1237
1239
  const b = parseInt(hex.substring(4, 6), 16);
1238
1240
  const a = hex.length === 8 ? parseInt(hex.substring(6, 8), 16) : 255;
1239
- return RGBA.fromInts(r, g, b, a);
1241
+ return RGBA2.fromInts(r, g, b, a);
1240
1242
  }
1241
- function rgbToHex(rgb) {
1243
+ function rgbToHex2(rgb) {
1242
1244
  const [r, g, b, a] = rgb.toInts();
1243
1245
  const components = a === 255 ? [r, g, b] : [r, g, b, a];
1244
1246
  return "#" + components.map((x) => x.toString(16).padStart(2, "0")).join("");
1245
1247
  }
1246
- function hsvToRgb(h, s, v) {
1248
+ function hsvToRgb2(h, s, v) {
1247
1249
  let r = 0, g = 0, b = 0;
1248
1250
  const i = Math.floor(h / 60) % 6;
1249
1251
  const f = h / 60 - Math.floor(h / 60);
@@ -1282,7 +1284,7 @@ function hsvToRgb(h, s, v) {
1282
1284
  b = q;
1283
1285
  break;
1284
1286
  }
1285
- return RGBA.fromValues(r, g, b, 1);
1287
+ return RGBA2.fromValues(r, g, b, 1);
1286
1288
  }
1287
1289
  var CSS_COLOR_NAMES = {
1288
1290
  black: "#000000",
@@ -1314,27 +1316,27 @@ var CSS_COLOR_NAMES = {
1314
1316
  brightmagenta: "#FF66FF",
1315
1317
  brightwhite: "#FFFFFF"
1316
1318
  };
1317
- function parseColor(color) {
1319
+ function parseColor2(color) {
1318
1320
  if (typeof color === "string") {
1319
1321
  const lowerColor = color.toLowerCase();
1320
1322
  if (lowerColor === "transparent") {
1321
- return RGBA.fromValues(0, 0, 0, 0);
1323
+ return RGBA2.fromValues(0, 0, 0, 0);
1322
1324
  }
1323
1325
  if (CSS_COLOR_NAMES[lowerColor]) {
1324
- return hexToRgb(CSS_COLOR_NAMES[lowerColor]);
1326
+ return hexToRgb2(CSS_COLOR_NAMES[lowerColor]);
1325
1327
  }
1326
- return hexToRgb(color);
1328
+ return hexToRgb2(color);
1327
1329
  }
1328
1330
  return color;
1329
1331
  }
1330
1332
 
1331
1333
  // src/lib/border.ts
1332
1334
  var VALID_BORDER_STYLES = ["single", "double", "rounded", "heavy"];
1333
- function isValidBorderStyle(value) {
1335
+ function isValidBorderStyle2(value) {
1334
1336
  return typeof value === "string" && VALID_BORDER_STYLES.includes(value);
1335
1337
  }
1336
- function parseBorderStyle(value, fallback = "single") {
1337
- if (isValidBorderStyle(value)) {
1338
+ function parseBorderStyle2(value, fallback = "single") {
1339
+ if (isValidBorderStyle2(value)) {
1338
1340
  return value;
1339
1341
  }
1340
1342
  if (value !== undefined && value !== null) {
@@ -1342,7 +1344,7 @@ function parseBorderStyle(value, fallback = "single") {
1342
1344
  }
1343
1345
  return fallback;
1344
1346
  }
1345
- var BorderChars = {
1347
+ var BorderChars2 = {
1346
1348
  single: {
1347
1349
  topLeft: "┌",
1348
1350
  topRight: "┐",
@@ -1396,7 +1398,7 @@ var BorderChars = {
1396
1398
  cross: "╋"
1397
1399
  }
1398
1400
  };
1399
- function getBorderFromSides(sides) {
1401
+ function getBorderFromSides2(sides) {
1400
1402
  const result = [];
1401
1403
  if (sides.top)
1402
1404
  result.push("top");
@@ -1408,7 +1410,7 @@ function getBorderFromSides(sides) {
1408
1410
  result.push("left");
1409
1411
  return result.length > 0 ? result : false;
1410
1412
  }
1411
- function getBorderSides(border) {
1413
+ function getBorderSides2(border) {
1412
1414
  return border === true ? { top: true, right: true, bottom: true, left: true } : Array.isArray(border) ? {
1413
1415
  top: border.includes("top"),
1414
1416
  right: border.includes("right"),
@@ -1416,7 +1418,7 @@ function getBorderSides(border) {
1416
1418
  left: border.includes("left")
1417
1419
  } : { top: false, right: false, bottom: false, left: false };
1418
1420
  }
1419
- function borderCharsToArray(chars) {
1421
+ function borderCharsToArray2(chars) {
1420
1422
  const array = new Uint32Array(11);
1421
1423
  array[0] = chars.topLeft.codePointAt(0);
1422
1424
  array[1] = chars.topRight.codePointAt(0);
@@ -1431,16 +1433,16 @@ function borderCharsToArray(chars) {
1431
1433
  array[10] = chars.cross.codePointAt(0);
1432
1434
  return array;
1433
1435
  }
1434
- var BorderCharArrays = {
1435
- single: borderCharsToArray(BorderChars.single),
1436
- double: borderCharsToArray(BorderChars.double),
1437
- rounded: borderCharsToArray(BorderChars.rounded),
1438
- heavy: borderCharsToArray(BorderChars.heavy)
1436
+ var BorderCharArrays2 = {
1437
+ single: borderCharsToArray2(BorderChars2.single),
1438
+ double: borderCharsToArray2(BorderChars2.double),
1439
+ rounded: borderCharsToArray2(BorderChars2.rounded),
1440
+ heavy: borderCharsToArray2(BorderChars2.heavy)
1439
1441
  };
1440
1442
  // src/lib/KeyHandler.ts
1441
1443
  import { EventEmitter } from "events";
1442
1444
 
1443
- class KeyEvent {
1445
+ class KeyEvent2 {
1444
1446
  name;
1445
1447
  ctrl;
1446
1448
  meta;
@@ -1493,7 +1495,7 @@ class KeyEvent {
1493
1495
  }
1494
1496
  }
1495
1497
 
1496
- class PasteEvent {
1498
+ class PasteEvent2 {
1497
1499
  type = "paste";
1498
1500
  bytes;
1499
1501
  metadata;
@@ -1517,18 +1519,18 @@ class PasteEvent {
1517
1519
  }
1518
1520
  }
1519
1521
 
1520
- class KeyHandler extends EventEmitter {
1522
+ class KeyHandler2 extends EventEmitter {
1521
1523
  processParsedKey(parsedKey) {
1522
1524
  try {
1523
1525
  switch (parsedKey.eventType) {
1524
1526
  case "press":
1525
- this.emit("keypress", new KeyEvent(parsedKey));
1527
+ this.emit("keypress", new KeyEvent2(parsedKey));
1526
1528
  break;
1527
1529
  case "release":
1528
- this.emit("keyrelease", new KeyEvent(parsedKey));
1530
+ this.emit("keyrelease", new KeyEvent2(parsedKey));
1529
1531
  break;
1530
1532
  default:
1531
- this.emit("keypress", new KeyEvent(parsedKey));
1533
+ this.emit("keypress", new KeyEvent2(parsedKey));
1532
1534
  break;
1533
1535
  }
1534
1536
  } catch (error) {
@@ -1539,14 +1541,14 @@ class KeyHandler extends EventEmitter {
1539
1541
  }
1540
1542
  processPaste(bytes, metadata) {
1541
1543
  try {
1542
- this.emit("paste", new PasteEvent(bytes, metadata));
1544
+ this.emit("paste", new PasteEvent2(bytes, metadata));
1543
1545
  } catch (error) {
1544
1546
  console.error(`[KeyHandler] Error processing paste:`, error);
1545
1547
  }
1546
1548
  }
1547
1549
  }
1548
1550
 
1549
- class InternalKeyHandler extends KeyHandler {
1551
+ class InternalKeyHandler2 extends KeyHandler2 {
1550
1552
  renderableHandlers = new Map;
1551
1553
  emit(event, ...args) {
1552
1554
  return this.emitWithPriority(event, ...args);
@@ -4326,7 +4328,7 @@ var pallet_default = {
4326
4328
  };
4327
4329
 
4328
4330
  // src/lib/ascii.font.ts
4329
- var fonts = {
4331
+ var fonts2 = {
4330
4332
  tiny: tiny_default,
4331
4333
  block: block_default,
4332
4334
  shade: shade_default,
@@ -4364,7 +4366,7 @@ function parseColorTags(text) {
4364
4366
  }
4365
4367
  function getParsedFont(fontKey) {
4366
4368
  if (!parsedFonts[fontKey]) {
4367
- const fontDef = fonts[fontKey];
4369
+ const fontDef = fonts2[fontKey];
4368
4370
  const parsedChars = {};
4369
4371
  for (const [char, lines] of Object.entries(fontDef.chars)) {
4370
4372
  parsedChars[char] = lines.map((line) => parseColorTags(line));
@@ -4377,7 +4379,7 @@ function getParsedFont(fontKey) {
4377
4379
  }
4378
4380
  return parsedFonts[fontKey];
4379
4381
  }
4380
- function measureText({ text, font = "tiny" }) {
4382
+ function measureText2({ text, font = "tiny" }) {
4381
4383
  const fontDef = getParsedFont(font);
4382
4384
  if (!fontDef) {
4383
4385
  console.warn(`Font '${font}' not found`);
@@ -4416,7 +4418,7 @@ function measureText({ text, font = "tiny" }) {
4416
4418
  height: fontDef.lines
4417
4419
  };
4418
4420
  }
4419
- function getCharacterPositions(text, font = "tiny") {
4421
+ function getCharacterPositions2(text, font = "tiny") {
4420
4422
  const fontDef = getParsedFont(font);
4421
4423
  if (!fontDef) {
4422
4424
  return [0];
@@ -4449,8 +4451,8 @@ function getCharacterPositions(text, font = "tiny") {
4449
4451
  }
4450
4452
  return positions;
4451
4453
  }
4452
- function coordinateToCharacterIndex(x, text, font = "tiny") {
4453
- const positions = getCharacterPositions(text, font);
4454
+ function coordinateToCharacterIndex2(x, text, font = "tiny") {
4455
+ const positions = getCharacterPositions2(text, font);
4454
4456
  if (x < 0) {
4455
4457
  return 0;
4456
4458
  }
@@ -4467,12 +4469,12 @@ function coordinateToCharacterIndex(x, text, font = "tiny") {
4467
4469
  }
4468
4470
  return 0;
4469
4471
  }
4470
- function renderFontToFrameBuffer(buffer, {
4472
+ function renderFontToFrameBuffer2(buffer, {
4471
4473
  text,
4472
4474
  x = 0,
4473
4475
  y = 0,
4474
- color = [RGBA.fromInts(255, 255, 255, 255)],
4475
- backgroundColor = RGBA.fromInts(0, 0, 0, 255),
4476
+ color = [RGBA2.fromInts(255, 255, 255, 255)],
4477
+ backgroundColor = RGBA2.fromInts(0, 0, 0, 255),
4476
4478
  font = "tiny"
4477
4479
  }) {
4478
4480
  const width = buffer.width;
@@ -4528,7 +4530,7 @@ function renderFontToFrameBuffer(buffer, {
4528
4530
  if (renderX >= 0 && renderX < width) {
4529
4531
  const fontChar = segment.text[charIdx];
4530
4532
  if (fontChar !== " ") {
4531
- buffer.setCellWithAlphaBlending(renderX, renderY, fontChar, parseColor(segmentColor), parseColor(backgroundColor));
4533
+ buffer.setCellWithAlphaBlending(renderX, renderY, fontChar, parseColor2(segmentColor), parseColor2(backgroundColor));
4532
4534
  }
4533
4535
  }
4534
4536
  }
@@ -4547,7 +4549,7 @@ function renderFontToFrameBuffer(buffer, {
4547
4549
  };
4548
4550
  }
4549
4551
  // src/types.ts
4550
- var TextAttributes = {
4552
+ var TextAttributes2 = {
4551
4553
  NONE: 0,
4552
4554
  BOLD: 1 << 0,
4553
4555
  DIM: 1 << 1,
@@ -4558,27 +4560,27 @@ var TextAttributes = {
4558
4560
  HIDDEN: 1 << 6,
4559
4561
  STRIKETHROUGH: 1 << 7
4560
4562
  };
4561
- var ATTRIBUTE_BASE_BITS = 8;
4562
- var ATTRIBUTE_BASE_MASK = 255;
4563
- function getBaseAttributes(attr) {
4564
- return attr & ATTRIBUTE_BASE_MASK;
4565
- }
4566
- var DebugOverlayCorner;
4567
- ((DebugOverlayCorner2) => {
4568
- DebugOverlayCorner2[DebugOverlayCorner2["topLeft"] = 0] = "topLeft";
4569
- DebugOverlayCorner2[DebugOverlayCorner2["topRight"] = 1] = "topRight";
4570
- DebugOverlayCorner2[DebugOverlayCorner2["bottomLeft"] = 2] = "bottomLeft";
4571
- DebugOverlayCorner2[DebugOverlayCorner2["bottomRight"] = 3] = "bottomRight";
4572
- })(DebugOverlayCorner ||= {});
4573
- var TargetChannel;
4574
- ((TargetChannel2) => {
4575
- TargetChannel2[TargetChannel2["FG"] = 1] = "FG";
4576
- TargetChannel2[TargetChannel2["BG"] = 2] = "BG";
4577
- TargetChannel2[TargetChannel2["Both"] = 3] = "Both";
4578
- })(TargetChannel ||= {});
4563
+ var ATTRIBUTE_BASE_BITS2 = 8;
4564
+ var ATTRIBUTE_BASE_MASK2 = 255;
4565
+ function getBaseAttributes2(attr) {
4566
+ return attr & ATTRIBUTE_BASE_MASK2;
4567
+ }
4568
+ var DebugOverlayCorner2;
4569
+ ((DebugOverlayCorner) => {
4570
+ DebugOverlayCorner[DebugOverlayCorner["topLeft"] = 0] = "topLeft";
4571
+ DebugOverlayCorner[DebugOverlayCorner["topRight"] = 1] = "topRight";
4572
+ DebugOverlayCorner[DebugOverlayCorner["bottomLeft"] = 2] = "bottomLeft";
4573
+ DebugOverlayCorner[DebugOverlayCorner["bottomRight"] = 3] = "bottomRight";
4574
+ })(DebugOverlayCorner2 ||= {});
4575
+ var TargetChannel2;
4576
+ ((TargetChannel) => {
4577
+ TargetChannel[TargetChannel["FG"] = 1] = "FG";
4578
+ TargetChannel[TargetChannel["BG"] = 2] = "BG";
4579
+ TargetChannel[TargetChannel["Both"] = 3] = "Both";
4580
+ })(TargetChannel2 ||= {});
4579
4581
 
4580
4582
  // src/utils.ts
4581
- function createTextAttributes({
4583
+ function createTextAttributes2({
4582
4584
  bold = false,
4583
4585
  italic = false,
4584
4586
  underline = false,
@@ -4589,37 +4591,37 @@ function createTextAttributes({
4589
4591
  hidden = false,
4590
4592
  strikethrough = false
4591
4593
  } = {}) {
4592
- let attributes = TextAttributes.NONE;
4594
+ let attributes = TextAttributes2.NONE;
4593
4595
  if (bold)
4594
- attributes |= TextAttributes.BOLD;
4596
+ attributes |= TextAttributes2.BOLD;
4595
4597
  if (italic)
4596
- attributes |= TextAttributes.ITALIC;
4598
+ attributes |= TextAttributes2.ITALIC;
4597
4599
  if (underline)
4598
- attributes |= TextAttributes.UNDERLINE;
4600
+ attributes |= TextAttributes2.UNDERLINE;
4599
4601
  if (dim)
4600
- attributes |= TextAttributes.DIM;
4602
+ attributes |= TextAttributes2.DIM;
4601
4603
  if (blink)
4602
- attributes |= TextAttributes.BLINK;
4604
+ attributes |= TextAttributes2.BLINK;
4603
4605
  if (inverse || reverse)
4604
- attributes |= TextAttributes.INVERSE;
4606
+ attributes |= TextAttributes2.INVERSE;
4605
4607
  if (hidden)
4606
- attributes |= TextAttributes.HIDDEN;
4608
+ attributes |= TextAttributes2.HIDDEN;
4607
4609
  if (strikethrough)
4608
- attributes |= TextAttributes.STRIKETHROUGH;
4610
+ attributes |= TextAttributes2.STRIKETHROUGH;
4609
4611
  return attributes;
4610
4612
  }
4611
- var ATTRIBUTE_BASE_MASK2 = 255;
4613
+ var ATTRIBUTE_BASE_MASK = 255;
4612
4614
  var LINK_ID_SHIFT = 8;
4613
4615
  var LINK_ID_PAYLOAD_MASK = 16777215;
4614
- function attributesWithLink(baseAttributes, linkId) {
4615
- const base = baseAttributes & ATTRIBUTE_BASE_MASK2;
4616
+ function attributesWithLink2(baseAttributes, linkId) {
4617
+ const base = baseAttributes & ATTRIBUTE_BASE_MASK;
4616
4618
  const linkBits = (linkId & LINK_ID_PAYLOAD_MASK) << LINK_ID_SHIFT;
4617
4619
  return base | linkBits;
4618
4620
  }
4619
- function getLinkId(attributes) {
4621
+ function getLinkId2(attributes) {
4620
4622
  return attributes >>> LINK_ID_SHIFT & LINK_ID_PAYLOAD_MASK;
4621
4623
  }
4622
- function visualizeRenderableTree(renderable, maxDepth = 10) {
4624
+ function visualizeRenderableTree2(renderable, maxDepth = 10) {
4623
4625
  function buildTreeLines(node, prefix = "", parentPrefix = "", isLastChild = true, depth = 0) {
4624
4626
  if (depth >= maxDepth) {
4625
4627
  return [`${prefix}${node.id} ... (max depth reached)`];
@@ -4647,30 +4649,30 @@ function visualizeRenderableTree(renderable, maxDepth = 10) {
4647
4649
 
4648
4650
  // src/lib/styled-text.ts
4649
4651
  var BrandedStyledText = Symbol.for("@opentui/core/StyledText");
4650
- function isStyledText(obj) {
4652
+ function isStyledText2(obj) {
4651
4653
  return obj && obj[BrandedStyledText];
4652
4654
  }
4653
4655
 
4654
- class StyledText {
4656
+ class StyledText2 {
4655
4657
  [BrandedStyledText] = true;
4656
4658
  chunks;
4657
4659
  constructor(chunks) {
4658
4660
  this.chunks = chunks;
4659
4661
  }
4660
4662
  }
4661
- function stringToStyledText(content) {
4663
+ function stringToStyledText2(content) {
4662
4664
  const chunk = {
4663
4665
  __isChunk: true,
4664
4666
  text: content
4665
4667
  };
4666
- return new StyledText([chunk]);
4668
+ return new StyledText2([chunk]);
4667
4669
  }
4668
4670
  function applyStyle(input, style) {
4669
4671
  if (typeof input === "object" && "__isChunk" in input) {
4670
4672
  const existingChunk = input;
4671
- const fg = style.fg ? parseColor(style.fg) : existingChunk.fg;
4672
- const bg = style.bg ? parseColor(style.bg) : existingChunk.bg;
4673
- const newAttrs = createTextAttributes(style);
4673
+ const fg = style.fg ? parseColor2(style.fg) : existingChunk.fg;
4674
+ const bg = style.bg ? parseColor2(style.bg) : existingChunk.bg;
4675
+ const newAttrs = createTextAttributes2(style);
4674
4676
  const mergedAttrs = existingChunk.attributes ? existingChunk.attributes | newAttrs : newAttrs;
4675
4677
  return {
4676
4678
  __isChunk: true,
@@ -4682,9 +4684,9 @@ function applyStyle(input, style) {
4682
4684
  };
4683
4685
  } else {
4684
4686
  const plainTextStr = String(input);
4685
- const fg = style.fg ? parseColor(style.fg) : undefined;
4686
- const bg = style.bg ? parseColor(style.bg) : undefined;
4687
- const attributes = createTextAttributes(style);
4687
+ const fg = style.fg ? parseColor2(style.fg) : undefined;
4688
+ const bg = style.bg ? parseColor2(style.bg) : undefined;
4689
+ const attributes = createTextAttributes2(style);
4688
4690
  return {
4689
4691
  __isChunk: true,
4690
4692
  text: plainTextStr,
@@ -4694,40 +4696,40 @@ function applyStyle(input, style) {
4694
4696
  };
4695
4697
  }
4696
4698
  }
4697
- var black = (input) => applyStyle(input, { fg: "black" });
4698
- var red = (input) => applyStyle(input, { fg: "red" });
4699
- var green = (input) => applyStyle(input, { fg: "green" });
4700
- var yellow = (input) => applyStyle(input, { fg: "yellow" });
4701
- var blue = (input) => applyStyle(input, { fg: "blue" });
4702
- var magenta = (input) => applyStyle(input, { fg: "magenta" });
4703
- var cyan = (input) => applyStyle(input, { fg: "cyan" });
4704
- var white = (input) => applyStyle(input, { fg: "white" });
4705
- var brightBlack = (input) => applyStyle(input, { fg: "brightBlack" });
4706
- var brightRed = (input) => applyStyle(input, { fg: "brightRed" });
4707
- var brightGreen = (input) => applyStyle(input, { fg: "brightGreen" });
4708
- var brightYellow = (input) => applyStyle(input, { fg: "brightYellow" });
4709
- var brightBlue = (input) => applyStyle(input, { fg: "brightBlue" });
4710
- var brightMagenta = (input) => applyStyle(input, { fg: "brightMagenta" });
4711
- var brightCyan = (input) => applyStyle(input, { fg: "brightCyan" });
4712
- var brightWhite = (input) => applyStyle(input, { fg: "brightWhite" });
4713
- var bgBlack = (input) => applyStyle(input, { bg: "black" });
4714
- var bgRed = (input) => applyStyle(input, { bg: "red" });
4715
- var bgGreen = (input) => applyStyle(input, { bg: "green" });
4716
- var bgYellow = (input) => applyStyle(input, { bg: "yellow" });
4717
- var bgBlue = (input) => applyStyle(input, { bg: "blue" });
4718
- var bgMagenta = (input) => applyStyle(input, { bg: "magenta" });
4719
- var bgCyan = (input) => applyStyle(input, { bg: "cyan" });
4720
- var bgWhite = (input) => applyStyle(input, { bg: "white" });
4721
- var bold = (input) => applyStyle(input, { bold: true });
4722
- var italic = (input) => applyStyle(input, { italic: true });
4723
- var underline = (input) => applyStyle(input, { underline: true });
4724
- var strikethrough = (input) => applyStyle(input, { strikethrough: true });
4725
- var dim = (input) => applyStyle(input, { dim: true });
4726
- var reverse = (input) => applyStyle(input, { reverse: true });
4727
- var blink = (input) => applyStyle(input, { blink: true });
4728
- var fg = (color) => (input) => applyStyle(input, { fg: color });
4729
- var bg = (color) => (input) => applyStyle(input, { bg: color });
4730
- var link = (url) => (input) => {
4699
+ var black2 = (input) => applyStyle(input, { fg: "black" });
4700
+ var red2 = (input) => applyStyle(input, { fg: "red" });
4701
+ var green2 = (input) => applyStyle(input, { fg: "green" });
4702
+ var yellow2 = (input) => applyStyle(input, { fg: "yellow" });
4703
+ var blue2 = (input) => applyStyle(input, { fg: "blue" });
4704
+ var magenta2 = (input) => applyStyle(input, { fg: "magenta" });
4705
+ var cyan2 = (input) => applyStyle(input, { fg: "cyan" });
4706
+ var white2 = (input) => applyStyle(input, { fg: "white" });
4707
+ var brightBlack2 = (input) => applyStyle(input, { fg: "brightBlack" });
4708
+ var brightRed2 = (input) => applyStyle(input, { fg: "brightRed" });
4709
+ var brightGreen2 = (input) => applyStyle(input, { fg: "brightGreen" });
4710
+ var brightYellow2 = (input) => applyStyle(input, { fg: "brightYellow" });
4711
+ var brightBlue2 = (input) => applyStyle(input, { fg: "brightBlue" });
4712
+ var brightMagenta2 = (input) => applyStyle(input, { fg: "brightMagenta" });
4713
+ var brightCyan2 = (input) => applyStyle(input, { fg: "brightCyan" });
4714
+ var brightWhite2 = (input) => applyStyle(input, { fg: "brightWhite" });
4715
+ var bgBlack2 = (input) => applyStyle(input, { bg: "black" });
4716
+ var bgRed2 = (input) => applyStyle(input, { bg: "red" });
4717
+ var bgGreen2 = (input) => applyStyle(input, { bg: "green" });
4718
+ var bgYellow2 = (input) => applyStyle(input, { bg: "yellow" });
4719
+ var bgBlue2 = (input) => applyStyle(input, { bg: "blue" });
4720
+ var bgMagenta2 = (input) => applyStyle(input, { bg: "magenta" });
4721
+ var bgCyan2 = (input) => applyStyle(input, { bg: "cyan" });
4722
+ var bgWhite2 = (input) => applyStyle(input, { bg: "white" });
4723
+ var bold2 = (input) => applyStyle(input, { bold: true });
4724
+ var italic2 = (input) => applyStyle(input, { italic: true });
4725
+ var underline2 = (input) => applyStyle(input, { underline: true });
4726
+ var strikethrough2 = (input) => applyStyle(input, { strikethrough: true });
4727
+ var dim2 = (input) => applyStyle(input, { dim: true });
4728
+ var reverse2 = (input) => applyStyle(input, { reverse: true });
4729
+ var blink2 = (input) => applyStyle(input, { blink: true });
4730
+ var fg2 = (color) => (input) => applyStyle(input, { fg: color });
4731
+ var bg2 = (color) => (input) => applyStyle(input, { bg: color });
4732
+ var link2 = (url) => (input) => {
4731
4733
  const chunk = typeof input === "object" && "__isChunk" in input ? input : {
4732
4734
  __isChunk: true,
4733
4735
  text: String(input)
@@ -4737,7 +4739,7 @@ var link = (url) => (input) => {
4737
4739
  link: { url }
4738
4740
  };
4739
4741
  };
4740
- function t(strings, ...values) {
4742
+ function t2(strings, ...values) {
4741
4743
  const chunks = [];
4742
4744
  for (let i = 0;i < strings.length; i++) {
4743
4745
  const raw = strings[i];
@@ -4760,7 +4762,7 @@ function t(strings, ...values) {
4760
4762
  });
4761
4763
  }
4762
4764
  }
4763
- return new StyledText(chunks);
4765
+ return new StyledText2(chunks);
4764
4766
  }
4765
4767
 
4766
4768
  // src/lib/hast-styled-text.ts
@@ -4790,12 +4792,12 @@ function hastToTextChunks(node, syntaxStyle, parentStyles = []) {
4790
4792
  }
4791
4793
  return chunks;
4792
4794
  }
4793
- function hastToStyledText(hast, syntaxStyle) {
4795
+ function hastToStyledText2(hast, syntaxStyle) {
4794
4796
  const chunks = hastToTextChunks(hast, syntaxStyle);
4795
- return new StyledText(chunks);
4797
+ return new StyledText2(chunks);
4796
4798
  }
4797
4799
  // src/lib/clock.ts
4798
- class SystemClock {
4800
+ class SystemClock2 {
4799
4801
  now() {
4800
4802
  if (!globalThis.performance || typeof globalThis.performance.now !== "function") {
4801
4803
  throw new Error("SystemClock requires globalThis.performance.now()");
@@ -5300,9 +5302,9 @@ var keyName = {
5300
5302
  "[8^": "end",
5301
5303
  "[Z": "tab"
5302
5304
  };
5303
- var nonAlphanumericKeys = [...Object.values(keyName), "backspace"];
5304
- var terminalNamedSingleStrokeKeys = [
5305
- ...new Set(["return", "linefeed", "tab", "escape", "space", ...nonAlphanumericKeys, ...kittyNamedSingleStrokeKeys])
5305
+ var nonAlphanumericKeys2 = [...Object.values(keyName), "backspace"];
5306
+ var terminalNamedSingleStrokeKeys2 = [
5307
+ ...new Set(["return", "linefeed", "tab", "escape", "space", ...nonAlphanumericKeys2, ...kittyNamedSingleStrokeKeys])
5306
5308
  ];
5307
5309
  var isShiftKey = (code) => {
5308
5310
  return ["[a", "[b", "[c", "[d", "[e", "[2$", "[3$", "[5$", "[6$", "[7$", "[8$", "[Z"].includes(code);
@@ -5342,7 +5344,7 @@ var ss3NumpadPrintable = {
5342
5344
  OX: "="
5343
5345
  };
5344
5346
  var modifyOtherKeysRe = /^\x1b\[27;(\d+);(\d+)~$/;
5345
- var parseKeypress = (s = "", options = {}) => {
5347
+ var parseKeypress2 = (s = "", options = {}) => {
5346
5348
  let parts;
5347
5349
  if (Buffer2.isBuffer(s)) {
5348
5350
  if (s[0] > 127 && s[1] === undefined) {
@@ -5532,14 +5534,14 @@ var parseKeypress = (s = "", options = {}) => {
5532
5534
  return key;
5533
5535
  };
5534
5536
  // src/lib/scroll-acceleration.ts
5535
- class LinearScrollAccel {
5537
+ class LinearScrollAccel2 {
5536
5538
  tick(_now) {
5537
5539
  return 1;
5538
5540
  }
5539
5541
  reset() {}
5540
5542
  }
5541
5543
 
5542
- class MacOSScrollAccel {
5544
+ class MacOSScrollAccel2 {
5543
5545
  opts;
5544
5546
  lastTickTime = 0;
5545
5547
  velocityHistory = [];
@@ -5580,7 +5582,7 @@ class MacOSScrollAccel {
5580
5582
  }
5581
5583
  }
5582
5584
  // src/lib/yoga.options.ts
5583
- function parseAlign(value) {
5585
+ function parseAlign2(value) {
5584
5586
  if (value == null) {
5585
5587
  return 0 /* Auto */;
5586
5588
  }
@@ -5607,7 +5609,7 @@ function parseAlign(value) {
5607
5609
  return 0 /* Auto */;
5608
5610
  }
5609
5611
  }
5610
- function parseAlignItems(value) {
5612
+ function parseAlignItems2(value) {
5611
5613
  if (value == null) {
5612
5614
  return 4 /* Stretch */;
5613
5615
  }
@@ -5634,7 +5636,7 @@ function parseAlignItems(value) {
5634
5636
  return 4 /* Stretch */;
5635
5637
  }
5636
5638
  }
5637
- function parseBoxSizing(value) {
5639
+ function parseBoxSizing2(value) {
5638
5640
  if (value == null) {
5639
5641
  return 0 /* BorderBox */;
5640
5642
  }
@@ -5647,7 +5649,7 @@ function parseBoxSizing(value) {
5647
5649
  return 0 /* BorderBox */;
5648
5650
  }
5649
5651
  }
5650
- function parseDimension(value) {
5652
+ function parseDimension2(value) {
5651
5653
  if (value == null) {
5652
5654
  return 0 /* Width */;
5653
5655
  }
@@ -5660,7 +5662,7 @@ function parseDimension(value) {
5660
5662
  return 0 /* Width */;
5661
5663
  }
5662
5664
  }
5663
- function parseDirection(value) {
5665
+ function parseDirection2(value) {
5664
5666
  if (value == null) {
5665
5667
  return 1 /* LTR */;
5666
5668
  }
@@ -5675,7 +5677,7 @@ function parseDirection(value) {
5675
5677
  return 1 /* LTR */;
5676
5678
  }
5677
5679
  }
5678
- function parseDisplay(value) {
5680
+ function parseDisplay2(value) {
5679
5681
  if (value == null) {
5680
5682
  return 0 /* Flex */;
5681
5683
  }
@@ -5690,7 +5692,7 @@ function parseDisplay(value) {
5690
5692
  return 0 /* Flex */;
5691
5693
  }
5692
5694
  }
5693
- function parseEdge(value) {
5695
+ function parseEdge2(value) {
5694
5696
  if (value == null) {
5695
5697
  return 8 /* All */;
5696
5698
  }
@@ -5717,7 +5719,7 @@ function parseEdge(value) {
5717
5719
  return 8 /* All */;
5718
5720
  }
5719
5721
  }
5720
- function parseFlexDirection(value) {
5722
+ function parseFlexDirection2(value) {
5721
5723
  if (value == null) {
5722
5724
  return 0 /* Column */;
5723
5725
  }
@@ -5734,7 +5736,7 @@ function parseFlexDirection(value) {
5734
5736
  return 0 /* Column */;
5735
5737
  }
5736
5738
  }
5737
- function parseGutter(value) {
5739
+ function parseGutter2(value) {
5738
5740
  if (value == null) {
5739
5741
  return 2 /* All */;
5740
5742
  }
@@ -5749,7 +5751,7 @@ function parseGutter(value) {
5749
5751
  return 2 /* All */;
5750
5752
  }
5751
5753
  }
5752
- function parseJustify(value) {
5754
+ function parseJustify2(value) {
5753
5755
  if (value == null) {
5754
5756
  return 0 /* FlexStart */;
5755
5757
  }
@@ -5770,7 +5772,7 @@ function parseJustify(value) {
5770
5772
  return 0 /* FlexStart */;
5771
5773
  }
5772
5774
  }
5773
- function parseLogLevel(value) {
5775
+ function parseLogLevel2(value) {
5774
5776
  if (value == null) {
5775
5777
  return 2 /* Info */;
5776
5778
  }
@@ -5791,7 +5793,7 @@ function parseLogLevel(value) {
5791
5793
  return 2 /* Info */;
5792
5794
  }
5793
5795
  }
5794
- function parseMeasureMode(value) {
5796
+ function parseMeasureMode2(value) {
5795
5797
  if (value == null) {
5796
5798
  return 0 /* Undefined */;
5797
5799
  }
@@ -5806,7 +5808,7 @@ function parseMeasureMode(value) {
5806
5808
  return 0 /* Undefined */;
5807
5809
  }
5808
5810
  }
5809
- function parseOverflow(value) {
5811
+ function parseOverflow2(value) {
5810
5812
  if (value == null) {
5811
5813
  return 0 /* Visible */;
5812
5814
  }
@@ -5821,7 +5823,7 @@ function parseOverflow(value) {
5821
5823
  return 0 /* Visible */;
5822
5824
  }
5823
5825
  }
5824
- function parsePositionType(value) {
5826
+ function parsePositionType2(value) {
5825
5827
  if (value == null) {
5826
5828
  return 1 /* Relative */;
5827
5829
  }
@@ -5836,7 +5838,7 @@ function parsePositionType(value) {
5836
5838
  return 0 /* Static */;
5837
5839
  }
5838
5840
  }
5839
- function parseUnit(value) {
5841
+ function parseUnit2(value) {
5840
5842
  if (value == null) {
5841
5843
  return 1 /* Point */;
5842
5844
  }
@@ -5853,7 +5855,7 @@ function parseUnit(value) {
5853
5855
  return 1 /* Point */;
5854
5856
  }
5855
5857
  }
5856
- function parseWrap(value) {
5858
+ function parseWrap2(value) {
5857
5859
  if (value == null) {
5858
5860
  return 0 /* NoWrap */;
5859
5861
  }
@@ -5869,7 +5871,7 @@ function parseWrap(value) {
5869
5871
  }
5870
5872
  }
5871
5873
  // src/lib/parse.mouse.ts
5872
- class MouseParser {
5874
+ class MouseParser2 {
5873
5875
  mouseButtonsPressed = new Set;
5874
5876
  static SCROLL_DIRECTIONS = {
5875
5877
  0: "up",
@@ -5967,7 +5969,7 @@ class MouseParser {
5967
5969
  decodeSgrEvent(rawButtonCode, wireX, wireY, pressRelease) {
5968
5970
  const button = rawButtonCode & 3;
5969
5971
  const isScroll = (rawButtonCode & 64) !== 0;
5970
- const scrollDirection = !isScroll ? undefined : MouseParser.SCROLL_DIRECTIONS[button];
5972
+ const scrollDirection = !isScroll ? undefined : MouseParser2.SCROLL_DIRECTIONS[button];
5971
5973
  const isMotion = (rawButtonCode & 32) !== 0;
5972
5974
  const modifiers = {
5973
5975
  shift: (rawButtonCode & 4) !== 0,
@@ -6012,7 +6014,7 @@ class MouseParser {
6012
6014
  const button = buttonByte & 3;
6013
6015
  const isScroll = (buttonByte & 64) !== 0;
6014
6016
  const isMotion = (buttonByte & 32) !== 0;
6015
- const scrollDirection = !isScroll ? undefined : MouseParser.SCROLL_DIRECTIONS[button];
6017
+ const scrollDirection = !isScroll ? undefined : MouseParser2.SCROLL_DIRECTIONS[button];
6016
6018
  const modifiers = {
6017
6019
  shift: (buttonByte & 4) !== 0,
6018
6020
  alt: (buttonByte & 8) !== 0,
@@ -6063,7 +6065,7 @@ class SelectionAnchor {
6063
6065
  }
6064
6066
  }
6065
6067
 
6066
- class Selection {
6068
+ class Selection2 {
6067
6069
  _anchor;
6068
6070
  _focus;
6069
6071
  _selectedRenderables = [];
@@ -6157,7 +6159,7 @@ class Selection {
6157
6159
  `);
6158
6160
  }
6159
6161
  }
6160
- function convertGlobalToLocalSelection(globalSelection, localX, localY) {
6162
+ function convertGlobalToLocalSelection2(globalSelection, localX, localY) {
6161
6163
  if (!globalSelection?.isActive) {
6162
6164
  return null;
6163
6165
  }
@@ -6171,7 +6173,7 @@ function convertGlobalToLocalSelection(globalSelection, localX, localY) {
6171
6173
  };
6172
6174
  }
6173
6175
 
6174
- class ASCIIFontSelectionHelper {
6176
+ class ASCIIFontSelectionHelper2 {
6175
6177
  getText;
6176
6178
  getFont;
6177
6179
  localSelection = null;
@@ -6191,7 +6193,7 @@ class ASCIIFontSelectionHelper {
6191
6193
  }
6192
6194
  const text = this.getText();
6193
6195
  const font = this.getFont();
6194
- const charIndex = coordinateToCharacterIndex(localX, text, font);
6196
+ const charIndex = coordinateToCharacterIndex2(localX, text, font);
6195
6197
  return charIndex >= 0 && charIndex <= text.length;
6196
6198
  }
6197
6199
  onLocalSelectionChanged(localSelection, width, height) {
@@ -6202,7 +6204,7 @@ class ASCIIFontSelectionHelper {
6202
6204
  }
6203
6205
  const text = this.getText();
6204
6206
  const font = this.getFont();
6205
- const positions = getCharacterPositions(text, font);
6207
+ const positions = getCharacterPositions2(text, font);
6206
6208
  const minY = Math.min(localSelection.anchorY, localSelection.focusY);
6207
6209
  const maxY = Math.max(localSelection.anchorY, localSelection.focusY);
6208
6210
  if (maxY < 0 || minY > height - 1) {
@@ -6256,7 +6258,7 @@ var DEFAULT_PROTOCOL_CONTEXT = {
6256
6258
  startupCursorCprActive: false
6257
6259
  };
6258
6260
  var RXVT_DOLLAR_CSI_RE = /^\x1b\[\d+\$$/;
6259
- var SYSTEM_CLOCK = new SystemClock;
6261
+ var SYSTEM_CLOCK = new SystemClock2;
6260
6262
 
6261
6263
  class ByteQueue {
6262
6264
  buf;
@@ -6454,8 +6456,8 @@ function canStillBePixelResolution(state) {
6454
6456
  function canStillBePixelResolutionPrefix(bytes) {
6455
6457
  const fixedPrefix = [ESC, 91, 52, 59];
6456
6458
  const fixedLength = Math.min(bytes.length, fixedPrefix.length);
6457
- for (let index2 = 0;index2 < fixedLength; index2 += 1) {
6458
- if (bytes[index2] !== fixedPrefix[index2])
6459
+ for (let index = 0;index < fixedLength; index += 1) {
6460
+ if (bytes[index] !== fixedPrefix[index])
6459
6461
  return false;
6460
6462
  }
6461
6463
  if (bytes.length <= fixedPrefix.length)
@@ -6584,7 +6586,7 @@ function joinPasteBytes(parts, totalLength) {
6584
6586
  return bytes;
6585
6587
  }
6586
6588
 
6587
- class StdinParser {
6589
+ class StdinParser2 {
6588
6590
  pending = new ByteQueue(INITIAL_PENDING_CAPACITY);
6589
6591
  events = [];
6590
6592
  timeoutMs;
@@ -6592,7 +6594,7 @@ class StdinParser {
6592
6594
  armTimeouts;
6593
6595
  onTimeoutFlush;
6594
6596
  useKittyKeyboard;
6595
- mouseParser = new MouseParser;
6597
+ mouseParser = new MouseParser2;
6596
6598
  clock;
6597
6599
  protocolContext;
6598
6600
  timeoutId = null;
@@ -7560,7 +7562,7 @@ class StdinParser {
7560
7562
  }
7561
7563
  }
7562
7564
  emitKeyOrResponse(protocol, raw) {
7563
- const parsed = parseKeypress(raw, { useKittyKeyboard: this.useKittyKeyboard });
7565
+ const parsed = parseKeypress2(raw, { useKittyKeyboard: this.useKittyKeyboard });
7564
7566
  if (parsed) {
7565
7567
  this.events.push({
7566
7568
  type: "key",
@@ -7589,7 +7591,7 @@ class StdinParser {
7589
7591
  });
7590
7592
  }
7591
7593
  emitLegacyHighByte(byte) {
7592
- const parsed = parseKeypress(Buffer3.from([byte]), { useKittyKeyboard: this.useKittyKeyboard });
7594
+ const parsed = parseKeypress2(Buffer3.from([byte]), { useKittyKeyboard: this.useKittyKeyboard });
7593
7595
  if (parsed) {
7594
7596
  this.events.push({
7595
7597
  type: "key",
@@ -7740,7 +7742,7 @@ class StdinParser {
7740
7742
  }
7741
7743
  }
7742
7744
  // src/lib/tree-sitter-styled-text.ts
7743
- registerEnvVar({ name: "OTUI_TS_STYLE_WARN", default: false, description: "Enable warnings for missing syntax styles" });
7745
+ registerEnvVar2({ name: "OTUI_TS_STYLE_WARN", default: false, description: "Enable warnings for missing syntax styles" });
7744
7746
  function getSpecificity(group) {
7745
7747
  return group.split(".").length;
7746
7748
  }
@@ -7750,8 +7752,9 @@ function shouldSuppressInInjection(group, meta) {
7750
7752
  }
7751
7753
  return group === "markup.raw.block";
7752
7754
  }
7753
- function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7755
+ function treeSitterToTextChunks2(content, highlights, syntaxStyle, options) {
7754
7756
  const chunks = [];
7757
+ const ranges = options?.ranges;
7755
7758
  const defaultStyle = syntaxStyle.getStyle("default");
7756
7759
  const concealEnabled = options?.enabled ?? true;
7757
7760
  const baseStyle = options?.baseHighlight ? syntaxStyle.getStyle(options.baseHighlight) : undefined;
@@ -7801,13 +7804,14 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7801
7804
  text: replacementText,
7802
7805
  fg: defaultStyle?.fg,
7803
7806
  bg: defaultStyle?.bg,
7804
- attributes: defaultStyle ? createTextAttributes({
7807
+ attributes: defaultStyle ? createTextAttributes2({
7805
7808
  bold: defaultStyle.bold,
7806
7809
  italic: defaultStyle.italic,
7807
7810
  underline: defaultStyle.underline,
7808
7811
  dim: defaultStyle.dim
7809
7812
  }) : 0
7810
7813
  });
7814
+ ranges?.push({ start: currentOffset, end: boundary.offset });
7811
7815
  }
7812
7816
  } else {
7813
7817
  const insideInjectionContainer = injectionContainerRanges.some((range) => currentOffset >= range.start && currentOffset < range.end);
@@ -7847,11 +7851,11 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7847
7851
  } else {
7848
7852
  if (group.includes(".")) {
7849
7853
  const baseName = group.split(".")[0];
7850
- if (env.OTUI_TS_STYLE_WARN) {
7854
+ if (env2.OTUI_TS_STYLE_WARN) {
7851
7855
  console.warn(`Syntax style not found for group "${group}" or base scope "${baseName}", using default style`);
7852
7856
  }
7853
7857
  } else {
7854
- if (env.OTUI_TS_STYLE_WARN) {
7858
+ if (env2.OTUI_TS_STYLE_WARN) {
7855
7859
  console.warn(`Syntax style not found for group "${group}", using default style`);
7856
7860
  }
7857
7861
  }
@@ -7863,13 +7867,14 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7863
7867
  text: segmentText,
7864
7868
  fg: finalStyle?.fg,
7865
7869
  bg: finalStyle?.bg,
7866
- attributes: finalStyle ? createTextAttributes({
7870
+ attributes: finalStyle ? createTextAttributes2({
7867
7871
  bold: finalStyle.bold,
7868
7872
  italic: finalStyle.italic,
7869
7873
  underline: finalStyle.underline,
7870
7874
  dim: finalStyle.dim
7871
7875
  }) : 0
7872
7876
  });
7877
+ ranges?.push({ start: currentOffset, end: boundary.offset });
7873
7878
  }
7874
7879
  } else if (currentOffset < boundary.offset) {
7875
7880
  const text = content.slice(currentOffset, boundary.offset);
@@ -7879,13 +7884,14 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7879
7884
  text,
7880
7885
  fg: style?.fg,
7881
7886
  bg: style?.bg,
7882
- attributes: style ? createTextAttributes({
7887
+ attributes: style ? createTextAttributes2({
7883
7888
  bold: style.bold,
7884
7889
  italic: style.italic,
7885
7890
  underline: style.underline,
7886
7891
  dim: style.dim
7887
7892
  }) : 0
7888
7893
  });
7894
+ ranges?.push({ start: currentOffset, end: boundary.offset });
7889
7895
  }
7890
7896
  if (boundary.type === "start") {
7891
7897
  activeHighlights.add(boundary.highlightIndex);
@@ -7925,24 +7931,25 @@ function treeSitterToTextChunks(content, highlights, syntaxStyle, options) {
7925
7931
  text,
7926
7932
  fg: style?.fg,
7927
7933
  bg: style?.bg,
7928
- attributes: style ? createTextAttributes({
7934
+ attributes: style ? createTextAttributes2({
7929
7935
  bold: style.bold,
7930
7936
  italic: style.italic,
7931
7937
  underline: style.underline,
7932
7938
  dim: style.dim
7933
7939
  }) : 0
7934
7940
  });
7941
+ ranges?.push({ start: currentOffset, end: content.length });
7935
7942
  }
7936
7943
  return chunks;
7937
7944
  }
7938
- async function treeSitterToStyledText(content, filetype, syntaxStyle, client, options) {
7945
+ async function treeSitterToStyledText2(content, filetype, syntaxStyle, client, options) {
7939
7946
  const result = await client.highlightOnce(content, filetype);
7940
7947
  if (result.highlights && result.highlights.length > 0 || options?.baseHighlight) {
7941
- const chunks = treeSitterToTextChunks(content, result.highlights ?? [], syntaxStyle, {
7948
+ const chunks = treeSitterToTextChunks2(content, result.highlights ?? [], syntaxStyle, {
7942
7949
  enabled: options?.conceal?.enabled ?? true,
7943
7950
  baseHighlight: options?.baseHighlight
7944
7951
  });
7945
- return new StyledText(chunks);
7952
+ return new StyledText2(chunks);
7946
7953
  } else {
7947
7954
  const defaultStyle = syntaxStyle.mergeStyles("default");
7948
7955
  const chunks = [
@@ -7954,7 +7961,7 @@ async function treeSitterToStyledText(content, filetype, syntaxStyle, client, op
7954
7961
  attributes: defaultStyle.attributes
7955
7962
  }
7956
7963
  ];
7957
- return new StyledText(chunks);
7964
+ return new StyledText2(chunks);
7958
7965
  }
7959
7966
  }
7960
7967
  // src/lib/tree-sitter/client.ts
@@ -7973,13 +7980,13 @@ class DebounceController {
7973
7980
  }
7974
7981
  debounce(id, ms, fn) {
7975
7982
  const scopeMap = TIMERS_MAP.get(this.scopeId);
7976
- return new Promise((resolve2, reject) => {
7983
+ return new Promise((resolve, reject) => {
7977
7984
  if (scopeMap.has(id)) {
7978
7985
  clearTimeout(scopeMap.get(id));
7979
7986
  }
7980
7987
  const timerId = setTimeout(() => {
7981
7988
  try {
7982
- resolve2(fn());
7989
+ resolve(fn());
7983
7990
  } catch (error) {
7984
7991
  reject(error);
7985
7992
  }
@@ -8472,14 +8479,14 @@ function setGlobalWorkerMessageHandler(handler) {
8472
8479
  }
8473
8480
 
8474
8481
  // src/lib/tree-sitter/client.ts
8475
- registerEnvVar({
8482
+ registerEnvVar2({
8476
8483
  name: "OTUI_TREE_SITTER_WORKER_PATH",
8477
8484
  description: "Path to the TreeSitter worker entry script",
8478
8485
  type: "string",
8479
8486
  default: ""
8480
8487
  });
8481
8488
  var DEFAULT_PARSER_OVERRIDES = [];
8482
- function addDefaultParsers(parsers) {
8489
+ function addDefaultParsers2(parsers) {
8483
8490
  for (const parser of parsers) {
8484
8491
  DEFAULT_PARSER_OVERRIDES = [
8485
8492
  ...DEFAULT_PARSER_OVERRIDES.filter((existingParser) => existingParser.filetype !== parser.filetype),
@@ -8489,7 +8496,7 @@ function addDefaultParsers(parsers) {
8489
8496
  }
8490
8497
  var isUrl = (path) => path.startsWith("http://") || path.startsWith("https://");
8491
8498
 
8492
- class TreeSitterClient extends EventEmitter2 {
8499
+ class TreeSitterClient2 extends EventEmitter2 {
8493
8500
  initialized = false;
8494
8501
  worker;
8495
8502
  buffers = new Map;
@@ -8597,8 +8604,8 @@ class TreeSitterClient extends EventEmitter2 {
8597
8604
  if (this.options.workerPath) {
8598
8605
  return this.options.workerPath;
8599
8606
  }
8600
- if (env.OTUI_TREE_SITTER_WORKER_PATH) {
8601
- return env.OTUI_TREE_SITTER_WORKER_PATH;
8607
+ if (env2.OTUI_TREE_SITTER_WORKER_PATH) {
8608
+ return env2.OTUI_TREE_SITTER_WORKER_PATH;
8602
8609
  }
8603
8610
  if (typeof OTUI_TREE_SITTER_WORKER_PATH !== "undefined") {
8604
8611
  return OTUI_TREE_SITTER_WORKER_PATH;
@@ -8683,7 +8690,7 @@ class TreeSitterClient extends EventEmitter2 {
8683
8690
  async initializeClient(generation, worker) {
8684
8691
  const treeSitterWasmPath = await resolveTreeSitterWasm();
8685
8692
  this.assertCurrentInitialization(generation, worker);
8686
- await new Promise((resolve3, reject) => {
8693
+ await new Promise((resolve, reject) => {
8687
8694
  const timeoutMs = this.options.initTimeout ?? 1e4;
8688
8695
  const timeoutId = setTimeout(() => {
8689
8696
  const error = new Error("Worker initialization timed out");
@@ -8691,7 +8698,7 @@ class TreeSitterClient extends EventEmitter2 {
8691
8698
  this.initializeResolvers = undefined;
8692
8699
  reject(error);
8693
8700
  }, timeoutMs);
8694
- this.initializeResolvers = { resolve: resolve3, reject, timeoutId };
8701
+ this.initializeResolvers = { resolve, reject, timeoutId };
8695
8702
  this.sendWorkerMessage({
8696
8703
  type: "INIT",
8697
8704
  dataPath: this.options.dataPath,
@@ -8708,7 +8715,7 @@ class TreeSitterClient extends EventEmitter2 {
8708
8715
  this.assertCurrentInitialization(generation, worker);
8709
8716
  const overriddenFiletypes = new Set(DEFAULT_PARSER_OVERRIDES.map((parser) => parser.filetype));
8710
8717
  for (const parser of [
8711
- ...defaultParsers.filter((parser2) => !overriddenFiletypes.has(parser2.filetype)),
8718
+ ...defaultParsers.filter((parser) => !overriddenFiletypes.has(parser.filetype)),
8712
8719
  ...DEFAULT_PARSER_OVERRIDES
8713
8720
  ]) {
8714
8721
  worker.postMessage({ type: "ADD_FILETYPE_PARSER", filetypeParser: this.resolveFiletypeParser(parser) });
@@ -8742,8 +8749,8 @@ class TreeSitterClient extends EventEmitter2 {
8742
8749
  }
8743
8750
  async getPerformance() {
8744
8751
  const messageId = `performance_${this.messageIdCounter++}`;
8745
- return new Promise((resolve3, reject) => {
8746
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8752
+ return new Promise((resolve, reject) => {
8753
+ this.messageCallbacks.set(messageId, { resolve, reject });
8747
8754
  try {
8748
8755
  this.sendWorkerMessage({ type: "GET_PERFORMANCE", messageId });
8749
8756
  } catch (error) {
@@ -8761,8 +8768,8 @@ class TreeSitterClient extends EventEmitter2 {
8761
8768
  }
8762
8769
  }
8763
8770
  const messageId = `oneshot_${this.messageIdCounter++}`;
8764
- return new Promise((resolve3, reject) => {
8765
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8771
+ return new Promise((resolve, reject) => {
8772
+ this.messageCallbacks.set(messageId, { resolve, reject });
8766
8773
  try {
8767
8774
  this.sendWorkerMessage({
8768
8775
  type: "ONESHOT_HIGHLIGHT",
@@ -8885,8 +8892,8 @@ class TreeSitterClient extends EventEmitter2 {
8885
8892
  }
8886
8893
  async preloadParser(filetype) {
8887
8894
  const messageId = `has_parser_${this.messageIdCounter++}`;
8888
- const response = await new Promise((resolve3, reject) => {
8889
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8895
+ const response = await new Promise((resolve, reject) => {
8896
+ this.messageCallbacks.set(messageId, { resolve, reject });
8890
8897
  try {
8891
8898
  this.sendWorkerMessage({
8892
8899
  type: "PRELOAD_PARSER",
@@ -8918,8 +8925,8 @@ class TreeSitterClient extends EventEmitter2 {
8918
8925
  }
8919
8926
  this.buffers.set(id, { id, content, filetype, version, hasParser: false });
8920
8927
  const messageId = `init_${this.messageIdCounter++}`;
8921
- const response = await new Promise((resolve3, reject) => {
8922
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8928
+ const response = await new Promise((resolve, reject) => {
8929
+ this.messageCallbacks.set(messageId, { resolve, reject });
8923
8930
  try {
8924
8931
  this.sendWorkerMessage({
8925
8932
  type: "INITIALIZE_PARSER",
@@ -8980,9 +8987,9 @@ class TreeSitterClient extends EventEmitter2 {
8980
8987
  this.editQueues.delete(bufferId);
8981
8988
  }
8982
8989
  if (this.worker) {
8983
- await new Promise((resolve3, reject) => {
8990
+ await new Promise((resolve, reject) => {
8984
8991
  const messageId = `dispose_${bufferId}`;
8985
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8992
+ this.messageCallbacks.set(messageId, { resolve, reject });
8986
8993
  try {
8987
8994
  this.sendWorkerMessage({
8988
8995
  type: "DISPOSE_BUFFER",
@@ -8991,13 +8998,13 @@ class TreeSitterClient extends EventEmitter2 {
8991
8998
  } catch (error) {
8992
8999
  console.error("Error disposing buffer", error);
8993
9000
  this.messageCallbacks.delete(messageId);
8994
- resolve3(false);
9001
+ resolve(false);
8995
9002
  }
8996
9003
  setTimeout(() => {
8997
9004
  if (this.messageCallbacks.has(messageId)) {
8998
9005
  this.messageCallbacks.delete(messageId);
8999
9006
  console.warn({ bufferId }, "Timed out waiting for buffer to be disposed");
9000
- resolve3(false);
9007
+ resolve(false);
9001
9008
  }
9002
9009
  }, 3000);
9003
9010
  });
@@ -9010,8 +9017,8 @@ class TreeSitterClient extends EventEmitter2 {
9010
9017
  }
9011
9018
  let resolveDestroy;
9012
9019
  let rejectDestroy;
9013
- const destroyPromise = new Promise((resolve3, reject) => {
9014
- resolveDestroy = resolve3;
9020
+ const destroyPromise = new Promise((resolve, reject) => {
9021
+ resolveDestroy = resolve;
9015
9022
  rejectDestroy = reject;
9016
9023
  });
9017
9024
  this.destroyPromise = destroyPromise;
@@ -9076,13 +9083,13 @@ class TreeSitterClient extends EventEmitter2 {
9076
9083
  this.options.dataPath = dataPath;
9077
9084
  if (this.initialized && this.worker) {
9078
9085
  const messageId = `update_datapath_${this.messageIdCounter++}`;
9079
- return new Promise((resolve3, reject) => {
9086
+ return new Promise((resolve, reject) => {
9080
9087
  this.messageCallbacks.set(messageId, {
9081
9088
  resolve: (response) => {
9082
9089
  if (response.error) {
9083
9090
  reject(new Error(response.error));
9084
9091
  } else {
9085
- resolve3();
9092
+ resolve();
9086
9093
  }
9087
9094
  },
9088
9095
  reject
@@ -9105,13 +9112,13 @@ class TreeSitterClient extends EventEmitter2 {
9105
9112
  throw new Error("Cannot clear cache: client is not initialized");
9106
9113
  }
9107
9114
  const messageId = `clear_cache_${this.messageIdCounter++}`;
9108
- return new Promise((resolve3, reject) => {
9115
+ return new Promise((resolve, reject) => {
9109
9116
  this.messageCallbacks.set(messageId, {
9110
9117
  resolve: (response) => {
9111
9118
  if (response.error) {
9112
9119
  reject(new Error(response.error));
9113
9120
  } else {
9114
- resolve3();
9121
+ resolve();
9115
9122
  }
9116
9123
  },
9117
9124
  reject
@@ -9183,20 +9190,20 @@ function isValidDirectoryName(name) {
9183
9190
  }
9184
9191
 
9185
9192
  // src/lib/data-paths.ts
9186
- registerEnvVar({
9193
+ registerEnvVar2({
9187
9194
  name: "XDG_CONFIG_HOME",
9188
9195
  description: "Base directory for user-specific configuration files",
9189
9196
  type: "string",
9190
9197
  default: ""
9191
9198
  });
9192
- registerEnvVar({
9199
+ registerEnvVar2({
9193
9200
  name: "XDG_DATA_HOME",
9194
9201
  description: "Base directory for user-specific data files",
9195
9202
  type: "string",
9196
9203
  default: ""
9197
9204
  });
9198
9205
 
9199
- class DataPathsManager extends EventEmitter3 {
9206
+ class DataPathsManager2 extends EventEmitter3 {
9200
9207
  _appName;
9201
9208
  _globalConfigPath;
9202
9209
  _globalConfigFile;
@@ -9225,7 +9232,7 @@ class DataPathsManager extends EventEmitter3 {
9225
9232
  get globalConfigPath() {
9226
9233
  if (this._globalConfigPath === undefined) {
9227
9234
  const homeDir = os.homedir();
9228
- const xdgConfigHome = env.XDG_CONFIG_HOME;
9235
+ const xdgConfigHome = env2.XDG_CONFIG_HOME;
9229
9236
  const baseConfigDir = xdgConfigHome || path.join(homeDir, ".config");
9230
9237
  this._globalConfigPath = path.join(baseConfigDir, this._appName);
9231
9238
  }
@@ -9246,7 +9253,7 @@ class DataPathsManager extends EventEmitter3 {
9246
9253
  get globalDataPath() {
9247
9254
  if (this._globalDataPath === undefined) {
9248
9255
  const homeDir = os.homedir();
9249
- const xdgDataHome = env.XDG_DATA_HOME;
9256
+ const xdgDataHome = env2.XDG_DATA_HOME;
9250
9257
  const baseDataDir = xdgDataHome || path.join(homeDir, ".local/share");
9251
9258
  this._globalDataPath = path.join(baseDataDir, this._appName);
9252
9259
  }
@@ -9261,12 +9268,12 @@ class DataPathsManager extends EventEmitter3 {
9261
9268
  };
9262
9269
  }
9263
9270
  }
9264
- function getDataPaths() {
9265
- return singleton("data-paths-opentui", () => new DataPathsManager);
9271
+ function getDataPaths2() {
9272
+ return singleton("data-paths-opentui", () => new DataPathsManager2);
9266
9273
  }
9267
9274
  // src/lib/tree-sitter/resolve-ft.ts
9268
9275
  import path2 from "node:path";
9269
- var extensionToFiletype = new Map([
9276
+ var extensionToFiletype2 = new Map([
9270
9277
  ["astro", "astro"],
9271
9278
  ["bash", "bash"],
9272
9279
  ["c", "c"],
@@ -9364,7 +9371,7 @@ var extensionToFiletype = new Map([
9364
9371
  ["java", "java"],
9365
9372
  ["css", "css"]
9366
9373
  ]);
9367
- var basenameToFiletype = new Map([
9374
+ var basenameToFiletype2 = new Map([
9368
9375
  [".bash_aliases", "bash"],
9369
9376
  [".bash_logout", "bash"],
9370
9377
  [".bash_profile", "bash"],
@@ -9402,43 +9409,43 @@ function getBasename(value) {
9402
9409
  const normalizedValue = value.trim().replaceAll("\\", "/");
9403
9410
  if (!normalizedValue)
9404
9411
  return;
9405
- const basename2 = path2.posix.basename(normalizedValue).toLowerCase();
9406
- return basename2 || undefined;
9412
+ const basename = path2.posix.basename(normalizedValue).toLowerCase();
9413
+ return basename || undefined;
9407
9414
  }
9408
- function extToFiletype(extension) {
9415
+ function extToFiletype2(extension) {
9409
9416
  const normalizedExtension = normalizeFiletypeToken(extension);
9410
9417
  if (!normalizedExtension)
9411
9418
  return;
9412
- return extensionToFiletype.get(normalizedExtension);
9419
+ return extensionToFiletype2.get(normalizedExtension);
9413
9420
  }
9414
- function pathToFiletype(path3) {
9415
- if (typeof path3 !== "string")
9421
+ function pathToFiletype2(path) {
9422
+ if (typeof path !== "string")
9416
9423
  return;
9417
- const basename2 = getBasename(path3);
9418
- if (!basename2)
9424
+ const basename = getBasename(path);
9425
+ if (!basename)
9419
9426
  return;
9420
- const basenameFiletype = basenameToFiletype.get(basename2);
9427
+ const basenameFiletype = basenameToFiletype2.get(basename);
9421
9428
  if (basenameFiletype) {
9422
9429
  return basenameFiletype;
9423
9430
  }
9424
- const lastDot = basename2.lastIndexOf(".");
9425
- if (lastDot === -1 || lastDot === basename2.length - 1) {
9431
+ const lastDot = basename.lastIndexOf(".");
9432
+ if (lastDot === -1 || lastDot === basename.length - 1) {
9426
9433
  return;
9427
9434
  }
9428
- const extension = basename2.substring(lastDot + 1);
9429
- return extToFiletype(extension);
9435
+ const extension = basename.substring(lastDot + 1);
9436
+ return extToFiletype2(extension);
9430
9437
  }
9431
- function infoStringToFiletype(infoString) {
9438
+ function infoStringToFiletype2(infoString) {
9432
9439
  if (typeof infoString !== "string")
9433
9440
  return;
9434
9441
  const token = infoString.trim().split(/\s+/, 1)[0];
9435
- const directBasenameMatch = basenameToFiletype.get(token.toLowerCase());
9442
+ const directBasenameMatch = basenameToFiletype2.get(token.toLowerCase());
9436
9443
  if (directBasenameMatch)
9437
9444
  return directBasenameMatch;
9438
9445
  const normalizedToken = normalizeFiletypeToken(token);
9439
9446
  if (!normalizedToken)
9440
9447
  return;
9441
- return basenameToFiletype.get(normalizedToken) ?? pathToFiletype(normalizedToken) ?? extToFiletype(normalizedToken) ?? normalizedToken;
9448
+ return basenameToFiletype2.get(normalizedToken) ?? pathToFiletype2(normalizedToken) ?? extToFiletype2(normalizedToken) ?? normalizedToken;
9442
9449
  }
9443
9450
 
9444
9451
  // src/lib/tree-sitter/index.ts
@@ -9447,17 +9454,17 @@ var TREE_SITTER_CLIENT_LISTENER_STATE_KEY = "tree-sitter-client-listener-state";
9447
9454
  function getTreeSitterClientListenerState() {
9448
9455
  return singleton(TREE_SITTER_CLIENT_LISTENER_STATE_KEY, () => ({}));
9449
9456
  }
9450
- function getTreeSitterClient() {
9457
+ function getTreeSitterClient2() {
9451
9458
  const existingClient = getSingleton(TREE_SITTER_CLIENT_KEY);
9452
9459
  if (existingClient) {
9453
9460
  return existingClient;
9454
9461
  }
9455
- const dataPathsManager = getDataPaths();
9462
+ const dataPathsManager = getDataPaths2();
9456
9463
  const defaultOptions = {
9457
9464
  dataPath: dataPathsManager.globalDataPath
9458
9465
  };
9459
9466
  return singleton(TREE_SITTER_CLIENT_KEY, () => {
9460
- const client2 = new TreeSitterClient(defaultOptions);
9467
+ const client2 = new TreeSitterClient2(defaultOptions);
9461
9468
  const listenerState = getTreeSitterClientListenerState();
9462
9469
  const handlePathsChanged = (paths) => {
9463
9470
  client2.setDataPath(paths.globalDataPath).catch((error) => {
@@ -9479,7 +9486,7 @@ function getTreeSitterClient() {
9479
9486
  return client2;
9480
9487
  });
9481
9488
  }
9482
- async function destroyTreeSitterClient() {
9489
+ async function destroyTreeSitterClient2() {
9483
9490
  const client2 = getSingleton(TREE_SITTER_CLIENT_KEY);
9484
9491
  if (!client2) {
9485
9492
  const listenerState = getSingleton(TREE_SITTER_CLIENT_LISTENER_STATE_KEY);
@@ -9533,7 +9540,7 @@ class ExtmarksHistory {
9533
9540
  }
9534
9541
 
9535
9542
  // src/lib/extmarks.ts
9536
- class ExtmarksController {
9543
+ class ExtmarksController2 {
9537
9544
  editBuffer;
9538
9545
  editorView;
9539
9546
  extmarks = new Map;
@@ -9740,11 +9747,11 @@ class ExtmarksController {
9740
9747
  if (virtualExtmark && currentOffset === virtualExtmark.end) {
9741
9748
  const startCursor = this.offsetToPosition(virtualExtmark.start);
9742
9749
  const endCursor = this.offsetToPosition(virtualExtmark.end);
9743
- const deleteOffset2 = virtualExtmark.start;
9744
- const deleteLength2 = virtualExtmark.end - virtualExtmark.start;
9750
+ const deleteOffset = virtualExtmark.start;
9751
+ const deleteLength = virtualExtmark.end - virtualExtmark.start;
9745
9752
  this.deleteExtmarkById(virtualExtmark.id);
9746
9753
  this.originalDeleteRange(startCursor.row, startCursor.col, endCursor.row, endCursor.col);
9747
- this.adjustExtmarksAfterDeletion(deleteOffset2, deleteLength2);
9754
+ this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength);
9748
9755
  this.updateHighlights();
9749
9756
  return;
9750
9757
  }
@@ -9773,10 +9780,10 @@ class ExtmarksController {
9773
9780
  const startCursor = this.offsetToPosition(virtualExtmark.start);
9774
9781
  const endCursor = this.offsetToPosition(virtualExtmark.end);
9775
9782
  const deleteOffset = virtualExtmark.start;
9776
- const deleteLength2 = virtualExtmark.end - virtualExtmark.start;
9783
+ const deleteLength = virtualExtmark.end - virtualExtmark.start;
9777
9784
  this.deleteExtmarkById(virtualExtmark.id);
9778
9785
  this.originalDeleteRange(startCursor.row, startCursor.col, endCursor.row, endCursor.col);
9779
- this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength2);
9786
+ this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength);
9780
9787
  this.updateHighlights();
9781
9788
  return;
9782
9789
  }
@@ -10022,13 +10029,13 @@ class ExtmarksController {
10022
10029
  j++;
10023
10030
  }
10024
10031
  const chunk = text.substring(i, j);
10025
- const chunkWidth = stringWidth2(chunk);
10032
+ const chunkWidth = stringWidth(chunk);
10026
10033
  if (displayWidthSoFar + chunkWidth < offset) {
10027
10034
  displayWidthSoFar += chunkWidth;
10028
10035
  i = j;
10029
10036
  } else {
10030
10037
  for (let k = i;k < j && displayWidthSoFar < offset; k++) {
10031
- const charWidth = stringWidth2(text[k]);
10038
+ const charWidth = stringWidth(text[k]);
10032
10039
  displayWidthSoFar += charWidth;
10033
10040
  }
10034
10041
  break;
@@ -10211,12 +10218,12 @@ class ExtmarksController {
10211
10218
  this.destroyed = true;
10212
10219
  }
10213
10220
  }
10214
- function createExtmarksController(editBuffer, editorView) {
10215
- return new ExtmarksController(editBuffer, editorView);
10221
+ function createExtmarksController2(editBuffer, editorView) {
10222
+ return new ExtmarksController2(editBuffer, editorView);
10216
10223
  }
10217
10224
  // src/lib/terminal-palette.ts
10218
- var SYSTEM_CLOCK2 = new SystemClock;
10219
- registerEnvVar({
10225
+ var SYSTEM_CLOCK2 = new SystemClock2;
10226
+ registerEnvVar2({
10220
10227
  name: "OTUI_PALETTE_IDLE_TIMEOUT_MS",
10221
10228
  description: "Milliseconds of silence after palette queries before using fallback colors.",
10222
10229
  type: "number",
@@ -10241,7 +10248,7 @@ function wrapForTmux(osc) {
10241
10248
  return `\x1BPtmux;${escaped}\x1B\\`;
10242
10249
  }
10243
10250
 
10244
- class TerminalPalette {
10251
+ class TerminalPalette2 {
10245
10252
  stdin;
10246
10253
  stdout;
10247
10254
  writeFn;
@@ -10334,7 +10341,7 @@ class TerminalPalette {
10334
10341
  const out = this.stdout;
10335
10342
  if (!out.isTTY || !this.stdin.isTTY)
10336
10343
  return false;
10337
- return new Promise((resolve3) => {
10344
+ return new Promise((resolve) => {
10338
10345
  const session = this.createQuerySession();
10339
10346
  let buffer = "";
10340
10347
  let settled = false;
@@ -10343,7 +10350,7 @@ class TerminalPalette {
10343
10350
  return;
10344
10351
  settled = true;
10345
10352
  session.cleanup();
10346
- resolve3(supported);
10353
+ resolve(supported);
10347
10354
  };
10348
10355
  const onData = (chunk) => {
10349
10356
  buffer += chunk.toString();
@@ -10359,14 +10366,14 @@ class TerminalPalette {
10359
10366
  this.writeOsc("\x1B]4;0;?\x07", true);
10360
10367
  });
10361
10368
  }
10362
- async queryPalette(indices, timeoutMs = 1200, idleTimeoutMs = env.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10369
+ async queryPalette(indices, timeoutMs = 1200, idleTimeoutMs = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10363
10370
  const out = this.stdout;
10364
10371
  const results = new Map;
10365
10372
  indices.forEach((i) => results.set(i, null));
10366
10373
  if (!out.isTTY || !this.stdin.isTTY) {
10367
10374
  return results;
10368
10375
  }
10369
- return new Promise((resolve3) => {
10376
+ return new Promise((resolve) => {
10370
10377
  const session = this.createQuerySession();
10371
10378
  let buffer = "";
10372
10379
  let idleTimer = null;
@@ -10376,7 +10383,7 @@ class TerminalPalette {
10376
10383
  return;
10377
10384
  settled = true;
10378
10385
  session.cleanup();
10379
- resolve3(results);
10386
+ resolve(results);
10380
10387
  };
10381
10388
  const onData = (chunk) => {
10382
10389
  buffer += chunk.toString();
@@ -10402,7 +10409,7 @@ class TerminalPalette {
10402
10409
  idleTimer = session.resetTimer(idleTimer, finish, idleTimeoutMs);
10403
10410
  });
10404
10411
  }
10405
- async querySpecialColors(timeoutMs = 1200, idleTimeoutMs = env.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10412
+ async querySpecialColors(timeoutMs = 1200, idleTimeoutMs = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10406
10413
  const out = this.stdout;
10407
10414
  const results = {
10408
10415
  10: null,
@@ -10419,7 +10426,7 @@ class TerminalPalette {
10419
10426
  if (!out.isTTY || !this.stdin.isTTY) {
10420
10427
  return results;
10421
10428
  }
10422
- return new Promise((resolve3) => {
10429
+ return new Promise((resolve) => {
10423
10430
  const session = this.createQuerySession();
10424
10431
  let buffer = "";
10425
10432
  let idleTimer = null;
@@ -10429,7 +10436,7 @@ class TerminalPalette {
10429
10436
  return;
10430
10437
  settled = true;
10431
10438
  session.cleanup();
10432
- resolve3(results);
10439
+ resolve(results);
10433
10440
  };
10434
10441
  const onData = (chunk) => {
10435
10442
  buffer += chunk.toString();
@@ -10477,7 +10484,7 @@ class TerminalPalette {
10477
10484
  };
10478
10485
  }
10479
10486
  const indicesToQuery = [...Array(size).keys()];
10480
- const idleTimeout = env.OTUI_PALETTE_IDLE_TIMEOUT_MS;
10487
+ const idleTimeout = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS;
10481
10488
  const [paletteResults, specialColors] = await Promise.all([
10482
10489
  this.queryPalette(indicesToQuery, timeout, idleTimeout),
10483
10490
  this.querySpecialColors(timeout, idleTimeout)
@@ -10496,34 +10503,34 @@ class TerminalPalette {
10496
10503
  };
10497
10504
  }
10498
10505
  }
10499
- function createTerminalPalette(options) {
10500
- return new TerminalPalette(options);
10506
+ function createTerminalPalette2(options) {
10507
+ return new TerminalPalette2(options);
10501
10508
  }
10502
- var DEFAULT_FOREGROUND_FALLBACK = RGBA.fromInts(...DEFAULT_FOREGROUND_RGB);
10503
- var DEFAULT_BACKGROUND_FALLBACK = RGBA.fromInts(...DEFAULT_BACKGROUND_RGB);
10509
+ var DEFAULT_FOREGROUND_FALLBACK = RGBA2.fromInts(...DEFAULT_FOREGROUND_RGB2);
10510
+ var DEFAULT_BACKGROUND_FALLBACK = RGBA2.fromInts(...DEFAULT_BACKGROUND_RGB2);
10504
10511
  var fallbackAnsi256Palette = null;
10505
10512
  function getFallbackAnsi256Palette() {
10506
10513
  if (!fallbackAnsi256Palette) {
10507
10514
  fallbackAnsi256Palette = Array.from({ length: 256 }, (_, index) => {
10508
- const [r, g, b] = ansi256IndexToRgb(index);
10509
- return RGBA.fromInts(r, g, b);
10515
+ const [r, g, b] = ansi256IndexToRgb2(index);
10516
+ return RGBA2.fromInts(r, g, b);
10510
10517
  });
10511
10518
  }
10512
10519
  return fallbackAnsi256Palette;
10513
10520
  }
10514
- function normalizeTerminalPalette(colors) {
10521
+ function normalizeTerminalPalette2(colors) {
10515
10522
  const fallbackPalette = getFallbackAnsi256Palette();
10516
10523
  return {
10517
10524
  palette: Array.from({ length: 256 }, (_, index) => {
10518
10525
  const detected = colors?.palette[index];
10519
- return detected ? RGBA.fromHex(detected) : RGBA.clone(fallbackPalette[index]);
10526
+ return detected ? RGBA2.fromHex(detected) : RGBA2.clone(fallbackPalette[index]);
10520
10527
  }),
10521
- defaultForeground: colors?.defaultForeground ? RGBA.fromHex(colors.defaultForeground) : RGBA.clone(DEFAULT_FOREGROUND_FALLBACK),
10522
- defaultBackground: colors?.defaultBackground ? RGBA.fromHex(colors.defaultBackground) : RGBA.clone(DEFAULT_BACKGROUND_FALLBACK)
10528
+ defaultForeground: colors?.defaultForeground ? RGBA2.fromHex(colors.defaultForeground) : RGBA2.clone(DEFAULT_FOREGROUND_FALLBACK),
10529
+ defaultBackground: colors?.defaultBackground ? RGBA2.fromHex(colors.defaultBackground) : RGBA2.clone(DEFAULT_BACKGROUND_FALLBACK)
10523
10530
  };
10524
10531
  }
10525
- function buildTerminalPaletteSignature(colors) {
10526
- const normalized = normalizeTerminalPalette(colors);
10532
+ function buildTerminalPaletteSignature2(colors) {
10533
+ const normalized = normalizeTerminalPalette2(colors);
10527
10534
  const paletteSignature = normalized.palette.map((color) => color.toInts().join(",")).join(";");
10528
10535
  return [
10529
10536
  paletteSignature,
@@ -10533,10 +10540,10 @@ function buildTerminalPaletteSignature(colors) {
10533
10540
  }
10534
10541
  // src/lib/paste.ts
10535
10542
  var PASTE_TEXT_DECODER = new TextDecoder;
10536
- function decodePasteBytes(bytes) {
10543
+ function decodePasteBytes2(bytes) {
10537
10544
  return PASTE_TEXT_DECODER.decode(bytes);
10538
10545
  }
10539
- function stripAnsiSequences(text) {
10546
+ function stripAnsiSequences2(text) {
10540
10547
  return stripANSI(text);
10541
10548
  }
10542
10549
  // src/lib/host-clipboard.internal.ts
@@ -10635,8 +10642,8 @@ var validateClipboardText = (text, maxWriteBytes) => {
10635
10642
  var createActiveOperation = (callerSignal) => {
10636
10643
  const controller = new AbortController;
10637
10644
  let settle = () => {};
10638
- const settled = new Promise((resolve3) => {
10639
- settle = resolve3;
10645
+ const settled = new Promise((resolve) => {
10646
+ settle = resolve;
10640
10647
  });
10641
10648
  if (callerSignal) {
10642
10649
  callerSignal.addEventListener("abort", () => controller.abort(callerSignal.reason), {
@@ -10663,7 +10670,7 @@ var runTrackedOperation = (active, callerSignal, operation) => {
10663
10670
  };
10664
10671
  var createHostClipboardWithBackend = (options, createBackend) => {
10665
10672
  const config = normalizeOptions(options);
10666
- const backend2 = createBackend(config);
10673
+ const backend = createBackend(config);
10667
10674
  const active = new Set;
10668
10675
  let disposed = false;
10669
10676
  let disposePromise;
@@ -10683,7 +10690,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10683
10690
  if (config.timeoutMs === 0)
10684
10691
  return Promise.resolve({ status: "timed-out" });
10685
10692
  return runTrackedOperation(active, readOptions.signal, async (signal) => {
10686
- const result = await backend2.read({
10693
+ const result = await backend.read({
10687
10694
  preferredTypes,
10688
10695
  selection,
10689
10696
  maxBytes: config.maxReadBytes,
@@ -10709,7 +10716,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10709
10716
  return Promise.resolve({ status: "cancelled" });
10710
10717
  if (config.timeoutMs === 0)
10711
10718
  return Promise.resolve({ status: "timed-out" });
10712
- return runTrackedOperation(active, operationOptions.signal, (signal) => backend2.writeText(text, { selection, timeoutMs: config.timeoutMs, signal }));
10719
+ return runTrackedOperation(active, operationOptions.signal, (signal) => backend.writeText(text, { selection, timeoutMs: config.timeoutMs, signal }));
10713
10720
  } catch (error) {
10714
10721
  return Promise.reject(error);
10715
10722
  }
@@ -10722,7 +10729,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10722
10729
  return Promise.resolve({ status: "cancelled" });
10723
10730
  if (config.timeoutMs === 0)
10724
10731
  return Promise.resolve({ status: "timed-out" });
10725
- return runTrackedOperation(active, operationOptions.signal, (signal) => backend2.clear({ selection, timeoutMs: config.timeoutMs, signal }));
10732
+ return runTrackedOperation(active, operationOptions.signal, (signal) => backend.clear({ selection, timeoutMs: config.timeoutMs, signal }));
10726
10733
  } catch (error) {
10727
10734
  return Promise.reject(error);
10728
10735
  }
@@ -10735,7 +10742,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10735
10742
  operation.controller.abort();
10736
10743
  disposePromise = (async () => {
10737
10744
  await Promise.all([...active].map((operation) => operation.settled));
10738
- await backend2.dispose();
10745
+ await backend.dispose();
10739
10746
  })();
10740
10747
  return disposePromise;
10741
10748
  }
@@ -10766,7 +10773,7 @@ var encodeReadRequest = (preferredTypes) => {
10766
10773
  };
10767
10774
  var startFailure = (status) => ({
10768
10775
  status: "failed",
10769
- error: new Error(`Native clipboard operation failed to start (${NativeClipboardStartStatus[status]})`)
10776
+ error: new Error(`Native clipboard operation failed to start (${NativeClipboardStartStatus2[status]})`)
10770
10777
  });
10771
10778
 
10772
10779
  class NativeClipboardBackend {
@@ -10783,7 +10790,7 @@ class NativeClipboardBackend {
10783
10790
  constructor(maxImagePixels, maxConversionBytes, maxConcurrentOperations, maxProviderTransfers, waylandSeat) {
10784
10791
  this.maxImagePixels = maxImagePixels;
10785
10792
  this.maxConversionBytes = maxConversionBytes;
10786
- this.library = resolveRenderLib();
10793
+ this.library = resolveRenderLib2();
10787
10794
  const service = this.library.clipboardServiceCreate(maxConcurrentOperations, maxProviderTransfers, waylandSeat);
10788
10795
  if (!service)
10789
10796
  throw new Error("Failed to create native clipboard service");
@@ -10815,8 +10822,8 @@ class NativeClipboardBackend {
10815
10822
  if (started.status !== 0 /* Ok */ || !started.operation) {
10816
10823
  return Promise.resolve(startFailure(started.status));
10817
10824
  }
10818
- return new Promise((resolve3, reject) => {
10819
- const operation = { handle: started.operation, kind, signal, resolve: resolve3, reject };
10825
+ return new Promise((resolve, reject) => {
10826
+ const operation = { handle: started.operation, kind, signal, resolve, reject };
10820
10827
  this.pending.set(operation.handle, operation);
10821
10828
  signal.addEventListener("abort", () => this.requestCancel(operation), { once: true });
10822
10829
  this.ensureScheduled();
@@ -10889,14 +10896,14 @@ class NativeClipboardBackend {
10889
10896
  try {
10890
10897
  this.library.clipboardOperationCancel(operation.handle);
10891
10898
  } catch {}
10892
- const status2 = this.library.clipboardOperationPoll(operation.handle);
10893
- if (status2 === 0 /* Pending */) {
10899
+ const status = this.library.clipboardOperationPoll(operation.handle);
10900
+ if (status === 0 /* Pending */) {
10894
10901
  this.rotate(operation);
10895
10902
  continue;
10896
10903
  }
10897
10904
  this.providerActive = true;
10898
- const destroyed2 = this.library.clipboardOperationDestroy(operation.handle);
10899
- if (destroyed2 === 1 /* NotReady */) {
10905
+ const destroyed = this.library.clipboardOperationDestroy(operation.handle);
10906
+ if (destroyed === 1 /* NotReady */) {
10900
10907
  this.rotate(operation);
10901
10908
  continue;
10902
10909
  }
@@ -10961,7 +10968,7 @@ class NativeClipboardBackend {
10961
10968
  invalidResult(kind, status) {
10962
10969
  return {
10963
10970
  status: "failed",
10964
- error: new Error(`Native clipboard ${kind} returned inapplicable status ${NativeClipboardOperationStatus[status]}`)
10971
+ error: new Error(`Native clipboard ${kind} returned inapplicable status ${NativeClipboardOperationStatus2[status]}`)
10965
10972
  };
10966
10973
  }
10967
10974
  readRepresentation(handle) {
@@ -10993,7 +11000,7 @@ class NativeClipboardBackend {
10993
11000
  this.clearPollTimer();
10994
11001
  let status = this.library.clipboardServiceBeginShutdown(this.service);
10995
11002
  while (status === 0 /* Pending */) {
10996
- await new Promise((resolve3) => setTimeout(resolve3, SHUTDOWN_POLL_INTERVAL_MS));
11003
+ await new Promise((resolve) => setTimeout(resolve, SHUTDOWN_POLL_INTERVAL_MS));
10997
11004
  status = this.library.clipboardServicePollShutdown(this.service);
10998
11005
  }
10999
11006
  if (status !== 1 /* Ready */)
@@ -11017,13 +11024,13 @@ var validateSelection = (selection) => {
11017
11024
  }
11018
11025
  return normalized;
11019
11026
  };
11020
- var createHostClipboard = (options = {}) => createHostClipboardWithBackend(options, createNativeHostClipboardBackend);
11027
+ var createHostClipboard2 = (options = {}) => createHostClipboardWithBackend(options, createNativeHostClipboardBackend);
11021
11028
  var validateDestination = (destination) => {
11022
11029
  if (destination !== "terminal-only" && destination !== "host-only" && destination !== "best-available" && destination !== "all-available") {
11023
11030
  throw new TypeError("destination is not a supported clipboard policy");
11024
11031
  }
11025
11032
  };
11026
- var createClipboard = ({ host, terminal }) => {
11033
+ var createClipboard2 = ({ host, terminal }) => {
11027
11034
  const active = new Set;
11028
11035
  let disposed = false;
11029
11036
  let disposePromise;
@@ -11045,8 +11052,8 @@ var createClipboard = ({ host, terminal }) => {
11045
11052
  return { host: { status: "not-attempted" }, terminal: terminalOperation() };
11046
11053
  }
11047
11054
  const hostResult = await hostOperation();
11048
- const terminalResult2 = !signal.aborted && (hostResult.status === "unsupported" || hostResult.status === "failed") ? terminalOperation() : NOT_ATTEMPTED_TERMINAL;
11049
- return { host: hostResult, terminal: terminalResult2 };
11055
+ const terminalResult = !signal.aborted && (hostResult.status === "unsupported" || hostResult.status === "failed") ? terminalOperation() : NOT_ATTEMPTED_TERMINAL;
11056
+ return { host: hostResult, terminal: terminalResult };
11050
11057
  }
11051
11058
  const hostPromise = canUseRemoteHost(options) ? hostOperation() : Promise.resolve({ status: "not-attempted" });
11052
11059
  const terminalResult = terminalOperation();
@@ -11108,14 +11115,14 @@ var createClipboard = ({ host, terminal }) => {
11108
11115
  }
11109
11116
  };
11110
11117
  };
11111
- var ClipboardTarget;
11112
- ((ClipboardTarget2) => {
11113
- ClipboardTarget2[ClipboardTarget2["Clipboard"] = 0] = "Clipboard";
11114
- ClipboardTarget2[ClipboardTarget2["Primary"] = 1] = "Primary";
11115
- ClipboardTarget2[ClipboardTarget2["Select"] = 2] = "Select";
11116
- ClipboardTarget2[ClipboardTarget2["Secondary"] = 3] = "Secondary";
11117
- })(ClipboardTarget ||= {});
11118
- var createRendererClipboardAdapter = (renderer) => {
11118
+ var ClipboardTarget2;
11119
+ ((ClipboardTarget) => {
11120
+ ClipboardTarget[ClipboardTarget["Clipboard"] = 0] = "Clipboard";
11121
+ ClipboardTarget[ClipboardTarget["Primary"] = 1] = "Primary";
11122
+ ClipboardTarget[ClipboardTarget["Select"] = 2] = "Select";
11123
+ ClipboardTarget[ClipboardTarget["Secondary"] = 3] = "Secondary";
11124
+ })(ClipboardTarget2 ||= {});
11125
+ var createRendererClipboardAdapter2 = (renderer) => {
11119
11126
  const targetFor = (selection) => selection === "primary" ? 1 /* Primary */ : 0 /* Clipboard */;
11120
11127
  const capability = () => renderer.capabilities?.osc52_support ?? "unknown";
11121
11128
  return {
@@ -11143,7 +11150,7 @@ var createRendererClipboardAdapter = (renderer) => {
11143
11150
  };
11144
11151
  };
11145
11152
 
11146
- class Clipboard {
11153
+ class Clipboard2 {
11147
11154
  lib;
11148
11155
  rendererPtr;
11149
11156
  constructor(lib, rendererPtr) {
@@ -11170,44 +11177,163 @@ class Clipboard {
11170
11177
  }
11171
11178
  // src/lib/detect-links.ts
11172
11179
  var URL_SCOPES = ["markup.link.url", "string.special.url"];
11173
- function detectLinks(chunks, context) {
11180
+ var HTTP_URL_PREFIX = /https?:\/\//i;
11181
+ var BARE_URL = /https?:\/\/[^\s<>"`]+/gi;
11182
+ function normalizeMarkdownLinkTarget(destination) {
11183
+ return destination.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
11184
+ }
11185
+ function detectLinks2(chunks, context) {
11174
11186
  const content = context.content;
11175
11187
  const highlights = context.highlights;
11188
+ const hasBareUrl = HTTP_URL_PREFIX.test(content);
11189
+ if (!hasBareUrl && !highlights.some(([, , group]) => URL_SCOPES.includes(group)))
11190
+ return chunks;
11176
11191
  const ranges = [];
11192
+ const rawRanges = [];
11193
+ const labels = new Map;
11194
+ const concealedDelimiters = new Map;
11177
11195
  for (let i = 0;i < highlights.length; i++) {
11178
- const [start, end, group] = highlights[i];
11196
+ const [start, end, group, meta] = highlights[i];
11197
+ if (group === "conceal" && meta?.conceal === "" && /^[*_~]+$/.test(content.slice(start, end))) {
11198
+ concealedDelimiters.set(end, start);
11199
+ }
11200
+ if (group === "markup.raw" || group.startsWith("markup.raw.")) {
11201
+ rawRanges.push({ start, end });
11202
+ }
11203
+ if (group === "markup.link.label") {
11204
+ const existing = labels.get(end);
11205
+ if (!existing || start < existing.start)
11206
+ labels.set(end, { start, end });
11207
+ }
11179
11208
  if (!URL_SCOPES.includes(group))
11180
11209
  continue;
11181
11210
  const url = content.slice(start, end);
11211
+ if (!url)
11212
+ continue;
11182
11213
  ranges.push({ start, end, url });
11183
- for (let j = i - 1;j >= 0; j--) {
11184
- const [labelStart, labelEnd, prev] = highlights[j];
11185
- if (prev === "markup.link.label") {
11186
- ranges.push({ start: labelStart, end: labelEnd, url });
11187
- break;
11214
+ }
11215
+ const highlightedCount = ranges.length;
11216
+ for (let index = 0;index < highlightedCount; index++) {
11217
+ const range = ranges[index];
11218
+ let labelEnd = range.start;
11219
+ if (content[labelEnd - 1] === "<")
11220
+ labelEnd--;
11221
+ while (labelEnd > 0 && /\s/.test(content[labelEnd - 1]))
11222
+ labelEnd--;
11223
+ if (content[labelEnd - 1] !== "(" || content[labelEnd - 2] !== "]")
11224
+ continue;
11225
+ const label = labels.get(labelEnd - 2);
11226
+ if (!label)
11227
+ continue;
11228
+ range.url = normalizeMarkdownLinkTarget(range.url);
11229
+ ranges.push({ ...label, url: range.url, label: true });
11230
+ }
11231
+ if (hasBareUrl) {
11232
+ rawRanges.sort((a, b) => a.start - b.start || b.end - a.end);
11233
+ ranges.sort((a, b) => a.start - b.start || b.end - a.end);
11234
+ let rawIndex = 0;
11235
+ let highlightedIndex = 0;
11236
+ for (const match of content.matchAll(BARE_URL)) {
11237
+ const start = match.index;
11238
+ let url = match[0];
11239
+ let openParens = 0;
11240
+ let closeParens = 0;
11241
+ for (const character of url) {
11242
+ if (character === "(")
11243
+ openParens++;
11244
+ if (character === ")")
11245
+ closeParens++;
11188
11246
  }
11189
- if (!prev.startsWith("markup.link"))
11190
- break;
11247
+ while (url.length > 0) {
11248
+ const delimiterStart = concealedDelimiters.get(start + url.length);
11249
+ if (delimiterStart !== undefined && delimiterStart >= start) {
11250
+ url = url.slice(0, delimiterStart - start);
11251
+ continue;
11252
+ }
11253
+ const last = url[url.length - 1];
11254
+ if (last === ")" && closeParens > openParens) {
11255
+ closeParens--;
11256
+ } else if (!".,!?;:]}'".includes(last)) {
11257
+ break;
11258
+ }
11259
+ url = url.slice(0, -1);
11260
+ }
11261
+ const end = start + url.length;
11262
+ if (!url)
11263
+ continue;
11264
+ while (rawIndex < rawRanges.length && rawRanges[rawIndex].end <= start)
11265
+ rawIndex++;
11266
+ if (rawIndex < rawRanges.length && rawRanges[rawIndex].start < end)
11267
+ continue;
11268
+ while (highlightedIndex < ranges.length && ranges[highlightedIndex].end <= start)
11269
+ highlightedIndex++;
11270
+ if (highlightedIndex < ranges.length && ranges[highlightedIndex].start < end)
11271
+ continue;
11272
+ ranges.push({ start, end, url });
11191
11273
  }
11192
11274
  }
11193
11275
  if (ranges.length === 0)
11194
11276
  return chunks;
11277
+ ranges.sort((a, b) => a.start - b.start || b.end - a.end || Number(b.label ?? false) - Number(a.label ?? false));
11278
+ const linkedChunks = [];
11195
11279
  let contentPos = 0;
11196
- for (const chunk of chunks) {
11197
- if (chunk.text.length <= 1)
11280
+ let rangeIndex = 0;
11281
+ for (let index = 0;index < chunks.length; index++) {
11282
+ const chunk = chunks[index];
11283
+ if (!chunk.text || chunk.link) {
11284
+ linkedChunks.push(chunk);
11198
11285
  continue;
11199
- const idx = content.indexOf(chunk.text, contentPos);
11200
- if (idx < 0)
11286
+ }
11287
+ const providedRange = context.sourceRanges?.[index];
11288
+ const start = providedRange?.start ?? content.indexOf(chunk.text, contentPos);
11289
+ if (start < 0) {
11290
+ linkedChunks.push(chunk);
11201
11291
  continue;
11202
- for (const range of ranges) {
11203
- if (idx < range.end && idx + chunk.text.length > range.start) {
11292
+ }
11293
+ const end = providedRange?.end ?? start + chunk.text.length;
11294
+ contentPos = end;
11295
+ while (rangeIndex < ranges.length && ranges[rangeIndex].end <= start)
11296
+ rangeIndex++;
11297
+ if (content.slice(start, end) !== chunk.text) {
11298
+ const range = ranges[rangeIndex];
11299
+ if (range?.label && range.start < end)
11204
11300
  chunk.link = { url: range.url };
11301
+ linkedChunks.push(chunk);
11302
+ continue;
11303
+ }
11304
+ let position = start;
11305
+ for (;rangeIndex < ranges.length; rangeIndex++) {
11306
+ const range = ranges[rangeIndex];
11307
+ if (range.end <= position)
11308
+ continue;
11309
+ if (range.start >= end)
11205
11310
  break;
11311
+ const linkStart = Math.max(position, range.start);
11312
+ const linkEnd = Math.min(end, range.end);
11313
+ if (linkStart > position) {
11314
+ linkedChunks.push({ ...chunk, text: chunk.text.slice(position - start, linkStart - start) });
11315
+ }
11316
+ if (linkStart === start && linkEnd === end) {
11317
+ chunk.link = { url: range.url };
11318
+ linkedChunks.push(chunk);
11319
+ } else {
11320
+ linkedChunks.push({
11321
+ ...chunk,
11322
+ text: chunk.text.slice(linkStart - start, linkEnd - start),
11323
+ link: { url: range.url }
11324
+ });
11206
11325
  }
11326
+ position = linkEnd;
11327
+ if (position === end)
11328
+ break;
11329
+ }
11330
+ if (position === start) {
11331
+ linkedChunks.push(chunk);
11332
+ } else if (position < end) {
11333
+ linkedChunks.push({ ...chunk, text: chunk.text.slice(position - start) });
11207
11334
  }
11208
- contentPos = idx + chunk.text.length;
11209
11335
  }
11210
- return chunks;
11336
+ return linkedChunks;
11211
11337
  }
11212
11338
  // src/buffer.ts
11213
11339
  function requireInteger(value, name, min, max) {
@@ -11215,18 +11341,18 @@ function requireInteger(value, name, min, max) {
11215
11341
  throw new RangeError(`${name} must be an integer from ${min} to ${max}`);
11216
11342
  }
11217
11343
  }
11218
- function packDrawOptions(border2, shouldFill, titleAlignment, bottomTitleAlignment) {
11344
+ function packDrawOptions(border, shouldFill, titleAlignment, bottomTitleAlignment) {
11219
11345
  let packed = 0;
11220
- if (border2 === true) {
11346
+ if (border === true) {
11221
11347
  packed |= 15;
11222
- } else if (Array.isArray(border2)) {
11223
- if (border2.includes("top"))
11348
+ } else if (Array.isArray(border)) {
11349
+ if (border.includes("top"))
11224
11350
  packed |= 8;
11225
- if (border2.includes("right"))
11351
+ if (border.includes("right"))
11226
11352
  packed |= 4;
11227
- if (border2.includes("bottom"))
11353
+ if (border.includes("bottom"))
11228
11354
  packed |= 2;
11229
- if (border2.includes("left"))
11355
+ if (border.includes("left"))
11230
11356
  packed |= 1;
11231
11357
  }
11232
11358
  if (shouldFill) {
@@ -11244,7 +11370,7 @@ function packDrawOptions(border2, shouldFill, titleAlignment, bottomTitleAlignme
11244
11370
  return packed;
11245
11371
  }
11246
11372
 
11247
- class OptimizedBuffer {
11373
+ class OptimizedBuffer2 {
11248
11374
  static fbIdCounter = 0;
11249
11375
  id;
11250
11376
  lib;
@@ -11283,17 +11409,17 @@ class OptimizedBuffer {
11283
11409
  this.ensureRawBufferViews();
11284
11410
  return this._rawBuffers;
11285
11411
  }
11286
- constructor(lib, ptr2, width, height, options) {
11287
- this.id = options.id || `fb_${OptimizedBuffer.fbIdCounter++}`;
11412
+ constructor(lib, ptr, width, height, options) {
11413
+ this.id = options.id || `fb_${OptimizedBuffer2.fbIdCounter++}`;
11288
11414
  this.lib = lib;
11289
11415
  this.respectAlpha = options.respectAlpha || false;
11290
11416
  this._width = width;
11291
11417
  this._height = height;
11292
11418
  this._widthMethod = options.widthMethod || "unicode";
11293
- this.bufferPtr = ptr2;
11419
+ this.bufferPtr = ptr;
11294
11420
  }
11295
11421
  static create(width, height, widthMethod, options = {}) {
11296
- const lib = resolveRenderLib();
11422
+ const lib = resolveRenderLib2();
11297
11423
  const respectAlpha = options.respectAlpha || false;
11298
11424
  const id = options.id && options.id.trim() !== "" ? options.id : "unnamed buffer";
11299
11425
  const buffer = lib.createOptimizedBuffer(width, height, widthMethod, respectAlpha, id);
@@ -11326,7 +11452,7 @@ class OptimizedBuffer {
11326
11452
  }
11327
11453
  getSpanLines() {
11328
11454
  this.guard();
11329
- const { char, fg: fg2, bg: bg2, attributes } = this.buffers;
11455
+ const { char, fg, bg, attributes } = this.buffers;
11330
11456
  const lines = [];
11331
11457
  const CHAR_FLAG_CONTINUATION = 3221225472 | 0;
11332
11458
  const CHAR_FLAG_MASK = 3221225472 | 0;
@@ -11341,8 +11467,8 @@ class OptimizedBuffer {
11341
11467
  for (let x = 0;x < this._width; x++) {
11342
11468
  const i = y * this._width + x;
11343
11469
  const cp = char[i];
11344
- const cellFg = RGBA.fromArray(fg2.slice(i * 4, i * 4 + 4));
11345
- const cellBg = RGBA.fromArray(bg2.slice(i * 4, i * 4 + 4));
11470
+ const cellFg = RGBA2.fromArray(fg.slice(i * 4, i * 4 + 4));
11471
+ const cellBg = RGBA2.fromArray(bg.slice(i * 4, i * 4 + 4));
11346
11472
  const cellAttrs = attributes[i] & 255;
11347
11473
  const isContinuation = (cp & CHAR_FLAG_MASK) === CHAR_FLAG_CONTINUATION;
11348
11474
  const cellChar = isContinuation ? "" : lineChars[charIdx++] ?? " ";
@@ -11369,38 +11495,38 @@ class OptimizedBuffer {
11369
11495
  }
11370
11496
  return lines;
11371
11497
  }
11372
- clear(bg2 = RGBA.fromValues(0, 0, 0, 1)) {
11498
+ clear(bg = RGBA2.fromValues(0, 0, 0, 1)) {
11373
11499
  this.guard();
11374
- this.lib.bufferClear(this.bufferPtr, bg2);
11500
+ this.lib.bufferClear(this.bufferPtr, bg);
11375
11501
  }
11376
- setCell(x, y, char, fg2, bg2, attributes = 0) {
11502
+ setCell(x, y, char, fg, bg, attributes = 0) {
11377
11503
  this.guard();
11378
- this.lib.bufferSetCell(this.bufferPtr, x, y, char, fg2, bg2, attributes);
11504
+ this.lib.bufferSetCell(this.bufferPtr, x, y, char, fg, bg, attributes);
11379
11505
  }
11380
- setCellWithAlphaBlending(x, y, char, fg2, bg2, attributes = 0) {
11506
+ setCellWithAlphaBlending(x, y, char, fg, bg, attributes = 0) {
11381
11507
  this.guard();
11382
- this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr, x, y, char, fg2, bg2, attributes);
11508
+ this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr, x, y, char, fg, bg, attributes);
11383
11509
  }
11384
- drawText(text, x, y, fg2, bg2, attributes = 0, selection2) {
11510
+ drawText(text, x, y, fg, bg, attributes = 0, selection) {
11385
11511
  this.guard();
11386
- if (!selection2) {
11387
- this.lib.bufferDrawText(this.bufferPtr, text, x, y, fg2, bg2, attributes);
11512
+ if (!selection) {
11513
+ this.lib.bufferDrawText(this.bufferPtr, text, x, y, fg, bg, attributes);
11388
11514
  return;
11389
11515
  }
11390
- const { start, end } = selection2;
11516
+ const { start, end } = selection;
11391
11517
  let selectionBg;
11392
11518
  let selectionFg;
11393
- if (selection2.bgColor) {
11394
- selectionBg = selection2.bgColor;
11395
- selectionFg = selection2.fgColor || fg2;
11519
+ if (selection.bgColor) {
11520
+ selectionBg = selection.bgColor;
11521
+ selectionFg = selection.fgColor || fg;
11396
11522
  } else {
11397
- const defaultBg = bg2 || RGBA.fromValues(0, 0, 0, 0);
11398
- selectionFg = defaultBg.a > 0 ? defaultBg : RGBA.fromValues(0, 0, 0, 1);
11399
- selectionBg = fg2;
11523
+ const defaultBg = bg || RGBA2.fromValues(0, 0, 0, 0);
11524
+ selectionFg = defaultBg.a > 0 ? defaultBg : RGBA2.fromValues(0, 0, 0, 1);
11525
+ selectionBg = fg;
11400
11526
  }
11401
11527
  if (start > 0) {
11402
11528
  const beforeText = text.slice(0, start);
11403
- this.lib.bufferDrawText(this.bufferPtr, beforeText, x, y, fg2, bg2, attributes);
11529
+ this.lib.bufferDrawText(this.bufferPtr, beforeText, x, y, fg, bg, attributes);
11404
11530
  }
11405
11531
  if (end > start) {
11406
11532
  const selectedText = text.slice(start, end);
@@ -11408,12 +11534,12 @@ class OptimizedBuffer {
11408
11534
  }
11409
11535
  if (end < text.length) {
11410
11536
  const afterText = text.slice(end);
11411
- this.lib.bufferDrawText(this.bufferPtr, afterText, x + end, y, fg2, bg2, attributes);
11537
+ this.lib.bufferDrawText(this.bufferPtr, afterText, x + end, y, fg, bg, attributes);
11412
11538
  }
11413
11539
  }
11414
- fillRect(x, y, width, height, bg2) {
11540
+ fillRect(x, y, width, height, bg) {
11415
11541
  this.guard();
11416
- this.lib.bufferFillRect(this.bufferPtr, x, y, width, height, bg2);
11542
+ this.lib.bufferFillRect(this.bufferPtr, x, y, width, height, bg);
11417
11543
  }
11418
11544
  colorMatrix(matrix, cellMask, strength = 1, target = 3 /* Both */) {
11419
11545
  this.guard();
@@ -11474,13 +11600,13 @@ class OptimizedBuffer {
11474
11600
  this.guard();
11475
11601
  this.lib.bufferDrawPackedBuffer(this.bufferPtr, typeof data === "number" || typeof data === "bigint" ? toPointer(data) : data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells);
11476
11602
  }
11477
- drawGrayscaleBuffer(posX, posY, intensities, srcWidth, srcHeight, fg2 = null, bg2 = null) {
11603
+ drawGrayscaleBuffer(posX, posY, intensities, srcWidth, srcHeight, fg = null, bg = null) {
11478
11604
  this.guard();
11479
- this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2);
11605
+ this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg, bg);
11480
11606
  }
11481
- drawGrayscaleBufferSupersampled(posX, posY, intensities, srcWidth, srcHeight, fg2 = null, bg2 = null) {
11607
+ drawGrayscaleBufferSupersampled(posX, posY, intensities, srcWidth, srcHeight, fg = null, bg = null) {
11482
11608
  this.guard();
11483
- this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2);
11609
+ this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg, bg);
11484
11610
  }
11485
11611
  resize(width, height) {
11486
11612
  this.guard();
@@ -11493,8 +11619,8 @@ class OptimizedBuffer {
11493
11619
  }
11494
11620
  drawBox(options) {
11495
11621
  this.guard();
11496
- const style = parseBorderStyle(options.borderStyle, "single");
11497
- const borderChars = options.customBorderChars ?? BorderCharArrays[style];
11622
+ const style = parseBorderStyle2(options.borderStyle, "single");
11623
+ const borderChars = options.customBorderChars ?? BorderCharArrays2[style];
11498
11624
  const packedOptions = packDrawOptions(options.border, options.shouldFill ?? false, options.titleAlignment || "left", options.bottomTitleAlignment || "left");
11499
11625
  this.lib.bufferDrawBox(this.bufferPtr, options.x, options.y, options.width, options.height, borderChars, packedOptions, options.borderColor, options.backgroundColor, options.titleColor ?? options.borderColor, options.title ?? null, options.bottomTitle ?? null);
11500
11626
  }
@@ -11543,14 +11669,14 @@ class OptimizedBuffer {
11543
11669
  drawOuter: options.drawOuter
11544
11670
  });
11545
11671
  }
11546
- drawChar(char, x, y, fg2, bg2, attributes = 0) {
11672
+ drawChar(char, x, y, fg, bg, attributes = 0) {
11547
11673
  this.guard();
11548
- this.lib.bufferDrawChar(this.bufferPtr, char, x, y, fg2, bg2, attributes);
11674
+ this.lib.bufferDrawChar(this.bufferPtr, char, x, y, fg, bg, attributes);
11549
11675
  }
11550
11676
  }
11551
11677
 
11552
11678
  // src/text-buffer.ts
11553
- class TextBuffer {
11679
+ class TextBuffer2 {
11554
11680
  lib;
11555
11681
  bufferPtr;
11556
11682
  _length = 0;
@@ -11560,12 +11686,12 @@ class TextBuffer {
11560
11686
  _textBytes;
11561
11687
  _memId;
11562
11688
  _appendedChunks = [];
11563
- constructor(lib, ptr2) {
11689
+ constructor(lib, ptr) {
11564
11690
  this.lib = lib;
11565
- this.bufferPtr = ptr2;
11691
+ this.bufferPtr = ptr;
11566
11692
  }
11567
11693
  static create(widthMethod) {
11568
- const lib = resolveRenderLib();
11694
+ const lib = resolveRenderLib2();
11569
11695
  return lib.createTextBuffer(widthMethod);
11570
11696
  }
11571
11697
  guard() {
@@ -11593,11 +11719,11 @@ class TextBuffer {
11593
11719
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11594
11720
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11595
11721
  }
11596
- loadFile(path3) {
11722
+ loadFile(path) {
11597
11723
  this.guard();
11598
- const success = this.lib.textBufferLoadFile(this.bufferPtr, path3);
11724
+ const success = this.lib.textBufferLoadFile(this.bufferPtr, path);
11599
11725
  if (!success) {
11600
- throw new Error(`Failed to load file: ${path3}`);
11726
+ throw new Error(`Failed to load file: ${path}`);
11601
11727
  }
11602
11728
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11603
11729
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
@@ -11609,13 +11735,13 @@ class TextBuffer {
11609
11735
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11610
11736
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11611
11737
  }
11612
- setDefaultFg(fg2) {
11738
+ setDefaultFg(fg) {
11613
11739
  this.guard();
11614
- this.lib.textBufferSetDefaultFg(this.bufferPtr, fg2);
11740
+ this.lib.textBufferSetDefaultFg(this.bufferPtr, fg);
11615
11741
  }
11616
- setDefaultBg(bg2) {
11742
+ setDefaultBg(bg) {
11617
11743
  this.guard();
11618
- this.lib.textBufferSetDefaultBg(this.bufferPtr, bg2);
11744
+ this.lib.textBufferSetDefaultBg(this.bufferPtr, bg);
11619
11745
  }
11620
11746
  setDefaultAttributes(attributes) {
11621
11747
  this.guard();
@@ -11764,11 +11890,11 @@ async function loadBackend2() {
11764
11890
  function importModule(specifier) {
11765
11891
  return import(specifier).then((module) => module.default ?? module);
11766
11892
  }
11767
- function createBunBackend2(bun2) {
11893
+ function createBunBackend2(bun) {
11768
11894
  return {
11769
- ptr: bun2.ptr,
11895
+ ptr: bun.ptr,
11770
11896
  toArrayBuffer(pointer, offset, length) {
11771
- return bun2.toArrayBuffer(toBunPointer2(pointer), offset, length);
11897
+ return bun.toArrayBuffer(toBunPointer2(pointer), offset, length);
11772
11898
  }
11773
11899
  };
11774
11900
  }
@@ -11871,7 +11997,7 @@ function enumTypeError(value) {
11871
11997
  throw new TypeError(`Invalid enum value: ${value}`);
11872
11998
  }
11873
11999
  function defineEnum(mapping, base = "u32") {
11874
- const reverse2 = Object.fromEntries(Object.entries(mapping).map(([k, v]) => [v, k]));
12000
+ const reverse = Object.fromEntries(Object.entries(mapping).map(([k, v]) => [v, k]));
11875
12001
  return {
11876
12002
  __type: "enum",
11877
12003
  type: base,
@@ -11879,7 +12005,7 @@ function defineEnum(mapping, base = "u32") {
11879
12005
  return typeof value === "number" ? value : mapping[value] ?? enumTypeError(String(value));
11880
12006
  },
11881
12007
  from(value) {
11882
- return reverse2[value] ?? enumTypeError(String(value));
12008
+ return reverse[value] ?? enumTypeError(String(value));
11883
12009
  },
11884
12010
  enum: mapping
11885
12011
  };
@@ -13030,7 +13156,7 @@ function defineStruct(fields, structDefOptions) {
13030
13156
 
13031
13157
  // src/zig-structs.ts
13032
13158
  var rgbaPackTransform = (rgba) => rgba?.buffer ?? null;
13033
- var rgbaUnpackTransform = (ptr3) => ptr3 ? RGBA.fromArray(new Uint16Array(toArrayBuffer(ptr3, 0, 8))) : undefined;
13159
+ var rgbaUnpackTransform = (ptr) => ptr ? RGBA2.fromArray(new Uint16Array(toArrayBuffer(ptr, 0, 8))) : undefined;
13034
13160
  var StyledChunkStruct = defineStruct([
13035
13161
  ["text", "char*"],
13036
13162
  ["text_len", "u64", { lengthOf: "text" }],
@@ -13057,8 +13183,8 @@ var StyledChunkStruct = defineStruct([
13057
13183
  ["link_len", "u64", { lengthOf: "link" }]
13058
13184
  ], {
13059
13185
  mapValue: (chunk) => {
13060
- const normalizedFg = normalizeColorValue(chunk.fg ?? null);
13061
- const normalizedBg = normalizeColorValue(chunk.bg ?? null);
13186
+ const normalizedFg = normalizeColorValue2(chunk.fg ?? null);
13187
+ const normalizedBg = normalizeColorValue2(chunk.bg ?? null);
13062
13188
  if (!chunk.link || typeof chunk.link === "string") {
13063
13189
  return {
13064
13190
  ...chunk,
@@ -13279,11 +13405,12 @@ var ReserveInfoStruct = defineStruct([
13279
13405
  len: value.len
13280
13406
  })
13281
13407
  });
13282
- var NativeAudioStreamFormat = {
13408
+ var NativeAudioStreamFormat2 = {
13283
13409
  Mp3: 1,
13284
- Flac: 2
13410
+ Flac: 2,
13411
+ Pcm: 3
13285
13412
  };
13286
- var NativeAudioStreamState = {
13413
+ var NativeAudioStreamState2 = {
13287
13414
  Initializing: 0,
13288
13415
  Buffering: 1,
13289
13416
  Playing: 2,
@@ -13301,7 +13428,7 @@ var NativeAudioStreamStateNames = [
13301
13428
  "disposed",
13302
13429
  "reconnecting"
13303
13430
  ];
13304
- var NativeAudioStreamCloseReason = {
13431
+ var NativeAudioStreamCloseReason2 = {
13305
13432
  PreserveNativeTerminal: 0,
13306
13433
  TransportError: 1,
13307
13434
  Disposed: 2
@@ -13341,7 +13468,9 @@ var AudioStreamCreateOptionsStruct = defineStruct([
13341
13468
  ["pan", "f32"],
13342
13469
  ["groupId", "u32"],
13343
13470
  ["maxProbeBytes", "u32"],
13344
- ["format", "u32"]
13471
+ ["format", "u32"],
13472
+ ["sampleRate", "u32", { default: 0 }],
13473
+ ["channels", "u32", { default: 0 }]
13345
13474
  ]);
13346
13475
  var AudioStreamStatsStruct = defineStruct([
13347
13476
  ["bytesReceived", "u64"],
@@ -13375,64 +13504,69 @@ var AudioStatsStruct = defineStruct([
13375
13504
  ]);
13376
13505
 
13377
13506
  // src/zig.ts
13378
- var NativeAudioStreamState2 = NativeAudioStreamState;
13379
- var NativeAudioStreamCloseReason2 = NativeAudioStreamCloseReason;
13380
- var NativeAudioStreamFormat2 = NativeAudioStreamFormat;
13381
- registerEnvVar({
13507
+ var NativeAudioStreamState3 = NativeAudioStreamState2;
13508
+ var NativeAudioStreamCloseReason3 = NativeAudioStreamCloseReason2;
13509
+ var NativeAudioStreamFormat3 = NativeAudioStreamFormat2;
13510
+ var MAX_LINK_URL_BYTES2 = 512;
13511
+ function allocFFIStruct(structDefinition) {
13512
+ const storage = allocStruct(structDefinition);
13513
+ return { ...storage, ffiView: new Uint8Array(storage.buffer) };
13514
+ }
13515
+ registerEnvVar2({
13382
13516
  name: "OPENTUI_LIBC",
13383
13517
  description: "Select Linux native libc package. Supported values: glibc, musl.",
13384
13518
  type: "string",
13385
13519
  default: ""
13386
13520
  });
13387
- var NativeClipboardOperationStatus;
13388
- ((NativeClipboardOperationStatus2) => {
13389
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Pending"] = 0] = "Pending";
13390
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Read"] = 1] = "Read";
13391
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Empty"] = 2] = "Empty";
13392
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Written"] = 3] = "Written";
13393
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Cleared"] = 4] = "Cleared";
13394
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Unsupported"] = 5] = "Unsupported";
13395
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Cancelled"] = 6] = "Cancelled";
13396
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["TimedOut"] = 7] = "TimedOut";
13397
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["LimitExceeded"] = 8] = "LimitExceeded";
13398
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["Failed"] = 9] = "Failed";
13399
- NativeClipboardOperationStatus2[NativeClipboardOperationStatus2["InvalidHandle"] = 10] = "InvalidHandle";
13400
- })(NativeClipboardOperationStatus ||= {});
13401
- var NativeClipboardStartStatus;
13402
- ((NativeClipboardStartStatus2) => {
13403
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["Ok"] = 0] = "Ok";
13404
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["InvalidService"] = 1] = "InvalidService";
13405
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["ShuttingDown"] = 2] = "ShuttingDown";
13406
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["LimitExceeded"] = 3] = "LimitExceeded";
13407
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["InvalidArgument"] = 4] = "InvalidArgument";
13408
- NativeClipboardStartStatus2[NativeClipboardStartStatus2["OutOfMemory"] = 5] = "OutOfMemory";
13409
- })(NativeClipboardStartStatus ||= {});
13410
- var NativeClipboardCancelStatus;
13411
- ((NativeClipboardCancelStatus2) => {
13412
- NativeClipboardCancelStatus2[NativeClipboardCancelStatus2["Requested"] = 0] = "Requested";
13413
- NativeClipboardCancelStatus2[NativeClipboardCancelStatus2["AlreadyTerminal"] = 1] = "AlreadyTerminal";
13414
- NativeClipboardCancelStatus2[NativeClipboardCancelStatus2["InvalidHandle"] = 2] = "InvalidHandle";
13415
- })(NativeClipboardCancelStatus ||= {});
13416
- var NativeClipboardCopyStatus;
13417
- ((NativeClipboardCopyStatus2) => {
13418
- NativeClipboardCopyStatus2[NativeClipboardCopyStatus2["Ok"] = 0] = "Ok";
13419
- NativeClipboardCopyStatus2[NativeClipboardCopyStatus2["BufferTooSmall"] = 1] = "BufferTooSmall";
13420
- NativeClipboardCopyStatus2[NativeClipboardCopyStatus2["InvalidHandle"] = 2] = "InvalidHandle";
13421
- NativeClipboardCopyStatus2[NativeClipboardCopyStatus2["InvalidState"] = 3] = "InvalidState";
13422
- NativeClipboardCopyStatus2[NativeClipboardCopyStatus2["InvalidArgument"] = 4] = "InvalidArgument";
13423
- })(NativeClipboardCopyStatus ||= {});
13424
- var NativeClipboardDestroyStatus;
13425
- ((NativeClipboardDestroyStatus2) => {
13426
- NativeClipboardDestroyStatus2[NativeClipboardDestroyStatus2["Destroyed"] = 0] = "Destroyed";
13427
- NativeClipboardDestroyStatus2[NativeClipboardDestroyStatus2["NotReady"] = 1] = "NotReady";
13428
- NativeClipboardDestroyStatus2[NativeClipboardDestroyStatus2["InvalidHandle"] = 2] = "InvalidHandle";
13429
- })(NativeClipboardDestroyStatus ||= {});
13430
- var NativeClipboardShutdownStatus;
13431
- ((NativeClipboardShutdownStatus2) => {
13432
- NativeClipboardShutdownStatus2[NativeClipboardShutdownStatus2["Pending"] = 0] = "Pending";
13433
- NativeClipboardShutdownStatus2[NativeClipboardShutdownStatus2["Ready"] = 1] = "Ready";
13434
- NativeClipboardShutdownStatus2[NativeClipboardShutdownStatus2["InvalidHandle"] = 2] = "InvalidHandle";
13435
- })(NativeClipboardShutdownStatus ||= {});
13521
+ var NativeClipboardOperationStatus2;
13522
+ ((NativeClipboardOperationStatus) => {
13523
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Pending"] = 0] = "Pending";
13524
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Read"] = 1] = "Read";
13525
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Empty"] = 2] = "Empty";
13526
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Written"] = 3] = "Written";
13527
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Cleared"] = 4] = "Cleared";
13528
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Unsupported"] = 5] = "Unsupported";
13529
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Cancelled"] = 6] = "Cancelled";
13530
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["TimedOut"] = 7] = "TimedOut";
13531
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["LimitExceeded"] = 8] = "LimitExceeded";
13532
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Failed"] = 9] = "Failed";
13533
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["InvalidHandle"] = 10] = "InvalidHandle";
13534
+ })(NativeClipboardOperationStatus2 ||= {});
13535
+ var NativeClipboardStartStatus2;
13536
+ ((NativeClipboardStartStatus) => {
13537
+ NativeClipboardStartStatus[NativeClipboardStartStatus["Ok"] = 0] = "Ok";
13538
+ NativeClipboardStartStatus[NativeClipboardStartStatus["InvalidService"] = 1] = "InvalidService";
13539
+ NativeClipboardStartStatus[NativeClipboardStartStatus["ShuttingDown"] = 2] = "ShuttingDown";
13540
+ NativeClipboardStartStatus[NativeClipboardStartStatus["LimitExceeded"] = 3] = "LimitExceeded";
13541
+ NativeClipboardStartStatus[NativeClipboardStartStatus["InvalidArgument"] = 4] = "InvalidArgument";
13542
+ NativeClipboardStartStatus[NativeClipboardStartStatus["OutOfMemory"] = 5] = "OutOfMemory";
13543
+ })(NativeClipboardStartStatus2 ||= {});
13544
+ var NativeClipboardCancelStatus2;
13545
+ ((NativeClipboardCancelStatus) => {
13546
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["Requested"] = 0] = "Requested";
13547
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["AlreadyTerminal"] = 1] = "AlreadyTerminal";
13548
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["InvalidHandle"] = 2] = "InvalidHandle";
13549
+ })(NativeClipboardCancelStatus2 ||= {});
13550
+ var NativeClipboardCopyStatus2;
13551
+ ((NativeClipboardCopyStatus) => {
13552
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["Ok"] = 0] = "Ok";
13553
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["BufferTooSmall"] = 1] = "BufferTooSmall";
13554
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidHandle"] = 2] = "InvalidHandle";
13555
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidState"] = 3] = "InvalidState";
13556
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidArgument"] = 4] = "InvalidArgument";
13557
+ })(NativeClipboardCopyStatus2 ||= {});
13558
+ var NativeClipboardDestroyStatus2;
13559
+ ((NativeClipboardDestroyStatus) => {
13560
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["Destroyed"] = 0] = "Destroyed";
13561
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["NotReady"] = 1] = "NotReady";
13562
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["InvalidHandle"] = 2] = "InvalidHandle";
13563
+ })(NativeClipboardDestroyStatus2 ||= {});
13564
+ var NativeClipboardShutdownStatus2;
13565
+ ((NativeClipboardShutdownStatus) => {
13566
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["Pending"] = 0] = "Pending";
13567
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["Ready"] = 1] = "Ready";
13568
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["InvalidHandle"] = 2] = "InvalidHandle";
13569
+ })(NativeClipboardShutdownStatus2 ||= {});
13436
13570
  var targetLibPath;
13437
13571
  var targetLibError;
13438
13572
  try {
@@ -13446,43 +13580,43 @@ try {
13446
13580
  } catch (error) {
13447
13581
  targetLibError = error instanceof Error ? error : new Error(String(error));
13448
13582
  }
13449
- registerEnvVar({
13583
+ registerEnvVar2({
13450
13584
  name: "OTUI_DEBUG_FFI",
13451
13585
  description: "Enable debug logging for the FFI bindings.",
13452
13586
  type: "boolean",
13453
13587
  default: false
13454
13588
  });
13455
- registerEnvVar({
13589
+ registerEnvVar2({
13456
13590
  name: "OTUI_TRACE_FFI",
13457
13591
  description: "Enable tracing for the FFI bindings.",
13458
13592
  type: "boolean",
13459
13593
  default: false
13460
13594
  });
13461
- registerEnvVar({
13595
+ registerEnvVar2({
13462
13596
  name: "OPENTUI_FORCE_WCWIDTH",
13463
13597
  description: "Use wcwidth for character width calculations when the variable is present",
13464
13598
  type: "string",
13465
13599
  required: false
13466
13600
  });
13467
- registerEnvVar({
13601
+ registerEnvVar2({
13468
13602
  name: "OPENTUI_FORCE_UNICODE",
13469
13603
  description: "Force Mode 2026 Unicode support when the variable is present",
13470
13604
  type: "string",
13471
13605
  required: false
13472
13606
  });
13473
- registerEnvVar({
13607
+ registerEnvVar2({
13474
13608
  name: "OPENTUI_GRAPHICS",
13475
13609
  description: "Control Kitty and Sixel graphics detection with the exact value true, 1, false, or 0",
13476
13610
  type: "string",
13477
13611
  required: false
13478
13612
  });
13479
- registerEnvVar({
13613
+ registerEnvVar2({
13480
13614
  name: "OPENTUI_IMAGE_PROTOCOL",
13481
13615
  description: "Override image rendering protocol: auto, kitty, sixel, or blocks",
13482
13616
  type: "string",
13483
13617
  default: "auto"
13484
13618
  });
13485
- registerEnvVar({
13619
+ registerEnvVar2({
13486
13620
  name: "OPENTUI_FORCE_NOZWJ",
13487
13621
  description: "Use no_zwj width mode when the variable is present",
13488
13622
  type: "string",
@@ -13650,11 +13784,11 @@ function getOpenTUILib(libPath) {
13650
13784
  returns: "i32"
13651
13785
  },
13652
13786
  embeddedTerminalCursor: {
13653
- args: ["u32", "ptr"],
13787
+ args: ["u32", "buffer"],
13654
13788
  returns: "i32"
13655
13789
  },
13656
13790
  embeddedTerminalEncodeKey: {
13657
- args: ["u32", "ptr", "ptr", "u32", "ptr", "u32", "ptr", "u32", "ptr"],
13791
+ args: ["u32", "buffer", "ptr", "u32", "ptr", "u32", "ptr", "u32", "ptr"],
13658
13792
  returns: "i32"
13659
13793
  },
13660
13794
  embeddedTerminalEncodeMouse: {
@@ -13994,7 +14128,7 @@ function getOpenTUILib(libPath) {
13994
14128
  returns: "void"
13995
14129
  },
13996
14130
  bufferDrawImage: {
13997
- args: ["u32", "u32", "ptr"],
14131
+ args: ["u32", "u32", "buffer"],
13998
14132
  returns: "u8"
13999
14133
  },
14000
14134
  bufferDrawPackedBuffer: {
@@ -14010,7 +14144,7 @@ function getOpenTUILib(libPath) {
14010
14144
  returns: "void"
14011
14145
  },
14012
14146
  bufferDrawGrid: {
14013
- args: ["u32", "buffer", "buffer", "buffer", "buffer", "u32", "buffer", "u32", "ptr"],
14147
+ args: ["u32", "buffer", "buffer", "buffer", "buffer", "u32", "buffer", "u32", "buffer"],
14014
14148
  returns: "void"
14015
14149
  },
14016
14150
  bufferDrawBox: {
@@ -14377,7 +14511,7 @@ function getOpenTUILib(libPath) {
14377
14511
  returns: "void"
14378
14512
  },
14379
14513
  textBufferViewMeasureForDimensions: {
14380
- args: ["u32", "u32", "u32", "ptr"],
14514
+ args: ["u32", "u32", "u32", "buffer"],
14381
14515
  returns: "bool"
14382
14516
  },
14383
14517
  bufferDrawTextBufferView: {
@@ -14525,7 +14659,7 @@ function getOpenTUILib(libPath) {
14525
14659
  returns: "void"
14526
14660
  },
14527
14661
  editBufferGetCursorPosition: {
14528
- args: ["u32", "ptr"],
14662
+ args: ["u32", "buffer"],
14529
14663
  returns: "void"
14530
14664
  },
14531
14665
  editBufferGetId: {
@@ -14569,19 +14703,19 @@ function getOpenTUILib(libPath) {
14569
14703
  returns: "void"
14570
14704
  },
14571
14705
  editBufferGetNextWordBoundary: {
14572
- args: ["u32", "ptr"],
14706
+ args: ["u32", "buffer"],
14573
14707
  returns: "void"
14574
14708
  },
14575
14709
  editBufferGetPrevWordBoundary: {
14576
- args: ["u32", "ptr"],
14710
+ args: ["u32", "buffer"],
14577
14711
  returns: "void"
14578
14712
  },
14579
14713
  editBufferGetEOL: {
14580
- args: ["u32", "ptr"],
14714
+ args: ["u32", "buffer"],
14581
14715
  returns: "void"
14582
14716
  },
14583
14717
  editBufferOffsetToPosition: {
14584
- args: ["u32", "u32", "ptr"],
14718
+ args: ["u32", "u32", "buffer"],
14585
14719
  returns: "bool"
14586
14720
  },
14587
14721
  editBufferPositionToOffset: {
@@ -14657,7 +14791,7 @@ function getOpenTUILib(libPath) {
14657
14791
  returns: "u32"
14658
14792
  },
14659
14793
  editorViewGetVisualCursor: {
14660
- args: ["u32", "ptr"],
14794
+ args: ["u32", "buffer"],
14661
14795
  returns: "void"
14662
14796
  },
14663
14797
  editorViewMoveUpVisual: {
@@ -14677,23 +14811,23 @@ function getOpenTUILib(libPath) {
14677
14811
  returns: "void"
14678
14812
  },
14679
14813
  editorViewGetNextWordBoundary: {
14680
- args: ["u32", "ptr"],
14814
+ args: ["u32", "buffer"],
14681
14815
  returns: "void"
14682
14816
  },
14683
14817
  editorViewGetPrevWordBoundary: {
14684
- args: ["u32", "ptr"],
14818
+ args: ["u32", "buffer"],
14685
14819
  returns: "void"
14686
14820
  },
14687
14821
  editorViewGetEOL: {
14688
- args: ["u32", "ptr"],
14822
+ args: ["u32", "buffer"],
14689
14823
  returns: "void"
14690
14824
  },
14691
14825
  editorViewGetVisualSOL: {
14692
- args: ["u32", "ptr"],
14826
+ args: ["u32", "buffer"],
14693
14827
  returns: "void"
14694
14828
  },
14695
14829
  editorViewGetVisualEOL: {
14696
- args: ["u32", "ptr"],
14830
+ args: ["u32", "buffer"],
14697
14831
  returns: "void"
14698
14832
  },
14699
14833
  editorViewGotoVisualLineEnd: {
@@ -15079,7 +15213,7 @@ function getOpenTUILib(libPath) {
15079
15213
  returns: "i32"
15080
15214
  },
15081
15215
  audioCreateStream: {
15082
- args: ["u32", "ptr", "ptr"],
15216
+ args: ["u32", "buffer", "buffer"],
15083
15217
  returns: "i32"
15084
15218
  },
15085
15219
  audioWriteStream: {
@@ -15107,11 +15241,11 @@ function getOpenTUILib(libPath) {
15107
15241
  returns: "i32"
15108
15242
  },
15109
15243
  audioGetStreamStats: {
15110
- args: ["u32", "u32", "ptr"],
15244
+ args: ["u32", "u32", "buffer"],
15111
15245
  returns: "i32"
15112
15246
  },
15113
15247
  audioCloseStream: {
15114
- args: ["u32", "u32", "u32", "ptr"],
15248
+ args: ["u32", "u32", "u32", "buffer"],
15115
15249
  returns: "i32"
15116
15250
  },
15117
15251
  audioLoad: {
@@ -15211,7 +15345,7 @@ function getOpenTUILib(libPath) {
15211
15345
  returns: "void"
15212
15346
  }
15213
15347
  });
15214
- if (env.OTUI_DEBUG_FFI || env.OTUI_TRACE_FFI) {
15348
+ if (env2.OTUI_DEBUG_FFI || env2.OTUI_TRACE_FFI) {
15215
15349
  return {
15216
15350
  ...rawSymbols,
15217
15351
  symbols: convertToDebugSymbols(rawSymbols.symbols)
@@ -15223,7 +15357,7 @@ function convertToDebugSymbols(symbols) {
15223
15357
  if (!globalTraceSymbols) {
15224
15358
  globalTraceSymbols = {};
15225
15359
  }
15226
- if (env.OTUI_DEBUG_FFI && !globalFFILogPath) {
15360
+ if (env2.OTUI_DEBUG_FFI && !globalFFILogPath) {
15227
15361
  const now = new Date;
15228
15362
  const timestamp = now.toISOString().replace(/[:.]/g, "-").replace(/T/, "_").split("Z")[0];
15229
15363
  globalFFILogPath = `ffi_otui_debug_${timestamp}.log`;
@@ -15233,7 +15367,7 @@ function convertToDebugSymbols(symbols) {
15233
15367
  Object.entries(symbols).forEach(([key, value]) => {
15234
15368
  debugSymbols[key] = value;
15235
15369
  });
15236
- if (env.OTUI_DEBUG_FFI && globalFFILogPath) {
15370
+ if (env2.OTUI_DEBUG_FFI && globalFFILogPath) {
15237
15371
  const logPath = globalFFILogPath;
15238
15372
  const writeSync = (msg) => {
15239
15373
  writeFileSync(logPath, msg + `
@@ -15250,7 +15384,7 @@ function convertToDebugSymbols(symbols) {
15250
15384
  }
15251
15385
  });
15252
15386
  }
15253
- if (env.OTUI_TRACE_FFI) {
15387
+ if (env2.OTUI_TRACE_FFI) {
15254
15388
  hasTracing = true;
15255
15389
  Object.entries(symbols).forEach(([key, value]) => {
15256
15390
  if (typeof value === "function") {
@@ -15268,7 +15402,7 @@ function convertToDebugSymbols(symbols) {
15268
15402
  }
15269
15403
  });
15270
15404
  }
15271
- if ((env.OTUI_DEBUG_FFI || env.OTUI_TRACE_FFI) && !exitHandlerRegistered) {
15405
+ if ((env2.OTUI_DEBUG_FFI || env2.OTUI_TRACE_FFI) && !exitHandlerRegistered) {
15272
15406
  exitHandlerRegistered = true;
15273
15407
  process.on("exit", () => {
15274
15408
  if (globalTraceSymbols) {
@@ -15279,7 +15413,7 @@ function convertToDebugSymbols(symbols) {
15279
15413
  }
15280
15414
  const sortedTimings = [...timings].sort((a, b) => a - b);
15281
15415
  const count = sortedTimings.length;
15282
- const total = sortedTimings.reduce((acc, t2) => acc + t2, 0);
15416
+ const total = sortedTimings.reduce((acc, t) => acc + t, 0);
15283
15417
  const average = total / count;
15284
15418
  const min = sortedTimings[0];
15285
15419
  const max = sortedTimings[count - 1];
@@ -15354,13 +15488,13 @@ function convertToDebugSymbols(symbols) {
15354
15488
  return debugSymbols;
15355
15489
  }
15356
15490
  var LogLevel2;
15357
- ((LogLevel3) => {
15358
- LogLevel3[LogLevel3["Error"] = 0] = "Error";
15359
- LogLevel3[LogLevel3["Warn"] = 1] = "Warn";
15360
- LogLevel3[LogLevel3["Info"] = 2] = "Info";
15361
- LogLevel3[LogLevel3["Debug"] = 3] = "Debug";
15491
+ ((LogLevel) => {
15492
+ LogLevel[LogLevel["Error"] = 0] = "Error";
15493
+ LogLevel[LogLevel["Warn"] = 1] = "Warn";
15494
+ LogLevel[LogLevel["Info"] = 2] = "Info";
15495
+ LogLevel[LogLevel["Debug"] = 3] = "Debug";
15362
15496
  })(LogLevel2 ||= {});
15363
- var NativeMeasureTargetKind = {
15497
+ var NativeMeasureTargetKind2 = {
15364
15498
  None: 0,
15365
15499
  TextBufferView: 1,
15366
15500
  EditorView: 2
@@ -15372,11 +15506,11 @@ class FFIRenderLib {
15372
15506
  yogaLayout = new Float32Array(6);
15373
15507
  ffiStructStorage = {
15374
15508
  logicalCursor: {
15375
- ...allocStruct(LogicalCursorStruct),
15509
+ ...allocFFIStruct(LogicalCursorStruct),
15376
15510
  result: { row: 0, col: 0, offset: 0 }
15377
15511
  },
15378
15512
  visualCursor: {
15379
- ...allocStruct(VisualCursorStruct),
15513
+ ...allocFFIStruct(VisualCursorStruct),
15380
15514
  result: {
15381
15515
  visualRow: 0,
15382
15516
  visualCol: 0,
@@ -15386,13 +15520,13 @@ class FFIRenderLib {
15386
15520
  }
15387
15521
  },
15388
15522
  measureResult: {
15389
- ...allocStruct(MeasureResultStruct),
15523
+ ...allocFFIStruct(MeasureResultStruct),
15390
15524
  result: { lineCount: 0, widthColsMax: 0 }
15391
15525
  },
15392
- embeddedTerminalCursor: allocStruct(EmbeddedTerminalCursorStruct),
15393
- embeddedTerminalKeyOptions: allocStruct(EmbeddedTerminalKeyOptionsStruct),
15526
+ embeddedTerminalCursor: allocFFIStruct(EmbeddedTerminalCursorStruct),
15527
+ embeddedTerminalKeyOptions: allocFFIStruct(EmbeddedTerminalKeyOptionsStruct),
15394
15528
  audioStreamStats: {
15395
- ...allocStruct(AudioStreamStatsStruct),
15529
+ ...allocFFIStruct(AudioStreamStatsStruct),
15396
15530
  result: {
15397
15531
  bytesReceived: 0n,
15398
15532
  framesDecoded: 0n,
@@ -15407,8 +15541,8 @@ class FFIRenderLib {
15407
15541
  readyGeneration: 0
15408
15542
  }
15409
15543
  },
15410
- imageDrawOptions: allocStruct(ImageDrawOptionsStruct),
15411
- gridDrawOptions: allocStruct(GridDrawOptionsStruct)
15544
+ imageDrawOptions: allocFFIStruct(ImageDrawOptionsStruct),
15545
+ gridDrawOptions: allocFFIStruct(GridDrawOptionsStruct)
15412
15546
  };
15413
15547
  disposed = false;
15414
15548
  clipboardServices = new Set;
@@ -15471,7 +15605,7 @@ class FFIRenderLib {
15471
15605
  }
15472
15606
  embeddedTerminalGetSelectedText(handle) {
15473
15607
  const required = new Uint32Array(1);
15474
- const read = (output2) => this.opentui.symbols.embeddedTerminalGetSelectedText(handle, viewOrNull(output2), output2.byteLength, required);
15608
+ const read = (output) => this.opentui.symbols.embeddedTerminalGetSelectedText(handle, viewOrNull(output), output.byteLength, required);
15475
15609
  const initial = new Uint8Array(256);
15476
15610
  const status = read(initial);
15477
15611
  if (status >= 0)
@@ -15487,7 +15621,7 @@ class FFIRenderLib {
15487
15621
  }
15488
15622
  embeddedTerminalCursor(handle) {
15489
15623
  const storage = this.ffiStructStorage.embeddedTerminalCursor;
15490
- embeddedTerminalResult(this.opentui.symbols.embeddedTerminalCursor(handle, storage.buffer), "cursor query");
15624
+ embeddedTerminalResult(this.opentui.symbols.embeddedTerminalCursor(handle, storage.ffiView), "cursor query");
15491
15625
  const result = EmbeddedTerminalCursorStruct.unpack(storage.buffer);
15492
15626
  return {
15493
15627
  x: result.x,
@@ -15515,7 +15649,7 @@ class FFIRenderLib {
15515
15649
  const text = key.text ? this.encoder.encode(key.text) : new Uint8Array;
15516
15650
  const textLength = toSafeFFIU32Length(text.byteLength, "Embedded terminal key text length");
15517
15651
  const required = new Uint32Array(1);
15518
- const encode = (output2) => this.opentui.symbols.embeddedTerminalEncodeKey(handle, options.buffer, keyCodeLength === 0 ? null : keyCode, keyCodeLength, textLength === 0 ? null : text, textLength, output2, output2.byteLength, required);
15652
+ const encode = (output) => this.opentui.symbols.embeddedTerminalEncodeKey(handle, options.ffiView, keyCodeLength === 0 ? null : keyCode, keyCodeLength, textLength === 0 ? null : text, textLength, output, output.byteLength, required);
15519
15653
  const initial = new Uint8Array(Math.max(64, textLength));
15520
15654
  const status = encode(initial);
15521
15655
  if (status >= 0)
@@ -15777,7 +15911,7 @@ class FFIRenderLib {
15777
15911
  const width = this.opentui.symbols.getBufferWidth(bufferPtr);
15778
15912
  const height = this.opentui.symbols.getBufferHeight(bufferPtr);
15779
15913
  const widthMethod = widthMethodFromCode(this.opentui.symbols.getBufferWidthMethod(bufferPtr));
15780
- return new OptimizedBuffer(this, bufferPtr, width, height, { id: "next buffer", widthMethod });
15914
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { id: "next buffer", widthMethod });
15781
15915
  }
15782
15916
  getCurrentBuffer(renderer) {
15783
15917
  const bufferPtr = this.opentui.symbols.getCurrentBuffer(renderer);
@@ -15787,7 +15921,7 @@ class FFIRenderLib {
15787
15921
  const width = this.opentui.symbols.getBufferWidth(bufferPtr);
15788
15922
  const height = this.opentui.symbols.getBufferHeight(bufferPtr);
15789
15923
  const widthMethod = widthMethodFromCode(this.opentui.symbols.getBufferWidthMethod(bufferPtr));
15790
- return new OptimizedBuffer(this, bufferPtr, width, height, { id: "current buffer", widthMethod });
15924
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { id: "current buffer", widthMethod });
15791
15925
  }
15792
15926
  rendererSetPaletteState(renderer, palette, defaultForeground, defaultBackground, paletteEpoch) {
15793
15927
  const paletteBuffer = new Uint16Array(palette.length * 4);
@@ -15797,32 +15931,32 @@ class FFIRenderLib {
15797
15931
  this.opentui.symbols.rendererSetPaletteState(renderer, paletteBuffer, palette.length, rgbaBuffer(defaultForeground), rgbaBuffer(defaultBackground), paletteEpoch >>> 0);
15798
15932
  }
15799
15933
  bufferGetCharPtr(buffer) {
15800
- const ptr3 = this.opentui.symbols.bufferGetCharPtr(buffer);
15801
- if (!ptr3) {
15934
+ const ptr = this.opentui.symbols.bufferGetCharPtr(buffer);
15935
+ if (!ptr) {
15802
15936
  throw new Error("Failed to get char pointer");
15803
15937
  }
15804
- return ptr3;
15938
+ return ptr;
15805
15939
  }
15806
15940
  bufferGetFgPtr(buffer) {
15807
- const ptr3 = this.opentui.symbols.bufferGetFgPtr(buffer);
15808
- if (!ptr3) {
15941
+ const ptr = this.opentui.symbols.bufferGetFgPtr(buffer);
15942
+ if (!ptr) {
15809
15943
  throw new Error("Failed to get fg pointer");
15810
15944
  }
15811
- return ptr3;
15945
+ return ptr;
15812
15946
  }
15813
15947
  bufferGetBgPtr(buffer) {
15814
- const ptr3 = this.opentui.symbols.bufferGetBgPtr(buffer);
15815
- if (!ptr3) {
15948
+ const ptr = this.opentui.symbols.bufferGetBgPtr(buffer);
15949
+ if (!ptr) {
15816
15950
  throw new Error("Failed to get bg pointer");
15817
15951
  }
15818
- return ptr3;
15952
+ return ptr;
15819
15953
  }
15820
15954
  bufferGetAttributesPtr(buffer) {
15821
- const ptr3 = this.opentui.symbols.bufferGetAttributesPtr(buffer);
15822
- if (!ptr3) {
15955
+ const ptr = this.opentui.symbols.bufferGetAttributesPtr(buffer);
15956
+ if (!ptr) {
15823
15957
  throw new Error("Failed to get attributes pointer");
15824
15958
  }
15825
- return ptr3;
15959
+ return ptr;
15826
15960
  }
15827
15961
  bufferGetRespectAlpha(buffer) {
15828
15962
  return this.opentui.symbols.bufferGetRespectAlpha(buffer);
@@ -15853,25 +15987,25 @@ class FFIRenderLib {
15853
15987
  }
15854
15988
  bufferDrawText(buffer, text, x, y, color, bgColor, attributes) {
15855
15989
  const textBytes = this.encoder.encode(text);
15856
- const bg2 = optionalRgbaBuffer(bgColor);
15857
- const fg2 = rgbaBuffer(color);
15858
- this.opentui.symbols.bufferDrawText(buffer, viewOrNull(textBytes), textBytes.byteLength, x, y, fg2, bg2, attributes ?? 0);
15990
+ const bg = optionalRgbaBuffer(bgColor);
15991
+ const fg = rgbaBuffer(color);
15992
+ this.opentui.symbols.bufferDrawText(buffer, viewOrNull(textBytes), textBytes.byteLength, x, y, fg, bg, attributes ?? 0);
15859
15993
  }
15860
15994
  bufferSetCellWithAlphaBlending(buffer, x, y, char, color, bgColor, attributes) {
15861
15995
  const charPtr = char.codePointAt(0) ?? " ".codePointAt(0);
15862
- const bg2 = rgbaBuffer(bgColor);
15863
- const fg2 = rgbaBuffer(color);
15864
- this.opentui.symbols.bufferSetCellWithAlphaBlending(buffer, x, y, charPtr, fg2, bg2, attributes ?? 0);
15996
+ const bg = rgbaBuffer(bgColor);
15997
+ const fg = rgbaBuffer(color);
15998
+ this.opentui.symbols.bufferSetCellWithAlphaBlending(buffer, x, y, charPtr, fg, bg, attributes ?? 0);
15865
15999
  }
15866
16000
  bufferSetCell(buffer, x, y, char, color, bgColor, attributes) {
15867
16001
  const charPtr = char.codePointAt(0) ?? " ".codePointAt(0);
15868
- const bg2 = rgbaBuffer(bgColor);
15869
- const fg2 = rgbaBuffer(color);
15870
- this.opentui.symbols.bufferSetCell(buffer, x, y, charPtr, fg2, bg2, attributes ?? 0);
16002
+ const bg = rgbaBuffer(bgColor);
16003
+ const fg = rgbaBuffer(color);
16004
+ this.opentui.symbols.bufferSetCell(buffer, x, y, charPtr, fg, bg, attributes ?? 0);
15871
16005
  }
15872
16006
  bufferFillRect(buffer, x, y, width, height, color) {
15873
- const bg2 = rgbaBuffer(color);
15874
- this.opentui.symbols.bufferFillRect(buffer, x, y, width, height, bg2);
16007
+ const bg = rgbaBuffer(color);
16008
+ this.opentui.symbols.bufferFillRect(buffer, x, y, width, height, bg);
15875
16009
  }
15876
16010
  bufferColorMatrix(buffer, matrix, cellMask, cellMaskCount, strength, target) {
15877
16011
  this.opentui.symbols.bufferColorMatrix(buffer, matrix, cellMask, cellMaskCount, strength, target);
@@ -15899,20 +16033,20 @@ class FFIRenderLib {
15899
16033
  sourceHeight,
15900
16034
  protocol: protocolId
15901
16035
  }, storage.view, 0);
15902
- return Boolean(this.opentui.symbols.bufferDrawImage(buffer, image, storage.buffer));
16036
+ return Boolean(this.opentui.symbols.bufferDrawImage(buffer, image, storage.ffiView));
15903
16037
  }
15904
16038
  bufferDrawPackedBuffer(buffer, data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells) {
15905
16039
  this.opentui.symbols.bufferDrawPackedBuffer(buffer, data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells);
15906
16040
  }
15907
- bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2) {
15908
- this.opentui.symbols.bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg2), optionalRgbaBuffer(bg2));
16041
+ bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, fg, bg) {
16042
+ this.opentui.symbols.bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg), optionalRgbaBuffer(bg));
15909
16043
  }
15910
- bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2) {
15911
- this.opentui.symbols.bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg2), optionalRgbaBuffer(bg2));
16044
+ bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, fg, bg) {
16045
+ this.opentui.symbols.bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg), optionalRgbaBuffer(bg));
15912
16046
  }
15913
16047
  bufferDrawGrid(buffer, borderChars, borderFg, borderBg, columnOffsets, columnCount, rowOffsets, rowCount, options) {
15914
16048
  GridDrawOptionsStruct.packInto({ drawInner: options.drawInner, drawOuter: options.drawOuter }, this.ffiStructStorage.gridDrawOptions.view, 0);
15915
- this.opentui.symbols.bufferDrawGrid(buffer, borderChars, rgbaBuffer(borderFg), rgbaBuffer(borderBg), columnOffsets, columnCount, rowOffsets, rowCount, this.ffiStructStorage.gridDrawOptions.buffer);
16049
+ this.opentui.symbols.bufferDrawGrid(buffer, borderChars, rgbaBuffer(borderFg), rgbaBuffer(borderBg), columnOffsets, columnCount, rowOffsets, rowCount, this.ffiStructStorage.gridDrawOptions.ffiView);
15916
16050
  }
15917
16051
  bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, titleColor, title, bottomTitle) {
15918
16052
  const titleBytes = title ? this.encoder.encode(title) : null;
@@ -15930,7 +16064,7 @@ class FFIRenderLib {
15930
16064
  const urlBytes = this.encoder.encode(url);
15931
16065
  return this.opentui.symbols.linkAlloc(viewOrNull(urlBytes), urlBytes.byteLength);
15932
16066
  }
15933
- linkGetUrl(linkId, maxLen = 512) {
16067
+ linkGetUrl(linkId, maxLen = MAX_LINK_URL_BYTES2) {
15934
16068
  const outBuffer = new Uint8Array(maxLen);
15935
16069
  const actualLen = this.opentui.symbols.linkGetUrl(linkId, viewOrNull(outBuffer), maxLen);
15936
16070
  return this.decoder.decode(outBuffer.slice(0, actualLen));
@@ -15960,7 +16094,7 @@ class FFIRenderLib {
15960
16094
  visible: struct.visible,
15961
16095
  style: CURSOR_ID_TO_STYLE[struct.style] ?? "block",
15962
16096
  blinking: struct.blinking,
15963
- color: RGBA.fromValues(struct.r, struct.g, struct.b, struct.a)
16097
+ color: RGBA2.fromValues(struct.r, struct.g, struct.b, struct.a)
15964
16098
  };
15965
16099
  }
15966
16100
  setCursorStyleOptions(renderer, options) {
@@ -15997,7 +16131,7 @@ class FFIRenderLib {
15997
16131
  if (!bufferPtr) {
15998
16132
  throw new Error(`Failed to create optimized buffer: ${width}x${height}`);
15999
16133
  }
16000
- return new OptimizedBuffer(this, bufferPtr, width, height, { respectAlpha, id, widthMethod });
16134
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { respectAlpha, id, widthMethod });
16001
16135
  }
16002
16136
  destroyOptimizedBuffer(bufferPtr) {
16003
16137
  this.opentui.symbols.destroyOptimizedBuffer(bufferPtr);
@@ -16065,19 +16199,19 @@ class FFIRenderLib {
16065
16199
  operation: output[0] === 0 ? null : output[0]
16066
16200
  };
16067
16201
  }
16068
- clipboardReadOperationStart(service, request, selection2, maxBytes, maxImagePixels, maxConversionBytes, timeoutMs) {
16202
+ clipboardReadOperationStart(service, request, selection, maxBytes, maxImagePixels, maxConversionBytes, timeoutMs) {
16069
16203
  const output = new Uint32Array(1);
16070
- const status = this.opentui.symbols.clipboardReadOperationStart(service, request, toSafeFFIU32Length(request.byteLength, "clipboard read request"), selection2, toSafeFFIU32Length(maxBytes, "clipboard read byte limit"), toSafeFFIU32Length(maxImagePixels, "clipboard image pixel limit"), toSafeFFIU32Length(maxConversionBytes, "clipboard conversion byte limit"), toSafeFFIU32Length(timeoutMs, "clipboard read timeout"), output);
16204
+ const status = this.opentui.symbols.clipboardReadOperationStart(service, request, toSafeFFIU32Length(request.byteLength, "clipboard read request"), selection, toSafeFFIU32Length(maxBytes, "clipboard read byte limit"), toSafeFFIU32Length(maxImagePixels, "clipboard image pixel limit"), toSafeFFIU32Length(maxConversionBytes, "clipboard conversion byte limit"), toSafeFFIU32Length(timeoutMs, "clipboard read timeout"), output);
16071
16205
  return this.clipboardStartResult(status, output);
16072
16206
  }
16073
- clipboardWriteOperationStart(service, textUtf8, selection2, timeoutMs) {
16207
+ clipboardWriteOperationStart(service, textUtf8, selection, timeoutMs) {
16074
16208
  const output = new Uint32Array(1);
16075
- const status = this.opentui.symbols.clipboardWriteOperationStart(service, textUtf8, toSafeFFIU32Length(textUtf8.byteLength, "clipboard write text"), selection2, toSafeFFIU32Length(timeoutMs, "clipboard write timeout"), output);
16209
+ const status = this.opentui.symbols.clipboardWriteOperationStart(service, textUtf8, toSafeFFIU32Length(textUtf8.byteLength, "clipboard write text"), selection, toSafeFFIU32Length(timeoutMs, "clipboard write timeout"), output);
16076
16210
  return this.clipboardStartResult(status, output);
16077
16211
  }
16078
- clipboardClearOperationStart(service, selection2, timeoutMs) {
16212
+ clipboardClearOperationStart(service, selection, timeoutMs) {
16079
16213
  const output = new Uint32Array(1);
16080
- const status = this.opentui.symbols.clipboardClearOperationStart(service, selection2, toSafeFFIU32Length(timeoutMs, "clipboard clear timeout"), output);
16214
+ const status = this.opentui.symbols.clipboardClearOperationStart(service, selection, toSafeFFIU32Length(timeoutMs, "clipboard clear timeout"), output);
16081
16215
  return this.clipboardStartResult(status, output);
16082
16216
  }
16083
16217
  clipboardOperationPoll(operation) {
@@ -16334,8 +16468,8 @@ class FFIRenderLib {
16334
16468
  yogaNodeStyleGetFloat(node, kind) {
16335
16469
  return this.opentui.symbols.yogaNodeStyleGetFloat(node, kind);
16336
16470
  }
16337
- yogaNodeStyleSetBorder(node, edge, border2) {
16338
- this.opentui.symbols.yogaNodeStyleSetBorder(node, edge, border2);
16471
+ yogaNodeStyleSetBorder(node, edge, border) {
16472
+ this.opentui.symbols.yogaNodeStyleSetBorder(node, edge, border);
16339
16473
  }
16340
16474
  yogaNodeStyleGetBorder(node, edge) {
16341
16475
  return this.opentui.symbols.yogaNodeStyleGetBorder(node, edge);
@@ -16387,7 +16521,7 @@ class FFIRenderLib {
16387
16521
  if (!bufferPtr) {
16388
16522
  throw new Error(`Failed to create TextBuffer`);
16389
16523
  }
16390
- return new TextBuffer(this, bufferPtr);
16524
+ return new TextBuffer2(this, bufferPtr);
16391
16525
  }
16392
16526
  destroyTextBuffer(buffer) {
16393
16527
  this.opentui.symbols.destroyTextBuffer(buffer);
@@ -16404,12 +16538,12 @@ class FFIRenderLib {
16404
16538
  textBufferClear(buffer) {
16405
16539
  this.opentui.symbols.textBufferClear(buffer);
16406
16540
  }
16407
- textBufferSetDefaultFg(buffer, fg2) {
16408
- const fgBuffer = optionalRgbaBuffer(fg2);
16541
+ textBufferSetDefaultFg(buffer, fg) {
16542
+ const fgBuffer = optionalRgbaBuffer(fg);
16409
16543
  this.opentui.symbols.textBufferSetDefaultFg(buffer, fgBuffer);
16410
16544
  }
16411
- textBufferSetDefaultBg(buffer, bg2) {
16412
- const bgBuffer = optionalRgbaBuffer(bg2);
16545
+ textBufferSetDefaultBg(buffer, bg) {
16546
+ const bgBuffer = optionalRgbaBuffer(bg);
16413
16547
  this.opentui.symbols.textBufferSetDefaultBg(buffer, bgBuffer);
16414
16548
  }
16415
16549
  textBufferSetDefaultAttributes(buffer, attributes) {
@@ -16447,8 +16581,8 @@ class FFIRenderLib {
16447
16581
  textBufferAppendFromMemId(buffer, memId) {
16448
16582
  this.opentui.symbols.textBufferAppendFromMemId(buffer, memId);
16449
16583
  }
16450
- textBufferLoadFile(buffer, path3) {
16451
- const pathBytes = this.encoder.encode(path3);
16584
+ textBufferLoadFile(buffer, path) {
16585
+ const pathBytes = this.encoder.encode(path);
16452
16586
  return this.opentui.symbols.textBufferLoadFile(buffer, viewOrNull(pathBytes), pathBytes.byteLength);
16453
16587
  }
16454
16588
  textBufferSetStyledText(buffer, chunks) {
@@ -16502,39 +16636,39 @@ class FFIRenderLib {
16502
16636
  this.opentui.symbols.destroyTextBufferView(view);
16503
16637
  }
16504
16638
  textBufferViewSetSelection(view, start, end, bgColor, fgColor) {
16505
- const bg2 = optionalRgbaBuffer(bgColor);
16506
- const fg2 = optionalRgbaBuffer(fgColor);
16507
- this.opentui.symbols.textBufferViewSetSelection(view, start, end, bg2, fg2);
16639
+ const bg = optionalRgbaBuffer(bgColor);
16640
+ const fg = optionalRgbaBuffer(fgColor);
16641
+ this.opentui.symbols.textBufferViewSetSelection(view, start, end, bg, fg);
16508
16642
  }
16509
16643
  textBufferViewResetSelection(view) {
16510
16644
  this.opentui.symbols.textBufferViewResetSelection(view);
16511
16645
  }
16512
16646
  textBufferViewGetSelection(view) {
16513
16647
  const packedInfo = this.textBufferViewGetSelectionInfo(view);
16514
- if (packedInfo === 0xffff_ffff_ffff_ffffn) {
16648
+ if (packedInfo === 0xffffffffffffffffn) {
16515
16649
  return null;
16516
16650
  }
16517
16651
  const start = Number(packedInfo >> 32n);
16518
- const end = Number(packedInfo & 0xffff_ffffn);
16652
+ const end = Number(packedInfo & 0xffffffffn);
16519
16653
  return { start, end };
16520
16654
  }
16521
16655
  textBufferViewGetSelectionInfo(view) {
16522
16656
  return this.opentui.symbols.textBufferViewGetSelectionInfo(view);
16523
16657
  }
16524
16658
  textBufferViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bgColor, fgColor, behavior) {
16525
- const bg2 = optionalRgbaBuffer(bgColor);
16526
- const fg2 = optionalRgbaBuffer(fgColor);
16527
- return Boolean(this.opentui.symbols.textBufferViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg2, fg2, selectionBehaviorByte(behavior)));
16659
+ const bg = optionalRgbaBuffer(bgColor);
16660
+ const fg = optionalRgbaBuffer(fgColor);
16661
+ return Boolean(this.opentui.symbols.textBufferViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, selectionBehaviorByte(behavior)));
16528
16662
  }
16529
16663
  textBufferViewUpdateSelection(view, end, bgColor, fgColor) {
16530
- const bg2 = optionalRgbaBuffer(bgColor);
16531
- const fg2 = optionalRgbaBuffer(fgColor);
16532
- this.opentui.symbols.textBufferViewUpdateSelection(view, end, bg2, fg2);
16664
+ const bg = optionalRgbaBuffer(bgColor);
16665
+ const fg = optionalRgbaBuffer(fgColor);
16666
+ this.opentui.symbols.textBufferViewUpdateSelection(view, end, bg, fg);
16533
16667
  }
16534
16668
  textBufferViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bgColor, fgColor, behavior) {
16535
- const bg2 = optionalRgbaBuffer(bgColor);
16536
- const fg2 = optionalRgbaBuffer(fgColor);
16537
- return Boolean(this.opentui.symbols.textBufferViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg2, fg2, selectionBehaviorByte(behavior)));
16669
+ const bg = optionalRgbaBuffer(bgColor);
16670
+ const fg = optionalRgbaBuffer(fgColor);
16671
+ return Boolean(this.opentui.symbols.textBufferViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, selectionBehaviorByte(behavior)));
16538
16672
  }
16539
16673
  textBufferViewResetLocalSelection(view) {
16540
16674
  this.opentui.symbols.textBufferViewResetLocalSelection(view);
@@ -16594,6 +16728,20 @@ class FFIRenderLib {
16594
16728
  textBufferViewGetVirtualLineCount(view) {
16595
16729
  return this.opentui.symbols.textBufferViewGetVirtualLineCount(view);
16596
16730
  }
16731
+ textBufferViewGetLineSources(view, startLine, lineCount) {
16732
+ toSafeFFIU32Length(startLine, "visual row start");
16733
+ toSafeFFIU32Length(lineCount, "visual row count");
16734
+ if (lineCount === 0)
16735
+ return [];
16736
+ const outBuffer = new ArrayBuffer(LineInfoStruct.size);
16737
+ this.textBufferViewGetLogicalLineInfoDirect(view, outBuffer);
16738
+ const data = new DataView(outBuffer);
16739
+ const sources = LineInfoStruct.arrayFields.get("sources");
16740
+ const count = Math.max(0, Math.min(lineCount, data.getUint32(sources.lengthOffset, true) - startLine));
16741
+ if (count === 0)
16742
+ return [];
16743
+ return Array.from(new Uint32Array(toArrayBuffer(toPointer(data.getBigUint64(sources.arrayOffset, true)), startLine * 4, count * 4)));
16744
+ }
16597
16745
  textBufferViewGetLineInfoDirect(view, outBuffer) {
16598
16746
  this.opentui.symbols.textBufferViewGetLineInfoDirect(view, outBuffer);
16599
16747
  }
@@ -16633,7 +16781,7 @@ class FFIRenderLib {
16633
16781
  }
16634
16782
  textBufferViewMeasureForDimensions(view, width, height) {
16635
16783
  const storage = this.ffiStructStorage.measureResult;
16636
- const success = this.opentui.symbols.textBufferViewMeasureForDimensions(view, width, height, storage.buffer);
16784
+ const success = this.opentui.symbols.textBufferViewMeasureForDimensions(view, width, height, storage.ffiView);
16637
16785
  if (!success)
16638
16786
  return null;
16639
16787
  const result = MeasureResultStruct.unpackInto(storage.view, storage.result);
@@ -16863,7 +17011,7 @@ class FFIRenderLib {
16863
17011
  }
16864
17012
  editBufferGetCursorPosition(buffer) {
16865
17013
  const storage = this.ffiStructStorage.logicalCursor;
16866
- this.opentui.symbols.editBufferGetCursorPosition(buffer, storage.buffer);
17014
+ this.opentui.symbols.editBufferGetCursorPosition(buffer, storage.ffiView);
16867
17015
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16868
17016
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16869
17017
  }
@@ -16913,25 +17061,25 @@ class FFIRenderLib {
16913
17061
  }
16914
17062
  editBufferGetNextWordBoundary(buffer) {
16915
17063
  const storage = this.ffiStructStorage.logicalCursor;
16916
- this.opentui.symbols.editBufferGetNextWordBoundary(buffer, storage.buffer);
17064
+ this.opentui.symbols.editBufferGetNextWordBoundary(buffer, storage.ffiView);
16917
17065
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16918
17066
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16919
17067
  }
16920
17068
  editBufferGetPrevWordBoundary(buffer) {
16921
17069
  const storage = this.ffiStructStorage.logicalCursor;
16922
- this.opentui.symbols.editBufferGetPrevWordBoundary(buffer, storage.buffer);
17070
+ this.opentui.symbols.editBufferGetPrevWordBoundary(buffer, storage.ffiView);
16923
17071
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16924
17072
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16925
17073
  }
16926
17074
  editBufferGetEOL(buffer) {
16927
17075
  const storage = this.ffiStructStorage.logicalCursor;
16928
- this.opentui.symbols.editBufferGetEOL(buffer, storage.buffer);
17076
+ this.opentui.symbols.editBufferGetEOL(buffer, storage.ffiView);
16929
17077
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16930
17078
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16931
17079
  }
16932
17080
  editBufferOffsetToPosition(buffer, offset) {
16933
17081
  const storage = this.ffiStructStorage.logicalCursor;
16934
- const success = this.opentui.symbols.editBufferOffsetToPosition(buffer, offset, storage.buffer);
17082
+ const success = this.opentui.symbols.editBufferOffsetToPosition(buffer, offset, storage.ffiView);
16935
17083
  if (!success)
16936
17084
  return null;
16937
17085
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
@@ -16960,36 +17108,36 @@ class FFIRenderLib {
16960
17108
  return usesBunFFI ? outBuffer.slice(0, len) : trimNodeFFIOutputBytes(outBuffer, len);
16961
17109
  }
16962
17110
  editorViewSetSelection(view, start, end, bgColor, fgColor) {
16963
- const bg2 = optionalRgbaBuffer(bgColor);
16964
- const fg2 = optionalRgbaBuffer(fgColor);
16965
- this.opentui.symbols.editorViewSetSelection(view, start, end, bg2, fg2);
17111
+ const bg = optionalRgbaBuffer(bgColor);
17112
+ const fg = optionalRgbaBuffer(fgColor);
17113
+ this.opentui.symbols.editorViewSetSelection(view, start, end, bg, fg);
16966
17114
  }
16967
17115
  editorViewResetSelection(view) {
16968
17116
  this.opentui.symbols.editorViewResetSelection(view);
16969
17117
  }
16970
17118
  editorViewGetSelection(view) {
16971
17119
  const packedInfo = this.opentui.symbols.editorViewGetSelection(view);
16972
- if (packedInfo === 0xffff_ffff_ffff_ffffn) {
17120
+ if (packedInfo === 0xffffffffffffffffn) {
16973
17121
  return null;
16974
17122
  }
16975
17123
  const start = Number(packedInfo >> 32n);
16976
- const end = Number(packedInfo & 0xffff_ffffn);
17124
+ const end = Number(packedInfo & 0xffffffffn);
16977
17125
  return { start, end };
16978
17126
  }
16979
17127
  editorViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bgColor, fgColor, updateCursor, followCursor, behavior) {
16980
- const bg2 = optionalRgbaBuffer(bgColor);
16981
- const fg2 = optionalRgbaBuffer(fgColor);
16982
- return Boolean(this.opentui.symbols.editorViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg2, fg2, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
17128
+ const bg = optionalRgbaBuffer(bgColor);
17129
+ const fg = optionalRgbaBuffer(fgColor);
17130
+ return Boolean(this.opentui.symbols.editorViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
16983
17131
  }
16984
17132
  editorViewUpdateSelection(view, end, bgColor, fgColor) {
16985
- const bg2 = optionalRgbaBuffer(bgColor);
16986
- const fg2 = optionalRgbaBuffer(fgColor);
16987
- this.opentui.symbols.editorViewUpdateSelection(view, end, bg2, fg2);
17133
+ const bg = optionalRgbaBuffer(bgColor);
17134
+ const fg = optionalRgbaBuffer(fgColor);
17135
+ this.opentui.symbols.editorViewUpdateSelection(view, end, bg, fg);
16988
17136
  }
16989
17137
  editorViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bgColor, fgColor, updateCursor, followCursor, behavior) {
16990
- const bg2 = optionalRgbaBuffer(bgColor);
16991
- const fg2 = optionalRgbaBuffer(fgColor);
16992
- return Boolean(this.opentui.symbols.editorViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg2, fg2, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
17138
+ const bg = optionalRgbaBuffer(bgColor);
17139
+ const fg = optionalRgbaBuffer(fgColor);
17140
+ return Boolean(this.opentui.symbols.editorViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
16993
17141
  }
16994
17142
  editorViewResetLocalSelection(view) {
16995
17143
  this.opentui.symbols.editorViewResetLocalSelection(view);
@@ -17001,14 +17149,14 @@ class FFIRenderLib {
17001
17149
  this.opentui.symbols.editorViewSetSelectionOccupancy(view, occupancy === "boundary" ? 1 : 0);
17002
17150
  }
17003
17151
  editorViewSetSelectionInclusive(view, start, end, bgColor, fgColor) {
17004
- const bg2 = optionalRgbaBuffer(bgColor);
17005
- const fg2 = optionalRgbaBuffer(fgColor);
17006
- this.opentui.symbols.editorViewSetSelectionInclusive(view, start, end, bg2, fg2);
17152
+ const bg = optionalRgbaBuffer(bgColor);
17153
+ const fg = optionalRgbaBuffer(fgColor);
17154
+ this.opentui.symbols.editorViewSetSelectionInclusive(view, start, end, bg, fg);
17007
17155
  }
17008
17156
  editorViewSetSelectionColors(view, bgColor, fgColor) {
17009
- const bg2 = optionalRgbaBuffer(bgColor);
17010
- const fg2 = optionalRgbaBuffer(fgColor);
17011
- this.opentui.symbols.editorViewSetSelectionColors(view, bg2, fg2);
17157
+ const bg = optionalRgbaBuffer(bgColor);
17158
+ const fg = optionalRgbaBuffer(fgColor);
17159
+ this.opentui.symbols.editorViewSetSelectionColors(view, bg, fg);
17012
17160
  }
17013
17161
  editorViewGetSelectedTextBytes(view, maxLength) {
17014
17162
  const outBuffer = new Uint8Array(maxLength);
@@ -17034,7 +17182,7 @@ class FFIRenderLib {
17034
17182
  }
17035
17183
  editorViewGetVisualCursor(view) {
17036
17184
  const storage = this.ffiStructStorage.visualCursor;
17037
- this.opentui.symbols.editorViewGetVisualCursor(view, storage.buffer);
17185
+ this.opentui.symbols.editorViewGetVisualCursor(view, storage.ffiView);
17038
17186
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17039
17187
  return { ...cursor };
17040
17188
  }
@@ -17052,31 +17200,31 @@ class FFIRenderLib {
17052
17200
  }
17053
17201
  editorViewGetNextWordBoundary(view) {
17054
17202
  const storage = this.ffiStructStorage.visualCursor;
17055
- this.opentui.symbols.editorViewGetNextWordBoundary(view, storage.buffer);
17203
+ this.opentui.symbols.editorViewGetNextWordBoundary(view, storage.ffiView);
17056
17204
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17057
17205
  return { ...cursor };
17058
17206
  }
17059
17207
  editorViewGetPrevWordBoundary(view) {
17060
17208
  const storage = this.ffiStructStorage.visualCursor;
17061
- this.opentui.symbols.editorViewGetPrevWordBoundary(view, storage.buffer);
17209
+ this.opentui.symbols.editorViewGetPrevWordBoundary(view, storage.ffiView);
17062
17210
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17063
17211
  return { ...cursor };
17064
17212
  }
17065
17213
  editorViewGetEOL(view) {
17066
17214
  const storage = this.ffiStructStorage.visualCursor;
17067
- this.opentui.symbols.editorViewGetEOL(view, storage.buffer);
17215
+ this.opentui.symbols.editorViewGetEOL(view, storage.ffiView);
17068
17216
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17069
17217
  return { ...cursor };
17070
17218
  }
17071
17219
  editorViewGetVisualSOL(view) {
17072
17220
  const storage = this.ffiStructStorage.visualCursor;
17073
- this.opentui.symbols.editorViewGetVisualSOL(view, storage.buffer);
17221
+ this.opentui.symbols.editorViewGetVisualSOL(view, storage.ffiView);
17074
17222
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17075
17223
  return { ...cursor };
17076
17224
  }
17077
17225
  editorViewGetVisualEOL(view) {
17078
17226
  const storage = this.ffiStructStorage.visualCursor;
17079
- this.opentui.symbols.editorViewGetVisualEOL(view, storage.buffer);
17227
+ this.opentui.symbols.editorViewGetVisualEOL(view, storage.ffiView);
17080
17228
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17081
17229
  return { ...cursor };
17082
17230
  }
@@ -17182,8 +17330,8 @@ class FFIRenderLib {
17182
17330
  freeUnicode(encoded) {
17183
17331
  this.opentui.symbols.freeUnicode(encoded.ptr, encoded.data.length);
17184
17332
  }
17185
- bufferDrawChar(buffer, char, x, y, fg2, bg2, attributes = 0) {
17186
- this.opentui.symbols.bufferDrawChar(buffer, char, x, y, rgbaBuffer(fg2), rgbaBuffer(bg2), attributes);
17333
+ bufferDrawChar(buffer, char, x, y, fg, bg, attributes = 0) {
17334
+ this.opentui.symbols.bufferDrawChar(buffer, char, x, y, rgbaBuffer(fg), rgbaBuffer(bg), attributes);
17187
17335
  }
17188
17336
  createAudioEngine(options) {
17189
17337
  const optionsBuffer = options == null ? null : AudioCreateOptionsStruct.pack(options);
@@ -17300,15 +17448,15 @@ class FFIRenderLib {
17300
17448
  return this.opentui.symbols.audioStop(engine);
17301
17449
  }
17302
17450
  audioCreateStream(engine, options) {
17303
- if (!isFFIU32(options.groupId) || options.format !== NativeAudioStreamFormat2.Mp3 && options.format !== NativeAudioStreamFormat2.Flac) {
17451
+ if (!isFFIU32(options.groupId) || !isFFIU32(options.sampleRate ?? 0) || !isFFIU32(options.channels ?? 0) || !Object.values(NativeAudioStreamFormat3).includes(options.format)) {
17304
17452
  return { status: -1, streamId: null };
17305
17453
  }
17306
- const optionsBuffer = AudioStreamCreateOptionsStruct.pack(options);
17307
- const outBuffer = new ArrayBuffer(4);
17454
+ const optionsBuffer = new Uint8Array(AudioStreamCreateOptionsStruct.pack(options));
17455
+ const outBuffer = new Uint32Array(1);
17308
17456
  const status = this.opentui.symbols.audioCreateStream(engine, optionsBuffer, outBuffer);
17309
17457
  if (status !== 0)
17310
17458
  return { status, streamId: null };
17311
- return { status, streamId: new Uint32Array(outBuffer)[0] ?? null };
17459
+ return { status, streamId: outBuffer[0] ?? null };
17312
17460
  }
17313
17461
  audioWriteStream(engine, streamId, data) {
17314
17462
  const dataLength = toSafeFFIU32Length(data.byteLength, "Audio stream data length");
@@ -17333,7 +17481,7 @@ class FFIRenderLib {
17333
17481
  }
17334
17482
  audioGetStreamStats(engine, streamId) {
17335
17483
  const storage = this.ffiStructStorage.audioStreamStats;
17336
- const status = this.opentui.symbols.audioGetStreamStats(engine, streamId, storage.buffer);
17484
+ const status = this.opentui.symbols.audioGetStreamStats(engine, streamId, storage.ffiView);
17337
17485
  if (status !== 0)
17338
17486
  return null;
17339
17487
  const stats = AudioStreamStatsStruct.unpackInto(storage.view, storage.result);
@@ -17341,7 +17489,7 @@ class FFIRenderLib {
17341
17489
  }
17342
17490
  audioCloseStream(engine, streamId, reason) {
17343
17491
  const storage = this.ffiStructStorage.audioStreamStats;
17344
- const status = this.opentui.symbols.audioCloseStream(engine, streamId, reason, storage.buffer);
17492
+ const status = this.opentui.symbols.audioCloseStream(engine, streamId, reason, storage.ffiView);
17345
17493
  if (status !== 0)
17346
17494
  return { status, stats: null };
17347
17495
  const stats = AudioStreamStatsStruct.unpackInto(storage.view, storage.result);
@@ -17505,10 +17653,10 @@ class FFIRenderLib {
17505
17653
  destroySyntaxStyle(style) {
17506
17654
  this.opentui.symbols.destroySyntaxStyle(style);
17507
17655
  }
17508
- syntaxStyleRegister(style, name, fg2, bg2, attributes) {
17656
+ syntaxStyleRegister(style, name, fg, bg, attributes) {
17509
17657
  const nameBytes = this.encoder.encode(name);
17510
- const fgBuffer = optionalRgbaBuffer(fg2);
17511
- const bgBuffer = optionalRgbaBuffer(bg2);
17658
+ const fgBuffer = optionalRgbaBuffer(fg);
17659
+ const bgBuffer = optionalRgbaBuffer(bg);
17512
17660
  return this.opentui.symbols.syntaxStyleRegister(style, viewOrNull(nameBytes), nameBytes.byteLength, fgBuffer, bgBuffer, attributes);
17513
17661
  }
17514
17662
  syntaxStyleResolveByName(style, name) {
@@ -17637,7 +17785,7 @@ class FFIRenderLib {
17637
17785
  var opentuiLibPath;
17638
17786
  var opentuiLib;
17639
17787
  var renderLibResolved = false;
17640
- function setRenderLibPath(libPath) {
17788
+ function setRenderLibPath2(libPath) {
17641
17789
  if (opentuiLibPath !== libPath) {
17642
17790
  if (renderLibResolved) {
17643
17791
  throw new Error("setRenderLibPath() must be called before resolveRenderLib()");
@@ -17649,7 +17797,7 @@ function setRenderLibPath(libPath) {
17649
17797
  opentuiLib = undefined;
17650
17798
  }
17651
17799
  }
17652
- function resolveRenderLib() {
17800
+ function resolveRenderLib2() {
17653
17801
  if (!opentuiLib) {
17654
17802
  try {
17655
17803
  opentuiLib = new FFIRenderLib(opentuiLibPath);
@@ -17665,204 +17813,204 @@ try {
17665
17813
  } catch (error) {}
17666
17814
 
17667
17815
  // src/yoga.ts
17668
- var Align;
17669
- ((Align2) => {
17670
- Align2[Align2["Auto"] = 0] = "Auto";
17671
- Align2[Align2["FlexStart"] = 1] = "FlexStart";
17672
- Align2[Align2["Center"] = 2] = "Center";
17673
- Align2[Align2["FlexEnd"] = 3] = "FlexEnd";
17674
- Align2[Align2["Stretch"] = 4] = "Stretch";
17675
- Align2[Align2["Baseline"] = 5] = "Baseline";
17676
- Align2[Align2["SpaceBetween"] = 6] = "SpaceBetween";
17677
- Align2[Align2["SpaceAround"] = 7] = "SpaceAround";
17678
- Align2[Align2["SpaceEvenly"] = 8] = "SpaceEvenly";
17679
- })(Align ||= {});
17680
- var BoxSizing;
17681
- ((BoxSizing2) => {
17682
- BoxSizing2[BoxSizing2["BorderBox"] = 0] = "BorderBox";
17683
- BoxSizing2[BoxSizing2["ContentBox"] = 1] = "ContentBox";
17684
- })(BoxSizing ||= {});
17685
- var Dimension;
17686
- ((Dimension2) => {
17687
- Dimension2[Dimension2["Width"] = 0] = "Width";
17688
- Dimension2[Dimension2["Height"] = 1] = "Height";
17689
- })(Dimension ||= {});
17690
- var Direction;
17691
- ((Direction2) => {
17692
- Direction2[Direction2["Inherit"] = 0] = "Inherit";
17693
- Direction2[Direction2["LTR"] = 1] = "LTR";
17694
- Direction2[Direction2["RTL"] = 2] = "RTL";
17695
- })(Direction ||= {});
17696
- var Display;
17697
- ((Display2) => {
17698
- Display2[Display2["Flex"] = 0] = "Flex";
17699
- Display2[Display2["None"] = 1] = "None";
17700
- Display2[Display2["Contents"] = 2] = "Contents";
17701
- })(Display ||= {});
17702
- var Edge;
17703
- ((Edge2) => {
17704
- Edge2[Edge2["Left"] = 0] = "Left";
17705
- Edge2[Edge2["Top"] = 1] = "Top";
17706
- Edge2[Edge2["Right"] = 2] = "Right";
17707
- Edge2[Edge2["Bottom"] = 3] = "Bottom";
17708
- Edge2[Edge2["Start"] = 4] = "Start";
17709
- Edge2[Edge2["End"] = 5] = "End";
17710
- Edge2[Edge2["Horizontal"] = 6] = "Horizontal";
17711
- Edge2[Edge2["Vertical"] = 7] = "Vertical";
17712
- Edge2[Edge2["All"] = 8] = "All";
17713
- })(Edge ||= {});
17714
- var Errata;
17715
- ((Errata2) => {
17716
- Errata2[Errata2["None"] = 0] = "None";
17717
- Errata2[Errata2["StretchFlexBasis"] = 1] = "StretchFlexBasis";
17718
- Errata2[Errata2["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
17719
- Errata2[Errata2["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
17720
- Errata2[Errata2["All"] = 2147483647] = "All";
17721
- Errata2[Errata2["Classic"] = 2147483646] = "Classic";
17722
- })(Errata ||= {});
17723
- var ExperimentalFeature;
17724
- ((ExperimentalFeature2) => {
17725
- ExperimentalFeature2[ExperimentalFeature2["WebFlexBasis"] = 0] = "WebFlexBasis";
17726
- })(ExperimentalFeature ||= {});
17727
- var FlexDirection;
17728
- ((FlexDirection2) => {
17729
- FlexDirection2[FlexDirection2["Column"] = 0] = "Column";
17730
- FlexDirection2[FlexDirection2["ColumnReverse"] = 1] = "ColumnReverse";
17731
- FlexDirection2[FlexDirection2["Row"] = 2] = "Row";
17732
- FlexDirection2[FlexDirection2["RowReverse"] = 3] = "RowReverse";
17733
- })(FlexDirection ||= {});
17734
- var Gutter;
17735
- ((Gutter2) => {
17736
- Gutter2[Gutter2["Column"] = 0] = "Column";
17737
- Gutter2[Gutter2["Row"] = 1] = "Row";
17738
- Gutter2[Gutter2["All"] = 2] = "All";
17739
- })(Gutter ||= {});
17740
- var Justify;
17741
- ((Justify2) => {
17742
- Justify2[Justify2["FlexStart"] = 0] = "FlexStart";
17743
- Justify2[Justify2["Center"] = 1] = "Center";
17744
- Justify2[Justify2["FlexEnd"] = 2] = "FlexEnd";
17745
- Justify2[Justify2["SpaceBetween"] = 3] = "SpaceBetween";
17746
- Justify2[Justify2["SpaceAround"] = 4] = "SpaceAround";
17747
- Justify2[Justify2["SpaceEvenly"] = 5] = "SpaceEvenly";
17748
- })(Justify ||= {});
17749
- var LogLevel;
17750
- ((LogLevel3) => {
17751
- LogLevel3[LogLevel3["Error"] = 0] = "Error";
17752
- LogLevel3[LogLevel3["Warn"] = 1] = "Warn";
17753
- LogLevel3[LogLevel3["Info"] = 2] = "Info";
17754
- LogLevel3[LogLevel3["Debug"] = 3] = "Debug";
17755
- LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose";
17756
- LogLevel3[LogLevel3["Fatal"] = 5] = "Fatal";
17757
- })(LogLevel ||= {});
17758
- var MeasureMode;
17759
- ((MeasureMode2) => {
17760
- MeasureMode2[MeasureMode2["Undefined"] = 0] = "Undefined";
17761
- MeasureMode2[MeasureMode2["Exactly"] = 1] = "Exactly";
17762
- MeasureMode2[MeasureMode2["AtMost"] = 2] = "AtMost";
17763
- })(MeasureMode ||= {});
17764
- var NodeType;
17765
- ((NodeType2) => {
17766
- NodeType2[NodeType2["Default"] = 0] = "Default";
17767
- NodeType2[NodeType2["Text"] = 1] = "Text";
17768
- })(NodeType ||= {});
17769
- var Overflow;
17770
- ((Overflow2) => {
17771
- Overflow2[Overflow2["Visible"] = 0] = "Visible";
17772
- Overflow2[Overflow2["Hidden"] = 1] = "Hidden";
17773
- Overflow2[Overflow2["Scroll"] = 2] = "Scroll";
17774
- })(Overflow ||= {});
17775
- var PositionType;
17776
- ((PositionType2) => {
17777
- PositionType2[PositionType2["Static"] = 0] = "Static";
17778
- PositionType2[PositionType2["Relative"] = 1] = "Relative";
17779
- PositionType2[PositionType2["Absolute"] = 2] = "Absolute";
17780
- })(PositionType ||= {});
17781
- var Unit;
17782
- ((Unit2) => {
17783
- Unit2[Unit2["Undefined"] = 0] = "Undefined";
17784
- Unit2[Unit2["Point"] = 1] = "Point";
17785
- Unit2[Unit2["Percent"] = 2] = "Percent";
17786
- Unit2[Unit2["Auto"] = 3] = "Auto";
17787
- })(Unit ||= {});
17788
- var Wrap;
17816
+ var Align2;
17817
+ ((Align) => {
17818
+ Align[Align["Auto"] = 0] = "Auto";
17819
+ Align[Align["FlexStart"] = 1] = "FlexStart";
17820
+ Align[Align["Center"] = 2] = "Center";
17821
+ Align[Align["FlexEnd"] = 3] = "FlexEnd";
17822
+ Align[Align["Stretch"] = 4] = "Stretch";
17823
+ Align[Align["Baseline"] = 5] = "Baseline";
17824
+ Align[Align["SpaceBetween"] = 6] = "SpaceBetween";
17825
+ Align[Align["SpaceAround"] = 7] = "SpaceAround";
17826
+ Align[Align["SpaceEvenly"] = 8] = "SpaceEvenly";
17827
+ })(Align2 ||= {});
17828
+ var BoxSizing2;
17829
+ ((BoxSizing) => {
17830
+ BoxSizing[BoxSizing["BorderBox"] = 0] = "BorderBox";
17831
+ BoxSizing[BoxSizing["ContentBox"] = 1] = "ContentBox";
17832
+ })(BoxSizing2 ||= {});
17833
+ var Dimension2;
17834
+ ((Dimension) => {
17835
+ Dimension[Dimension["Width"] = 0] = "Width";
17836
+ Dimension[Dimension["Height"] = 1] = "Height";
17837
+ })(Dimension2 ||= {});
17838
+ var Direction2;
17839
+ ((Direction) => {
17840
+ Direction[Direction["Inherit"] = 0] = "Inherit";
17841
+ Direction[Direction["LTR"] = 1] = "LTR";
17842
+ Direction[Direction["RTL"] = 2] = "RTL";
17843
+ })(Direction2 ||= {});
17844
+ var Display2;
17845
+ ((Display) => {
17846
+ Display[Display["Flex"] = 0] = "Flex";
17847
+ Display[Display["None"] = 1] = "None";
17848
+ Display[Display["Contents"] = 2] = "Contents";
17849
+ })(Display2 ||= {});
17850
+ var Edge2;
17851
+ ((Edge) => {
17852
+ Edge[Edge["Left"] = 0] = "Left";
17853
+ Edge[Edge["Top"] = 1] = "Top";
17854
+ Edge[Edge["Right"] = 2] = "Right";
17855
+ Edge[Edge["Bottom"] = 3] = "Bottom";
17856
+ Edge[Edge["Start"] = 4] = "Start";
17857
+ Edge[Edge["End"] = 5] = "End";
17858
+ Edge[Edge["Horizontal"] = 6] = "Horizontal";
17859
+ Edge[Edge["Vertical"] = 7] = "Vertical";
17860
+ Edge[Edge["All"] = 8] = "All";
17861
+ })(Edge2 ||= {});
17862
+ var Errata2;
17863
+ ((Errata) => {
17864
+ Errata[Errata["None"] = 0] = "None";
17865
+ Errata[Errata["StretchFlexBasis"] = 1] = "StretchFlexBasis";
17866
+ Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
17867
+ Errata[Errata["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
17868
+ Errata[Errata["All"] = 2147483647] = "All";
17869
+ Errata[Errata["Classic"] = 2147483646] = "Classic";
17870
+ })(Errata2 ||= {});
17871
+ var ExperimentalFeature2;
17872
+ ((ExperimentalFeature) => {
17873
+ ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = 0] = "WebFlexBasis";
17874
+ })(ExperimentalFeature2 ||= {});
17875
+ var FlexDirection2;
17876
+ ((FlexDirection) => {
17877
+ FlexDirection[FlexDirection["Column"] = 0] = "Column";
17878
+ FlexDirection[FlexDirection["ColumnReverse"] = 1] = "ColumnReverse";
17879
+ FlexDirection[FlexDirection["Row"] = 2] = "Row";
17880
+ FlexDirection[FlexDirection["RowReverse"] = 3] = "RowReverse";
17881
+ })(FlexDirection2 ||= {});
17882
+ var Gutter2;
17883
+ ((Gutter) => {
17884
+ Gutter[Gutter["Column"] = 0] = "Column";
17885
+ Gutter[Gutter["Row"] = 1] = "Row";
17886
+ Gutter[Gutter["All"] = 2] = "All";
17887
+ })(Gutter2 ||= {});
17888
+ var Justify2;
17889
+ ((Justify) => {
17890
+ Justify[Justify["FlexStart"] = 0] = "FlexStart";
17891
+ Justify[Justify["Center"] = 1] = "Center";
17892
+ Justify[Justify["FlexEnd"] = 2] = "FlexEnd";
17893
+ Justify[Justify["SpaceBetween"] = 3] = "SpaceBetween";
17894
+ Justify[Justify["SpaceAround"] = 4] = "SpaceAround";
17895
+ Justify[Justify["SpaceEvenly"] = 5] = "SpaceEvenly";
17896
+ })(Justify2 ||= {});
17897
+ var LogLevel3;
17898
+ ((LogLevel) => {
17899
+ LogLevel[LogLevel["Error"] = 0] = "Error";
17900
+ LogLevel[LogLevel["Warn"] = 1] = "Warn";
17901
+ LogLevel[LogLevel["Info"] = 2] = "Info";
17902
+ LogLevel[LogLevel["Debug"] = 3] = "Debug";
17903
+ LogLevel[LogLevel["Verbose"] = 4] = "Verbose";
17904
+ LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
17905
+ })(LogLevel3 ||= {});
17906
+ var MeasureMode2;
17907
+ ((MeasureMode) => {
17908
+ MeasureMode[MeasureMode["Undefined"] = 0] = "Undefined";
17909
+ MeasureMode[MeasureMode["Exactly"] = 1] = "Exactly";
17910
+ MeasureMode[MeasureMode["AtMost"] = 2] = "AtMost";
17911
+ })(MeasureMode2 ||= {});
17912
+ var NodeType2;
17913
+ ((NodeType) => {
17914
+ NodeType[NodeType["Default"] = 0] = "Default";
17915
+ NodeType[NodeType["Text"] = 1] = "Text";
17916
+ })(NodeType2 ||= {});
17917
+ var Overflow2;
17918
+ ((Overflow) => {
17919
+ Overflow[Overflow["Visible"] = 0] = "Visible";
17920
+ Overflow[Overflow["Hidden"] = 1] = "Hidden";
17921
+ Overflow[Overflow["Scroll"] = 2] = "Scroll";
17922
+ })(Overflow2 ||= {});
17923
+ var PositionType2;
17924
+ ((PositionType) => {
17925
+ PositionType[PositionType["Static"] = 0] = "Static";
17926
+ PositionType[PositionType["Relative"] = 1] = "Relative";
17927
+ PositionType[PositionType["Absolute"] = 2] = "Absolute";
17928
+ })(PositionType2 ||= {});
17929
+ var Unit2;
17930
+ ((Unit) => {
17931
+ Unit[Unit["Undefined"] = 0] = "Undefined";
17932
+ Unit[Unit["Point"] = 1] = "Point";
17933
+ Unit[Unit["Percent"] = 2] = "Percent";
17934
+ Unit[Unit["Auto"] = 3] = "Auto";
17935
+ })(Unit2 ||= {});
17936
+ var Wrap2;
17789
17937
  ((_Wrap) => {
17790
17938
  _Wrap[_Wrap["NoWrap"] = 0] = "NoWrap";
17791
17939
  _Wrap[_Wrap["Wrap"] = 1] = "Wrap";
17792
17940
  _Wrap[_Wrap["WrapReverse"] = 2] = "WrapReverse";
17793
- })(Wrap ||= {});
17794
- var ALIGN_AUTO = 0 /* Auto */;
17795
- var ALIGN_FLEX_START = 1 /* FlexStart */;
17796
- var ALIGN_CENTER = 2 /* Center */;
17797
- var ALIGN_FLEX_END = 3 /* FlexEnd */;
17798
- var ALIGN_STRETCH = 4 /* Stretch */;
17799
- var ALIGN_BASELINE = 5 /* Baseline */;
17800
- var ALIGN_SPACE_BETWEEN = 6 /* SpaceBetween */;
17801
- var ALIGN_SPACE_AROUND = 7 /* SpaceAround */;
17802
- var ALIGN_SPACE_EVENLY = 8 /* SpaceEvenly */;
17803
- var BOX_SIZING_BORDER_BOX = 0 /* BorderBox */;
17804
- var BOX_SIZING_CONTENT_BOX = 1 /* ContentBox */;
17805
- var DIMENSION_WIDTH = 0 /* Width */;
17806
- var DIMENSION_HEIGHT = 1 /* Height */;
17807
- var DIRECTION_INHERIT = 0 /* Inherit */;
17808
- var DIRECTION_LTR = 1 /* LTR */;
17809
- var DIRECTION_RTL = 2 /* RTL */;
17810
- var DISPLAY_FLEX = 0 /* Flex */;
17811
- var DISPLAY_NONE = 1 /* None */;
17812
- var DISPLAY_CONTENTS = 2 /* Contents */;
17813
- var EDGE_LEFT = 0 /* Left */;
17814
- var EDGE_TOP = 1 /* Top */;
17815
- var EDGE_RIGHT = 2 /* Right */;
17816
- var EDGE_BOTTOM = 3 /* Bottom */;
17817
- var EDGE_START = 4 /* Start */;
17818
- var EDGE_END = 5 /* End */;
17819
- var EDGE_HORIZONTAL = 6 /* Horizontal */;
17820
- var EDGE_VERTICAL = 7 /* Vertical */;
17821
- var EDGE_ALL = 8 /* All */;
17822
- var ERRATA_NONE = 0 /* None */;
17823
- var ERRATA_STRETCH_FLEX_BASIS = 1 /* StretchFlexBasis */;
17824
- var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING = 2 /* AbsolutePositionWithoutInsetsExcludesPadding */;
17825
- var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE = 4 /* AbsolutePercentAgainstInnerSize */;
17826
- var ERRATA_ALL = 2147483647 /* All */;
17827
- var ERRATA_CLASSIC = 2147483646 /* Classic */;
17828
- var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS = 0 /* WebFlexBasis */;
17829
- var FLEX_DIRECTION_COLUMN = 0 /* Column */;
17830
- var FLEX_DIRECTION_COLUMN_REVERSE = 1 /* ColumnReverse */;
17831
- var FLEX_DIRECTION_ROW = 2 /* Row */;
17832
- var FLEX_DIRECTION_ROW_REVERSE = 3 /* RowReverse */;
17833
- var GUTTER_COLUMN = 0 /* Column */;
17834
- var GUTTER_ROW = 1 /* Row */;
17835
- var GUTTER_ALL = 2 /* All */;
17836
- var JUSTIFY_FLEX_START = 0 /* FlexStart */;
17837
- var JUSTIFY_CENTER = 1 /* Center */;
17838
- var JUSTIFY_FLEX_END = 2 /* FlexEnd */;
17839
- var JUSTIFY_SPACE_BETWEEN = 3 /* SpaceBetween */;
17840
- var JUSTIFY_SPACE_AROUND = 4 /* SpaceAround */;
17841
- var JUSTIFY_SPACE_EVENLY = 5 /* SpaceEvenly */;
17842
- var LOG_LEVEL_ERROR = 0 /* Error */;
17843
- var LOG_LEVEL_WARN = 1 /* Warn */;
17844
- var LOG_LEVEL_INFO = 2 /* Info */;
17845
- var LOG_LEVEL_DEBUG = 3 /* Debug */;
17846
- var LOG_LEVEL_VERBOSE = 4 /* Verbose */;
17847
- var LOG_LEVEL_FATAL = 5 /* Fatal */;
17848
- var MEASURE_MODE_UNDEFINED = 0 /* Undefined */;
17849
- var MEASURE_MODE_EXACTLY = 1 /* Exactly */;
17850
- var MEASURE_MODE_AT_MOST = 2 /* AtMost */;
17851
- var NODE_TYPE_DEFAULT = 0 /* Default */;
17852
- var NODE_TYPE_TEXT = 1 /* Text */;
17853
- var OVERFLOW_VISIBLE = 0 /* Visible */;
17854
- var OVERFLOW_HIDDEN = 1 /* Hidden */;
17855
- var OVERFLOW_SCROLL = 2 /* Scroll */;
17856
- var POSITION_TYPE_STATIC = 0 /* Static */;
17857
- var POSITION_TYPE_RELATIVE = 1 /* Relative */;
17858
- var POSITION_TYPE_ABSOLUTE = 2 /* Absolute */;
17859
- var UNIT_UNDEFINED = 0 /* Undefined */;
17860
- var UNIT_POINT = 1 /* Point */;
17861
- var UNIT_PERCENT = 2 /* Percent */;
17862
- var UNIT_AUTO = 3 /* Auto */;
17863
- var WRAP_NO_WRAP = 0 /* NoWrap */;
17864
- var WRAP_WRAP = 1 /* Wrap */;
17865
- var WRAP_WRAP_REVERSE = 2 /* WrapReverse */;
17941
+ })(Wrap2 ||= {});
17942
+ var ALIGN_AUTO2 = 0 /* Auto */;
17943
+ var ALIGN_FLEX_START2 = 1 /* FlexStart */;
17944
+ var ALIGN_CENTER2 = 2 /* Center */;
17945
+ var ALIGN_FLEX_END2 = 3 /* FlexEnd */;
17946
+ var ALIGN_STRETCH2 = 4 /* Stretch */;
17947
+ var ALIGN_BASELINE2 = 5 /* Baseline */;
17948
+ var ALIGN_SPACE_BETWEEN2 = 6 /* SpaceBetween */;
17949
+ var ALIGN_SPACE_AROUND2 = 7 /* SpaceAround */;
17950
+ var ALIGN_SPACE_EVENLY2 = 8 /* SpaceEvenly */;
17951
+ var BOX_SIZING_BORDER_BOX2 = 0 /* BorderBox */;
17952
+ var BOX_SIZING_CONTENT_BOX2 = 1 /* ContentBox */;
17953
+ var DIMENSION_WIDTH2 = 0 /* Width */;
17954
+ var DIMENSION_HEIGHT2 = 1 /* Height */;
17955
+ var DIRECTION_INHERIT2 = 0 /* Inherit */;
17956
+ var DIRECTION_LTR2 = 1 /* LTR */;
17957
+ var DIRECTION_RTL2 = 2 /* RTL */;
17958
+ var DISPLAY_FLEX2 = 0 /* Flex */;
17959
+ var DISPLAY_NONE2 = 1 /* None */;
17960
+ var DISPLAY_CONTENTS2 = 2 /* Contents */;
17961
+ var EDGE_LEFT2 = 0 /* Left */;
17962
+ var EDGE_TOP2 = 1 /* Top */;
17963
+ var EDGE_RIGHT2 = 2 /* Right */;
17964
+ var EDGE_BOTTOM2 = 3 /* Bottom */;
17965
+ var EDGE_START2 = 4 /* Start */;
17966
+ var EDGE_END2 = 5 /* End */;
17967
+ var EDGE_HORIZONTAL2 = 6 /* Horizontal */;
17968
+ var EDGE_VERTICAL2 = 7 /* Vertical */;
17969
+ var EDGE_ALL2 = 8 /* All */;
17970
+ var ERRATA_NONE2 = 0 /* None */;
17971
+ var ERRATA_STRETCH_FLEX_BASIS2 = 1 /* StretchFlexBasis */;
17972
+ var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = 2 /* AbsolutePositionWithoutInsetsExcludesPadding */;
17973
+ var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = 4 /* AbsolutePercentAgainstInnerSize */;
17974
+ var ERRATA_ALL2 = 2147483647 /* All */;
17975
+ var ERRATA_CLASSIC2 = 2147483646 /* Classic */;
17976
+ var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = 0 /* WebFlexBasis */;
17977
+ var FLEX_DIRECTION_COLUMN2 = 0 /* Column */;
17978
+ var FLEX_DIRECTION_COLUMN_REVERSE2 = 1 /* ColumnReverse */;
17979
+ var FLEX_DIRECTION_ROW2 = 2 /* Row */;
17980
+ var FLEX_DIRECTION_ROW_REVERSE2 = 3 /* RowReverse */;
17981
+ var GUTTER_COLUMN2 = 0 /* Column */;
17982
+ var GUTTER_ROW2 = 1 /* Row */;
17983
+ var GUTTER_ALL2 = 2 /* All */;
17984
+ var JUSTIFY_FLEX_START2 = 0 /* FlexStart */;
17985
+ var JUSTIFY_CENTER2 = 1 /* Center */;
17986
+ var JUSTIFY_FLEX_END2 = 2 /* FlexEnd */;
17987
+ var JUSTIFY_SPACE_BETWEEN2 = 3 /* SpaceBetween */;
17988
+ var JUSTIFY_SPACE_AROUND2 = 4 /* SpaceAround */;
17989
+ var JUSTIFY_SPACE_EVENLY2 = 5 /* SpaceEvenly */;
17990
+ var LOG_LEVEL_ERROR2 = 0 /* Error */;
17991
+ var LOG_LEVEL_WARN2 = 1 /* Warn */;
17992
+ var LOG_LEVEL_INFO2 = 2 /* Info */;
17993
+ var LOG_LEVEL_DEBUG2 = 3 /* Debug */;
17994
+ var LOG_LEVEL_VERBOSE2 = 4 /* Verbose */;
17995
+ var LOG_LEVEL_FATAL2 = 5 /* Fatal */;
17996
+ var MEASURE_MODE_UNDEFINED2 = 0 /* Undefined */;
17997
+ var MEASURE_MODE_EXACTLY2 = 1 /* Exactly */;
17998
+ var MEASURE_MODE_AT_MOST2 = 2 /* AtMost */;
17999
+ var NODE_TYPE_DEFAULT2 = 0 /* Default */;
18000
+ var NODE_TYPE_TEXT2 = 1 /* Text */;
18001
+ var OVERFLOW_VISIBLE2 = 0 /* Visible */;
18002
+ var OVERFLOW_HIDDEN2 = 1 /* Hidden */;
18003
+ var OVERFLOW_SCROLL2 = 2 /* Scroll */;
18004
+ var POSITION_TYPE_STATIC2 = 0 /* Static */;
18005
+ var POSITION_TYPE_RELATIVE2 = 1 /* Relative */;
18006
+ var POSITION_TYPE_ABSOLUTE2 = 2 /* Absolute */;
18007
+ var UNIT_UNDEFINED2 = 0 /* Undefined */;
18008
+ var UNIT_POINT2 = 1 /* Point */;
18009
+ var UNIT_PERCENT2 = 2 /* Percent */;
18010
+ var UNIT_AUTO2 = 3 /* Auto */;
18011
+ var WRAP_NO_WRAP2 = 0 /* NoWrap */;
18012
+ var WRAP_WRAP2 = 1 /* Wrap */;
18013
+ var WRAP_WRAP_REVERSE2 = 2 /* WrapReverse */;
17866
18014
  var YogaEnumKind = {
17867
18015
  Direction: 0,
17868
18016
  FlexDirection: 1,
@@ -17909,7 +18057,7 @@ var measureCallbackLib = null;
17909
18057
  var dirtiedCallback = null;
17910
18058
  var dirtiedCallbackLib = null;
17911
18059
  function lib() {
17912
- return resolveRenderLib();
18060
+ return resolveRenderLib2();
17913
18061
  }
17914
18062
  function ensureMeasureCallback() {
17915
18063
  const renderLib = lib();
@@ -17987,14 +18135,14 @@ function normalizeLayoutInput(value) {
17987
18135
  return value === undefined || value === "auto" ? NaN : value;
17988
18136
  }
17989
18137
 
17990
- class Config {
18138
+ class Config2 {
17991
18139
  ptr;
17992
18140
  freed = false;
17993
- constructor(ptr3) {
17994
- this.ptr = ptr3;
18141
+ constructor(ptr) {
18142
+ this.ptr = ptr;
17995
18143
  }
17996
18144
  static create() {
17997
- return new Config(lib().yogaConfigCreate());
18145
+ return new Config2(lib().yogaConfigCreate());
17998
18146
  }
17999
18147
  static destroy(config) {
18000
18148
  config.free();
@@ -18047,33 +18195,33 @@ class Config {
18047
18195
  }
18048
18196
  }
18049
18197
 
18050
- class Node {
18198
+ class Node2 {
18051
18199
  ptr;
18052
18200
  freed = false;
18053
- constructor(ptr3) {
18054
- this.ptr = ptr3;
18055
- nodeRegistry.set(ptr3, this);
18201
+ constructor(ptr) {
18202
+ this.ptr = ptr;
18203
+ nodeRegistry.set(ptr, this);
18056
18204
  }
18057
18205
  static create(config) {
18058
- return Node.fromPointer(config ? lib().yogaNodeCreateWithConfig(config.ptr) : lib().yogaNodeCreate());
18206
+ return Node2.fromPointer(config ? lib().yogaNodeCreateWithConfig(config.ptr) : lib().yogaNodeCreate());
18059
18207
  }
18060
18208
  static createForOpenTUI() {
18061
- return Node.fromPointer(lib().yogaNodeCreateForOpenTUI());
18209
+ return Node2.fromPointer(lib().yogaNodeCreateForOpenTUI());
18062
18210
  }
18063
18211
  static createDefault() {
18064
- return Node.create();
18212
+ return Node2.create();
18065
18213
  }
18066
18214
  static createWithConfig(config) {
18067
- return Node.create(config);
18215
+ return Node2.create(config);
18068
18216
  }
18069
18217
  static destroy(node) {
18070
18218
  node.free();
18071
18219
  }
18072
- static fromPointer(ptr3) {
18073
- const existing = nodeRegistry.get(ptr3);
18220
+ static fromPointer(ptr) {
18221
+ const existing = nodeRegistry.get(ptr);
18074
18222
  if (existing)
18075
18223
  return existing;
18076
- return new Node(ptr3);
18224
+ return new Node2(ptr);
18077
18225
  }
18078
18226
  isFreed() {
18079
18227
  return this.freed;
@@ -18129,7 +18277,7 @@ class Node {
18129
18277
  if (this.freed)
18130
18278
  return null;
18131
18279
  const child = lib().yogaNodeGetChild(this.ptr, index);
18132
- return child ? Node.fromPointer(child) : null;
18280
+ return child ? Node2.fromPointer(child) : null;
18133
18281
  }
18134
18282
  getChildCount() {
18135
18283
  if (this.freed)
@@ -18140,7 +18288,7 @@ class Node {
18140
18288
  if (this.freed)
18141
18289
  return null;
18142
18290
  const parent = lib().yogaNodeGetParent(this.ptr);
18143
- return parent ? Node.fromPointer(parent) : null;
18291
+ return parent ? Node2.fromPointer(parent) : null;
18144
18292
  }
18145
18293
  calculateLayout(width, height, direction = 1 /* LTR */) {
18146
18294
  if (this.freed)
@@ -18409,10 +18557,10 @@ class Node {
18409
18557
  getGap(gutter) {
18410
18558
  return this.getValue(YogaValueKind.Gap, gutter);
18411
18559
  }
18412
- setBorder(edge, border2) {
18560
+ setBorder(edge, border) {
18413
18561
  if (this.freed)
18414
18562
  return;
18415
- lib().yogaNodeStyleSetBorder(this.ptr, edge, border2 ?? NaN);
18563
+ lib().yogaNodeStyleSetBorder(this.ptr, edge, border ?? NaN);
18416
18564
  }
18417
18565
  getBorder(edge) {
18418
18566
  if (this.freed)
@@ -18525,102 +18673,102 @@ class Node {
18525
18673
  }
18526
18674
  }
18527
18675
  var Yoga = {
18528
- Config,
18529
- Node,
18530
- Align,
18531
- BoxSizing,
18532
- Dimension,
18533
- Direction,
18534
- Display,
18535
- Edge,
18536
- Errata,
18537
- ExperimentalFeature,
18538
- FlexDirection,
18539
- Gutter,
18540
- Justify,
18541
- LogLevel,
18542
- MeasureMode,
18543
- NodeType,
18544
- Overflow,
18545
- PositionType,
18546
- Unit,
18547
- Wrap,
18548
- ALIGN_AUTO,
18549
- ALIGN_FLEX_START,
18550
- ALIGN_CENTER,
18551
- ALIGN_FLEX_END,
18552
- ALIGN_STRETCH,
18553
- ALIGN_BASELINE,
18554
- ALIGN_SPACE_BETWEEN,
18555
- ALIGN_SPACE_AROUND,
18556
- ALIGN_SPACE_EVENLY,
18557
- BOX_SIZING_BORDER_BOX,
18558
- BOX_SIZING_CONTENT_BOX,
18559
- DIMENSION_WIDTH,
18560
- DIMENSION_HEIGHT,
18561
- DIRECTION_INHERIT,
18562
- DIRECTION_LTR,
18563
- DIRECTION_RTL,
18564
- DISPLAY_FLEX,
18565
- DISPLAY_NONE,
18566
- DISPLAY_CONTENTS,
18567
- EDGE_LEFT,
18568
- EDGE_TOP,
18569
- EDGE_RIGHT,
18570
- EDGE_BOTTOM,
18571
- EDGE_START,
18572
- EDGE_END,
18573
- EDGE_HORIZONTAL,
18574
- EDGE_VERTICAL,
18575
- EDGE_ALL,
18576
- ERRATA_NONE,
18577
- ERRATA_STRETCH_FLEX_BASIS,
18578
- ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING,
18579
- ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE,
18580
- ERRATA_ALL,
18581
- ERRATA_CLASSIC,
18582
- EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS,
18583
- FLEX_DIRECTION_COLUMN,
18584
- FLEX_DIRECTION_COLUMN_REVERSE,
18585
- FLEX_DIRECTION_ROW,
18586
- FLEX_DIRECTION_ROW_REVERSE,
18587
- GUTTER_COLUMN,
18588
- GUTTER_ROW,
18589
- GUTTER_ALL,
18590
- JUSTIFY_FLEX_START,
18591
- JUSTIFY_CENTER,
18592
- JUSTIFY_FLEX_END,
18593
- JUSTIFY_SPACE_BETWEEN,
18594
- JUSTIFY_SPACE_AROUND,
18595
- JUSTIFY_SPACE_EVENLY,
18596
- LOG_LEVEL_ERROR,
18597
- LOG_LEVEL_WARN,
18598
- LOG_LEVEL_INFO,
18599
- LOG_LEVEL_DEBUG,
18600
- LOG_LEVEL_VERBOSE,
18601
- LOG_LEVEL_FATAL,
18602
- MEASURE_MODE_UNDEFINED,
18603
- MEASURE_MODE_EXACTLY,
18604
- MEASURE_MODE_AT_MOST,
18605
- NODE_TYPE_DEFAULT,
18606
- NODE_TYPE_TEXT,
18607
- OVERFLOW_VISIBLE,
18608
- OVERFLOW_HIDDEN,
18609
- OVERFLOW_SCROLL,
18610
- POSITION_TYPE_STATIC,
18611
- POSITION_TYPE_RELATIVE,
18612
- POSITION_TYPE_ABSOLUTE,
18613
- UNIT_UNDEFINED,
18614
- UNIT_POINT,
18615
- UNIT_PERCENT,
18616
- UNIT_AUTO,
18617
- WRAP_NO_WRAP,
18618
- WRAP_WRAP,
18619
- WRAP_WRAP_REVERSE
18676
+ Config: Config2,
18677
+ Node: Node2,
18678
+ Align: Align2,
18679
+ BoxSizing: BoxSizing2,
18680
+ Dimension: Dimension2,
18681
+ Direction: Direction2,
18682
+ Display: Display2,
18683
+ Edge: Edge2,
18684
+ Errata: Errata2,
18685
+ ExperimentalFeature: ExperimentalFeature2,
18686
+ FlexDirection: FlexDirection2,
18687
+ Gutter: Gutter2,
18688
+ Justify: Justify2,
18689
+ LogLevel: LogLevel3,
18690
+ MeasureMode: MeasureMode2,
18691
+ NodeType: NodeType2,
18692
+ Overflow: Overflow2,
18693
+ PositionType: PositionType2,
18694
+ Unit: Unit2,
18695
+ Wrap: Wrap2,
18696
+ ALIGN_AUTO: ALIGN_AUTO2,
18697
+ ALIGN_FLEX_START: ALIGN_FLEX_START2,
18698
+ ALIGN_CENTER: ALIGN_CENTER2,
18699
+ ALIGN_FLEX_END: ALIGN_FLEX_END2,
18700
+ ALIGN_STRETCH: ALIGN_STRETCH2,
18701
+ ALIGN_BASELINE: ALIGN_BASELINE2,
18702
+ ALIGN_SPACE_BETWEEN: ALIGN_SPACE_BETWEEN2,
18703
+ ALIGN_SPACE_AROUND: ALIGN_SPACE_AROUND2,
18704
+ ALIGN_SPACE_EVENLY: ALIGN_SPACE_EVENLY2,
18705
+ BOX_SIZING_BORDER_BOX: BOX_SIZING_BORDER_BOX2,
18706
+ BOX_SIZING_CONTENT_BOX: BOX_SIZING_CONTENT_BOX2,
18707
+ DIMENSION_WIDTH: DIMENSION_WIDTH2,
18708
+ DIMENSION_HEIGHT: DIMENSION_HEIGHT2,
18709
+ DIRECTION_INHERIT: DIRECTION_INHERIT2,
18710
+ DIRECTION_LTR: DIRECTION_LTR2,
18711
+ DIRECTION_RTL: DIRECTION_RTL2,
18712
+ DISPLAY_FLEX: DISPLAY_FLEX2,
18713
+ DISPLAY_NONE: DISPLAY_NONE2,
18714
+ DISPLAY_CONTENTS: DISPLAY_CONTENTS2,
18715
+ EDGE_LEFT: EDGE_LEFT2,
18716
+ EDGE_TOP: EDGE_TOP2,
18717
+ EDGE_RIGHT: EDGE_RIGHT2,
18718
+ EDGE_BOTTOM: EDGE_BOTTOM2,
18719
+ EDGE_START: EDGE_START2,
18720
+ EDGE_END: EDGE_END2,
18721
+ EDGE_HORIZONTAL: EDGE_HORIZONTAL2,
18722
+ EDGE_VERTICAL: EDGE_VERTICAL2,
18723
+ EDGE_ALL: EDGE_ALL2,
18724
+ ERRATA_NONE: ERRATA_NONE2,
18725
+ ERRATA_STRETCH_FLEX_BASIS: ERRATA_STRETCH_FLEX_BASIS2,
18726
+ ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2,
18727
+ ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2,
18728
+ ERRATA_ALL: ERRATA_ALL2,
18729
+ ERRATA_CLASSIC: ERRATA_CLASSIC2,
18730
+ EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2,
18731
+ FLEX_DIRECTION_COLUMN: FLEX_DIRECTION_COLUMN2,
18732
+ FLEX_DIRECTION_COLUMN_REVERSE: FLEX_DIRECTION_COLUMN_REVERSE2,
18733
+ FLEX_DIRECTION_ROW: FLEX_DIRECTION_ROW2,
18734
+ FLEX_DIRECTION_ROW_REVERSE: FLEX_DIRECTION_ROW_REVERSE2,
18735
+ GUTTER_COLUMN: GUTTER_COLUMN2,
18736
+ GUTTER_ROW: GUTTER_ROW2,
18737
+ GUTTER_ALL: GUTTER_ALL2,
18738
+ JUSTIFY_FLEX_START: JUSTIFY_FLEX_START2,
18739
+ JUSTIFY_CENTER: JUSTIFY_CENTER2,
18740
+ JUSTIFY_FLEX_END: JUSTIFY_FLEX_END2,
18741
+ JUSTIFY_SPACE_BETWEEN: JUSTIFY_SPACE_BETWEEN2,
18742
+ JUSTIFY_SPACE_AROUND: JUSTIFY_SPACE_AROUND2,
18743
+ JUSTIFY_SPACE_EVENLY: JUSTIFY_SPACE_EVENLY2,
18744
+ LOG_LEVEL_ERROR: LOG_LEVEL_ERROR2,
18745
+ LOG_LEVEL_WARN: LOG_LEVEL_WARN2,
18746
+ LOG_LEVEL_INFO: LOG_LEVEL_INFO2,
18747
+ LOG_LEVEL_DEBUG: LOG_LEVEL_DEBUG2,
18748
+ LOG_LEVEL_VERBOSE: LOG_LEVEL_VERBOSE2,
18749
+ LOG_LEVEL_FATAL: LOG_LEVEL_FATAL2,
18750
+ MEASURE_MODE_UNDEFINED: MEASURE_MODE_UNDEFINED2,
18751
+ MEASURE_MODE_EXACTLY: MEASURE_MODE_EXACTLY2,
18752
+ MEASURE_MODE_AT_MOST: MEASURE_MODE_AT_MOST2,
18753
+ NODE_TYPE_DEFAULT: NODE_TYPE_DEFAULT2,
18754
+ NODE_TYPE_TEXT: NODE_TYPE_TEXT2,
18755
+ OVERFLOW_VISIBLE: OVERFLOW_VISIBLE2,
18756
+ OVERFLOW_HIDDEN: OVERFLOW_HIDDEN2,
18757
+ OVERFLOW_SCROLL: OVERFLOW_SCROLL2,
18758
+ POSITION_TYPE_STATIC: POSITION_TYPE_STATIC2,
18759
+ POSITION_TYPE_RELATIVE: POSITION_TYPE_RELATIVE2,
18760
+ POSITION_TYPE_ABSOLUTE: POSITION_TYPE_ABSOLUTE2,
18761
+ UNIT_UNDEFINED: UNIT_UNDEFINED2,
18762
+ UNIT_POINT: UNIT_POINT2,
18763
+ UNIT_PERCENT: UNIT_PERCENT2,
18764
+ UNIT_AUTO: UNIT_AUTO2,
18765
+ WRAP_NO_WRAP: WRAP_NO_WRAP2,
18766
+ WRAP_WRAP: WRAP_WRAP2,
18767
+ WRAP_WRAP_REVERSE: WRAP_WRAP_REVERSE2
18620
18768
  };
18621
18769
  var yoga_default = Yoga;
18622
18770
 
18623
- export { toArrayBuffer, singleton, envRegistry, registerEnvVar, clearEnvCache, generateEnvMarkdown, generateEnvColored, env, sleep, stringWidth2 as stringWidth, resolveBundledFilePath, DEFAULT_FOREGROUND_RGB, DEFAULT_BACKGROUND_RGB, normalizeIndexedColorIndex, ansi256IndexToRgb, RGBA, normalizeColorValue, hexToRgb, rgbToHex, hsvToRgb, parseColor, isValidBorderStyle, parseBorderStyle, BorderChars, getBorderFromSides, getBorderSides, borderCharsToArray, BorderCharArrays, KeyEvent, PasteEvent, KeyHandler, InternalKeyHandler, 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, terminalNamedSingleStrokeKeys, parseKeypress, LinearScrollAccel, MacOSScrollAccel, parseAlign, parseAlignItems, parseBoxSizing, parseDimension, parseDirection, parseDisplay, parseEdge, parseFlexDirection, parseGutter, parseJustify, parseLogLevel, parseMeasureMode, parseOverflow, parsePositionType, parseUnit, parseWrap, MouseParser, Selection, convertGlobalToLocalSelection, ASCIIFontSelectionHelper, StdinParser, treeSitterToTextChunks, treeSitterToStyledText, addDefaultParsers, TreeSitterClient, DataPathsManager, getDataPaths, extensionToFiletype, basenameToFiletype, extToFiletype, pathToFiletype, infoStringToFiletype, getTreeSitterClient, destroyTreeSitterClient, ExtmarksController, createExtmarksController, TerminalPalette, createTerminalPalette, normalizeTerminalPalette, buildTerminalPaletteSignature, decodePasteBytes, stripAnsiSequences, createHostClipboard, createClipboard, ClipboardTarget, createRendererClipboardAdapter, Clipboard, detectLinks, OptimizedBuffer, TextBuffer, SpanInfoStruct, NativeAudioStreamFormat, NativeAudioStreamState, NativeAudioStreamStateNames, NativeAudioStreamCloseReason, NativeAudioStreamState2 as NativeAudioStreamState1, NativeAudioStreamCloseReason2 as NativeAudioStreamCloseReason1, NativeAudioStreamFormat2 as NativeAudioStreamFormat1, NativeClipboardOperationStatus, NativeClipboardStartStatus, NativeClipboardCancelStatus, NativeClipboardCopyStatus, NativeClipboardDestroyStatus, NativeClipboardShutdownStatus, LogLevel2 as LogLevel, NativeMeasureTargetKind, setRenderLibPath, resolveRenderLib, Align, BoxSizing, Dimension, Direction, Display, Edge, Errata, ExperimentalFeature, FlexDirection, Gutter, Justify, LogLevel as LogLevel1, MeasureMode, NodeType, Overflow, PositionType, Unit, Wrap, ALIGN_AUTO, ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH, ALIGN_BASELINE, ALIGN_SPACE_BETWEEN, ALIGN_SPACE_AROUND, ALIGN_SPACE_EVENLY, BOX_SIZING_BORDER_BOX, BOX_SIZING_CONTENT_BOX, DIMENSION_WIDTH, DIMENSION_HEIGHT, DIRECTION_INHERIT, DIRECTION_LTR, DIRECTION_RTL, DISPLAY_FLEX, DISPLAY_NONE, DISPLAY_CONTENTS, EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_START, EDGE_END, EDGE_HORIZONTAL, EDGE_VERTICAL, EDGE_ALL, ERRATA_NONE, ERRATA_STRETCH_FLEX_BASIS, ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING, ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE, ERRATA_ALL, ERRATA_CLASSIC, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS, FLEX_DIRECTION_COLUMN, FLEX_DIRECTION_COLUMN_REVERSE, FLEX_DIRECTION_ROW, FLEX_DIRECTION_ROW_REVERSE, GUTTER_COLUMN, GUTTER_ROW, GUTTER_ALL, JUSTIFY_FLEX_START, JUSTIFY_CENTER, JUSTIFY_FLEX_END, JUSTIFY_SPACE_BETWEEN, JUSTIFY_SPACE_AROUND, JUSTIFY_SPACE_EVENLY, LOG_LEVEL_ERROR, LOG_LEVEL_WARN, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_VERBOSE, LOG_LEVEL_FATAL, MEASURE_MODE_UNDEFINED, MEASURE_MODE_EXACTLY, MEASURE_MODE_AT_MOST, NODE_TYPE_DEFAULT, NODE_TYPE_TEXT, OVERFLOW_VISIBLE, OVERFLOW_HIDDEN, OVERFLOW_SCROLL, POSITION_TYPE_STATIC, POSITION_TYPE_RELATIVE, POSITION_TYPE_ABSOLUTE, UNIT_UNDEFINED, UNIT_POINT, UNIT_PERCENT, UNIT_AUTO, WRAP_NO_WRAP, WRAP_WRAP, WRAP_WRAP_REVERSE, Config, Node, exports_yoga, yoga_default };
18771
+ export { toArrayBuffer, singleton, envRegistry2, registerEnvVar2, clearEnvCache2, generateEnvMarkdown2, generateEnvColored2, env2, sleep, stringWidth, resolveBundledFilePath2, DEFAULT_FOREGROUND_RGB2, DEFAULT_BACKGROUND_RGB2, normalizeIndexedColorIndex2, ansi256IndexToRgb2, RGBA2, normalizeColorValue2, hexToRgb2, rgbToHex2, hsvToRgb2, parseColor2, isValidBorderStyle2, parseBorderStyle2, BorderChars2, getBorderFromSides2, getBorderSides2, borderCharsToArray2, BorderCharArrays2, KeyEvent2, PasteEvent2, KeyHandler2, InternalKeyHandler2, fonts2, measureText2, getCharacterPositions2, coordinateToCharacterIndex2, renderFontToFrameBuffer2, TextAttributes2, ATTRIBUTE_BASE_BITS2, ATTRIBUTE_BASE_MASK2, getBaseAttributes2, DebugOverlayCorner2, TargetChannel2, createTextAttributes2, attributesWithLink2, getLinkId2, visualizeRenderableTree2, isStyledText2, StyledText2, stringToStyledText2, black2, red2, green2, yellow2, blue2, magenta2, cyan2, white2, brightBlack2, brightRed2, brightGreen2, brightYellow2, brightBlue2, brightMagenta2, brightCyan2, brightWhite2, bgBlack2, bgRed2, bgGreen2, bgYellow2, bgBlue2, bgMagenta2, bgCyan2, bgWhite2, bold2, italic2, underline2, strikethrough2, dim2, reverse2, blink2, fg2, bg2, link2, t2, hastToStyledText2, SystemClock2, nonAlphanumericKeys2, terminalNamedSingleStrokeKeys2, parseKeypress2, LinearScrollAccel2, MacOSScrollAccel2, parseAlign2, parseAlignItems2, parseBoxSizing2, parseDimension2, parseDirection2, parseDisplay2, parseEdge2, parseFlexDirection2, parseGutter2, parseJustify2, parseLogLevel2, parseMeasureMode2, parseOverflow2, parsePositionType2, parseUnit2, parseWrap2, MouseParser2, Selection2, convertGlobalToLocalSelection2, ASCIIFontSelectionHelper2, StdinParser2, addDefaultParsers2, TreeSitterClient2, treeSitterToTextChunks2, treeSitterToStyledText2, DataPathsManager2, getDataPaths2, extensionToFiletype2, basenameToFiletype2, extToFiletype2, pathToFiletype2, infoStringToFiletype2, getTreeSitterClient2, destroyTreeSitterClient2, ExtmarksController2, createExtmarksController2, TerminalPalette2, createTerminalPalette2, normalizeTerminalPalette2, buildTerminalPaletteSignature2, decodePasteBytes2, stripAnsiSequences2, createHostClipboard2, createClipboard2, ClipboardTarget2, createRendererClipboardAdapter2, Clipboard2, normalizeMarkdownLinkTarget, detectLinks2, OptimizedBuffer2, TextBuffer2, SpanInfoStruct, NativeAudioStreamFormat2, NativeAudioStreamState2, NativeAudioStreamStateNames, NativeAudioStreamCloseReason2, NativeAudioStreamState3, NativeAudioStreamCloseReason3, NativeAudioStreamFormat3, MAX_LINK_URL_BYTES2, NativeClipboardOperationStatus2, NativeClipboardStartStatus2, NativeClipboardCancelStatus2, NativeClipboardCopyStatus2, NativeClipboardDestroyStatus2, NativeClipboardShutdownStatus2, LogLevel2, NativeMeasureTargetKind2, setRenderLibPath2, resolveRenderLib2, Align2, BoxSizing2, Dimension2, Direction2, Display2, Edge2, Errata2, ExperimentalFeature2, FlexDirection2, Gutter2, Justify2, LogLevel3, MeasureMode2, NodeType2, Overflow2, PositionType2, Unit2, Wrap2, ALIGN_AUTO2, ALIGN_FLEX_START2, ALIGN_CENTER2, ALIGN_FLEX_END2, ALIGN_STRETCH2, ALIGN_BASELINE2, ALIGN_SPACE_BETWEEN2, ALIGN_SPACE_AROUND2, ALIGN_SPACE_EVENLY2, BOX_SIZING_BORDER_BOX2, BOX_SIZING_CONTENT_BOX2, DIMENSION_WIDTH2, DIMENSION_HEIGHT2, DIRECTION_INHERIT2, DIRECTION_LTR2, DIRECTION_RTL2, DISPLAY_FLEX2, DISPLAY_NONE2, DISPLAY_CONTENTS2, EDGE_LEFT2, EDGE_TOP2, EDGE_RIGHT2, EDGE_BOTTOM2, EDGE_START2, EDGE_END2, EDGE_HORIZONTAL2, EDGE_VERTICAL2, EDGE_ALL2, ERRATA_NONE2, ERRATA_STRETCH_FLEX_BASIS2, ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2, ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2, ERRATA_ALL2, ERRATA_CLASSIC2, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2, FLEX_DIRECTION_COLUMN2, FLEX_DIRECTION_COLUMN_REVERSE2, FLEX_DIRECTION_ROW2, FLEX_DIRECTION_ROW_REVERSE2, GUTTER_COLUMN2, GUTTER_ROW2, GUTTER_ALL2, JUSTIFY_FLEX_START2, JUSTIFY_CENTER2, JUSTIFY_FLEX_END2, JUSTIFY_SPACE_BETWEEN2, JUSTIFY_SPACE_AROUND2, JUSTIFY_SPACE_EVENLY2, LOG_LEVEL_ERROR2, LOG_LEVEL_WARN2, LOG_LEVEL_INFO2, LOG_LEVEL_DEBUG2, LOG_LEVEL_VERBOSE2, LOG_LEVEL_FATAL2, MEASURE_MODE_UNDEFINED2, MEASURE_MODE_EXACTLY2, MEASURE_MODE_AT_MOST2, NODE_TYPE_DEFAULT2, NODE_TYPE_TEXT2, OVERFLOW_VISIBLE2, OVERFLOW_HIDDEN2, OVERFLOW_SCROLL2, POSITION_TYPE_STATIC2, POSITION_TYPE_RELATIVE2, POSITION_TYPE_ABSOLUTE2, UNIT_UNDEFINED2, UNIT_POINT2, UNIT_PERCENT2, UNIT_AUTO2, WRAP_NO_WRAP2, WRAP_WRAP2, WRAP_WRAP_REVERSE2, Config2, Node2, exports_yoga, yoga_default };
18624
18772
 
18625
- //# debugId=379FA7D2639D063564756E2164756E21
18626
- //# sourceMappingURL=chunk-node-f647ts9q.js.map
18773
+ //# debugId=C8F70BCDECDD4B1164756E2164756E21
18774
+ //# sourceMappingURL=chunk-node-70eg2nhg.js.map