@@ -7283,7 +7283,7 @@ class FastSearchCard extends HTMLElement {
72837283
72847284 let cardIndex = 0;
72857285
7286- // 🌟 STARS-SEKTION (nur wenn Stars vorhanden)
7286+ // 🌟 STARS-SEKTION mit priorisierter Animation
72877287 if (starredItems.length > 0) {
72887288 const starHeader = document.createElement('div');
72897289 starHeader.className = 'area-header stars-header';
@@ -7293,20 +7293,27 @@ class FastSearchCard extends HTMLElement {
72937293 `;
72947294 resultsGrid.appendChild(starHeader);
72957295
7296+ // Header Animation - Apple-Style
7297+ if (!this.hasAnimated) {
7298+ this.animateHeaderIn(starHeader, cardIndex * 20);
7299+ cardIndex += 2; // Extra delay für Headers
7300+ }
7301+
72967302 starredItems.forEach((item) => {
72977303 const card = this.createDeviceCard(item);
72987304 resultsGrid.appendChild(card);
7305+
72997306 if (!this.hasAnimated) {
73007307 const timeout = setTimeout(() => {
7301- this.animateElementIn (card, { opacity: [0, 1], transform: ['translateY(20px) scale(0.9)', 'translateY(0) scale(1)'] } );
7302- }, cardIndex * 50);
7308+ this.animateCardInHomeKitStyle (card, 'star' );
7309+ }, cardIndex * 40); // 40ms delay für smooth cascade
73037310 this.animationTimeouts.push(timeout);
73047311 }
73057312 cardIndex++;
73067313 });
73077314 }
73087315
7309- // 🏠 RAUM-SEKTIONEN (bestehende Logik mit nonStarredItems)
7316+ // 🏠 RAUM-SEKTIONEN mit gestaffelten Animationen
73107317 const groupedItems = this.groupItemsByArea(nonStarredItems);
73117318
73127319 Object.keys(groupedItems).sort().forEach(area => {
@@ -7318,21 +7325,138 @@ class FastSearchCard extends HTMLElement {
73187325 `;
73197326 resultsGrid.appendChild(areaHeader);
73207327
7328+ // Header Animation
7329+ if (!this.hasAnimated) {
7330+ this.animateHeaderIn(areaHeader, cardIndex * 20);
7331+ cardIndex += 2;
7332+ }
7333+
73217334 groupedItems[area].forEach((item) => {
73227335 const card = this.createDeviceCard(item);
73237336 resultsGrid.appendChild(card);
7337+
73247338 if (!this.hasAnimated) {
73257339 const timeout = setTimeout(() => {
7326- this.animateElementIn (card, { opacity: [0, 1], transform: ['translateY(20px) scale(0.9)', 'translateY(0) scale(1)'] } );
7327- }, cardIndex * 50 );
7340+ this.animateCardInHomeKitStyle (card, 'normal' );
7341+ }, cardIndex * 40 );
73287342 this.animationTimeouts.push(timeout);
73297343 }
73307344 cardIndex++;
73317345 });
73327346 });
7347+
73337348 this.hasAnimated = true;
73347349 }
73357350
7351+ // 🎨 HOMEKIT-STYLE CARD ANIMATION
7352+ animateCardInHomeKitStyle(card, type = 'normal') {
7353+ if (!card) return;
7354+
7355+ // Initial state - unsichtbar und leicht nach unten/skaliert
7356+ card.style.opacity = '0';
7357+ card.style.transform = 'translateY(30px) scale(0.85)';
7358+ card.style.filter = 'blur(4px)';
7359+
7360+ // HomeKit-inspired animation mit 3 Phasen
7361+ const animation = card.animate([
7362+ // Phase 1: Unsichtbar, nach unten, klein, unscharf
7363+ {
7364+ opacity: 0,
7365+ transform: 'translateY(30px) scale(0.85)',
7366+ filter: 'blur(4px)'
7367+ },
7368+ // Phase 2: Teilweise sichtbar, fast an Position, leicht größer
7369+ {
7370+ opacity: 0.7,
7371+ transform: 'translateY(-5px) scale(1.05)',
7372+ filter: 'blur(0px)',
7373+ offset: 0.7
7374+ },
7375+ // Phase 3: Vollständig sichtbar, finale Position, normale Größe
7376+ {
7377+ opacity: 1,
7378+ transform: 'translateY(0) scale(1)',
7379+ filter: 'blur(0px)'
7380+ }
7381+ ], {
7382+ duration: type === 'star' ? 600 : 500, // Stars etwas länger
7383+ easing: 'cubic-bezier(0.16, 1, 0.3, 1)', // Apple's preferred easing
7384+ fill: 'forwards'
7385+ });
7386+
7387+ // 🌟 Zusätzliche Effekte für Favoriten
7388+ if (type === 'star') {
7389+ setTimeout(() => {
7390+ this.addStarSparkleEffect(card);
7391+ }, 400);
7392+ }
7393+
7394+ return animation;
7395+ }
7396+
7397+ // ✨ SPARKLE EFFEKT für Favoriten
7398+ addStarSparkleEffect(card) {
7399+ const sparkle = document.createElement('div');
7400+ sparkle.className = 'star-sparkle-effect';
7401+ sparkle.innerHTML = '✨';
7402+
7403+ sparkle.style.cssText = `
7404+ position: absolute;
7405+ top: 8px;
7406+ right: 8px;
7407+ font-size: 16px;
7408+ opacity: 0;
7409+ pointer-events: none;
7410+ z-index: 10;
7411+ `;
7412+
7413+ card.appendChild(sparkle);
7414+
7415+ // Sparkle Animation
7416+ const sparkleAnimation = sparkle.animate([
7417+ { opacity: 0, transform: 'scale(0) rotate(0deg)' },
7418+ { opacity: 1, transform: 'scale(1.2) rotate(180deg)', offset: 0.5 },
7419+ { opacity: 0, transform: 'scale(0.8) rotate(360deg)' }
7420+ ], {
7421+ duration: 1000,
7422+ easing: 'ease-out'
7423+ });
7424+
7425+ sparkleAnimation.finished.then(() => {
7426+ sparkle.remove();
7427+ });
7428+ }
7429+
7430+ // 🎯 HEADER ANIMATION - Apple-Style
7431+ animateHeaderIn(header, delay = 0) {
7432+ if (!header) return;
7433+
7434+ header.style.opacity = '0';
7435+ header.style.transform = 'translateX(-20px)';
7436+
7437+ setTimeout(() => {
7438+ const animation = header.animate([
7439+ {
7440+ opacity: 0,
7441+ transform: 'translateX(-20px)'
7442+ },
7443+ {
7444+ opacity: 1,
7445+ transform: 'translateX(0)'
7446+ }
7447+ ], {
7448+ duration: 400,
7449+ easing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)', // Apple's easing
7450+ fill: 'forwards'
7451+ });
7452+
7453+ return animation;
7454+ }, delay);
7455+ }
7456+
7457+
7458+
7459+
73367460 renderListResults(resultsList, starredItems, nonStarredItems) {
73377461 resultsList.innerHTML = '';
73387462
0 commit comments