@checkstack/command-frontend 0.2.22 → 0.2.24
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/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/src/components/NavbarSearch.tsx +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @checkstack/command-frontend
|
|
2
2
|
|
|
3
|
+
## 0.2.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [594eecc]
|
|
8
|
+
- @checkstack/ui@1.3.3
|
|
9
|
+
|
|
10
|
+
## 0.2.23
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 0388000: Implemented a global performance-aware UI infrastructure that detects hardware capabilities (using heuristics and frame-budget benchmarks) to automatically disable expensive CSS animations, backdrop-blurs, and glassmorphism effects on low-power or non-hardware-accelerated devices.
|
|
15
|
+
- Updated dependencies [0388000]
|
|
16
|
+
- @checkstack/ui@1.3.2
|
|
17
|
+
|
|
3
18
|
## 0.2.22
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo } from "react";
|
|
2
|
-
import { cn } from "@checkstack/ui";
|
|
2
|
+
import { cn, usePerformance } from "@checkstack/ui";
|
|
3
3
|
import { Search, Command } from "lucide-react";
|
|
4
4
|
import { SearchDialog } from "./SearchDialog";
|
|
5
5
|
|
|
@@ -10,6 +10,7 @@ import { SearchDialog } from "./SearchDialog";
|
|
|
10
10
|
*/
|
|
11
11
|
export const NavbarSearch = () => {
|
|
12
12
|
const [searchOpen, setSearchOpen] = useState(false);
|
|
13
|
+
const { isLowPower } = usePerformance();
|
|
13
14
|
|
|
14
15
|
// Detect Mac for keyboard shortcut display
|
|
15
16
|
const isMac = useMemo(
|
|
@@ -45,8 +46,8 @@ export const NavbarSearch = () => {
|
|
|
45
46
|
"flex items-center gap-2 px-3 py-1.5 rounded-lg",
|
|
46
47
|
// Glassmorphism effect
|
|
47
48
|
"bg-muted/50 border border-primary/30",
|
|
48
|
-
// Subtle primary pulse animation
|
|
49
|
-
"animate-pulse-subtle ring-1 ring-primary/20",
|
|
49
|
+
// Subtle primary pulse animation - disabled in low power
|
|
50
|
+
!isLowPower && "animate-pulse-subtle ring-1 ring-primary/20",
|
|
50
51
|
// Hover state
|
|
51
52
|
"hover:bg-muted hover:border-primary/50 hover:ring-primary/40",
|
|
52
53
|
// Transition
|
|
@@ -57,7 +58,8 @@ export const NavbarSearch = () => {
|
|
|
57
58
|
"cursor-pointer"
|
|
58
59
|
)}
|
|
59
60
|
style={{
|
|
60
|
-
|
|
61
|
+
// GPU-heavy animation disabled in low power
|
|
62
|
+
animation: isLowPower ? undefined : "pulse-glow 3s ease-in-out infinite",
|
|
61
63
|
}}
|
|
62
64
|
aria-label="Open search"
|
|
63
65
|
>
|