neko-vue 0.1.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/CHANGELOG.md +17 -0
- package/LICENSE +27 -0
- package/README.md +526 -0
- package/dist/NekoPet-B9k9Bf1o.d.mts +262 -0
- package/dist/NekoPet-DMPjoHm0.mjs +402 -0
- package/dist/index-BjAaI8iZ.d.mts +128 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.mjs +5 -0
- package/dist/loadNekoRuntime-CskWI70T.mjs +41 -0
- package/dist/loadNekoRuntime-DLd1lr8Y.d.mts +11 -0
- package/dist/nekoPlacement-DUdnhZoX.mjs +76 -0
- package/dist/nekoPlacement-fXmlU6ys.d.mts +23 -0
- package/dist/nekojsRuntime-DJI-YkCi.mjs +616 -0
- package/dist/placement.d.mts +2 -0
- package/dist/placement.mjs +2 -0
- package/dist/runtime.d.mts +2 -0
- package/dist/runtime.mjs +2 -0
- package/dist/types-Ctrldouo.mjs +50 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +2 -0
- package/dist/vue.d.mts +2 -0
- package/dist/vue.mjs +2 -0
- package/package.json +98 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/types/index.ts
|
|
2
|
+
/** Sprite edge length in CSS pixels for viewport bounds (`clientWidth/innerHeight - this`). */
|
|
3
|
+
const NEKOJS_SPRITE_SIZE = 32;
|
|
4
|
+
/**
|
|
5
|
+
* Pet behavior / AI mode. Values match the engine; click cycles when `allowBehaviorChange` is true.
|
|
6
|
+
*/
|
|
7
|
+
let BehaviorMode = /* @__PURE__ */ function(BehaviorMode) {
|
|
8
|
+
/** Follow the pointer. */
|
|
9
|
+
BehaviorMode[BehaviorMode["ChaseMouse"] = 0] = "ChaseMouse";
|
|
10
|
+
/** Flee from the pointer. */
|
|
11
|
+
BehaviorMode[BehaviorMode["RunAwayFromMouse"] = 1] = "RunAwayFromMouse";
|
|
12
|
+
/** Wander randomly. */
|
|
13
|
+
BehaviorMode[BehaviorMode["RunAroundRandomly"] = 2] = "RunAroundRandomly";
|
|
14
|
+
/** Walk the screen edges. */
|
|
15
|
+
BehaviorMode[BehaviorMode["PaceAroundScreen"] = 3] = "PaceAroundScreen";
|
|
16
|
+
/** Ball-style chase (engine: run-around mode). */
|
|
17
|
+
BehaviorMode[BehaviorMode["BallChase"] = 4] = "BallChase";
|
|
18
|
+
/** Hold the current position (no wandering). */
|
|
19
|
+
BehaviorMode[BehaviorMode["StayStill"] = 5] = "StayStill";
|
|
20
|
+
/**
|
|
21
|
+
* Walk back to the spawn position from `createNeko` options, then stay there until the next mode.
|
|
22
|
+
* Last step when clicking through the behavior cycle.
|
|
23
|
+
*/
|
|
24
|
+
BehaviorMode[BehaviorMode["ReturnHomeAndStay"] = 6] = "ReturnHomeAndStay";
|
|
25
|
+
return BehaviorMode;
|
|
26
|
+
}({});
|
|
27
|
+
/** Short camelCase aliases — same values as {@link BehaviorMode}. */
|
|
28
|
+
const BehaviorModes = {
|
|
29
|
+
chase: BehaviorMode.ChaseMouse,
|
|
30
|
+
runAway: BehaviorMode.RunAwayFromMouse,
|
|
31
|
+
random: BehaviorMode.RunAroundRandomly,
|
|
32
|
+
pace: BehaviorMode.PaceAroundScreen,
|
|
33
|
+
ballChase: BehaviorMode.BallChase,
|
|
34
|
+
stayStill: BehaviorMode.StayStill,
|
|
35
|
+
returnHome: BehaviorMode.ReturnHomeAndStay
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Default pet-click order when {@link NekoOptions.behaviorCycle} is omitted (full classic cycle).
|
|
39
|
+
*/
|
|
40
|
+
const DEFAULT_NEKO_BEHAVIOR_CYCLE = [
|
|
41
|
+
BehaviorMode.ChaseMouse,
|
|
42
|
+
BehaviorMode.RunAwayFromMouse,
|
|
43
|
+
BehaviorMode.RunAroundRandomly,
|
|
44
|
+
BehaviorMode.PaceAroundScreen,
|
|
45
|
+
BehaviorMode.BallChase,
|
|
46
|
+
BehaviorMode.StayStill,
|
|
47
|
+
BehaviorMode.ReturnHomeAndStay
|
|
48
|
+
];
|
|
49
|
+
//#endregion
|
|
50
|
+
export { NEKOJS_SPRITE_SIZE as i, BehaviorModes as n, DEFAULT_NEKO_BEHAVIOR_CYCLE as r, BehaviorMode as t };
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as LoadNekoRuntimeOptions, c as NekoOptions, i as DEFAULT_NEKO_BEHAVIOR_CYCLE, n as BehaviorModes, o as NEKOJS_SPRITE_SIZE, r as CreateNekoFn, s as NekoInstance, t as BehaviorMode } from "./index-BjAaI8iZ.mjs";
|
|
2
|
+
export { BehaviorMode, BehaviorModes, type CreateNekoFn, DEFAULT_NEKO_BEHAVIOR_CYCLE, type LoadNekoRuntimeOptions, NEKOJS_SPRITE_SIZE, type NekoInstance, type NekoOptions };
|
package/dist/types.mjs
ADDED
package/dist/vue.d.mts
ADDED
package/dist/vue.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "neko-vue",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Vue 3 desktop pet — typed runtime, composable, and NekoPet component.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"composable",
|
|
7
|
+
"desktop-pet",
|
|
8
|
+
"neko",
|
|
9
|
+
"neko-vue",
|
|
10
|
+
"nekojs",
|
|
11
|
+
"vue",
|
|
12
|
+
"vue3"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/AscaL/neko-vue#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/AscaL/neko-vue/issues"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "AscaL (https://github.com/AscaL)",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/AscaL/neko-vue.git"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"CHANGELOG.md"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"types": "./dist/index.d.mts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.mts",
|
|
34
|
+
"import": "./dist/index.mjs",
|
|
35
|
+
"default": "./dist/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./types": {
|
|
38
|
+
"types": "./dist/types.d.mts",
|
|
39
|
+
"import": "./dist/types.mjs",
|
|
40
|
+
"default": "./dist/types.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./placement": {
|
|
43
|
+
"types": "./dist/placement.d.mts",
|
|
44
|
+
"import": "./dist/placement.mjs",
|
|
45
|
+
"default": "./dist/placement.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./runtime": {
|
|
48
|
+
"types": "./dist/runtime.d.mts",
|
|
49
|
+
"import": "./dist/runtime.mjs",
|
|
50
|
+
"default": "./dist/runtime.mjs"
|
|
51
|
+
},
|
|
52
|
+
"./vue": {
|
|
53
|
+
"types": "./dist/vue.d.mts",
|
|
54
|
+
"import": "./dist/vue.mjs",
|
|
55
|
+
"default": "./dist/vue.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./package.json": "./package.json"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "vp pack",
|
|
64
|
+
"dev": "vp pack --watch",
|
|
65
|
+
"playground:dev": "bun run --cwd playground dev",
|
|
66
|
+
"test": "vp test",
|
|
67
|
+
"check": "vp check src tests vite.config.ts",
|
|
68
|
+
"check:playground": "vp check playground/src playground/vite.config.ts",
|
|
69
|
+
"check:all": "vp check src tests vite.config.ts && vp check playground/src playground/vite.config.ts",
|
|
70
|
+
"prepublishOnly": "vp run build"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"@types/node": "^25.5.2",
|
|
74
|
+
"@typescript/native-preview": "7.0.0-dev.20260404.1",
|
|
75
|
+
"@vue/test-utils": "^2.4.6",
|
|
76
|
+
"bumpp": "^11.0.1",
|
|
77
|
+
"happy-dom": "^20.8.9",
|
|
78
|
+
"typescript": "^6.0.2",
|
|
79
|
+
"vite-plus": "^0.1.15",
|
|
80
|
+
"vue": "^3.5.32"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"vue": "^3.4.0 || ^3.5.0"
|
|
84
|
+
},
|
|
85
|
+
"peerDependenciesMeta": {
|
|
86
|
+
"vue": {
|
|
87
|
+
"optional": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"overrides": {
|
|
91
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
92
|
+
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
|
|
93
|
+
},
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">=24.0.0"
|
|
96
|
+
},
|
|
97
|
+
"packageManager": "bun@1.3.11"
|
|
98
|
+
}
|