lexgui 0.5.4 → 0.5.5

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.
@@ -491,9 +491,9 @@ class CodeEditor {
491
491
 
492
492
  searchPanel.sameLine( 4 );
493
493
  searchPanel.addText( null, "", null, { placeholder: "Find" } );
494
- searchPanel.addButton( null, "up", () => this.search( null, true ), { className: 'micro', icon: "fa fa-arrow-up" } );
495
- searchPanel.addButton( null, "down", () => this.search(), { className: 'micro', icon: "fa fa-arrow-down" } );
496
- searchPanel.addButton( null, "x", this.hideSearchBox.bind( this ), { className: 'micro', icon: "fa fa-xmark" } );
494
+ searchPanel.addButton( null, "up", () => this.search( null, true ), { icon: "fa fa-arrow-up" } );
495
+ searchPanel.addButton( null, "down", () => this.search(), { icon: "fa fa-arrow-down" } );
496
+ searchPanel.addButton( null, "x", this.hideSearchBox.bind( this ), { icon: "fa fa-xmark" } );
497
497
 
498
498
  box.querySelector( 'input' ).addEventListener( 'keyup', e => {
499
499
  if( e.key == 'Escape' ) this.hideSearchBox();
@@ -530,7 +530,7 @@ class CodeEditor {
530
530
  // Add code-sizer
531
531
  {
532
532
  this.codeSizer = document.createElement( 'div' );
533
- this.codeSizer.className = "code-sizer";
533
+ this.codeSizer.className = "code-sizer pseudoparent-tabs";
534
534
 
535
535
  // Append all childs
536
536
  while( this.codeScroller.firstChild )
@@ -1535,9 +1535,9 @@ class CodeEditor {
1535
1535
  let panel = new LX.Panel({ className: "lexcodetabinfo", width: "calc(100%)", height: "auto" });
1536
1536
 
1537
1537
  panel.sameLine();
1538
- panel.addLabel( this.code.title, { float: 'right', signal: "@tab-name" });
1539
- panel.addLabel( "Ln " + 1, { xmaxWidth: "48px", signal: "@cursor-line" });
1540
- panel.addLabel( "Col " + 1, { xmaxWidth: "48px", signal: "@cursor-pos" });
1538
+ panel.addLabel( this.code.title, { fit: true, signal: "@tab-name" });
1539
+ panel.addLabel( "Ln " + 1, { fit: true, signal: "@cursor-line" });
1540
+ panel.addLabel( "Col " + 1, { fit: true, signal: "@cursor-pos" });
1541
1541
  panel.addButton( null, "Spaces: " + this.tabSpaces, ( value, event ) => {
1542
1542
  LX.addContextMenu( "Spaces", event, m => {
1543
1543
  const options = [ 2, 4, 8 ];
@@ -1619,7 +1619,7 @@ class CodeEditor {
1619
1619
  this.processFocus(false);
1620
1620
 
1621
1621
  LX.addContextMenu( null, e, m => {
1622
- m.add( "Create", this.addTab.bind( this, "unnamed.js", true ) );
1622
+ m.add( "Create", this.addTab.bind( this, "unnamed.js", true, "", { language: "JavaScript" } ) );
1623
1623
  m.add( "Load", this.loadTabFromFile.bind( this, "unnamed.js", true ) );
1624
1624
  });
1625
1625
  }
@@ -1731,7 +1731,8 @@ class CodeEditor {
1731
1731
  title: code.title,
1732
1732
  icon: tabIcon,
1733
1733
  onSelect: this._onSelectTab.bind( this, isNewTabButton ),
1734
- onContextMenu: this._onContextMenuTab.bind( this, isNewTabButton )
1734
+ onContextMenu: this._onContextMenuTab.bind( this, isNewTabButton ),
1735
+ allowDelete: true
1735
1736
  } );
1736
1737
 
1737
1738
  // Move into the sizer..
@@ -1805,7 +1806,8 @@ class CodeEditor {
1805
1806
  title: code.title,
1806
1807
  icon: tabIcon,
1807
1808
  onSelect: this._onSelectTab.bind( this, isNewTabButton ),
1808
- onContextMenu: this._onContextMenuTab.bind( this, isNewTabButton )
1809
+ onContextMenu: this._onContextMenuTab.bind( this, isNewTabButton ),
1810
+ allowDelete: true
1809
1811
  });
1810
1812
 
1811
1813
  // Move into the sizer..
@@ -3911,14 +3913,15 @@ class CodeEditor {
3911
3913
  }
3912
3914
 
3913
3915
  _measureChar( char = "a", use_floating = false, get_bb = false ) {
3914
-
3915
- var line = document.createElement( "pre" );
3916
- var text = document.createElement( "span" );
3916
+ const parentContainer = LX.makeContainer( null, "lexcodeeditor", "", document.body );
3917
+ const container = LX.makeContainer( null, "code", "", parentContainer );
3918
+ const line = document.createElement( "pre" );
3919
+ container.appendChild( line );
3920
+ const text = document.createElement( "span" );
3917
3921
  line.appendChild( text );
3918
3922
  text.innerText = char;
3919
- this.code.appendChild( line );
3920
3923
  var rect = text.getBoundingClientRect();
3921
- LX.UTILS.deleteElement( line );
3924
+ LX.UTILS.deleteElement( parentContainer );
3922
3925
  const bb = [ use_floating ? rect.width : Math.floor( rect.width ), use_floating ? rect.height : Math.floor( rect.height ) ];
3923
3926
  return get_bb ? bb : bb[ 0 ];
3924
3927
  }
@@ -4489,8 +4492,8 @@ CodeEditor.keywords = {
4489
4492
  'arguments', 'extends', 'instanceof', 'Infinity'],
4490
4493
  'C': ['int', 'float', 'double', 'long', 'short', 'char', 'const', 'void', 'true', 'false', 'auto', 'struct', 'typedef', 'signed', 'volatile', 'unsigned', 'static', 'extern', 'enum', 'register',
4491
4494
  'union'],
4492
- 'C++': ['int', 'float', 'double', 'bool', 'long', 'short', 'char', 'wchar_t', 'const', 'static_cast', 'dynamic_cast', 'new', 'delete', 'void', 'true', 'false', 'auto', 'struct', 'typedef', 'nullptr',
4493
- 'NULL', 'signed', 'unsigned', 'namespace', 'enum', 'extern', 'union', 'sizeof', 'static'],
4495
+ 'C++': ['int', 'float', 'double', 'bool', 'long', 'short', 'char', 'wchar_t', 'const', 'static_cast', 'dynamic_cast', 'new', 'delete', 'void', 'true', 'false', 'auto', 'class', 'struct', 'typedef', 'nullptr',
4496
+ 'NULL', 'signed', 'unsigned', 'namespace', 'enum', 'extern', 'union', 'sizeof', 'static', 'private', 'public'],
4494
4497
  'CMake': ['cmake_minimum_required', 'set', 'not', 'if', 'endif', 'exists', 'string', 'strequal', 'add_definitions', 'macro', 'endmacro', 'file', 'list', 'source_group', 'add_executable',
4495
4498
  'target_include_directories', 'set_target_properties', 'set_property', 'add_compile_options', 'add_link_options', 'include_directories', 'add_library', 'target_link_libraries',
4496
4499
  'target_link_options', 'add_subdirectory', 'add_compile_definitions', 'project', 'cache'],
package/build/lexgui.css CHANGED
@@ -333,7 +333,7 @@ svg.xxl { width: var(--svg-size-xxl); height: var(--svg-size-xxl); }
333
333
  outline: none;
334
334
  }
335
335
 
336
- :root[data-strictVP="false"] {
336
+ :root[data-strictVP="false"] #lexroot {
337
337
  bottom: unset;
338
338
  }
339
339
 
@@ -1387,6 +1387,7 @@ a svg, svg path {
1387
1387
  /* Text Widget */
1388
1388
 
1389
1389
  .lexwidget input.lextext, .lexwidget div.lextext {
1390
+ width: 100%;
1390
1391
  border-radius: 6px;
1391
1392
  position: relative;
1392
1393
  border: 1px solid transparent;
@@ -1443,6 +1444,7 @@ a svg, svg path {
1443
1444
  /* TextArea Widget */
1444
1445
 
1445
1446
  .lexwidget textarea {
1447
+ width: 100%;
1446
1448
  word-break: break-word;
1447
1449
  font-family: var(--global-font);
1448
1450
  background: none;
@@ -2209,7 +2211,7 @@ dialog .lexselect .lexselectoptions {
2209
2211
  .lexwidget .vecbox .drag-icon {
2210
2212
  position: absolute;
2211
2213
  width: 2px;
2212
- right: 0.25em;
2214
+ right: 1em;
2213
2215
  top: 25%;
2214
2216
  font-size: var(--global-font-size-sm);
2215
2217
  color: var(--global-text-secondary);
@@ -2621,7 +2623,6 @@ input[type=number] {
2621
2623
  }
2622
2624
 
2623
2625
  .lextree .lextreetools.notitle {
2624
- /* padding-top: 14px; */
2625
2626
  border-top-left-radius: 8px;
2626
2627
  border-top-right-radius: 8px;
2627
2628
  }
@@ -2673,9 +2674,13 @@ input[type=number] {
2673
2674
  -moz-user-select: none;
2674
2675
  -ms-user-select: none;
2675
2676
  user-select: none;
2677
+ transition-property: color, background-color, border-color;
2678
+ transition-timing-function: ease-out;
2679
+ transition-duration: .15s;
2676
2680
  }
2677
2681
 
2678
2682
  .lextree .lextreeitem input {
2683
+ color: var(--global-color-primary);
2679
2684
  padding: 0;
2680
2685
  border: none;
2681
2686
  }
@@ -2716,8 +2721,12 @@ input[type=number] {
2716
2721
  }
2717
2722
 
2718
2723
  .lextree .lextreeitem.selected {
2719
- color: var(--global-text-primary);
2720
- background: light-dark(var(--global-color-accent-light), var(--global-color-accent));
2724
+ color: #f4f4f5;
2725
+ background: var(--global-color-accent);
2726
+ }
2727
+
2728
+ .lextree .lextreeitem.selected a.lexicon {
2729
+ color: #f4f4f5;
2721
2730
  }
2722
2731
 
2723
2732
  .lextree .lextreeitem a.hierarchy {
@@ -2728,18 +2737,6 @@ input[type=number] {
2728
2737
  font-size: var(--global-font-size-sm);
2729
2738
  }
2730
2739
 
2731
- .lextree .lextreeitem .itemicon:hover {
2732
- color: var(--global-color-accent);
2733
- }
2734
-
2735
- .lextree .lextreeitem.selected .itemicon:hover {
2736
- color: var(--global-text-secondary);
2737
- }
2738
-
2739
- .lextree .lextreeitem .itemicon:active {
2740
- margin-top: 7px;
2741
- }
2742
-
2743
2740
  /* File Input */
2744
2741
 
2745
2742
  .lexfileinput::file-selector-button {
@@ -3221,7 +3218,6 @@ meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
3221
3218
  padding: 10px;
3222
3219
  display: flex;
3223
3220
  flex-direction: column;
3224
- /* gap: 0.2rem; */
3225
3221
  }
3226
3222
 
3227
3223
  .lexsidebar *::-webkit-scrollbar {
@@ -3419,32 +3415,10 @@ meter:-moz-meter-sub-sub-optimum::-moz-meter-bar {
3419
3415
  display: none !important;
3420
3416
  }
3421
3417
 
3422
- .lexsidebar.collapsed .lexsidebarcontent div a:not(.lexsidebarentryicon) {
3418
+ .lexsidebar.collapsed .lexsidebarentrycontent div, .lexsidebar.collapsed .lexsidebarcontent div a:not(.lexsidebarentryicon) {
3423
3419
  display: none;
3424
3420
  }
3425
3421
 
3426
- .lexsidebar .lexsidebarentry .lexsidebarentrydesc {
3427
- position: absolute;
3428
- margin-left: 32px;
3429
- font-weight: 600;
3430
- background-color: var(--global-text-primary);
3431
- color: var(--global-color-primary);
3432
- font-size: var(--global-font-size-sm);
3433
- border-radius: 6px;
3434
- text-align: center;
3435
- opacity: 0;
3436
- transform: translate(-12px, 0);
3437
- z-index: 102;
3438
- padding: 4px 8px;
3439
- transition: opacity ease-in 0.15s, transform ease-in 0.15s;
3440
- pointer-events: none;
3441
- }
3442
-
3443
- .lexsidebar.collapsed .lexsidebarentry:hover .lexsidebarentrydesc {
3444
- opacity: 1;
3445
- transform: translate(2px, 0);
3446
- }
3447
-
3448
3422
  .lexsidebar.collapsed .lexsidebarentry:hover {
3449
3423
  display: flex;
3450
3424
  }
@@ -4847,7 +4821,6 @@ ul.lexassetscontent {
4847
4821
 
4848
4822
  /* Code Editor */
4849
4823
  .codebasearea {
4850
-
4851
4824
  display: flex;
4852
4825
  position: relative;
4853
4826
  overflow: inherit;
@@ -4935,20 +4908,25 @@ ul.lexassetscontent {
4935
4908
  z-index: 3;
4936
4909
  bottom: 0px;
4937
4910
  justify-items: end;
4911
+ padding-inline: 1rem;
4912
+ }
4913
+
4914
+ .lexcodetabinfo .lexinlinewidgets {
4915
+ justify-content: end;
4938
4916
  }
4939
4917
 
4940
4918
  .lexcodegutter {
4941
4919
  width: 48px;
4942
4920
  height: calc(100% - 65px);
4943
4921
  background-color: light-dark(var(--global-color-tertiary), var(--global-medium-background));
4944
- margin-top: 28px;
4922
+ margin-top: 31px;
4945
4923
  overflow: hidden;
4946
4924
  position: absolute;
4947
4925
  top: 0;
4948
4926
  }
4949
4927
 
4950
4928
  .lexcodeeditor .codetabsarea {
4951
- height: calc(100% - 64px) !important;
4929
+ height: calc(100% - 80px) !important;
4952
4930
  background-color: light-dark(var(--global-color-tertiary), var(--global-medium-background));
4953
4931
  overflow: scroll;
4954
4932
  }
@@ -4980,7 +4958,6 @@ ul.lexassetscontent {
4980
4958
  -moz-osx-font-smoothing: grayscale;
4981
4959
  font-feature-settings: "ss04", "ss05";
4982
4960
  font-size: var(--code-editor-font-size);
4983
- /* padding-right: 6px; */
4984
4961
  position: relative;
4985
4962
  }
4986
4963
 
@@ -5117,7 +5094,7 @@ ul.lexassetscontent {
5117
5094
  box-sizing: border-box;
5118
5095
  margin: 0;
5119
5096
  padding: 0;
5120
- margin-top: 26px;
5097
+ margin-top: 31px;
5121
5098
  z-index: 1 !important;
5122
5099
  right: 0px;
5123
5100
  pointer-events: none;
@@ -5184,7 +5161,7 @@ ul.lexassetscontent {
5184
5161
 
5185
5162
  .lexcodeeditor .searchbox {
5186
5163
  background-color: var(--global-color-secondary);
5187
- width: 256px;
5164
+ /* width: 256px; */
5188
5165
  position: absolute;
5189
5166
  right: 6px;
5190
5167
  top: 26px;
@@ -5193,8 +5170,9 @@ ul.lexassetscontent {
5193
5170
  border: 1px solid var(--global-color-tertiary);
5194
5171
  box-shadow: 0 0px 4px #101010;
5195
5172
  overflow-y: scroll;
5196
- transform: translateY(-72px);
5197
- transition: transform 0.2s ease-in;
5173
+ transform: translateY(-96px);
5174
+ opacity: 0;
5175
+ transition: transform 0.2s ease-in, opacity 0.2s ease-in;
5198
5176
  }
5199
5177
 
5200
5178
  .lexcodeeditor .searchbox.gotoline {
@@ -5203,6 +5181,7 @@ ul.lexassetscontent {
5203
5181
 
5204
5182
  .lexcodeeditor .searchbox.opened {
5205
5183
  transform: translateY(0px);
5184
+ opacity: 1;
5206
5185
  }
5207
5186
 
5208
5187
  .lexcodeeditor .searchbox .lexpanel span {
@@ -5276,6 +5255,10 @@ ul.lexassetscontent {
5276
5255
  border: 2px solid var(--global-color-primary);
5277
5256
  }
5278
5257
 
5258
+ .lexcodesnippet .lexareatabs.row {
5259
+ border-radius: 0;
5260
+ }
5261
+
5279
5262
  .lexcodesnippet .lexwindowbuttons {
5280
5263
  width: 100px;
5281
5264
  padding-inline: 16px;