@design.estate/dees-catalog 3.35.0 → 3.35.1
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/dist_bundle/bundle.js +16 -6
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/dees-statsgrid/dees-statsgrid.js +18 -5
- package/dist_watch/bundle.js +14 -4
- package/dist_watch/bundle.js.map +2 -2
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/dees-statsgrid/dees-statsgrid.ts +18 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-catalog",
|
|
3
|
-
"version": "3.35.
|
|
3
|
+
"version": "3.35.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '3.35.
|
|
6
|
+
version: '3.35.1',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
}
|
|
@@ -426,6 +426,10 @@ export class DeesStatsGrid extends DeesElement {
|
|
|
426
426
|
padding: 4px 0;
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
.cpu-cores-bars.centered {
|
|
430
|
+
justify-content: center;
|
|
431
|
+
}
|
|
432
|
+
|
|
429
433
|
.cpu-core-bar-container {
|
|
430
434
|
flex: 1;
|
|
431
435
|
min-width: 6px;
|
|
@@ -442,14 +446,16 @@ export class DeesStatsGrid extends DeesElement {
|
|
|
442
446
|
width: 100%;
|
|
443
447
|
background: ${cssManager.bdTheme('#e8e8e8', '#1a1a1a')};
|
|
444
448
|
border-radius: 2px;
|
|
445
|
-
|
|
446
|
-
flex-direction: column;
|
|
447
|
-
justify-content: flex-end;
|
|
449
|
+
position: relative;
|
|
448
450
|
overflow: hidden;
|
|
449
451
|
min-height: 40px;
|
|
450
452
|
}
|
|
451
453
|
|
|
452
454
|
.cpu-core-bar-fill {
|
|
455
|
+
position: absolute;
|
|
456
|
+
bottom: 0;
|
|
457
|
+
left: 0;
|
|
458
|
+
right: 0;
|
|
453
459
|
width: 100%;
|
|
454
460
|
background: ${cssManager.bdTheme('#666666', '#888888')};
|
|
455
461
|
transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
|
|
@@ -832,6 +838,14 @@ export class DeesStatsGrid extends DeesElement {
|
|
|
832
838
|
return 'high';
|
|
833
839
|
};
|
|
834
840
|
|
|
841
|
+
// Calculate if bars should be centered (when they take up less than 66.6% of available width)
|
|
842
|
+
// Max bar width = cores * 24px + (cores - 1) * 3px gap
|
|
843
|
+
const maxBarsWidth = cores.length * 24 + (cores.length - 1) * 3;
|
|
844
|
+
// Estimate tile content width based on columnSpan and minTileWidth (subtract padding)
|
|
845
|
+
const columnSpan = tile.columnSpan || 1;
|
|
846
|
+
const estimatedTileWidth = (this.minTileWidth * columnSpan) + ((columnSpan - 1) * this.gap) - 32; // 32px for padding
|
|
847
|
+
const shouldCenter = maxBarsWidth < estimatedTileWidth * 0.666;
|
|
848
|
+
|
|
835
849
|
return html`
|
|
836
850
|
<div class="cpu-cores-wrapper">
|
|
837
851
|
<div class="cpu-cores-header">
|
|
@@ -839,7 +853,7 @@ export class DeesStatsGrid extends DeesElement {
|
|
|
839
853
|
<span class="cpu-cores-unit">%</span>
|
|
840
854
|
<span class="cpu-cores-label">${cores.length} cores</span>
|
|
841
855
|
</div>
|
|
842
|
-
<div class="cpu-cores-bars">
|
|
856
|
+
<div class="cpu-cores-bars ${shouldCenter ? 'centered' : ''}">
|
|
843
857
|
${cores.map(core => {
|
|
844
858
|
const usage = Math.min(100, Math.max(0, core.usage));
|
|
845
859
|
const colorClass = getColorClass(usage);
|