@design.estate/dees-catalog 3.35.0 → 3.36.0
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 +817 -204
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-chart/dees-chart-log/dees-chart-log.d.ts +104 -6
- package/dist_ts_web/elements/00group-chart/dees-chart-log/dees-chart-log.demo.js +153 -54
- package/dist_ts_web/elements/00group-chart/dees-chart-log/dees-chart-log.js +716 -153
- package/dist_ts_web/elements/dees-statsgrid/dees-statsgrid.js +18 -5
- package/dist_ts_web/services/DeesServiceLibLoader.d.ts +34 -1
- package/dist_ts_web/services/DeesServiceLibLoader.js +27 -1
- package/dist_ts_web/services/index.d.ts +1 -1
- package/dist_ts_web/services/versions.d.ts +1 -0
- package/dist_ts_web/services/versions.js +2 -1
- package/dist_watch/bundle.js +815 -202
- package/dist_watch/bundle.js.map +3 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-chart/dees-chart-log/dees-chart-log.demo.ts +163 -56
- package/ts_web/elements/00group-chart/dees-chart-log/dees-chart-log.ts +756 -161
- package/ts_web/elements/dees-statsgrid/dees-statsgrid.ts +18 -4
- package/ts_web/services/DeesServiceLibLoader.ts +50 -1
- package/ts_web/services/index.ts +1 -1
- package/ts_web/services/versions.ts +1 -0
|
@@ -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);
|
|
@@ -25,6 +25,24 @@ export interface IXtermFitAddonBundle {
|
|
|
25
25
|
FitAddon: typeof FitAddon;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Bundle type for xterm-addon-search
|
|
30
|
+
* SearchAddon is loaded from CDN, so we use a minimal interface
|
|
31
|
+
*/
|
|
32
|
+
export interface IXtermSearchAddonBundle {
|
|
33
|
+
SearchAddon: new () => IXtermSearchAddon;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Minimal interface for xterm SearchAddon
|
|
38
|
+
*/
|
|
39
|
+
export interface IXtermSearchAddon {
|
|
40
|
+
activate(terminal: Terminal): void;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
findNext(term: string, searchOptions?: { regex?: boolean; wholeWord?: boolean; caseSensitive?: boolean; incremental?: boolean }): boolean;
|
|
43
|
+
findPrevious(term: string, searchOptions?: { regex?: boolean; wholeWord?: boolean; caseSensitive?: boolean; incremental?: boolean }): boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
28
46
|
/**
|
|
29
47
|
* Bundle type for Tiptap editor and extensions
|
|
30
48
|
*/
|
|
@@ -56,6 +74,7 @@ export class DeesServiceLibLoader {
|
|
|
56
74
|
// Cached library references
|
|
57
75
|
private xtermLib: IXtermBundle | null = null;
|
|
58
76
|
private xtermFitAddonLib: IXtermFitAddonBundle | null = null;
|
|
77
|
+
private xtermSearchAddonLib: IXtermSearchAddonBundle | null = null;
|
|
59
78
|
private highlightJsLib: HLJSApi | null = null;
|
|
60
79
|
private apexChartsLib: typeof ApexChartsType | null = null;
|
|
61
80
|
private tiptapLib: ITiptapBundle | null = null;
|
|
@@ -63,6 +82,7 @@ export class DeesServiceLibLoader {
|
|
|
63
82
|
// Loading promises to prevent duplicate concurrent loads
|
|
64
83
|
private xtermLoadingPromise: Promise<IXtermBundle> | null = null;
|
|
65
84
|
private xtermFitAddonLoadingPromise: Promise<IXtermFitAddonBundle> | null = null;
|
|
85
|
+
private xtermSearchAddonLoadingPromise: Promise<IXtermSearchAddonBundle> | null = null;
|
|
66
86
|
private highlightJsLoadingPromise: Promise<HLJSApi> | null = null;
|
|
67
87
|
private apexChartsLoadingPromise: Promise<typeof ApexChartsType> | null = null;
|
|
68
88
|
private tiptapLoadingPromise: Promise<ITiptapBundle> | null = null;
|
|
@@ -134,6 +154,32 @@ export class DeesServiceLibLoader {
|
|
|
134
154
|
return this.xtermFitAddonLoadingPromise;
|
|
135
155
|
}
|
|
136
156
|
|
|
157
|
+
/**
|
|
158
|
+
* Load xterm-addon-search from CDN
|
|
159
|
+
* @returns Promise resolving to SearchAddon class
|
|
160
|
+
*/
|
|
161
|
+
public async loadXtermSearchAddon(): Promise<IXtermSearchAddonBundle> {
|
|
162
|
+
if (this.xtermSearchAddonLib) {
|
|
163
|
+
return this.xtermSearchAddonLib;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (this.xtermSearchAddonLoadingPromise) {
|
|
167
|
+
return this.xtermSearchAddonLoadingPromise;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
this.xtermSearchAddonLoadingPromise = (async () => {
|
|
171
|
+
const url = `${CDN_BASE}/xterm-addon-search@${CDN_VERSIONS.xtermAddonSearch}/+esm`;
|
|
172
|
+
const module = await import(/* @vite-ignore */ url);
|
|
173
|
+
|
|
174
|
+
this.xtermSearchAddonLib = {
|
|
175
|
+
SearchAddon: module.SearchAddon,
|
|
176
|
+
};
|
|
177
|
+
return this.xtermSearchAddonLib;
|
|
178
|
+
})();
|
|
179
|
+
|
|
180
|
+
return this.xtermSearchAddonLoadingPromise;
|
|
181
|
+
}
|
|
182
|
+
|
|
137
183
|
/**
|
|
138
184
|
* Inject xterm CSS styles into the document head
|
|
139
185
|
*/
|
|
@@ -257,6 +303,7 @@ export class DeesServiceLibLoader {
|
|
|
257
303
|
await Promise.all([
|
|
258
304
|
this.loadXterm(),
|
|
259
305
|
this.loadXtermFitAddon(),
|
|
306
|
+
this.loadXtermSearchAddon(),
|
|
260
307
|
this.loadHighlightJs(),
|
|
261
308
|
this.loadApexCharts(),
|
|
262
309
|
this.loadTiptap(),
|
|
@@ -266,12 +313,14 @@ export class DeesServiceLibLoader {
|
|
|
266
313
|
/**
|
|
267
314
|
* Check if a specific library is already loaded
|
|
268
315
|
*/
|
|
269
|
-
public isLoaded(library: 'xterm' | 'xtermFitAddon' | 'highlightJs' | 'apexCharts' | 'tiptap'): boolean {
|
|
316
|
+
public isLoaded(library: 'xterm' | 'xtermFitAddon' | 'xtermSearchAddon' | 'highlightJs' | 'apexCharts' | 'tiptap'): boolean {
|
|
270
317
|
switch (library) {
|
|
271
318
|
case 'xterm':
|
|
272
319
|
return this.xtermLib !== null;
|
|
273
320
|
case 'xtermFitAddon':
|
|
274
321
|
return this.xtermFitAddonLib !== null;
|
|
322
|
+
case 'xtermSearchAddon':
|
|
323
|
+
return this.xtermSearchAddonLib !== null;
|
|
275
324
|
case 'highlightJs':
|
|
276
325
|
return this.highlightJsLib !== null;
|
|
277
326
|
case 'apexCharts':
|
package/ts_web/services/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { DeesServiceLibLoader } from './DeesServiceLibLoader.js';
|
|
2
|
-
export type { IXtermBundle, IXtermFitAddonBundle, ITiptapBundle } from './DeesServiceLibLoader.js';
|
|
2
|
+
export type { IXtermBundle, IXtermFitAddonBundle, IXtermSearchAddonBundle, IXtermSearchAddon, ITiptapBundle } from './DeesServiceLibLoader.js';
|
|
3
3
|
export { CDN_BASE, CDN_VERSIONS } from './versions.js';
|