Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

console-gui-tools

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-gui-tools - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

14

dist/types/components/widgets/Button.d.ts
import { BackgroundColorName, ForegroundColorName } from "chalk/source/vendor/ansi-styles/index.js";
import { HEX, RGB } from "../Utils.js";
import Control from "./Control.js";
export interface ButtonKey {
name: string;
ctrl?: boolean;
shift?: boolean;
meta?: boolean;
}
export interface ButtonStyle {

@@ -34,6 +40,7 @@ background: BackgroundColorName | HEX | RGB | "";

* @param {ButtonStyle} style - To set the style of the button.
* @param {ButtonKey | undefined} key - To set a key to press to click the button.
* @param {function} onClick - The function to call when the button is clicked.
* @param {function} onRelease - The function to call when the button is released.
* @param {boolean} visible - If the button is visible. Default is true (make it hide using hide()).
* @param {boolean} enabled - If the button is enabled. Default is true (make it disabled using disable()).
* @param {function} onClick - The function to call when the button is clicked.
* @param {function} onRelease - The function to call when the button is released.
*

@@ -60,3 +67,4 @@ * @example ```js

private status;
constructor(id: string, text: string, width: number, height: number, x: number, y: number, style: ButtonStyle, onClick: () => void, onRelease: () => void, visible?: boolean, enabled?: boolean, draggable?: boolean);
private key;
constructor(id: string, text: string, width: number, height: number, x: number, y: number, style: ButtonStyle, key: ButtonKey | undefined, onClick: () => void, onRelease: () => void, visible?: boolean, enabled?: boolean, draggable?: boolean);
update: () => void;

@@ -63,0 +71,0 @@ setText: (text: string) => void;

@@ -56,3 +56,3 @@ /// <reference types="node" />

*/
keyListner(_str: string, key: KeyListenerArgs): void;
keyListener(_str: string, key: KeyListenerArgs): void;
/**

@@ -59,0 +59,0 @@ * @description This function is used to show the popup. It also register the key events and refresh the ConsoleManager.

@@ -67,3 +67,3 @@ /// <reference types="node" />

*/
keyListner(_str: string, key: KeyListenerArgs): void;
keyListener(_str: string, key: KeyListenerArgs): void;
/**

@@ -117,3 +117,2 @@ * getContent()

* @description This function is used to add the Control key listener callback to te ConsoleManager.
* @param {boolean} [mouse] - Register only mouse event listener.
* @returns {Control} The instance of the Control.

@@ -125,3 +124,2 @@ * @memberof Control

* @description This function is used to remove the Control key listener callback to te ConsoleManager.
* @param {boolean} [mouse] - Register only mouse event listener.
* @returns {Control} The instance of the Control.

@@ -128,0 +126,0 @@ * @memberof Control

@@ -54,3 +54,3 @@ /// <reference types="node" />

*/
keyListner(_str: string, key: KeyListenerArgs): void;
keyListener(_str: string, key: KeyListenerArgs): void;
/**

@@ -57,0 +57,0 @@ * @description This function is used to get the content of the popup.

@@ -94,3 +94,3 @@ /// <reference types="node" />

*/
keyListner(_str: string, key: KeyListenerArgs): void;
keyListener(_str: string, key: KeyListenerArgs): void;
/**

@@ -97,0 +97,0 @@ * @description This function is used to get the selected option.

@@ -52,3 +52,3 @@ /// <reference types="node" />

*/
keyListnerNumeric(_str: string, key: KeyListenerArgs): void;
keyListenerNumeric(_str: string, key: KeyListenerArgs): void;
/**

@@ -61,3 +61,3 @@ * @description This function is used to make the ConsoleManager handle the key events when the input is text and it is showed.

*/
keyListnerText(_str: string, key: KeyListenerArgs): void;
keyListenerText(_str: string, key: KeyListenerArgs): void;
/**

@@ -64,0 +64,0 @@ * @description This function is used to get the value of the input.

@@ -54,3 +54,3 @@ /// <reference types="node" />

*/
keyListner(_str: string, key: KeyListenerArgs): void;
keyListener(_str: string, key: KeyListenerArgs): void;
/**

@@ -57,0 +57,0 @@ * @description This function is used to get the selected option.

{
"name": "console-gui-tools",
"version": "2.2.0",
"version": "2.3.0",
"description": "A simple library to draw option menu, text popup or other widgets and layout on a Node.js console.",

@@ -5,0 +5,0 @@ "main": "dist/esm/ConsoleGui.mjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc