dev-kitty 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/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # 🐱 dev-kitty: Your Dev Buddy Cat
2
+
3
+ **Meet dev-kitty — a tiny pixel cat that lives on your screen while you code!**
4
+
5
+ It’s playful, funny, and unpredictable: it walks, sleeps, plays with a ball, hides, stretches… and yes, sometimes even poops 💩.
6
+
7
+ Your dev environment just got a lot more fun 😸
8
+
9
+ ---
10
+
11
+ ## 🚀 How to Use
12
+
13
+ ### For Vite (Zero Config)
14
+
15
+ ```ts
16
+ // vite.config.ts
17
+ import { devKittyPlugin } from 'dev-kitty';
18
+
19
+ export default {
20
+ plugins: [devKittyPlugin()]
21
+ }
22
+ ```
23
+
24
+ ### For Other Projects
25
+
26
+ ```js
27
+ import 'dev-kitty';
28
+ ```
29
+
30
+ ---
31
+
32
+ ## ✨ Fun Features
33
+
34
+ * 🐾 Walks around and explores
35
+ * 😴 Takes naps with cute breathing animation
36
+ * 🎾 Plays with a little yarn ball
37
+ * 🫣 Hides and comes back from edges
38
+ * 😈 Sometimes poops (don’t judge)
39
+ * 👣 Leaves tiny fading footprints
40
+ * 🎨 Smooth, buttery animations
41
+
42
+ ---
43
+
44
+ ## 🔒 Safe
45
+
46
+ * Only works on `localhost` or `.local`
47
+ * Never runs in production
48
+ * Doesn’t block clicks or inputs
49
+
50
+ ---
51
+
52
+ ## 📦 Install
53
+
54
+ ```bash
55
+ npm install -D dev-kitty
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 💖 Made with ❤️ by aswintt
61
+
62
+ Bring a smile to your dev day — because coding should be fun!
@@ -0,0 +1,60 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ declare function devKittyPlugin(): Plugin;
4
+
5
+ declare const inject: () => void;
6
+ declare const destroy: () => void;
7
+
8
+ declare abstract class BasePet {
9
+ protected container: HTMLElement | null;
10
+ protected element: HTMLElement | null;
11
+ protected x: number;
12
+ protected y: number;
13
+ protected state: string;
14
+ abstract mount(container: HTMLElement): void;
15
+ abstract update(delta: number): void;
16
+ abstract destroy(): void;
17
+ protected setPosition(x: number, y: number): void;
18
+ }
19
+
20
+ declare class Kitty extends BasePet {
21
+ private sprite;
22
+ private ai;
23
+ private physics;
24
+ private ball;
25
+ private footsteps;
26
+ private lastTime;
27
+ private poops;
28
+ private lastStepX;
29
+ private stepDistance;
30
+ constructor();
31
+ mount(container: HTMLElement): void;
32
+ private handleResize;
33
+ private spawnBall;
34
+ update(delta: number): void;
35
+ private onStateChange;
36
+ private handleScaredJump;
37
+ private laserActive;
38
+ private laserEl;
39
+ private setupLaserPointer;
40
+ private showLaser;
41
+ private hideLaser;
42
+ private tick;
43
+ destroy(): void;
44
+ }
45
+
46
+ declare class Overlay {
47
+ private container;
48
+ private shadow;
49
+ shadowContainer: HTMLDivElement;
50
+ constructor();
51
+ mount(): void;
52
+ destroy(): void;
53
+ }
54
+
55
+ declare const _default: {
56
+ init: () => void;
57
+ plugin: typeof devKittyPlugin;
58
+ };
59
+
60
+ export { Kitty, Overlay, _default as default, destroy, devKittyPlugin, inject };
@@ -0,0 +1,60 @@
1
+ import { Plugin } from 'vite';
2
+
3
+ declare function devKittyPlugin(): Plugin;
4
+
5
+ declare const inject: () => void;
6
+ declare const destroy: () => void;
7
+
8
+ declare abstract class BasePet {
9
+ protected container: HTMLElement | null;
10
+ protected element: HTMLElement | null;
11
+ protected x: number;
12
+ protected y: number;
13
+ protected state: string;
14
+ abstract mount(container: HTMLElement): void;
15
+ abstract update(delta: number): void;
16
+ abstract destroy(): void;
17
+ protected setPosition(x: number, y: number): void;
18
+ }
19
+
20
+ declare class Kitty extends BasePet {
21
+ private sprite;
22
+ private ai;
23
+ private physics;
24
+ private ball;
25
+ private footsteps;
26
+ private lastTime;
27
+ private poops;
28
+ private lastStepX;
29
+ private stepDistance;
30
+ constructor();
31
+ mount(container: HTMLElement): void;
32
+ private handleResize;
33
+ private spawnBall;
34
+ update(delta: number): void;
35
+ private onStateChange;
36
+ private handleScaredJump;
37
+ private laserActive;
38
+ private laserEl;
39
+ private setupLaserPointer;
40
+ private showLaser;
41
+ private hideLaser;
42
+ private tick;
43
+ destroy(): void;
44
+ }
45
+
46
+ declare class Overlay {
47
+ private container;
48
+ private shadow;
49
+ shadowContainer: HTMLDivElement;
50
+ constructor();
51
+ mount(): void;
52
+ destroy(): void;
53
+ }
54
+
55
+ declare const _default: {
56
+ init: () => void;
57
+ plugin: typeof devKittyPlugin;
58
+ };
59
+
60
+ export { Kitty, Overlay, _default as default, destroy, devKittyPlugin, inject };