lexgui 0.5.9 → 0.5.10

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/lexgui.css CHANGED
@@ -2158,10 +2158,6 @@ dialog .lexselect .lexselectoptions {
2158
2158
  --toggle-fg-color: var(--global-color-primary);
2159
2159
  }
2160
2160
 
2161
- .lextoggle.outline.primary, .lextoggle.outline.secondary {
2162
- /* border: 1px solid var(--global-text-tertiary); */
2163
- }
2164
-
2165
2161
  .lextoggle.outline:checked, .lextoggle.outline[aria-checked=true], .lextoggle.outline:has(>input:checked) {
2166
2162
  border: 1px solid currentColor;
2167
2163
  color: var(--toggle-bg-color);
@@ -2485,7 +2481,6 @@ input[type=number] {
2485
2481
  -webkit-appearance: none;
2486
2482
  -moz-appearance: none;
2487
2483
  appearance: none;
2488
- webkit-appearance: none;
2489
2484
  --radius-selector-max: calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));
2490
2485
  border-radius: calc(var(--radius-selector) + min(var(--range-thumb-padding),var(--radius-selector-max)));
2491
2486
  width: 100%;
@@ -2555,7 +2550,6 @@ input[type=number] {
2555
2550
  -webkit-appearance: none;
2556
2551
  -moz-appearance: none;
2557
2552
  appearance: none;
2558
- webkit-appearance: none;
2559
2553
  color: var(--range-progress);
2560
2554
  box-shadow: 0 -1px oklch(0% 0 0/0.1) inset,0 8px 0 -4px oklch(100% 0 0/0.1) inset,0 1px color-mix(in oklab,currentColor calc(1*10%),#0000),0 0 0 2rem var(--range-thumb-color) inset,calc((var(--range-dir,1)*-100rem) - (var(--range-dir,1)*var(--range-thumb-size)/2)) 0 0 calc(100rem*var(--range-fill));
2561
2555
  background-color: currentColor;
@@ -6058,6 +6052,7 @@ ul.lexassetscontent {
6058
6052
  .bg-warning { --background-color: var(--global-color-warning); background-color: var(--background-color)!important }
6059
6053
  .bg-white { --background-color: white; background-color: var(--background-color)!important }
6060
6054
  .bg-black { --background-color: black; background-color: var(--background-color)!important }
6055
+ .bg-blur { --background-color: var(--global-blur-background); background-color: var(--background-color)!important }
6061
6056
  .bg-none { background: none !important }
6062
6057
 
6063
6058
  .hover\:bg-primary:hover { background-color: var(--global-color-primary) !important }
@@ -6140,7 +6135,7 @@ ul.lexassetscontent {
6140
6135
  .text-balance { text-wrap: balance }
6141
6136
  .break-words { overflow-wrap: break-word }
6142
6137
 
6143
- .line-clamp-1, .line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical }
6138
+ .line-clamp-1, .line-clamp-2, .line-clamp-3, .line-clamp-4 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical }
6144
6139
  .line-clamp-1 { -webkit-line-clamp: 1; line-clamp: 1 }
6145
6140
  .line-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2 }
6146
6141
  .line-clamp-3 { -webkit-line-clamp: 3; line-clamp: 3 }
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 = {
15
- version: "0.5.9",
15
+ version: "0.5.10",
16
16
  ready: false,
17
17
  components: [], // Specific pre-build components
18
18
  signals: {}, // Events and triggers
@@ -1245,7 +1245,7 @@ function _createCommandbar( root )
1245
1245
  if( LX.has('CodeEditor') )
1246
1246
  {
1247
1247
  const instances = LX.CodeEditor.getInstances();
1248
- if( !instances.length ) return;
1248
+ if( !instances.length || !instances[ 0 ].area.root.offsetHeight ) return;
1249
1249
 
1250
1250
  const languages = instances[ 0 ].languages;
1251
1251
 
@@ -5003,14 +5003,14 @@ class SideBar {
5003
5003
  this.root.appendChild( this.footer );
5004
5004
  }
5005
5005
 
5006
- // Set width depending on header/footer
5007
- doAsync( () => {
5008
- // This account for header, footer and all inner margins
5009
- const contentOffset = ( parseInt( this.header?.getComputedSize().height ) ?? 0 ) +
5010
- ( parseInt( this.filter?.getComputedSize().height ) ?? 0 ) +
5011
- ( parseInt( this.footer?.getComputedSize().height ) ?? 0 );
5006
+ const resizeObserver = new ResizeObserver( entries => {
5007
+ const contentOffset = ( this.header?.offsetHeight ?? 0 ) +
5008
+ ( this.filter?.offsetHeight ?? 0 ) +
5009
+ ( this.footer?.offsetHeight ?? 0 );
5012
5010
  this.content.style.height = `calc(100% - ${ contentOffset }px)`;
5013
- }, 10 );
5011
+ } );
5012
+
5013
+ resizeObserver.observe( this.root );
5014
5014
 
5015
5015
  this.items = [ ];
5016
5016
  this.icons = { };
@@ -10550,9 +10550,7 @@ class DatePicker extends Widget {
10550
10550
  container.innerHTML = "";
10551
10551
  const calendarIcon = LX.makeIcon( "calendar" );
10552
10552
  const calendarButton = new Button( null, currentDate ?? "Pick a date", () => {
10553
- this._popover = new Popover( calendarButton.root, ( popoverRoot ) => {
10554
- popoverRoot.appendChild( this.calendar.root );
10555
- } );
10553
+ this._popover = new Popover( calendarButton.root, [ this.calendar ] );
10556
10554
  }, { buttonClass: `flex flex-row px-3 ${ currentDate ? "" : "fg-tertiary" } justify-between` } );
10557
10555
 
10558
10556
  calendarButton.root.querySelector( "button" ).appendChild( calendarIcon );
@@ -12056,7 +12054,6 @@ class Footer {
12056
12054
  parent.appendChild( root );
12057
12055
 
12058
12056
  // Set always at bottom
12059
- root.previousElementSibling.style.height = "unset";
12060
12057
  root.previousElementSibling.style.flexGrow = "1";
12061
12058
 
12062
12059
  this.root = root;
@@ -13452,8 +13449,8 @@ class AssetView {
13452
13449
  div.className = 'lexassetbrowser';
13453
13450
  this.root = div;
13454
13451
 
13455
- let area = new LX.Area({height: "100%"});
13456
- div.appendChild(area.root);
13452
+ let area = new LX.Area( { width: "100%", height: "100%" } );
13453
+ div.appendChild( area.root );
13457
13454
 
13458
13455
  let left, right, contentArea = area;
13459
13456
 
@@ -13466,6 +13463,9 @@ class AssetView {
13466
13463
  this.contextMenu = options.contextMenu ?? [];
13467
13464
  this.onRefreshContent = options.onRefreshContent;
13468
13465
 
13466
+ // Append temporarily to the dom
13467
+ document.body.appendChild( this.root );
13468
+
13469
13469
  if( !this.skipBrowser )
13470
13470
  {
13471
13471
  [left, right] = area.split({ type: "horizontal", sizes: ["15%", "85%"]});
@@ -13503,6 +13503,9 @@ class AssetView {
13503
13503
  {
13504
13504
  this.previewPanel = right.addPanel( {className: 'lexassetcontentpanel', style: { overflow: 'scroll' }} );
13505
13505
  }
13506
+
13507
+ // Clean up
13508
+ document.body.removeChild( this.root );
13506
13509
  }
13507
13510
 
13508
13511
  /**