lexgui 0.1.21 → 0.1.23
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/build/components/codeeditor.js +423 -181
- package/build/lexgui.css +44 -12
- package/build/lexgui.js +1 -1
- package/build/lexgui.module.js +1 -1
- package/changelog.md +16 -0
- package/examples/code_editor.html +5 -2
- package/package.json +1 -1
package/build/lexgui.css
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
--global-dark-background: #14161a;
|
|
19
19
|
--global-blur-background: #28292ba9;
|
|
20
20
|
--transition-time: 1000;
|
|
21
|
+
--code-editor-font-size: 14px;
|
|
22
|
+
--code-editor-row-height: 20px;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
/* Some global colors */
|
|
@@ -129,7 +131,7 @@ body.nocursor * {
|
|
|
129
131
|
#global_search {
|
|
130
132
|
position: absolute;
|
|
131
133
|
background-color: var(--global-blur-background);
|
|
132
|
-
|
|
134
|
+
--webkit-backdrop-filter: blur(12px);
|
|
133
135
|
backdrop-filter: blur(12px);
|
|
134
136
|
border-radius: 8px;
|
|
135
137
|
border: 1px solid #d0d0ec6b;
|
|
@@ -140,6 +142,7 @@ body.nocursor * {
|
|
|
140
142
|
flex-wrap: wrap;
|
|
141
143
|
z-index: 105;
|
|
142
144
|
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC); /* this fixes the overflow:hidden in Chrome/Opera */
|
|
145
|
+
mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC); /* this fixes the overflow:hidden in Chrome/Opera */
|
|
143
146
|
/* box-shadow: 0 2px 10px black; */
|
|
144
147
|
}
|
|
145
148
|
|
|
@@ -1193,6 +1196,7 @@ input::-webkit-inner-spin-button {
|
|
|
1193
1196
|
|
|
1194
1197
|
/* Firefox */
|
|
1195
1198
|
input[type=number] {
|
|
1199
|
+
appearance: textfield;
|
|
1196
1200
|
-moz-appearance: textfield;
|
|
1197
1201
|
}
|
|
1198
1202
|
|
|
@@ -2730,8 +2734,33 @@ ul.lexassetscontent {
|
|
|
2730
2734
|
letter-spacing: 0em !important;
|
|
2731
2735
|
}
|
|
2732
2736
|
|
|
2733
|
-
.codebasearea .
|
|
2737
|
+
.codebasearea .lexareatabs {
|
|
2734
2738
|
padding: 0px;
|
|
2739
|
+
margin: 0px;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
.codebasearea .lexareatab {
|
|
2743
|
+
padding: 5px;
|
|
2744
|
+
border-radius: 0px !important;
|
|
2745
|
+
margin: 0px !important;
|
|
2746
|
+
border: 1px solid #91909036;
|
|
2747
|
+
border-right: none;
|
|
2748
|
+
background-color: var(--global-color-primary) !important;
|
|
2749
|
+
transition: none;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
.codebasearea .lexareatab:hover {
|
|
2753
|
+
background-color: var(--global-color-secondary) !important;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
.codebasearea .lexareatab:last-child {
|
|
2757
|
+
border-right: 1px solid #91909036;
|
|
2758
|
+
}
|
|
2759
|
+
|
|
2760
|
+
.codebasearea .lexareatab.selected {
|
|
2761
|
+
background-color: var(--global-color-secondary) !important;
|
|
2762
|
+
border-top: 1px solid var(--global-selected);
|
|
2763
|
+
border-bottom: none;
|
|
2735
2764
|
}
|
|
2736
2765
|
|
|
2737
2766
|
.codebasearea .lexareatab i {
|
|
@@ -2790,7 +2819,7 @@ ul.lexassetscontent {
|
|
|
2790
2819
|
width: 48px;
|
|
2791
2820
|
height: calc(100% - 62px);
|
|
2792
2821
|
background-color: var(--global-branch-darker);
|
|
2793
|
-
margin-top:
|
|
2822
|
+
margin-top: 28px;
|
|
2794
2823
|
overflow: hidden;
|
|
2795
2824
|
position: absolute;
|
|
2796
2825
|
}
|
|
@@ -2819,7 +2848,7 @@ ul.lexassetscontent {
|
|
|
2819
2848
|
-webkit-font-smoothing: antialiased;
|
|
2820
2849
|
-moz-osx-font-smoothing: grayscale;
|
|
2821
2850
|
font-feature-settings: "ss04", "ss05";
|
|
2822
|
-
font-size:
|
|
2851
|
+
font-size: var(--code-editor-font-size);
|
|
2823
2852
|
padding-right: 6px;
|
|
2824
2853
|
position: relative;
|
|
2825
2854
|
}
|
|
@@ -2829,7 +2858,7 @@ ul.lexassetscontent {
|
|
|
2829
2858
|
-webkit-font-smoothing: antialiased;
|
|
2830
2859
|
-moz-osx-font-smoothing: grayscale;
|
|
2831
2860
|
font-feature-settings: "ss04", "ss05";
|
|
2832
|
-
font-size:
|
|
2861
|
+
font-size: var(--code-editor-font-size);
|
|
2833
2862
|
position: absolute;
|
|
2834
2863
|
top: 0;
|
|
2835
2864
|
left: 0;
|
|
@@ -2852,7 +2881,7 @@ ul.lexassetscontent {
|
|
|
2852
2881
|
position: relative;
|
|
2853
2882
|
overflow: visible;
|
|
2854
2883
|
-webkit-tap-highlight-color: transparent;
|
|
2855
|
-
height:
|
|
2884
|
+
height: var(--code-editor-row-height);
|
|
2856
2885
|
pointer-events: none;
|
|
2857
2886
|
}
|
|
2858
2887
|
|
|
@@ -2871,16 +2900,15 @@ ul.lexassetscontent {
|
|
|
2871
2900
|
-webkit-tap-highlight-color: transparent;
|
|
2872
2901
|
box-sizing: border-box;
|
|
2873
2902
|
display: inline-block;
|
|
2874
|
-
height: 16px;
|
|
2875
2903
|
}
|
|
2876
2904
|
|
|
2877
2905
|
pre .line-gutter {
|
|
2878
2906
|
color: #8a8b97;
|
|
2879
2907
|
width: 48px;
|
|
2880
|
-
height:
|
|
2881
|
-
font-size:
|
|
2908
|
+
height: var(--code-editor-row-height);
|
|
2909
|
+
font-size: var(--code-editor-font-size);
|
|
2882
2910
|
font-weight: 400;
|
|
2883
|
-
line-height:
|
|
2911
|
+
line-height: var(--code-editor-row-height);
|
|
2884
2912
|
text-align: center;
|
|
2885
2913
|
-webkit-user-select: none; /* Safari 3.1+ */
|
|
2886
2914
|
-moz-user-select: none; /* Firefox 2+ */
|
|
@@ -2919,12 +2947,12 @@ pre .line-gutter {
|
|
|
2919
2947
|
padding: 0;
|
|
2920
2948
|
border-right: none;
|
|
2921
2949
|
width: 0;
|
|
2950
|
+
height: var(--code-editor-row-height);
|
|
2922
2951
|
position: absolute;
|
|
2923
2952
|
border-left: 3px solid #fff !important;
|
|
2924
2953
|
z-index: 0 !important;
|
|
2925
2954
|
left: 0px;
|
|
2926
2955
|
top: 0px;
|
|
2927
|
-
height: 20px;
|
|
2928
2956
|
}
|
|
2929
2957
|
|
|
2930
2958
|
.lexcodescrollbar {
|
|
@@ -2987,7 +3015,7 @@ pre .line-gutter {
|
|
|
2987
3015
|
left: 0px;
|
|
2988
3016
|
top: 0px;
|
|
2989
3017
|
width: 100px;
|
|
2990
|
-
height:
|
|
3018
|
+
height: var(--code-editor-row-height);
|
|
2991
3019
|
background-color: var(--global-selected);
|
|
2992
3020
|
opacity: 0.4;
|
|
2993
3021
|
}
|
|
@@ -3012,6 +3040,10 @@ pre .line-gutter {
|
|
|
3012
3040
|
transition: transform 0.2s ease-in;
|
|
3013
3041
|
}
|
|
3014
3042
|
|
|
3043
|
+
.lexcodeeditor .searchbox.gotoline {
|
|
3044
|
+
width: 124px;
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3015
3047
|
.lexcodeeditor .searchbox.opened {
|
|
3016
3048
|
transform: translateY(0px);
|
|
3017
3049
|
}
|
package/build/lexgui.js
CHANGED
|
@@ -12,7 +12,7 @@ console.warn( 'Script "build/lexgui.js" is depracated and will be removed soon.
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
var LX = global.LX = {
|
|
15
|
-
version: "0.1.
|
|
15
|
+
version: "0.1.23",
|
|
16
16
|
ready: false,
|
|
17
17
|
components: [], // specific pre-build components
|
|
18
18
|
signals: {} // events and triggers
|
package/build/lexgui.module.js
CHANGED
package/changelog.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# lexgui.js changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.23
|
|
4
|
+
|
|
5
|
+
Begin integration of multiple cursors ("Ctrl+ArrowDown").
|
|
6
|
+
Code tabs have new VS Code-alike style.
|
|
7
|
+
Improved CSS highlighting.
|
|
8
|
+
Add Undo Steps to some actions that were missing.
|
|
9
|
+
When using Ctrl+G, the selected line is now highlighted.
|
|
10
|
+
General bug fixes.
|
|
11
|
+
|
|
12
|
+
## 0.1.22
|
|
13
|
+
|
|
14
|
+
Added REDO using "Ctrl+Y".
|
|
15
|
+
Added FontSize customization. "Ctrl+PLUS", "Ctrl+MINUS" or "Ctrl+Wheel".
|
|
16
|
+
Added "Ctrl+G" to scroll to specific line.
|
|
17
|
+
General bug fixes.
|
|
18
|
+
|
|
3
19
|
## 0.1.21
|
|
4
20
|
|
|
5
21
|
Added "Ctrl+F" to find text in code tabs.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
6
|
<title>LexGUI Code Editor Demo</title>
|
|
6
7
|
<link rel="stylesheet" href="../build/lexgui.css">
|
|
7
8
|
<link rel="icon" href="../images/icon.png">
|
|
@@ -20,6 +21,8 @@
|
|
|
20
21
|
import { LX } from 'lexgui';
|
|
21
22
|
import 'lexgui/components/codeeditor.js';
|
|
22
23
|
|
|
24
|
+
window.LX = LX;
|
|
25
|
+
|
|
23
26
|
// init library and get main area
|
|
24
27
|
let area = LX.init();
|
|
25
28
|
|
|
@@ -27,7 +30,7 @@
|
|
|
27
30
|
|
|
28
31
|
if( !file_explorer )
|
|
29
32
|
{
|
|
30
|
-
var [leftArea, rightArea] = area.split({ sizes:["
|
|
33
|
+
var [leftArea, rightArea] = area.split({ sizes:["40%","60%"] });
|
|
31
34
|
|
|
32
35
|
var canvas = document.createElement('canvas');
|
|
33
36
|
canvas.id = "mycanvas";
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
file_explorer: file_explorer
|
|
53
56
|
});
|
|
54
57
|
|
|
55
|
-
editor.loadFile( "../
|
|
58
|
+
editor.loadFile( "../demo.js" );
|
|
56
59
|
// editor.loadFile( "../data/json_sample.json" );
|
|
57
60
|
// editor.loadFile( "../data/css_sample.css" );
|
|
58
61
|
// editor.loadFile( "../data/cpp_sample.cpp" );
|