@nick-skriabin/glyph 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,6 +18,7 @@
18
18
  </p>
19
19
 
20
20
  <p align="center">
21
+ <a href="https://www.npmjs.com/package/@nick-skriabin/glyph"><img src="https://img.shields.io/npm/v/@nick-skriabin/glyph?color=crimson&logo=npm" alt="npm version"></a>
21
22
  <img src="https://img.shields.io/badge/React-18%2B-61dafb?logo=react&logoColor=white" alt="React 18+">
22
23
  <img src="https://img.shields.io/badge/Yoga-Flexbox-mediumpurple?logo=meta&logoColor=white" alt="Yoga Flexbox">
23
24
  <img src="https://img.shields.io/badge/TypeScript-First-3178c6?logo=typescript&logoColor=white" alt="TypeScript">
@@ -616,6 +617,24 @@ pnpm --filter showcase dev # Progress, Spinner, Toasts
616
617
 
617
618
  ---
618
619
 
620
+ ## Who Uses Glyph
621
+
622
+ <table>
623
+ <tr>
624
+ <td align="center">
625
+ <a href="https://github.com/nick-skriabin/aion">
626
+ <strong>Aion</strong>
627
+ </a>
628
+ <br>
629
+ <sub>Calendar & time management TUI</sub>
630
+ </td>
631
+ </tr>
632
+ </table>
633
+
634
+ <sub>Using Glyph in your project? <a href="https://github.com/nick-skriabin/glyph/issues">Let us know!</a></sub>
635
+
636
+ ---
637
+
619
638
  ## Architecture
620
639
 
621
640
  ```
package/dist/index.cjs CHANGED
@@ -348,9 +348,18 @@ var Terminal = class {
348
348
  resetStyles() {
349
349
  this.write(`${CSI}0m`);
350
350
  }
351
+ /** Enable kitty keyboard protocol for enhanced key detection */
352
+ enableKittyKeyboard() {
353
+ this.write(`${CSI}>1u`);
354
+ }
355
+ /** Disable kitty keyboard protocol */
356
+ disableKittyKeyboard() {
357
+ this.write(`${CSI}<u`);
358
+ }
351
359
  setup() {
352
360
  this.enterRawMode();
353
361
  this.enterAltScreen();
362
+ this.enableKittyKeyboard();
354
363
  this.hideCursor();
355
364
  this.clearScreen();
356
365
  this.attachStdinListener();
@@ -365,6 +374,7 @@ var Terminal = class {
365
374
  }
366
375
  this.resetStyles();
367
376
  this.resetCursorColor();
377
+ this.disableKittyKeyboard();
368
378
  this.showCursor();
369
379
  this.exitAltScreen();
370
380
  this.exitRawMode();
@@ -379,6 +389,7 @@ var Terminal = class {
379
389
  this.oscAccum = "";
380
390
  this.resetStyles();
381
391
  this.resetCursorColor();
392
+ this.disableKittyKeyboard();
382
393
  this.showCursor();
383
394
  this.exitAltScreen();
384
395
  this.exitRawMode();
@@ -387,6 +398,7 @@ var Terminal = class {
387
398
  resume() {
388
399
  this.enterRawMode();
389
400
  this.enterAltScreen();
401
+ this.enableKittyKeyboard();
390
402
  this.hideCursor();
391
403
  this.clearScreen();
392
404
  }