Compare commits

...

2 Commits

Author SHA1 Message Date
807e1ff733 1.10.5
Some checks failed
Default (tags) / security (push) Failing after 52s
Default (tags) / test (push) Failing after 19s
Default (tags) / release (push) Has been skipped
Default (tags) / metadata (push) Has been skipped
2025-06-27 13:44:52 +00:00
4146a348ab update statsgrid 2025-06-27 13:44:36 +00:00
3 changed files with 18 additions and 15 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@design.estate/dees-catalog", "name": "@design.estate/dees-catalog",
"version": "1.10.4", "version": "1.10.5",
"private": false, "private": false,
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.", "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
"main": "dist_ts_web/index.js", "main": "dist_ts_web/index.js",

View File

@ -381,8 +381,9 @@ export const demoFunc = () => {
name: 'Increment', name: 'Increment',
iconName: 'lucide:plus', iconName: 'lucide:plus',
action: async () => { action: async () => {
const grid = document.querySelector('#interactive-grid'); const grid = document.querySelector('#interactive-grid') as any;
const tile = grid.tiles.find(t => t.id === 'counter'); if (!grid) return;
const tile = grid.tiles.find((t: any) => t.id === 'counter');
tile.value = typeof tile.value === 'number' ? tile.value + 1 : 1; tile.value = typeof tile.value === 'number' ? tile.value + 1 : 1;
grid.tiles = [...grid.tiles]; grid.tiles = [...grid.tiles];
} }
@ -391,8 +392,9 @@ export const demoFunc = () => {
name: 'Reset', name: 'Reset',
iconName: 'lucide:rotate-ccw', iconName: 'lucide:rotate-ccw',
action: async () => { action: async () => {
const grid = document.querySelector('#interactive-grid'); const grid = document.querySelector('#interactive-grid') as any;
const tile = grid.tiles.find(t => t.id === 'counter'); if (!grid) return;
const tile = grid.tiles.find((t: any) => t.id === 'counter');
tile.value = 0; tile.value = 0;
grid.tiles = [...grid.tiles]; grid.tiles = [...grid.tiles];
} }
@ -406,9 +408,9 @@ export const demoFunc = () => {
iconName: 'lucide:play', iconName: 'lucide:play',
action: async function() { action: async function() {
// Toggle live updates // Toggle live updates
if (!window.liveUpdateInterval) { if (!(window as any).liveUpdateInterval) {
window.liveUpdateInterval = setInterval(() => { (window as any).liveUpdateInterval = setInterval(() => {
const grid = document.querySelector('#interactive-grid'); const grid = document.querySelector('#interactive-grid') as any;
if (grid) { if (grid) {
const tiles = [...grid.tiles]; const tiles = [...grid.tiles];
@ -433,8 +435,8 @@ export const demoFunc = () => {
this.name = 'Stop Live Updates'; this.name = 'Stop Live Updates';
this.iconName = 'lucide:pause'; this.iconName = 'lucide:pause';
} else { } else {
clearInterval(window.liveUpdateInterval); clearInterval((window as any).liveUpdateInterval);
window.liveUpdateInterval = null; (window as any).liveUpdateInterval = null;
this.name = 'Start Live Updates'; this.name = 'Start Live Updates';
this.iconName = 'lucide:play'; this.iconName = 'lucide:play';
} }
@ -506,8 +508,8 @@ html\`
<script> <script>
// Cleanup live updates on page unload // Cleanup live updates on page unload
window.addEventListener('beforeunload', () => { window.addEventListener('beforeunload', () => {
if (window.liveUpdateInterval) { if ((window as any).liveUpdateInterval) {
clearInterval(window.liveUpdateInterval); clearInterval((window as any).liveUpdateInterval);
} }
}); });
</script> </script>

View File

@ -226,8 +226,9 @@ export class DeesStatsGrid extends DeesElement {
.gauge-container { .gauge-container {
width: 140px; width: 140px;
height: 70px; height: 80px;
position: relative; position: relative;
margin-top: -10px;
} }
.gauge-svg { .gauge-svg {
@ -473,10 +474,10 @@ export class DeesStatsGrid extends DeesElement {
// SVG dimensions and calculations // SVG dimensions and calculations
const width = 140; const width = 140;
const height = 70; const height = 80;
const strokeWidth = 8; const strokeWidth = 8;
const padding = strokeWidth / 2 + 2; const padding = strokeWidth / 2 + 2;
const radius = 40; const radius = 48;
const centerX = width / 2; const centerX = width / 2;
const centerY = height - padding; const centerY = height - padding;