@defold-typescript/library-types 0.18.1

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 (101) hide show
  1. package/NOTICE +52 -0
  2. package/README.md +78 -0
  3. package/api-doc/boom.boom.json +26 -0
  4. package/api-doc/bridge.bridge.json +1653 -0
  5. package/api-doc/bzAnim.bzLibrary.json +156 -0
  6. package/api-doc/defcon.console.json +109 -0
  7. package/api-doc/defmath.defmath.json +1381 -0
  8. package/api-doc/defsave.defsave.json +175 -0
  9. package/api-doc/deftest.deftest.json +71 -0
  10. package/api-doc/dicebag.dicebag.json +323 -0
  11. package/api-doc/event.event.json +238 -0
  12. package/api-doc/gooey.gooey.json +963 -0
  13. package/api-doc/immutable.immutable.json +63 -0
  14. package/api-doc/in.accelerometer.json +281 -0
  15. package/api-doc/in.button.json +148 -0
  16. package/api-doc/in.cursor.json +203 -0
  17. package/api-doc/in.gesture.json +206 -0
  18. package/api-doc/in.keyboard.json +45 -0
  19. package/api-doc/in.mapper.json +141 -0
  20. package/api-doc/in.onscreen.json +265 -0
  21. package/api-doc/in.state.json +195 -0
  22. package/api-doc/in.textbox.json +213 -0
  23. package/api-doc/in.triggers.json +1260 -0
  24. package/api-doc/lang.lang.json +411 -0
  25. package/api-doc/log.log.json +50 -0
  26. package/api-doc/metrics.fps.json +88 -0
  27. package/api-doc/metrics.mem.json +80 -0
  28. package/api-doc/monarch.monarch.json +1065 -0
  29. package/api-doc/monarch.transitions.easings.json +206 -0
  30. package/api-doc/monarch.transitions.gui.json +445 -0
  31. package/api-doc/nakama.engine.defold.json +165 -0
  32. package/api-doc/nakama.nakama.json +6574 -0
  33. package/api-doc/nakama.util.log.json +25 -0
  34. package/api-doc/narrator.narrator.json +150 -0
  35. package/api-doc/orthographic.camera.json +1019 -0
  36. package/api-doc/persist.persist.json +142 -0
  37. package/api-doc/platypus.platypus.json +631 -0
  38. package/api-doc/proto.proto.json +355 -0
  39. package/api-doc/rendy.rendy.json +408 -0
  40. package/api-doc/richtext.color.json +219 -0
  41. package/api-doc/richtext.richtext.json +382 -0
  42. package/api-doc/richtext.tags.json +67 -0
  43. package/api-doc/saver.saver.json +553 -0
  44. package/api-doc/saver.storage.json +174 -0
  45. package/api-doc/squid.squid.json +660 -0
  46. package/api-doc/starly.starly.json +488 -0
  47. package/api-doc/tweener.tweener.json +419 -0
  48. package/api-doc/yagames.yagames.json +1465 -0
  49. package/api-doc/zzfx.api.json +85 -0
  50. package/generated/boom.boom.d.ts +1585 -0
  51. package/generated/bridge.bridge.d.ts +533 -0
  52. package/generated/bzAnim.bzLibrary.d.ts +93 -0
  53. package/generated/defcon.console.d.ts +24 -0
  54. package/generated/defmath.defmath.d.ts +194 -0
  55. package/generated/defsave.defsave.d.ts +31 -0
  56. package/generated/deftest.deftest.d.ts +47 -0
  57. package/generated/dicebag.dicebag.d.ts +90 -0
  58. package/generated/event.event.d.ts +54 -0
  59. package/generated/gooey.gooey.d.ts +261 -0
  60. package/generated/immutable.immutable.d.ts +13 -0
  61. package/generated/in.accelerometer.d.ts +37 -0
  62. package/generated/in.button.d.ts +20 -0
  63. package/generated/in.cursor.d.ts +33 -0
  64. package/generated/in.gesture.d.ts +64 -0
  65. package/generated/in.keyboard.d.ts +18 -0
  66. package/generated/in.mapper.d.ts +23 -0
  67. package/generated/in.onscreen.d.ts +58 -0
  68. package/generated/in.state.d.ts +34 -0
  69. package/generated/in.textbox.d.ts +26 -0
  70. package/generated/in.triggers.d.ts +180 -0
  71. package/generated/lang.lang.d.ts +33 -0
  72. package/generated/log.log.d.ts +40 -0
  73. package/generated/metrics.fps.d.ts +16 -0
  74. package/generated/metrics.mem.d.ts +16 -0
  75. package/generated/monarch.monarch.d.ts +412 -0
  76. package/generated/monarch.transitions.easings.d.ts +65 -0
  77. package/generated/monarch.transitions.gui.d.ts +197 -0
  78. package/generated/nakama.engine.defold.d.ts +24 -0
  79. package/generated/nakama.nakama.d.ts +594 -0
  80. package/generated/nakama.util.log.d.ts +10 -0
  81. package/generated/narrator.narrator.d.ts +66 -0
  82. package/generated/orthographic.camera.d.ts +308 -0
  83. package/generated/persist.persist.d.ts +34 -0
  84. package/generated/platypus.platypus.d.ts +76 -0
  85. package/generated/proto.proto.d.ts +36 -0
  86. package/generated/rendy.rendy.d.ts +184 -0
  87. package/generated/richtext.color.d.ts +33 -0
  88. package/generated/richtext.richtext.d.ts +126 -0
  89. package/generated/richtext.tags.d.ts +12 -0
  90. package/generated/saver.saver.d.ts +44 -0
  91. package/generated/saver.storage.d.ts +16 -0
  92. package/generated/squid.squid.d.ts +106 -0
  93. package/generated/starly.starly.d.ts +148 -0
  94. package/generated/tweener.tweener.d.ts +151 -0
  95. package/generated/yagames.yagames.d.ts +279 -0
  96. package/generated/zzfx.api.d.ts +20 -0
  97. package/library-classification.json +726 -0
  98. package/library-targets.json +291 -0
  99. package/package.json +180 -0
  100. package/scripts/extract-api-doc.ts +418 -0
  101. package/scripts/sync-library-types.ts +542 -0
