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

ninja-keys

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ninja-keys - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

8

dist/ninja-keys.js

@@ -199,5 +199,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

event.preventDefault();
this._actionSelected({
detail: this._actionMatches[this._selectedIndex],
});
if (this._selectedIndex > -1) {
this._actionSelected({
detail: this._actionMatches[this._selectedIndex],
});
}
});

@@ -204,0 +206,0 @@ }

{
"name": "ninja-keys",
"version": "1.1.2",
"version": "1.1.3",
"description": "Ninja Keys",

@@ -33,5 +33,5 @@ "main": "dist/ninja-keys.js",

"dependencies": {
"@material/mwc-icon": "0.25.2",
"@material/mwc-icon": "0.25.3",
"hotkeys-js": "3.8.7",
"lit": "^2.0.0"
"lit": "2.0.2"
},

@@ -38,0 +38,0 @@ "customElements": "custom-elements.json",

@@ -11,5 +11,6 @@ # Ninja Keys

[https://ninja-keys-demo.vercel.app/](https://ninja-keys-demo.vercel.app/)
![Demo](./docs/demo-min.gif)
## Why?
## Motivation
A lot of applications support that pattern, user hit <kbd>āŒ˜</kbd>+<kbd>k</kbd> (or <kbd>ctrl</kbd>+<kbd>k</kbd>) and search UI dialog appear.

@@ -26,3 +27,20 @@ I've seen recently in Notion, Slack, Linear, Vercel and Agolia, but I'm sure there are plenty more.

## Why "Ninja" ?
## Integrations
- [Vue Example - Codesandbox](https://codesandbox.io/s/ninja-keys-demo-vue3-bps5w?file=/public/index.html)
- [React Example - Codesandbox](https://codesandbox.io/s/ninja-keys-demo-reactjs-rlv4b?file=/src/App.js)
- [React/NextJS](https://github.com/ssleptsov/ninja-keys-demo/blob/master/components/LayoutWrapper.js#L14-L71)
- [Static Html - Codesandbox](https://codesandbox.io/s/ninja-keys-demo-html-cf9wy?file=/index.html)
## Features
- Keyboard navigation
- Light and dark theme build in
- Build-in icons support from Material font, can support custom svg icons too.
- Nested menu. Tree or flat data structure can be used
- Auto register your shortcuts
- Root search, for example, if search "Dark" it will find it within the "Theme" submenu
- CSS variable to customize the view
- Customizable hotkeys to open/close and etc. Choose what fit your website more.
## Why "Ninja" name?
Because it appears from nowhere and executes any actions quickly.

@@ -37,3 +55,3 @@ Or because it allows your users to become keyboard ninja's šŸ™ƒ

```js
import from 'ninja-keys';
import 'ninja-keys';
```

@@ -185,4 +203,4 @@

|------------------------------------|------------------------------------|
| --ninja-width | 640px; |
| --ninja-backdrop-filter | saturate(180%) blur(2px); |
| --ninja-width | 640px; |
| --ninja-backdrop-filter | none; |
| --ninja-overflow-background | rgba(255, 255, 255, 0.5); |

@@ -189,0 +207,0 @@ | --ninja-text-color | rgb(60, 65, 73); |

@@ -232,5 +232,7 @@ import {LitElement, html, TemplateResult, PropertyValues} from 'lit';

event.preventDefault();
this._actionSelected({
detail: this._actionMatches[this._selectedIndex],
});
if (this._selectedIndex > -1){
this._actionSelected({
detail: this._actionMatches[this._selectedIndex],
});
}
});

@@ -237,0 +239,0 @@ }

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