@marianmeres/stuic 3.47.0 → 3.47.3

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.
@@ -121,6 +121,20 @@
121
121
  let loadingTimer: ReturnType<typeof setTimeout> | undefined;
122
122
  let showSpinner = $state(false);
123
123
 
124
+ // Debounced index — prevents mass image downloads during rapid slider drags
125
+ let settledPreviewIdx = $state(0);
126
+ let _previewSettleTimer: ReturnType<typeof setTimeout> | undefined;
127
+
128
+ $effect(() => {
129
+ const current = previewIdx;
130
+ clearTimeout(_previewSettleTimer);
131
+ _previewSettleTimer = setTimeout(() => {
132
+ settledPreviewIdx = current;
133
+ }, 120);
134
+ });
135
+
136
+ $effect(() => () => clearTimeout(_previewSettleTimer));
137
+
124
138
  // Drag guard for area clicks (prevent click after drag/pan)
125
139
  let _wasDragged = false;
126
140
 
@@ -432,7 +446,7 @@
432
446
 
433
447
  // Preload nearest 2 assets in each direction
434
448
  $effect(() => {
435
- const idx = previewIdx;
449
+ const idx = settledPreviewIdx;
436
450
  const len = assets.length;
437
451
  if (len <= 1) return;
438
452
 
@@ -318,15 +318,9 @@
318
318
  $effect(() => {
319
319
  const current = activeSpread;
320
320
  clearTimeout(_settleTimer);
321
- // Small jump (±1): settle immediately (normal next/prev navigation)
322
- if (Math.abs(current - settledSpread) <= 1) {
321
+ _settleTimer = setTimeout(() => {
323
322
  settledSpread = current;
324
- } else {
325
- // Large jump (slider drag): debounce to avoid intermediate downloads
326
- _settleTimer = setTimeout(() => {
327
- settledSpread = current;
328
- }, 120);
329
- }
323
+ }, 120);
330
324
  });
331
325
 
332
326
  $effect(() => () => clearTimeout(_settleTimer));
@@ -34,6 +34,7 @@ export class CronNextRun {
34
34
  const next = this.nextRun;
35
35
  if (!next)
36
36
  return "";
37
+ // the "sv-SE" is a trick/hack to get ISO 8601-ish local time (not UTC)
37
38
  return next.toLocaleString("sv-SE", {
38
39
  year: "numeric",
39
40
  month: "2-digit",
@@ -10,7 +10,7 @@
10
10
  --stuic-dropdown-menu-padding: calc(var(--spacing) * 1);
11
11
  --stuic-dropdown-menu-gap: calc(var(--spacing) * 0.5);
12
12
  --stuic-dropdown-menu-min-width: 12rem;
13
- --stuic-dropdown-menu-transition: 150ms;
13
+ --stuic-dropdown-menu-transition: 100ms;
14
14
 
15
15
  /* Dropdown container colors */
16
16
  --stuic-dropdown-menu-bg: var(--stuic-color-background);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.47.0",
3
+ "version": "3.47.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
@@ -42,21 +42,21 @@
42
42
  "@eslint/js": "^9.39.4",
43
43
  "@marianmeres/random-human-readable": "^1.6.1",
44
44
  "@sveltejs/adapter-auto": "^4.0.0",
45
- "@sveltejs/kit": "^2.53.4",
45
+ "@sveltejs/kit": "^2.55.0",
46
46
  "@sveltejs/package": "^2.5.7",
47
47
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
48
48
  "@tailwindcss/cli": "^4.2.1",
49
49
  "@tailwindcss/forms": "^0.5.11",
50
50
  "@tailwindcss/typography": "^0.5.19",
51
51
  "@tailwindcss/vite": "^4.2.1",
52
- "@types/node": "^25.4.0",
52
+ "@types/node": "^25.5.0",
53
53
  "dotenv": "^16.6.1",
54
54
  "eslint": "^9.39.4",
55
55
  "globals": "^16.5.0",
56
56
  "prettier": "^3.8.1",
57
57
  "prettier-plugin-svelte": "^3.5.1",
58
58
  "publint": "^0.3.18",
59
- "svelte": "^5.53.9",
59
+ "svelte": "^5.53.11",
60
60
  "svelte-check": "^4.4.5",
61
61
  "tailwindcss": "^4.2.1",
62
62
  "tsx": "^4.21.0",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@marianmeres/clog": "^3.15.2",
70
- "@marianmeres/cron": "^1.0.1",
70
+ "@marianmeres/cron": "^1.1.0",
71
71
  "@marianmeres/icons-fns": "^5.0.0",
72
72
  "@marianmeres/item-collection": "^1.3.5",
73
73
  "@marianmeres/paging-store": "^2.0.2",
@@ -75,7 +75,7 @@
75
75
  "@marianmeres/ticker": "^1.16.5",
76
76
  "@marianmeres/tree": "^2.2.5",
77
77
  "esm-env": "^1.2.2",
78
- "libphonenumber-js": "^1.12.39",
78
+ "libphonenumber-js": "^1.12.40",
79
79
  "runed": "^0.23.4",
80
80
  "tailwind-merge": "^3.5.0"
81
81
  },