@@ -0,0 +1,1065 @@
1
+ {
2
+ "info": {
3
+ "namespace": "monarch.monarch",
4
+ "brief": "Monarch is a screen manager for the Defold game engine.",
5
+ "description": "Monarch is a screen manager for the Defold game engine."
6
+ },
7
+ "elements": [
8
+ {
9
+ "type": "TYPEDEF",
10
+ "name": "ScreenId"
11
+ },
12
+ {
13
+ "type": "TYPEDEF",
14
+ "name": "ShowOptions"
15
+ },
16
+ {
17
+ "type": "TYPEDEF",
18
+ "name": "ReplaceOptions"
19
+ },
20
+ {
21
+ "type": "TYPEDEF",
22
+ "name": "RegisterProxyOptions"
23
+ },
24
+ {
25
+ "type": "TYPEDEF",
26
+ "name": "BackOptions"
27
+ },
28
+ {
29
+ "type": "TYPEDEF",
30
+ "name": "PreloadOptions"
31
+ },
32
+ {
33
+ "type": "TYPEDEF",
34
+ "name": "Data"
35
+ },
36
+ {
37
+ "type": "TYPEDEF",
38
+ "name": "Message"
39
+ },
40
+ {
41
+ "type": "TYPEDEF",
42
+ "name": "Callback"
43
+ },
44
+ {
45
+ "type": "VARIABLE",
46
+ "name": "TRANSITION",
47
+ "types": [
48
+ "{ DONE: Hash; SHOW_IN: Hash; SHOW_OUT: Hash; BACK_IN: Hash; BACK_OUT: Hash; }"
49
+ ],
50
+ "fields": [
51
+ {
52
+ "name": "DONE",
53
+ "doc": "",
54
+ "types": [
55
+ "Hash"
56
+ ],
57
+ "is_optional": "False"
58
+ },
59
+ {
60
+ "name": "SHOW_IN",
61
+ "doc": "",
62
+ "types": [
63
+ "Hash"
64
+ ],
65
+ "is_optional": "False"
66
+ },
67
+ {
68
+ "name": "SHOW_OUT",
69
+ "doc": "",
70
+ "types": [
71
+ "Hash"
72
+ ],
73
+ "is_optional": "False"
74
+ },
75
+ {
76
+ "name": "BACK_IN",
77
+ "doc": "",
78
+ "types": [
79
+ "Hash"
80
+ ],
81
+ "is_optional": "False"
82
+ },
83
+ {
84
+ "name": "BACK_OUT",
85
+ "doc": "",
86
+ "types": [
87
+ "Hash"
88
+ ],
89
+ "is_optional": "False"
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "type": "VARIABLE",
95
+ "name": "FOCUS",
96
+ "types": [
97
+ "{ GAINED: Hash; LOST: Hash; }"
98
+ ],
99
+ "fields": [
100
+ {
101
+ "name": "GAINED",
102
+ "doc": "",
103
+ "types": [
104
+ "Hash"
105
+ ],
106
+ "is_optional": "False"
107
+ },
108
+ {
109
+ "name": "LOST",
110
+ "doc": "",
111
+ "types": [
112
+ "Hash"
113
+ ],
114
+ "is_optional": "False"
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ "type": "VARIABLE",
120
+ "name": "SCREEN_TRANSITION_IN_STARTED",
121
+ "types": [
122
+ "Hash"
123
+ ]
124
+ },
125
+ {
126
+ "type": "VARIABLE",
127
+ "name": "SCREEN_TRANSITION_IN_FINISHED",
128
+ "types": [
129
+ "Hash"
130
+ ]
131
+ },
132
+ {
133
+ "type": "VARIABLE",
134
+ "name": "SCREEN_TRANSITION_OUT_STARTED",
135
+ "types": [
136
+ "Hash"
137
+ ]
138
+ },
139
+ {
140
+ "type": "VARIABLE",
141
+ "name": "SCREEN_TRANSITION_OUT_FINISHED",
142
+ "types": [
143
+ "Hash"
144
+ ]
145
+ },
146
+ {
147
+ "type": "VARIABLE",
148
+ "name": "SCREEN_TRANSITION_FAILED",
149
+ "types": [
150
+ "Hash"
151
+ ]
152
+ },
153
+ {
154
+ "type": "FUNCTION",
155
+ "name": "debug",
156
+ "brief": "Enable verbose logging of the internals of Monarch.",
157
+ "description": "Enable verbose logging of the internals of Monarch.",
158
+ "parameters": [],
159
+ "returnvalues": []
160
+ },
161
+ {
162
+ "type": "FUNCTION",
163
+ "name": "in_stack",
164
+ "brief": "Check if a screen exists in the current screen stack",
165
+ "description": "Check if a screen exists in the current screen stack",
166
+ "parameters": [
167
+ {
168
+ "name": "screen_id",
169
+ "doc": "",
170
+ "types": [
171
+ "ScreenId"
172
+ ],
173
+ "is_optional": "False"
174
+ }
175
+ ],
176
+ "returnvalues": [
177
+ {
178
+ "name": "",
179
+ "doc": "true of the screen is in the stack",
180
+ "types": [
181
+ "boolean"
182
+ ]
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "type": "FUNCTION",
188
+ "name": "is_top",
189
+ "brief": "Check if a Monarch screen is at the top of the view stack.",
190
+ "description": "Check if a Monarch screen is at the top of the view stack.",
191
+ "parameters": [
192
+ {
193
+ "name": "screen_id",
194
+ "doc": "",
195
+ "types": [
196
+ "ScreenId"
197
+ ],
198
+ "is_optional": "False"
199
+ }
200
+ ],
201
+ "returnvalues": [
202
+ {
203
+ "name": "",
204
+ "doc": "true if the screen is at the top of the stack",
205
+ "types": [
206
+ "boolean"
207
+ ]
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "type": "FUNCTION",
213
+ "name": "is_visible",
214
+ "brief": "Check if a Monarch screen is visible.",
215
+ "description": "Check if a Monarch screen is visible.",
216
+ "parameters": [
217
+ {
218
+ "name": "screen_id",
219
+ "doc": "",
220
+ "types": [
221
+ "ScreenId"
222
+ ],
223
+ "is_optional": "False"
224
+ }
225
+ ],
226
+ "returnvalues": [
227
+ {
228
+ "name": "",
229
+ "doc": "true if the screen is visible",
230
+ "types": [
231
+ "boolean"
232
+ ]
233
+ }
234
+ ]
235
+ },
236
+ {
237
+ "type": "FUNCTION",
238
+ "name": "is_loaded",
239
+ "brief": "Check if a screen is loaded",
240
+ "description": "Check if a screen is loaded",
241
+ "parameters": [
242
+ {
243
+ "name": "screen_id",
244
+ "doc": "",
245
+ "types": [
246
+ "ScreenId"
247
+ ],
248
+ "is_optional": "False"
249
+ }
250
+ ],
251
+ "returnvalues": [
252
+ {
253
+ "name": "",
254
+ "doc": "true if the screen is loaded",
255
+ "types": [
256
+ "boolean"
257
+ ]
258
+ }
259
+ ]
260
+ },
261
+ {
262
+ "type": "FUNCTION",
263
+ "name": "is_popup",
264
+ "brief": "Check if a screen is a popup",
265
+ "description": "Check if a screen is a popup",
266
+ "parameters": [
267
+ {
268
+ "name": "screen_id",
269
+ "doc": "",
270
+ "types": [
271
+ "ScreenId"
272
+ ],
273
+ "is_optional": "False"
274
+ }
275
+ ],
276
+ "returnvalues": [
277
+ {
278
+ "name": "",
279
+ "doc": "true if the screen is a popup",
280
+ "types": [
281
+ "boolean"
282
+ ]
283
+ }
284
+ ]
285
+ },
286
+ {
287
+ "type": "FUNCTION",
288
+ "name": "register_proxy",
289
+ "brief": "Register a new screen contained in a collection proxy.",
290
+ "description": "Register a new screen contained in a collection proxy.\nThis is done automatically by the screen_proxy.script. It is expected that\nthe caller of this function is a script component attached to the same game\nobject as the proxy. This is required since monarch will acquire and\nrelease input focus of the game object where the proxy is attached.",
291
+ "parameters": [
292
+ {
293
+ "name": "screen_id",
294
+ "doc": "Unique id of the screen",
295
+ "types": [
296
+ "ScreenId"
297
+ ],
298
+ "is_optional": "False"
299
+ },
300
+ {
301
+ "name": "proxy",
302
+ "doc": "URL to the collection proxy containing the screen",
303
+ "types": [
304
+ "Url"
305
+ ],
306
+ "is_optional": "False"
307
+ },
308
+ {
309
+ "name": "settings",
310
+ "doc": "Settings table for screen. Accepted values:\n* popup - true if the screen is a popup\n* popup_on_popup - true if this popup can be shown on top of\nanother popup or false if an underlying popup should be closed\n* timestep_below_popup - Timestep to set on proxy when below a popup\n* screen_keeps_input_focus_when_below_popup - If this screen should\nkeep input focus when below a popup\n* others_keep_input_focus_when_below_screen - If screens below this\nscreen should keep input focus\n* auto_preload - true if the screen should be automatically preloaded",
311
+ "types": [
312
+ "RegisterProxyOptions"
313
+ ],
314
+ "is_optional": "False"
315
+ }
316
+ ],
317
+ "returnvalues": []
318
+ },
319
+ {
320
+ "type": "FUNCTION",
321
+ "name": "register_factory",
322
+ "brief": "Register a new screen contained in a collection factory.",
323
+ "description": "Register a new screen contained in a collection factory.\nThis is done automatically by the screen_factory.script. It is expected that\nthe caller of this function is a script component attached to the same game\nobject as the factory. This is required since monarch will acquire and\nrelease input focus of the game object where the factory is attached.",
324
+ "parameters": [
325
+ {
326
+ "name": "screen_id",
327
+ "doc": "Unique id of the screen",
328
+ "types": [
329
+ "ScreenId"
330
+ ],
331
+ "is_optional": "False"
332
+ },
333
+ {
334
+ "name": "factory",
335
+ "doc": "URL to the collection factory containing the screen",
336
+ "types": [
337
+ "Url"
338
+ ],
339
+ "is_optional": "False"
340
+ },
341
+ {
342
+ "name": "settings",
343
+ "doc": "Settings table for screen. Accepted values:\n* popup - true if the screen is a popup\n* popup_on_popup - true if this popup can be shown on top of\nanother popup or false if an underlying popup should be closed\n* screen_keeps_input_focus_when_below_popup - If this screen should\nkeep input focus when below a popup\n* others_keep_input_focus_when_below_screen - If screens below this\nscreen should keep input focus\n* auto_preload - true if the screen should be automatically preloaded",
344
+ "types": [
345
+ "RegisterProxyOptions"
346
+ ],
347
+ "is_optional": "False"
348
+ }
349
+ ],
350
+ "returnvalues": []
351
+ },
352
+ {
353
+ "type": "FUNCTION",
354
+ "name": "unregister",
355
+ "brief": "Unregister a screen",
356
+ "description": "Unregister a screen\nThis is done automatically by the screen.script",
357
+ "parameters": [
358
+ {
359
+ "name": "screen_id",
360
+ "doc": "Id of the screen to unregister",
361
+ "types": [
362
+ "ScreenId"
363
+ ],
364
+ "is_optional": "False"
365
+ }
366
+ ],
367
+ "returnvalues": []
368
+ },
369
+ {
370
+ "type": "FUNCTION",
371
+ "name": "data",
372
+ "brief": "Get data associated with a screen",
373
+ "description": "Get data associated with a screen",
374
+ "parameters": [
375
+ {
376
+ "name": "screen_id",
377
+ "doc": "Id of the screen to get data for",
378
+ "types": [
379
+ "ScreenId"
380
+ ],
381
+ "is_optional": "False"
382
+ }
383
+ ],
384
+ "returnvalues": [
385
+ {
386
+ "name": "",
387
+ "doc": "Data associated with the screen",
388
+ "types": [
389
+ "Data"
390
+ ]
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "type": "FUNCTION",
396
+ "name": "screen_exists",
397
+ "brief": "Check if a Monarch screen exists.",
398
+ "description": "Check if a Monarch screen exists.",
399
+ "parameters": [
400
+ {
401
+ "name": "screen_id",
402
+ "doc": "Id of the screen to check if is registered",
403
+ "types": [
404
+ "ScreenId"
405
+ ],
406
+ "is_optional": "False"
407
+ }
408
+ ],
409
+ "returnvalues": [
410
+ {
411
+ "name": "",
412
+ "doc": "True or False if the screen id is registered or not",
413
+ "types": [
414
+ "boolean"
415
+ ]
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "type": "FUNCTION",
421
+ "name": "is_busy",
422
+ "brief": "Check if Monarch is busy showing and/or hiding a screen.",
423
+ "description": "Check if Monarch is busy showing and/or hiding a screen.",
424
+ "parameters": [],
425
+ "returnvalues": [
426
+ {
427
+ "name": "",
428
+ "doc": "true if busy",
429
+ "types": [
430
+ "boolean"
431
+ ]
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "type": "FUNCTION",
437
+ "name": "show",
438
+ "brief": "Show a Monarch screen.",
439
+ "description": "Show a Monarch screen.",
440
+ "parameters": [
441
+ {
442
+ "name": "screen_id",
443
+ "doc": "Id of the screen to check if is registered",
444
+ "types": [
445
+ "ScreenId"
446
+ ],
447
+ "is_optional": "False"
448
+ },
449
+ {
450
+ "name": "options",
451
+ "doc": "Table with options when showing the screen (can be nil). Valid values:\n- clear - Set to true if the stack should be cleared down to an existing instance of the screen\n- reload - Set to true if screen should be reloaded if it already exists in the stack and is loaded.\nThis would be the case if doing a show() from a popup on the screen just below the popup.\n- sequential - Set to true to wait for the previous screen to show itself out before starting the\nshow in transition even when transitioning to a different scene ID.\n- no_stack - Set to true to load the screen without adding it to the screen stack.\n- pop - The number of screens to pop from the stack before adding the new one.",
452
+ "types": [
453
+ "ShowOptions"
454
+ ],
455
+ "is_optional": "True"
456
+ },
457
+ {
458
+ "name": "data",
459
+ "doc": "Optional data to set on the screen. Can be retrieved by the `data()` function",
460
+ "types": [
461
+ "Data"
462
+ ],
463
+ "is_optional": "True"
464
+ },
465
+ {
466
+ "name": "callback",
467
+ "doc": "Optional callback to invoke when screen is shown",
468
+ "types": [
469
+ "Callback"
470
+ ],
471
+ "is_optional": "True"
472
+ }
473
+ ],
474
+ "returnvalues": []
475
+ },
476
+ {
477
+ "type": "FUNCTION",
478
+ "name": "replace",
479
+ "brief": "Replace the top of the stack with a new screen.",
480
+ "description": "Replace the top of the stack with a new screen.",
481
+ "parameters": [
482
+ {
483
+ "name": "screen_id",
484
+ "doc": "Id of the screen to show.",
485
+ "types": [
486
+ "ScreenId"
487
+ ],
488
+ "is_optional": "False"
489
+ },
490
+ {
491
+ "name": "options",
492
+ "doc": "Table with options when showing the screen (can be nil). Valid values:\n- clear {boolean} - Set to true if the stack should be cleared down to an existing instance of the screen.\n- reload {boolean} - Set to true if the screen should be reloaded if it already exists in the stack and is loaded.\nThis would be the case if doing a show() from a popup on the screen just below the popup.\n- no_stack {boolean} - Set to true to load the screen without adding it to the screen stack.",
493
+ "types": [
494
+ "ReplaceOptions"
495
+ ],
496
+ "is_optional": "True"
497
+ },
498
+ {
499
+ "name": "data",
500
+ "doc": "Optional data to set on the screen. Can be retrieved by the data() function.",
501
+ "types": [
502
+ "Data"
503
+ ],
504
+ "is_optional": "True"
505
+ },
506
+ {
507
+ "name": "callback",
508
+ "doc": "Optional callback to invoke when the screen is shown.",
509
+ "types": [
510
+ "Callback"
511
+ ],
512
+ "is_optional": "True"
513
+ }
514
+ ],
515
+ "returnvalues": []
516
+ },
517
+ {
518
+ "type": "FUNCTION",
519
+ "name": "hide",
520
+ "brief": "Hide a screen. The screen must either be at the top of the stack or",
521
+ "description": "Hide a screen. The screen must either be at the top of the stack or\nvisible but not added to the stack (through the no_stack option).",
522
+ "parameters": [
523
+ {
524
+ "name": "screen_id",
525
+ "doc": "Id of the screen to hide.",
526
+ "types": [
527
+ "ScreenId"
528
+ ],
529
+ "is_optional": "False"
530
+ },
531
+ {
532
+ "name": "callback",
533
+ "doc": "Optional callback to invoke when the screen is hidden.",
534
+ "types": [
535
+ "Callback"
536
+ ],
537
+ "is_optional": "True"
538
+ }
539
+ ],
540
+ "returnvalues": [
541
+ {
542
+ "name": "",
543
+ "doc": "True if successfully hiding, false if busy or for some other reason unable to hide the screen.",
544
+ "types": [
545
+ "boolean"
546
+ ]
547
+ }
548
+ ]
549
+ },
550
+ {
551
+ "type": "FUNCTION",
552
+ "name": "clear",
553
+ "brief": "Clear the stack completely. Any visible screens will be hidden by navigating back out",
554
+ "description": "Clear the stack completely. Any visible screens will be hidden by navigating back out\nfrom them.",
555
+ "parameters": [
556
+ {
557
+ "name": "callback",
558
+ "doc": "Optional callback to invoke when the stack has been cleared.",
559
+ "types": [
560
+ "Callback"
561
+ ],
562
+ "is_optional": "True"
563
+ }
564
+ ],
565
+ "returnvalues": []
566
+ },
567
+ {
568
+ "type": "FUNCTION",
569
+ "name": "back",
570
+ "brief": "Go back to the previous screen in the stack.",
571
+ "description": "Go back to the previous screen in the stack.",
572
+ "parameters": [
573
+ {
574
+ "name": "options",
575
+ "doc": "Table with options when backing out from the screen (can be nil).\nValid values:\n- sequential {boolean} - Set to true to wait for the current screen to hide itself out before starting the\nback in transition even when transitioning to a different scene ID.",
576
+ "types": [
577
+ "BackOptions"
578
+ ],
579
+ "is_optional": "True"
580
+ },
581
+ {
582
+ "name": "data",
583
+ "doc": "Optional data to set for the previous screen.",
584
+ "types": [
585
+ "Data"
586
+ ],
587
+ "is_optional": "True"
588
+ },
589
+ {
590
+ "name": "callback",
591
+ "doc": "Optional callback to invoke when the previous screen is visible again.",
592
+ "types": [
593
+ "Callback"
594
+ ],
595
+ "is_optional": "True"
596
+ }
597
+ ],
598
+ "returnvalues": []
599
+ },
600
+ {
601
+ "type": "FUNCTION",
602
+ "name": "is_preloading",
603
+ "brief": "Check if a screen is preloading via monarch.preload() or automatically",
604
+ "description": "Check if a screen is preloading via monarch.preload() or automatically\nvia the Preload screen option.",
605
+ "parameters": [
606
+ {
607
+ "name": "screen_id",
608
+ "doc": "Screen id.",
609
+ "types": [
610
+ "ScreenId"
611
+ ],
612
+ "is_optional": "False"
613
+ }
614
+ ],
615
+ "returnvalues": [
616
+ {
617
+ "name": "",
618
+ "doc": "True if preloading, false otherwise.",
619
+ "types": [
620
+ "boolean"
621
+ ]
622
+ }
623
+ ]
624
+ },
625
+ {
626
+ "type": "FUNCTION",
627
+ "name": "is_preloaded",
628
+ "brief": "",
629
+ "description": "",
630
+ "parameters": [
631
+ {
632
+ "name": "screen_id",
633
+ "doc": "",
634
+ "types": [
635
+ "ScreenId"
636
+ ],
637
+ "is_optional": "False"
638
+ }
639
+ ],
640
+ "returnvalues": [
641
+ {
642
+ "name": "",
643
+ "doc": "",
644
+ "types": [
645
+ "boolean"
646
+ ]
647
+ }
648
+ ]
649
+ },
650
+ {
651
+ "type": "FUNCTION",
652
+ "name": "when_preloaded",
653
+ "brief": "Invoke a callback when a specific screen has been preloaded.",
654
+ "description": "Invoke a callback when a specific screen has been preloaded.\nThis is mainly useful on app start when wanting to show a screen that\nhas the `Preload` flag set (since it will immediately start to load which\nwould prevent a call to `monarch.show` from having any effect).",
655
+ "parameters": [
656
+ {
657
+ "name": "screen_id",
658
+ "doc": "Id of the screen to monitor for preload completion.",
659
+ "types": [
660
+ "ScreenId"
661
+ ],
662
+ "is_optional": "False"
663
+ },
664
+ {
665
+ "name": "callback",
666
+ "doc": "Callback to invoke when the screen has been preloaded.",
667
+ "types": [
668
+ "(screen_id?: ScreenId) => void"
669
+ ],
670
+ "is_optional": "False"
671
+ }
672
+ ],
673
+ "returnvalues": []
674
+ },
675
+ {
676
+ "type": "FUNCTION",
677
+ "name": "preload",
678
+ "brief": "Preload a screen. This will load but not enable and show a screen.",
679
+ "description": "Preload a screen. This will load but not enable and show a screen.\nUseful for \"heavier\" screens that you wish to show without any delay.",
680
+ "parameters": [
681
+ {
682
+ "name": "screen_id",
683
+ "doc": "Id of the screen to preload.",
684
+ "types": [
685
+ "ScreenId"
686
+ ],
687
+ "is_optional": "False"
688
+ },
689
+ {
690
+ "name": "options",
691
+ "doc": "Options for preloading the screen.",
692
+ "types": [
693
+ "PreloadOptions"
694
+ ],
695
+ "is_optional": "True"
696
+ },
697
+ {
698
+ "name": "callback",
699
+ "doc": "Optional callback to invoke when the screen is loaded.",
700
+ "types": [
701
+ "Callback"
702
+ ],
703
+ "is_optional": "True"
704
+ }
705
+ ],
706
+ "returnvalues": []
707
+ },
708
+ {
709
+ "type": "FUNCTION",
710
+ "name": "has_missing_resources",
711
+ "brief": "Check if a screen has missing resources, always returns false for factory",
712
+ "description": "Check if a screen has missing resources, always returns false for factory",
713
+ "parameters": [
714
+ {
715
+ "name": "screen_id",
716
+ "doc": "Id of the screen to preload",
717
+ "types": [
718
+ "ScreenId"
719
+ ],
720
+ "is_optional": "False"
721
+ }
722
+ ],
723
+ "returnvalues": [
724
+ {
725
+ "name": "",
726
+ "doc": "",
727
+ "types": [
728
+ "boolean"
729
+ ]
730
+ }
731
+ ]
732
+ },
733
+ {
734
+ "type": "FUNCTION",
735
+ "name": "unload",
736
+ "brief": "Unload a preloaded monarch screen.",
737
+ "description": "Unload a preloaded monarch screen.",
738
+ "parameters": [
739
+ {
740
+ "name": "screen_id",
741
+ "doc": "Id of the screen to unload.",
742
+ "types": [
743
+ "ScreenId"
744
+ ],
745
+ "is_optional": "False"
746
+ },
747
+ {
748
+ "name": "callback",
749
+ "doc": "Optional callback to invoke when the screen is unloaded.",
750
+ "types": [
751
+ "Callback"
752
+ ],
753
+ "is_optional": "True"
754
+ }
755
+ ],
756
+ "returnvalues": []
757
+ },
758
+ {
759
+ "type": "FUNCTION",
760
+ "name": "post",
761
+ "brief": "Post a message to a screen using msg.post.",
762
+ "description": "Post a message to a screen using msg.post.",
763
+ "parameters": [
764
+ {
765
+ "name": "screen_id",
766
+ "doc": "Id of the screen to send the message to.",
767
+ "types": [
768
+ "ScreenId"
769
+ ],
770
+ "is_optional": "False"
771
+ },
772
+ {
773
+ "name": "message_id",
774
+ "doc": "Id of the message to send.",
775
+ "types": [
776
+ "Hash | string"
777
+ ],
778
+ "is_optional": "False"
779
+ },
780
+ {
781
+ "name": "message",
782
+ "doc": "Optional message data to send.",
783
+ "types": [
784
+ "Message"
785
+ ],
786
+ "is_optional": "True"
787
+ }
788
+ ],
789
+ "returnvalues": [
790
+ {
791
+ "name": "",
792
+ "doc": "result - True if the message is sent successfully.",
793
+ "types": [
794
+ "LuaMultiReturn<[ boolean, string | undefined ]>"
795
+ ]
796
+ }
797
+ ]
798
+ },
799
+ {
800
+ "type": "FUNCTION",
801
+ "name": "on_message",
802
+ "brief": "",
803
+ "description": "",
804
+ "parameters": [
805
+ {
806
+ "name": "message_id",
807
+ "doc": "",
808
+ "types": [
809
+ "Hash | string"
810
+ ],
811
+ "is_optional": "False"
812
+ },
813
+ {
814
+ "name": "message",
815
+ "doc": "",
816
+ "types": [
817
+ "Message"
818
+ ],
819
+ "is_optional": "False"
820
+ },
821
+ {
822
+ "name": "sender",
823
+ "doc": "",
824
+ "types": [
825
+ "Url"
826
+ ],
827
+ "is_optional": "False"
828
+ }
829
+ ],
830
+ "returnvalues": []
831
+ },
832
+ {
833
+ "type": "FUNCTION",
834
+ "name": "get_stack",
835
+ "brief": "Get a list of IDs for the current screen stack.",
836
+ "description": "Get a list of IDs for the current screen stack.\n(Primarily used for unit testing, but could have uses outside testing.)",
837
+ "parameters": [],
838
+ "returnvalues": [
839
+ {
840
+ "name": "",
841
+ "doc": "Table with screen IDs. The first entry is at the bottom of the\nstack, and the last value is at the top (and currently visible).",
842
+ "types": [
843
+ "ScreenId[]"
844
+ ]
845
+ }
846
+ ]
847
+ },
848
+ {
849
+ "type": "FUNCTION",
850
+ "name": "top",
851
+ "brief": "Get the screen on top of the stack.",
852
+ "description": "Get the screen on top of the stack.",
853
+ "parameters": [
854
+ {
855
+ "name": "offset",
856
+ "doc": "Optional offset from the top of the stack (e.g., -1 for the previous screen).",
857
+ "types": [
858
+ "number"
859
+ ],
860
+ "is_optional": "True"
861
+ }
862
+ ],
863
+ "returnvalues": [
864
+ {
865
+ "name": "",
866
+ "doc": "Id of the requested screen.",
867
+ "types": [
868
+ "ScreenId"
869
+ ]
870
+ }
871
+ ]
872
+ },
873
+ {
874
+ "type": "FUNCTION",
875
+ "name": "bottom",
876
+ "brief": "Get the screen at the bottom of the stack.",
877
+ "description": "Get the screen at the bottom of the stack.",
878
+ "parameters": [
879
+ {
880
+ "name": "offset",
881
+ "doc": "Optional offset from the bottom of the stack.",
882
+ "types": [
883
+ "number"
884
+ ],
885
+ "is_optional": "True"
886
+ }
887
+ ],
888
+ "returnvalues": [
889
+ {
890
+ "name": "",
891
+ "doc": "Id of the requested screen.",
892
+ "types": [
893
+ "ScreenId"
894
+ ]
895
+ }
896
+ ]
897
+ },
898
+ {
899
+ "type": "FUNCTION",
900
+ "name": "set_timestep_below_popup",
901
+ "brief": "Set the timestep to apply for a screen when below a popup.",
902
+ "description": "Set the timestep to apply for a screen when below a popup.",
903
+ "parameters": [
904
+ {
905
+ "name": "screen_id",
906
+ "doc": "Id of the screen to change the timestep setting for.",
907
+ "types": [
908
+ "ScreenId"
909
+ ],
910
+ "is_optional": "False"
911
+ },
912
+ {
913
+ "name": "timestep",
914
+ "doc": "Timestep to apply.",
915
+ "types": [
916
+ "number"
917
+ ],
918
+ "is_optional": "False"
919
+ }
920
+ ],
921
+ "returnvalues": []
922
+ },
923
+ {
924
+ "type": "FUNCTION",
925
+ "name": "on_transition",
926
+ "brief": "Set a function to call when a transition should be started.",
927
+ "description": "Set a function to call when a transition should be started.\nThe function will receive (`message_id`, `message`, `sender`).\nIMPORTANT! You must call `monarch.on_message()` from the same script as\nthis function was called.",
928
+ "parameters": [
929
+ {
930
+ "name": "screen_id",
931
+ "doc": "Screen id to associate the transition with.",
932
+ "types": [
933
+ "ScreenId"
934
+ ],
935
+ "is_optional": "False"
936
+ },
937
+ {
938
+ "name": "fn",
939
+ "doc": "Transition handler function.",
940
+ "types": [
941
+ "(message_id: string, message: Message, sender: Url) => void"
942
+ ],
943
+ "is_optional": "False"
944
+ }
945
+ ],
946
+ "returnvalues": []
947
+ },
948
+ {
949
+ "type": "FUNCTION",
950
+ "name": "on_focus_changed",
951
+ "brief": "Set a function to call when a screen gains or loses focus.",
952
+ "description": "Set a function to call when a screen gains or loses focus.\nThe function will receive (`message_id`, `message`, `sender`).\nIMPORTANT! You must call `monarch.on_message()` from the same script as\nthis function was called.",
953
+ "parameters": [
954
+ {
955
+ "name": "screen_id",
956
+ "doc": "Screen id to associate the focus listener function with.",
957
+ "types": [
958
+ "ScreenId"
959
+ ],
960
+ "is_optional": "False"
961
+ },
962
+ {
963
+ "name": "fn",
964
+ "doc": "Focus listener function.",
965
+ "types": [
966
+ "(message_id: string, message: Message, sender: Url) => void"
967
+ ],
968
+ "is_optional": "False"
969
+ }
970
+ ],
971
+ "returnvalues": []
972
+ },
973
+ {
974
+ "type": "FUNCTION",
975
+ "name": "on_post",
976
+ "brief": "Set either a function to be called when `msg.post()` is called on a specific screen",
977
+ "description": "Set either a function to be called when `msg.post()` is called on a specific screen\nor a URL where the message is sent.\nIMPORTANT! If you provide a function, you must also make sure to call\n`monarch.on_message(message_id, message, sender)` from the same script as\nthis function was called.",
978
+ "parameters": [
979
+ {
980
+ "name": "screen_id",
981
+ "doc": "Screen id to associate the message listener function with.",
982
+ "types": [
983
+ "ScreenId"
984
+ ],
985
+ "is_optional": "False"
986
+ },
987
+ {
988
+ "name": "fn_or_url",
989
+ "doc": "The function to call or URL to send the message to.",
990
+ "types": [
991
+ "Callback | Url | string"
992
+ ],
993
+ "is_optional": "False"
994
+ }
995
+ ],
996
+ "returnvalues": []
997
+ },
998
+ {
999
+ "type": "FUNCTION",
1000
+ "name": "add_listener",
1001
+ "brief": "Add a listener to be notified when screens are shown or hidden.",
1002
+ "description": "Add a listener to be notified when screens are shown or hidden.",
1003
+ "parameters": [
1004
+ {
1005
+ "name": "url",
1006
+ "doc": "The url to notify, undefined for the current url.",
1007
+ "types": [
1008
+ "Url"
1009
+ ],
1010
+ "is_optional": "True"
1011
+ }
1012
+ ],
1013
+ "returnvalues": []
1014
+ },
1015
+ {
1016
+ "type": "FUNCTION",
1017
+ "name": "remove_listener",
1018
+ "brief": "Remove a previously added listener.",
1019
+ "description": "Remove a previously added listener.",
1020
+ "parameters": [
1021
+ {
1022
+ "name": "url",
1023
+ "doc": "The url to remove, nil for current url.",
1024
+ "types": [
1025
+ "Url"
1026
+ ],
1027
+ "is_optional": "True"
1028
+ }
1029
+ ],
1030
+ "returnvalues": []
1031
+ },
1032
+ {
1033
+ "type": "FUNCTION",
1034
+ "name": "dump_stack",
1035
+ "brief": "",
1036
+ "description": "",
1037
+ "parameters": [],
1038
+ "returnvalues": [
1039
+ {
1040
+ "name": "",
1041
+ "doc": "",
1042
+ "types": [
1043
+ "string"
1044
+ ]
1045
+ }
1046
+ ]
1047
+ },
1048
+ {
1049
+ "type": "FUNCTION",
1050
+ "name": "queue_size",
1051
+ "brief": "",
1052
+ "description": "",
1053
+ "parameters": [],
1054
+ "returnvalues": [
1055
+ {
1056
+ "name": "",
1057
+ "doc": "",
1058
+ "types": [
1059
+ "number"
1060
+ ]
1061
+ }
1062
+ ]
1063
+ }
1064
+ ]
1065
+ }