@types/gimloader 1.8.2 → 1.9.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.
- gimloader/README.md +1 -1
- gimloader/index.d.ts +126 -1
- gimloader/package.json +2 -2
gimloader/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for gimloader (https://github.com/Gimload
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gimloader.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 06 Nov 2025 23:33:31 GMT
|
|
12
12
|
* Dependencies: [@dimforge/rapier2d-compat](https://npmjs.com/package/@dimforge/rapier2d-compat), [@types/react](https://npmjs.com/package/@types/react), [@types/react-dom](https://npmjs.com/package/@types/react-dom), [eventemitter2](https://npmjs.com/package/eventemitter2), [phaser](https://npmjs.com/package/phaser)
|
|
13
13
|
|
|
14
14
|
# Credits
|
gimloader/index.d.ts
CHANGED
|
@@ -452,6 +452,8 @@ declare global {
|
|
|
452
452
|
setCanInteractThroughColliders(canInteract: boolean): void;
|
|
453
453
|
setForceDisabled(forceDisabled: boolean): void;
|
|
454
454
|
setInfo(info: any): void;
|
|
455
|
+
remove(zone: CircleShort | Rect): void;
|
|
456
|
+
onInteraction?(): void;
|
|
455
457
|
}
|
|
456
458
|
|
|
457
459
|
interface DeviceInput {
|
|
@@ -515,6 +517,11 @@ declare global {
|
|
|
515
517
|
update(): void;
|
|
516
518
|
}
|
|
517
519
|
|
|
520
|
+
interface SkinSetupOptions extends SkinOptions {
|
|
521
|
+
x?: number;
|
|
522
|
+
y?: number;
|
|
523
|
+
}
|
|
524
|
+
|
|
518
525
|
interface SkinOptions {
|
|
519
526
|
id: string;
|
|
520
527
|
editStyles?: Record<string, string>;
|
|
@@ -527,7 +534,7 @@ declare global {
|
|
|
527
534
|
scene: Scene;
|
|
528
535
|
skinId: string;
|
|
529
536
|
applyEditStyles(options: SkinOptions): void;
|
|
530
|
-
setupSkin(position:
|
|
537
|
+
setupSkin(position: SkinSetupOptions): void;
|
|
531
538
|
updateSkin(options: SkinOptions): void;
|
|
532
539
|
}
|
|
533
540
|
|
|
@@ -1077,6 +1084,8 @@ declare global {
|
|
|
1077
1084
|
device: Device;
|
|
1078
1085
|
scene: Scene;
|
|
1079
1086
|
angle: number;
|
|
1087
|
+
x: number;
|
|
1088
|
+
y: number;
|
|
1080
1089
|
} & Partial<RectShort & CircleShort & Ellipse>;
|
|
1081
1090
|
|
|
1082
1091
|
interface ColliderEntry {
|
|
@@ -2110,6 +2119,118 @@ declare global {
|
|
|
2110
2119
|
}
|
|
2111
2120
|
}
|
|
2112
2121
|
|
|
2122
|
+
type SettingsChangeCallback = (value: any, remote: boolean) => void;
|
|
2123
|
+
|
|
2124
|
+
interface CustomSection {
|
|
2125
|
+
type: "customsection";
|
|
2126
|
+
id: string;
|
|
2127
|
+
default?: any;
|
|
2128
|
+
onChange?: (value: any, remote: boolean) => void;
|
|
2129
|
+
render: (
|
|
2130
|
+
container: HTMLElement,
|
|
2131
|
+
currentValue: any,
|
|
2132
|
+
onChange: (newValue: any) => void,
|
|
2133
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2134
|
+
) => (() => void) | void;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
interface CustomSetting extends BaseSetting<any> {
|
|
2138
|
+
type: "custom";
|
|
2139
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2140
|
+
render: (container: HTMLElement, currentValue: any, update: (newValue: any) => void) => (() => void) | void;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
interface ColorSetting extends BaseSetting<string> {
|
|
2144
|
+
type: "color";
|
|
2145
|
+
rgba?: boolean;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
interface RadioSetting extends BaseSetting<string> {
|
|
2149
|
+
type: "radio";
|
|
2150
|
+
options: {
|
|
2151
|
+
label: string;
|
|
2152
|
+
value: string;
|
|
2153
|
+
}[];
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
interface SliderSetting extends BaseSetting<number> {
|
|
2157
|
+
type: "slider";
|
|
2158
|
+
min: number;
|
|
2159
|
+
max: number;
|
|
2160
|
+
step?: number;
|
|
2161
|
+
ticks?: number[];
|
|
2162
|
+
formatter?: (value: number) => string;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
interface TextSetting extends BaseSetting<string> {
|
|
2166
|
+
type: "text";
|
|
2167
|
+
placeholder?: string;
|
|
2168
|
+
maxLength?: number;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
interface ToggleSetting extends BaseSetting<boolean> {
|
|
2172
|
+
type: "toggle";
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
interface NumberSetting extends BaseSetting<number> {
|
|
2176
|
+
type: "number";
|
|
2177
|
+
min?: number;
|
|
2178
|
+
max?: number;
|
|
2179
|
+
step?: number;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
interface MultiselectSetting extends BaseSetting<string[]> {
|
|
2183
|
+
type: "multiselect";
|
|
2184
|
+
options: {
|
|
2185
|
+
label: string;
|
|
2186
|
+
value: string;
|
|
2187
|
+
}[];
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
interface BaseSetting<T> {
|
|
2191
|
+
id: string;
|
|
2192
|
+
default?: T;
|
|
2193
|
+
title: string;
|
|
2194
|
+
description?: string;
|
|
2195
|
+
onChange?: (value: T, remote: boolean) => void;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
interface DropdownSetting extends BaseSetting<string> {
|
|
2199
|
+
type: "dropdown";
|
|
2200
|
+
options: {
|
|
2201
|
+
label: string;
|
|
2202
|
+
value: string;
|
|
2203
|
+
}[];
|
|
2204
|
+
allowNone?: boolean;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
type PluginSetting =
|
|
2208
|
+
| DropdownSetting
|
|
2209
|
+
| MultiselectSetting
|
|
2210
|
+
| NumberSetting
|
|
2211
|
+
| ToggleSetting
|
|
2212
|
+
| TextSetting
|
|
2213
|
+
| SliderSetting
|
|
2214
|
+
| RadioSetting
|
|
2215
|
+
| ColorSetting
|
|
2216
|
+
| CustomSetting
|
|
2217
|
+
| CustomSection;
|
|
2218
|
+
|
|
2219
|
+
interface SettingGroup {
|
|
2220
|
+
type: "group";
|
|
2221
|
+
title: string;
|
|
2222
|
+
settings: PluginSetting[];
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
type PluginSettingsDescription = (PluginSetting | SettingGroup)[];
|
|
2226
|
+
|
|
2227
|
+
interface SettingsMethods {
|
|
2228
|
+
create: (description: PluginSettingsDescription) => void;
|
|
2229
|
+
listen: (key: string, callback: SettingsChangeCallback) => () => void;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
type PluginSettings = SettingsMethods & Record<string, any>;
|
|
2233
|
+
|
|
2113
2234
|
class PluginsApi {
|
|
2114
2235
|
/** A list of all the plugins installed */
|
|
2115
2236
|
get list(): string[];
|
|
@@ -2128,6 +2249,7 @@ declare global {
|
|
|
2128
2249
|
needsLib: string[];
|
|
2129
2250
|
optionalLib: string[];
|
|
2130
2251
|
syncEval: string;
|
|
2252
|
+
deprecated: string | null;
|
|
2131
2253
|
gamemode: string[];
|
|
2132
2254
|
hasSettings: string;
|
|
2133
2255
|
};
|
|
@@ -2160,6 +2282,7 @@ declare global {
|
|
|
2160
2282
|
needsLib: string[];
|
|
2161
2283
|
optionalLib: string[];
|
|
2162
2284
|
syncEval: string;
|
|
2285
|
+
deprecated: string | null;
|
|
2163
2286
|
gamemode: string[];
|
|
2164
2287
|
hasSettings: string;
|
|
2165
2288
|
};
|
|
@@ -2653,6 +2776,8 @@ declare global {
|
|
|
2653
2776
|
storage: Readonly<ScopedStorageApi>;
|
|
2654
2777
|
/** Functions for intercepting the arguments and return values of functions */
|
|
2655
2778
|
patcher: Readonly<ScopedPatcherApi>;
|
|
2779
|
+
/** A utility for creating persistent settings menus, only available to plugins */
|
|
2780
|
+
settings: PluginSettings;
|
|
2656
2781
|
/** Methods for getting info on libraries */
|
|
2657
2782
|
libs: Readonly<LibsApi>;
|
|
2658
2783
|
/** Gets the exported values of a library */
|
gimloader/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/gimloader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "TypeScript definitions for gimloader",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/gimloader",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
"eventemitter2": "~6.4.9"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {},
|
|
35
|
-
"typesPublisherContentHash": "
|
|
35
|
+
"typesPublisherContentHash": "17bb3b6f1003e40d46d5e9d210551fa4ac23d991e3e8f1533f549fe4434d08fe",
|
|
36
36
|
"typeScriptVersion": "5.2"
|
|
37
37
|
}
|