@visulima/tui 1.0.0-alpha.14 → 1.0.0-alpha.15

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 (151) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE.md +351 -209
  3. package/dist/components/accordion.d.ts +1 -1
  4. package/dist/components/approval-prompt.d.ts +1 -1
  5. package/dist/components/area-chart.d.ts +1 -1
  6. package/dist/components/badge.d.ts +1 -1
  7. package/dist/components/bar-chart.d.ts +1 -1
  8. package/dist/components/blink-dot.d.ts +1 -1
  9. package/dist/components/box.d.ts +3 -4
  10. package/dist/components/breadcrumb.d.ts +1 -1
  11. package/dist/components/button.d.ts +1 -1
  12. package/dist/components/calendar.d.ts +1 -1
  13. package/dist/components/canvas.js +1 -1
  14. package/dist/components/card.d.ts +1 -1
  15. package/dist/components/checkbox.d.ts +1 -1
  16. package/dist/components/collapsible.d.ts +1 -1
  17. package/dist/components/command-block.js +1 -1
  18. package/dist/components/command-palette.d.ts +1 -1
  19. package/dist/components/console-overlay.js +1 -1
  20. package/dist/components/content-switcher.d.ts +1 -1
  21. package/dist/components/controlled-scroll-view.d.ts +3 -4
  22. package/dist/components/cursor.d.ts +3 -4
  23. package/dist/components/date-picker.d.ts +1 -1
  24. package/dist/components/definition-list.d.ts +1 -1
  25. package/dist/components/dialog.d.ts +4 -5
  26. package/dist/components/diff-view.js +1 -1
  27. package/dist/components/divider.d.ts +1 -1
  28. package/dist/components/form.d.ts +1 -1
  29. package/dist/components/gauge.d.ts +1 -1
  30. package/dist/components/gradient.d.ts +18 -1
  31. package/dist/components/gradient.js +4 -1
  32. package/dist/components/heading.d.ts +1 -1
  33. package/dist/components/heatmap.d.ts +1 -1
  34. package/dist/components/histogram.d.ts +1 -1
  35. package/dist/components/kbd.d.ts +1 -1
  36. package/dist/components/line-chart.d.ts +1 -1
  37. package/dist/components/link.js +1 -1
  38. package/dist/components/loading-indicator.d.ts +2 -2
  39. package/dist/components/markdown.js +1 -1
  40. package/dist/components/menu.d.ts +1 -1
  41. package/dist/components/message-bubble.d.ts +1 -1
  42. package/dist/components/model-badge.d.ts +1 -1
  43. package/dist/components/multi-select.d.ts +1 -1
  44. package/dist/components/option-list.d.ts +1 -1
  45. package/dist/components/paginator.js +1 -1
  46. package/dist/components/paragraph.d.ts +1 -1
  47. package/dist/components/placeholder.d.ts +1 -1
  48. package/dist/components/progress-bar.d.ts +2 -3
  49. package/dist/components/radio-group.d.ts +1 -1
  50. package/dist/components/scatter-plot.d.ts +1 -1
  51. package/dist/components/scroll-bar-box.d.ts +3 -4
  52. package/dist/components/scroll-bar.d.ts +3 -4
  53. package/dist/components/scroll-list.d.ts +3 -4
  54. package/dist/components/scroll-view.d.ts +3 -4
  55. package/dist/components/search-input.d.ts +1 -1
  56. package/dist/components/select-input-indicator.d.ts +1 -1
  57. package/dist/components/select-input-item.d.ts +1 -1
  58. package/dist/components/select-input.d.ts +1 -1
  59. package/dist/components/shimmer-text.d.ts +1 -1
  60. package/dist/components/slider.d.ts +1 -1
  61. package/dist/components/sparkline.d.ts +1 -1
  62. package/dist/components/spinner.d.ts +1 -1
  63. package/dist/components/spinner.js +1 -1
  64. package/dist/components/static-render.d.ts +2 -3
  65. package/dist/components/static.d.ts +2 -3
  66. package/dist/components/status-line.d.ts +1 -1
  67. package/dist/components/stepper.d.ts +1 -1
  68. package/dist/components/streaming-text.d.ts +1 -1
  69. package/dist/components/switch.d.ts +1 -1
  70. package/dist/components/tabs.d.ts +1 -1
  71. package/dist/components/tag.d.ts +1 -1
  72. package/dist/components/text.d.ts +2 -3
  73. package/dist/components/text.js +1 -1
  74. package/dist/components/tooltip.d.ts +1 -1
  75. package/dist/components/tree-view-entry.d.ts +3 -4
  76. package/dist/components/tree-view-entry.js +1 -1
  77. package/dist/core/index.d.ts +1 -2
  78. package/dist/core/index.js +1 -1
  79. package/dist/ink/hooks/use-box-metrics.d.ts +4 -5
  80. package/dist/ink/hooks/use-box-metrics.js +1 -1
  81. package/dist/ink/hooks/use-input.js +1 -1
  82. package/dist/ink/hooks/use-linked-scroll.d.ts +3 -4
  83. package/dist/ink/hooks/use-paste.js +1 -1
  84. package/dist/ink/hooks/use-text-selection.d.ts +4 -5
  85. package/dist/ink/hooks/use-text-selection.js +1 -1
  86. package/dist/ink/hooks/use-window-size.js +1 -1
  87. package/dist/ink/index.d.ts +6 -7
  88. package/dist/ink/index.js +1 -1
  89. package/dist/packem_shared/{DevTools-CsxLcAu2.js → DevTools-ClnTSU76.js} +1 -1
  90. package/dist/packem_shared/InputParser-Cfi5GVKV.js +2 -0
  91. package/dist/packem_shared/{LayoutNode-B8zej4dm.js → LayoutNode-Q7nU3hmO.js} +1 -1
  92. package/dist/packem_shared/{MouseProvider-PnIUKURs.js → MouseProvider-CHU5DuwC.js} +1 -1
  93. package/dist/packem_shared/{TreeView-GkPr_VYn.js → TreeView-C0Iv3et8.js} +1 -1
  94. package/dist/packem_shared/TuiApp-BSWPFrDu.js +1 -0
  95. package/dist/packem_shared/ansi-parser-C5JuL732.js +1 -0
  96. package/dist/packem_shared/boxes-DyY_LXCi.js +1 -0
  97. package/dist/packem_shared/colorize-gy_cY-wC.js +2 -0
  98. package/dist/packem_shared/{comparePoints-C85EsmNz.js → comparePoints-l0iqUoL_.js} +1 -1
  99. package/dist/packem_shared/constants-D12jy2Zh-RSfxu1eM.js +1 -0
  100. package/dist/packem_shared/createInlineLoop-fhXU93QT.js +2 -0
  101. package/dist/packem_shared/createScreen-87XLHZq6.js +3 -0
  102. package/dist/packem_shared/dom-CMbdnYbk.js +8 -0
  103. package/dist/packem_shared/{dom.d-Be9F_YcI.d.ts → dom.d-BZZeZlyP.d.ts} +8 -5
  104. package/dist/packem_shared/erase-DeDffywz.js +1 -0
  105. package/dist/packem_shared/get-string-width-4oMZhv2Q.js +1 -0
  106. package/dist/packem_shared/{getPathToRoot-B2tKmx3i.js → getPathToRoot-Nb2eTx2o.js} +1 -1
  107. package/dist/packem_shared/index-LwZN2xbk.js +75 -0
  108. package/dist/packem_shared/index.d-Bk52cbgN.d.ts +14 -0
  109. package/dist/packem_shared/index.server.d-eZWyC2Ku.d.ts +5 -0
  110. package/dist/packem_shared/input.d-D-Yxqha8.d.ts +172 -0
  111. package/dist/packem_shared/measure-text-CIs55Wao.js +3 -0
  112. package/dist/packem_shared/mode-BOIU4Roy.js +1 -0
  113. package/dist/packem_shared/parseSgrMouse-DoBY7MKw.js +1 -0
  114. package/dist/packem_shared/{reconciler-DIfG72R9.js → reconciler-BQvF1kRj.js} +1 -1
  115. package/dist/packem_shared/{reconciler-BuOP-TZ6.js → reconciler-tOH9yL_j.js} +1 -1
  116. package/dist/packem_shared/render-D9bHMHrx.js +26 -0
  117. package/dist/packem_shared/{render-F9Hk9p1a.js → render-yGJFE4of.js} +1 -1
  118. package/dist/packem_shared/{render.d-qLMbbSmP.d.ts → render.d-BJmVQ_cd.d.ts} +2 -1
  119. package/dist/packem_shared/{renderToString-BbQiRHrd.js → renderToString-D4JqS-Zv.js} +1 -1
  120. package/dist/packem_shared/{renderToString-BDk2FZEN.js → renderToString-GyN-Rw9F.js} +1 -1
  121. package/dist/packem_shared/renderTreeToBuffer-DWl5_yTW.js +2 -0
  122. package/dist/packem_shared/renderer-Cidd3s9K.js +17 -0
  123. package/dist/packem_shared/{selection.d-C6q1U6Rv.d.ts → selection.d-vfuEzv1p.d.ts} +1 -1
  124. package/dist/packem_shared/setEnableStyledLineCache-Aja0FbWo.js +1 -0
  125. package/dist/packem_shared/strip-C6HQYmlg.js +1 -0
  126. package/dist/packem_shared/{styles.d-C1g4Iwzr.d.ts → styles.d-i6Mejqz2.d.ts} +98 -2
  127. package/dist/packem_shared/text-width-DSx26OmB.js +2 -0
  128. package/dist/packem_shared/utils-THUhYKG2.js +1 -0
  129. package/dist/packem_shared/{wrapOrTruncateStyledLine-BZ00SM8i.js → wrapOrTruncateStyledLine-D29Fq7pW.js} +1 -1
  130. package/dist/react/index.d.ts +1 -2
  131. package/dist/react/index.js +1 -1
  132. package/dist/testing/index.d.ts +4 -5
  133. package/dist/testing/index.js +1 -1
  134. package/index.js +52 -52
  135. package/package.json +19 -33
  136. package/dist/packem_shared/InputParser-rZKjY_7Y.js +0 -2
  137. package/dist/packem_shared/TuiApp-DrjI_i-R.js +0 -1
  138. package/dist/packem_shared/ansi-parser-B6uXaq65.js +0 -1
  139. package/dist/packem_shared/colorize-DbTZMrJO.js +0 -1
  140. package/dist/packem_shared/createInlineLoop-DRNZ7jqH.js +0 -2
  141. package/dist/packem_shared/createScreen-CrLrxA6t.js +0 -3
  142. package/dist/packem_shared/dom-4y__5fWB.js +0 -1
  143. package/dist/packem_shared/input.d-Bfq7oc06.d.ts +0 -90
  144. package/dist/packem_shared/measure-text-DDjHT1jD.js +0 -3
  145. package/dist/packem_shared/parseSgrMouse-Ccj70ijb.js +0 -1
  146. package/dist/packem_shared/render-BOqty71z.js +0 -26
  147. package/dist/packem_shared/renderTreeToBuffer-CZilzyhN.js +0 -2
  148. package/dist/packem_shared/renderer-gqplqpkQ.js +0 -17
  149. package/dist/packem_shared/setEnableStyledLineCache-D2gZbwFM.js +0 -1
  150. package/dist/packem_shared/text-width-BU2eeTWn.js +0 -2
  151. package/dist/packem_shared/utils-CoviI5Vm.js +0 -1
