@sandustry-modding/types 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.
Files changed (124) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +66 -0
  3. package/global.d.ts +38 -0
  4. package/package.json +44 -0
  5. package/sandkit/api/action.d.ts +28 -0
  6. package/sandkit/api/assets.d.ts +30 -0
  7. package/sandkit/api/authorization.d.ts +54 -0
  8. package/sandkit/api/building.d.ts +92 -0
  9. package/sandkit/api/camera.d.ts +23 -0
  10. package/sandkit/api/collector.d.ts +36 -0
  11. package/sandkit/api/constants.d.ts +21 -0
  12. package/sandkit/api/cooldown.d.ts +26 -0
  13. package/sandkit/api/discoveries.d.ts +18 -0
  14. package/sandkit/api/effects.d.ts +76 -0
  15. package/sandkit/api/elements.d.ts +237 -0
  16. package/sandkit/api/energy.d.ts +70 -0
  17. package/sandkit/api/events.d.ts +53 -0
  18. package/sandkit/api/excavation.d.ts +34 -0
  19. package/sandkit/api/fire.d.ts +26 -0
  20. package/sandkit/api/gameconfig.d.ts +15 -0
  21. package/sandkit/api/grid.d.ts +26 -0
  22. package/sandkit/api/hooks.d.ts +52 -0
  23. package/sandkit/api/i18n.d.ts +101 -0
  24. package/sandkit/api/index.d.ts +66 -0
  25. package/sandkit/api/input.d.ts +119 -0
  26. package/sandkit/api/items.d.ts +60 -0
  27. package/sandkit/api/lights.d.ts +66 -0
  28. package/sandkit/api/maps.d.ts +33 -0
  29. package/sandkit/api/mods.d.ts +18 -0
  30. package/sandkit/api/patterns.d.ts +32 -0
  31. package/sandkit/api/player.d.ts +84 -0
  32. package/sandkit/api/processing.d.ts +66 -0
  33. package/sandkit/api/progression.d.ts +22 -0
  34. package/sandkit/api/projectiles.d.ts +80 -0
  35. package/sandkit/api/random.d.ts +21 -0
  36. package/sandkit/api/raycast.d.ts +19 -0
  37. package/sandkit/api/reactions.d.ts +30 -0
  38. package/sandkit/api/rendering.d.ts +26 -0
  39. package/sandkit/api/resources.d.ts +23 -0
  40. package/sandkit/api/sandkit-api.d.ts +117 -0
  41. package/sandkit/api/scene.d.ts +15 -0
  42. package/sandkit/api/schedule.d.ts +14 -0
  43. package/sandkit/api/settings.d.ts +29 -0
  44. package/sandkit/api/shared.d.ts +27 -0
  45. package/sandkit/api/signals.d.ts +25 -0
  46. package/sandkit/api/sound.d.ts +91 -0
  47. package/sandkit/api/sprites.d.ts +45 -0
  48. package/sandkit/api/storage.d.ts +55 -0
  49. package/sandkit/api/structureBehaviors.d.ts +22 -0
  50. package/sandkit/api/structures.d.ts +320 -0
  51. package/sandkit/api/tech.d.ts +66 -0
  52. package/sandkit/api/terrains.d.ts +125 -0
  53. package/sandkit/api/time.d.ts +13 -0
  54. package/sandkit/api/tools.d.ts +35 -0
  55. package/sandkit/api/triggers.d.ts +24 -0
  56. package/sandkit/api/ui.d.ts +175 -0
  57. package/sandkit/api/upgrades.d.ts +63 -0
  58. package/sandkit/api/utils.d.ts +35 -0
  59. package/sandkit/api/workers.d.ts +14 -0
  60. package/sandkit/api/world.d.ts +107 -0
  61. package/sandkit/engine/api/augments.d.ts +96 -0
  62. package/sandkit/engine/api/auralite.d.ts +21 -0
  63. package/sandkit/engine/api/blueprints.d.ts +47 -0
  64. package/sandkit/engine/api/clipboard.d.ts +46 -0
  65. package/sandkit/engine/api/colorPicker.d.ts +74 -0
  66. package/sandkit/engine/api/coloringTool.d.ts +56 -0
  67. package/sandkit/engine/api/conveyors.d.ts +16 -0
  68. package/sandkit/engine/api/debug.d.ts +16 -0
  69. package/sandkit/engine/api/drones.d.ts +21 -0
  70. package/sandkit/engine/api/entities.d.ts +66 -0
  71. package/sandkit/engine/api/extensions.d.ts +16 -0
  72. package/sandkit/engine/api/factory.d.ts +56 -0
  73. package/sandkit/engine/api/foliage.d.ts +31 -0
  74. package/sandkit/engine/api/foundationColorPicker.d.ts +16 -0
  75. package/sandkit/engine/api/game.d.ts +26 -0
  76. package/sandkit/engine/api/heatTransfer.d.ts +46 -0
  77. package/sandkit/engine/api/index.d.ts +47 -0
  78. package/sandkit/engine/api/launchers.d.ts +16 -0
  79. package/sandkit/engine/api/lightColorPicker.d.ts +16 -0
  80. package/sandkit/engine/api/matters.d.ts +26 -0
  81. package/sandkit/engine/api/misc.d.ts +16 -0
  82. package/sandkit/engine/api/portals.d.ts +16 -0
  83. package/sandkit/engine/api/prefabData.d.ts +36 -0
  84. package/sandkit/engine/api/prefabDecor.d.ts +21 -0
  85. package/sandkit/engine/api/prefabulator.d.ts +21 -0
  86. package/sandkit/engine/api/prismaline.d.ts +26 -0
  87. package/sandkit/engine/api/prismite.d.ts +26 -0
  88. package/sandkit/engine/api/queue.d.ts +41 -0
  89. package/sandkit/engine/api/shadows.d.ts +26 -0
  90. package/sandkit/engine/api/strataform.d.ts +36 -0
  91. package/sandkit/engine/api/swarmConsole.d.ts +71 -0
  92. package/sandkit/engine/api/sweeperDrone.d.ts +16 -0
  93. package/sandkit/engine/api/teleportZones.d.ts +46 -0
  94. package/sandkit/engine/api/tutorialBuild.d.ts +66 -0
  95. package/sandkit/engine/api/usageTracker.d.ts +26 -0
  96. package/sandkit/engine/api/wall.d.ts +31 -0
  97. package/sandkit/engine/api/workerLocal.d.ts +30 -0
  98. package/sandkit/engine/index.d.ts +135 -0
  99. package/sandkit/engine/retro-console.d.ts +52 -0
  100. package/sandkit/engine/state.d.ts +31 -0
  101. package/sandkit/enums/index.d.ts +444 -0
  102. package/sandkit/index.d.ts +47 -0
  103. package/sandkit/react.d.ts +49 -0
  104. package/shared/api/effects.d.ts +76 -0
  105. package/shared/api/elements.d.ts +162 -0
  106. package/shared/api/maps.d.ts +30 -0
  107. package/shared/api/player.d.ts +31 -0
  108. package/shared/api/shared.d.ts +46 -0
  109. package/shared/api/structures.d.ts +138 -0
  110. package/shared/api/terrains.d.ts +100 -0
  111. package/shared/api/ui.d.ts +54 -0
  112. package/shared/api/world.d.ts +71 -0
  113. package/shared/asset.d.ts +14 -0
  114. package/shared/engine.d.ts +17 -0
  115. package/shared/index.d.ts +25 -0
  116. package/shared/jsonvalue.d.ts +30 -0
  117. package/shared/nominal.d.ts +31 -0
  118. package/shared/player.d.ts +173 -0
  119. package/worker/api/elements.d.ts +60 -0
  120. package/worker/api/main.d.ts +16 -0
  121. package/worker/api/shared.d.ts +38 -0
  122. package/worker/api/worker.d.ts +20 -0
  123. package/worker/index.d.ts +29 -0
  124. package/worker/sandkit-api.d.ts +31 -0
