@opentui/core 0.5.10 → 0.5.12

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 (48) hide show
  1. package/README.md +2 -0
  2. package/audio.d.ts +6 -1
  3. package/{chunk-bun-9gqvxy8c.js → chunk-bun-8f4q4e2m.js} +1234 -1039
  4. package/{chunk-bun-9gqvxy8c.js.map → chunk-bun-8f4q4e2m.js.map} +8 -8
  5. package/{chunk-bun-bb3k0yt8.js → chunk-bun-91mz470w.js} +680 -585
  6. package/chunk-bun-91mz470w.js.map +32 -0
  7. package/{chunk-node-f647ts9q.js → chunk-node-1zjyxy5y.js} +1241 -1043
  8. package/chunk-node-1zjyxy5y.js.map +63 -0
  9. package/{chunk-node-6bg8r2m7.js → chunk-node-fyb4fckk.js} +680 -585
  10. package/chunk-node-fyb4fckk.js.map +32 -0
  11. package/editor-view.d.ts +1 -0
  12. package/index.bun.js +1603 -1377
  13. package/index.bun.js.map +8 -8
  14. package/index.node.js +1603 -1377
  15. package/index.node.js.map +8 -8
  16. package/lib/detect-links.d.ts +5 -0
  17. package/lib/tree-sitter/update-assets.js +4 -4
  18. package/lib/tree-sitter/update-assets.js.map +2 -2
  19. package/lib/tree-sitter-styled-text.d.ts +4 -0
  20. package/node-assets.js +6 -2
  21. package/node-assets.js.map +3 -3
  22. package/package.json +13 -9
  23. package/parser.worker.js +7 -12
  24. package/parser.worker.js.map +3 -3
  25. package/renderables/Code.d.ts +6 -0
  26. package/renderables/Diff.d.ts +1 -2
  27. package/renderables/EmbeddedTerminal.d.ts +4 -0
  28. package/renderables/Markdown.d.ts +6 -0
  29. package/renderables/TextBufferRenderable.d.ts +7 -0
  30. package/renderables/TextTable.d.ts +2 -0
  31. package/renderer.d.ts +2 -0
  32. package/runtime-plugin.js +15 -4
  33. package/runtime-plugin.js.map +1 -1
  34. package/testing.bun.js +23 -23
  35. package/testing.bun.js.map +2 -2
  36. package/testing.js +23 -23
  37. package/testing.js.map +2 -2
  38. package/text-buffer-view.d.ts +2 -0
  39. package/types.d.ts +2 -1
  40. package/yoga.bun.js +187 -187
  41. package/yoga.bun.js.map +1 -1
  42. package/yoga.js +187 -187
  43. package/yoga.js.map +1 -1
  44. package/zig-structs.d.ts +8 -1
  45. package/zig.d.ts +6 -0
  46. package/chunk-bun-bb3k0yt8.js.map +0 -32
  47. package/chunk-node-6bg8r2m7.js.map +0 -32
  48. package/chunk-node-f647ts9q.js.map +0 -63
@@ -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
  }
@@ -8294,11 +8301,9 @@ function createNodeWorkerConstructor(node) {
8294
8301
  return this.terminationPromise;
8295
8302
  }
8296
8303
  this.worker.off("message", this.handleMessage);
8297
- this.worker.off("error", this.handleError);
8298
8304
  const termination = this.worker.terminate().catch((error) => {
8299
8305
  this.terminationPromise = undefined;
8300
8306
  this.worker.on("message", this.handleMessage);
8301
- this.worker.on("error", this.handleError);
8302
8307
  throw error;
8303
8308
  });
8304
8309
  this.terminationPromise = termination;
@@ -8472,14 +8477,14 @@ function setGlobalWorkerMessageHandler(handler) {
8472
8477
  }
8473
8478
 
8474
8479
  // src/lib/tree-sitter/client.ts
