@wwawing/common-interface 4.0.0 → 4.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 1996-2025 NAO
4
- Copyright (c) 2015-2025 WWA Wing Team
3
+ Copyright (c) 1996-2026 NAO
4
+ Copyright (c) 2015-2026 WWA Wing Team
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the "Software"), to deal
package/lib/wwa_data.d.ts CHANGED
@@ -1,9 +1,26 @@
1
- import type { Key } from "./wwa_system_message";
1
+ import { Key } from "./wwa_system_message";
2
+ import { PictureProperties } from "./wwa_picture";
3
+ export type UserVarPrimitive = number | string | boolean;
4
+ export type UserVar = UserVarPrimitive | Array<UserVar> | UserVarMap;
5
+ export type UserVarMap = Map<string, UserVar>;
2
6
  export interface Coord {
3
7
  x: number;
4
8
  y: number;
5
9
  }
6
10
  export type GameOverPolicy = "default" | "never" | "except-macro";
11
+ type PictureRegistryBase<N> = {
12
+ layerNumber: number;
13
+ imgPosX: number;
14
+ imgPosY: number;
15
+ imgPosX2: number;
16
+ imgPosY2: number;
17
+ triggerPartsX: number;
18
+ triggerPartsY: number;
19
+ soundNumber: number;
20
+ properties: PictureProperties<N>;
21
+ };
22
+ export type PictureRegistry = PictureRegistryBase<number>;
23
+ export type RawPictureRegistry = PictureRegistryBase<number | string>;
7
24
  export interface WWAData {
8
25
  version: number;
9
26
  gameoverX: number;
@@ -84,8 +101,8 @@ export interface WWAData {
84
101
  isItemEffectEnabled: boolean;
85
102
  frameCount: number;
86
103
  gamePadButtonItemTable: number[];
87
- userVar: (string | number | boolean)[];
88
- userNamedVar: [string, string | number | boolean][];
104
+ userVar: UserVarPrimitive[];
105
+ userNamedVar: UserVarMap;
89
106
  permitChangeGameSpeed: boolean;
90
107
  gameSpeedIndex: number;
91
108
  playTime: number;
@@ -97,4 +114,6 @@ export interface WWAData {
97
114
  gameOverPolicy: GameOverPolicy;
98
115
  bgmDelayDurationMs: number;
99
116
  customSystemMessages: Partial<Record<Key, string>>;
117
+ pictureRegistry: PictureRegistry[];
100
118
  }
119
+ export {};
@@ -0,0 +1,39 @@
1
+ export interface PictureProperties<N = number> {
2
+ pos?: [N, N];
3
+ time?: N | [N] | [N, N];
4
+ timeFrame?: N | [N] | [N, N];
5
+ size?: [N, N];
6
+ animTime?: [N, N];
7
+ animTimeFrame?: [N, N];
8
+ move?: [N, N];
9
+ accel?: [N, N];
10
+ zoom?: [N, N];
11
+ zoomAccel?: [N, N];
12
+ anchor?: N;
13
+ circle?: [N] | [N, N] | [N, N, N] | [N, N, N, N];
14
+ repeat?: [N, N];
15
+ img?: ([N, N] | [N, N, N, N]);
16
+ imgFile?: string;
17
+ imgMap?: [N, N] | [N, N, N];
18
+ sound?: N;
19
+ crop?: [N, N];
20
+ text?: string;
21
+ font?: string;
22
+ fontSize?: number;
23
+ fontFamily?: string;
24
+ italic?: number;
25
+ bold?: number;
26
+ color?: [N, N, N];
27
+ textAlign?: "center" | "end" | "left" | "right" | "start";
28
+ lineHeight?: N;
29
+ opacity?: N;
30
+ fade?: N;
31
+ angle?: N;
32
+ rotate?: N;
33
+ wait?: N;
34
+ waitFrame?: N;
35
+ next?: [N] | [N, N] | [N, N, N];
36
+ create?: ([N] | [N, N] | [N, N, N] | [N, N, N, N])[];
37
+ map?: [N, N, N] | [N, N, N, N];
38
+ script?: string;
39
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/common-interface",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "main": "lib/index.js",
@@ -14,6 +14,7 @@
14
14
  ],
15
15
  "scripts": {
16
16
  "test": "echo \"Error: no test specified\" && exit 1",
17
+ "type-check": "tsc -p . --watch --noEmit",
17
18
  "build": "tsc -p ."
18
19
  },
19
20
  "author": "WWA Wing Team",
@@ -25,8 +26,8 @@
25
26
  "access": "public"
26
27
  },
27
28
  "engines": {
28
- "node": ">=22",
29
+ "node": ">=24",
29
30
  "npm": ">=11"
30
31
  },
31
- "gitHead": "dd1d570673a896c26cc299f68033abcc3e867e21"
32
+ "gitHead": "86e576667cba53fbd81af94aea4a5efb58c2e0c6"
32
33
  }