@@ -1,7 +1,6 @@
1
1
  import React, { Context, RefObject, ReactNode } from 'react';
2
- import { M as MouseEvent, T as TuiApp, c as InputParser, a as InlineOptions } from "../packem_shared/input.d-Bfq7oc06.js";
2
+ import { M as MouseEvent, T as TuiApp, c as InputParser, a as InlineOptions } from "../packem_shared/input.d-D-Yxqha8.js";
3
3
  import Yoga from 'yoga-layout';
4
- import 'eventemitter3';
5
4
  interface DevToolsProps {
6
5
  children: React.ReactNode;
7
6
  /** Show/hide the HUD without unmounting (default: true) */
@@ -1 +1 @@
1
- import{DevTools as o}from"../packem_shared/DevTools-CsxLcAu2.js";import{FocusContext as u,FocusProvider as s,useFocus as n,useFocusManager as p}from"../packem_shared/FocusContext-Xy0cwJpO.js";import{TuiContext as d,measureElement as f,useApp as l,useBoxMetrics as m,useCursor as a,useInput as i,useIsScreenReaderEnabled as S,useMouse as c,usePaste as T,useScrollable as C,useStderr as F,useStdin as I,useStdout as M,useTextInput as v,useTuiContext as y,useWindowSize as E}from"../packem_shared/TuiContext-BoJvG3NN.js";import{render as g,renderInline as A}from"../packem_shared/render-F9Hk9p1a.js";import{renderToString as D}from"../packem_shared/renderToString-BbQiRHrd.js";import{Static as N}from"../packem_shared/Static-DLynr5pn.js";import{LayoutNode as P}from"../packem_shared/LayoutNode-B8zej4dm.js";import{NAMED_COLORS as w,applyStyles as z,resolveColor as W}from"../packem_shared/NAMED_COLORS-B9fJsYdg.js";import{renderTreeToBuffer as h}from"../packem_shared/renderTreeToBuffer-CZilzyhN.js";export{o as DevTools,u as FocusContext,s as FocusProvider,P as LayoutNode,w as NAMED_COLORS,N as Static,d as TuiContext,z as applyStyles,f as measureElement,g as render,A as renderInline,D as renderToString,h as renderTreeToBuffer,W as resolveColor,l as useApp,m as useBoxMetrics,a as useCursor,n as useFocus,p as useFocusManager,i as useInput,S as useIsScreenReaderEnabled,c as useMouse,T as usePaste,C as useScrollable,F as useStderr,I as useStdin,M as useStdout,v as useTextInput,y as useTuiContext,E as useWindowSize};
1
+ import{DevTools as o}from"../packem_shared/DevTools-ClnTSU76.js";import{FocusContext as u,FocusProvider as s,useFocus as n,useFocusManager as p}from"../packem_shared/FocusContext-Xy0cwJpO.js";import{TuiContext as d,measureElement as f,useApp as l,useBoxMetrics as m,useCursor as a,useInput as i,useIsScreenReaderEnabled as S,useMouse as c,usePaste as T,useScrollable as C,useStderr as F,useStdin as I,useStdout as M,useTextInput as v,useTuiContext as y,useWindowSize as E}from"../packem_shared/TuiContext-BoJvG3NN.js";import{render as g,renderInline as A}from"../packem_shared/render-yGJFE4of.js";import{renderToString as D}from"../packem_shared/renderToString-D4JqS-Zv.js";import{Static as N}from"../packem_shared/Static-DLynr5pn.js";import{LayoutNode as P}from"../packem_shared/LayoutNode-Q7nU3hmO.js";import{NAMED_COLORS as w,applyStyles as z,resolveColor as W}from"../packem_shared/NAMED_COLORS-B9fJsYdg.js";import{renderTreeToBuffer as h}from"../packem_shared/renderTreeToBuffer-DWl5_yTW.js";export{o as DevTools,u as FocusContext,s as FocusProvider,P as LayoutNode,w as NAMED_COLORS,N as Static,d as TuiContext,z as applyStyles,f as measureElement,g as render,A as renderInline,D as renderToString,h as renderTreeToBuffer,W as resolveColor,l as useApp,m as useBoxMetrics,a as useCursor,n as useFocus,p as useFocusManager,i as useInput,S as useIsScreenReaderEnabled,c as useMouse,T as usePaste,C as useScrollable,F as useStderr,I as useStdin,M as useStdout,v as useTextInput,y as useTuiContext,E as useWindowSize};
@@ -1,11 +1,10 @@
1
1
  import { ReactElement } from 'react';
2
- import { R as RenderOptions } from "../packem_shared/render.d-qLMbbSmP.js";
3
- import "../packem_shared/dom.d-Be9F_YcI.js";
2
+ import { R as RenderOptions } from "../packem_shared/render.d-BJmVQ_cd.js";
3
+ import "../packem_shared/dom.d-BZZeZlyP.js";
4
4
  import 'yoga-layout';
5
- import '@visulima/colorize';
6
- import 'cli-boxes';
5
+ import "../packem_shared/styles.d-i6Mejqz2.js";
6
+ import "../packem_shared/index.server.d-eZWyC2Ku.js";
7
7
  import 'type-fest';
8
- import "../packem_shared/styles.d-C1g4Iwzr.js";
9
8
  import 'node:stream';
10
9
  import "../packem_shared/cursor-helpers.d-BIvqz0TZ.js";
11
10
  declare const KEY: {
@@ -1 +1 @@
1
- var w=Object.defineProperty;var a=(t,e)=>w(t,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import x from"../packem_shared/render-BOqty71z.js";import{createKeySender as y}from"../packem_shared/KEY-Bk8B-3h_.js";import{KEY as $}from"../packem_shared/KEY-Bk8B-3h_.js";import{createScreen as T}from"../packem_shared/createScreen-CrLrxA6t.js";import{waitFor as j}from"../packem_shared/waitFor-Dj5zfL5s.js";const b=F(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=a(t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,i]=o.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return o.getBuiltinModule(t)}return b(t)},"__cjs_getBuiltinModule"),l=v("node:events");var R=Object.defineProperty,r=a((t,e)=>R(t,"name",{value:e,configurable:!0}),"t");class S extends l{static{a(this,"v")}static{r(this,"Stdout")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class D extends l{static{a(this,"x")}static{r(this,"Stderr")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class P extends l{static{a(this,"R")}static{r(this,"Stdin")}isTTY=!0;pendingData;write=r(e=>(this.pendingData=e,this.emit("readable"),this.emit("data",e),!0),"write");read(){const{pendingData:e}=this;return this.pendingData=void 0,e}setEncoding(){return this}setRawMode(){return this}resume(){return this}pause(){return this}ref(){return this}unref(){return this}}const c=[],O=r((t,e={})=>{const{columns:i,options:p}=e,n=new S(i),d=new D(i),m=new P,u=x(t,{debug:!0,exitOnCtrlC:!1,patchConsole:!1,stderr:d,stdin:m,stdout:n,...p});c.push(u);const f=T(()=>n.lastFrame(),n.frames),h=y(s=>m.write(s)),_=r(async()=>{await new Promise(s=>{setTimeout(s,0)}),await new Promise(s=>{setTimeout(s,0)})},"flush");return{cleanup:u.cleanup,flush:_,get frames(){return n.frames},keys:h,lastFrame:r(()=>n.lastFrame(),"lastFrame"),rerender:u.rerender,screen:f,stderr:d,stdin:m,stdout:n,unmount:u.unmount,async waitFor(s,g){await j(s,()=>f.text(),g)}}},"testRender"),Y=r(()=>{for(const t of c)t.cleanup();c.length=0},"cleanup");export{$ as KEY,Y as cleanup,y as createKeySender,T as createScreen,O as render,j as waitFor};
1
+ var w=Object.defineProperty;var a=(t,e)=>w(t,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import x from"../packem_shared/render-D9bHMHrx.js";import{createKeySender as y}from"../packem_shared/KEY-Bk8B-3h_.js";import{KEY as $}from"../packem_shared/KEY-Bk8B-3h_.js";import{createScreen as T}from"../packem_shared/createScreen-87XLHZq6.js";import{waitFor as j}from"../packem_shared/waitFor-Dj5zfL5s.js";const b=F(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=a(t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,i]=o.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return o.getBuiltinModule(t)}return b(t)},"__cjs_getBuiltinModule"),l=v("node:events");var R=Object.defineProperty,r=a((t,e)=>R(t,"name",{value:e,configurable:!0}),"t");class S extends l{static{a(this,"v")}static{r(this,"Stdout")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class D extends l{static{a(this,"x")}static{r(this,"Stderr")}columns;_lastFrame;_frames=[];constructor(e=100){super(),this.columns=e}get frames(){return this._frames}lastFrame(){return this._lastFrame}write=r(e=>(this._frames.push(e),this._lastFrame=e,!0),"write")}class P extends l{static{a(this,"R")}static{r(this,"Stdin")}isTTY=!0;pendingData;write=r(e=>(this.pendingData=e,this.emit("readable"),this.emit("data",e),!0),"write");read(){const{pendingData:e}=this;return this.pendingData=void 0,e}setEncoding(){return this}setRawMode(){return this}resume(){return this}pause(){return this}ref(){return this}unref(){return this}}const c=[],O=r((t,e={})=>{const{columns:i,options:p}=e,n=new S(i),d=new D(i),m=new P,u=x(t,{debug:!0,exitOnCtrlC:!1,patchConsole:!1,stderr:d,stdin:m,stdout:n,...p});c.push(u);const f=T(()=>n.lastFrame(),n.frames),h=y(s=>m.write(s)),_=r(async()=>{await new Promise(s=>{setTimeout(s,0)}),await new Promise(s=>{setTimeout(s,0)})},"flush");return{cleanup:u.cleanup,flush:_,get frames(){return n.frames},keys:h,lastFrame:r(()=>n.lastFrame(),"lastFrame"),rerender:u.rerender,screen:f,stderr:d,stdin:m,stdout:n,unmount:u.unmount,async waitFor(s,g){await j(s,()=>f.text(),g)}}},"testRender"),Y=r(()=>{for(const t of c)t.cleanup();c.length=0},"cleanup");export{$ as KEY,Y as cleanup,y as createKeySender,T as createScreen,O as render,j as waitFor};
package/index.js CHANGED
@@ -82,12 +82,12 @@ function requireNative() {
82
82
  const binding = require("@visulima/tui-binding-android-arm64");
83
83
  const bindingPackageVersion = require("@visulima/tui-binding-android-arm64/package.json").version;
84
84
  if (
85
- bindingPackageVersion !== "1.0.0-alpha.2" &&
85
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
86
86
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
87
87
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
88
88
  ) {
89
89
  throw new Error(
90
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
90
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
91
91
  );
92
92
  }
93
93
  return binding;
@@ -104,12 +104,12 @@ function requireNative() {
104
104
  const binding = require("@visulima/tui-binding-android-arm-eabi");
105
105
  const bindingPackageVersion = require("@visulima/tui-binding-android-arm-eabi/package.json").version;
106
106
  if (
107
- bindingPackageVersion !== "1.0.0-alpha.2" &&
107
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
108
108
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
109
109
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
110
110
  ) {
111
111
  throw new Error(
112
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
112
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
113
113
  );
114
114
  }
115
115
  return binding;
@@ -131,12 +131,12 @@ function requireNative() {
131
131
  const binding = require("@visulima/tui-binding-win32-x64-gnu");
132
132
  const bindingPackageVersion = require("@visulima/tui-binding-win32-x64-gnu/package.json").version;
133
133
  if (
134
- bindingPackageVersion !== "1.0.0-alpha.2" &&
134
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
135
135
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
136
136
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
137
137
  ) {
138
138
  throw new Error(
139
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
139
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
140
140
  );
141
141
  }
142
142
  return binding;
@@ -153,12 +153,12 @@ function requireNative() {
153
153
  const binding = require("@visulima/tui-binding-win32-x64-msvc");
154
154
  const bindingPackageVersion = require("@visulima/tui-binding-win32-x64-msvc/package.json").version;
155
155
  if (
156
- bindingPackageVersion !== "1.0.0-alpha.2" &&
156
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
157
157
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
158
158
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
159
159
  ) {
160
160
  throw new Error(
161
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
161
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
162
162
  );
163
163
  }
164
164
  return binding;
@@ -176,12 +176,12 @@ function requireNative() {
176
176
  const binding = require("@visulima/tui-binding-win32-ia32-msvc");
177
177
  const bindingPackageVersion = require("@visulima/tui-binding-win32-ia32-msvc/package.json").version;
178
178
  if (
179
- bindingPackageVersion !== "1.0.0-alpha.2" &&
179
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
180
180
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
181
181
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
182
182
  ) {
183
183
  throw new Error(
184
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
184
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
185
185
  );
186
186
  }
187
187
  return binding;
@@ -198,12 +198,12 @@ function requireNative() {
198
198
  const binding = require("@visulima/tui-binding-win32-arm64-msvc");
199
199
  const bindingPackageVersion = require("@visulima/tui-binding-win32-arm64-msvc/package.json").version;
200
200
  if (
201
- bindingPackageVersion !== "1.0.0-alpha.2" &&
201
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
202
202
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
203
203
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
204
204
  ) {
205
205
  throw new Error(
206
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
206
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
207
207
  );
208
208
  }
209
209
  return binding;
@@ -222,9 +222,9 @@ function requireNative() {
222
222
  try {
223
223
  const binding = require("@visulima/tui-binding-darwin-universal");
224
224
  const bindingPackageVersion = require("@visulima/tui-binding-darwin-universal/package.json").version;
225
- if (bindingPackageVersion !== "1.0.0-alpha.2" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
225
+ if (bindingPackageVersion !== "1.0.0-alpha.14" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") {
226
226
  throw new Error(
227
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
227
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
228
228
  );
229
229
  }
230
230
  return binding;
@@ -241,12 +241,12 @@ function requireNative() {
241
241
  const binding = require("@visulima/tui-binding-darwin-x64");
242
242
  const bindingPackageVersion = require("@visulima/tui-binding-darwin-x64/package.json").version;
243
243
  if (
244
- bindingPackageVersion !== "1.0.0-alpha.2" &&
244
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
245
245
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
246
246
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
247
247
  ) {
248
248
  throw new Error(
249
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
249
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
250
250
  );
251
251
  }
252
252
  return binding;
@@ -263,12 +263,12 @@ function requireNative() {
263
263
  const binding = require("@visulima/tui-binding-darwin-arm64");
264
264
  const bindingPackageVersion = require("@visulima/tui-binding-darwin-arm64/package.json").version;
265
265
  if (
266
- bindingPackageVersion !== "1.0.0-alpha.2" &&
266
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
267
267
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
268
268
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
269
269
  ) {
270
270
  throw new Error(
271
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
271
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
272
272
  );
273
273
  }
274
274
  return binding;
@@ -289,12 +289,12 @@ function requireNative() {
289
289
  const binding = require("@visulima/tui-binding-freebsd-x64");
290
290
  const bindingPackageVersion = require("@visulima/tui-binding-freebsd-x64/package.json").version;
291
291
  if (
292
- bindingPackageVersion !== "1.0.0-alpha.2" &&
292
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
293
293
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
294
294
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
295
295
  ) {
296
296
  throw new Error(
297
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
297
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
298
298
  );
299
299
  }
300
300
  return binding;
@@ -311,12 +311,12 @@ function requireNative() {
311
311
  const binding = require("@visulima/tui-binding-freebsd-arm64");
312
312
  const bindingPackageVersion = require("@visulima/tui-binding-freebsd-arm64/package.json").version;
313
313
  if (
314
- bindingPackageVersion !== "1.0.0-alpha.2" &&
314
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
315
315
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
316
316
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
317
317
  ) {
318
318
  throw new Error(
319
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
319
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
320
320
  );
321
321
  }
322
322
  return binding;
@@ -338,12 +338,12 @@ function requireNative() {
338
338
  const binding = require("@visulima/tui-binding-linux-x64-musl");
339
339
  const bindingPackageVersion = require("@visulima/tui-binding-linux-x64-musl/package.json").version;
340
340
  if (
341
- bindingPackageVersion !== "1.0.0-alpha.2" &&
341
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
342
342
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
343
343
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
344
344
  ) {
345
345
  throw new Error(
346
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
346
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
347
347
  );
348
348
  }
349
349
  return binding;
@@ -360,12 +360,12 @@ function requireNative() {
360
360
  const binding = require("@visulima/tui-binding-linux-x64-gnu");
361
361
  const bindingPackageVersion = require("@visulima/tui-binding-linux-x64-gnu/package.json").version;
362
362
  if (
363
- bindingPackageVersion !== "1.0.0-alpha.2" &&
363
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
364
364
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
365
365
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
366
366
  ) {
367
367
  throw new Error(
368
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
368
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
369
369
  );
370
370
  }
371
371
  return binding;
@@ -384,12 +384,12 @@ function requireNative() {
384
384
  const binding = require("@visulima/tui-binding-linux-arm64-musl");
385
385
  const bindingPackageVersion = require("@visulima/tui-binding-linux-arm64-musl/package.json").version;
386
386
  if (
387
- bindingPackageVersion !== "1.0.0-alpha.2" &&
387
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
388
388
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
389
389
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
390
390
  ) {
391
391
  throw new Error(
392
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
392
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
393
393
  );
394
394
  }
395
395
  return binding;
@@ -406,12 +406,12 @@ function requireNative() {
406
406
  const binding = require("@visulima/tui-binding-linux-arm64-gnu");
407
407
  const bindingPackageVersion = require("@visulima/tui-binding-linux-arm64-gnu/package.json").version;
408
408
  if (
409
- bindingPackageVersion !== "1.0.0-alpha.2" &&
409
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
410
410
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
411
411
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
412
412
  ) {
413
413
  throw new Error(
414
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
414
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
415
415
  );
416
416
  }
417
417
  return binding;
@@ -430,12 +430,12 @@ function requireNative() {
430
430
  const binding = require("@visulima/tui-binding-linux-arm-musleabihf");
431
431
  const bindingPackageVersion = require("@visulima/tui-binding-linux-arm-musleabihf/package.json").version;
432
432
  if (
433
- bindingPackageVersion !== "1.0.0-alpha.2" &&
433
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
434
434
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
435
435
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
436
436
  ) {
437
437
  throw new Error(
438
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
438
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
439
439
  );
440
440
  }
441
441
  return binding;
@@ -452,12 +452,12 @@ function requireNative() {
452
452
  const binding = require("@visulima/tui-binding-linux-arm-gnueabihf");
453
453
  const bindingPackageVersion = require("@visulima/tui-binding-linux-arm-gnueabihf/package.json").version;
454
454
  if (
455
- bindingPackageVersion !== "1.0.0-alpha.2" &&
455
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
456
456
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
457
457
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
458
458
  ) {
459
459
  throw new Error(
460
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
460
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
461
461
  );
462
462
  }
463
463
  return binding;
@@ -476,12 +476,12 @@ function requireNative() {
476
476
  const binding = require("@visulima/tui-binding-linux-loong64-musl");
477
477
  const bindingPackageVersion = require("@visulima/tui-binding-linux-loong64-musl/package.json").version;
478
478
  if (
479
- bindingPackageVersion !== "1.0.0-alpha.2" &&
479
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
480
480
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
481
481
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
482
482
  ) {
483
483
  throw new Error(
484
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
484
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
485
485
  );
486
486
  }
487
487
  return binding;
@@ -498,12 +498,12 @@ function requireNative() {
498
498
  const binding = require("@visulima/tui-binding-linux-loong64-gnu");
499
499
  const bindingPackageVersion = require("@visulima/tui-binding-linux-loong64-gnu/package.json").version;
500
500
  if (
501
- bindingPackageVersion !== "1.0.0-alpha.2" &&
501
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
502
502
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
503
503
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
504
504
  ) {
505
505
  throw new Error(
506
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
506
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
507
507
  );
508
508
  }
509
509
  return binding;
@@ -522,12 +522,12 @@ function requireNative() {
522
522
  const binding = require("@visulima/tui-binding-linux-riscv64-musl");
523
523
  const bindingPackageVersion = require("@visulima/tui-binding-linux-riscv64-musl/package.json").version;
524
524
  if (
525
- bindingPackageVersion !== "1.0.0-alpha.2" &&
525
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
526
526
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
527
527
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
528
528
  ) {
529
529
  throw new Error(
530
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
530
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
531
531
  );
532
532
  }
533
533
  return binding;
@@ -544,12 +544,12 @@ function requireNative() {
544
544
  const binding = require("@visulima/tui-binding-linux-riscv64-gnu");
545
545
  const bindingPackageVersion = require("@visulima/tui-binding-linux-riscv64-gnu/package.json").version;
546
546
  if (
547
- bindingPackageVersion !== "1.0.0-alpha.2" &&
547
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
548
548
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
549
549
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
550
550
  ) {
551
551
  throw new Error(
552
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
552
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
553
553
  );
554
554
  }
555
555
  return binding;
@@ -567,12 +567,12 @@ function requireNative() {
567
567
  const binding = require("@visulima/tui-binding-linux-ppc64-gnu");
568
568
  const bindingPackageVersion = require("@visulima/tui-binding-linux-ppc64-gnu/package.json").version;
569
569
  if (
570
- bindingPackageVersion !== "1.0.0-alpha.2" &&
570
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
571
571
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
572
572
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
573
573
  ) {
574
574
  throw new Error(
575
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
575
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
576
576
  );
577
577
  }
578
578
  return binding;
@@ -589,12 +589,12 @@ function requireNative() {
589
589
  const binding = require("@visulima/tui-binding-linux-s390x-gnu");
590
590
  const bindingPackageVersion = require("@visulima/tui-binding-linux-s390x-gnu/package.json").version;
591
591
  if (
592
- bindingPackageVersion !== "1.0.0-alpha.2" &&
592
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
593
593
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
594
594
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
595
595
  ) {
596
596
  throw new Error(
597
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
597
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
598
598
  );
599
599
  }
600
600
  return binding;
@@ -615,12 +615,12 @@ function requireNative() {
615
615
  const binding = require("@visulima/tui-binding-openharmony-arm64");
616
616
  const bindingPackageVersion = require("@visulima/tui-binding-openharmony-arm64/package.json").version;
617
617
  if (
618
- bindingPackageVersion !== "1.0.0-alpha.2" &&
618
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
619
619
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
620
620
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
621
621
  ) {
622
622
  throw new Error(
623
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
623
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
624
624
  );
625
625
  }
626
626
  return binding;
@@ -637,12 +637,12 @@ function requireNative() {
637
637
  const binding = require("@visulima/tui-binding-openharmony-x64");
638
638
  const bindingPackageVersion = require("@visulima/tui-binding-openharmony-x64/package.json").version;
639
639
  if (
640
- bindingPackageVersion !== "1.0.0-alpha.2" &&
640
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
641
641
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
642
642
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
643
643
  ) {
644
644
  throw new Error(
645
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
645
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
646
646
  );
647
647
  }
648
648
  return binding;
@@ -659,12 +659,12 @@ function requireNative() {
659
659
  const binding = require("@visulima/tui-binding-openharmony-arm");
660
660
  const bindingPackageVersion = require("@visulima/tui-binding-openharmony-arm/package.json").version;
661
661
  if (
662
- bindingPackageVersion !== "1.0.0-alpha.2" &&
662
+ bindingPackageVersion !== "1.0.0-alpha.14" &&
663
663
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
664
664
  process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
665
665
  ) {
666
666
  throw new Error(
667
- `Native binding package version mismatch, expected 1.0.0-alpha.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
667
+ `Native binding package version mismatch, expected 1.0.0-alpha.15 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
668
668
  );
669
669
  }
670
670
  return binding;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/tui",
3
- "version": "1.0.0-alpha.14",
3
+ "version": "1.0.0-alpha.15",
4
4
  "description": "React-based TUI library powered by a native Rust diff engine, drop-in Ink-compatible API",
5
5
  "keywords": [
6
6
  "cli",
@@ -570,23 +570,9 @@
570
570
  "LICENSE.md"
571
571
  ],
572
572
  "dependencies": {
573
- "@visulima/ansi": "4.0.0-alpha.13",
574
- "@visulima/colorize": "2.0.0-alpha.10",
575
- "@visulima/spinner": "1.0.0-alpha.1",
576
- "@visulima/string": "3.0.0-alpha.13",
577
- "cli-boxes": "^4.0.1",
578
573
  "code-excerpt": "^4.0.0",
579
- "es-toolkit": "^1.46.1",
580
- "eventemitter3": "^5.0.4",
581
- "is-in-ci": "^2.0.0",
582
- "patch-console": "^2.0.0",
583
574
  "scheduler": "^0.27.0",
584
- "signal-exit": "^4.1.0",
585
- "stack-utils": "^2.0.6",
586
- "terminal-size": "^4.0.1",
587
- "type-fest": "5.6.0",
588
- "yoga-layout": "~3.2.1",
589
- "yoga-layout-prebuilt": "^1.10.0"
575
+ "yoga-layout": "~3.2.1"
590
576
  },
591
577
  "peerDependencies": {
592
578
  "@shikijs/langs": "^4.0.2",
@@ -602,43 +588,43 @@
602
588
  "ws": "^8.20.0"
603
589
  },
604
590
  "peerDependenciesMeta": {
605
- "ws": {
591
+ "@shikijs/langs": {
606
592
  "optional": true
607
593
  },
608
- "marked": {
594
+ "@shikijs/themes": {
609
595
  "optional": true
610
596
  },
611
- "diff": {
597
+ "@visulima/tabular": {
612
598
  "optional": true
613
599
  },
614
- "@shikijs/langs": {
600
+ "cfonts": {
615
601
  "optional": true
616
602
  },
617
- "@shikijs/themes": {
603
+ "diff": {
618
604
  "optional": true
619
605
  },
620
- "shiki": {
606
+ "marked": {
621
607
  "optional": true
622
608
  },
623
- "cfonts": {
609
+ "react-devtools-core": {
624
610
  "optional": true
625
611
  },
626
- "@visulima/tabular": {
612
+ "shiki": {
627
613
  "optional": true
628
614
  },
629
- "react-devtools-core": {
615
+ "ws": {
630
616
  "optional": true
631
617
  }
632
618
  },
633
619
  "optionalDependencies": {
634
- "@visulima/tui-binding-darwin-arm64": "1.0.0-alpha.14",
635
- "@visulima/tui-binding-darwin-x64": "1.0.0-alpha.14",
636
- "@visulima/tui-binding-linux-arm64-musl": "1.0.0-alpha.14",
637
- "@visulima/tui-binding-linux-x64-gnu": "1.0.0-alpha.14",
638
- "@visulima/tui-binding-linux-x64-musl": "1.0.0-alpha.14",
639
- "@visulima/tui-binding-linux-arm64-gnu": "1.0.0-alpha.14",
640
- "@visulima/tui-binding-win32-arm64-msvc": "1.0.0-alpha.14",
641
- "@visulima/tui-binding-win32-x64-msvc": "1.0.0-alpha.14"
620
+ "@visulima/tui-binding-linux-arm64-gnu": "1.0.0-alpha.15",
621
+ "@visulima/tui-binding-darwin-arm64": "1.0.0-alpha.15",
622
+ "@visulima/tui-binding-darwin-x64": "1.0.0-alpha.15",
623
+ "@visulima/tui-binding-linux-arm64-musl": "1.0.0-alpha.15",
624
+ "@visulima/tui-binding-linux-x64-gnu": "1.0.0-alpha.15",
625
+ "@visulima/tui-binding-linux-x64-musl": "1.0.0-alpha.15",
626
+ "@visulima/tui-binding-win32-arm64-msvc": "1.0.0-alpha.15",
627
+ "@visulima/tui-binding-win32-x64-msvc": "1.0.0-alpha.15"
642
628
  },
643
629
  "engines": {
644
630
  "node": "^22.14.0 || >=24.10.0"
@@ -1,2 +0,0 @@
1
- var p=Object.defineProperty;var d=(r,t)=>p(r,"name",{value:t,configurable:!0});import c from"eventemitter3";var B=Object.defineProperty,x=d((r,t)=>B(r,"name",{value:t,configurable:!0}),"h");class b extends c{static{d(this,"InputParser")}constructor(t){super(),this.stdin=t}stdin;static{x(this,"InputParser")}_boundHandleData=null;_pasteBuffer=null;start(){typeof this.stdin.setRawMode=="function"&&this.stdin.setRawMode(!0),this.stdin.resume(),this.stdin.setEncoding("utf8"),this._boundHandleData=this.handleData.bind(this),this.stdin.on("data",this._boundHandleData)}stop(){typeof this.stdin.setRawMode=="function"&&this.stdin.setRawMode(!1),this.stdin.pause(),this._boundHandleData&&(this.stdin.removeListener("data",this._boundHandleData),this._boundHandleData=null)}handleData(t){if(t===""){this.emit("exit");return}if(t.includes("\x1B[200~")||this._pasteBuffer!==null){if(this._pasteBuffer===null?this._pasteBuffer=t.replace("\x1B[200~",""):this._pasteBuffer+=t,this._pasteBuffer.includes("\x1B[201~")){const e=this._pasteBuffer.replace("\x1B[201~","");this._pasteBuffer=null,this.emit("paste",e),this.listenerCount("paste")===0&&this.emit("data",e)}return}if(t.length===1){const e=t.charCodeAt(0);if(e>=1&&e<=26&&e!==3&&e!==9&&e!==10&&e!==13){const s=String.fromCharCode(e+96);this.emit("ctrl",s),this.emit("data",t,{ctrl:!0});return}}if(t==="\x1B[A"){this.emit("keydown","up");return}if(t==="\x1B[B"){this.emit("keydown","down");return}if(t==="\x1B[C"){this.emit("keydown","right");return}if(t==="\x1B[D"){this.emit("keydown","left");return}if(t===" "){this.emit("keydown","tab");return}if(t==="\x1B[Z"){this.emit("keydown","shift-tab");return}if(t==="\x1B"){this.emit("keydown","escape");return}if(t==="\r"||t===`
2
- `){this.emit("keydown","enter");return}if(t===""){this.emit("keydown","backspace");return}if(t==="\x1B[3~"){this.emit("keydown","delete");return}if(t==="\x1B[5~"){this.emit("keydown","pageUp");return}if(t==="\x1B[6~"){this.emit("keydown","pageDown");return}if(t==="\x1B[H"||t==="\x1B[1~"){this.emit("keydown","home");return}if(t==="\x1B[F"||t==="\x1B[4~"){this.emit("keydown","end");return}if(t.length===2&&t[0]==="\x1B"){this.emit("meta",t[1]),this.emit("data",t,{meta:!0});return}if(t.startsWith("\x1B[<")){const e=t.match(/\u001B\[<(\d+);(\d+);(\d+)(M)/i);if(e){const s=Number.parseInt(e[1]),u=Number.parseInt(e[2])-1,h=Number.parseInt(e[3])-1,a=e[4]==="m",o=(s&4)!==0,f=(s&8)!==0,l=(s&16)!==0,n=s&-29;let i=null;if(n===0&&!a?i="left":n===1&&!a?i="middle":n===2&&!a?i="right":n===64?i="scrollUp":n===65&&(i="scrollDown"),i){const m={button:i,ctrl:l,meta:f,shift:o,x:u,y:h};this.emit("mouse",m),i==="left"&&this.emit("click",{x:u,y:h})}}return}this.emit("data",t)}}export{b as InputParser};
@@ -1 +0,0 @@
1
- var u=Object.defineProperty;var r=(i,t)=>u(i,"name",{value:t,configurable:!0});import{createDecMode as f,setMode as o,resetMode as d}from"@visulima/ansi";import a from"eventemitter3";import{Renderer as s,TerminalGuard as l}from"./Renderer-DJXooAsp.js";var w=Object.defineProperty,c=r((i,t)=>w(i,"name",{value:t,configurable:!0}),"i");const h=f(2026),g=o(h),p=d(h);class k extends a{static{r(this,"TuiApp")}static{c(this,"TuiApp")}renderer;terminal=null;backBuffer;width;height;isRunning=!1;stdoutBuffer=[];stderrBuffer=[];constructor(){super(),this.width=process.stdout.columns||80,this.height=process.stdout.rows||24,this.renderer=new s(this.width,this.height),this.backBuffer=new Uint32Array(this.width*this.height*2)}start(){this.isRunning||(this.terminal=new l(!0),this.isRunning=!0)}quit(){this.emit("quit")}stop(){this.isRunning=!1,this.terminal?.leave(),this.terminal=null,this.stdoutBuffer.length>0&&(process.stdout.write(this.stdoutBuffer.join("")),this.stdoutBuffer=[]),this.stderrBuffer.length>0&&(process.stderr.write(this.stderrBuffer.join("")),this.stderrBuffer=[])}writeStdout(t){this.isRunning?this.stdoutBuffer.push(t):process.stdout.write(t)}writeStderr(t){this.isRunning?this.stderrBuffer.push(t):process.stderr.write(t)}getBuffer(){return this.backBuffer}getSize(){return{height:this.height,width:this.width}}resize(t,e){this.width=t,this.height=e,this.renderer=new s(t,e),this.backBuffer=new Uint32Array(t*e*2)}beforeFlushListeners=[];onBeforeFlush(t){return this.beforeFlushListeners.push(t),()=>{this.beforeFlushListeners=this.beforeFlushListeners.filter(e=>e!==t)}}paintNow(t,e){if(this.isRunning){t(this.width,this.height),e(this.backBuffer,this.width,this.height);for(const n of this.beforeFlushListeners)n(this.backBuffer,this.width,this.height);this.renderer.writeRaw(g);try{this.renderer.render(this.backBuffer)}finally{this.renderer.writeRaw(p)}}}}export{k as TuiApp};
@@ -1 +0,0 @@
1
- var c=Object.defineProperty;var i=(r,e)=>c(r,"name",{value:e,configurable:!0});import{enableNormalMouse as f,enableAnyEventMouse as m,enableSgrMouse as d,disableSgrMouse as b,disableAnyEventMouse as p,disableNormalMouse as y}from"@visulima/ansi";const B={mouseButton:{off:y,on:f},mouseMotion:{off:p,on:m},mouseMotionOthers:{off:"\x1B[?1015l",on:"\x1B[?1015h"},mouseSGR:{off:b,on:d}},M=/\[<(\d+);(\d+);(\d+)(M)$/i;var x=Object.defineProperty,g=i((r,e)=>x(r,"name",{value:e,configurable:!0}),"i");const v={0:"left",1:"middle",2:"right"},N={32:"left",33:"middle",34:"right"},A=g(r=>{const e=M.exec(r);if(!e)return;const a=Number(e[1]),t=Number(e[2]),n=Number(e[3]),s=e[4]==="m",o=a&-29;if(o===64||o===65)return{direction:o===64?"scrollup":"scrolldown",type:"scroll",x:t,y:n};if(o===35)return{type:"move",x:t,y:n};const u=N[o];if(u)return{action:s?"release":"press",button:u,type:"drag",x:t,y:n};const l=v[o];if(l)return{action:s?"release":"press",button:l,type:"click",x:t,y:n}},"parseSgrMouse");export{B as M,A as a};
@@ -1 +0,0 @@
1
- var g=Object.defineProperty;var c=(r,n)=>g(r,"name",{value:n,configurable:!0});import t from"@visulima/colorize";var f=Object.defineProperty,i=c((r,n)=>f(r,"name",{value:n,configurable:!0}),"i");const b=/^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,d=/^ansi256\(\s?(\d+)\s?\)$/,l=i(r=>r in t,"isNamedColor"),m=i((r,n,e)=>{if(!n)return r;if(l(n)){if(e==="foreground")return t[n](r);const o=`bg${n[0].toUpperCase()+n.slice(1)}`;return t[o](r)}if(n.startsWith("#"))return e==="foreground"?t.hex(n)(r):t.bgHex(n)(r);if(n.startsWith("ansi256")){const o=d.exec(n);if(!o)return r;const s=Number(o[1]);return e==="foreground"?t.ansi256(s)(r):t.bgAnsi256(s)(r)}if(n.startsWith("rgb")){const o=b.exec(n);if(!o)return r;const s=Number(o[1]),u=Number(o[2]),a=Number(o[3]);return e==="foreground"?t.rgb(s,u,a)(r):t.bgRgb(s,u,a)(r)}return r},"colorize"),N=i(r=>{const n=m("x",r,"background");if(n!=="x")return n.split("x")[0]},"getBackgroundColorEscape");export{m as d,N as g};
@@ -1,2 +0,0 @@
1
- var g=Object.defineProperty;var s=(i,o)=>g(i,"name",{value:o,configurable:!0});import{createDecMode as L,setMode as v,resetMode as S,BracketedPasteMode as O,cursorUp as N,cursorToColumn1 as Y,cursorHide as k,REQUEST_CURSOR_POSITION as z,cursorPosition as m,eraseLine as A,cursorShow as B}from"@visulima/ansi";import{terminalSize as C,Renderer as D}from"./Renderer-DJXooAsp.js";var G=Object.defineProperty,n=s((i,o)=>G(i,"name",{value:o,configurable:!0}),"r");const y=L(2026),_=v(y),j=S(y),H=v(O),Q=S(O);function q(i,o={}){const E=o.rows??10,P=o.fps??60,U=o.onExit??"preserve";let d=null,c=null,l=null,u=80,r=10,h=0,a=1;function e(t){c.writeRaw(t)}s(e,"e"),n(e,"write");function p(){l.fill(0),i(l,u,r,h++),e(_);try{c.render(l)}finally{e(j)}}s(p,"u"),n(p,"tick");function w(t){a=t-r,e(N(r)+Y),c.setRowOffset(a),p(),d=setInterval(()=>{p()},Math.round(1e3/P))}s(w,"E"),n(w,"startRendering");function I(){const t=C();u=t.cols;const x=t.rows;r=Math.min(E,x),process.stdin.isTTY&&process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.setEncoding("utf8"),c=new D(u,r),l=new Uint32Array(u*r*2),e(k),e(H),e(`
2
- `.repeat(r)),e(z),process.on("SIGINT",f);let R="";const M=n(b=>{R+=b;const T=R.match(/\u001B\[(\d+);(\d+)R/);T&&(process.stdin.off("data",M),w(Number.parseInt(T[1],10)))},"onData");process.stdin.on("data",M)}s(I,"P"),n(I,"start");function f(){if(d&&(clearInterval(d),d=null),c){if(U==="destroy"){for(let t=0;t<r;t++)e(m(a+1+t,1)+A);e(m(a+1,1))}else e(m(a+r+1,1));e(Q),e(B)}process.stdin.isTTY&&process.stdin.setRawMode(!1),process.stdin.pause(),process.exit(0)}return s(f,"f"),n(f,"stop"),{start:I,stop:f}}s(q,"createInlineLoop");n(q,"createInlineLoop");export{q as createInlineLoop};
@@ -1,3 +0,0 @@
1
- var u=Object.defineProperty;var n=(t,r)=>u(t,"name",{value:r,configurable:!0});import{strip as i}from"@visulima/ansi";var c=Object.defineProperty,s=n((t,r)=>c(t,"name",{value:r,configurable:!0}),"e");const m=s((t,r)=>{const a=s(e=>e===void 0?"":i(e),"clean");return{contains(e){return this.text().includes(e)},frames(){return r.map(e=>i(e))},line(e){return this.text().split(`
2
- `)[e]??""},lines(){return this.text().split(`
3
- `).filter(e=>e.trim()!=="")},matches(e){return e.test(this.text())},rawFrames(){return[...r]},rawText(){return t()??""},text(){return a(t())}}},"createScreen");export{m as createScreen};
@@ -1 +0,0 @@
1
- var p=Object.defineProperty;var s=(e,t)=>p(e,"name",{value:t,configurable:!0});import f from"yoga-layout";import{e as c}from"./measure-text-DDjHT1jD.js";import m from"./squashTextNodesWithMap-Cpqmc45i.js";import{wordWrap as C,truncate as v}from"@visulima/string";var x=Object.defineProperty,R=s((e,t)=>x(e,"name",{value:t,configurable:!0}),"R");const u={},T={hard:"STRICT_WIDTH",wrap:"BREAK_WORDS","wrap-anywhere":"BREAK_AT_CHARACTERS","wrap-preserve-words":"PRESERVE_WORDS","wrap-strict":"STRICT_WIDTH"},k=R((e,t,o)=>{const r=e+String(t)+String(o),n=u[r];if(n)return n;let d=e;const N=T[o];if(N)d=C(e,{trim:!1,width:t,wrapMode:N}).replace(/\n$/,"");else if(o.startsWith("truncate")){let i="end";o==="truncate-middle"&&(i="middle"),o==="truncate-start"&&(i="start"),d=v(e,t,{position:i})}return u[r]=d,d},"wrapText");var S=Object.defineProperty,a=s((e,t)=>S(e,"name",{value:t,configurable:!0}),"n");let b=0;const P=a(e=>{const t={attributes:{},childNodes:[],internal_accessibility:{},internal_id:b++,nodeName:e,parentNode:void 0,style:{},yogaNode:e==="ink-virtual-text"||e==="ink-cursor"?void 0:f.Node.create()};return e==="ink-text"&&t.yogaNode?.setMeasureFunc(_.bind(null,t)),t},"createNode"),l=a(e=>{g(e.nodeName==="ink-static-render"&&e.cachedRender?e.parentNode:e)},"markNodeAndParentIfStaticAsDirty"),O=a((e,t)=>{t.parentNode&&y(t.parentNode,t),t.parentNode=e,e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount()),l(e)},"appendChildNode"),V=a((e,t,o)=>{t.parentNode&&y(t.parentNode,t),t.parentNode=e;const r=e.childNodes.indexOf(o);if(r===-1)e.childNodes.push(t),t.yogaNode&&e.yogaNode?.insertChild(t.yogaNode,e.yogaNode.getChildCount());else if(e.childNodes.splice(r,0,t),t.yogaNode){const n=e.childNodes.slice(0,r).filter(d=>!!d.yogaNode).length;e.yogaNode?.insertChild(t.yogaNode,n)}l(e)},"insertBeforeNode"),y=a((e,t)=>{if(t.yogaNode){const r=t.yogaNode.getParent();r&&r.removeChild(t.yogaNode)}t.parentNode=void 0;const o=e.childNodes.indexOf(t);o!==-1&&e.childNodes.splice(o,1),l(e)},"removeChildNode"),I=a((e,t,o)=>{if(t==="internal_accessibility"){e.internal_accessibility=o;return}e.attributes[t]=o},"setAttribute"),B=a((e,t)=>{e.style=t??{}},"setStyle"),H=a(e=>{const t={nodeName:"#text",nodeValue:e,parentNode:void 0,style:{},yogaNode:void 0};return w(t,e),t},"createTextNode"),_=a(function(e,t){const o=e.nodeName==="#text"?e.nodeValue:m(e),r=c(o);if(r.width<=t||r.width>=1&&t>0&&t<1)return r;const n=e.style?.textWrap??"wrap",d=k(o,Math.floor(t),n);return c(d)},"measureTextNode"),h=a(e=>{if(e?.parentNode)return e.yogaNode??h(e.parentNode)},"findClosestYogaNode"),g=a(e=>{(e?.nodeName==="#text"||e?.nodeName==="ink-text"||e?.nodeName==="ink-virtual-text")&&h(e)?.markDirty();let t=e;for(;t;){if((t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&(t.internal_textCache=void 0),"childNodes"in t){if(t!==e&&t.nodeName==="ink-static-render"&&t.cachedRender)break;t.cachedRender=void 0}t=t.parentNode}},"markNodeAsDirty"),w=a((e,t)=>{typeof t!="string"&&(t=String(t)),e.nodeValue=t,g(e)},"setTextNodeValue"),$=a((e,t)=>e.nodeName!=="ink-root"?()=>{}:(e.internal_layoutListeners??=new Set,e.internal_layoutListeners.add(t),()=>{e.internal_layoutListeners?.delete(t)}),"addLayoutListener"),j=a(e=>{if(!(e.nodeName!=="ink-root"||!e.internal_layoutListeners))for(const t of e.internal_layoutListeners)t()},"emitLayoutListeners"),M=a((e,t)=>{if(e.cachedRender=t,e.yogaNode){for(e.yogaNode.setWidth(t.width),e.yogaNode.setHeight(t.height);e.yogaNode.getChildCount()>0;)e.yogaNode.removeChild(e.yogaNode.getChild(0));e.isYogaTreeDetached=!0}},"setCachedRender"),K=a(e=>{const t=[];let o=e;for(;o;)t.unshift(o),o=o.parentNode;return t},"getPathToRoot"),Y=a(e=>{let t=e;for(;t;){const{userSelect:o}=t.style;if(o==="none")return!1;if(o==="text"||o==="all")return!0;t=t.parentNode}return!0},"isNodeSelectable");export{k as T,$ as a,V as b,P as c,O as d,j as e,H as f,K as g,B as h,Y as i,I as j,M as k,g as m,y as r,w as s};