clawd-desktop 1.0.0
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/LICENSE +21 -0
- package/README.md +58 -0
- package/assets/LICENSE-clawd +22 -0
- package/assets/gif/clawd-building.gif +0 -0
- package/assets/gif/clawd-carrying.gif +0 -0
- package/assets/gif/clawd-conducting.gif +0 -0
- package/assets/gif/clawd-debugger.gif +0 -0
- package/assets/gif/clawd-error.gif +0 -0
- package/assets/gif/clawd-happy.gif +0 -0
- package/assets/gif/clawd-idle-reading.gif +0 -0
- package/assets/gif/clawd-idle.gif +0 -0
- package/assets/gif/clawd-juggling.gif +0 -0
- package/assets/gif/clawd-notification.gif +0 -0
- package/assets/gif/clawd-react-annoyed.gif +0 -0
- package/assets/gif/clawd-react-double-jump.gif +0 -0
- package/assets/gif/clawd-sleeping.gif +0 -0
- package/assets/gif/clawd-sweeping.gif +0 -0
- package/assets/gif/clawd-thinking.gif +0 -0
- package/assets/gif/clawd-typing.gif +0 -0
- package/assets/svg/clawd-about-hero.svg +202 -0
- package/assets/svg/clawd-collapse-sleep.svg +247 -0
- package/assets/svg/clawd-error.svg +94 -0
- package/assets/svg/clawd-happy.svg +161 -0
- package/assets/svg/clawd-idle-collapse.svg +101 -0
- package/assets/svg/clawd-idle-doze.svg +72 -0
- package/assets/svg/clawd-idle-follow.svg +64 -0
- package/assets/svg/clawd-idle-living.svg +196 -0
- package/assets/svg/clawd-idle-look.svg +115 -0
- package/assets/svg/clawd-idle-reading.svg +201 -0
- package/assets/svg/clawd-idle-yawn.svg +158 -0
- package/assets/svg/clawd-mini-alert.svg +129 -0
- package/assets/svg/clawd-mini-crabwalk.svg +76 -0
- package/assets/svg/clawd-mini-enter-sleep.svg +65 -0
- package/assets/svg/clawd-mini-enter.svg +115 -0
- package/assets/svg/clawd-mini-happy.svg +124 -0
- package/assets/svg/clawd-mini-idle.svg +83 -0
- package/assets/svg/clawd-mini-peek.svg +82 -0
- package/assets/svg/clawd-mini-sleep.svg +112 -0
- package/assets/svg/clawd-mini-typing.svg +153 -0
- package/assets/svg/clawd-notification.svg +149 -0
- package/assets/svg/clawd-react-annoyed.svg +167 -0
- package/assets/svg/clawd-react-double-jump.svg +229 -0
- package/assets/svg/clawd-react-double.svg +108 -0
- package/assets/svg/clawd-react-drag.svg +102 -0
- package/assets/svg/clawd-react-left.svg +102 -0
- package/assets/svg/clawd-react-right.svg +102 -0
- package/assets/svg/clawd-sleeping.svg +118 -0
- package/assets/svg/clawd-static-base.svg +21 -0
- package/assets/svg/clawd-wake.svg +277 -0
- package/assets/svg/clawd-working-building.svg +329 -0
- package/assets/svg/clawd-working-carrying.svg +178 -0
- package/assets/svg/clawd-working-conducting.svg +220 -0
- package/assets/svg/clawd-working-debugger.svg +245 -0
- package/assets/svg/clawd-working-juggling.svg +183 -0
- package/assets/svg/clawd-working-sweeping.svg +248 -0
- package/assets/svg/clawd-working-thinking.svg +196 -0
- package/assets/svg/clawd-working-typing.svg +273 -0
- package/assets/svg/clawd-working-ultrathink.svg +166 -0
- package/assets/svg/clawd-working-wizard.svg +98 -0
- package/assets/tray-icon.ico +0 -0
- package/bin/claude-pet.js +6 -0
- package/main.js +86 -0
- package/package.json +38 -0
- package/preload.js +6 -0
- package/renderer/avatar.js +55 -0
- package/renderer/index.html +14 -0
- package/renderer/motion.js +24 -0
- package/renderer/style.css +104 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const STATES = {
|
|
2
|
+
'idle': '../assets/gif/clawd-idle.gif',
|
|
3
|
+
'reading': '../assets/gif/clawd-idle-reading.gif',
|
|
4
|
+
'happy': '../assets/gif/clawd-happy.gif',
|
|
5
|
+
'thinking': '../assets/gif/clawd-thinking.gif',
|
|
6
|
+
'sleeping': '../assets/gif/clawd-sleeping.gif',
|
|
7
|
+
'typing': '../assets/gif/clawd-typing.gif',
|
|
8
|
+
'sweeping': '../assets/gif/clawd-sweeping.gif',
|
|
9
|
+
'juggling': '../assets/gif/clawd-juggling.gif'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Movement states
|
|
13
|
+
const MOVE_STATES = ['idle', 'reading', 'happy']; // These will trigger movement in motion.js
|
|
14
|
+
const STATIONARY_STATES = ['thinking', 'sleeping', 'typing', 'sweeping', 'juggling'];
|
|
15
|
+
|
|
16
|
+
const container = document.getElementById('pet-container');
|
|
17
|
+
const petImg = document.getElementById('pet-img');
|
|
18
|
+
|
|
19
|
+
let currentState = 'idle';
|
|
20
|
+
|
|
21
|
+
function setState(newState) {
|
|
22
|
+
if (!STATES[newState]) return;
|
|
23
|
+
|
|
24
|
+
container.classList.remove(currentState);
|
|
25
|
+
container.classList.add(newState);
|
|
26
|
+
|
|
27
|
+
petImg.src = STATES[newState];
|
|
28
|
+
currentState = newState;
|
|
29
|
+
|
|
30
|
+
console.log(`State changed to: ${newState}`);
|
|
31
|
+
|
|
32
|
+
// Schedule next state change
|
|
33
|
+
const nextTimeout = Math.random() * 15000 + 10000; // Longer duration (10-25s) for stability
|
|
34
|
+
setTimeout(pickRandomState, nextTimeout);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function pickRandomState() {
|
|
38
|
+
const keys = Object.keys(STATES);
|
|
39
|
+
let next = keys[Math.floor(Math.random() * keys.length)];
|
|
40
|
+
|
|
41
|
+
// Don't pick the same state twice in a row if possible
|
|
42
|
+
if (next === currentState) {
|
|
43
|
+
next = keys[Math.floor(Math.random() * keys.length)];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
setState(next);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Initial state
|
|
50
|
+
window.addEventListener('load', () => {
|
|
51
|
+
setState('idle');
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
window.getCurrentState = () => currentState;
|
|
55
|
+
window.isStationary = () => STATIONARY_STATES.includes(currentState);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<link rel="stylesheet" href="style.css">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<div id="pet-container" class="idle">
|
|
9
|
+
<img id="pet-img" src="../assets/gif/clawd-mini-idle.gif" />
|
|
10
|
+
</div>
|
|
11
|
+
<script src="avatar.js"></script>
|
|
12
|
+
<script src="motion.js"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
let screenWidth = 1920;
|
|
2
|
+
let screenHeight = 1080;
|
|
3
|
+
let posX = 0;
|
|
4
|
+
let posY = 0;
|
|
5
|
+
|
|
6
|
+
const winSize = 128;
|
|
7
|
+
|
|
8
|
+
async function init() {
|
|
9
|
+
const size = await window.electronAPI.getScreenSize();
|
|
10
|
+
screenWidth = size.width;
|
|
11
|
+
screenHeight = size.height;
|
|
12
|
+
|
|
13
|
+
// Sabit Pozisyon: Sol Alt Köşe
|
|
14
|
+
posX = 50;
|
|
15
|
+
// Ekranın en altından biraz yukarıda (Taskbar üstü gibi)
|
|
16
|
+
posY = screenHeight - winSize - 20;
|
|
17
|
+
|
|
18
|
+
// Pozisyonu bir kez ayarla ve bırak
|
|
19
|
+
window.electronAPI.moveWindow({ x: posX, y: posY });
|
|
20
|
+
|
|
21
|
+
console.log(`Position frozen at: ${posX}, ${posY}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
init();
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
html, body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
background: transparent !important;
|
|
8
|
+
user-select: none;
|
|
9
|
+
-webkit-app-region: drag;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
#pet-container {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
background: transparent !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#pet-container img {
|
|
22
|
+
width: 160px;
|
|
23
|
+
height: 160px;
|
|
24
|
+
image-rendering: pixelated;
|
|
25
|
+
transition: transform 0.2s ease-in-out;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* --- ANIMATIONS --- */
|
|
29
|
+
|
|
30
|
+
/* Idle Animation */
|
|
31
|
+
.idle .body-group {
|
|
32
|
+
animation: idle-float 0.8s ease-in-out infinite alternate;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes idle-float {
|
|
36
|
+
from { transform: translateY(0); }
|
|
37
|
+
to { transform: translateY(-3px); }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.idle .eye {
|
|
41
|
+
animation: blink 3s infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes blink {
|
|
45
|
+
0%, 95%, 100% { height: 12px; transform: translateY(0); }
|
|
46
|
+
97% { height: 0px; transform: translateY(6px); }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Walk Animation */
|
|
50
|
+
.walk .leg-left { animation: walk-leg 0.3s infinite alternate; }
|
|
51
|
+
.walk .leg-right { animation: walk-leg 0.3s infinite alternate reverse; }
|
|
52
|
+
.walk .leg-mid { animation: walk-leg 0.3s infinite alternate 0.15s; }
|
|
53
|
+
|
|
54
|
+
@keyframes walk-leg {
|
|
55
|
+
from { transform: translateY(0); }
|
|
56
|
+
to { transform: translateY(-6px); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Crab Animation */
|
|
60
|
+
.crab .body-group {
|
|
61
|
+
animation: crab-tilt 0.2s ease-in-out infinite alternate;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes crab-tilt {
|
|
65
|
+
from { transform: rotate(-5deg); }
|
|
66
|
+
to { transform: rotate(5deg); }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.crab .leg-left { animation: walk-leg 0.4s infinite alternate; }
|
|
70
|
+
.crab .leg-right { animation: walk-leg 0.4s infinite alternate reverse; }
|
|
71
|
+
|
|
72
|
+
/* Bounce Animation */
|
|
73
|
+
.bounce .body-group {
|
|
74
|
+
animation: bounce-jump 0.4s ease-out infinite alternate;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes bounce-jump {
|
|
78
|
+
from { transform: translateY(0); }
|
|
79
|
+
to { transform: translateY(-20px); }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.bounce .leg {
|
|
83
|
+
animation: squash 0.4s infinite alternate;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes squash {
|
|
87
|
+
from { transform: scaleY(1); }
|
|
88
|
+
to { transform: scaleY(0.7); transform-origin: bottom; }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Spin Animation */
|
|
92
|
+
.spin #claude-pet {
|
|
93
|
+
animation: spin-rotate 0.6s ease-in-out infinite;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@keyframes spin-rotate {
|
|
97
|
+
from { transform: rotate(0deg); }
|
|
98
|
+
to { transform: rotate(360deg); }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Utilities */
|
|
102
|
+
.flip-h {
|
|
103
|
+
transform: scaleX(-1);
|
|
104
|
+
}
|