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

@phosphor/commands

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phosphor/commands - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

36

lib/index.d.ts

@@ -105,2 +105,6 @@ import { JSONObject } from '@phosphor/coreutils';

/**
* @deprecated Use `iconClass()` instead.
*/
icon(id: string, args?: JSONObject): string;
/**
* Get the icon class for a specific command.

@@ -115,4 +119,15 @@ *

*/
icon(id: string, args?: JSONObject): string;
iconClass(id: string, args?: JSONObject): string;
/**
* Get the icon label for a specific command.
*
* @param id - The id of the command of interest.
*
* @param args - The arguments for the command.
*
* @returns The icon label for the command, or an empty string if
* the command is not registered.
*/
iconLabel(id: string, args?: JSONObject): string;
/**
* Get the short form caption for a specific command.

@@ -347,2 +362,6 @@ *

/**
* @deprecated Use `iconClass` instead.
*/
icon?: string | CommandFunc<string>;
/**
* The icon class for the command.

@@ -361,4 +380,17 @@ *

*/
icon?: string | CommandFunc<string>;
iconClass?: string | CommandFunc<string>;
/**
* The icon label for the command.
*
* #### Notes
* This label will be added as text to the icon node for the visual
* representation of the command.
*
* This can be a string literal, or a function which returns the
* label based on the provided command arguments.
*
* The default value is an empty string.
*/
iconLabel?: string | CommandFunc<string>;
/**
* The caption for the command.

@@ -365,0 +397,0 @@ *

@@ -186,2 +186,9 @@ "use strict";

/**
* @deprecated Use `iconClass()` instead.
*/
CommandRegistry.prototype.icon = function (id, args) {
if (args === void 0) { args = coreutils_1.JSONExt.emptyObject; }
return this.iconClass(id, args);
};
/**
* Get the icon class for a specific command.

@@ -196,8 +203,23 @@ *

*/
CommandRegistry.prototype.icon = function (id, args) {
CommandRegistry.prototype.iconClass = function (id, args) {
if (args === void 0) { args = coreutils_1.JSONExt.emptyObject; }
var cmd = this._commands[id];
return cmd ? cmd.icon.call(undefined, args) : '';
return cmd ? cmd.iconClass.call(undefined, args) : '';
};
/**
* Get the icon label for a specific command.
*
* @param id - The id of the command of interest.
*
* @param args - The arguments for the command.
*
* @returns The icon label for the command, or an empty string if
* the command is not registered.
*/
CommandRegistry.prototype.iconLabel = function (id, args) {
if (args === void 0) { args = coreutils_1.JSONExt.emptyObject; }
var cmd = this._commands[id];
return cmd ? cmd.iconLabel.call(undefined, args) : '';
};
/**
* Get the short form caption for a specific command.

@@ -653,3 +675,4 @@ *

mnemonic: asFunc(options.mnemonic, negativeOneFunc),
icon: asFunc(options.icon, emptyStringFunc),
iconClass: asFunc(options.iconClass || options.icon, emptyStringFunc),
iconLabel: asFunc(options.iconLabel, emptyStringFunc),
caption: asFunc(options.caption, emptyStringFunc),

@@ -656,0 +679,0 @@ usage: asFunc(options.usage, emptyStringFunc),

18

package.json
{
"name": "@phosphor/commands",
"version": "1.1.0",
"version": "1.2.0",
"description": "PhosphorJS - Commands",

@@ -15,11 +15,12 @@ "main": "lib/index.js",

"dependencies": {
"@phosphor/algorithm": "^1.0.0",
"@phosphor/coreutils": "^1.0.0",
"@phosphor/disposable": "^1.0.0",
"@phosphor/domutils": "^1.0.0",
"@phosphor/keyboard": "^1.0.0",
"@phosphor/signaling": "^1.1.0"
"@phosphor/algorithm": "^1.1.0",
"@phosphor/coreutils": "^1.1.0",
"@phosphor/disposable": "^1.1.0",
"@phosphor/domutils": "^1.1.0",
"@phosphor/keyboard": "^1.1.0",
"@phosphor/signaling": "^1.2.0"
},
"devDependencies": {
"rimraf": "^2.5.2",
"typedoc": "^0.6.0",
"typescript": "^2.2.1"

@@ -29,3 +30,4 @@ },

"build": "tsc",
"clean": "rimraf lib"
"clean": "rimraf lib",
"docs": "typedoc --options tdoptions.json ."
},

@@ -32,0 +34,0 @@ "repository": {

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