8475
- registerEnvVar({
8480
+ registerEnvVar2({
8476
8481
  name: "OTUI_TREE_SITTER_WORKER_PATH",
8477
8482
  description: "Path to the TreeSitter worker entry script",
8478
8483
  type: "string",
8479
8484
  default: ""
8480
8485
  });
8481
8486
  var DEFAULT_PARSER_OVERRIDES = [];
8482
- function addDefaultParsers(parsers) {
8487
+ function addDefaultParsers2(parsers) {
8483
8488
  for (const parser of parsers) {
8484
8489
  DEFAULT_PARSER_OVERRIDES = [
8485
8490
  ...DEFAULT_PARSER_OVERRIDES.filter((existingParser) => existingParser.filetype !== parser.filetype),
@@ -8489,7 +8494,7 @@ function addDefaultParsers(parsers) {
8489
8494
  }
8490
8495
  var isUrl = (path) => path.startsWith("http://") || path.startsWith("https://");
8491
8496
 
8492
- class TreeSitterClient extends EventEmitter2 {
8497
+ class TreeSitterClient2 extends EventEmitter2 {
8493
8498
  initialized = false;
8494
8499
  worker;
8495
8500
  buffers = new Map;
@@ -8597,8 +8602,8 @@ class TreeSitterClient extends EventEmitter2 {
8597
8602
  if (this.options.workerPath) {
8598
8603
  return this.options.workerPath;
8599
8604
  }
8600
- if (env.OTUI_TREE_SITTER_WORKER_PATH) {
8601
- return env.OTUI_TREE_SITTER_WORKER_PATH;
8605
+ if (env2.OTUI_TREE_SITTER_WORKER_PATH) {
8606
+ return env2.OTUI_TREE_SITTER_WORKER_PATH;
8602
8607
  }
8603
8608
  if (typeof OTUI_TREE_SITTER_WORKER_PATH !== "undefined") {
8604
8609
  return OTUI_TREE_SITTER_WORKER_PATH;
@@ -8683,7 +8688,7 @@ class TreeSitterClient extends EventEmitter2 {
8683
8688
  async initializeClient(generation, worker) {
8684
8689
  const treeSitterWasmPath = await resolveTreeSitterWasm();
8685
8690
  this.assertCurrentInitialization(generation, worker);
8686
- await new Promise((resolve3, reject) => {
8691
+ await new Promise((resolve, reject) => {
8687
8692
  const timeoutMs = this.options.initTimeout ?? 1e4;
8688
8693
  const timeoutId = setTimeout(() => {
8689
8694
  const error = new Error("Worker initialization timed out");
@@ -8691,7 +8696,7 @@ class TreeSitterClient extends EventEmitter2 {
8691
8696
  this.initializeResolvers = undefined;
8692
8697
  reject(error);
8693
8698
  }, timeoutMs);
8694
- this.initializeResolvers = { resolve: resolve3, reject, timeoutId };
8699
+ this.initializeResolvers = { resolve, reject, timeoutId };
8695
8700
  this.sendWorkerMessage({
8696
8701
  type: "INIT",
8697
8702
  dataPath: this.options.dataPath,
@@ -8708,7 +8713,7 @@ class TreeSitterClient extends EventEmitter2 {
8708
8713
  this.assertCurrentInitialization(generation, worker);
8709
8714
  const overriddenFiletypes = new Set(DEFAULT_PARSER_OVERRIDES.map((parser) => parser.filetype));
8710
8715
  for (const parser of [
8711
- ...defaultParsers.filter((parser2) => !overriddenFiletypes.has(parser2.filetype)),
8716
+ ...defaultParsers.filter((parser) => !overriddenFiletypes.has(parser.filetype)),
8712
8717
  ...DEFAULT_PARSER_OVERRIDES
8713
8718
  ]) {
8714
8719
  worker.postMessage({ type: "ADD_FILETYPE_PARSER", filetypeParser: this.resolveFiletypeParser(parser) });
@@ -8742,8 +8747,8 @@ class TreeSitterClient extends EventEmitter2 {
8742
8747
  }
8743
8748
  async getPerformance() {
8744
8749
  const messageId = `performance_${this.messageIdCounter++}`;
8745
- return new Promise((resolve3, reject) => {
8746
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8750
+ return new Promise((resolve, reject) => {
8751
+ this.messageCallbacks.set(messageId, { resolve, reject });
8747
8752
  try {
8748
8753
  this.sendWorkerMessage({ type: "GET_PERFORMANCE", messageId });
8749
8754
  } catch (error) {
@@ -8761,8 +8766,8 @@ class TreeSitterClient extends EventEmitter2 {
8761
8766
  }
8762
8767
  }
8763
8768
  const messageId = `oneshot_${this.messageIdCounter++}`;
8764
- return new Promise((resolve3, reject) => {
8765
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8769
+ return new Promise((resolve, reject) => {
8770
+ this.messageCallbacks.set(messageId, { resolve, reject });
8766
8771
  try {
8767
8772
  this.sendWorkerMessage({
8768
8773
  type: "ONESHOT_HIGHLIGHT",
@@ -8885,8 +8890,8 @@ class TreeSitterClient extends EventEmitter2 {
8885
8890
  }
8886
8891
  async preloadParser(filetype) {
8887
8892
  const messageId = `has_parser_${this.messageIdCounter++}`;
8888
- const response = await new Promise((resolve3, reject) => {
8889
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8893
+ const response = await new Promise((resolve, reject) => {
8894
+ this.messageCallbacks.set(messageId, { resolve, reject });
8890
8895
  try {
8891
8896
  this.sendWorkerMessage({
8892
8897
  type: "PRELOAD_PARSER",
@@ -8918,8 +8923,8 @@ class TreeSitterClient extends EventEmitter2 {
8918
8923
  }
8919
8924
  this.buffers.set(id, { id, content, filetype, version, hasParser: false });
8920
8925
  const messageId = `init_${this.messageIdCounter++}`;
8921
- const response = await new Promise((resolve3, reject) => {
8922
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8926
+ const response = await new Promise((resolve, reject) => {
8927
+ this.messageCallbacks.set(messageId, { resolve, reject });
8923
8928
  try {
8924
8929
  this.sendWorkerMessage({
8925
8930
  type: "INITIALIZE_PARSER",
@@ -8980,9 +8985,9 @@ class TreeSitterClient extends EventEmitter2 {
8980
8985
  this.editQueues.delete(bufferId);
8981
8986
  }
8982
8987
  if (this.worker) {
8983
- await new Promise((resolve3, reject) => {
8988
+ await new Promise((resolve, reject) => {
8984
8989
  const messageId = `dispose_${bufferId}`;
8985
- this.messageCallbacks.set(messageId, { resolve: resolve3, reject });
8990
+ this.messageCallbacks.set(messageId, { resolve, reject });
8986
8991
  try {
8987
8992
  this.sendWorkerMessage({
8988
8993
  type: "DISPOSE_BUFFER",
@@ -8991,13 +8996,13 @@ class TreeSitterClient extends EventEmitter2 {
8991
8996
  } catch (error) {
8992
8997
  console.error("Error disposing buffer", error);
8993
8998
  this.messageCallbacks.delete(messageId);
8994
- resolve3(false);
8999
+ resolve(false);
8995
9000
  }
8996
9001
  setTimeout(() => {
8997
9002
  if (this.messageCallbacks.has(messageId)) {
8998
9003
  this.messageCallbacks.delete(messageId);
8999
9004
  console.warn({ bufferId }, "Timed out waiting for buffer to be disposed");
9000
- resolve3(false);
9005
+ resolve(false);
9001
9006
  }
9002
9007
  }, 3000);
9003
9008
  });
@@ -9010,8 +9015,8 @@ class TreeSitterClient extends EventEmitter2 {
9010
9015
  }
9011
9016
  let resolveDestroy;
9012
9017
  let rejectDestroy;
9013
- const destroyPromise = new Promise((resolve3, reject) => {
9014
- resolveDestroy = resolve3;
9018
+ const destroyPromise = new Promise((resolve, reject) => {
9019
+ resolveDestroy = resolve;
9015
9020
  rejectDestroy = reject;
9016
9021
  });
9017
9022
  this.destroyPromise = destroyPromise;
@@ -9076,13 +9081,13 @@ class TreeSitterClient extends EventEmitter2 {
9076
9081
  this.options.dataPath = dataPath;
9077
9082
  if (this.initialized && this.worker) {
9078
9083
  const messageId = `update_datapath_${this.messageIdCounter++}`;
9079
- return new Promise((resolve3, reject) => {
9084
+ return new Promise((resolve, reject) => {
9080
9085
  this.messageCallbacks.set(messageId, {
9081
9086
  resolve: (response) => {
9082
9087
  if (response.error) {
9083
9088
  reject(new Error(response.error));
9084
9089
  } else {
9085
- resolve3();
9090
+ resolve();
9086
9091
  }
9087
9092
  },
9088
9093
  reject
@@ -9105,13 +9110,13 @@ class TreeSitterClient extends EventEmitter2 {
9105
9110
  throw new Error("Cannot clear cache: client is not initialized");
9106
9111
  }
9107
9112
  const messageId = `clear_cache_${this.messageIdCounter++}`;
9108
- return new Promise((resolve3, reject) => {
9113
+ return new Promise((resolve, reject) => {
9109
9114
  this.messageCallbacks.set(messageId, {
9110
9115
  resolve: (response) => {
9111
9116
  if (response.error) {
9112
9117
  reject(new Error(response.error));
9113
9118
  } else {
9114
- resolve3();
9119
+ resolve();
9115
9120
  }
9116
9121
  },
9117
9122
  reject
@@ -9183,20 +9188,20 @@ function isValidDirectoryName(name) {
9183
9188
  }
9184
9189
 
9185
9190
  // src/lib/data-paths.ts
9186
- registerEnvVar({
9191
+ registerEnvVar2({
9187
9192
  name: "XDG_CONFIG_HOME",
9188
9193
  description: "Base directory for user-specific configuration files",
9189
9194
  type: "string",
9190
9195
  default: ""
9191
9196
  });
9192
- registerEnvVar({
9197
+ registerEnvVar2({
9193
9198
  name: "XDG_DATA_HOME",
9194
9199
  description: "Base directory for user-specific data files",
9195
9200
  type: "string",
9196
9201
  default: ""
9197
9202
  });
9198
9203
 
9199
- class DataPathsManager extends EventEmitter3 {
9204
+ class DataPathsManager2 extends EventEmitter3 {
9200
9205
  _appName;
9201
9206
  _globalConfigPath;
9202
9207
  _globalConfigFile;
@@ -9225,7 +9230,7 @@ class DataPathsManager extends EventEmitter3 {
9225
9230
  get globalConfigPath() {
9226
9231
  if (this._globalConfigPath === undefined) {
9227
9232
  const homeDir = os.homedir();
9228
- const xdgConfigHome = env.XDG_CONFIG_HOME;
9233
+ const xdgConfigHome = env2.XDG_CONFIG_HOME;
9229
9234
  const baseConfigDir = xdgConfigHome || path.join(homeDir, ".config");
9230
9235
  this._globalConfigPath = path.join(baseConfigDir, this._appName);
9231
9236
  }
@@ -9246,7 +9251,7 @@ class DataPathsManager extends EventEmitter3 {
9246
9251
  get globalDataPath() {
9247
9252
  if (this._globalDataPath === undefined) {
9248
9253
  const homeDir = os.homedir();
9249
- const xdgDataHome = env.XDG_DATA_HOME;
9254
+ const xdgDataHome = env2.XDG_DATA_HOME;
9250
9255
  const baseDataDir = xdgDataHome || path.join(homeDir, ".local/share");
9251
9256
  this._globalDataPath = path.join(baseDataDir, this._appName);
9252
9257
  }
@@ -9261,12 +9266,12 @@ class DataPathsManager extends EventEmitter3 {
9261
9266
  };
9262
9267
  }
9263
9268
  }
9264
- function getDataPaths() {
9265
- return singleton("data-paths-opentui", () => new DataPathsManager);
9269
+ function getDataPaths2() {
9270
+ return singleton("data-paths-opentui", () => new DataPathsManager2);
9266
9271
  }
9267
9272
  // src/lib/tree-sitter/resolve-ft.ts
9268
9273
  import path2 from "node:path";
9269
- var extensionToFiletype = new Map([
9274
+ var extensionToFiletype2 = new Map([
9270
9275
  ["astro", "astro"],
9271
9276
  ["bash", "bash"],
9272
9277
  ["c", "c"],
@@ -9364,7 +9369,7 @@ var extensionToFiletype = new Map([
9364
9369
  ["java", "java"],
9365
9370
  ["css", "css"]
9366
9371
  ]);
9367
- var basenameToFiletype = new Map([
9372
+ var basenameToFiletype2 = new Map([
9368
9373
  [".bash_aliases", "bash"],
9369
9374
  [".bash_logout", "bash"],
9370
9375
  [".bash_profile", "bash"],
@@ -9402,43 +9407,43 @@ function getBasename(value) {
9402
9407
  const normalizedValue = value.trim().replaceAll("\\", "/");
9403
9408
  if (!normalizedValue)
9404
9409
  return;
9405
- const basename2 = path2.posix.basename(normalizedValue).toLowerCase();
9406
- return basename2 || undefined;
9410
+ const basename = path2.posix.basename(normalizedValue).toLowerCase();
9411
+ return basename || undefined;
9407
9412
  }
9408
- function extToFiletype(extension) {
9413
+ function extToFiletype2(extension) {
9409
9414
  const normalizedExtension = normalizeFiletypeToken(extension);
9410
9415
  if (!normalizedExtension)
9411
9416
  return;
9412
- return extensionToFiletype.get(normalizedExtension);
9417
+ return extensionToFiletype2.get(normalizedExtension);
9413
9418
  }
9414
- function pathToFiletype(path3) {
9415
- if (typeof path3 !== "string")
9419
+ function pathToFiletype2(path) {
9420
+ if (typeof path !== "string")
9416
9421
  return;
9417
- const basename2 = getBasename(path3);
9418
- if (!basename2)
9422
+ const basename = getBasename(path);
9423
+ if (!basename)
9419
9424
  return;
9420
- const basenameFiletype = basenameToFiletype.get(basename2);
9425
+ const basenameFiletype = basenameToFiletype2.get(basename);
9421
9426
  if (basenameFiletype) {
9422
9427
  return basenameFiletype;
9423
9428
  }
9424
- const lastDot = basename2.lastIndexOf(".");
9425
- if (lastDot === -1 || lastDot === basename2.length - 1) {
9429
+ const lastDot = basename.lastIndexOf(".");
9430
+ if (lastDot === -1 || lastDot === basename.length - 1) {
9426
9431
  return;
9427
9432
  }
9428
- const extension = basename2.substring(lastDot + 1);
9429
- return extToFiletype(extension);
9433
+ const extension = basename.substring(lastDot + 1);
9434
+ return extToFiletype2(extension);
9430
9435
  }
9431
- function infoStringToFiletype(infoString) {
9436
+ function infoStringToFiletype2(infoString) {
9432
9437
  if (typeof infoString !== "string")
9433
9438
  return;
9434
9439
  const token = infoString.trim().split(/\s+/, 1)[0];
9435
- const directBasenameMatch = basenameToFiletype.get(token.toLowerCase());
9440
+ const directBasenameMatch = basenameToFiletype2.get(token.toLowerCase());
9436
9441
  if (directBasenameMatch)
9437
9442
  return directBasenameMatch;
9438
9443
  const normalizedToken = normalizeFiletypeToken(token);
9439
9444
  if (!normalizedToken)
9440
9445
  return;
9441
- return basenameToFiletype.get(normalizedToken) ?? pathToFiletype(normalizedToken) ?? extToFiletype(normalizedToken) ?? normalizedToken;
9446
+ return basenameToFiletype2.get(normalizedToken) ?? pathToFiletype2(normalizedToken) ?? extToFiletype2(normalizedToken) ?? normalizedToken;
9442
9447
  }
9443
9448
 
9444
9449
  // src/lib/tree-sitter/index.ts
@@ -9447,17 +9452,17 @@ var TREE_SITTER_CLIENT_LISTENER_STATE_KEY = "tree-sitter-client-listener-state";
9447
9452
  function getTreeSitterClientListenerState() {
9448
9453
  return singleton(TREE_SITTER_CLIENT_LISTENER_STATE_KEY, () => ({}));
9449
9454
  }
9450
- function getTreeSitterClient() {
9455
+ function getTreeSitterClient2() {
9451
9456
  const existingClient = getSingleton(TREE_SITTER_CLIENT_KEY);
9452
9457
  if (existingClient) {
9453
9458
  return existingClient;
9454
9459
  }
9455
- const dataPathsManager = getDataPaths();
9460
+ const dataPathsManager = getDataPaths2();
9456
9461
  const defaultOptions = {
9457
9462
  dataPath: dataPathsManager.globalDataPath
9458
9463
  };
9459
9464
  return singleton(TREE_SITTER_CLIENT_KEY, () => {
9460
- const client2 = new TreeSitterClient(defaultOptions);
9465
+ const client2 = new TreeSitterClient2(defaultOptions);
9461
9466
  const listenerState = getTreeSitterClientListenerState();
9462
9467
  const handlePathsChanged = (paths) => {
9463
9468
  client2.setDataPath(paths.globalDataPath).catch((error) => {
@@ -9479,7 +9484,7 @@ function getTreeSitterClient() {
9479
9484
  return client2;
9480
9485
  });
9481
9486
  }
9482
- async function destroyTreeSitterClient() {
9487
+ async function destroyTreeSitterClient2() {
9483
9488
  const client2 = getSingleton(TREE_SITTER_CLIENT_KEY);
9484
9489
  if (!client2) {
9485
9490
  const listenerState = getSingleton(TREE_SITTER_CLIENT_LISTENER_STATE_KEY);
@@ -9533,7 +9538,7 @@ class ExtmarksHistory {
9533
9538
  }
9534
9539
 
9535
9540
  // src/lib/extmarks.ts
9536
- class ExtmarksController {
9541
+ class ExtmarksController2 {
9537
9542
  editBuffer;
9538
9543
  editorView;
9539
9544
  extmarks = new Map;
@@ -9740,11 +9745,11 @@ class ExtmarksController {
9740
9745
  if (virtualExtmark && currentOffset === virtualExtmark.end) {
9741
9746
  const startCursor = this.offsetToPosition(virtualExtmark.start);
9742
9747
  const endCursor = this.offsetToPosition(virtualExtmark.end);
9743
- const deleteOffset2 = virtualExtmark.start;
9744
- const deleteLength2 = virtualExtmark.end - virtualExtmark.start;
9748
+ const deleteOffset = virtualExtmark.start;
9749
+ const deleteLength = virtualExtmark.end - virtualExtmark.start;
9745
9750
  this.deleteExtmarkById(virtualExtmark.id);
9746
9751
  this.originalDeleteRange(startCursor.row, startCursor.col, endCursor.row, endCursor.col);
9747
- this.adjustExtmarksAfterDeletion(deleteOffset2, deleteLength2);
9752
+ this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength);
9748
9753
  this.updateHighlights();
9749
9754
  return;
9750
9755
  }
@@ -9773,10 +9778,10 @@ class ExtmarksController {
9773
9778
  const startCursor = this.offsetToPosition(virtualExtmark.start);
9774
9779
  const endCursor = this.offsetToPosition(virtualExtmark.end);
9775
9780
  const deleteOffset = virtualExtmark.start;
9776
- const deleteLength2 = virtualExtmark.end - virtualExtmark.start;
9781
+ const deleteLength = virtualExtmark.end - virtualExtmark.start;
9777
9782
  this.deleteExtmarkById(virtualExtmark.id);
9778
9783
  this.originalDeleteRange(startCursor.row, startCursor.col, endCursor.row, endCursor.col);
9779
- this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength2);
9784
+ this.adjustExtmarksAfterDeletion(deleteOffset, deleteLength);
9780
9785
  this.updateHighlights();
9781
9786
  return;
9782
9787
  }
@@ -10022,13 +10027,13 @@ class ExtmarksController {
10022
10027
  j++;
10023
10028
  }
10024
10029
  const chunk = text.substring(i, j);
10025
- const chunkWidth = stringWidth2(chunk);
10030
+ const chunkWidth = stringWidth(chunk);
10026
10031
  if (displayWidthSoFar + chunkWidth < offset) {
10027
10032
  displayWidthSoFar += chunkWidth;
10028
10033
  i = j;
10029
10034
  } else {
10030
10035
  for (let k = i;k < j && displayWidthSoFar < offset; k++) {
10031
- const charWidth = stringWidth2(text[k]);
10036
+ const charWidth = stringWidth(text[k]);
10032
10037
  displayWidthSoFar += charWidth;
10033
10038
  }
10034
10039
  break;
@@ -10211,12 +10216,12 @@ class ExtmarksController {
10211
10216
  this.destroyed = true;
10212
10217
  }
10213
10218
  }
10214
- function createExtmarksController(editBuffer, editorView) {
10215
- return new ExtmarksController(editBuffer, editorView);
10219
+ function createExtmarksController2(editBuffer, editorView) {
10220
+ return new ExtmarksController2(editBuffer, editorView);
10216
10221
  }
10217
10222
  // src/lib/terminal-palette.ts
10218
- var SYSTEM_CLOCK2 = new SystemClock;
10219
- registerEnvVar({
10223
+ var SYSTEM_CLOCK2 = new SystemClock2;
10224
+ registerEnvVar2({
10220
10225
  name: "OTUI_PALETTE_IDLE_TIMEOUT_MS",
10221
10226
  description: "Milliseconds of silence after palette queries before using fallback colors.",
10222
10227
  type: "number",
@@ -10241,7 +10246,7 @@ function wrapForTmux(osc) {
10241
10246
  return `\x1BPtmux;${escaped}\x1B\\`;
10242
10247
  }
10243
10248
 
10244
- class TerminalPalette {
10249
+ class TerminalPalette2 {
10245
10250
  stdin;
10246
10251
  stdout;
10247
10252
  writeFn;
@@ -10334,7 +10339,7 @@ class TerminalPalette {
10334
10339
  const out = this.stdout;
10335
10340
  if (!out.isTTY || !this.stdin.isTTY)
10336
10341
  return false;
10337
- return new Promise((resolve3) => {
10342
+ return new Promise((resolve) => {
10338
10343
  const session = this.createQuerySession();
10339
10344
  let buffer = "";
10340
10345
  let settled = false;
@@ -10343,7 +10348,7 @@ class TerminalPalette {
10343
10348
  return;
10344
10349
  settled = true;
10345
10350
  session.cleanup();
10346
- resolve3(supported);
10351
+ resolve(supported);
10347
10352
  };
10348
10353
  const onData = (chunk) => {
10349
10354
  buffer += chunk.toString();
@@ -10359,14 +10364,14 @@ class TerminalPalette {
10359
10364
  this.writeOsc("\x1B]4;0;?\x07", true);
10360
10365
  });
10361
10366
  }
10362
- async queryPalette(indices, timeoutMs = 1200, idleTimeoutMs = env.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10367
+ async queryPalette(indices, timeoutMs = 1200, idleTimeoutMs = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10363
10368
  const out = this.stdout;
10364
10369
  const results = new Map;
10365
10370
  indices.forEach((i) => results.set(i, null));
10366
10371
  if (!out.isTTY || !this.stdin.isTTY) {
10367
10372
  return results;
10368
10373
  }
10369
- return new Promise((resolve3) => {
10374
+ return new Promise((resolve) => {
10370
10375
  const session = this.createQuerySession();
10371
10376
  let buffer = "";
10372
10377
  let idleTimer = null;
@@ -10376,7 +10381,7 @@ class TerminalPalette {
10376
10381
  return;
10377
10382
  settled = true;
10378
10383
  session.cleanup();
10379
- resolve3(results);
10384
+ resolve(results);
10380
10385
  };
10381
10386
  const onData = (chunk) => {
10382
10387
  buffer += chunk.toString();
@@ -10402,7 +10407,7 @@ class TerminalPalette {
10402
10407
  idleTimer = session.resetTimer(idleTimer, finish, idleTimeoutMs);
10403
10408
  });
10404
10409
  }
10405
- async querySpecialColors(timeoutMs = 1200, idleTimeoutMs = env.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10410
+ async querySpecialColors(timeoutMs = 1200, idleTimeoutMs = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS) {
10406
10411
  const out = this.stdout;
10407
10412
  const results = {
10408
10413
  10: null,
@@ -10419,7 +10424,7 @@ class TerminalPalette {
10419
10424
  if (!out.isTTY || !this.stdin.isTTY) {
10420
10425
  return results;
10421
10426
  }
10422
- return new Promise((resolve3) => {
10427
+ return new Promise((resolve) => {
10423
10428
  const session = this.createQuerySession();
10424
10429
  let buffer = "";
10425
10430
  let idleTimer = null;
@@ -10429,7 +10434,7 @@ class TerminalPalette {
10429
10434
  return;
10430
10435
  settled = true;
10431
10436
  session.cleanup();
10432
- resolve3(results);
10437
+ resolve(results);
10433
10438
  };
10434
10439
  const onData = (chunk) => {
10435
10440
  buffer += chunk.toString();
@@ -10477,7 +10482,7 @@ class TerminalPalette {
10477
10482
  };
10478
10483
  }
10479
10484
  const indicesToQuery = [...Array(size).keys()];
10480
- const idleTimeout = env.OTUI_PALETTE_IDLE_TIMEOUT_MS;
10485
+ const idleTimeout = env2.OTUI_PALETTE_IDLE_TIMEOUT_MS;
10481
10486
  const [paletteResults, specialColors] = await Promise.all([
10482
10487
  this.queryPalette(indicesToQuery, timeout, idleTimeout),
10483
10488
  this.querySpecialColors(timeout, idleTimeout)
@@ -10496,34 +10501,34 @@ class TerminalPalette {
10496
10501
  };
10497
10502
  }
10498
10503
  }
10499
- function createTerminalPalette(options) {
10500
- return new TerminalPalette(options);
10504
+ function createTerminalPalette2(options) {
10505
+ return new TerminalPalette2(options);
10501
10506
  }
10502
- var DEFAULT_FOREGROUND_FALLBACK = RGBA.fromInts(...DEFAULT_FOREGROUND_RGB);
10503
- var DEFAULT_BACKGROUND_FALLBACK = RGBA.fromInts(...DEFAULT_BACKGROUND_RGB);
10507
+ var DEFAULT_FOREGROUND_FALLBACK = RGBA2.fromInts(...DEFAULT_FOREGROUND_RGB2);
10508
+ var DEFAULT_BACKGROUND_FALLBACK = RGBA2.fromInts(...DEFAULT_BACKGROUND_RGB2);
10504
10509
  var fallbackAnsi256Palette = null;
10505
10510
  function getFallbackAnsi256Palette() {
10506
10511
  if (!fallbackAnsi256Palette) {
10507
10512
  fallbackAnsi256Palette = Array.from({ length: 256 }, (_, index) => {
10508
- const [r, g, b] = ansi256IndexToRgb(index);
10509
- return RGBA.fromInts(r, g, b);
10513
+ const [r, g, b] = ansi256IndexToRgb2(index);
10514
+ return RGBA2.fromInts(r, g, b);
10510
10515
  });
10511
10516
  }
10512
10517
  return fallbackAnsi256Palette;
10513
10518
  }
10514
- function normalizeTerminalPalette(colors) {
10519
+ function normalizeTerminalPalette2(colors) {
10515
10520
  const fallbackPalette = getFallbackAnsi256Palette();
10516
10521
  return {
10517
10522
  palette: Array.from({ length: 256 }, (_, index) => {
10518
10523
  const detected = colors?.palette[index];
10519
- return detected ? RGBA.fromHex(detected) : RGBA.clone(fallbackPalette[index]);
10524
+ return detected ? RGBA2.fromHex(detected) : RGBA2.clone(fallbackPalette[index]);
10520
10525
  }),
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)
10526
+ defaultForeground: colors?.defaultForeground ? RGBA2.fromHex(colors.defaultForeground) : RGBA2.clone(DEFAULT_FOREGROUND_FALLBACK),
10527
+ defaultBackground: colors?.defaultBackground ? RGBA2.fromHex(colors.defaultBackground) : RGBA2.clone(DEFAULT_BACKGROUND_FALLBACK)
10523
10528
  };
10524
10529
  }
10525
- function buildTerminalPaletteSignature(colors) {
10526
- const normalized = normalizeTerminalPalette(colors);
10530
+ function buildTerminalPaletteSignature2(colors) {
10531
+ const normalized = normalizeTerminalPalette2(colors);
10527
10532
  const paletteSignature = normalized.palette.map((color) => color.toInts().join(",")).join(";");
10528
10533
  return [
10529
10534
  paletteSignature,
@@ -10533,10 +10538,10 @@ function buildTerminalPaletteSignature(colors) {
10533
10538
  }
10534
10539
  // src/lib/paste.ts
10535
10540
  var PASTE_TEXT_DECODER = new TextDecoder;
10536
- function decodePasteBytes(bytes) {
10541
+ function decodePasteBytes2(bytes) {
10537
10542
  return PASTE_TEXT_DECODER.decode(bytes);
10538
10543
  }
10539
- function stripAnsiSequences(text) {
10544
+ function stripAnsiSequences2(text) {
10540
10545
  return stripANSI(text);
10541
10546
  }
10542
10547
  // src/lib/host-clipboard.internal.ts
@@ -10635,8 +10640,8 @@ var validateClipboardText = (text, maxWriteBytes) => {
10635
10640
  var createActiveOperation = (callerSignal) => {
10636
10641
  const controller = new AbortController;
10637
10642
  let settle = () => {};
10638
- const settled = new Promise((resolve3) => {
10639
- settle = resolve3;
10643
+ const settled = new Promise((resolve) => {
10644
+ settle = resolve;
10640
10645
  });
10641
10646
  if (callerSignal) {
10642
10647
  callerSignal.addEventListener("abort", () => controller.abort(callerSignal.reason), {
@@ -10663,7 +10668,7 @@ var runTrackedOperation = (active, callerSignal, operation) => {
10663
10668
  };
10664
10669
  var createHostClipboardWithBackend = (options, createBackend) => {
10665
10670
  const config = normalizeOptions(options);
10666
- const backend2 = createBackend(config);
10671
+ const backend = createBackend(config);
10667
10672
  const active = new Set;
10668
10673
  let disposed = false;
10669
10674
  let disposePromise;
@@ -10683,7 +10688,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10683
10688
  if (config.timeoutMs === 0)
10684
10689
  return Promise.resolve({ status: "timed-out" });
10685
10690
  return runTrackedOperation(active, readOptions.signal, async (signal) => {
10686
- const result = await backend2.read({
10691
+ const result = await backend.read({
10687
10692
  preferredTypes,
10688
10693
  selection,
10689
10694
  maxBytes: config.maxReadBytes,
@@ -10709,7 +10714,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10709
10714
  return Promise.resolve({ status: "cancelled" });
10710
10715
  if (config.timeoutMs === 0)
10711
10716
  return Promise.resolve({ status: "timed-out" });
10712
- return runTrackedOperation(active, operationOptions.signal, (signal) => backend2.writeText(text, { selection, timeoutMs: config.timeoutMs, signal }));
10717
+ return runTrackedOperation(active, operationOptions.signal, (signal) => backend.writeText(text, { selection, timeoutMs: config.timeoutMs, signal }));
10713
10718
  } catch (error) {
10714
10719
  return Promise.reject(error);
10715
10720
  }
@@ -10722,7 +10727,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10722
10727
  return Promise.resolve({ status: "cancelled" });
10723
10728
  if (config.timeoutMs === 0)
10724
10729
  return Promise.resolve({ status: "timed-out" });
10725
- return runTrackedOperation(active, operationOptions.signal, (signal) => backend2.clear({ selection, timeoutMs: config.timeoutMs, signal }));
10730
+ return runTrackedOperation(active, operationOptions.signal, (signal) => backend.clear({ selection, timeoutMs: config.timeoutMs, signal }));
10726
10731
  } catch (error) {
10727
10732
  return Promise.reject(error);
10728
10733
  }
@@ -10735,7 +10740,7 @@ var createHostClipboardWithBackend = (options, createBackend) => {
10735
10740
  operation.controller.abort();
10736
10741
  disposePromise = (async () => {
10737
10742
  await Promise.all([...active].map((operation) => operation.settled));
10738
- await backend2.dispose();
10743
+ await backend.dispose();
10739
10744
  })();
10740
10745
  return disposePromise;
10741
10746
  }
@@ -10766,7 +10771,7 @@ var encodeReadRequest = (preferredTypes) => {
10766
10771
  };
10767
10772
  var startFailure = (status) => ({
10768
10773
  status: "failed",
10769
- error: new Error(`Native clipboard operation failed to start (${NativeClipboardStartStatus[status]})`)
10774
+ error: new Error(`Native clipboard operation failed to start (${NativeClipboardStartStatus2[status]})`)
10770
10775
  });
10771
10776
 
10772
10777
  class NativeClipboardBackend {
@@ -10783,7 +10788,7 @@ class NativeClipboardBackend {
10783
10788
  constructor(maxImagePixels, maxConversionBytes, maxConcurrentOperations, maxProviderTransfers, waylandSeat) {
10784
10789
  this.maxImagePixels = maxImagePixels;
10785
10790
  this.maxConversionBytes = maxConversionBytes;
10786
- this.library = resolveRenderLib();
10791
+ this.library = resolveRenderLib2();
10787
10792
  const service = this.library.clipboardServiceCreate(maxConcurrentOperations, maxProviderTransfers, waylandSeat);
10788
10793
  if (!service)
10789
10794
  throw new Error("Failed to create native clipboard service");
@@ -10815,8 +10820,8 @@ class NativeClipboardBackend {
10815
10820
  if (started.status !== 0 /* Ok */ || !started.operation) {
10816
10821
  return Promise.resolve(startFailure(started.status));
10817
10822
  }
10818
- return new Promise((resolve3, reject) => {
10819
- const operation = { handle: started.operation, kind, signal, resolve: resolve3, reject };
10823
+ return new Promise((resolve, reject) => {
10824
+ const operation = { handle: started.operation, kind, signal, resolve, reject };
10820
10825
  this.pending.set(operation.handle, operation);
10821
10826
  signal.addEventListener("abort", () => this.requestCancel(operation), { once: true });
10822
10827
  this.ensureScheduled();
@@ -10889,14 +10894,14 @@ class NativeClipboardBackend {
10889
10894
  try {
10890
10895
  this.library.clipboardOperationCancel(operation.handle);
10891
10896
  } catch {}
10892
- const status2 = this.library.clipboardOperationPoll(operation.handle);
10893
- if (status2 === 0 /* Pending */) {
10897
+ const status = this.library.clipboardOperationPoll(operation.handle);
10898
+ if (status === 0 /* Pending */) {
10894
10899
  this.rotate(operation);
10895
10900
  continue;
10896
10901
  }
10897
10902
  this.providerActive = true;
10898
- const destroyed2 = this.library.clipboardOperationDestroy(operation.handle);
10899
- if (destroyed2 === 1 /* NotReady */) {
10903
+ const destroyed = this.library.clipboardOperationDestroy(operation.handle);
10904
+ if (destroyed === 1 /* NotReady */) {
10900
10905
  this.rotate(operation);
10901
10906
  continue;
10902
10907
  }
@@ -10961,7 +10966,7 @@ class NativeClipboardBackend {
10961
10966
  invalidResult(kind, status) {
10962
10967
  return {
10963
10968
  status: "failed",
10964
- error: new Error(`Native clipboard ${kind} returned inapplicable status ${NativeClipboardOperationStatus[status]}`)
10969
+ error: new Error(`Native clipboard ${kind} returned inapplicable status ${NativeClipboardOperationStatus2[status]}`)
10965
10970
  };
10966
10971
  }
10967
10972
  readRepresentation(handle) {
@@ -10993,7 +10998,7 @@ class NativeClipboardBackend {
10993
10998
  this.clearPollTimer();
10994
10999
  let status = this.library.clipboardServiceBeginShutdown(this.service);
10995
11000
  while (status === 0 /* Pending */) {
10996
- await new Promise((resolve3) => setTimeout(resolve3, SHUTDOWN_POLL_INTERVAL_MS));
11001
+ await new Promise((resolve) => setTimeout(resolve, SHUTDOWN_POLL_INTERVAL_MS));
10997
11002
  status = this.library.clipboardServicePollShutdown(this.service);
10998
11003
  }
10999
11004
  if (status !== 1 /* Ready */)
@@ -11017,13 +11022,13 @@ var validateSelection = (selection) => {
11017
11022
  }
11018
11023
  return normalized;
11019
11024
  };
11020
- var createHostClipboard = (options = {}) => createHostClipboardWithBackend(options, createNativeHostClipboardBackend);
11025
+ var createHostClipboard2 = (options = {}) => createHostClipboardWithBackend(options, createNativeHostClipboardBackend);
11021
11026
  var validateDestination = (destination) => {
11022
11027
  if (destination !== "terminal-only" && destination !== "host-only" && destination !== "best-available" && destination !== "all-available") {
11023
11028
  throw new TypeError("destination is not a supported clipboard policy");
11024
11029
  }
11025
11030
  };
11026
- var createClipboard = ({ host, terminal }) => {
11031
+ var createClipboard2 = ({ host, terminal }) => {
11027
11032
  const active = new Set;
11028
11033
  let disposed = false;
11029
11034
  let disposePromise;
@@ -11045,8 +11050,8 @@ var createClipboard = ({ host, terminal }) => {
11045
11050
  return { host: { status: "not-attempted" }, terminal: terminalOperation() };
11046
11051
  }
11047
11052
  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 };
11053
+ const terminalResult = !signal.aborted && (hostResult.status === "unsupported" || hostResult.status === "failed") ? terminalOperation() : NOT_ATTEMPTED_TERMINAL;
11054
+ return { host: hostResult, terminal: terminalResult };
11050
11055
  }
11051
11056
  const hostPromise = canUseRemoteHost(options) ? hostOperation() : Promise.resolve({ status: "not-attempted" });
11052
11057
  const terminalResult = terminalOperation();
@@ -11108,14 +11113,14 @@ var createClipboard = ({ host, terminal }) => {
11108
11113
  }
11109
11114
  };
11110
11115
  };
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) => {
11116
+ var ClipboardTarget2;
11117
+ ((ClipboardTarget) => {
11118
+ ClipboardTarget[ClipboardTarget["Clipboard"] = 0] = "Clipboard";
11119
+ ClipboardTarget[ClipboardTarget["Primary"] = 1] = "Primary";
11120
+ ClipboardTarget[ClipboardTarget["Select"] = 2] = "Select";
11121
+ ClipboardTarget[ClipboardTarget["Secondary"] = 3] = "Secondary";
11122
+ })(ClipboardTarget2 ||= {});
11123
+ var createRendererClipboardAdapter2 = (renderer) => {
11119
11124
  const targetFor = (selection) => selection === "primary" ? 1 /* Primary */ : 0 /* Clipboard */;
11120
11125
  const capability = () => renderer.capabilities?.osc52_support ?? "unknown";
11121
11126
  return {
@@ -11143,7 +11148,7 @@ var createRendererClipboardAdapter = (renderer) => {
11143
11148
  };
11144
11149
  };
11145
11150
 
11146
- class Clipboard {
11151
+ class Clipboard2 {
11147
11152
  lib;
11148
11153
  rendererPtr;
11149
11154
  constructor(lib, rendererPtr) {
@@ -11170,44 +11175,163 @@ class Clipboard {
11170
11175
  }
11171
11176
  // src/lib/detect-links.ts
11172
11177
  var URL_SCOPES = ["markup.link.url", "string.special.url"];
11173
- function detectLinks(chunks, context) {
11178
+ var HTTP_URL_PREFIX = /https?:\/\//i;
11179
+ var BARE_URL = /https?:\/\/[^\s<>"`]+/gi;
11180
+ function normalizeMarkdownLinkTarget(destination) {
11181
+ return destination.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
11182
+ }
11183
+ function detectLinks2(chunks, context) {
11174
11184
  const content = context.content;
11175
11185
  const highlights = context.highlights;
11186
+ const hasBareUrl = HTTP_URL_PREFIX.test(content);
11187
+ if (!hasBareUrl && !highlights.some(([, , group]) => URL_SCOPES.includes(group)))
11188
+ return chunks;
11176
11189
  const ranges = [];
11190
+ const rawRanges = [];
11191
+ const labels = new Map;
11192
+ const concealedDelimiters = new Map;
11177
11193
  for (let i = 0;i < highlights.length; i++) {
11178
- const [start, end, group] = highlights[i];
11194
+ const [start, end, group, meta] = highlights[i];
11195
+ if (group === "conceal" && meta?.conceal === "" && /^[*_~]+$/.test(content.slice(start, end))) {
11196
+ concealedDelimiters.set(end, start);
11197
+ }
11198
+ if (group === "markup.raw" || group.startsWith("markup.raw.")) {
11199
+ rawRanges.push({ start, end });
11200
+ }
11201
+ if (group === "markup.link.label") {
11202
+ const existing = labels.get(end);
11203
+ if (!existing || start < existing.start)
11204
+ labels.set(end, { start, end });
11205
+ }
11179
11206
  if (!URL_SCOPES.includes(group))
11180
11207
  continue;
11181
11208
  const url = content.slice(start, end);
11209
+ if (!url)
11210
+ continue;
11182
11211
  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;
11212
+ }
11213
+ const highlightedCount = ranges.length;
11214
+ for (let index = 0;index < highlightedCount; index++) {
11215
+ const range = ranges[index];
11216
+ let labelEnd = range.start;
11217
+ if (content[labelEnd - 1] === "<")
11218
+ labelEnd--;
11219
+ while (labelEnd > 0 && /\s/.test(content[labelEnd - 1]))
11220
+ labelEnd--;
11221
+ if (content[labelEnd - 1] !== "(" || content[labelEnd - 2] !== "]")
11222
+ continue;
11223
+ const label = labels.get(labelEnd - 2);
11224
+ if (!label)
11225
+ continue;
11226
+ range.url = normalizeMarkdownLinkTarget(range.url);
11227
+ ranges.push({ ...label, url: range.url, label: true });
11228
+ }
11229
+ if (hasBareUrl) {
11230
+ rawRanges.sort((a, b) => a.start - b.start || b.end - a.end);
11231
+ ranges.sort((a, b) => a.start - b.start || b.end - a.end);
11232
+ let rawIndex = 0;
11233
+ let highlightedIndex = 0;
11234
+ for (const match of content.matchAll(BARE_URL)) {
11235
+ const start = match.index;
11236
+ let url = match[0];
11237
+ let openParens = 0;
11238
+ let closeParens = 0;
11239
+ for (const character of url) {
11240
+ if (character === "(")
11241
+ openParens++;
11242
+ if (character === ")")
11243
+ closeParens++;
11188
11244
  }
11189
- if (!prev.startsWith("markup.link"))
11190
- break;
11245
+ while (url.length > 0) {
11246
+ const delimiterStart = concealedDelimiters.get(start + url.length);
11247
+ if (delimiterStart !== undefined && delimiterStart >= start) {
11248
+ url = url.slice(0, delimiterStart - start);
11249
+ continue;
11250
+ }
11251
+ const last = url[url.length - 1];
11252
+ if (last === ")" && closeParens > openParens) {
11253
+ closeParens--;
11254
+ } else if (!".,!?;:]}'".includes(last)) {
11255
+ break;
11256
+ }
11257
+ url = url.slice(0, -1);
11258
+ }
11259
+ const end = start + url.length;
11260
+ if (!url)
11261
+ continue;
11262
+ while (rawIndex < rawRanges.length && rawRanges[rawIndex].end <= start)
11263
+ rawIndex++;
11264
+ if (rawIndex < rawRanges.length && rawRanges[rawIndex].start < end)
11265
+ continue;
11266
+ while (highlightedIndex < ranges.length && ranges[highlightedIndex].end <= start)
11267
+ highlightedIndex++;
11268
+ if (highlightedIndex < ranges.length && ranges[highlightedIndex].start < end)
11269
+ continue;
11270
+ ranges.push({ start, end, url });
11191
11271
  }
11192
11272
  }
11193
11273
  if (ranges.length === 0)
11194
11274
  return chunks;
11275
+ ranges.sort((a, b) => a.start - b.start || b.end - a.end || Number(b.label ?? false) - Number(a.label ?? false));
11276
+ const linkedChunks = [];
11195
11277
  let contentPos = 0;
11196
- for (const chunk of chunks) {
11197
- if (chunk.text.length <= 1)
11278
+ let rangeIndex = 0;
11279
+ for (let index = 0;index < chunks.length; index++) {
11280
+ const chunk = chunks[index];
11281
+ if (!chunk.text || chunk.link) {
11282
+ linkedChunks.push(chunk);
11198
11283
  continue;
11199
- const idx = content.indexOf(chunk.text, contentPos);
11200
- if (idx < 0)
11284
+ }
11285
+ const providedRange = context.sourceRanges?.[index];
11286
+ const start = providedRange?.start ?? content.indexOf(chunk.text, contentPos);
11287
+ if (start < 0) {
11288
+ linkedChunks.push(chunk);
11201
11289
  continue;
11202
- for (const range of ranges) {
11203
- if (idx < range.end && idx + chunk.text.length > range.start) {
11290
+ }
11291
+ const end = providedRange?.end ?? start + chunk.text.length;
11292
+ contentPos = end;
11293
+ while (rangeIndex < ranges.length && ranges[rangeIndex].end <= start)
11294
+ rangeIndex++;
11295
+ if (content.slice(start, end) !== chunk.text) {
11296
+ const range = ranges[rangeIndex];
11297
+ if (range?.label && range.start < end)
11204
11298
  chunk.link = { url: range.url };
11299
+ linkedChunks.push(chunk);
11300
+ continue;
11301
+ }
11302
+ let position = start;
11303
+ for (;rangeIndex < ranges.length; rangeIndex++) {
11304
+ const range = ranges[rangeIndex];
11305
+ if (range.end <= position)
11306
+ continue;
11307
+ if (range.start >= end)
11205
11308
  break;
11309
+ const linkStart = Math.max(position, range.start);
11310
+ const linkEnd = Math.min(end, range.end);
11311
+ if (linkStart > position) {
11312
+ linkedChunks.push({ ...chunk, text: chunk.text.slice(position - start, linkStart - start) });
11313
+ }
11314
+ if (linkStart === start && linkEnd === end) {
11315
+ chunk.link = { url: range.url };
11316
+ linkedChunks.push(chunk);
11317
+ } else {
11318
+ linkedChunks.push({
11319
+ ...chunk,
11320
+ text: chunk.text.slice(linkStart - start, linkEnd - start),
11321
+ link: { url: range.url }
11322
+ });
11206
11323
  }
11324
+ position = linkEnd;
11325
+ if (position === end)
11326
+ break;
11327
+ }
11328
+ if (position === start) {
11329
+ linkedChunks.push(chunk);
11330
+ } else if (position < end) {
11331
+ linkedChunks.push({ ...chunk, text: chunk.text.slice(position - start) });
11207
11332
  }
11208
- contentPos = idx + chunk.text.length;
11209
11333
  }
11210
- return chunks;
11334
+ return linkedChunks;
11211
11335
  }
11212
11336
  // src/buffer.ts
11213
11337
  function requireInteger(value, name, min, max) {
@@ -11215,18 +11339,18 @@ function requireInteger(value, name, min, max) {
11215
11339
  throw new RangeError(`${name} must be an integer from ${min} to ${max}`);
11216
11340
  }
11217
11341
  }
11218
- function packDrawOptions(border2, shouldFill, titleAlignment, bottomTitleAlignment) {
11342
+ function packDrawOptions(border, shouldFill, titleAlignment, bottomTitleAlignment) {
11219
11343
  let packed = 0;
11220
- if (border2 === true) {
11344
+ if (border === true) {
11221
11345
  packed |= 15;
11222
- } else if (Array.isArray(border2)) {
11223
- if (border2.includes("top"))
11346
+ } else if (Array.isArray(border)) {
11347
+ if (border.includes("top"))
11224
11348
  packed |= 8;
11225
- if (border2.includes("right"))
11349
+ if (border.includes("right"))
11226
11350
  packed |= 4;
11227
- if (border2.includes("bottom"))
11351
+ if (border.includes("bottom"))
11228
11352
  packed |= 2;
11229
- if (border2.includes("left"))
11353
+ if (border.includes("left"))
11230
11354
  packed |= 1;
11231
11355
  }
11232
11356
  if (shouldFill) {
@@ -11244,7 +11368,7 @@ function packDrawOptions(border2, shouldFill, titleAlignment, bottomTitleAlignme
11244
11368
  return packed;
11245
11369
  }
11246
11370
 
11247
- class OptimizedBuffer {
11371
+ class OptimizedBuffer2 {
11248
11372
  static fbIdCounter = 0;
11249
11373
  id;
11250
11374
  lib;
@@ -11283,17 +11407,17 @@ class OptimizedBuffer {
11283
11407
  this.ensureRawBufferViews();
11284
11408
  return this._rawBuffers;
11285
11409
  }
11286
- constructor(lib, ptr2, width, height, options) {
11287
- this.id = options.id || `fb_${OptimizedBuffer.fbIdCounter++}`;
11410
+ constructor(lib, ptr, width, height, options) {
11411
+ this.id = options.id || `fb_${OptimizedBuffer2.fbIdCounter++}`;
11288
11412
  this.lib = lib;
11289
11413
  this.respectAlpha = options.respectAlpha || false;
11290
11414
  this._width = width;
11291
11415
  this._height = height;
11292
11416
  this._widthMethod = options.widthMethod || "unicode";
11293
- this.bufferPtr = ptr2;
11417
+ this.bufferPtr = ptr;
11294
11418
  }
11295
11419
  static create(width, height, widthMethod, options = {}) {
11296
- const lib = resolveRenderLib();
11420
+ const lib = resolveRenderLib2();
11297
11421
  const respectAlpha = options.respectAlpha || false;
11298
11422
  const id = options.id && options.id.trim() !== "" ? options.id : "unnamed buffer";
11299
11423
  const buffer = lib.createOptimizedBuffer(width, height, widthMethod, respectAlpha, id);
@@ -11326,7 +11450,7 @@ class OptimizedBuffer {
11326
11450
  }
11327
11451
  getSpanLines() {
11328
11452
  this.guard();
11329
- const { char, fg: fg2, bg: bg2, attributes } = this.buffers;
11453
+ const { char, fg, bg, attributes } = this.buffers;
11330
11454
  const lines = [];
11331
11455
  const CHAR_FLAG_CONTINUATION = 3221225472 | 0;
11332
11456
  const CHAR_FLAG_MASK = 3221225472 | 0;
@@ -11341,8 +11465,8 @@ class OptimizedBuffer {
11341
11465
  for (let x = 0;x < this._width; x++) {
11342
11466
  const i = y * this._width + x;
11343
11467
  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));
11468
+ const cellFg = RGBA2.fromArray(fg.slice(i * 4, i * 4 + 4));
11469
+ const cellBg = RGBA2.fromArray(bg.slice(i * 4, i * 4 + 4));
11346
11470
  const cellAttrs = attributes[i] & 255;
11347
11471
  const isContinuation = (cp & CHAR_FLAG_MASK) === CHAR_FLAG_CONTINUATION;
11348
11472
  const cellChar = isContinuation ? "" : lineChars[charIdx++] ?? " ";
@@ -11369,38 +11493,38 @@ class OptimizedBuffer {
11369
11493
  }
11370
11494
  return lines;
11371
11495
  }
11372
- clear(bg2 = RGBA.fromValues(0, 0, 0, 1)) {
11496
+ clear(bg = RGBA2.fromValues(0, 0, 0, 1)) {
11373
11497
  this.guard();
11374
- this.lib.bufferClear(this.bufferPtr, bg2);
11498
+ this.lib.bufferClear(this.bufferPtr, bg);
11375
11499
  }
11376
- setCell(x, y, char, fg2, bg2, attributes = 0) {
11500
+ setCell(x, y, char, fg, bg, attributes = 0) {
11377
11501
  this.guard();
11378
- this.lib.bufferSetCell(this.bufferPtr, x, y, char, fg2, bg2, attributes);
11502
+ this.lib.bufferSetCell(this.bufferPtr, x, y, char, fg, bg, attributes);
11379
11503
  }
11380
- setCellWithAlphaBlending(x, y, char, fg2, bg2, attributes = 0) {
11504
+ setCellWithAlphaBlending(x, y, char, fg, bg, attributes = 0) {
11381
11505
  this.guard();
11382
- this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr, x, y, char, fg2, bg2, attributes);
11506
+ this.lib.bufferSetCellWithAlphaBlending(this.bufferPtr, x, y, char, fg, bg, attributes);
11383
11507
  }
11384
- drawText(text, x, y, fg2, bg2, attributes = 0, selection2) {
11508
+ drawText(text, x, y, fg, bg, attributes = 0, selection) {
11385
11509
  this.guard();
11386
- if (!selection2) {
11387
- this.lib.bufferDrawText(this.bufferPtr, text, x, y, fg2, bg2, attributes);
11510
+ if (!selection) {
11511
+ this.lib.bufferDrawText(this.bufferPtr, text, x, y, fg, bg, attributes);
11388
11512
  return;
11389
11513
  }
11390
- const { start, end } = selection2;
11514
+ const { start, end } = selection;
11391
11515
  let selectionBg;
11392
11516
  let selectionFg;
11393
- if (selection2.bgColor) {
11394
- selectionBg = selection2.bgColor;
11395
- selectionFg = selection2.fgColor || fg2;
11517
+ if (selection.bgColor) {
11518
+ selectionBg = selection.bgColor;
11519
+ selectionFg = selection.fgColor || fg;
11396
11520
  } 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;
11521
+ const defaultBg = bg || RGBA2.fromValues(0, 0, 0, 0);
11522
+ selectionFg = defaultBg.a > 0 ? defaultBg : RGBA2.fromValues(0, 0, 0, 1);
11523
+ selectionBg = fg;
11400
11524
  }
11401
11525
  if (start > 0) {
11402
11526
  const beforeText = text.slice(0, start);
11403
- this.lib.bufferDrawText(this.bufferPtr, beforeText, x, y, fg2, bg2, attributes);
11527
+ this.lib.bufferDrawText(this.bufferPtr, beforeText, x, y, fg, bg, attributes);
11404
11528
  }
11405
11529
  if (end > start) {
11406
11530
  const selectedText = text.slice(start, end);
@@ -11408,12 +11532,12 @@ class OptimizedBuffer {
11408
11532
  }
11409
11533
  if (end < text.length) {
11410
11534
  const afterText = text.slice(end);
11411
- this.lib.bufferDrawText(this.bufferPtr, afterText, x + end, y, fg2, bg2, attributes);
11535
+ this.lib.bufferDrawText(this.bufferPtr, afterText, x + end, y, fg, bg, attributes);
11412
11536
  }
11413
11537
  }
11414
- fillRect(x, y, width, height, bg2) {
11538
+ fillRect(x, y, width, height, bg) {
11415
11539
  this.guard();
11416
- this.lib.bufferFillRect(this.bufferPtr, x, y, width, height, bg2);
11540
+ this.lib.bufferFillRect(this.bufferPtr, x, y, width, height, bg);
11417
11541
  }
11418
11542
  colorMatrix(matrix, cellMask, strength = 1, target = 3 /* Both */) {
11419
11543
  this.guard();
@@ -11474,13 +11598,13 @@ class OptimizedBuffer {
11474
11598
  this.guard();
11475
11599
  this.lib.bufferDrawPackedBuffer(this.bufferPtr, typeof data === "number" || typeof data === "bigint" ? toPointer(data) : data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells);
11476
11600
  }
11477
- drawGrayscaleBuffer(posX, posY, intensities, srcWidth, srcHeight, fg2 = null, bg2 = null) {
11601
+ drawGrayscaleBuffer(posX, posY, intensities, srcWidth, srcHeight, fg = null, bg = null) {
11478
11602
  this.guard();
11479
- this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2);
11603
+ this.lib.bufferDrawGrayscaleBuffer(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg, bg);
11480
11604
  }
11481
- drawGrayscaleBufferSupersampled(posX, posY, intensities, srcWidth, srcHeight, fg2 = null, bg2 = null) {
11605
+ drawGrayscaleBufferSupersampled(posX, posY, intensities, srcWidth, srcHeight, fg = null, bg = null) {
11482
11606
  this.guard();
11483
- this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg2, bg2);
11607
+ this.lib.bufferDrawGrayscaleBufferSupersampled(this.bufferPtr, posX, posY, intensities, srcWidth, srcHeight, fg, bg);
11484
11608
  }
11485
11609
  resize(width, height) {
11486
11610
  this.guard();
@@ -11493,8 +11617,8 @@ class OptimizedBuffer {
11493
11617
  }
11494
11618
  drawBox(options) {
11495
11619
  this.guard();
11496
- const style = parseBorderStyle(options.borderStyle, "single");
11497
- const borderChars = options.customBorderChars ?? BorderCharArrays[style];
11620
+ const style = parseBorderStyle2(options.borderStyle, "single");
11621
+ const borderChars = options.customBorderChars ?? BorderCharArrays2[style];
11498
11622
  const packedOptions = packDrawOptions(options.border, options.shouldFill ?? false, options.titleAlignment || "left", options.bottomTitleAlignment || "left");
11499
11623
  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
11624
  }
@@ -11543,14 +11667,14 @@ class OptimizedBuffer {
11543
11667
  drawOuter: options.drawOuter
11544
11668
  });
11545
11669
  }
11546
- drawChar(char, x, y, fg2, bg2, attributes = 0) {
11670
+ drawChar(char, x, y, fg, bg, attributes = 0) {
11547
11671
  this.guard();
11548
- this.lib.bufferDrawChar(this.bufferPtr, char, x, y, fg2, bg2, attributes);
11672
+ this.lib.bufferDrawChar(this.bufferPtr, char, x, y, fg, bg, attributes);
11549
11673
  }
11550
11674
  }
11551
11675
 
11552
11676
  // src/text-buffer.ts
11553
- class TextBuffer {
11677
+ class TextBuffer2 {
11554
11678
  lib;
11555
11679
  bufferPtr;
11556
11680
  _length = 0;
@@ -11560,12 +11684,12 @@ class TextBuffer {
11560
11684
  _textBytes;
11561
11685
  _memId;
11562
11686
  _appendedChunks = [];
11563
- constructor(lib, ptr2) {
11687
+ constructor(lib, ptr) {
11564
11688
  this.lib = lib;
11565
- this.bufferPtr = ptr2;
11689
+ this.bufferPtr = ptr;
11566
11690
  }
11567
11691
  static create(widthMethod) {
11568
- const lib = resolveRenderLib();
11692
+ const lib = resolveRenderLib2();
11569
11693
  return lib.createTextBuffer(widthMethod);
11570
11694
  }
11571
11695
  guard() {
@@ -11593,11 +11717,11 @@ class TextBuffer {
11593
11717
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11594
11718
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11595
11719
  }
11596
- loadFile(path3) {
11720
+ loadFile(path) {
11597
11721
  this.guard();
11598
- const success = this.lib.textBufferLoadFile(this.bufferPtr, path3);
11722
+ const success = this.lib.textBufferLoadFile(this.bufferPtr, path);
11599
11723
  if (!success) {
11600
- throw new Error(`Failed to load file: ${path3}`);
11724
+ throw new Error(`Failed to load file: ${path}`);
11601
11725
  }
11602
11726
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11603
11727
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
@@ -11609,13 +11733,13 @@ class TextBuffer {
11609
11733
  this._length = this.lib.textBufferGetLength(this.bufferPtr);
11610
11734
  this._byteSize = this.lib.textBufferGetByteSize(this.bufferPtr);
11611
11735
  }
11612
- setDefaultFg(fg2) {
11736
+ setDefaultFg(fg) {
11613
11737
  this.guard();
11614
- this.lib.textBufferSetDefaultFg(this.bufferPtr, fg2);
11738
+ this.lib.textBufferSetDefaultFg(this.bufferPtr, fg);
11615
11739
  }
11616
- setDefaultBg(bg2) {
11740
+ setDefaultBg(bg) {
11617
11741
  this.guard();
11618
- this.lib.textBufferSetDefaultBg(this.bufferPtr, bg2);
11742
+ this.lib.textBufferSetDefaultBg(this.bufferPtr, bg);
11619
11743
  }
11620
11744
  setDefaultAttributes(attributes) {
11621
11745
  this.guard();
@@ -11764,11 +11888,11 @@ async function loadBackend2() {
11764
11888
  function importModule(specifier) {
11765
11889
  return import(specifier).then((module) => module.default ?? module);
11766
11890
  }
11767
- function createBunBackend2(bun2) {
11891
+ function createBunBackend2(bun) {
11768
11892
  return {
11769
- ptr: bun2.ptr,
11893
+ ptr: bun.ptr,
11770
11894
  toArrayBuffer(pointer, offset, length) {
11771
- return bun2.toArrayBuffer(toBunPointer2(pointer), offset, length);
11895
+ return bun.toArrayBuffer(toBunPointer2(pointer), offset, length);
11772
11896
  }
11773
11897
  };
11774
11898
  }
@@ -11871,7 +11995,7 @@ function enumTypeError(value) {
11871
11995
  throw new TypeError(`Invalid enum value: ${value}`);
11872
11996
  }
11873
11997
  function defineEnum(mapping, base = "u32") {
11874
- const reverse2 = Object.fromEntries(Object.entries(mapping).map(([k, v]) => [v, k]));
11998
+ const reverse = Object.fromEntries(Object.entries(mapping).map(([k, v]) => [v, k]));
11875
11999
  return {
11876
12000
  __type: "enum",
11877
12001
  type: base,
@@ -11879,7 +12003,7 @@ function defineEnum(mapping, base = "u32") {
11879
12003
  return typeof value === "number" ? value : mapping[value] ?? enumTypeError(String(value));
11880
12004
  },
11881
12005
  from(value) {
11882
- return reverse2[value] ?? enumTypeError(String(value));
12006
+ return reverse[value] ?? enumTypeError(String(value));
11883
12007
  },
11884
12008
  enum: mapping
11885
12009
  };
@@ -13030,7 +13154,7 @@ function defineStruct(fields, structDefOptions) {
13030
13154
 
13031
13155
  // src/zig-structs.ts
13032
13156
  var rgbaPackTransform = (rgba) => rgba?.buffer ?? null;
13033
- var rgbaUnpackTransform = (ptr3) => ptr3 ? RGBA.fromArray(new Uint16Array(toArrayBuffer(ptr3, 0, 8))) : undefined;
13157
+ var rgbaUnpackTransform = (ptr) => ptr ? RGBA2.fromArray(new Uint16Array(toArrayBuffer(ptr, 0, 8))) : undefined;
13034
13158
  var StyledChunkStruct = defineStruct([
13035
13159
  ["text", "char*"],
13036
13160
  ["text_len", "u64", { lengthOf: "text" }],
@@ -13057,8 +13181,8 @@ var StyledChunkStruct = defineStruct([
13057
13181
  ["link_len", "u64", { lengthOf: "link" }]
13058
13182
  ], {
13059
13183
  mapValue: (chunk) => {
13060
- const normalizedFg = normalizeColorValue(chunk.fg ?? null);
13061
- const normalizedBg = normalizeColorValue(chunk.bg ?? null);
13184
+ const normalizedFg = normalizeColorValue2(chunk.fg ?? null);
13185
+ const normalizedBg = normalizeColorValue2(chunk.bg ?? null);
13062
13186
  if (!chunk.link || typeof chunk.link === "string") {
13063
13187
  return {
13064
13188
  ...chunk,
@@ -13279,11 +13403,12 @@ var ReserveInfoStruct = defineStruct([
13279
13403
  len: value.len
13280
13404
  })
13281
13405
  });
13282
- var NativeAudioStreamFormat = {
13406
+ var NativeAudioStreamFormat2 = {
13283
13407
  Mp3: 1,
13284
- Flac: 2
13408
+ Flac: 2,
13409
+ Pcm: 3
13285
13410
  };
13286
- var NativeAudioStreamState = {
13411
+ var NativeAudioStreamState2 = {
13287
13412
  Initializing: 0,
13288
13413
  Buffering: 1,
13289
13414
  Playing: 2,
@@ -13301,7 +13426,7 @@ var NativeAudioStreamStateNames = [
13301
13426
  "disposed",
13302
13427
  "reconnecting"
13303
13428
  ];
13304
- var NativeAudioStreamCloseReason = {
13429
+ var NativeAudioStreamCloseReason2 = {
13305
13430
  PreserveNativeTerminal: 0,
13306
13431
  TransportError: 1,
13307
13432
  Disposed: 2
@@ -13341,7 +13466,9 @@ var AudioStreamCreateOptionsStruct = defineStruct([
13341
13466
  ["pan", "f32"],
13342
13467
  ["groupId", "u32"],
13343
13468
  ["maxProbeBytes", "u32"],
13344
- ["format", "u32"]
13469
+ ["format", "u32"],
13470
+ ["sampleRate", "u32", { default: 0 }],
13471
+ ["channels", "u32", { default: 0 }]
13345
13472
  ]);
13346
13473
  var AudioStreamStatsStruct = defineStruct([
13347
13474
  ["bytesReceived", "u64"],
@@ -13375,64 +13502,69 @@ var AudioStatsStruct = defineStruct([
13375
13502
  ]);
13376
13503
 
13377
13504
  // src/zig.ts
13378
- var NativeAudioStreamState2 = NativeAudioStreamState;
13379
- var NativeAudioStreamCloseReason2 = NativeAudioStreamCloseReason;
13380
- var NativeAudioStreamFormat2 = NativeAudioStreamFormat;
13381
- registerEnvVar({
13505
+ var NativeAudioStreamState3 = NativeAudioStreamState2;
13506
+ var NativeAudioStreamCloseReason3 = NativeAudioStreamCloseReason2;
13507
+ var NativeAudioStreamFormat3 = NativeAudioStreamFormat2;
13508
+ var MAX_LINK_URL_BYTES2 = 512;
13509
+ function allocFFIStruct(structDefinition) {
13510
+ const storage = allocStruct(structDefinition);
13511
+ return { ...storage, ffiView: new Uint8Array(storage.buffer) };
13512
+ }
13513
+ registerEnvVar2({
13382
13514
  name: "OPENTUI_LIBC",
13383
13515
  description: "Select Linux native libc package. Supported values: glibc, musl.",
13384
13516
  type: "string",
13385
13517
  default: ""
13386
13518
  });
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 ||= {});
13519
+ var NativeClipboardOperationStatus2;
13520
+ ((NativeClipboardOperationStatus) => {
13521
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Pending"] = 0] = "Pending";
13522
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Read"] = 1] = "Read";
13523
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Empty"] = 2] = "Empty";
13524
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Written"] = 3] = "Written";
13525
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Cleared"] = 4] = "Cleared";
13526
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Unsupported"] = 5] = "Unsupported";
13527
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Cancelled"] = 6] = "Cancelled";
13528
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["TimedOut"] = 7] = "TimedOut";
13529
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["LimitExceeded"] = 8] = "LimitExceeded";
13530
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["Failed"] = 9] = "Failed";
13531
+ NativeClipboardOperationStatus[NativeClipboardOperationStatus["InvalidHandle"] = 10] = "InvalidHandle";
13532
+ })(NativeClipboardOperationStatus2 ||= {});
13533
+ var NativeClipboardStartStatus2;
13534
+ ((NativeClipboardStartStatus) => {
13535
+ NativeClipboardStartStatus[NativeClipboardStartStatus["Ok"] = 0] = "Ok";
13536
+ NativeClipboardStartStatus[NativeClipboardStartStatus["InvalidService"] = 1] = "InvalidService";
13537
+ NativeClipboardStartStatus[NativeClipboardStartStatus["ShuttingDown"] = 2] = "ShuttingDown";
13538
+ NativeClipboardStartStatus[NativeClipboardStartStatus["LimitExceeded"] = 3] = "LimitExceeded";
13539
+ NativeClipboardStartStatus[NativeClipboardStartStatus["InvalidArgument"] = 4] = "InvalidArgument";
13540
+ NativeClipboardStartStatus[NativeClipboardStartStatus["OutOfMemory"] = 5] = "OutOfMemory";
13541
+ })(NativeClipboardStartStatus2 ||= {});
13542
+ var NativeClipboardCancelStatus2;
13543
+ ((NativeClipboardCancelStatus) => {
13544
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["Requested"] = 0] = "Requested";
13545
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["AlreadyTerminal"] = 1] = "AlreadyTerminal";
13546
+ NativeClipboardCancelStatus[NativeClipboardCancelStatus["InvalidHandle"] = 2] = "InvalidHandle";
13547
+ })(NativeClipboardCancelStatus2 ||= {});
13548
+ var NativeClipboardCopyStatus2;
13549
+ ((NativeClipboardCopyStatus) => {
13550
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["Ok"] = 0] = "Ok";
13551
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["BufferTooSmall"] = 1] = "BufferTooSmall";
13552
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidHandle"] = 2] = "InvalidHandle";
13553
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidState"] = 3] = "InvalidState";
13554
+ NativeClipboardCopyStatus[NativeClipboardCopyStatus["InvalidArgument"] = 4] = "InvalidArgument";
13555
+ })(NativeClipboardCopyStatus2 ||= {});
13556
+ var NativeClipboardDestroyStatus2;
13557
+ ((NativeClipboardDestroyStatus) => {
13558
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["Destroyed"] = 0] = "Destroyed";
13559
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["NotReady"] = 1] = "NotReady";
13560
+ NativeClipboardDestroyStatus[NativeClipboardDestroyStatus["InvalidHandle"] = 2] = "InvalidHandle";
13561
+ })(NativeClipboardDestroyStatus2 ||= {});
13562
+ var NativeClipboardShutdownStatus2;
13563
+ ((NativeClipboardShutdownStatus) => {
13564
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["Pending"] = 0] = "Pending";
13565
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["Ready"] = 1] = "Ready";
13566
+ NativeClipboardShutdownStatus[NativeClipboardShutdownStatus["InvalidHandle"] = 2] = "InvalidHandle";
13567
+ })(NativeClipboardShutdownStatus2 ||= {});
13436
13568
  var targetLibPath;
13437
13569
  var targetLibError;
13438
13570
  try {
@@ -13446,43 +13578,43 @@ try {
13446
13578
  } catch (error) {
13447
13579
  targetLibError = error instanceof Error ? error : new Error(String(error));
13448
13580
  }
13449
- registerEnvVar({
13581
+ registerEnvVar2({
13450
13582
  name: "OTUI_DEBUG_FFI",
13451
13583
  description: "Enable debug logging for the FFI bindings.",
13452
13584
  type: "boolean",
13453
13585
  default: false
13454
13586
  });
13455
- registerEnvVar({
13587
+ registerEnvVar2({
13456
13588
  name: "OTUI_TRACE_FFI",
13457
13589
  description: "Enable tracing for the FFI bindings.",
13458
13590
  type: "boolean",
13459
13591
  default: false
13460
13592
  });
13461
- registerEnvVar({
13593
+ registerEnvVar2({
13462
13594
  name: "OPENTUI_FORCE_WCWIDTH",
13463
13595
  description: "Use wcwidth for character width calculations when the variable is present",
13464
13596
  type: "string",
13465
13597
  required: false
13466
13598
  });
13467
- registerEnvVar({
13599
+ registerEnvVar2({
13468
13600
  name: "OPENTUI_FORCE_UNICODE",
13469
13601
  description: "Force Mode 2026 Unicode support when the variable is present",
13470
13602
  type: "string",
13471
13603
  required: false
13472
13604
  });
13473
- registerEnvVar({
13605
+ registerEnvVar2({
13474
13606
  name: "OPENTUI_GRAPHICS",
13475
13607
  description: "Control Kitty and Sixel graphics detection with the exact value true, 1, false, or 0",
13476
13608
  type: "string",
13477
13609
  required: false
13478
13610
  });
13479
- registerEnvVar({
13611
+ registerEnvVar2({
13480
13612
  name: "OPENTUI_IMAGE_PROTOCOL",
13481
13613
  description: "Override image rendering protocol: auto, kitty, sixel, or blocks",
13482
13614
  type: "string",
13483
13615
  default: "auto"
13484
13616
  });
13485
- registerEnvVar({
13617
+ registerEnvVar2({
13486
13618
  name: "OPENTUI_FORCE_NOZWJ",
13487
13619
  description: "Use no_zwj width mode when the variable is present",
13488
13620
  type: "string",
@@ -13490,7 +13622,44 @@ registerEnvVar({
13490
13622
  });
13491
13623
  var CURSOR_STYLE_TO_ID = { block: 0, line: 1, underline: 2, default: 3 };
13492
13624
  var CURSOR_ID_TO_STYLE = ["block", "line", "underline", "default"];
13493
- var MOUSE_STYLE_TO_ID = { default: 0, pointer: 1, text: 2, crosshair: 3, move: 4, "not-allowed": 5 };
13625
+ var MOUSE_STYLE_TO_ID = {
13626
+ auto: 0,
13627
+ default: 1,
13628
+ none: 2,
13629
+ "context-menu": 3,
13630
+ help: 4,
13631
+ pointer: 5,
13632
+ progress: 6,
13633
+ wait: 7,
13634
+ cell: 8,
13635
+ crosshair: 9,
13636
+ text: 10,
13637
+ "vertical-text": 11,
13638
+ alias: 12,
13639
+ copy: 13,
13640
+ move: 14,
13641
+ "no-drop": 15,
13642
+ "not-allowed": 16,
13643
+ grab: 17,
13644
+ grabbing: 18,
13645
+ "all-scroll": 19,
13646
+ "col-resize": 20,
13647
+ "row-resize": 21,
13648
+ "n-resize": 22,
13649
+ "e-resize": 23,
13650
+ "s-resize": 24,
13651
+ "w-resize": 25,
13652
+ "ne-resize": 26,
13653
+ "nw-resize": 27,
13654
+ "se-resize": 28,
13655
+ "sw-resize": 29,
13656
+ "ew-resize": 30,
13657
+ "ns-resize": 31,
13658
+ "nesw-resize": 32,
13659
+ "nwse-resize": 33,
13660
+ "zoom-in": 34,
13661
+ "zoom-out": 35
13662
+ };
13494
13663
  var MAX_FFI_U32 = 4294967295;
13495
13664
  var globalTraceSymbols = null;
13496
13665
  var globalFFILogPath = null;
@@ -13629,6 +13798,10 @@ function getOpenTUILib(libPath) {
13629
13798
  args: ["u32"],
13630
13799
  returns: "i32"
13631
13800
  },
13801
+ embeddedTerminalSetTransparentBackground: {
13802
+ args: ["u32", "u8"],
13803
+ returns: "i32"
13804
+ },
13632
13805
  embeddedTerminalScroll: {
13633
13806
  args: ["u32", "i32"],
13634
13807
  returns: "i32"
@@ -13650,11 +13823,11 @@ function getOpenTUILib(libPath) {
13650
13823
  returns: "i32"
13651
13824
  },
13652
13825
  embeddedTerminalCursor: {
13653
- args: ["u32", "ptr"],
13826
+ args: ["u32", "buffer"],
13654
13827
  returns: "i32"
13655
13828
  },
13656
13829
  embeddedTerminalEncodeKey: {
13657
- args: ["u32", "ptr", "ptr", "u32", "ptr", "u32", "ptr", "u32", "ptr"],
13830
+ args: ["u32", "buffer", "ptr", "u32", "ptr", "u32", "ptr", "u32", "ptr"],
13658
13831
  returns: "i32"
13659
13832
  },
13660
13833
  embeddedTerminalEncodeMouse: {
@@ -13994,7 +14167,7 @@ function getOpenTUILib(libPath) {
13994
14167
  returns: "void"
13995
14168
  },
13996
14169
  bufferDrawImage: {
13997
- args: ["u32", "u32", "ptr"],
14170
+ args: ["u32", "u32", "buffer"],
13998
14171
  returns: "u8"
13999
14172
  },
14000
14173
  bufferDrawPackedBuffer: {
@@ -14010,7 +14183,7 @@ function getOpenTUILib(libPath) {
14010
14183
  returns: "void"
14011
14184
  },
14012
14185
  bufferDrawGrid: {
14013
- args: ["u32", "buffer", "buffer", "buffer", "buffer", "u32", "buffer", "u32", "ptr"],
14186
+ args: ["u32", "buffer", "buffer", "buffer", "buffer", "u32", "buffer", "u32", "buffer"],
14014
14187
  returns: "void"
14015
14188
  },
14016
14189
  bufferDrawBox: {
@@ -14332,6 +14505,10 @@ function getOpenTUILib(libPath) {
14332
14505
  args: ["u32", "u8"],
14333
14506
  returns: "void"
14334
14507
  },
14508
+ textBufferViewSetTextAlign: {
14509
+ args: ["u32", "u8"],
14510
+ returns: "void"
14511
+ },
14335
14512
  textBufferViewSetFirstLineOffset: {
14336
14513
  args: ["u32", "u32"],
14337
14514
  returns: "void"
@@ -14377,7 +14554,7 @@ function getOpenTUILib(libPath) {
14377
14554
  returns: "void"
14378
14555
  },
14379
14556
  textBufferViewMeasureForDimensions: {
14380
- args: ["u32", "u32", "u32", "ptr"],
14557
+ args: ["u32", "u32", "u32", "buffer"],
14381
14558
  returns: "bool"
14382
14559
  },
14383
14560
  bufferDrawTextBufferView: {
@@ -14525,7 +14702,7 @@ function getOpenTUILib(libPath) {
14525
14702
  returns: "void"
14526
14703
  },
14527
14704
  editBufferGetCursorPosition: {
14528
- args: ["u32", "ptr"],
14705
+ args: ["u32", "buffer"],
14529
14706
  returns: "void"
14530
14707
  },
14531
14708
  editBufferGetId: {
@@ -14569,19 +14746,19 @@ function getOpenTUILib(libPath) {
14569
14746
  returns: "void"
14570
14747
  },
14571
14748
  editBufferGetNextWordBoundary: {
14572
- args: ["u32", "ptr"],
14749
+ args: ["u32", "buffer"],
14573
14750
  returns: "void"
14574
14751
  },
14575
14752
  editBufferGetPrevWordBoundary: {
14576
- args: ["u32", "ptr"],
14753
+ args: ["u32", "buffer"],
14577
14754
  returns: "void"
14578
14755
  },
14579
14756
  editBufferGetEOL: {
14580
- args: ["u32", "ptr"],
14757
+ args: ["u32", "buffer"],
14581
14758
  returns: "void"
14582
14759
  },
14583
14760
  editBufferOffsetToPosition: {
14584
- args: ["u32", "u32", "ptr"],
14761
+ args: ["u32", "u32", "buffer"],
14585
14762
  returns: "bool"
14586
14763
  },
14587
14764
  editBufferPositionToOffset: {
@@ -14657,7 +14834,7 @@ function getOpenTUILib(libPath) {
14657
14834
  returns: "u32"
14658
14835
  },
14659
14836
  editorViewGetVisualCursor: {
14660
- args: ["u32", "ptr"],
14837
+ args: ["u32", "buffer"],
14661
14838
  returns: "void"
14662
14839
  },
14663
14840
  editorViewMoveUpVisual: {
@@ -14677,23 +14854,23 @@ function getOpenTUILib(libPath) {
14677
14854
  returns: "void"
14678
14855
  },
14679
14856
  editorViewGetNextWordBoundary: {
14680
- args: ["u32", "ptr"],
14857
+ args: ["u32", "buffer"],
14681
14858
  returns: "void"
14682
14859
  },
14683
14860
  editorViewGetPrevWordBoundary: {
14684
- args: ["u32", "ptr"],
14861
+ args: ["u32", "buffer"],
14685
14862
  returns: "void"
14686
14863
  },
14687
14864
  editorViewGetEOL: {
14688
- args: ["u32", "ptr"],
14865
+ args: ["u32", "buffer"],
14689
14866
  returns: "void"
14690
14867
  },
14691
14868
  editorViewGetVisualSOL: {
14692
- args: ["u32", "ptr"],
14869
+ args: ["u32", "buffer"],
14693
14870
  returns: "void"
14694
14871
  },
14695
14872
  editorViewGetVisualEOL: {
14696
- args: ["u32", "ptr"],
14873
+ args: ["u32", "buffer"],
14697
14874
  returns: "void"
14698
14875
  },
14699
14876
  editorViewGotoVisualLineEnd: {
@@ -15079,7 +15256,7 @@ function getOpenTUILib(libPath) {
15079
15256
  returns: "i32"
15080
15257
  },
15081
15258
  audioCreateStream: {
15082
- args: ["u32", "ptr", "ptr"],
15259
+ args: ["u32", "buffer", "buffer"],
15083
15260
  returns: "i32"
15084
15261
  },
15085
15262
  audioWriteStream: {
@@ -15107,11 +15284,11 @@ function getOpenTUILib(libPath) {
15107
15284
  returns: "i32"
15108
15285
  },
15109
15286
  audioGetStreamStats: {
15110
- args: ["u32", "u32", "ptr"],
15287
+ args: ["u32", "u32", "buffer"],
15111
15288
  returns: "i32"
15112
15289
  },
15113
15290
  audioCloseStream: {
15114
- args: ["u32", "u32", "u32", "ptr"],
15291
+ args: ["u32", "u32", "u32", "buffer"],
15115
15292
  returns: "i32"
15116
15293
  },
15117
15294
  audioLoad: {
@@ -15211,7 +15388,7 @@ function getOpenTUILib(libPath) {
15211
15388
  returns: "void"
15212
15389
  }
15213
15390
  });
15214
- if (env.OTUI_DEBUG_FFI || env.OTUI_TRACE_FFI) {
15391
+ if (env2.OTUI_DEBUG_FFI || env2.OTUI_TRACE_FFI) {
15215
15392
  return {
15216
15393
  ...rawSymbols,
15217
15394
  symbols: convertToDebugSymbols(rawSymbols.symbols)
@@ -15223,7 +15400,7 @@ function convertToDebugSymbols(symbols) {
15223
15400
  if (!globalTraceSymbols) {
15224
15401
  globalTraceSymbols = {};
15225
15402
  }
15226
- if (env.OTUI_DEBUG_FFI && !globalFFILogPath) {
15403
+ if (env2.OTUI_DEBUG_FFI && !globalFFILogPath) {
15227
15404
  const now = new Date;
15228
15405
  const timestamp = now.toISOString().replace(/[:.]/g, "-").replace(/T/, "_").split("Z")[0];
15229
15406
  globalFFILogPath = `ffi_otui_debug_${timestamp}.log`;
@@ -15233,7 +15410,7 @@ function convertToDebugSymbols(symbols) {
15233
15410
  Object.entries(symbols).forEach(([key, value]) => {
15234
15411
  debugSymbols[key] = value;
15235
15412
  });
15236
- if (env.OTUI_DEBUG_FFI && globalFFILogPath) {
15413
+ if (env2.OTUI_DEBUG_FFI && globalFFILogPath) {
15237
15414
  const logPath = globalFFILogPath;
15238
15415
  const writeSync = (msg) => {
15239
15416
  writeFileSync(logPath, msg + `
@@ -15250,7 +15427,7 @@ function convertToDebugSymbols(symbols) {
15250
15427
  }
15251
15428
  });
15252
15429
  }
15253
- if (env.OTUI_TRACE_FFI) {
15430
+ if (env2.OTUI_TRACE_FFI) {
15254
15431
  hasTracing = true;
15255
15432
  Object.entries(symbols).forEach(([key, value]) => {
15256
15433
  if (typeof value === "function") {
@@ -15268,7 +15445,7 @@ function convertToDebugSymbols(symbols) {
15268
15445
  }
15269
15446
  });
15270
15447
  }
15271
- if ((env.OTUI_DEBUG_FFI || env.OTUI_TRACE_FFI) && !exitHandlerRegistered) {
15448
+ if ((env2.OTUI_DEBUG_FFI || env2.OTUI_TRACE_FFI) && !exitHandlerRegistered) {
15272
15449
  exitHandlerRegistered = true;
15273
15450
  process.on("exit", () => {
15274
15451
  if (globalTraceSymbols) {
@@ -15279,7 +15456,7 @@ function convertToDebugSymbols(symbols) {
15279
15456
  }
15280
15457
  const sortedTimings = [...timings].sort((a, b) => a - b);
15281
15458
  const count = sortedTimings.length;
15282
- const total = sortedTimings.reduce((acc, t2) => acc + t2, 0);
15459
+ const total = sortedTimings.reduce((acc, t) => acc + t, 0);
15283
15460
  const average = total / count;
15284
15461
  const min = sortedTimings[0];
15285
15462
  const max = sortedTimings[count - 1];
@@ -15354,13 +15531,13 @@ function convertToDebugSymbols(symbols) {
15354
15531
  return debugSymbols;
15355
15532
  }
15356
15533
  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";
15534
+ ((LogLevel) => {
15535
+ LogLevel[LogLevel["Error"] = 0] = "Error";
15536
+ LogLevel[LogLevel["Warn"] = 1] = "Warn";
15537
+ LogLevel[LogLevel["Info"] = 2] = "Info";
15538
+ LogLevel[LogLevel["Debug"] = 3] = "Debug";
15362
15539
  })(LogLevel2 ||= {});
15363
- var NativeMeasureTargetKind = {
15540
+ var NativeMeasureTargetKind2 = {
15364
15541
  None: 0,
15365
15542
  TextBufferView: 1,
15366
15543
  EditorView: 2
@@ -15372,11 +15549,11 @@ class FFIRenderLib {
15372
15549
  yogaLayout = new Float32Array(6);
15373
15550
  ffiStructStorage = {
15374
15551
  logicalCursor: {
15375
- ...allocStruct(LogicalCursorStruct),
15552
+ ...allocFFIStruct(LogicalCursorStruct),
15376
15553
  result: { row: 0, col: 0, offset: 0 }
15377
15554
  },
15378
15555
  visualCursor: {
15379
- ...allocStruct(VisualCursorStruct),
15556
+ ...allocFFIStruct(VisualCursorStruct),
15380
15557
  result: {
15381
15558
  visualRow: 0,
15382
15559
  visualCol: 0,
@@ -15386,13 +15563,13 @@ class FFIRenderLib {
15386
15563
  }
15387
15564
  },
15388
15565
  measureResult: {
15389
- ...allocStruct(MeasureResultStruct),
15566
+ ...allocFFIStruct(MeasureResultStruct),
15390
15567
  result: { lineCount: 0, widthColsMax: 0 }
15391
15568
  },
15392
- embeddedTerminalCursor: allocStruct(EmbeddedTerminalCursorStruct),
15393
- embeddedTerminalKeyOptions: allocStruct(EmbeddedTerminalKeyOptionsStruct),
15569
+ embeddedTerminalCursor: allocFFIStruct(EmbeddedTerminalCursorStruct),
15570
+ embeddedTerminalKeyOptions: allocFFIStruct(EmbeddedTerminalKeyOptionsStruct),
15394
15571
  audioStreamStats: {
15395
- ...allocStruct(AudioStreamStatsStruct),
15572
+ ...allocFFIStruct(AudioStreamStatsStruct),
15396
15573
  result: {
15397
15574
  bytesReceived: 0n,
15398
15575
  framesDecoded: 0n,
@@ -15407,8 +15584,8 @@ class FFIRenderLib {
15407
15584
  readyGeneration: 0
15408
15585
  }
15409
15586
  },
15410
- imageDrawOptions: allocStruct(ImageDrawOptionsStruct),
15411
- gridDrawOptions: allocStruct(GridDrawOptionsStruct)
15587
+ imageDrawOptions: allocFFIStruct(ImageDrawOptionsStruct),
15588
+ gridDrawOptions: allocFFIStruct(GridDrawOptionsStruct)
15412
15589
  };
15413
15590
  disposed = false;
15414
15591
  clipboardServices = new Set;
@@ -15460,6 +15637,9 @@ class FFIRenderLib {
15460
15637
  embeddedTerminalInvalidate(handle) {
15461
15638
  embeddedTerminalResult(this.opentui.symbols.embeddedTerminalInvalidate(handle), "invalidation");
15462
15639
  }
15640
+ embeddedTerminalSetTransparentBackground(handle, transparent) {
15641
+ embeddedTerminalResult(this.opentui.symbols.embeddedTerminalSetTransparentBackground(handle, transparent ? 1 : 0), "transparent background update");
15642
+ }
15463
15643
  embeddedTerminalScroll(handle, delta) {
15464
15644
  embeddedTerminalResult(this.opentui.symbols.embeddedTerminalScroll(handle, embeddedTerminalI32(delta, "scroll delta")), "scroll");
15465
15645
  }
@@ -15471,7 +15651,7 @@ class FFIRenderLib {
15471
15651
  }
15472
15652
  embeddedTerminalGetSelectedText(handle) {
15473
15653
  const required = new Uint32Array(1);
15474
- const read = (output2) => this.opentui.symbols.embeddedTerminalGetSelectedText(handle, viewOrNull(output2), output2.byteLength, required);
15654
+ const read = (output) => this.opentui.symbols.embeddedTerminalGetSelectedText(handle, viewOrNull(output), output.byteLength, required);
15475
15655
  const initial = new Uint8Array(256);
15476
15656
  const status = read(initial);
15477
15657
  if (status >= 0)
@@ -15487,7 +15667,7 @@ class FFIRenderLib {
15487
15667
  }
15488
15668
  embeddedTerminalCursor(handle) {
15489
15669
  const storage = this.ffiStructStorage.embeddedTerminalCursor;
15490
- embeddedTerminalResult(this.opentui.symbols.embeddedTerminalCursor(handle, storage.buffer), "cursor query");
15670
+ embeddedTerminalResult(this.opentui.symbols.embeddedTerminalCursor(handle, storage.ffiView), "cursor query");
15491
15671
  const result = EmbeddedTerminalCursorStruct.unpack(storage.buffer);
15492
15672
  return {
15493
15673
  x: result.x,
@@ -15515,7 +15695,7 @@ class FFIRenderLib {
15515
15695
  const text = key.text ? this.encoder.encode(key.text) : new Uint8Array;
15516
15696
  const textLength = toSafeFFIU32Length(text.byteLength, "Embedded terminal key text length");
15517
15697
  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);
15698
+ 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
15699
  const initial = new Uint8Array(Math.max(64, textLength));
15520
15700
  const status = encode(initial);
15521
15701
  if (status >= 0)
@@ -15777,7 +15957,7 @@ class FFIRenderLib {
15777
15957
  const width = this.opentui.symbols.getBufferWidth(bufferPtr);
15778
15958
  const height = this.opentui.symbols.getBufferHeight(bufferPtr);
15779
15959
  const widthMethod = widthMethodFromCode(this.opentui.symbols.getBufferWidthMethod(bufferPtr));
15780
- return new OptimizedBuffer(this, bufferPtr, width, height, { id: "next buffer", widthMethod });
15960
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { id: "next buffer", widthMethod });
15781
15961
  }
15782
15962
  getCurrentBuffer(renderer) {
15783
15963
  const bufferPtr = this.opentui.symbols.getCurrentBuffer(renderer);
@@ -15787,7 +15967,7 @@ class FFIRenderLib {
15787
15967
  const width = this.opentui.symbols.getBufferWidth(bufferPtr);
15788
15968
  const height = this.opentui.symbols.getBufferHeight(bufferPtr);
15789
15969
  const widthMethod = widthMethodFromCode(this.opentui.symbols.getBufferWidthMethod(bufferPtr));
15790
- return new OptimizedBuffer(this, bufferPtr, width, height, { id: "current buffer", widthMethod });
15970
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { id: "current buffer", widthMethod });
15791
15971
  }
15792
15972
  rendererSetPaletteState(renderer, palette, defaultForeground, defaultBackground, paletteEpoch) {
15793
15973
  const paletteBuffer = new Uint16Array(palette.length * 4);
@@ -15797,32 +15977,32 @@ class FFIRenderLib {
15797
15977
  this.opentui.symbols.rendererSetPaletteState(renderer, paletteBuffer, palette.length, rgbaBuffer(defaultForeground), rgbaBuffer(defaultBackground), paletteEpoch >>> 0);
15798
15978
  }
15799
15979
  bufferGetCharPtr(buffer) {
15800
- const ptr3 = this.opentui.symbols.bufferGetCharPtr(buffer);
15801
- if (!ptr3) {
15980
+ const ptr = this.opentui.symbols.bufferGetCharPtr(buffer);
15981
+ if (!ptr) {
15802
15982
  throw new Error("Failed to get char pointer");
15803
15983
  }
15804
- return ptr3;
15984
+ return ptr;
15805
15985
  }
15806
15986
  bufferGetFgPtr(buffer) {
15807
- const ptr3 = this.opentui.symbols.bufferGetFgPtr(buffer);
15808
- if (!ptr3) {
15987
+ const ptr = this.opentui.symbols.bufferGetFgPtr(buffer);
15988
+ if (!ptr) {
15809
15989
  throw new Error("Failed to get fg pointer");
15810
15990
  }
15811
- return ptr3;
15991
+ return ptr;
15812
15992
  }
15813
15993
  bufferGetBgPtr(buffer) {
15814
- const ptr3 = this.opentui.symbols.bufferGetBgPtr(buffer);
15815
- if (!ptr3) {
15994
+ const ptr = this.opentui.symbols.bufferGetBgPtr(buffer);
15995
+ if (!ptr) {
15816
15996
  throw new Error("Failed to get bg pointer");
15817
15997
  }
15818
- return ptr3;
15998
+ return ptr;
15819
15999
  }
15820
16000
  bufferGetAttributesPtr(buffer) {
15821
- const ptr3 = this.opentui.symbols.bufferGetAttributesPtr(buffer);
15822
- if (!ptr3) {
16001
+ const ptr = this.opentui.symbols.bufferGetAttributesPtr(buffer);
16002
+ if (!ptr) {
15823
16003
  throw new Error("Failed to get attributes pointer");
15824
16004
  }
15825
- return ptr3;
16005
+ return ptr;
15826
16006
  }
15827
16007
  bufferGetRespectAlpha(buffer) {
15828
16008
  return this.opentui.symbols.bufferGetRespectAlpha(buffer);
@@ -15853,25 +16033,25 @@ class FFIRenderLib {
15853
16033
  }
15854
16034
  bufferDrawText(buffer, text, x, y, color, bgColor, attributes) {
15855
16035
  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);
16036
+ const bg = optionalRgbaBuffer(bgColor);
16037
+ const fg = rgbaBuffer(color);
16038
+ this.opentui.symbols.bufferDrawText(buffer, viewOrNull(textBytes), textBytes.byteLength, x, y, fg, bg, attributes ?? 0);
15859
16039
  }
15860
16040
  bufferSetCellWithAlphaBlending(buffer, x, y, char, color, bgColor, attributes) {
15861
16041
  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);
16042
+ const bg = rgbaBuffer(bgColor);
16043
+ const fg = rgbaBuffer(color);
16044
+ this.opentui.symbols.bufferSetCellWithAlphaBlending(buffer, x, y, charPtr, fg, bg, attributes ?? 0);
15865
16045
  }
15866
16046
  bufferSetCell(buffer, x, y, char, color, bgColor, attributes) {
15867
16047
  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);
16048
+ const bg = rgbaBuffer(bgColor);
16049
+ const fg = rgbaBuffer(color);
16050
+ this.opentui.symbols.bufferSetCell(buffer, x, y, charPtr, fg, bg, attributes ?? 0);
15871
16051
  }
15872
16052
  bufferFillRect(buffer, x, y, width, height, color) {
15873
- const bg2 = rgbaBuffer(color);
15874
- this.opentui.symbols.bufferFillRect(buffer, x, y, width, height, bg2);
16053
+ const bg = rgbaBuffer(color);
16054
+ this.opentui.symbols.bufferFillRect(buffer, x, y, width, height, bg);
15875
16055
  }
15876
16056
  bufferColorMatrix(buffer, matrix, cellMask, cellMaskCount, strength, target) {
15877
16057
  this.opentui.symbols.bufferColorMatrix(buffer, matrix, cellMask, cellMaskCount, strength, target);
@@ -15899,20 +16079,20 @@ class FFIRenderLib {
15899
16079
  sourceHeight,
15900
16080
  protocol: protocolId
15901
16081
  }, storage.view, 0);
15902
- return Boolean(this.opentui.symbols.bufferDrawImage(buffer, image, storage.buffer));
16082
+ return Boolean(this.opentui.symbols.bufferDrawImage(buffer, image, storage.ffiView));
15903
16083
  }
15904
16084
  bufferDrawPackedBuffer(buffer, data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells) {
15905
16085
  this.opentui.symbols.bufferDrawPackedBuffer(buffer, data, dataLen, posX, posY, terminalWidthCells, terminalHeightCells);
15906
16086
  }
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));
16087
+ bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, fg, bg) {
16088
+ this.opentui.symbols.bufferDrawGrayscaleBuffer(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg), optionalRgbaBuffer(bg));
15909
16089
  }
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));
16090
+ bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, fg, bg) {
16091
+ this.opentui.symbols.bufferDrawGrayscaleBufferSupersampled(buffer, posX, posY, intensities, srcWidth, srcHeight, optionalRgbaBuffer(fg), optionalRgbaBuffer(bg));
15912
16092
  }
15913
16093
  bufferDrawGrid(buffer, borderChars, borderFg, borderBg, columnOffsets, columnCount, rowOffsets, rowCount, options) {
15914
16094
  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);
16095
+ this.opentui.symbols.bufferDrawGrid(buffer, borderChars, rgbaBuffer(borderFg), rgbaBuffer(borderBg), columnOffsets, columnCount, rowOffsets, rowCount, this.ffiStructStorage.gridDrawOptions.ffiView);
15916
16096
  }
15917
16097
  bufferDrawBox(buffer, x, y, width, height, borderChars, packedOptions, borderColor, backgroundColor, titleColor, title, bottomTitle) {
15918
16098
  const titleBytes = title ? this.encoder.encode(title) : null;
@@ -15930,7 +16110,7 @@ class FFIRenderLib {
15930
16110
  const urlBytes = this.encoder.encode(url);
15931
16111
  return this.opentui.symbols.linkAlloc(viewOrNull(urlBytes), urlBytes.byteLength);
15932
16112
  }
15933
- linkGetUrl(linkId, maxLen = 512) {
16113
+ linkGetUrl(linkId, maxLen = MAX_LINK_URL_BYTES2) {
15934
16114
  const outBuffer = new Uint8Array(maxLen);
15935
16115
  const actualLen = this.opentui.symbols.linkGetUrl(linkId, viewOrNull(outBuffer), maxLen);
15936
16116
  return this.decoder.decode(outBuffer.slice(0, actualLen));
@@ -15960,7 +16140,7 @@ class FFIRenderLib {
15960
16140
  visible: struct.visible,
15961
16141
  style: CURSOR_ID_TO_STYLE[struct.style] ?? "block",
15962
16142
  blinking: struct.blinking,
15963
- color: RGBA.fromValues(struct.r, struct.g, struct.b, struct.a)
16143
+ color: RGBA2.fromValues(struct.r, struct.g, struct.b, struct.a)
15964
16144
  };
15965
16145
  }
15966
16146
  setCursorStyleOptions(renderer, options) {
@@ -15997,7 +16177,7 @@ class FFIRenderLib {
15997
16177
  if (!bufferPtr) {
15998
16178
  throw new Error(`Failed to create optimized buffer: ${width}x${height}`);
15999
16179
  }
16000
- return new OptimizedBuffer(this, bufferPtr, width, height, { respectAlpha, id, widthMethod });
16180
+ return new OptimizedBuffer2(this, bufferPtr, width, height, { respectAlpha, id, widthMethod });
16001
16181
  }
16002
16182
  destroyOptimizedBuffer(bufferPtr) {
16003
16183
  this.opentui.symbols.destroyOptimizedBuffer(bufferPtr);
@@ -16065,19 +16245,19 @@ class FFIRenderLib {
16065
16245
  operation: output[0] === 0 ? null : output[0]
16066
16246
  };
16067
16247
  }
16068
- clipboardReadOperationStart(service, request, selection2, maxBytes, maxImagePixels, maxConversionBytes, timeoutMs) {
16248
+ clipboardReadOperationStart(service, request, selection, maxBytes, maxImagePixels, maxConversionBytes, timeoutMs) {
16069
16249
  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);
16250
+ 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
16251
  return this.clipboardStartResult(status, output);
16072
16252
  }
16073
- clipboardWriteOperationStart(service, textUtf8, selection2, timeoutMs) {
16253
+ clipboardWriteOperationStart(service, textUtf8, selection, timeoutMs) {
16074
16254
  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);
16255
+ const status = this.opentui.symbols.clipboardWriteOperationStart(service, textUtf8, toSafeFFIU32Length(textUtf8.byteLength, "clipboard write text"), selection, toSafeFFIU32Length(timeoutMs, "clipboard write timeout"), output);
16076
16256
  return this.clipboardStartResult(status, output);
16077
16257
  }
16078
- clipboardClearOperationStart(service, selection2, timeoutMs) {
16258
+ clipboardClearOperationStart(service, selection, timeoutMs) {
16079
16259
  const output = new Uint32Array(1);
16080
- const status = this.opentui.symbols.clipboardClearOperationStart(service, selection2, toSafeFFIU32Length(timeoutMs, "clipboard clear timeout"), output);
16260
+ const status = this.opentui.symbols.clipboardClearOperationStart(service, selection, toSafeFFIU32Length(timeoutMs, "clipboard clear timeout"), output);
16081
16261
  return this.clipboardStartResult(status, output);
16082
16262
  }
16083
16263
  clipboardOperationPoll(operation) {
@@ -16334,8 +16514,8 @@ class FFIRenderLib {
16334
16514
  yogaNodeStyleGetFloat(node, kind) {
16335
16515
  return this.opentui.symbols.yogaNodeStyleGetFloat(node, kind);
16336
16516
  }
16337
- yogaNodeStyleSetBorder(node, edge, border2) {
16338
- this.opentui.symbols.yogaNodeStyleSetBorder(node, edge, border2);
16517
+ yogaNodeStyleSetBorder(node, edge, border) {
16518
+ this.opentui.symbols.yogaNodeStyleSetBorder(node, edge, border);
16339
16519
  }
16340
16520
  yogaNodeStyleGetBorder(node, edge) {
16341
16521
  return this.opentui.symbols.yogaNodeStyleGetBorder(node, edge);
@@ -16387,7 +16567,7 @@ class FFIRenderLib {
16387
16567
  if (!bufferPtr) {
16388
16568
  throw new Error(`Failed to create TextBuffer`);
16389
16569
  }
16390
- return new TextBuffer(this, bufferPtr);
16570
+ return new TextBuffer2(this, bufferPtr);
16391
16571
  }
16392
16572
  destroyTextBuffer(buffer) {
16393
16573
  this.opentui.symbols.destroyTextBuffer(buffer);
@@ -16404,12 +16584,12 @@ class FFIRenderLib {
16404
16584
  textBufferClear(buffer) {
16405
16585
  this.opentui.symbols.textBufferClear(buffer);
16406
16586
  }
16407
- textBufferSetDefaultFg(buffer, fg2) {
16408
- const fgBuffer = optionalRgbaBuffer(fg2);
16587
+ textBufferSetDefaultFg(buffer, fg) {
16588
+ const fgBuffer = optionalRgbaBuffer(fg);
16409
16589
  this.opentui.symbols.textBufferSetDefaultFg(buffer, fgBuffer);
16410
16590
  }
16411
- textBufferSetDefaultBg(buffer, bg2) {
16412
- const bgBuffer = optionalRgbaBuffer(bg2);
16591
+ textBufferSetDefaultBg(buffer, bg) {
16592
+ const bgBuffer = optionalRgbaBuffer(bg);
16413
16593
  this.opentui.symbols.textBufferSetDefaultBg(buffer, bgBuffer);
16414
16594
  }
16415
16595
  textBufferSetDefaultAttributes(buffer, attributes) {
@@ -16447,8 +16627,8 @@ class FFIRenderLib {
16447
16627
  textBufferAppendFromMemId(buffer, memId) {
16448
16628
  this.opentui.symbols.textBufferAppendFromMemId(buffer, memId);
16449
16629
  }
16450
- textBufferLoadFile(buffer, path3) {
16451
- const pathBytes = this.encoder.encode(path3);
16630
+ textBufferLoadFile(buffer, path) {
16631
+ const pathBytes = this.encoder.encode(path);
16452
16632
  return this.opentui.symbols.textBufferLoadFile(buffer, viewOrNull(pathBytes), pathBytes.byteLength);
16453
16633
  }
16454
16634
  textBufferSetStyledText(buffer, chunks) {
@@ -16502,39 +16682,39 @@ class FFIRenderLib {
16502
16682
  this.opentui.symbols.destroyTextBufferView(view);
16503
16683
  }
16504
16684
  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);
16685
+ const bg = optionalRgbaBuffer(bgColor);
16686
+ const fg = optionalRgbaBuffer(fgColor);
16687
+ this.opentui.symbols.textBufferViewSetSelection(view, start, end, bg, fg);
16508
16688
  }
16509
16689
  textBufferViewResetSelection(view) {
16510
16690
  this.opentui.symbols.textBufferViewResetSelection(view);
16511
16691
  }
16512
16692
  textBufferViewGetSelection(view) {
16513
16693
  const packedInfo = this.textBufferViewGetSelectionInfo(view);
16514
- if (packedInfo === 0xffff_ffff_ffff_ffffn) {
16694
+ if (packedInfo === 0xffffffffffffffffn) {
16515
16695
  return null;
16516
16696
  }
16517
16697
  const start = Number(packedInfo >> 32n);
16518
- const end = Number(packedInfo & 0xffff_ffffn);
16698
+ const end = Number(packedInfo & 0xffffffffn);
16519
16699
  return { start, end };
16520
16700
  }
16521
16701
  textBufferViewGetSelectionInfo(view) {
16522
16702
  return this.opentui.symbols.textBufferViewGetSelectionInfo(view);
16523
16703
  }
16524
16704
  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)));
16705
+ const bg = optionalRgbaBuffer(bgColor);
16706
+ const fg = optionalRgbaBuffer(fgColor);
16707
+ return Boolean(this.opentui.symbols.textBufferViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, selectionBehaviorByte(behavior)));
16528
16708
  }
16529
16709
  textBufferViewUpdateSelection(view, end, bgColor, fgColor) {
16530
- const bg2 = optionalRgbaBuffer(bgColor);
16531
- const fg2 = optionalRgbaBuffer(fgColor);
16532
- this.opentui.symbols.textBufferViewUpdateSelection(view, end, bg2, fg2);
16710
+ const bg = optionalRgbaBuffer(bgColor);
16711
+ const fg = optionalRgbaBuffer(fgColor);
16712
+ this.opentui.symbols.textBufferViewUpdateSelection(view, end, bg, fg);
16533
16713
  }
16534
16714
  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)));
16715
+ const bg = optionalRgbaBuffer(bgColor);
16716
+ const fg = optionalRgbaBuffer(fgColor);
16717
+ return Boolean(this.opentui.symbols.textBufferViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, selectionBehaviorByte(behavior)));
16538
16718
  }
16539
16719
  textBufferViewResetLocalSelection(view) {
16540
16720
  this.opentui.symbols.textBufferViewResetLocalSelection(view);
@@ -16552,6 +16732,10 @@ class FFIRenderLib {
16552
16732
  const modeValue = mode === "none" ? 0 : mode === "char" ? 1 : 2;
16553
16733
  this.opentui.symbols.textBufferViewSetWrapMode(view, modeValue);
16554
16734
  }
16735
+ textBufferViewSetTextAlign(view, alignment) {
16736
+ const alignValue = alignment === "left" ? 0 : alignment === "center" ? 1 : 2;
16737
+ this.opentui.symbols.textBufferViewSetTextAlign(view, alignValue);
16738
+ }
16555
16739
  textBufferViewSetFirstLineOffset(view, offset) {
16556
16740
  this.opentui.symbols.textBufferViewSetFirstLineOffset(view, offset);
16557
16741
  }
@@ -16594,6 +16778,20 @@ class FFIRenderLib {
16594
16778
  textBufferViewGetVirtualLineCount(view) {
16595
16779
  return this.opentui.symbols.textBufferViewGetVirtualLineCount(view);
16596
16780
  }
16781
+ textBufferViewGetLineSources(view, startLine, lineCount) {
16782
+ toSafeFFIU32Length(startLine, "visual row start");
16783
+ toSafeFFIU32Length(lineCount, "visual row count");
16784
+ if (lineCount === 0)
16785
+ return [];
16786
+ const outBuffer = new ArrayBuffer(LineInfoStruct.size);
16787
+ this.textBufferViewGetLogicalLineInfoDirect(view, outBuffer);
16788
+ const data = new DataView(outBuffer);
16789
+ const sources = LineInfoStruct.arrayFields.get("sources");
16790
+ const count = Math.max(0, Math.min(lineCount, data.getUint32(sources.lengthOffset, true) - startLine));
16791
+ if (count === 0)
16792
+ return [];
16793
+ return Array.from(new Uint32Array(toArrayBuffer(toPointer(data.getBigUint64(sources.arrayOffset, true)), startLine * 4, count * 4)));
16794
+ }
16597
16795
  textBufferViewGetLineInfoDirect(view, outBuffer) {
16598
16796
  this.opentui.symbols.textBufferViewGetLineInfoDirect(view, outBuffer);
16599
16797
  }
@@ -16633,7 +16831,7 @@ class FFIRenderLib {
16633
16831
  }
16634
16832
  textBufferViewMeasureForDimensions(view, width, height) {
16635
16833
  const storage = this.ffiStructStorage.measureResult;
16636
- const success = this.opentui.symbols.textBufferViewMeasureForDimensions(view, width, height, storage.buffer);
16834
+ const success = this.opentui.symbols.textBufferViewMeasureForDimensions(view, width, height, storage.ffiView);
16637
16835
  if (!success)
16638
16836
  return null;
16639
16837
  const result = MeasureResultStruct.unpackInto(storage.view, storage.result);
@@ -16863,7 +17061,7 @@ class FFIRenderLib {
16863
17061
  }
16864
17062
  editBufferGetCursorPosition(buffer) {
16865
17063
  const storage = this.ffiStructStorage.logicalCursor;
16866
- this.opentui.symbols.editBufferGetCursorPosition(buffer, storage.buffer);
17064
+ this.opentui.symbols.editBufferGetCursorPosition(buffer, storage.ffiView);
16867
17065
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16868
17066
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16869
17067
  }
@@ -16913,25 +17111,25 @@ class FFIRenderLib {
16913
17111
  }
16914
17112
  editBufferGetNextWordBoundary(buffer) {
16915
17113
  const storage = this.ffiStructStorage.logicalCursor;
16916
- this.opentui.symbols.editBufferGetNextWordBoundary(buffer, storage.buffer);
17114
+ this.opentui.symbols.editBufferGetNextWordBoundary(buffer, storage.ffiView);
16917
17115
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16918
17116
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16919
17117
  }
16920
17118
  editBufferGetPrevWordBoundary(buffer) {
16921
17119
  const storage = this.ffiStructStorage.logicalCursor;
16922
- this.opentui.symbols.editBufferGetPrevWordBoundary(buffer, storage.buffer);
17120
+ this.opentui.symbols.editBufferGetPrevWordBoundary(buffer, storage.ffiView);
16923
17121
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16924
17122
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16925
17123
  }
16926
17124
  editBufferGetEOL(buffer) {
16927
17125
  const storage = this.ffiStructStorage.logicalCursor;
16928
- this.opentui.symbols.editBufferGetEOL(buffer, storage.buffer);
17126
+ this.opentui.symbols.editBufferGetEOL(buffer, storage.ffiView);
16929
17127
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
16930
17128
  return { row: cursor.row, col: cursor.col, offset: cursor.offset };
16931
17129
  }
16932
17130
  editBufferOffsetToPosition(buffer, offset) {
16933
17131
  const storage = this.ffiStructStorage.logicalCursor;
16934
- const success = this.opentui.symbols.editBufferOffsetToPosition(buffer, offset, storage.buffer);
17132
+ const success = this.opentui.symbols.editBufferOffsetToPosition(buffer, offset, storage.ffiView);
16935
17133
  if (!success)
16936
17134
  return null;
16937
17135
  const cursor = LogicalCursorStruct.unpackInto(storage.view, storage.result);
@@ -16960,36 +17158,36 @@ class FFIRenderLib {
16960
17158
  return usesBunFFI ? outBuffer.slice(0, len) : trimNodeFFIOutputBytes(outBuffer, len);
16961
17159
  }
16962
17160
  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);
17161
+ const bg = optionalRgbaBuffer(bgColor);
17162
+ const fg = optionalRgbaBuffer(fgColor);
17163
+ this.opentui.symbols.editorViewSetSelection(view, start, end, bg, fg);
16966
17164
  }
16967
17165
  editorViewResetSelection(view) {
16968
17166
  this.opentui.symbols.editorViewResetSelection(view);
16969
17167
  }
16970
17168
  editorViewGetSelection(view) {
16971
17169
  const packedInfo = this.opentui.symbols.editorViewGetSelection(view);
16972
- if (packedInfo === 0xffff_ffff_ffff_ffffn) {
17170
+ if (packedInfo === 0xffffffffffffffffn) {
16973
17171
  return null;
16974
17172
  }
16975
17173
  const start = Number(packedInfo >> 32n);
16976
- const end = Number(packedInfo & 0xffff_ffffn);
17174
+ const end = Number(packedInfo & 0xffffffffn);
16977
17175
  return { start, end };
16978
17176
  }
16979
17177
  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)));
17178
+ const bg = optionalRgbaBuffer(bgColor);
17179
+ const fg = optionalRgbaBuffer(fgColor);
17180
+ return Boolean(this.opentui.symbols.editorViewSetLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
16983
17181
  }
16984
17182
  editorViewUpdateSelection(view, end, bgColor, fgColor) {
16985
- const bg2 = optionalRgbaBuffer(bgColor);
16986
- const fg2 = optionalRgbaBuffer(fgColor);
16987
- this.opentui.symbols.editorViewUpdateSelection(view, end, bg2, fg2);
17183
+ const bg = optionalRgbaBuffer(bgColor);
17184
+ const fg = optionalRgbaBuffer(fgColor);
17185
+ this.opentui.symbols.editorViewUpdateSelection(view, end, bg, fg);
16988
17186
  }
16989
17187
  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)));
17188
+ const bg = optionalRgbaBuffer(bgColor);
17189
+ const fg = optionalRgbaBuffer(fgColor);
17190
+ return Boolean(this.opentui.symbols.editorViewUpdateLocalSelection(view, anchorX, anchorY, focusX, focusY, bg, fg, editorLocalSelectionFlags(updateCursor, followCursor, behavior)));
16993
17191
  }
16994
17192
  editorViewResetLocalSelection(view) {
16995
17193
  this.opentui.symbols.editorViewResetLocalSelection(view);
@@ -17001,14 +17199,14 @@ class FFIRenderLib {
17001
17199
  this.opentui.symbols.editorViewSetSelectionOccupancy(view, occupancy === "boundary" ? 1 : 0);
17002
17200
  }
17003
17201
  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);
17202
+ const bg = optionalRgbaBuffer(bgColor);
17203
+ const fg = optionalRgbaBuffer(fgColor);
17204
+ this.opentui.symbols.editorViewSetSelectionInclusive(view, start, end, bg, fg);
17007
17205
  }
17008
17206
  editorViewSetSelectionColors(view, bgColor, fgColor) {
17009
- const bg2 = optionalRgbaBuffer(bgColor);
17010
- const fg2 = optionalRgbaBuffer(fgColor);
17011
- this.opentui.symbols.editorViewSetSelectionColors(view, bg2, fg2);
17207
+ const bg = optionalRgbaBuffer(bgColor);
17208
+ const fg = optionalRgbaBuffer(fgColor);
17209
+ this.opentui.symbols.editorViewSetSelectionColors(view, bg, fg);
17012
17210
  }
17013
17211
  editorViewGetSelectedTextBytes(view, maxLength) {
17014
17212
  const outBuffer = new Uint8Array(maxLength);
@@ -17034,7 +17232,7 @@ class FFIRenderLib {
17034
17232
  }
17035
17233
  editorViewGetVisualCursor(view) {
17036
17234
  const storage = this.ffiStructStorage.visualCursor;
17037
- this.opentui.symbols.editorViewGetVisualCursor(view, storage.buffer);
17235
+ this.opentui.symbols.editorViewGetVisualCursor(view, storage.ffiView);
17038
17236
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17039
17237
  return { ...cursor };
17040
17238
  }
@@ -17052,31 +17250,31 @@ class FFIRenderLib {
17052
17250
  }
17053
17251
  editorViewGetNextWordBoundary(view) {
17054
17252
  const storage = this.ffiStructStorage.visualCursor;
17055
- this.opentui.symbols.editorViewGetNextWordBoundary(view, storage.buffer);
17253
+ this.opentui.symbols.editorViewGetNextWordBoundary(view, storage.ffiView);
17056
17254
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17057
17255
  return { ...cursor };
17058
17256
  }
17059
17257
  editorViewGetPrevWordBoundary(view) {
17060
17258
  const storage = this.ffiStructStorage.visualCursor;
17061
- this.opentui.symbols.editorViewGetPrevWordBoundary(view, storage.buffer);
17259
+ this.opentui.symbols.editorViewGetPrevWordBoundary(view, storage.ffiView);
17062
17260
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17063
17261
  return { ...cursor };
17064
17262
  }
17065
17263
  editorViewGetEOL(view) {
17066
17264
  const storage = this.ffiStructStorage.visualCursor;
17067
- this.opentui.symbols.editorViewGetEOL(view, storage.buffer);
17265
+ this.opentui.symbols.editorViewGetEOL(view, storage.ffiView);
17068
17266
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17069
17267
  return { ...cursor };
17070
17268
  }
17071
17269
  editorViewGetVisualSOL(view) {
17072
17270
  const storage = this.ffiStructStorage.visualCursor;
17073
- this.opentui.symbols.editorViewGetVisualSOL(view, storage.buffer);
17271
+ this.opentui.symbols.editorViewGetVisualSOL(view, storage.ffiView);
17074
17272
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17075
17273
  return { ...cursor };
17076
17274
  }
17077
17275
  editorViewGetVisualEOL(view) {
17078
17276
  const storage = this.ffiStructStorage.visualCursor;
17079
- this.opentui.symbols.editorViewGetVisualEOL(view, storage.buffer);
17277
+ this.opentui.symbols.editorViewGetVisualEOL(view, storage.ffiView);
17080
17278
  const cursor = VisualCursorStruct.unpackInto(storage.view, storage.result);
17081
17279
  return { ...cursor };
17082
17280
  }
@@ -17182,8 +17380,8 @@ class FFIRenderLib {
17182
17380
  freeUnicode(encoded) {
17183
17381
  this.opentui.symbols.freeUnicode(encoded.ptr, encoded.data.length);
17184
17382
  }
17185
- bufferDrawChar(buffer, char, x, y, fg2, bg2, attributes = 0) {
17186
- this.opentui.symbols.bufferDrawChar(buffer, char, x, y, rgbaBuffer(fg2), rgbaBuffer(bg2), attributes);
17383
+ bufferDrawChar(buffer, char, x, y, fg, bg, attributes = 0) {
17384
+ this.opentui.symbols.bufferDrawChar(buffer, char, x, y, rgbaBuffer(fg), rgbaBuffer(bg), attributes);
17187
17385
  }
17188
17386
  createAudioEngine(options) {
17189
17387
  const optionsBuffer = options == null ? null : AudioCreateOptionsStruct.pack(options);
@@ -17300,15 +17498,15 @@ class FFIRenderLib {
17300
17498
  return this.opentui.symbols.audioStop(engine);
17301
17499
  }
17302
17500
  audioCreateStream(engine, options) {
17303
- if (!isFFIU32(options.groupId) || options.format !== NativeAudioStreamFormat2.Mp3 && options.format !== NativeAudioStreamFormat2.Flac) {
17501
+ if (!isFFIU32(options.groupId) || !isFFIU32(options.sampleRate ?? 0) || !isFFIU32(options.channels ?? 0) || !Object.values(NativeAudioStreamFormat3).includes(options.format)) {
17304
17502
  return { status: -1, streamId: null };
17305
17503
  }
17306
- const optionsBuffer = AudioStreamCreateOptionsStruct.pack(options);
17307
- const outBuffer = new ArrayBuffer(4);
17504
+ const optionsBuffer = new Uint8Array(AudioStreamCreateOptionsStruct.pack(options));
17505
+ const outBuffer = new Uint32Array(1);
17308
17506
  const status = this.opentui.symbols.audioCreateStream(engine, optionsBuffer, outBuffer);
17309
17507
  if (status !== 0)
17310
17508
  return { status, streamId: null };
17311
- return { status, streamId: new Uint32Array(outBuffer)[0] ?? null };
17509
+ return { status, streamId: outBuffer[0] ?? null };
17312
17510
  }
17313
17511
  audioWriteStream(engine, streamId, data) {
17314
17512
  const dataLength = toSafeFFIU32Length(data.byteLength, "Audio stream data length");
@@ -17333,7 +17531,7 @@ class FFIRenderLib {
17333
17531
  }
17334
17532
  audioGetStreamStats(engine, streamId) {
17335
17533
  const storage = this.ffiStructStorage.audioStreamStats;
17336
- const status = this.opentui.symbols.audioGetStreamStats(engine, streamId, storage.buffer);
17534
+ const status = this.opentui.symbols.audioGetStreamStats(engine, streamId, storage.ffiView);
17337
17535
  if (status !== 0)
17338
17536
  return null;
17339
17537
  const stats = AudioStreamStatsStruct.unpackInto(storage.view, storage.result);
@@ -17341,7 +17539,7 @@ class FFIRenderLib {
17341
17539
  }
17342
17540
  audioCloseStream(engine, streamId, reason) {
17343
17541
  const storage = this.ffiStructStorage.audioStreamStats;
17344
- const status = this.opentui.symbols.audioCloseStream(engine, streamId, reason, storage.buffer);
17542
+ const status = this.opentui.symbols.audioCloseStream(engine, streamId, reason, storage.ffiView);
17345
17543
  if (status !== 0)
17346
17544
  return { status, stats: null };
17347
17545
  const stats = AudioStreamStatsStruct.unpackInto(storage.view, storage.result);
@@ -17505,10 +17703,10 @@ class FFIRenderLib {
17505
17703
  destroySyntaxStyle(style) {
17506
17704
  this.opentui.symbols.destroySyntaxStyle(style);
17507
17705
  }
17508
- syntaxStyleRegister(style, name, fg2, bg2, attributes) {
17706
+ syntaxStyleRegister(style, name, fg, bg, attributes) {
17509
17707
  const nameBytes = this.encoder.encode(name);
17510
- const fgBuffer = optionalRgbaBuffer(fg2);
17511
- const bgBuffer = optionalRgbaBuffer(bg2);
17708
+ const fgBuffer = optionalRgbaBuffer(fg);
17709
+ const bgBuffer = optionalRgbaBuffer(bg);
17512
17710
  return this.opentui.symbols.syntaxStyleRegister(style, viewOrNull(nameBytes), nameBytes.byteLength, fgBuffer, bgBuffer, attributes);
17513
17711
  }
17514
17712
  syntaxStyleResolveByName(style, name) {
@@ -17637,7 +17835,7 @@ class FFIRenderLib {
17637
17835
  var opentuiLibPath;
17638
17836
  var opentuiLib;
17639
17837
  var renderLibResolved = false;
17640
- function setRenderLibPath(libPath) {
17838
+ function setRenderLibPath2(libPath) {
17641
17839
  if (opentuiLibPath !== libPath) {
17642
17840
  if (renderLibResolved) {
17643
17841
  throw new Error("setRenderLibPath() must be called before resolveRenderLib()");
@@ -17649,7 +17847,7 @@ function setRenderLibPath(libPath) {
17649
17847
  opentuiLib = undefined;
17650
17848
  }
17651
17849
  }
17652
- function resolveRenderLib() {
17850
+ function resolveRenderLib2() {
17653
17851
  if (!opentuiLib) {
17654
17852
  try {
17655
17853
  opentuiLib = new FFIRenderLib(opentuiLibPath);
@@ -17665,204 +17863,204 @@ try {
17665
17863
  } catch (error) {}
17666
17864
 
17667
17865
  // 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;
17866
+ var Align2;
17867
+ ((Align) => {
17868
+ Align[Align["Auto"] = 0] = "Auto";
17869
+ Align[Align["FlexStart"] = 1] = "FlexStart";
17870
+ Align[Align["Center"] = 2] = "Center";
17871
+ Align[Align["FlexEnd"] = 3] = "FlexEnd";
17872
+ Align[Align["Stretch"] = 4] = "Stretch";
17873
+ Align[Align["Baseline"] = 5] = "Baseline";
17874
+ Align[Align["SpaceBetween"] = 6] = "SpaceBetween";
17875
+ Align[Align["SpaceAround"] = 7] = "SpaceAround";
17876
+ Align[Align["SpaceEvenly"] = 8] = "SpaceEvenly";
17877
+ })(Align2 ||= {});
17878
+ var BoxSizing2;
17879
+ ((BoxSizing) => {
17880
+ BoxSizing[BoxSizing["BorderBox"] = 0] = "BorderBox";
17881
+ BoxSizing[BoxSizing["ContentBox"] = 1] = "ContentBox";
17882
+ })(BoxSizing2 ||= {});
17883
+ var Dimension2;
17884
+ ((Dimension) => {
17885
+ Dimension[Dimension["Width"] = 0] = "Width";
17886
+ Dimension[Dimension["Height"] = 1] = "Height";
17887
+ })(Dimension2 ||= {});
17888
+ var Direction2;
17889
+ ((Direction) => {
17890
+ Direction[Direction["Inherit"] = 0] = "Inherit";
17891
+ Direction[Direction["LTR"] = 1] = "LTR";
17892
+ Direction[Direction["RTL"] = 2] = "RTL";
17893
+ })(Direction2 ||= {});
17894
+ var Display2;
17895
+ ((Display) => {
17896
+ Display[Display["Flex"] = 0] = "Flex";
17897
+ Display[Display["None"] = 1] = "None";
17898
+ Display[Display["Contents"] = 2] = "Contents";
17899
+ })(Display2 ||= {});
17900
+ var Edge2;
17901
+ ((Edge) => {
17902
+ Edge[Edge["Left"] = 0] = "Left";
17903
+ Edge[Edge["Top"] = 1] = "Top";
17904
+ Edge[Edge["Right"] = 2] = "Right";
17905
+ Edge[Edge["Bottom"] = 3] = "Bottom";
17906
+ Edge[Edge["Start"] = 4] = "Start";
17907
+ Edge[Edge["End"] = 5] = "End";
17908
+ Edge[Edge["Horizontal"] = 6] = "Horizontal";
17909
+ Edge[Edge["Vertical"] = 7] = "Vertical";
17910
+ Edge[Edge["All"] = 8] = "All";
17911
+ })(Edge2 ||= {});
17912
+ var Errata2;
17913
+ ((Errata) => {
17914
+ Errata[Errata["None"] = 0] = "None";
17915
+ Errata[Errata["StretchFlexBasis"] = 1] = "StretchFlexBasis";
17916
+ Errata[Errata["AbsolutePositionWithoutInsetsExcludesPadding"] = 2] = "AbsolutePositionWithoutInsetsExcludesPadding";
17917
+ Errata[Errata["AbsolutePercentAgainstInnerSize"] = 4] = "AbsolutePercentAgainstInnerSize";
17918
+ Errata[Errata["All"] = 2147483647] = "All";
17919
+ Errata[Errata["Classic"] = 2147483646] = "Classic";
17920
+ })(Errata2 ||= {});
17921
+ var ExperimentalFeature2;
17922
+ ((ExperimentalFeature) => {
17923
+ ExperimentalFeature[ExperimentalFeature["WebFlexBasis"] = 0] = "WebFlexBasis";
17924
+ })(ExperimentalFeature2 ||= {});
17925
+ var FlexDirection2;
17926
+ ((FlexDirection) => {
17927
+ FlexDirection[FlexDirection["Column"] = 0] = "Column";
17928
+ FlexDirection[FlexDirection["ColumnReverse"] = 1] = "ColumnReverse";
17929
+ FlexDirection[FlexDirection["Row"] = 2] = "Row";
17930
+ FlexDirection[FlexDirection["RowReverse"] = 3] = "RowReverse";
17931
+ })(FlexDirection2 ||= {});
17932
+ var Gutter2;
17933
+ ((Gutter) => {
17934
+ Gutter[Gutter["Column"] = 0] = "Column";
17935
+ Gutter[Gutter["Row"] = 1] = "Row";
17936
+ Gutter[Gutter["All"] = 2] = "All";
17937
+ })(Gutter2 ||= {});
17938
+ var Justify2;
17939
+ ((Justify) => {
17940
+ Justify[Justify["FlexStart"] = 0] = "FlexStart";
17941
+ Justify[Justify["Center"] = 1] = "Center";
17942
+ Justify[Justify["FlexEnd"] = 2] = "FlexEnd";
17943
+ Justify[Justify["SpaceBetween"] = 3] = "SpaceBetween";
17944
+ Justify[Justify["SpaceAround"] = 4] = "SpaceAround";
17945
+ Justify[Justify["SpaceEvenly"] = 5] = "SpaceEvenly";
17946
+ })(Justify2 ||= {});
17947
+ var LogLevel3;
17948
+ ((LogLevel) => {
17949
+ LogLevel[LogLevel["Error"] = 0] = "Error";
17950
+ LogLevel[LogLevel["Warn"] = 1] = "Warn";
17951
+ LogLevel[LogLevel["Info"] = 2] = "Info";
17952
+ LogLevel[LogLevel["Debug"] = 3] = "Debug";
17953
+ LogLevel[LogLevel["Verbose"] = 4] = "Verbose";
17954
+ LogLevel[LogLevel["Fatal"] = 5] = "Fatal";
17955
+ })(LogLevel3 ||= {});
17956
+ var MeasureMode2;
17957
+ ((MeasureMode) => {
17958
+ MeasureMode[MeasureMode["Undefined"] = 0] = "Undefined";
17959
+ MeasureMode[MeasureMode["Exactly"] = 1] = "Exactly";
17960
+ MeasureMode[MeasureMode["AtMost"] = 2] = "AtMost";
17961
+ })(MeasureMode2 ||= {});
17962
+ var NodeType2;
17963
+ ((NodeType) => {
17964
+ NodeType[NodeType["Default"] = 0] = "Default";
17965
+ NodeType[NodeType["Text"] = 1] = "Text";
17966
+ })(NodeType2 ||= {});
17967
+ var Overflow2;
17968
+ ((Overflow) => {
17969
+ Overflow[Overflow["Visible"] = 0] = "Visible";
17970
+ Overflow[Overflow["Hidden"] = 1] = "Hidden";
17971
+ Overflow[Overflow["Scroll"] = 2] = "Scroll";
17972
+ })(Overflow2 ||= {});
17973
+ var PositionType2;
17974
+ ((PositionType) => {
17975
+ PositionType[PositionType["Static"] = 0] = "Static";
17976
+ PositionType[PositionType["Relative"] = 1] = "Relative";
17977
+ PositionType[PositionType["Absolute"] = 2] = "Absolute";
17978
+ })(PositionType2 ||= {});
17979
+ var Unit2;
17980
+ ((Unit) => {
17981
+ Unit[Unit["Undefined"] = 0] = "Undefined";
17982
+ Unit[Unit["Point"] = 1] = "Point";
17983
+ Unit[Unit["Percent"] = 2] = "Percent";
17984
+ Unit[Unit["Auto"] = 3] = "Auto";
17985
+ })(Unit2 ||= {});
17986
+ var Wrap2;
17789
17987
  ((_Wrap) => {
17790
17988
  _Wrap[_Wrap["NoWrap"] = 0] = "NoWrap";
17791
17989
  _Wrap[_Wrap["Wrap"] = 1] = "Wrap";
17792
17990
  _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 */;
17991
+ })(Wrap2 ||= {});
17992
+ var ALIGN_AUTO2 = 0 /* Auto */;
17993
+ var ALIGN_FLEX_START2 = 1 /* FlexStart */;
17994
+ var ALIGN_CENTER2 = 2 /* Center */;
17995
+ var ALIGN_FLEX_END2 = 3 /* FlexEnd */;
17996
+ var ALIGN_STRETCH2 = 4 /* Stretch */;
17997
+ var ALIGN_BASELINE2 = 5 /* Baseline */;
17998
+ var ALIGN_SPACE_BETWEEN2 = 6 /* SpaceBetween */;
17999
+ var ALIGN_SPACE_AROUND2 = 7 /* SpaceAround */;
18000
+ var ALIGN_SPACE_EVENLY2 = 8 /* SpaceEvenly */;
18001
+ var BOX_SIZING_BORDER_BOX2 = 0 /* BorderBox */;
18002
+ var BOX_SIZING_CONTENT_BOX2 = 1 /* ContentBox */;
18003
+ var DIMENSION_WIDTH2 = 0 /* Width */;
18004
+ var DIMENSION_HEIGHT2 = 1 /* Height */;
18005
+ var DIRECTION_INHERIT2 = 0 /* Inherit */;
18006
+ var DIRECTION_LTR2 = 1 /* LTR */;
18007
+ var DIRECTION_RTL2 = 2 /* RTL */;
18008
+ var DISPLAY_FLEX2 = 0 /* Flex */;
18009
+ var DISPLAY_NONE2 = 1 /* None */;
18010
+ var DISPLAY_CONTENTS2 = 2 /* Contents */;
18011
+ var EDGE_LEFT2 = 0 /* Left */;
18012
+ var EDGE_TOP2 = 1 /* Top */;
18013
+ var EDGE_RIGHT2 = 2 /* Right */;
18014
+ var EDGE_BOTTOM2 = 3 /* Bottom */;
18015
+ var EDGE_START2 = 4 /* Start */;
18016
+ var EDGE_END2 = 5 /* End */;
18017
+ var EDGE_HORIZONTAL2 = 6 /* Horizontal */;
18018
+ var EDGE_VERTICAL2 = 7 /* Vertical */;
18019
+ var EDGE_ALL2 = 8 /* All */;
18020
+ var ERRATA_NONE2 = 0 /* None */;
18021
+ var ERRATA_STRETCH_FLEX_BASIS2 = 1 /* StretchFlexBasis */;
18022
+ var ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2 = 2 /* AbsolutePositionWithoutInsetsExcludesPadding */;
18023
+ var ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2 = 4 /* AbsolutePercentAgainstInnerSize */;
18024
+ var ERRATA_ALL2 = 2147483647 /* All */;
18025
+ var ERRATA_CLASSIC2 = 2147483646 /* Classic */;
18026
+ var EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2 = 0 /* WebFlexBasis */;
18027
+ var FLEX_DIRECTION_COLUMN2 = 0 /* Column */;
18028
+ var FLEX_DIRECTION_COLUMN_REVERSE2 = 1 /* ColumnReverse */;
18029
+ var FLEX_DIRECTION_ROW2 = 2 /* Row */;
18030
+ var FLEX_DIRECTION_ROW_REVERSE2 = 3 /* RowReverse */;
18031
+ var GUTTER_COLUMN2 = 0 /* Column */;
18032
+ var GUTTER_ROW2 = 1 /* Row */;
18033
+ var GUTTER_ALL2 = 2 /* All */;
18034
+ var JUSTIFY_FLEX_START2 = 0 /* FlexStart */;
18035
+ var JUSTIFY_CENTER2 = 1 /* Center */;
18036
+ var JUSTIFY_FLEX_END2 = 2 /* FlexEnd */;
18037
+ var JUSTIFY_SPACE_BETWEEN2 = 3 /* SpaceBetween */;
18038
+ var JUSTIFY_SPACE_AROUND2 = 4 /* SpaceAround */;
18039
+ var JUSTIFY_SPACE_EVENLY2 = 5 /* SpaceEvenly */;
18040
+ var LOG_LEVEL_ERROR2 = 0 /* Error */;
18041
+ var LOG_LEVEL_WARN2 = 1 /* Warn */;
18042
+ var LOG_LEVEL_INFO2 = 2 /* Info */;
18043
+ var LOG_LEVEL_DEBUG2 = 3 /* Debug */;
18044
+ var LOG_LEVEL_VERBOSE2 = 4 /* Verbose */;
18045
+ var LOG_LEVEL_FATAL2 = 5 /* Fatal */;
18046
+ var MEASURE_MODE_UNDEFINED2 = 0 /* Undefined */;
18047
+ var MEASURE_MODE_EXACTLY2 = 1 /* Exactly */;
18048
+ var MEASURE_MODE_AT_MOST2 = 2 /* AtMost */;
18049
+ var NODE_TYPE_DEFAULT2 = 0 /* Default */;
18050
+ var NODE_TYPE_TEXT2 = 1 /* Text */;
18051
+ var OVERFLOW_VISIBLE2 = 0 /* Visible */;
18052
+ var OVERFLOW_HIDDEN2 = 1 /* Hidden */;
18053
+ var OVERFLOW_SCROLL2 = 2 /* Scroll */;
18054
+ var POSITION_TYPE_STATIC2 = 0 /* Static */;
18055
+ var POSITION_TYPE_RELATIVE2 = 1 /* Relative */;
18056
+ var POSITION_TYPE_ABSOLUTE2 = 2 /* Absolute */;
18057
+ var UNIT_UNDEFINED2 = 0 /* Undefined */;
18058
+ var UNIT_POINT2 = 1 /* Point */;
18059
+ var UNIT_PERCENT2 = 2 /* Percent */;
18060
+ var UNIT_AUTO2 = 3 /* Auto */;
18061
+ var WRAP_NO_WRAP2 = 0 /* NoWrap */;
18062
+ var WRAP_WRAP2 = 1 /* Wrap */;
18063
+ var WRAP_WRAP_REVERSE2 = 2 /* WrapReverse */;
17866
18064
  var YogaEnumKind = {
17867
18065
  Direction: 0,
17868
18066
  FlexDirection: 1,
@@ -17909,7 +18107,7 @@ var measureCallbackLib = null;
17909
18107
  var dirtiedCallback = null;
17910
18108
  var dirtiedCallbackLib = null;
17911
18109
  function lib() {
17912
- return resolveRenderLib();
18110
+ return resolveRenderLib2();
17913
18111
  }
17914
18112
  function ensureMeasureCallback() {
17915
18113
  const renderLib = lib();
@@ -17987,14 +18185,14 @@ function normalizeLayoutInput(value) {
17987
18185
  return value === undefined || value === "auto" ? NaN : value;
17988
18186
  }
17989
18187
 
17990
- class Config {
18188
+ class Config2 {
17991
18189
  ptr;
17992
18190
  freed = false;
17993
- constructor(ptr3) {
17994
- this.ptr = ptr3;
18191
+ constructor(ptr) {
18192
+ this.ptr = ptr;
17995
18193
  }
17996
18194
  static create() {
17997
- return new Config(lib().yogaConfigCreate());
18195
+ return new Config2(lib().yogaConfigCreate());
17998
18196
  }
17999
18197
  static destroy(config) {
18000
18198
  config.free();
@@ -18047,33 +18245,33 @@ class Config {
18047
18245
  }
18048
18246
  }
18049
18247
 
18050
- class Node {
18248
+ class Node2 {
18051
18249
  ptr;
18052
18250
  freed = false;
18053
- constructor(ptr3) {
18054
- this.ptr = ptr3;
18055
- nodeRegistry.set(ptr3, this);
18251
+ constructor(ptr) {
18252
+ this.ptr = ptr;
18253
+ nodeRegistry.set(ptr, this);
18056
18254
  }
18057
18255
  static create(config) {
18058
- return Node.fromPointer(config ? lib().yogaNodeCreateWithConfig(config.ptr) : lib().yogaNodeCreate());
18256
+ return Node2.fromPointer(config ? lib().yogaNodeCreateWithConfig(config.ptr) : lib().yogaNodeCreate());
18059
18257
  }
18060
18258
  static createForOpenTUI() {
18061
- return Node.fromPointer(lib().yogaNodeCreateForOpenTUI());
18259
+ return Node2.fromPointer(lib().yogaNodeCreateForOpenTUI());
18062
18260
  }
18063
18261
  static createDefault() {
18064
- return Node.create();
18262
+ return Node2.create();
18065
18263
  }
18066
18264
  static createWithConfig(config) {
18067
- return Node.create(config);
18265
+ return Node2.create(config);
18068
18266
  }
18069
18267
  static destroy(node) {
18070
18268
  node.free();
18071
18269
  }
18072
- static fromPointer(ptr3) {
18073
- const existing = nodeRegistry.get(ptr3);
18270
+ static fromPointer(ptr) {
18271
+ const existing = nodeRegistry.get(ptr);
18074
18272
  if (existing)
18075
18273
  return existing;
18076
- return new Node(ptr3);
18274
+ return new Node2(ptr);
18077
18275
  }
18078
18276
  isFreed() {
18079
18277
  return this.freed;
@@ -18129,7 +18327,7 @@ class Node {
18129
18327
  if (this.freed)
18130
18328
  return null;
18131
18329
  const child = lib().yogaNodeGetChild(this.ptr, index);
18132
- return child ? Node.fromPointer(child) : null;
18330
+ return child ? Node2.fromPointer(child) : null;
18133
18331
  }
18134
18332
  getChildCount() {
18135
18333
  if (this.freed)
@@ -18140,7 +18338,7 @@ class Node {
18140
18338
  if (this.freed)
18141
18339
  return null;
18142
18340
  const parent = lib().yogaNodeGetParent(this.ptr);
18143
- return parent ? Node.fromPointer(parent) : null;
18341
+ return parent ? Node2.fromPointer(parent) : null;
18144
18342
  }
18145
18343
  calculateLayout(width, height, direction = 1 /* LTR */) {
18146
18344
  if (this.freed)
@@ -18409,10 +18607,10 @@ class Node {
18409
18607
  getGap(gutter) {
18410
18608
  return this.getValue(YogaValueKind.Gap, gutter);
18411
18609
  }
18412
- setBorder(edge, border2) {
18610
+ setBorder(edge, border) {
18413
18611
  if (this.freed)
18414
18612
  return;
18415
- lib().yogaNodeStyleSetBorder(this.ptr, edge, border2 ?? NaN);
18613
+ lib().yogaNodeStyleSetBorder(this.ptr, edge, border ?? NaN);
18416
18614
  }
18417
18615
  getBorder(edge) {
18418
18616
  if (this.freed)
@@ -18525,102 +18723,102 @@ class Node {
18525
18723
  }
18526
18724
  }
18527
18725
  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
18726
+ Config: Config2,
18727
+ Node: Node2,
18728
+ Align: Align2,
18729
+ BoxSizing: BoxSizing2,
18730
+ Dimension: Dimension2,
18731
+ Direction: Direction2,
18732
+ Display: Display2,
18733
+ Edge: Edge2,
18734
+ Errata: Errata2,
18735
+ ExperimentalFeature: ExperimentalFeature2,
18736
+ FlexDirection: FlexDirection2,
18737
+ Gutter: Gutter2,
18738
+ Justify: Justify2,
18739
+ LogLevel: LogLevel3,
18740
+ MeasureMode: MeasureMode2,
18741
+ NodeType: NodeType2,
18742
+ Overflow: Overflow2,
18743
+ PositionType: PositionType2,
18744
+ Unit: Unit2,
18745
+ Wrap: Wrap2,
18746
+ ALIGN_AUTO: ALIGN_AUTO2,
18747
+ ALIGN_FLEX_START: ALIGN_FLEX_START2,
18748
+ ALIGN_CENTER: ALIGN_CENTER2,
18749
+ ALIGN_FLEX_END: ALIGN_FLEX_END2,
18750
+ ALIGN_STRETCH: ALIGN_STRETCH2,
18751
+ ALIGN_BASELINE: ALIGN_BASELINE2,
18752
+ ALIGN_SPACE_BETWEEN: ALIGN_SPACE_BETWEEN2,
18753
+ ALIGN_SPACE_AROUND: ALIGN_SPACE_AROUND2,
18754
+ ALIGN_SPACE_EVENLY: ALIGN_SPACE_EVENLY2,
18755
+ BOX_SIZING_BORDER_BOX: BOX_SIZING_BORDER_BOX2,
18756
+ BOX_SIZING_CONTENT_BOX: BOX_SIZING_CONTENT_BOX2,
18757
+ DIMENSION_WIDTH: DIMENSION_WIDTH2,
18758
+ DIMENSION_HEIGHT: DIMENSION_HEIGHT2,
18759
+ DIRECTION_INHERIT: DIRECTION_INHERIT2,
18760
+ DIRECTION_LTR: DIRECTION_LTR2,
18761
+ DIRECTION_RTL: DIRECTION_RTL2,
18762
+ DISPLAY_FLEX: DISPLAY_FLEX2,
18763
+ DISPLAY_NONE: DISPLAY_NONE2,
18764
+ DISPLAY_CONTENTS: DISPLAY_CONTENTS2,
18765
+ EDGE_LEFT: EDGE_LEFT2,
18766
+ EDGE_TOP: EDGE_TOP2,
18767
+ EDGE_RIGHT: EDGE_RIGHT2,
18768
+ EDGE_BOTTOM: EDGE_BOTTOM2,
18769
+ EDGE_START: EDGE_START2,
18770
+ EDGE_END: EDGE_END2,
18771
+ EDGE_HORIZONTAL: EDGE_HORIZONTAL2,
18772
+ EDGE_VERTICAL: EDGE_VERTICAL2,
18773
+ EDGE_ALL: EDGE_ALL2,
18774
+ ERRATA_NONE: ERRATA_NONE2,
18775
+ ERRATA_STRETCH_FLEX_BASIS: ERRATA_STRETCH_FLEX_BASIS2,
18776
+ ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING: ERRATA_ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING2,
18777
+ ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE: ERRATA_ABSOLUTE_PERCENT_AGAINST_INNER_SIZE2,
18778
+ ERRATA_ALL: ERRATA_ALL2,
18779
+ ERRATA_CLASSIC: ERRATA_CLASSIC2,
18780
+ EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS2,
18781
+ FLEX_DIRECTION_COLUMN: FLEX_DIRECTION_COLUMN2,
18782
+ FLEX_DIRECTION_COLUMN_REVERSE: FLEX_DIRECTION_COLUMN_REVERSE2,
18783
+ FLEX_DIRECTION_ROW: FLEX_DIRECTION_ROW2,
18784
+ FLEX_DIRECTION_ROW_REVERSE: FLEX_DIRECTION_ROW_REVERSE2,
18785
+ GUTTER_COLUMN: GUTTER_COLUMN2,
18786
+ GUTTER_ROW: GUTTER_ROW2,
18787
+ GUTTER_ALL: GUTTER_ALL2,
18788
+ JUSTIFY_FLEX_START: JUSTIFY_FLEX_START2,
18789
+ JUSTIFY_CENTER: JUSTIFY_CENTER2,
18790
+ JUSTIFY_FLEX_END: JUSTIFY_FLEX_END2,
18791
+ JUSTIFY_SPACE_BETWEEN: JUSTIFY_SPACE_BETWEEN2,
18792
+ JUSTIFY_SPACE_AROUND: JUSTIFY_SPACE_AROUND2,
18793
+ JUSTIFY_SPACE_EVENLY: JUSTIFY_SPACE_EVENLY2,
18794
+ LOG_LEVEL_ERROR: LOG_LEVEL_ERROR2,
18795
+ LOG_LEVEL_WARN: LOG_LEVEL_WARN2,
18796
+ LOG_LEVEL_INFO: LOG_LEVEL_INFO2,
18797
+ LOG_LEVEL_DEBUG: LOG_LEVEL_DEBUG2,
18798
+ LOG_LEVEL_VERBOSE: LOG_LEVEL_VERBOSE2,
18799
+ LOG_LEVEL_FATAL: LOG_LEVEL_FATAL2,
18800
+ MEASURE_MODE_UNDEFINED: MEASURE_MODE_UNDEFINED2,
18801
+ MEASURE_MODE_EXACTLY: MEASURE_MODE_EXACTLY2,
18802
+ MEASURE_MODE_AT_MOST: MEASURE_MODE_AT_MOST2,
18803
+ NODE_TYPE_DEFAULT: NODE_TYPE_DEFAULT2,
18804
+ NODE_TYPE_TEXT: NODE_TYPE_TEXT2,
18805
+ OVERFLOW_VISIBLE: OVERFLOW_VISIBLE2,
18806
+ OVERFLOW_HIDDEN: OVERFLOW_HIDDEN2,
18807
+ OVERFLOW_SCROLL: OVERFLOW_SCROLL2,
18808
+ POSITION_TYPE_STATIC: POSITION_TYPE_STATIC2,
18809
+ POSITION_TYPE_RELATIVE: POSITION_TYPE_RELATIVE2,
18810
+ POSITION_TYPE_ABSOLUTE: POSITION_TYPE_ABSOLUTE2,
18811
+ UNIT_UNDEFINED: UNIT_UNDEFINED2,
18812
+ UNIT_POINT: UNIT_POINT2,
18813
+ UNIT_PERCENT: UNIT_PERCENT2,
18814
+ UNIT_AUTO: UNIT_AUTO2,
18815
+ WRAP_NO_WRAP: WRAP_NO_WRAP2,
18816
+ WRAP_WRAP: WRAP_WRAP2,
18817
+ WRAP_WRAP_REVERSE: WRAP_WRAP_REVERSE2
18620
18818
  };
18621
18819
  var yoga_default = Yoga;
18622
18820
 
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 };
18821
+ 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
18822
 
18625
- //# debugId=379FA7D2639D063564756E2164756E21
18626
- //# sourceMappingURL=chunk-node-f647ts9q.js.map
18823
+ //# debugId=B09FAACBA517D7BA64756E2164756E21
18824
+ //# sourceMappingURL=chunk-node-1zjyxy5y.js.map