@types/gimloader 1.9.1 → 1.10.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 +174 -68
- 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: Mon, 15 Dec 2025 19:03:39 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
|
@@ -421,7 +421,7 @@ declare global {
|
|
|
421
421
|
onChange(value: RotatedRect): void;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
interface
|
|
424
|
+
interface DeviceVisualEditing {
|
|
425
425
|
add: {
|
|
426
426
|
box(options: VisualEditingBox): void;
|
|
427
427
|
circle(options: VisualEditingCircle): void;
|
|
@@ -969,7 +969,8 @@ declare global {
|
|
|
969
969
|
}
|
|
970
970
|
|
|
971
971
|
interface Jump {
|
|
972
|
-
|
|
972
|
+
/** Optional in top-down, required in platformer */
|
|
973
|
+
actuallyJumped?: boolean;
|
|
973
974
|
isJumping: boolean;
|
|
974
975
|
jumpCounter: number;
|
|
975
976
|
jumpTicks: number;
|
|
@@ -1150,7 +1151,7 @@ declare global {
|
|
|
1150
1151
|
id: string;
|
|
1151
1152
|
scene: Scene;
|
|
1152
1153
|
deviceOption: DeviceOption;
|
|
1153
|
-
visualEditing:
|
|
1154
|
+
visualEditing: DeviceVisualEditing;
|
|
1154
1155
|
shadows: Shadows;
|
|
1155
1156
|
input: DeviceInput;
|
|
1156
1157
|
parts: any;
|
|
@@ -1276,7 +1277,7 @@ declare global {
|
|
|
1276
1277
|
}
|
|
1277
1278
|
|
|
1278
1279
|
interface Keyboard {
|
|
1279
|
-
heldKeys: Set<
|
|
1280
|
+
heldKeys: Set<number>;
|
|
1280
1281
|
scene: Scene;
|
|
1281
1282
|
state: KeyboardState;
|
|
1282
1283
|
createListeners(): void;
|
|
@@ -1391,7 +1392,10 @@ declare global {
|
|
|
1391
1392
|
}
|
|
1392
1393
|
|
|
1393
1394
|
interface EditingStore {
|
|
1394
|
-
accessPoints: Map<
|
|
1395
|
+
accessPoints: Map<string, {
|
|
1396
|
+
name: string;
|
|
1397
|
+
position: Vector;
|
|
1398
|
+
}>;
|
|
1395
1399
|
gridSnap: number;
|
|
1396
1400
|
showMemoryBarAtAllTimes: boolean;
|
|
1397
1401
|
}
|
|
@@ -1638,7 +1642,7 @@ declare global {
|
|
|
1638
1642
|
id: string;
|
|
1639
1643
|
position: string;
|
|
1640
1644
|
text: string;
|
|
1641
|
-
trackedItemId:
|
|
1645
|
+
trackedItemId: string | null;
|
|
1642
1646
|
showTrackedItemMaximumAmount: boolean;
|
|
1643
1647
|
type: string;
|
|
1644
1648
|
priority: number;
|
|
@@ -1687,13 +1691,38 @@ declare global {
|
|
|
1687
1691
|
removing: boolean;
|
|
1688
1692
|
}
|
|
1689
1693
|
|
|
1694
|
+
interface Widget {
|
|
1695
|
+
type: string;
|
|
1696
|
+
id: string;
|
|
1697
|
+
y: number;
|
|
1698
|
+
placement: string;
|
|
1699
|
+
statName: string;
|
|
1700
|
+
statValue: number;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
interface CallToActionItem {
|
|
1704
|
+
id: string;
|
|
1705
|
+
category: string;
|
|
1706
|
+
name: string;
|
|
1707
|
+
url: string;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
interface CallToActionCategory {
|
|
1711
|
+
id: string;
|
|
1712
|
+
name: string;
|
|
1713
|
+
plural: string;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1690
1716
|
interface GameSession {
|
|
1691
|
-
callToAction:
|
|
1717
|
+
callToAction: {
|
|
1718
|
+
categories: CallToActionCategory[];
|
|
1719
|
+
items: CallToActionItem[];
|
|
1720
|
+
};
|
|
1692
1721
|
countdownEnd: number;
|
|
1693
1722
|
phase: string;
|
|
1694
1723
|
resultsEnd: number;
|
|
1695
1724
|
widgets: {
|
|
1696
|
-
widgets:
|
|
1725
|
+
widgets: Widget[];
|
|
1697
1726
|
};
|
|
1698
1727
|
}
|
|
1699
1728
|
|
|
@@ -1847,6 +1876,26 @@ declare global {
|
|
|
1847
1876
|
topDownControlsActive: boolean;
|
|
1848
1877
|
}
|
|
1849
1878
|
|
|
1879
|
+
interface VisualEditing {
|
|
1880
|
+
active: boolean;
|
|
1881
|
+
cursor: string;
|
|
1882
|
+
id: string;
|
|
1883
|
+
instruction: string;
|
|
1884
|
+
keyboardHelpers: {
|
|
1885
|
+
trigger: string;
|
|
1886
|
+
action: string;
|
|
1887
|
+
}[];
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
interface SortingState {
|
|
1891
|
+
depth: number;
|
|
1892
|
+
deviceId: string;
|
|
1893
|
+
deviceName: string;
|
|
1894
|
+
globalDepth: number;
|
|
1895
|
+
layer: string;
|
|
1896
|
+
y: number;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1850
1899
|
interface CurrentlyEditedDevice {
|
|
1851
1900
|
deviceOptionId: string;
|
|
1852
1901
|
id: string;
|
|
@@ -1857,9 +1906,9 @@ declare global {
|
|
|
1857
1906
|
currentlyEditedGridId: string;
|
|
1858
1907
|
currentlySortedDeviceId: string;
|
|
1859
1908
|
screen: string;
|
|
1860
|
-
sortingState:
|
|
1909
|
+
sortingState: SortingState[];
|
|
1861
1910
|
usingMultiselect: boolean;
|
|
1862
|
-
visualEditing:
|
|
1911
|
+
visualEditing: VisualEditing;
|
|
1863
1912
|
}
|
|
1864
1913
|
|
|
1865
1914
|
interface Editing {
|
|
@@ -1873,7 +1922,7 @@ declare global {
|
|
|
1873
1922
|
interface MeDeviceUI {
|
|
1874
1923
|
current: {
|
|
1875
1924
|
deviceId: string;
|
|
1876
|
-
props: any
|
|
1925
|
+
props: Record<string, any>;
|
|
1877
1926
|
};
|
|
1878
1927
|
desiredOpenDeviceId?: string;
|
|
1879
1928
|
serverVersionOpenDeviceId: string;
|
|
@@ -2026,6 +2075,11 @@ declare global {
|
|
|
2026
2075
|
items: Map<string, CodeGridItem>;
|
|
2027
2076
|
}
|
|
2028
2077
|
|
|
2078
|
+
interface WireConnection {
|
|
2079
|
+
id: string;
|
|
2080
|
+
name: string;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2029
2083
|
interface CodeGridSchema {
|
|
2030
2084
|
allowChannelGrids: boolean;
|
|
2031
2085
|
customBlocks: any[];
|
|
@@ -2034,12 +2088,28 @@ declare global {
|
|
|
2034
2088
|
|
|
2035
2089
|
interface DeviceOption {
|
|
2036
2090
|
codeGridSchema: CodeGridSchema;
|
|
2037
|
-
defaultState: any
|
|
2091
|
+
defaultState: Record<string, any>;
|
|
2092
|
+
description?: string;
|
|
2038
2093
|
id: string;
|
|
2094
|
+
initialMemoryCost?: number;
|
|
2095
|
+
maxOnMap?: number;
|
|
2096
|
+
maximumRoleLevel?: number;
|
|
2097
|
+
minimumRoleLevel?: number;
|
|
2098
|
+
name?: string;
|
|
2039
2099
|
optionSchema: {
|
|
2040
2100
|
options: any[];
|
|
2041
2101
|
};
|
|
2042
|
-
|
|
2102
|
+
seasonTicketRequired?: boolean;
|
|
2103
|
+
subsequentMemoryCost?: number;
|
|
2104
|
+
supportedMapStyles?: string[];
|
|
2105
|
+
wireConfig: {
|
|
2106
|
+
in: {
|
|
2107
|
+
connections: WireConnection[];
|
|
2108
|
+
};
|
|
2109
|
+
out: {
|
|
2110
|
+
connections: WireConnection[];
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2043
2113
|
}
|
|
2044
2114
|
|
|
2045
2115
|
interface DeviceData {
|
|
@@ -2121,23 +2191,19 @@ declare global {
|
|
|
2121
2191
|
|
|
2122
2192
|
type SettingsChangeCallback = (value: any, remote: boolean) => void;
|
|
2123
2193
|
|
|
2124
|
-
interface CustomSection {
|
|
2194
|
+
interface CustomSection<T = any> {
|
|
2125
2195
|
type: "customsection";
|
|
2126
2196
|
id: string;
|
|
2127
|
-
default?:
|
|
2128
|
-
onChange?: (value:
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
currentValue: any,
|
|
2132
|
-
onChange: (newValue: any) => void,
|
|
2133
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2134
|
-
) => (() => void) | void;
|
|
2197
|
+
default?: T;
|
|
2198
|
+
onChange?: (value: T, remote: boolean) => void;
|
|
2199
|
+
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2200
|
+
render: (container: HTMLElement, currentValue: T, onChange: (newValue: T) => void) => (() => void) | void;
|
|
2135
2201
|
}
|
|
2136
2202
|
|
|
2137
|
-
interface CustomSetting extends BaseSetting<
|
|
2203
|
+
interface CustomSetting<T = any> extends BaseSetting<T> {
|
|
2138
2204
|
type: "custom";
|
|
2139
2205
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
2140
|
-
render: (container: HTMLElement, currentValue:
|
|
2206
|
+
render: (container: HTMLElement, currentValue: T, update: (newValue: T) => void) => (() => void) | void;
|
|
2141
2207
|
}
|
|
2142
2208
|
|
|
2143
2209
|
interface ColorSetting extends BaseSetting<string> {
|
|
@@ -2226,7 +2292,7 @@ declare global {
|
|
|
2226
2292
|
|
|
2227
2293
|
interface SettingsMethods {
|
|
2228
2294
|
create: (description: PluginSettingsDescription) => void;
|
|
2229
|
-
listen: (key: string, callback: SettingsChangeCallback) => () => void;
|
|
2295
|
+
listen: (key: string, callback: SettingsChangeCallback, immediate?: boolean) => () => void;
|
|
2230
2296
|
}
|
|
2231
2297
|
|
|
2232
2298
|
type PluginSettings = SettingsMethods & Record<string, any>;
|
|
@@ -2237,22 +2303,7 @@ declare global {
|
|
|
2237
2303
|
/** Whether a plugin exists and is enabled */
|
|
2238
2304
|
isEnabled(name: string): boolean;
|
|
2239
2305
|
/** Gets the headers of a plugin, such as version, author, and description */
|
|
2240
|
-
getHeaders(name: string):
|
|
2241
|
-
name: string;
|
|
2242
|
-
description: string;
|
|
2243
|
-
author: string;
|
|
2244
|
-
version: string | null;
|
|
2245
|
-
reloadRequired: string;
|
|
2246
|
-
isLibrary: string;
|
|
2247
|
-
downloadUrl: string | null;
|
|
2248
|
-
webpage: string | null;
|
|
2249
|
-
needsLib: string[];
|
|
2250
|
-
optionalLib: string[];
|
|
2251
|
-
deprecated: string | null;
|
|
2252
|
-
gamemode: string[];
|
|
2253
|
-
changelog: string[];
|
|
2254
|
-
hasSettings: string;
|
|
2255
|
-
};
|
|
2306
|
+
getHeaders(name: string): ScriptHeaders;
|
|
2256
2307
|
/** Gets the exported values of a plugin, if it has been enabled */
|
|
2257
2308
|
get(name: string): any;
|
|
2258
2309
|
/**
|
|
@@ -2264,32 +2315,85 @@ declare global {
|
|
|
2264
2315
|
};
|
|
2265
2316
|
}
|
|
2266
2317
|
|
|
2318
|
+
interface ScriptHeaders {
|
|
2319
|
+
name: string;
|
|
2320
|
+
description: string;
|
|
2321
|
+
author: string;
|
|
2322
|
+
version: string | null;
|
|
2323
|
+
reloadRequired: string;
|
|
2324
|
+
isLibrary: string;
|
|
2325
|
+
downloadUrl: string | null;
|
|
2326
|
+
webpage: string | null;
|
|
2327
|
+
needsLib: string[];
|
|
2328
|
+
optionalLib: string[];
|
|
2329
|
+
deprecated: string | null;
|
|
2330
|
+
gamemode: string[];
|
|
2331
|
+
changelog: string[];
|
|
2332
|
+
/** Only available for plugins */
|
|
2333
|
+
needsPlugin: string[];
|
|
2334
|
+
hasSettings: string;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2267
2337
|
class LibsApi {
|
|
2268
2338
|
/** A list of all the libraries installed */
|
|
2269
2339
|
get list(): string[];
|
|
2270
2340
|
/** Gets whether or not a plugin is installed and enabled */
|
|
2271
2341
|
isEnabled(name: string): boolean;
|
|
2272
2342
|
/** Gets the headers of a library, such as version, author, and description */
|
|
2273
|
-
getHeaders(name: string):
|
|
2274
|
-
name: string;
|
|
2275
|
-
description: string;
|
|
2276
|
-
author: string;
|
|
2277
|
-
version: string | null;
|
|
2278
|
-
reloadRequired: string;
|
|
2279
|
-
isLibrary: string;
|
|
2280
|
-
downloadUrl: string | null;
|
|
2281
|
-
webpage: string | null;
|
|
2282
|
-
needsLib: string[];
|
|
2283
|
-
optionalLib: string[];
|
|
2284
|
-
deprecated: string | null;
|
|
2285
|
-
gamemode: string[];
|
|
2286
|
-
changelog: string[];
|
|
2287
|
-
hasSettings: string;
|
|
2288
|
-
};
|
|
2343
|
+
getHeaders(name: string): ScriptHeaders;
|
|
2289
2344
|
/** Gets the exported values of a library */
|
|
2290
2345
|
get(name: string): any;
|
|
2291
2346
|
}
|
|
2292
2347
|
|
|
2348
|
+
class ScopedCommandsApi {
|
|
2349
|
+
private readonly id;
|
|
2350
|
+
constructor(id: string);
|
|
2351
|
+
/** Adds a command to the user's command palette. Can request additional input within the callback. */
|
|
2352
|
+
addCommand(options: CommandOptions, callback: CommandCallback): () => void;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
interface CommandStringOptions extends BaseCommandOptions {
|
|
2356
|
+
maxLength?: number;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
interface CommandNumberOptions extends BaseCommandOptions {
|
|
2360
|
+
min?: number;
|
|
2361
|
+
max?: number;
|
|
2362
|
+
decimal?: boolean;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
interface BaseCommandOptions {
|
|
2366
|
+
title: string;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
interface CommandSelectOptions extends BaseCommandOptions {
|
|
2370
|
+
options: {
|
|
2371
|
+
label: string;
|
|
2372
|
+
value: string;
|
|
2373
|
+
}[];
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
interface CommandContext {
|
|
2377
|
+
select(options: CommandSelectOptions): Promise<string>;
|
|
2378
|
+
number(options: CommandNumberOptions): Promise<number>;
|
|
2379
|
+
string(options: CommandStringOptions): Promise<string>;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
type CommandCallback = (context: CommandContext) => void | Promise<void>;
|
|
2383
|
+
|
|
2384
|
+
interface CommandOptions {
|
|
2385
|
+
text: string | (() => string);
|
|
2386
|
+
keywords?: string[];
|
|
2387
|
+
hidden?: () => boolean;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
class CommandsApi {
|
|
2391
|
+
/** Adds a command to the user's command palette. Can request additional input within the callback. */
|
|
2392
|
+
addCommand(id: string, options: CommandOptions, callback: CommandCallback): () => void;
|
|
2393
|
+
/** Removes all commands that were added with the same id */
|
|
2394
|
+
removeCommands(id: string): void;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2293
2397
|
class ScopedRewriterApi {
|
|
2294
2398
|
private readonly id;
|
|
2295
2399
|
constructor(id: string);
|
|
@@ -2442,18 +2546,18 @@ declare global {
|
|
|
2442
2546
|
}
|
|
2443
2547
|
|
|
2444
2548
|
interface ModalOptions {
|
|
2445
|
-
id
|
|
2446
|
-
title
|
|
2447
|
-
style
|
|
2448
|
-
className
|
|
2449
|
-
closeOnBackgroundClick
|
|
2450
|
-
buttons
|
|
2451
|
-
onClosed
|
|
2549
|
+
id?: string;
|
|
2550
|
+
title?: string;
|
|
2551
|
+
style?: string;
|
|
2552
|
+
className?: string;
|
|
2553
|
+
closeOnBackgroundClick?: boolean;
|
|
2554
|
+
buttons?: ModalButton[];
|
|
2555
|
+
onClosed?: () => void;
|
|
2452
2556
|
}
|
|
2453
2557
|
|
|
2454
2558
|
class BaseUIApi {
|
|
2455
2559
|
/** Shows a customizable modal to the user */
|
|
2456
|
-
showModal(element: HTMLElement | import("react").ReactElement, options?:
|
|
2560
|
+
showModal(element: HTMLElement | import("react").ReactElement, options?: ModalOptions): void;
|
|
2457
2561
|
}
|
|
2458
2562
|
|
|
2459
2563
|
class UIApi extends BaseUIApi {
|
|
@@ -2496,7 +2600,7 @@ declare global {
|
|
|
2496
2600
|
/** Whether the user is the one hosting the current game */
|
|
2497
2601
|
get isHost(): boolean;
|
|
2498
2602
|
/** Sends a message to the server on a specific channel */
|
|
2499
|
-
send(channel: string, message
|
|
2603
|
+
send(channel: string, message?: any): void;
|
|
2500
2604
|
}
|
|
2501
2605
|
|
|
2502
2606
|
interface RequesterOptions {
|
|
@@ -2554,8 +2658,6 @@ declare global {
|
|
|
2554
2658
|
}
|
|
2555
2659
|
|
|
2556
2660
|
class ScopedParcelApi extends BaseParcelApi {
|
|
2557
|
-
private readonly id;
|
|
2558
|
-
constructor(id: string);
|
|
2559
2661
|
/**
|
|
2560
2662
|
* Waits for a module to be loaded, then runs a callback
|
|
2561
2663
|
* @returns A function to cancel waiting for the module
|
|
@@ -2729,6 +2831,8 @@ declare global {
|
|
|
2729
2831
|
static storage: Readonly<StorageApi>;
|
|
2730
2832
|
/** Functions for intercepting the arguments and return values of functions */
|
|
2731
2833
|
static patcher: Readonly<PatcherApi>;
|
|
2834
|
+
/** Functions for adding commands to the command palette */
|
|
2835
|
+
static commands: Readonly<CommandsApi>;
|
|
2732
2836
|
/** Methods for getting info on libraries */
|
|
2733
2837
|
static libs: Readonly<LibsApi>;
|
|
2734
2838
|
/** Gets the exported values of a library */
|
|
@@ -2798,6 +2902,8 @@ declare global {
|
|
|
2798
2902
|
storage: Readonly<ScopedStorageApi>;
|
|
2799
2903
|
/** Functions for intercepting the arguments and return values of functions */
|
|
2800
2904
|
patcher: Readonly<ScopedPatcherApi>;
|
|
2905
|
+
/** Functions for adding commands to the command palette */
|
|
2906
|
+
commands: Readonly<ScopedCommandsApi>;
|
|
2801
2907
|
/** A utility for creating persistent settings menus, only available to plugins */
|
|
2802
2908
|
settings: PluginSettings;
|
|
2803
2909
|
/** Methods for getting info on libraries */
|
gimloader/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/gimloader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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": "f02db9aa2ef4ef0f05c873f062356c8789b9173e27e9bfcf2547f84f98f74f7d",
|
|
36
36
|
"typeScriptVersion": "5.2"
|
|
37
37
|
}
|