lexgui 0.1.20 → 0.1.22
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 +519 -110
- package/build/lexgui.css +102 -106
- package/build/lexgui.js +5 -5
- package/build/lexgui.module.js +5 -5
- package/changelog.md +14 -0
- package/examples/code_editor.html +7 -7
- 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 */
|
|
@@ -2819,7 +2821,7 @@ ul.lexassetscontent {
|
|
|
2819
2821
|
-webkit-font-smoothing: antialiased;
|
|
2820
2822
|
-moz-osx-font-smoothing: grayscale;
|
|
2821
2823
|
font-feature-settings: "ss04", "ss05";
|
|
2822
|
-
font-size:
|
|
2824
|
+
font-size: var(--code-editor-font-size);
|
|
2823
2825
|
padding-right: 6px;
|
|
2824
2826
|
position: relative;
|
|
2825
2827
|
}
|
|
@@ -2829,7 +2831,7 @@ ul.lexassetscontent {
|
|
|
2829
2831
|
-webkit-font-smoothing: antialiased;
|
|
2830
2832
|
-moz-osx-font-smoothing: grayscale;
|
|
2831
2833
|
font-feature-settings: "ss04", "ss05";
|
|
2832
|
-
font-size:
|
|
2834
|
+
font-size: var(--code-editor-font-size);
|
|
2833
2835
|
position: absolute;
|
|
2834
2836
|
top: 0;
|
|
2835
2837
|
left: 0;
|
|
@@ -2852,7 +2854,7 @@ ul.lexassetscontent {
|
|
|
2852
2854
|
position: relative;
|
|
2853
2855
|
overflow: visible;
|
|
2854
2856
|
-webkit-tap-highlight-color: transparent;
|
|
2855
|
-
height:
|
|
2857
|
+
height: var(--code-editor-row-height);
|
|
2856
2858
|
pointer-events: none;
|
|
2857
2859
|
}
|
|
2858
2860
|
|
|
@@ -2871,16 +2873,15 @@ ul.lexassetscontent {
|
|
|
2871
2873
|
-webkit-tap-highlight-color: transparent;
|
|
2872
2874
|
box-sizing: border-box;
|
|
2873
2875
|
display: inline-block;
|
|
2874
|
-
height: 16px;
|
|
2875
2876
|
}
|
|
2876
2877
|
|
|
2877
2878
|
pre .line-gutter {
|
|
2878
2879
|
color: #8a8b97;
|
|
2879
2880
|
width: 48px;
|
|
2880
|
-
height:
|
|
2881
|
-
font-size:
|
|
2881
|
+
height: var(--code-editor-row-height);
|
|
2882
|
+
font-size: var(--code-editor-font-size);
|
|
2882
2883
|
font-weight: 400;
|
|
2883
|
-
line-height:
|
|
2884
|
+
line-height: var(--code-editor-row-height);
|
|
2884
2885
|
text-align: center;
|
|
2885
2886
|
-webkit-user-select: none; /* Safari 3.1+ */
|
|
2886
2887
|
-moz-user-select: none; /* Firefox 2+ */
|
|
@@ -2919,12 +2920,12 @@ pre .line-gutter {
|
|
|
2919
2920
|
padding: 0;
|
|
2920
2921
|
border-right: none;
|
|
2921
2922
|
width: 0;
|
|
2923
|
+
height: var(--code-editor-row-height);
|
|
2922
2924
|
position: absolute;
|
|
2923
2925
|
border-left: 3px solid #fff !important;
|
|
2924
2926
|
z-index: 0 !important;
|
|
2925
2927
|
left: 0px;
|
|
2926
2928
|
top: 0px;
|
|
2927
|
-
height: 20px;
|
|
2928
2929
|
}
|
|
2929
2930
|
|
|
2930
2931
|
.lexcodescrollbar {
|
|
@@ -2971,7 +2972,7 @@ pre .line-gutter {
|
|
|
2971
2972
|
background-color: #bbbbbb8c !important;
|
|
2972
2973
|
}
|
|
2973
2974
|
|
|
2974
|
-
.lexcodeeditor .lexcodeselection {
|
|
2975
|
+
.lexcodeeditor .lexcodeselection, .lexcodeeditor .lexcodesearchresult {
|
|
2975
2976
|
-webkit-text-size-adjust: 100%;
|
|
2976
2977
|
font-family: monospace;
|
|
2977
2978
|
color: #AAA !important;
|
|
@@ -2987,11 +2988,43 @@ pre .line-gutter {
|
|
|
2987
2988
|
left: 0px;
|
|
2988
2989
|
top: 0px;
|
|
2989
2990
|
width: 100px;
|
|
2990
|
-
height:
|
|
2991
|
+
height: var(--code-editor-row-height);
|
|
2991
2992
|
background-color: var(--global-selected);
|
|
2992
2993
|
opacity: 0.4;
|
|
2993
2994
|
}
|
|
2994
2995
|
|
|
2996
|
+
.lexcodeeditor .lexcodesearchresult {
|
|
2997
|
+
background-color: #f5f115;
|
|
2998
|
+
opacity: 0.5;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
.lexcodeeditor .searchbox {
|
|
3002
|
+
background-color: var(--global-branch-darker);
|
|
3003
|
+
width: 256px;
|
|
3004
|
+
position: absolute;
|
|
3005
|
+
right: 6px;
|
|
3006
|
+
top: 26px;
|
|
3007
|
+
z-index: 100;
|
|
3008
|
+
border-radius: 4px;
|
|
3009
|
+
border: 1px solid var(--global-button-color);
|
|
3010
|
+
box-shadow: 0 0px 4px #101010;
|
|
3011
|
+
overflow-y: scroll;
|
|
3012
|
+
transform: translateY(-72px);
|
|
3013
|
+
transition: transform 0.2s ease-in;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
.lexcodeeditor .searchbox.gotoline {
|
|
3017
|
+
width: 124px;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
.lexcodeeditor .searchbox.opened {
|
|
3021
|
+
transform: translateY(0px);
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
.lexcodeeditor .searchbox .lexpanel span {
|
|
3025
|
+
height: 11px;
|
|
3026
|
+
}
|
|
3027
|
+
|
|
2995
3028
|
.lexcodeeditor .autocomplete {
|
|
2996
3029
|
background-color: var(--global-branch-darker);
|
|
2997
3030
|
width: 256px;
|
|
@@ -3020,6 +3053,7 @@ pre .line-gutter {
|
|
|
3020
3053
|
pointer-events: unset;
|
|
3021
3054
|
cursor: default;
|
|
3022
3055
|
height: 22px;
|
|
3056
|
+
padding-left: 6px;
|
|
3023
3057
|
}
|
|
3024
3058
|
|
|
3025
3059
|
.lexcodeeditor .autocomplete pre a {
|
|
@@ -3050,102 +3084,64 @@ pre .line-gutter {
|
|
|
3050
3084
|
color: #95a0e1;
|
|
3051
3085
|
}
|
|
3052
3086
|
|
|
3053
|
-
|
|
3054
|
-
.cm-
|
|
3055
|
-
.cm-
|
|
3056
|
-
.cm-
|
|
3057
|
-
.cm-
|
|
3058
|
-
|
|
3059
|
-
.cm-
|
|
3060
|
-
.cm-
|
|
3061
|
-
.cm-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
.cm-
|
|
3065
|
-
.cm-
|
|
3066
|
-
.cm-
|
|
3067
|
-
.cm-
|
|
3068
|
-
.cm-
|
|
3069
|
-
.cm-
|
|
3070
|
-
|
|
3071
|
-
.cm-
|
|
3072
|
-
.cm-
|
|
3073
|
-
|
|
3074
|
-
.cm-
|
|
3075
|
-
.cm-
|
|
3076
|
-
.cm-
|
|
3077
|
-
|
|
3078
|
-
.cm-
|
|
3079
|
-
.cm-
|
|
3080
|
-
|
|
3081
|
-
.cm-
|
|
3082
|
-
.cm-
|
|
3083
|
-
|
|
3084
|
-
.cm-
|
|
3085
|
-
.cm-
|
|
3086
|
-
|
|
3087
|
-
.cm-typ.
|
|
3088
|
-
.cm-
|
|
3089
|
-
.cm-
|
|
3090
|
-
.cm-
|
|
3091
|
-
.cm-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
.cm-
|
|
3095
|
-
.cm-
|
|
3096
|
-
.cm-
|
|
3097
|
-
|
|
3098
|
-
.cm-
|
|
3099
|
-
.cm-
|
|
3100
|
-
.cm-
|
|
3101
|
-
.cm-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
.cm-
|
|
3105
|
-
.cm-
|
|
3106
|
-
|
|
3107
|
-
.cm-
|
|
3108
|
-
.cm-
|
|
3109
|
-
|
|
3110
|
-
.cm-
|
|
3111
|
-
.cm-sym.wgsl { color: #f9cb20; } /* symbol */
|
|
3112
|
-
.cm-mtd.wgsl { color: #e0cc68; } /* method */
|
|
3113
|
-
|
|
3114
|
-
.cm-str.rust { color: #ca7d59; } /* string */
|
|
3115
|
-
.cm-kwd.rust { color: #218cce; } /* keyword */
|
|
3116
|
-
.cm-com.rust { color: #5cab5a; } /* comment */
|
|
3117
|
-
.cm-typ.rust { color: #36c0b0; } /* type */
|
|
3118
|
-
.cm-std.rust { color: #cf6dcf; } /* statements & declarations */
|
|
3119
|
-
.cm-bln.rust { color: inherit; } /* builtin */
|
|
3120
|
-
.cm-dec.rust { color: #b1ce9b; } /* decimal */
|
|
3121
|
-
.cm-sym.rust { color: #e7ded2; } /* symbol */
|
|
3122
|
-
.cm-mtd.rust { color: #e0cc68 } /* method */
|
|
3123
|
-
|
|
3124
|
-
.cm-str.python { color: #ca7d59; } /* string */
|
|
3125
|
-
.cm-kwd.python { color: #218cce; } /* keyword */
|
|
3126
|
-
.cm-com.python { color: #5cab5a; } /* comment */
|
|
3127
|
-
.cm-typ.python { color: #36c0b0; } /* type */
|
|
3128
|
-
.cm-std.python { color: #cf6dcf; } /* statements & declarations */
|
|
3129
|
-
.cm-bln.python { color: inherit; } /* builtin */
|
|
3130
|
-
.cm-dec.python { color: #b1ce9b; } /* decimal */
|
|
3131
|
-
.cm-sym.python { color: #e7ded2; } /* symbol */
|
|
3132
|
-
.cm-mtd.python { color: #e0cc68 } /* method */
|
|
3133
|
-
|
|
3134
|
-
.cm-str.batch { color: #ca7d59; } /* string */
|
|
3135
|
-
.cm-kwd.batch { color: #218cce; } /* keyword */
|
|
3136
|
-
.cm-com.batch { color: #5cab5a; } /* comment */
|
|
3137
|
-
.cm-typ.batch { color: #36c0b0; } /* type */
|
|
3138
|
-
.cm-std.batch { color: #cf6dcf; } /* statements & declarations */
|
|
3139
|
-
.cm-bln.batch { color: inherit; } /* builtin */
|
|
3140
|
-
.cm-dec.batch { color: #b1ce9b; } /* decimal */
|
|
3141
|
-
.cm-sym.batch { color: #dfd85e; } /* symbol */
|
|
3142
|
-
.cm-mtd.batch { color: inherit } /* method */
|
|
3143
|
-
|
|
3144
|
-
.cm-str.html { color: #ca7d59; } /* string */
|
|
3145
|
-
.cm-kwd.html { color: #2194ce; } /* keyword */
|
|
3146
|
-
.cm-bln.html { color: #b4d7ec; } /* builtin */
|
|
3147
|
-
.cm-sym.html { color: #929292; } /* symbol */
|
|
3148
|
-
|
|
3087
|
+
/* Common */
|
|
3088
|
+
.cm-str { color: #ca7d59; } /* string */
|
|
3089
|
+
.cm-std { color: #cf6dcf; } /* statements & declarations */
|
|
3090
|
+
.cm-kwd { color: #2194ce; } /* keyword */
|
|
3091
|
+
.cm-com { color: #5cab5a; } /* comment */
|
|
3092
|
+
|
|
3093
|
+
.cm-typ.javascript { color: #36c0b0; } /* type */
|
|
3094
|
+
.cm-dec.javascript { color: #b1ce9b; } /* decimal */
|
|
3095
|
+
.cm-sym.javascript { color: #e7ded2; } /* symbol */
|
|
3096
|
+
.cm-mtd.javascript { color: #e0cc68 } /* method */
|
|
3097
|
+
|
|
3098
|
+
.cm-typ.cpp { color: #36c0b0; } /* type */
|
|
3099
|
+
.cm-bln.cpp { color: #d44141; } /* builtin */
|
|
3100
|
+
.cm-dec.cpp { color: #2ddf53; } /* decimal */
|
|
3101
|
+
.cm-sym.cpp { color: #e7ded2; } /* symbol */
|
|
3102
|
+
.cm-mtd.cpp { color: #7a9ae0 } /* method */
|
|
3103
|
+
.cm-ppc.cpp { color: #969696 } /* preprocessor */
|
|
3104
|
+
|
|
3105
|
+
.cm-kwd.css { color: #e8be53; } /* keyword */
|
|
3106
|
+
.cm-typ.css { color: #b7c3ec; } /* type */
|
|
3107
|
+
.cm-bln.css { color: #2194ce; } /* builtin */
|
|
3108
|
+
.cm-dec.css { color: #b1ce9b; } /* decimal */
|
|
3109
|
+
.cm-sym.css { color: #f9d620; } /* symbol */
|
|
3110
|
+
.cm-mtd.css { color: #e0cc68; } /* method */
|
|
3111
|
+
|
|
3112
|
+
.cm-dec.json { color: #b1ce9b; } /* decimal */
|
|
3113
|
+
.cm-sym.json { color: #cf6dcf; } /* symbol */
|
|
3114
|
+
|
|
3115
|
+
.cm-typ.glsl { color: #36c0b0; } /* type */
|
|
3116
|
+
.cm-bln.glsl { color: #cfc159; } /* builtin */
|
|
3117
|
+
.cm-dec.glsl { color: #b1ce9b; } /* decimal */
|
|
3118
|
+
.cm-sym.glsl { color: #f9cb20; } /* symbol */
|
|
3119
|
+
.cm-mtd.glsl { color: #e0cc68; } /* method */
|
|
3120
|
+
|
|
3121
|
+
.cm-typ.wgsl { color: #36c0b0; } /* type */
|
|
3122
|
+
.cm-bln.wgsl { color: #cfc159; } /* builtin */
|
|
3123
|
+
.cm-dec.wgsl { color: #b1ce9b; } /* decimal */
|
|
3124
|
+
.cm-sym.wgsl { color: #f9cb20; } /* symbol */
|
|
3125
|
+
.cm-mtd.wgsl { color: #e0cc68; } /* method */
|
|
3126
|
+
|
|
3127
|
+
.cm-typ.rust { color: #36c0b0; } /* type */
|
|
3128
|
+
.cm-dec.rust { color: #b1ce9b; } /* decimal */
|
|
3129
|
+
.cm-sym.rust { color: #e7ded2; } /* symbol */
|
|
3130
|
+
.cm-mtd.rust { color: #e0cc68 } /* method */
|
|
3131
|
+
|
|
3132
|
+
.cm-typ.python { color: #36c0b0; } /* type */
|
|
3133
|
+
.cm-dec.python { color: #b1ce9b; } /* decimal */
|
|
3134
|
+
.cm-sym.python { color: #e7ded2; } /* symbol */
|
|
3135
|
+
.cm-mtd.python { color: #e0cc68 } /* method */
|
|
3136
|
+
|
|
3137
|
+
.cm-typ.batch { color: #36c0b0; } /* type */
|
|
3138
|
+
.cm-dec.batch { color: #b1ce9b; } /* decimal */
|
|
3139
|
+
.cm-sym.batch { color: #dfd85e; } /* symbol */
|
|
3140
|
+
|
|
3141
|
+
.cm-bln.html { color: #a1d2f0; } /* builtin */
|
|
3142
|
+
.cm-sym.html { color: #929292; } /* symbol */
|
|
3143
|
+
|
|
3144
|
+
.cm-bln.markdown { color: #a1d2f0; } /* builtin */
|
|
3149
3145
|
|
|
3150
3146
|
/* Node Graph */
|
|
3151
3147
|
|
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.22",
|
|
16
16
|
ready: false,
|
|
17
17
|
components: [], // specific pre-build components
|
|
18
18
|
signals: {} // events and triggers
|
|
@@ -3568,9 +3568,9 @@ console.warn( 'Script "build/lexgui.js" is depracated and will be removed soon.
|
|
|
3568
3568
|
return wValue.innerText;
|
|
3569
3569
|
};
|
|
3570
3570
|
widget.onSetValue = (new_value) => {
|
|
3571
|
-
wValue.innerHTML =
|
|
3571
|
+
wValue.innerHTML =
|
|
3572
3572
|
(options.icon ? "<a class='" + options.icon + "'></a>" :
|
|
3573
|
-
( options.img ? "<img src='" + options.img + "'>" : (new_value || "")
|
|
3573
|
+
( options.img ? "<img src='" + options.img + "'>" : "<span>" + (new_value || "") + "</span>" ));
|
|
3574
3574
|
};
|
|
3575
3575
|
|
|
3576
3576
|
let element = widget.domEl;
|
|
@@ -3583,9 +3583,9 @@ console.warn( 'Script "build/lexgui.js" is depracated and will be removed soon.
|
|
|
3583
3583
|
wValue.classList.add("selected");
|
|
3584
3584
|
if(options.buttonClass)
|
|
3585
3585
|
wValue.classList.add(options.buttonClass);
|
|
3586
|
-
wValue.innerHTML =
|
|
3586
|
+
wValue.innerHTML =
|
|
3587
3587
|
(options.icon ? "<a class='" + options.icon + "'></a>" :
|
|
3588
|
-
( options.img ? "<img src='" + options.img + "'>" : (value || "")
|
|
3588
|
+
( options.img ? "<img src='" + options.img + "'>" : "<span>" + (value || "") + "</span>" ));
|
|
3589
3589
|
|
|
3590
3590
|
wValue.style.width = "calc( 100% - " + (options.nameWidth ?? LX.DEFAULT_NAME_WIDTH) + ")";
|
|
3591
3591
|
|
package/build/lexgui.module.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
var LX = {
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.22",
|
|
12
12
|
ready: false,
|
|
13
13
|
components: [], // specific pre-build components
|
|
14
14
|
signals: {} // events and triggers
|
|
@@ -3564,9 +3564,9 @@ class Panel {
|
|
|
3564
3564
|
return wValue.innerText;
|
|
3565
3565
|
};
|
|
3566
3566
|
widget.onSetValue = (new_value) => {
|
|
3567
|
-
wValue.innerHTML =
|
|
3567
|
+
wValue.innerHTML =
|
|
3568
3568
|
(options.icon ? "<a class='" + options.icon + "'></a>" :
|
|
3569
|
-
( options.img ? "<img src='" + options.img + "'>" : (new_value || "")
|
|
3569
|
+
( options.img ? "<img src='" + options.img + "'>" : "<span>" + (new_value || "") + "</span>" ));
|
|
3570
3570
|
};
|
|
3571
3571
|
|
|
3572
3572
|
let element = widget.domEl;
|
|
@@ -3579,9 +3579,9 @@ class Panel {
|
|
|
3579
3579
|
wValue.classList.add("selected");
|
|
3580
3580
|
if(options.buttonClass)
|
|
3581
3581
|
wValue.classList.add(options.buttonClass);
|
|
3582
|
-
wValue.innerHTML =
|
|
3582
|
+
wValue.innerHTML =
|
|
3583
3583
|
(options.icon ? "<a class='" + options.icon + "'></a>" :
|
|
3584
|
-
( options.img ? "<img src='" + options.img + "'>" : (value || "")
|
|
3584
|
+
( options.img ? "<img src='" + options.img + "'>" : "<span>" + (value || "") + "</span>" ));
|
|
3585
3585
|
|
|
3586
3586
|
wValue.style.width = "calc( 100% - " + (options.nameWidth ?? LX.DEFAULT_NAME_WIDTH) + ")";
|
|
3587
3587
|
|
package/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# lexgui.js changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.22
|
|
4
|
+
|
|
5
|
+
Added REDO using "Ctrl+Y".
|
|
6
|
+
Added FontSize customization. "Ctrl+PLUS", "Ctrl+MINUS" or "Ctrl+Wheel".
|
|
7
|
+
Added "Ctrl+G" to scroll to specific line.
|
|
8
|
+
General bug fixes.
|
|
9
|
+
|
|
10
|
+
## 0.1.21
|
|
11
|
+
|
|
12
|
+
Added "Ctrl+F" to find text in code tabs.
|
|
13
|
+
"Shift+Backspace" deletes word at current position.
|
|
14
|
+
Added "Markdown" syntax highlighting.
|
|
15
|
+
Improved hightlighting of tag languages (HTML, Markdown, XML).
|
|
16
|
+
|
|
3
17
|
## 0.1.20
|
|
4
18
|
|
|
5
19
|
Active line is now hightlighted.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
// init library and get main area
|
|
24
24
|
let area = LX.init();
|
|
25
25
|
|
|
26
|
-
const file_explorer =
|
|
26
|
+
const file_explorer = true;
|
|
27
27
|
|
|
28
28
|
if( !file_explorer )
|
|
29
29
|
{
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
editor.loadFile( "../data/js_sample.js" );
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
editor.loadFile( "../data/json_sample.json" );
|
|
57
|
+
editor.loadFile( "../data/css_sample.css" );
|
|
58
|
+
editor.loadFile( "../data/cpp_sample.cpp" );
|
|
59
|
+
editor.loadFile( "../data/xml_sample.xml" );
|
|
60
|
+
editor.loadFile( "../data/python_sample.py" );
|
|
61
|
+
editor.loadFile( "../data/rust_sample.rs" );
|
|
62
62
|
// editor.loadFile( "../localhost.bat" );
|
|
63
63
|
|
|
64
64
|
if( !file_explorer )
|