
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ink-tree-select
Advanced tools
Tree select component built for ink
Please consider following this project's author, Sina Bayandorian, and consider starring the project to show your :heart: and support.
npm i ink-tree-select
// * index.tsx
// * visit the components section if you need further customization
import { render, Text } from 'ink';
import React, { useState } from 'react';
import { TreeSelect } from 'ink-tree-select';
const App = () => {
const [selectedPath, setSelectedPath] = useState<string>('');
const selectHandler = (path: string) => setSelectedPath(path);
return (
<>
<TreeSelect root='./' onSelect={selectHandler} />
{selectedPath.length > 0 && <Text>{selectedPath}</Text>}
</>
);
};
render(<App />);
<TreeSelect />
Type | Default | Description | |
---|---|---|---|
root | string | Root directory to scan | |
onChange | (activePath: string) => void; | Triggers on every selected path change | |
onSelect | (selectedPath: string) => void; | Triggers once user hits Enter | |
options | TreeSelectOptions | { } |
type TreeSelectOptions = Partial<{
// * directories to ignore - read https://www.npmjs.com/package/fast-glob#ignore
ignore: string[];
rootAlias: string; // defaults to '.' - tree's root
previewColor: Color; // path preview text color
indicatorColor: Color; // ● color
}>;
<VirtualTreeSelect />
Accepts a custom tree instead of a directory to scan
Type | Default | Description | |
---|---|---|---|
tree | Tree | Custom directory tree | |
onChange | (activePath: string) => void; | Triggers on every selected path change | |
onSelect | (selectedPath: string) => void; | Triggers once user hits Enter | |
options | VirtualTreeSelectOptions | { } |
type Tree = { name: string; fullPath: string; branches: Tree[]; dir?: boolean };
type VirtualTreeSelectOptions = Partial<{
previewColor: Color; // path preview text color
indicatorColor: Color; // ● color
}>;
<MultiTreeSelect />
Type | Default | Description | |
---|---|---|---|
root | string | Root directory to scan | |
onChange | (activePath: string, selectedPaths: string[]) => void; | Triggers on every selected path change | |
onSelect | (selectedPaths: string[]) => void; | Triggers once user hits Enter | |
options | TreeSelectOptions | { } |
type TreeSelectOptions = Partial<{
// * directories to ignore - read https://www.npmjs.com/package/fast-glob#ignore
ignore: string[];
rootAlias: string; // defaults to '.' - tree's root
previewColor: Color; // path preview text color
indicatorColor: Color; // ● color
}>;
<MultiVirtualTreeSelect />
Accepts a custom tree instead of a directory to scan
Type | Default | Description | |
---|---|---|---|
tree | Tree | Custom directory tree | |
onChange | (activePath: string, selectedPaths: string[]) => void; | Triggers on every selected path change | |
onSelect | (selectedPaths: string[]) => void; | Triggers once user hits Enter | |
options | VirtualTreeSelectOptions | { } |
type Tree = { name: string; fullPath: string; branches: Tree[]; dir?: boolean };
type MultiVirtualTreeSelectOptions = Partial<{
previewColor: Color; // path preview text color
indicatorColor: Color; // (*) color
}>;
FAQs
Directory tree select component for ink
The npm package ink-tree-select receives a total of 11 weekly downloads. As such, ink-tree-select popularity was classified as not popular.
We found that ink-tree-select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.