react-terminal-plus
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
## 0.0.11 (4th August 2023) | ||
### Feature | ||
- Add types to `themes` prop in `Terminal` component | ||
## 0.0.10 (2nd August 2023) | ||
@@ -2,0 +8,0 @@ |
import * as React from "react"; | ||
import { NoInfer } from "../common/Types"; | ||
import { DefaultThemes } from "../themes"; | ||
type TerminalMessage = string | React.ReactNode | Function; | ||
export type TerminalProps = { | ||
type ThemeSchema = { | ||
themeBGColor?: string; | ||
themeToolbarColor?: string; | ||
themePromptColor?: string; | ||
themeColor?: string; | ||
}; | ||
export type TerminalProps<ThemesT extends string> = { | ||
enableInput?: boolean; | ||
caret?: boolean; | ||
theme?: string; | ||
showControlBar?: boolean; | ||
@@ -14,5 +21,7 @@ showControlButtons?: boolean; | ||
errorMessage?: TerminalMessage; | ||
themes?: Record<ThemesT, ThemeSchema>; | ||
theme?: NoInfer<ThemesT> | DefaultThemes; | ||
defaultHandler?: (command: string, commandArguments: string) => TerminalMessage | Promise<TerminalMessage>; | ||
}; | ||
export default function Terminal(props: TerminalProps): React.JSX.Element; | ||
export default function Terminal<ThemesT extends string>(props: TerminalProps<ThemesT>): React.JSX.Element; | ||
export {}; |
@@ -1,5 +0,5 @@ | ||
import * as React from "react"; | ||
import { TerminalContextProvider as _TerminalContextProvider } from "./contexts/TerminalContext"; | ||
import type { TerminalProps } from "./components/Terminal"; | ||
export declare function ReactTerminal(props: TerminalProps): React.JSX.Element; | ||
import * as React from 'react'; | ||
import { TerminalContextProvider as _TerminalContextProvider } from './contexts/TerminalContext'; | ||
import type { TerminalProps } from './components/Terminal'; | ||
export declare function ReactTerminal<ThemesT extends string = never>(props: TerminalProps<ThemesT>): React.JSX.Element; | ||
export declare const TerminalContextProvider: typeof _TerminalContextProvider; | ||
@@ -6,0 +6,0 @@ declare const _default: { |
@@ -1,2 +0,3 @@ | ||
declare const _default: { | ||
export type DefaultThemes = keyof typeof defaultThemes; | ||
export declare const defaultThemes: { | ||
dark: { | ||
@@ -45,2 +46,1 @@ themeBGColor: string; | ||
}; | ||
export default _default; |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "A fork of the the 'react-terminal' package, with some extra features - react-terminal-plus", | ||
@@ -9,0 +9,0 @@ "main": "dist/index.js", |
@@ -11,4 +11,4 @@ # Forked version of react-terminal | ||
- []: Properly styled results - `white-space: pre-wrap;` | ||
- []: Add new native commands like: CTRL+L, CTRL+C | ||
- [X]: Properly styled results - `white-space: pre-wrap;` | ||
- [X]: Add new native commands like: CTRL+L, CTRL+C | ||
- []: Hook to run controlled commands - e.g useTerminal() | ||
@@ -59,1 +59,22 @@ - []: Allow highlighting of text with keyboard | ||
1. apply colors highlights | ||
## Terminal Features | ||
- [X]: Copy Pasting through keyboard - Ctrl+c/Ctrl+V | ||
- [X]: Copy Pasting through browser's context menu - Right Click | ||
- [X]: Cancel running command with Ctrl+C | ||
- [X]: Clear terminal with Ctrl+L | ||
- [X]: Add `cls` command to clear terminal | ||
- [X]: Localstorage support for commands history | ||
## Mongo Shell in Portal - Missing Features | ||
- [2]: Look at firewall rules - try | ||
- [2]: Only show mongo shell if there are workspaces with KAI enabled - let's hide for now | ||
- [2]: Terminal background color - talk with Philip | ||
- [1]: Blocklist commands - [window, ...] | ||
- [2]: Talk with Francisco about the portal's security concerns | ||
- [3]: Integrate into the tutorial?? - later | ||
- [1]: Bug showing the connected database - urgent | ||
- [1]: colors/font-size/line-height - urgent | ||
- []: ??? |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
55031
2.62%30
3.45%396
2.59%79
36.21%3
50%