@basthon/console-react 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/components/app.js
CHANGED
|
@@ -15,13 +15,6 @@ const InnerApp = ({ forceTheme, compactHeader, onChangeEditor, children, }) => {
|
|
|
15
15
|
const [state, dispatch] = stateManager.useReducer(gui.language);
|
|
16
16
|
const language = stateManager.language(state);
|
|
17
17
|
const theme = forceTheme != null ? forceTheme : stateManager.theme(state);
|
|
18
|
-
// apply body style from css module
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
document.body.classList.add(styles.body);
|
|
21
|
-
return () => {
|
|
22
|
-
document.body.classList.remove(styles.body);
|
|
23
|
-
};
|
|
24
|
-
}, []);
|
|
25
18
|
// set data-theme for basthon-loader footer
|
|
26
19
|
// FIXME: remove this when basthon-loader is a plain react component
|
|
27
20
|
useEffect(() => {
|
|
@@ -32,31 +32,16 @@
|
|
|
32
32
|
--term-fg-color: #272822;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
36
|
-
margin: 0px;
|
|
37
|
-
padding: 0px;
|
|
38
|
-
/* useful for kernel-loader */
|
|
35
|
+
.root {
|
|
39
36
|
font-family: var(--main-font);
|
|
40
37
|
font-size: var(--main-font-size);
|
|
41
|
-
}
|
|
42
38
|
|
|
43
|
-
.root {
|
|
44
39
|
background-color: var(--bg-color);
|
|
45
40
|
font-family: var(--main-font);
|
|
46
41
|
font-size: var(--main-font-size);
|
|
47
42
|
height: 100%;
|
|
48
43
|
min-height: 100vh;
|
|
49
44
|
overflow: auto;
|
|
50
|
-
|
|
51
|
-
// font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
52
|
-
// line-height: 1.5;
|
|
53
|
-
// font-weight: 400;
|
|
54
|
-
// color: rgba(255, 255, 255, 0.87);
|
|
55
|
-
// background-color: #242424;
|
|
56
|
-
// font-synthesis: none;
|
|
57
|
-
// text-rendering: optimizeLegibility;
|
|
58
|
-
// -webkit-font-smoothing: antialiased;
|
|
59
|
-
// -moz-osx-font-smoothing: grayscale;
|
|
60
45
|
}
|
|
61
46
|
|
|
62
47
|
.header {
|
|
@@ -329,6 +314,8 @@ a {
|
|
|
329
314
|
:global {
|
|
330
315
|
.basthon-loader-root.basthon-loader-foot {
|
|
331
316
|
border-radius: var(--corner-radius) var(--corner-radius) 0px 0px;
|
|
317
|
+
font-family: var(--main-font);
|
|
318
|
+
font-size: var(--main-font-size);
|
|
332
319
|
}
|
|
333
320
|
|
|
334
321
|
.basthon-dynamic-iframe {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useRef } from "react";
|
|
2
|
+
import { useCallback, useRef, memo } from "react";
|
|
3
3
|
import { useAsyncEffect } from "../hooks/async-effect";
|
|
4
4
|
import { useGUI } from "../hooks/gui";
|
|
5
5
|
import TerminalGUI from "../gui/terminal";
|
|
@@ -34,8 +34,8 @@ const useTerminal = () => {
|
|
|
34
34
|
}, []);
|
|
35
35
|
return ref;
|
|
36
36
|
};
|
|
37
|
-
const Terminal = (props) => {
|
|
37
|
+
const Terminal = memo((props) => {
|
|
38
38
|
const containerRef = useTerminal();
|
|
39
39
|
return _jsx("div", { ref: containerRef, className: styles.terminal, ...props });
|
|
40
|
-
};
|
|
40
|
+
});
|
|
41
41
|
export { Terminal };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basthon/console-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Basthon - Console React Component",
|
|
5
5
|
"homepage": "https://basthon.fr",
|
|
6
6
|
"bugs": {
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
"main": "lib/index.js",
|
|
16
16
|
"types": "lib/index.d.ts",
|
|
17
17
|
"directories": {
|
|
18
|
-
"lib": "lib/"
|
|
18
|
+
"lib": "lib/",
|
|
19
|
+
"patches": "patches/"
|
|
19
20
|
},
|
|
20
21
|
"files": [
|
|
21
|
-
"lib"
|
|
22
|
+
"lib",
|
|
23
|
+
"patches"
|
|
22
24
|
],
|
|
23
25
|
"exports": {
|
|
24
26
|
".": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
diff --git a/node_modules/jquery.terminal/js/jquery.terminal.js b/node_modules/jquery.terminal/js/jquery.terminal.js
|
|
2
|
+
index 9e18a5a..c2abdef 100644
|
|
3
|
+
--- a/node_modules/jquery.terminal/js/jquery.terminal.js
|
|
4
|
+
+++ b/node_modules/jquery.terminal/js/jquery.terminal.js
|
|
5
|
+
@@ -1218,7 +1218,7 @@
|
|
6
|
+
var command_re = /((?:"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`|\/[^\/\\]*(?:\\[\S\s][^\/\\]*)*\/[gimsuy]*(?=\s|$)|(?:\\\s|\S))+)(?=\s|$)/gi;
|
|
7
|
+
var extended_command_re = /^\s*((terminal|cmd)::([a-z_]+)\(([\s\S]*)\))\s*$/;
|
|
8
|
+
var format_exec_split_re = /(\[\[(?:-?[@!gbiusor])*;[^\]]+\](?:\\[[\]]|[^\]])*\]|\[\[[\s\S]+?\]\])/;
|
|
9
|
+
- var format_exec_re = /(\[\[[\s\S]+?\]\])/;
|
|
10
|
+
+ var format_exec_re = /(\[\[(?:[^\][]|\\\])+\]\])/;
|
|
11
|
+
var float_re = /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;
|
|
12
|
+
var re_re = /^\/((?:\\\/|[^/]|\[[^\]]*\/[^\]]*\])+)\/([gimsuy]*)$/;
|
|
13
|
+
var string_re = /("(?:[^"\\]|\\(?:\\\\)*"|\\\\)*"|'(?:[^'\\]|\\(?:\\\\)*'|\\\\)*'|`(?:[^`\\]|\\(?:\\\\)*`|\\\\)*`)/;
|