cronvel / terminal-kit

Terminal utilities for node.js
MIT License
3.08k stars 198 forks source link

terminalkit.TextBox is not a constructor #223

Closed SinanAkkoyun closed 1 year ago

SinanAkkoyun commented 1 year ago

Please help me, on which branch can one use Documents? I tried to install the develop branch via NPM github, but I can't seem to create TextBoxes just like in the example

Thank you very much!

SinanAkkoyun commented 1 year ago

My bad, I asusuned because the types didnt include the document model, the main branch also wouldnt, which is incorrect, it does, the typings are just simply not there

cronvel commented 1 year ago

Hi @SinanAkkoyun

Sorry, typings are out of date, the maintainer for that is inactive for years.

Also it's recommended to use the releases versions from npm, or if you insist cloning from Github, you should checkout a tag corresponding to the version you want.

SinanAkkoyun commented 1 year ago

Thank you very much.

I was wondering about a different thing: When supplying a pos and width and height, I often supply calculations based on the terminal size for a responsive design that is not limited by percentages (for example when I implement a padding of 2 characters)

For now, it seems that the only way to make this responsive is by subscribing to the resize event and setting every textbox's dimensions there again.

Is there perhaps a way to only supply the width, height and pos with a function that gets called internally every time a resize happens? This way one could eliminate redundancy and one wouldn't have to subscribe to the resize event at all

Much appreciated, thank you for the whole terminal-kit package so much, it really transcended my CLI application to a different level.