@@ -0,0 +1,444 @@
1
+ /**
2
+ * `sandkit.enums` members — confirmed against a live Sandustry session.
3
+ *
4
+ * Numeric element / terrain / structure values can change between game
5
+ * versions. Prefer resolving string IDs through the API when possible.
6
+ */
7
+
8
+ /** Item ability categories (dig, shoot, spray, laser). */
9
+ export enum AbilityType {
10
+ Dig = 1,
11
+ Shoot = 2,
12
+ Spray = 3,
13
+ Laser = 4,
14
+ }
15
+
16
+ /** Phases of a held or repeated player action. */
17
+ export enum ActionState {
18
+ Start = 1,
19
+ Active = 2,
20
+ End = 3,
21
+ }
22
+
23
+ /** High-level action channel (weapon, building, tool, mod). */
24
+ export enum ActionType {
25
+ Weapon = 1,
26
+ Building = 2,
27
+ Tool = 3,
28
+ Mod = 4,
29
+ }
30
+
31
+ /** Zone rules that restrict player abilities. */
32
+ export enum AuthorizationType {
33
+ NoJetpack = 1,
34
+ NoGrab = 2,
35
+ NoBuild = 3,
36
+ NoTool = 4,
37
+ NoExcavation = 5,
38
+ NoToolExceptFlamethrower = 6,
39
+ }
40
+
41
+ /** Linear vs rectangular structure placement. */
42
+ export enum BuildMode {
43
+ Linear = 1,
44
+ Rectangular = 2,
45
+ }
46
+
47
+ /** Result of a build placement check. */
48
+ export enum BuildingClearance {
49
+ Available = 1,
50
+ FullyBlocked = 2,
51
+ PartiallyBlocked = 3,
52
+ CanBeReplaced = 4,
53
+ }
54
+
55
+ /** Terrain / special cell kinds in the simulation grid. */
56
+ export enum CellType {
57
+ Empty = 0,
58
+ Element = 1,
59
+ Dirt = 2,
60
+ SporeSoil = 3,
61
+ Fog = 4,
62
+ FogJetpackBlock = 5,
63
+ FogWater = 6,
64
+ FreezingIceSoil = 7,
65
+ Divider = 8,
66
+ Grass = 9,
67
+ Moss = 10,
68
+ GoldSoil = 11,
69
+ Petal = 12,
70
+ FogLava = 13,
71
+ Fluxite = 14,
72
+ Block = 15,
73
+ SlidingBlock = 16,
74
+ SlidingBlockLeft = 17,
75
+ SlidingBlockRight = 18,
76
+ ConveyorLeft = 19,
77
+ ConveyorRight = 20,
78
+ ShakerLeft = 21,
79
+ ShakerRight = 22,
80
+ Stone = 23,
81
+ VelocitySoaker = 24,
82
+ Ice = 25,
83
+ Grower = 26,
84
+ NascentWater = 27,
85
+ SandiumSoil = 28,
86
+ Obsidian = 29,
87
+ Crackstone = 30,
88
+ }
89
+
90
+ /** UI component ids for HUD and menu routing. */
91
+ export enum ComponentId {
92
+ Hotbar = 1,
93
+ SoundBoxConfig = 2,
94
+ Root = 4,
95
+ Menu = 5,
96
+ Management = 6,
97
+ FilterConfig = 7,
98
+ Resources = 8,
99
+ TechTree = 9,
100
+ Tutorial = 10,
101
+ Loader = 11,
102
+ Options = 12,
103
+ ShortcutHelper = 13,
104
+ Upgrades = 14,
105
+ Tooltip = 15,
106
+ Notifications = 16,
107
+ Objectives = 17,
108
+ DroneAdminList = 18,
109
+ HotbarOverlays = 19,
110
+ IntroScreen = 20,
111
+ StoryNotifications = 21,
112
+ FactoryProgress = 22,
113
+ Dialogs = 23,
114
+ GlobalOverlays = 24,
115
+ Lexicon = 25,
116
+ ModsScreen = 26,
117
+ CustomMapsScreen = 27,
118
+ CinematicPanel = 28,
119
+ Feedback = 29,
120
+ }
121
+
122
+ /** Autonomous drone kinds. */
123
+ export enum DroneType {
124
+ Digger = 1,
125
+ Hauler = 2,
126
+ }
127
+
128
+ /** Built-in element type ids (prefer API string ids when registering mods). */
129
+ export enum ElementType {
130
+ Sand = 1,
131
+ Particle = 2,
132
+ Water = 3,
133
+ WetSand = 4,
134
+ Sandium = 5,
135
+ Residue = 6,
136
+ Gold = 7,
137
+ Gloom = 8,
138
+ Shake = 9,
139
+ Steam = 10,
140
+ Fire = 11,
141
+ FreezingIce = 12,
142
+ Flame = 13,
143
+ BurntResidue = 14,
144
+ Seed = 15,
145
+ WetSeed = 16,
146
+ Seedling = 17,
147
+ Petalium = 18,
148
+ Lava = 19,
149
+ Basalt = 20,
150
+ }
151
+
152
+ /** Built-in hotbar item ids. */
153
+ export enum ItemId {
154
+ Shovel = 1,
155
+ Grabber = 2,
156
+ Demolisher = 3,
157
+ GrapplingHook = 4,
158
+ Vacuum = 5,
159
+ Gun = 6,
160
+ Copier = 7,
161
+ RocketLauncher = 8,
162
+ Digger = 9,
163
+ Shotgun = 10,
164
+ Teleporter = 11,
165
+ Flamethrower = 12,
166
+ PipeRemover = 13,
167
+ Hauler = 14,
168
+ Cryoblaster = 15,
169
+ MegaShotgun = 16,
170
+ }
171
+
172
+ /** Item category (weapon, tool, consumable, mod). */
173
+ export enum ItemType {
174
+ Weapon = 1,
175
+ Tool = 2,
176
+ Consumable = 3,
177
+ Mod = 4,
178
+ }
179
+
180
+ /** Named input bindings (settings keys). */
181
+ export enum KeyBinding {
182
+ OpenBuildMenu = "OpenBuildMenu",
183
+ GrapplingHook = "GrapplingHook",
184
+ Escape = "Escape",
185
+ OpenTechTree = "OpenTechTree",
186
+ OpenInventory = "OpenInventory",
187
+ ReverseBuildDirection = "ReverseBuildDirection",
188
+ Marquee = "Marquee",
189
+ Pause = "Pause",
190
+ Copy = "Copy",
191
+ Paste = "Paste",
192
+ Flip = "Flip",
193
+ Delete = "Delete",
194
+ PauseCamera = "PauseCamera",
195
+ OpenUpgrades = "OpenUpgrades",
196
+ BuildMode = "BuildMode",
197
+ Demolish = "Demolish",
198
+ Hover = "Hover",
199
+ Ruler = "Ruler",
200
+ Left = "Left",
201
+ Right = "Right",
202
+ Boost = "Boost",
203
+ Descend = "Descend",
204
+ SprintBoost = "SprintBoost",
205
+ OverrideReplaceStructures = "OverrideReplaceStructures",
206
+ QuickSave = "QuickSave",
207
+ QuickLoad = "QuickLoad",
208
+ ToggleGameHud = "ToggleGameHud",
209
+ }
210
+
211
+ /** Key transition state for input polling. */
212
+ export enum KeyState {
213
+ Up = 1,
214
+ Down = 2,
215
+ Pressed = 3,
216
+ Released = 4,
217
+ All = 5,
218
+ }
219
+
220
+ /** Physical behaviour category for elements (mirrors shared API enum). */
221
+ export enum MatterType {
222
+ Solid = 1,
223
+ Liquid = 2,
224
+ Particle = 3,
225
+ Gas = 4,
226
+ Static = 5,
227
+ Slushy = 6,
228
+ Wisp = 7,
229
+ Powder = 8,
230
+ }
231
+
232
+ /** Projectile kinds spawned by weapons and tools. */
233
+ export enum ProjectileType {
234
+ Bullet = 1,
235
+ Rocket = 2,
236
+ GrapplingHook = 3,
237
+ Fire = 4,
238
+ Digger = 5,
239
+ Mod = 6,
240
+ }
241
+
242
+ /** Weapon reload behaviour. */
243
+ export enum ReloadType {
244
+ Clip = 1,
245
+ Single = 2,
246
+ OverTime = 3,
247
+ }
248
+
249
+ /** Top-level game scene (menu, intro, deploy, in-game). */
250
+ export enum Scene {
251
+ MainMenu = 1,
252
+ Intro = 2,
253
+ Deploy = 3,
254
+ Game = 4,
255
+ }
256
+
257
+ /** Built-in structure type ids. */
258
+ export enum StructureType {
259
+ ConveyorLeft = 1,
260
+ ConveyorRight = 2,
261
+ ShakerLeft = 3,
262
+ ShakerRight = 4,
263
+ LauncherUp = 5,
264
+ LauncherLeft = 6,
265
+ LauncherRight = 7,
266
+ SplitterLeft = 8,
267
+ SplitterRight = 9,
268
+ Dropper = 10,
269
+ Foundation = 11,
270
+ FoundationAngledLeft = 12,
271
+ FoundationTriangleLeftDel = 13,
272
+ FoundationAngledRight = 14,
273
+ FoundationTriangleRightDel = 15,
274
+ Collector = 16,
275
+ FilterLeft = 17,
276
+ FilterRight = 18,
277
+ SlidingFoundation = 19,
278
+ VelocitySoaker = 20,
279
+ Grower = 21,
280
+ SoundBox = 22,
281
+ Pipe = 23,
282
+ Pump = 24,
283
+ LiquidVent = 25,
284
+ Light = 26,
285
+ FluxEmanator = 27,
286
+ }
287
+
288
+ /** Tech tree node ids (mixed numeric and string keys). */
289
+ export enum Tech {
290
+ Shaker = 1,
291
+ Conveyors = 2,
292
+ Guns1 = 3,
293
+ Filters1 = 4,
294
+ Flamethrower = 5,
295
+ Gun = 6,
296
+ KineticPress = 7,
297
+ Guns2 = 8,
298
+ Drones1 = 9,
299
+ Upgrading2 = 10,
300
+ Filters2 = 11,
301
+ Upgrading3 = 12,
302
+ Upgrading4 = 13,
303
+ Upgrading5 = 14,
304
+ Upgrading6 = 15,
305
+ Upgrading7 = 16,
306
+ Upgrading8 = 17,
307
+ Upgrading9 = 18,
308
+ Upgrading10 = 19,
309
+ PlanterBox = 20,
310
+ Thermo = 21,
311
+ Rocket = 22,
312
+ Pipes = 23,
313
+ StaticLights = 24,
314
+ Drones2 = 25,
315
+ Smelter = 26,
316
+ Tools4 = 27,
317
+ Guns3 = 28,
318
+ Pipes2 = 29,
319
+ ConveyorsMk2 = 30,
320
+ Lights2 = 31,
321
+ Refining6 = 32,
322
+ Refining7 = 33,
323
+ Guns4 = 34,
324
+ Guns5 = 35,
325
+ Tools5 = 36,
326
+ Tools6 = 37,
327
+ Filters3 = 38,
328
+ Filters4 = 39,
329
+ Pipes3 = 40,
330
+ Pipes4 = 41,
331
+ Logistics3 = 42,
332
+ Logistics4 = 43,
333
+ Lights3 = 44,
334
+ Lights4 = 45,
335
+ Drones3 = 46,
336
+ Drones4 = 47,
337
+ Alien = 48,
338
+ Electricity = 49,
339
+ AlienCore = 50,
340
+ Emanators1 = 51,
341
+ AlienPlasmaConduits = 52,
342
+ AlienQuantumMatrix = 53,
343
+ AlienPlasmaCore = 54,
344
+ AlienVoidEngine = 55,
345
+ FlareGun = 56,
346
+ Sweeper = 57,
347
+ Utilities3 = 58,
348
+ Cryoblaster = 59,
349
+ Vacuum = 60,
350
+ Utilities6 = 61,
351
+ Utilities7 = 62,
352
+ Filters = 63,
353
+ AdvancedFilters = 64,
354
+ Infrastructure3 = 65,
355
+ Decorations1 = 66,
356
+ Decorations2 = 67,
357
+ Decorations3 = 68,
358
+ Blocks1 = 69,
359
+ Drill = 70,
360
+ SteamTurbine = 71,
361
+ Electricity3 = 72,
362
+ Electricity4 = 73,
363
+ Logic1 = 74,
364
+ Logic2 = 75,
365
+ Logic3 = 76,
366
+ Logic4 = 77,
367
+ Various1 = 78,
368
+ Various2 = 79,
369
+ Various3 = 80,
370
+ Locator = 81,
371
+ QuantumPortal = 82,
372
+ VoidRift = 83,
373
+ Blink = 84,
374
+ Recall = 85,
375
+ ImplosionGun = 86,
376
+ Refining8 = 87,
377
+ Tools7 = 88,
378
+ Diggers = 89,
379
+ Haulers = 90,
380
+ Map = 91,
381
+ ColoringTool = 92,
382
+ SignalGate = 93,
383
+ GrapplingHook = 94,
384
+ GlassFoundation = 95,
385
+ PrecisionTools = 96,
386
+ SignalDevices = 97,
387
+ SignalControls = 98,
388
+ LogicGates = 99,
389
+ RetroConsole = 100,
390
+ WallTool = 101,
391
+ Corraller = 102,
392
+ PlainFoundation = 103,
393
+ ClearingFrame = 104,
394
+ Heatmap = 105,
395
+ MiningLaser = 106,
396
+ GoldBattery = 107,
397
+ Hover = 108,
398
+ SprintBoost = 109,
399
+ CritterFence = 110,
400
+ FluxEmanator = "fluxEmanator",
401
+ }
402
+
403
+ /** Visibility and research state of a tech node. */
404
+ export enum TechStatus {
405
+ Available = 0,
406
+ Visible = 1,
407
+ Researched = 2,
408
+ Unknown = 3,
409
+ Hidden = 4,
410
+ }
411
+
412
+ /** Pickups and interactable world items. */
413
+ export enum WorldItemType {
414
+ Artifact = 1,
415
+ GlyphKey = 2,
416
+ Stratacore = 3,
417
+ Orb = 4,
418
+ }
419
+
420
+ /** Composed `sandkit.enums` object. */
421
+ export type SandkitEnums = {
422
+ AbilityType: typeof AbilityType;
423
+ ActionState: typeof ActionState;
424
+ ActionType: typeof ActionType;
425
+ AuthorizationType: typeof AuthorizationType;
426
+ BuildMode: typeof BuildMode;
427
+ BuildingClearance: typeof BuildingClearance;
428
+ CellType: typeof CellType;
429
+ ComponentId: typeof ComponentId;
430
+ DroneType: typeof DroneType;
431
+ ElementType: typeof ElementType;
432
+ ItemId: typeof ItemId;
433
+ ItemType: typeof ItemType;
434
+ KeyBinding: typeof KeyBinding;
435
+ KeyState: typeof KeyState;
436
+ MatterType: typeof MatterType;
437
+ ProjectileType: typeof ProjectileType;
438
+ ReloadType: typeof ReloadType;
439
+ Scene: typeof Scene;
440
+ StructureType: typeof StructureType;
441
+ Tech: typeof Tech;
442
+ TechStatus: typeof TechStatus;
443
+ WorldItemType: typeof WorldItemType;
444
+ };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Live `sandkit` object — shape, ambient binding docs, and nested bags.
3
+ *
4
+ * Mirrors on-disk `src/sandkit/` and the host free variable: `api`, `engine`,
5
+ * `enums`, `react`, `state`. Prefer the free name `sandkit` in mod code
6
+ * (`src/global.d.ts`); do not import a value binding.
7
+ *
8
+ * @module sandkit
9
+ */
10
+
11
+ export * as api from "./api";
12
+ export * as engine from "./engine";
13
+ export * as enums from "./enums";
14
+
15
+ import type { SandkitApi } from "./api/sandkit-api";
16
+ import type { SandkitEngine } from "./engine";
17
+ import type { SandkitEnums } from "./enums";
18
+ import type { SandkitReact } from "./react";
19
+ import type { SandkitState } from "./engine/state";
20
+
21
+ /** Shape of the host-injected `sandkit` free variable in mod `main.js`. */
22
+ export type Sandkit = {
23
+ /** Public mod API. See {@link sandkit.api}. */
24
+ api: SandkitApi;
25
+ /** Sandkit API version number (live value is `1`). */
26
+ apiVersion: number;
27
+ /**
28
+ * State-first internals. See {@link SandkitEngine}.
29
+ * @internal
30
+ */
31
+ engine: SandkitEngine;
32
+ /** Runtime enum bags. See {@link sandkit.enums}. */
33
+ enums: SandkitEnums;
34
+ /** Host React package. See {@link SandkitReact}. */
35
+ react: SandkitReact;
36
+ /**
37
+ * Game state. Same object as `sandkit.engine.state` at runtime.
38
+ * See {@link SandkitState}.
39
+ */
40
+ state: SandkitState;
41
+ };
42
+
43
+ export type { SandkitApi } from "./api/sandkit-api";
44
+ export type { SandkitEngine, SandkitEngineApi, RetroConsoleApi } from "./engine";
45
+ export type { SandkitState } from "./engine/state";
46
+ export type { SandkitEnums } from "./enums";
47
+ export type { SandkitReact } from "./react";
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Host React runtime at `sandkit.react`.
3
+ *
4
+ * Kept intentionally shallow so TypeDoc does not ingest `@types/react` / DOM.
5
+ * Mods should import `react` through the template JSX runtime, not this bag
6
+ * directly, unless you need to reach the host copy at runtime.
7
+ */
8
+ export type SandkitReact = {
9
+ /** Create a React element (host copy). */
10
+ createElement?(...args: unknown[]): unknown;
11
+ /** Create a React context (host copy). */
12
+ createContext?(...args: unknown[]): unknown;
13
+ /** Create a ref object (host copy). */
14
+ createRef?(...args: unknown[]): unknown;
15
+ /** Wrap a component to forward refs (host copy). */
16
+ forwardRef?(...args: unknown[]): unknown;
17
+ /** Memoize a component (host copy). */
18
+ memo?(...args: unknown[]): unknown;
19
+ /** Lazy-load a component (host copy). */
20
+ lazy?(...args: unknown[]): unknown;
21
+ /** State hook (host copy). */
22
+ useState?(...args: unknown[]): unknown;
23
+ /** Effect hook (host copy). */
24
+ useEffect?(...args: unknown[]): unknown;
25
+ /** Layout effect hook (host copy). */
26
+ useLayoutEffect?(...args: unknown[]): unknown;
27
+ /** Memo hook (host copy). */
28
+ useMemo?(...args: unknown[]): unknown;
29
+ /** Callback hook (host copy). */
30
+ useCallback?(...args: unknown[]): unknown;
31
+ /** Ref hook (host copy). */
32
+ useRef?(...args: unknown[]): unknown;
33
+ /** Context hook (host copy). */
34
+ useContext?(...args: unknown[]): unknown;
35
+ /** Fragment symbol (host copy). */
36
+ Fragment?: unknown;
37
+ /** Base class component (host copy). */
38
+ Component?: unknown;
39
+ /** Pure class component (host copy). */
40
+ PureComponent?: unknown;
41
+ /** Strict mode wrapper (host copy). */
42
+ StrictMode?: unknown;
43
+ /** Suspense boundary (host copy). */
44
+ Suspense?: unknown;
45
+ /** React version string from the host bundle. */
46
+ version?: string;
47
+ /** Additional host exports not listed here. */
48
+ readonly [key: string]: unknown;
49
+ };
@@ -0,0 +1,76 @@
1
+ import type { Vector2 } from "../../shared/player";
2
+
3
+ /**
4
+ * Shared `sandkit.api.effects` base — world-space visual effects.
5
+ *
6
+ * Main thread may expose additional effect helpers. Workers use this subset.
7
+ *
8
+ * @internal Base namespace reused by main and worker declarations.
9
+ */
10
+ export namespace effects {
11
+ /**
12
+ * Spawn a temporary light at world coordinates.
13
+ * @param worldX - World x position in pixels.
14
+ * @param worldY - World y position in pixels.
15
+ * @param options - Brightness, colour, and lifetime settings.
16
+ */
17
+ export function createLightAtWorld(worldX: number, worldY: number, options?: TemporaryLightOptions): { index: number | null; };
18
+ /**
19
+ * Emit particles at world coordinates.
20
+ * @param worldX - World x position in pixels.
21
+ * @param worldY - World y position in pixels.
22
+ * @param options - Count, velocity, colour, and lifetime settings.
23
+ */
24
+ export function createParticlesAtWorld(worldX: number, worldY: number, options?: ParticleEffectOptions): void;
25
+ /**
26
+ * Spawn a named screen-space or world effect.
27
+ * @param effectId - Registered effect id (for example `heatWave`).
28
+ * @param worldX - World x position in pixels.
29
+ * @param worldY - World y position in pixels.
30
+ * @param options - Duration, radius, and intensity settings.
31
+ */
32
+ export function createEffectAtWorld(effectId: "heatWave", worldX: number, worldY: number, options?: EffectOptions): void;
33
+
34
+ /** Generic duration and radius options for world effects. */
35
+ export interface EffectOptions {
36
+ duration?: number,
37
+ maxRadius?: number,
38
+ intensity?: number,
39
+ }
40
+ /** Options for {@link createLightAtWorld}. */
41
+ export interface TemporaryLightOptions {
42
+ brightness?: number,
43
+ duration?: number,
44
+ durationMs?: number,
45
+ size?: number,
46
+ color?: [number, number, number, number],
47
+ /** Light decay rate after spawn. */
48
+ decay: number,
49
+ unclamped?: boolean,
50
+ skipDedup?: boolean,
51
+ useLightZones?: boolean,
52
+ noopIfFull?: boolean,
53
+ priority?: number,
54
+ /** Dedupe key when the light pool is full or dedup is enabled. */
55
+ dedupKey: string,
56
+ }
57
+ /** Options for {@link createParticlesAtWorld}. */
58
+ export interface ParticleEffectOptions {
59
+ count?: number,
60
+ velocity?: Vector2,
61
+ minSpeed?: number,
62
+ maxSpeed?: number,
63
+ /** Hex code. No alpha. */
64
+ color?: number,
65
+ minSize?: number,
66
+ maxSize?: number,
67
+ minLifetime?: number,
68
+ maxLifetime?: number,
69
+ background?: boolean,
70
+ imageName?: string,
71
+ fadeOutOnly?: boolean,
72
+ fadeStart?: number,
73
+ fadeEnd?: number,
74
+ damp?: number,
75
+ }
76
+ }