@hylithiumjs.com/core 1.0.2 → 1.0.4

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/dist/index.d.ts CHANGED
@@ -1,26 +1,5 @@
1
1
  export * from "./types";
2
2
  import type { EventHandler, EventType } from "./types";
3
- /**
4
- * Array of registered event handlers.
5
- * HyLithiumJS reads this array to register handlers with the event system.
6
- */
7
3
  export declare const handlers: EventHandler[];
8
- /**
9
- * Decorator to register a method as an event listener.
10
- *
11
- * @param eventType - The type of event to listen for
12
- * @returns A decorator function
13
- *
14
- * @example
15
- * ```typescript
16
- * class MyPlugin {
17
- * @EventListener("PlayerConnectEvent")
18
- * onPlayerConnect(event: PlayerConnectEvent) {
19
- * const player = event.getPlayer();
20
- * logger.info(`Player ${player.getDisplayName()} connected!`);
21
- * }
22
- * }
23
- * ```
24
- */
25
4
  export declare function EventListener(eventType: EventType): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
26
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,YAAY,EAAO,CAAC;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,IAC7B,QAAQ,OAAO,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,wBAOxF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,YAAY,EAAO,CAAC;AAE3C,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,IAC7B,QAAQ,OAAO,EAAE,aAAa,MAAM,EAAE,YAAY,kBAAkB,wBAOxF"}
package/dist/index.js CHANGED
@@ -1,26 +1,5 @@
1
1
  export * from "./types";
2
- /**
3
- * Array of registered event handlers.
4
- * HyLithiumJS reads this array to register handlers with the event system.
5
- */
6
2
  export const handlers = [];
7
- /**
8
- * Decorator to register a method as an event listener.
9
- *
10
- * @param eventType - The type of event to listen for
11
- * @returns A decorator function
12
- *
13
- * @example
14
- * ```typescript
15
- * class MyPlugin {
16
- * @EventListener("PlayerConnectEvent")
17
- * onPlayerConnect(event: PlayerConnectEvent) {
18
- * const player = event.getPlayer();
19
- * logger.info(`Player ${player.getDisplayName()} connected!`);
20
- * }
21
- * }
22
- * ```
23
- */
24
3
  export function EventListener(eventType) {
25
4
  return function (target, propertyKey, descriptor) {
26
5
  handlers.push({
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
1
  {
2
- "name": "@hylithiumjs.com/core",
3
- "version": "1.0.2",
4
- "private": false,
5
- "description": "TypeScript types and utilities for HyLithiumJS plugins - Lithium Network",
6
- "type": "module",
7
- "main": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "scripts": {
19
- "build": "tsc",
20
- "prepublishOnly": "npm run build"
21
- },
22
- "keywords": [
23
- "hytale",
24
- "hylithiumjs",
25
- "lithium-network",
26
- "typescript",
27
- "types"
28
- ],
29
- "author": "Lithium Network",
30
- "license": "MIT",
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/LithiumNetwork/HyLithiumJS.git",
37
- "directory": "packages/core"
38
- },
39
- "devDependencies": {
40
- "typescript": "^5.7.2"
2
+ "name": "@hylithiumjs.com/core",
3
+ "version": "1.0.4",
4
+ "private": false,
5
+ "description": "TypeScript types and utilities for HyLithiumJS plugins - Lithium Network",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
41
13
  }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "hytale",
24
+ "hylithiumjs",
25
+ "lithium",
26
+ "typescript",
27
+ "types"
28
+ ],
29
+ "author": "Lithium Network",
30
+ "license": "MIT",
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/lithium-network/HyLithiumJS.git",
37
+ "directory": "packages/core"
38
+ },
39
+ "devDependencies": {
40
+ "typescript": "^5.9.3"
41
+ }
42
42
  }