@digital-ai/dot-illustrations 2.0.41 → 2.0.42

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/demo/index.html CHANGED
@@ -318,5 +318,12 @@
318
318
  </div>
319
319
  </div>
320
320
 
321
+ <!-- Toast — pre-defined so Tailwind CDN scans the classes -->
322
+ <div id="toast-message" role="status" aria-live="polite"
323
+ style="display:none;position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);z-index:9999;
324
+ background:#111827;color:#fff;padding:.625rem 1.25rem;border-radius:.5rem;
325
+ font-size:.875rem;box-shadow:0 4px 12px rgba(0,0,0,.35);white-space:nowrap;">
326
+ </div>
327
+
321
328
  </body>
322
329
  </html>
package/demo/script.js CHANGED
@@ -33,19 +33,15 @@ function hideTooltip(button) {
33
33
 
34
34
  // Toast logic
35
35
  function showToast(message) {
36
- let toast = document.getElementById('toast-message');
37
- if (!toast) {
38
- toast = document.createElement('div');
39
- toast.id = 'toast-message';
40
- toast.className = 'fixed bottom-6 left-1/2 -translate-x-1/2 z-50 bg-gray-900 text-white px-6 py-3 rounded-lg shadow-lg flex items-center gap-2 text-base animate-fade-in';
41
- document.body.appendChild(toast);
42
- }
36
+ // Uses the pre-defined #toast-message element in index.html.
37
+ // Inline styles only — Tailwind CDN does not generate styles for
38
+ // dynamically-injected class names so we never rely on it here.
39
+ const toast = document.getElementById('toast-message');
40
+ if (!toast) return;
43
41
  toast.textContent = message;
44
- toast.style.display = 'flex';
42
+ toast.style.display = 'block';
45
43
  clearTimeout(window._toastTimeout);
46
- window._toastTimeout = setTimeout(() => {
47
- toast.style.display = 'none';
48
- }, 2000);
44
+ window._toastTimeout = setTimeout(() => { toast.style.display = 'none'; }, 2400);
49
45
  }
50
46
 
51
47
  // Patch copyCode and copyText to show toast
@@ -528,7 +524,7 @@ document.addEventListener('DOMContentLoaded', () => {
528
524
  div.dataset.itemId = item;
529
525
  div.dataset.itemType = 'integration';
530
526
  div.innerHTML = `
531
- <button class="fav-btn absolute top-2.5 right-2.5 z-20 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-lg bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm shadow-sm" onclick="event.stopPropagation();window.toggleFavourite('${item}')">
527
+ <button class="fav-btn absolute top-2.5 right-2.5 z-20 ${isFav ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity p-1 rounded-lg bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm shadow-sm" onclick="event.stopPropagation();window.toggleFavourite('${item}')">
532
528
  <svg class="w-3.5 h-3.5" fill="${isFav ? '#FBBF24' : 'none'}" viewBox="0 0 24 24" stroke="${isFav ? '#FBBF24' : '#9CA3AF'}" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l2.036 6.29a1 1 0 00.95.69h6.631c.969 0 1.371 1.24.588 1.81l-5.37 3.905a1 1 0 00-.364 1.118l2.036 6.29c.3.921-.755 1.688-1.54 1.118l-5.37-3.905a1 1 0 00-1.176 0l-5.37 3.905c-.784.57-1.838-.197-1.54-1.118l2.036-6.29a1 1 0 00-.364-1.118L2.342 11.717c-.783-.57-.38-1.81.588-1.81h6.631a1 1 0 00.95-.69l2.036-6.29z"/></svg>
533
529
  </button>
534
530
  <div class="flex items-center justify-center h-36 px-4">
@@ -554,7 +550,7 @@ document.addEventListener('DOMContentLoaded', () => {
554
550
  div.dataset.itemId = item;
555
551
  div.dataset.itemType = 'illustration';
556
552
  div.innerHTML = `
557
- <button class="fav-btn absolute top-2.5 right-2.5 z-20 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-lg bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm shadow-sm" onclick="event.stopPropagation();window.toggleFavourite('${item}')">
553
+ <button class="fav-btn absolute top-2.5 right-2.5 z-20 ${isFav ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'} transition-opacity p-1 rounded-lg bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm shadow-sm" onclick="event.stopPropagation();window.toggleFavourite('${item}')">
558
554
  <svg class="w-3.5 h-3.5" fill="${isFav ? '#FBBF24' : 'none'}" viewBox="0 0 24 24" stroke="${isFav ? '#FBBF24' : '#9CA3AF'}" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l2.036 6.29a1 1 0 00.95.69h6.631c.969 0 1.371 1.24.588 1.81l-5.37 3.905a1 1 0 00-.364 1.118l2.036 6.29c.3.921-.755 1.688-1.54 1.118l-5.37-3.905a1 1 0 00-1.176 0l-5.37 3.905c-.784.57-1.838-.197-1.54-1.118l2.036-6.29a1 1 0 00-.364-1.118L2.342 11.717c-.783-.57-.38-1.81.588-1.81h6.631a1 1 0 00.95-.69l2.036-6.29z"/></svg>
559
555
  </button>
560
556
  <div class="flex items-center justify-center h-36 px-4 dot-illustration">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-illustrations",
3
- "version": "2.0.41",
3
+ "version": "2.0.42",
4
4
  "description": "A central place for the design team to keep illustrations and for dev teams to find them.",
5
5
  "main": "./index.css",
6
6
  "scripts": {