@drincs/pixi-vn 0.6.0 → 0.6.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.
Files changed (415) hide show
  1. package/dist/{TickerBase-RQDWNI4K.d.ts → TickerBase-3rLpDpmb.d.ts} +27 -13
  2. package/dist/{TickerBase-B5CQCJs8.d.mts → TickerBase-DKYzbzro.d.mts} +27 -13
  3. package/dist/classes/CanvasEvent.d.mts +7 -1
  4. package/dist/classes/CanvasEvent.d.ts +7 -1
  5. package/dist/classes/CanvasEvent.js +7 -0
  6. package/dist/classes/CanvasEvent.js.map +1 -1
  7. package/dist/classes/CanvasEvent.mjs +7 -0
  8. package/dist/classes/CanvasEvent.mjs.map +1 -1
  9. package/dist/classes/CharacterBaseModel.d.mts +2 -26
  10. package/dist/classes/CharacterBaseModel.d.ts +2 -26
  11. package/dist/classes/CharacterBaseModel.js +544 -241
  12. package/dist/classes/CharacterBaseModel.js.map +1 -1
  13. package/dist/classes/CharacterBaseModel.mjs +540 -241
  14. package/dist/classes/CharacterBaseModel.mjs.map +1 -1
  15. package/dist/classes/ChoiceMenuOption.d.mts +27 -17
  16. package/dist/classes/ChoiceMenuOption.d.ts +27 -17
  17. package/dist/classes/ChoiceMenuOption.js +548 -243
  18. package/dist/classes/ChoiceMenuOption.js.map +1 -1
  19. package/dist/classes/ChoiceMenuOption.mjs +544 -243
  20. package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
  21. package/dist/classes/CloseLabel.d.mts +1 -1
  22. package/dist/classes/CloseLabel.d.ts +1 -1
  23. package/dist/classes/CloseLabel.js +1 -1
  24. package/dist/classes/CloseLabel.js.map +1 -1
  25. package/dist/classes/CloseLabel.mjs +1 -1
  26. package/dist/classes/CloseLabel.mjs.map +1 -1
  27. package/dist/classes/DialogueBaseModel.d.mts +3 -2
  28. package/dist/classes/DialogueBaseModel.d.ts +3 -2
  29. package/dist/classes/DialogueBaseModel.js +5 -5
  30. package/dist/classes/DialogueBaseModel.js.map +1 -1
  31. package/dist/classes/DialogueBaseModel.mjs +5 -5
  32. package/dist/classes/DialogueBaseModel.mjs.map +1 -1
  33. package/dist/classes/Label.d.mts +1 -1
  34. package/dist/classes/Label.d.ts +1 -1
  35. package/dist/classes/Label.js +1 -1
  36. package/dist/classes/Label.js.map +1 -1
  37. package/dist/classes/Label.mjs +1 -1
  38. package/dist/classes/Label.mjs.map +1 -1
  39. package/dist/classes/StoredClassModel.d.mts +2 -2
  40. package/dist/classes/StoredClassModel.d.ts +2 -2
  41. package/dist/classes/StoredClassModel.js +544 -241
  42. package/dist/classes/StoredClassModel.js.map +1 -1
  43. package/dist/classes/StoredClassModel.mjs +540 -241
  44. package/dist/classes/StoredClassModel.mjs.map +1 -1
  45. package/dist/classes/canvas/CanvasBase.d.mts +5 -1
  46. package/dist/classes/canvas/CanvasBase.d.ts +5 -1
  47. package/dist/classes/canvas/CanvasBase.js +7 -0
  48. package/dist/classes/canvas/CanvasBase.js.map +1 -1
  49. package/dist/classes/canvas/CanvasBase.mjs +7 -0
  50. package/dist/classes/canvas/CanvasBase.mjs.map +1 -1
  51. package/dist/classes/canvas/CanvasContainer.d.mts +4 -1
  52. package/dist/classes/canvas/CanvasContainer.d.ts +4 -1
  53. package/dist/classes/canvas/CanvasContainer.js +57 -37
  54. package/dist/classes/canvas/CanvasContainer.js.map +1 -1
  55. package/dist/classes/canvas/CanvasContainer.mjs +57 -38
  56. package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
  57. package/dist/classes/canvas/CanvasImage.d.mts +4 -2
  58. package/dist/classes/canvas/CanvasImage.d.ts +4 -2
  59. package/dist/classes/canvas/CanvasImage.js +33 -20
  60. package/dist/classes/canvas/CanvasImage.js.map +1 -1
  61. package/dist/classes/canvas/CanvasImage.mjs +30 -20
  62. package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
  63. package/dist/classes/canvas/CanvasSprite.d.mts +6 -3
  64. package/dist/classes/canvas/CanvasSprite.d.ts +6 -3
  65. package/dist/classes/canvas/CanvasSprite.js +25 -17
  66. package/dist/classes/canvas/CanvasSprite.js.map +1 -1
  67. package/dist/classes/canvas/CanvasSprite.mjs +25 -18
  68. package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
  69. package/dist/classes/canvas/CanvasText.d.mts +6 -3
  70. package/dist/classes/canvas/CanvasText.d.ts +6 -3
  71. package/dist/classes/canvas/CanvasText.js +25 -17
  72. package/dist/classes/canvas/CanvasText.js.map +1 -1
  73. package/dist/classes/canvas/CanvasText.mjs +25 -18
  74. package/dist/classes/canvas/CanvasText.mjs.map +1 -1
  75. package/dist/classes/canvas/index.js +184 -158
  76. package/dist/classes/canvas/index.js.map +1 -1
  77. package/dist/classes/canvas/index.mjs +184 -158
  78. package/dist/classes/canvas/index.mjs.map +1 -1
  79. package/dist/classes/index.d.mts +6 -4
  80. package/dist/classes/index.d.ts +6 -4
  81. package/dist/classes/index.js +560 -248
  82. package/dist/classes/index.js.map +1 -1
  83. package/dist/classes/index.mjs +556 -248
  84. package/dist/classes/index.mjs.map +1 -1
  85. package/dist/classes/ticker/FadeAlphaTicker.d.mts +27 -0
  86. package/dist/classes/ticker/FadeAlphaTicker.d.ts +27 -0
  87. package/dist/classes/ticker/{TickerFadeAlpha.js → FadeAlphaTicker.js} +549 -248
  88. package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -0
  89. package/dist/classes/ticker/{TickerRotate.mjs → FadeAlphaTicker.mjs} +571 -274
  90. package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -0
  91. package/dist/classes/ticker/MoveTicker.d.mts +25 -0
  92. package/dist/classes/ticker/MoveTicker.d.ts +25 -0
  93. package/dist/classes/ticker/{TickerMove.js → MoveTicker.js} +544 -241
  94. package/dist/classes/ticker/MoveTicker.js.map +1 -0
  95. package/dist/classes/ticker/{TickerFadeAlpha.mjs → MoveTicker.mjs} +568 -269
  96. package/dist/classes/ticker/MoveTicker.mjs.map +1 -0
  97. package/dist/classes/ticker/RotateTicker.d.mts +27 -0
  98. package/dist/classes/ticker/RotateTicker.d.ts +27 -0
  99. package/dist/classes/ticker/{TickerRotate.js → RotateTicker.js} +544 -241
  100. package/dist/classes/ticker/RotateTicker.js.map +1 -0
  101. package/dist/classes/ticker/{TickerMove.mjs → RotateTicker.mjs} +558 -259
  102. package/dist/classes/ticker/RotateTicker.mjs.map +1 -0
  103. package/dist/classes/ticker/TickerBase.d.mts +2 -1
  104. package/dist/classes/ticker/TickerBase.d.ts +2 -1
  105. package/dist/classes/ticker/TickerBase.js +12 -6
  106. package/dist/classes/ticker/TickerBase.js.map +1 -1
  107. package/dist/classes/ticker/TickerBase.mjs +12 -6
  108. package/dist/classes/ticker/TickerBase.mjs.map +1 -1
  109. package/dist/classes/ticker/ZoomTicker.d.mts +31 -0
  110. package/dist/classes/ticker/ZoomTicker.d.ts +31 -0
  111. package/dist/classes/ticker/ZoomTicker.js +1647 -0
  112. package/dist/classes/ticker/ZoomTicker.js.map +1 -0
  113. package/dist/classes/ticker/ZoomTicker.mjs +1639 -0
  114. package/dist/classes/ticker/ZoomTicker.mjs.map +1 -0
  115. package/dist/classes/ticker/index.d.mts +11 -8
  116. package/dist/classes/ticker/index.d.ts +11 -8
  117. package/dist/classes/ticker/index.js +567 -266
  118. package/dist/classes/ticker/index.js.map +1 -1
  119. package/dist/classes/ticker/index.mjs +564 -267
  120. package/dist/classes/ticker/index.mjs.map +1 -1
  121. package/dist/constants.d.mts +12 -2
  122. package/dist/constants.d.ts +12 -2
  123. package/dist/constants.js +10 -1
  124. package/dist/constants.js.map +1 -1
  125. package/dist/constants.mjs +9 -2
  126. package/dist/constants.mjs.map +1 -1
  127. package/dist/decorators/CanvasElementDecorator.d.mts +3 -3
  128. package/dist/decorators/CanvasElementDecorator.d.ts +3 -3
  129. package/dist/decorators/CanvasElementDecorator.js +63 -43
  130. package/dist/decorators/CanvasElementDecorator.js.map +1 -1
  131. package/dist/decorators/CanvasElementDecorator.mjs +62 -42
  132. package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
  133. package/dist/decorators/CharacterDecorator.d.mts +1 -0
  134. package/dist/decorators/CharacterDecorator.d.ts +1 -0
  135. package/dist/decorators/CharacterDecorator.js +1 -1
  136. package/dist/decorators/CharacterDecorator.js.map +1 -1
  137. package/dist/decorators/CharacterDecorator.mjs +1 -1
  138. package/dist/decorators/CharacterDecorator.mjs.map +1 -1
  139. package/dist/decorators/EventDecorator.d.mts +7 -7
  140. package/dist/decorators/EventDecorator.d.ts +7 -7
  141. package/dist/decorators/EventDecorator.js +12 -11
  142. package/dist/decorators/EventDecorator.js.map +1 -1
  143. package/dist/decorators/EventDecorator.mjs +11 -10
  144. package/dist/decorators/EventDecorator.mjs.map +1 -1
  145. package/dist/decorators/LabelDecorator.d.mts +4 -3
  146. package/dist/decorators/LabelDecorator.d.ts +4 -3
  147. package/dist/decorators/LabelDecorator.js +546 -243
  148. package/dist/decorators/LabelDecorator.js.map +1 -1
  149. package/dist/decorators/LabelDecorator.mjs +542 -243
  150. package/dist/decorators/LabelDecorator.mjs.map +1 -1
  151. package/dist/decorators/TickerDecorator.d.mts +9 -6
  152. package/dist/decorators/TickerDecorator.d.ts +9 -6
  153. package/dist/decorators/TickerDecorator.js +7 -6
  154. package/dist/decorators/TickerDecorator.js.map +1 -1
  155. package/dist/decorators/TickerDecorator.mjs +7 -6
  156. package/dist/decorators/TickerDecorator.mjs.map +1 -1
  157. package/dist/decorators/index.d.mts +4 -3
  158. package/dist/decorators/index.d.ts +4 -3
  159. package/dist/decorators/index.js +550 -245
  160. package/dist/decorators/index.js.map +1 -1
  161. package/dist/decorators/index.mjs +546 -245
  162. package/dist/decorators/index.mjs.map +1 -1
  163. package/dist/functions/CanvasUtility.js +56 -37
  164. package/dist/functions/CanvasUtility.js.map +1 -1
  165. package/dist/functions/CanvasUtility.mjs +56 -37
  166. package/dist/functions/CanvasUtility.mjs.map +1 -1
  167. package/dist/functions/DialogueUtility.d.mts +7 -5
  168. package/dist/functions/DialogueUtility.d.ts +7 -5
  169. package/dist/functions/DialogueUtility.js +729 -397
  170. package/dist/functions/DialogueUtility.js.map +1 -1
  171. package/dist/functions/DialogueUtility.mjs +729 -397
  172. package/dist/functions/DialogueUtility.mjs.map +1 -1
  173. package/dist/functions/FlagsUtility.js +544 -241
  174. package/dist/functions/FlagsUtility.js.map +1 -1
  175. package/dist/functions/FlagsUtility.mjs +540 -241
  176. package/dist/functions/FlagsUtility.mjs.map +1 -1
  177. package/dist/functions/GameUtility.js +544 -241
  178. package/dist/functions/GameUtility.js.map +1 -1
  179. package/dist/functions/GameUtility.mjs +540 -241
  180. package/dist/functions/GameUtility.mjs.map +1 -1
  181. package/dist/functions/ImageUtility.d.mts +81 -8
  182. package/dist/functions/ImageUtility.d.ts +81 -8
  183. package/dist/functions/ImageUtility.js +911 -387
  184. package/dist/functions/ImageUtility.js.map +1 -1
  185. package/dist/functions/ImageUtility.mjs +899 -387
  186. package/dist/functions/ImageUtility.mjs.map +1 -1
  187. package/dist/functions/SavesUtility.d.mts +9 -5
  188. package/dist/functions/SavesUtility.d.ts +9 -5
  189. package/dist/functions/SavesUtility.js +611 -252
  190. package/dist/functions/SavesUtility.js.map +1 -1
  191. package/dist/functions/SavesUtility.mjs +611 -252
  192. package/dist/functions/SavesUtility.mjs.map +1 -1
  193. package/dist/functions/TickerUtility.d.mts +1 -1
  194. package/dist/functions/TickerUtility.d.ts +1 -1
  195. package/dist/functions/TickerUtility.js +32 -18
  196. package/dist/functions/TickerUtility.js.map +1 -1
  197. package/dist/functions/TickerUtility.mjs +32 -18
  198. package/dist/functions/TickerUtility.mjs.map +1 -1
  199. package/dist/functions/index.d.mts +18 -8
  200. package/dist/functions/index.d.ts +18 -8
  201. package/dist/functions/index.js +832 -279
  202. package/dist/functions/index.js.map +1 -1
  203. package/dist/functions/index.mjs +825 -280
  204. package/dist/functions/index.mjs.map +1 -1
  205. package/dist/index.d.mts +25 -16
  206. package/dist/index.d.ts +25 -16
  207. package/dist/index.js +1547 -290
  208. package/dist/index.js.map +1 -1
  209. package/dist/index.mjs +1538 -290
  210. package/dist/index.mjs.map +1 -1
  211. package/dist/interface/CharacterBaseModelProps.d.mts +27 -0
  212. package/dist/interface/CharacterBaseModelProps.d.ts +27 -0
  213. package/dist/interface/CharacterBaseModelProps.js +4 -0
  214. package/dist/interface/CharacterBaseModelProps.mjs +3 -0
  215. package/dist/interface/DialogueHistory.d.mts +3 -7
  216. package/dist/interface/DialogueHistory.d.ts +3 -7
  217. package/dist/interface/IHistoryStep.d.mts +12 -8
  218. package/dist/interface/IHistoryStep.d.ts +12 -8
  219. package/dist/interface/ISaveData.d.mts +8 -4
  220. package/dist/interface/ISaveData.d.ts +8 -4
  221. package/dist/interface/ITicker.d.mts +2 -1
  222. package/dist/interface/ITicker.d.ts +2 -1
  223. package/dist/interface/ITickersSteps.d.mts +14 -5
  224. package/dist/interface/ITickersSteps.d.ts +14 -5
  225. package/dist/interface/TickerHistory.d.mts +29 -0
  226. package/dist/interface/TickerHistory.d.ts +29 -0
  227. package/dist/{types/ticker/TickerMoveProps.js → interface/TickerHistory.js} +1 -1
  228. package/dist/interface/TickerHistory.mjs +3 -0
  229. package/dist/interface/TickerProgrationType.d.mts +13 -1
  230. package/dist/interface/TickerProgrationType.d.ts +13 -1
  231. package/dist/interface/TickerTimeoutHistory.d.mts +7 -0
  232. package/dist/interface/TickerTimeoutHistory.d.ts +7 -0
  233. package/dist/interface/TickerTimeoutHistory.js +4 -0
  234. package/dist/interface/TickerTimeoutHistory.mjs +3 -0
  235. package/dist/interface/canvas/ICanvasBaseMemory.d.mts +1 -1
  236. package/dist/interface/canvas/ICanvasBaseMemory.d.ts +1 -1
  237. package/dist/interface/canvas/ICanvasImageMemory.d.mts +1 -1
  238. package/dist/interface/canvas/ICanvasImageMemory.d.ts +1 -1
  239. package/dist/interface/canvas/ICanvasSpriteMemory.d.mts +0 -1
  240. package/dist/interface/canvas/ICanvasSpriteMemory.d.ts +0 -1
  241. package/dist/interface/canvas/ICanvasTextTextMemory.d.mts +0 -1
  242. package/dist/interface/canvas/ICanvasTextTextMemory.d.ts +0 -1
  243. package/dist/interface/export/ExportedCanvas.d.mts +11 -3
  244. package/dist/interface/export/ExportedCanvas.d.ts +11 -3
  245. package/dist/interface/export/ExportedStep.d.mts +7 -3
  246. package/dist/interface/export/ExportedStep.d.ts +7 -3
  247. package/dist/interface/export/index.d.mts +8 -4
  248. package/dist/interface/export/index.d.ts +8 -4
  249. package/dist/interface/index.d.mts +14 -11
  250. package/dist/interface/index.d.ts +14 -11
  251. package/dist/labels/BaseCanvasElementTestLabel.d.mts +9 -0
  252. package/dist/labels/BaseCanvasElementTestLabel.d.ts +9 -0
  253. package/dist/labels/BaseCanvasElementTestLabel.js +1888 -0
  254. package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -0
  255. package/dist/labels/BaseCanvasElementTestLabel.mjs +1882 -0
  256. package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -0
  257. package/dist/labels/CanvasEventsTestLabel.d.mts +27 -0
  258. package/dist/labels/CanvasEventsTestLabel.d.ts +27 -0
  259. package/dist/labels/CanvasEventsTestLabel.js +2822 -0
  260. package/dist/labels/CanvasEventsTestLabel.js.map +1 -0
  261. package/dist/labels/CanvasEventsTestLabel.mjs +2816 -0
  262. package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -0
  263. package/dist/labels/CustomTickerCanvasElementTestLabel.d.mts +20 -0
  264. package/dist/labels/CustomTickerCanvasElementTestLabel.d.ts +20 -0
  265. package/dist/labels/CustomTickerCanvasElementTestLabel.js +2792 -0
  266. package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -0
  267. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +2786 -0
  268. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -0
  269. package/dist/labels/ImagesAnimationsTestLabel.d.mts +9 -0
  270. package/dist/labels/ImagesAnimationsTestLabel.d.ts +9 -0
  271. package/dist/labels/ImagesAnimationsTestLabel.js +3378 -0
  272. package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -0
  273. package/dist/labels/ImagesAnimationsTestLabel.mjs +3372 -0
  274. package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -0
  275. package/dist/labels/MarkdownTest.d.mts +9 -0
  276. package/dist/labels/MarkdownTest.d.ts +9 -0
  277. package/dist/labels/MarkdownTest.js +2756 -0
  278. package/dist/labels/MarkdownTest.js.map +1 -0
  279. package/dist/labels/MarkdownTest.mjs +2750 -0
  280. package/dist/labels/MarkdownTest.mjs.map +1 -0
  281. package/dist/labels/StartLabel.d.mts +10 -0
  282. package/dist/labels/StartLabel.d.ts +10 -0
  283. package/dist/labels/StartLabel.js +3736 -0
  284. package/dist/labels/StartLabel.js.map +1 -0
  285. package/dist/labels/StartLabel.mjs +3729 -0
  286. package/dist/labels/StartLabel.mjs.map +1 -0
  287. package/dist/labels/TestConstant.d.mts +17 -0
  288. package/dist/labels/TestConstant.d.ts +17 -0
  289. package/dist/labels/TestConstant.js +1872 -0
  290. package/dist/labels/TestConstant.js.map +1 -0
  291. package/dist/labels/TestConstant.mjs +1856 -0
  292. package/dist/labels/TestConstant.mjs.map +1 -0
  293. package/dist/labels/TickerTestLabel.d.mts +9 -0
  294. package/dist/labels/TickerTestLabel.d.ts +9 -0
  295. package/dist/labels/TickerTestLabel.js +2675 -0
  296. package/dist/labels/TickerTestLabel.js.map +1 -0
  297. package/dist/labels/TickerTestLabel.mjs +2669 -0
  298. package/dist/labels/TickerTestLabel.mjs.map +1 -0
  299. package/dist/labels/index.d.mts +10 -0
  300. package/dist/labels/index.d.ts +10 -0
  301. package/dist/labels/index.js +3736 -0
  302. package/dist/labels/index.js.map +1 -0
  303. package/dist/labels/index.mjs +3729 -0
  304. package/dist/labels/index.mjs.map +1 -0
  305. package/dist/managers/StepManager.d.mts +21 -15
  306. package/dist/managers/StepManager.d.ts +21 -15
  307. package/dist/managers/StepManager.js +610 -251
  308. package/dist/managers/StepManager.js.map +1 -1
  309. package/dist/managers/StepManager.mjs +610 -251
  310. package/dist/managers/StepManager.mjs.map +1 -1
  311. package/dist/managers/WindowManager.d.mts +38 -24
  312. package/dist/managers/WindowManager.d.ts +38 -24
  313. package/dist/managers/WindowManager.js +356 -170
  314. package/dist/managers/WindowManager.js.map +1 -1
  315. package/dist/managers/WindowManager.mjs +352 -170
  316. package/dist/managers/WindowManager.mjs.map +1 -1
  317. package/dist/managers/index.d.mts +15 -14
  318. package/dist/managers/index.d.ts +15 -14
  319. package/dist/managers/index.js +612 -251
  320. package/dist/managers/index.js.map +1 -1
  321. package/dist/managers/index.mjs +612 -251
  322. package/dist/managers/index.mjs.map +1 -1
  323. package/dist/types/CanvasEventNamesType.d.mts +1 -1
  324. package/dist/types/CanvasEventNamesType.d.ts +1 -1
  325. package/dist/types/ChoiceMenuOptionsType.d.mts +2 -2
  326. package/dist/types/ChoiceMenuOptionsType.d.ts +2 -2
  327. package/dist/types/HistoryChoiceMenuOption.d.mts +22 -0
  328. package/dist/types/HistoryChoiceMenuOption.d.ts +22 -0
  329. package/dist/types/HistoryChoiceMenuOption.js +4 -0
  330. package/dist/types/HistoryChoiceMenuOption.mjs +3 -0
  331. package/dist/types/PauseType.d.mts +8 -4
  332. package/dist/types/PauseType.d.ts +8 -4
  333. package/dist/types/PauseType.js +0 -11
  334. package/dist/types/PauseType.js.map +1 -1
  335. package/dist/types/PauseType.mjs +0 -9
  336. package/dist/types/PauseType.mjs.map +1 -1
  337. package/dist/types/RepeatType.d.mts +1 -2
  338. package/dist/types/RepeatType.d.ts +1 -2
  339. package/dist/types/RepeatType.js +0 -4
  340. package/dist/types/RepeatType.js.map +1 -1
  341. package/dist/types/RepeatType.mjs +0 -3
  342. package/dist/types/RepeatType.mjs.map +1 -1
  343. package/dist/types/index.d.mts +5 -4
  344. package/dist/types/index.d.ts +5 -4
  345. package/dist/types/index.js +0 -15
  346. package/dist/types/index.js.map +1 -1
  347. package/dist/types/index.mjs +1 -13
  348. package/dist/types/index.mjs.map +1 -1
  349. package/dist/types/ticker/{TickerFadeAlphaProps.d.mts → FadeAlphaTickerProps.d.mts} +9 -5
  350. package/dist/types/ticker/{TickerFadeAlphaProps.d.ts → FadeAlphaTickerProps.d.ts} +9 -5
  351. package/dist/types/ticker/FadeAlphaTickerProps.js +4 -0
  352. package/dist/types/ticker/FadeAlphaTickerProps.js.map +1 -0
  353. package/dist/types/ticker/FadeAlphaTickerProps.mjs +3 -0
  354. package/dist/types/ticker/FadeAlphaTickerProps.mjs.map +1 -0
  355. package/dist/types/ticker/{TickerMoveProps.d.mts → MoveTickerProps.d.mts} +14 -5
  356. package/dist/types/ticker/{TickerMoveProps.d.ts → MoveTickerProps.d.ts} +14 -5
  357. package/dist/types/ticker/{TickerRotateProps.js → MoveTickerProps.js} +1 -1
  358. package/dist/types/ticker/MoveTickerProps.js.map +1 -0
  359. package/dist/types/ticker/MoveTickerProps.mjs +3 -0
  360. package/dist/types/ticker/MoveTickerProps.mjs.map +1 -0
  361. package/dist/types/ticker/{TickerRotateProps.d.mts → RotateTickerProps.d.mts} +10 -4
  362. package/dist/types/ticker/{TickerRotateProps.d.ts → RotateTickerProps.d.ts} +10 -4
  363. package/dist/types/ticker/RotateTickerProps.js +4 -0
  364. package/dist/types/ticker/RotateTickerProps.js.map +1 -0
  365. package/dist/types/ticker/RotateTickerProps.mjs +3 -0
  366. package/dist/types/ticker/RotateTickerProps.mjs.map +1 -0
  367. package/dist/types/ticker/TagToRemoveAfterType.d.mts +4 -0
  368. package/dist/types/ticker/TagToRemoveAfterType.d.ts +4 -0
  369. package/dist/types/ticker/TagToRemoveAfterType.js +8 -0
  370. package/dist/types/ticker/TagToRemoveAfterType.js.map +1 -0
  371. package/dist/types/ticker/TagToRemoveAfterType.mjs +6 -0
  372. package/dist/types/ticker/TagToRemoveAfterType.mjs.map +1 -0
  373. package/dist/types/ticker/ZoomTickerProps.d.mts +45 -0
  374. package/dist/types/ticker/ZoomTickerProps.d.ts +45 -0
  375. package/dist/types/ticker/ZoomTickerProps.js +4 -0
  376. package/dist/types/ticker/ZoomTickerProps.js.map +1 -0
  377. package/dist/types/ticker/ZoomTickerProps.mjs +3 -0
  378. package/dist/types/ticker/ZoomTickerProps.mjs.map +1 -0
  379. package/dist/types/ticker/index.d.mts +4 -2
  380. package/dist/types/ticker/index.d.ts +4 -2
  381. package/package.json +7 -7
  382. package/dist/classes/ticker/TickerFadeAlpha.d.mts +0 -31
  383. package/dist/classes/ticker/TickerFadeAlpha.d.ts +0 -31
  384. package/dist/classes/ticker/TickerFadeAlpha.js.map +0 -1
  385. package/dist/classes/ticker/TickerFadeAlpha.mjs.map +0 -1
  386. package/dist/classes/ticker/TickerMove.d.mts +0 -29
  387. package/dist/classes/ticker/TickerMove.d.ts +0 -29
  388. package/dist/classes/ticker/TickerMove.js.map +0 -1
  389. package/dist/classes/ticker/TickerMove.mjs.map +0 -1
  390. package/dist/classes/ticker/TickerRotate.d.mts +0 -30
  391. package/dist/classes/ticker/TickerRotate.d.ts +0 -30
  392. package/dist/classes/ticker/TickerRotate.js.map +0 -1
  393. package/dist/classes/ticker/TickerRotate.mjs.map +0 -1
  394. package/dist/functions/ErrorUtility.d.mts +0 -24
  395. package/dist/functions/ErrorUtility.d.ts +0 -24
  396. package/dist/functions/ErrorUtility.js +0 -261
  397. package/dist/functions/ErrorUtility.js.map +0 -1
  398. package/dist/functions/ErrorUtility.mjs +0 -258
  399. package/dist/functions/ErrorUtility.mjs.map +0 -1
  400. package/dist/interface/IClassWithArgsHistory.d.mts +0 -25
  401. package/dist/interface/IClassWithArgsHistory.d.ts +0 -25
  402. package/dist/interface/IClassWithArgsHistory.js +0 -4
  403. package/dist/interface/IClassWithArgsHistory.mjs +0 -3
  404. package/dist/types/ticker/TickerFadeAlphaProps.js +0 -4
  405. package/dist/types/ticker/TickerFadeAlphaProps.mjs +0 -3
  406. package/dist/types/ticker/TickerMoveProps.mjs +0 -3
  407. package/dist/types/ticker/TickerRotateProps.mjs +0 -3
  408. /package/dist/interface/{IClassWithArgsHistory.js.map → CharacterBaseModelProps.js.map} +0 -0
  409. /package/dist/interface/{IClassWithArgsHistory.mjs.map → CharacterBaseModelProps.mjs.map} +0 -0
  410. /package/dist/{types/ticker/TickerFadeAlphaProps.js.map → interface/TickerHistory.js.map} +0 -0
  411. /package/dist/{types/ticker/TickerFadeAlphaProps.mjs.map → interface/TickerHistory.mjs.map} +0 -0
  412. /package/dist/{types/ticker/TickerMoveProps.js.map → interface/TickerTimeoutHistory.js.map} +0 -0
  413. /package/dist/{types/ticker/TickerMoveProps.mjs.map → interface/TickerTimeoutHistory.mjs.map} +0 -0
  414. /package/dist/types/{ticker/TickerRotateProps.js.map → HistoryChoiceMenuOption.js.map} +0 -0
  415. /package/dist/types/{ticker/TickerRotateProps.mjs.map → HistoryChoiceMenuOption.mjs.map} +0 -0
@@ -8,6 +8,6 @@ declare const CLOSE_LABEL_ID = "__close-label-id__";
8
8
  /**
9
9
  * CloseLabel is a label used for closing the menu.
10
10
  */
11
- declare function newCloseLabel(choiseIndex?: number): Label<{}>;
11
+ declare function newCloseLabel<T extends {} = {}>(choiseIndex?: number): Label<T>;
12
12
 
13
13
  export { CLOSE_LABEL_ID, newCloseLabel as default };
@@ -8,6 +8,6 @@ declare const CLOSE_LABEL_ID = "__close-label-id__";
8
8
  /**
9
9
  * CloseLabel is a label used for closing the menu.
10
10
  */
11
- declare function newCloseLabel(choiseIndex?: number): Label<{}>;
11
+ declare function newCloseLabel<T extends {} = {}>(choiseIndex?: number): Label<T>;
12
12
 
13
13
  export { CLOSE_LABEL_ID, newCloseLabel as default };
@@ -24,7 +24,7 @@ var Label = class {
24
24
  this._choiseIndex = choiseIndex;
25
25
  }
26
26
  /**
27
- * Get the id of the label
27
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
28
28
  */
29
29
  get id() {
30
30
  return this._id;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACQA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ;;;ACpGO,IAAM,iBAAiB;AAKf,SAAR,cAA+B,aAAsB;AAAE,SAAO,IAAI,MAAM,gBAAgB,CAAC,GAAG,QAAW,WAAW;AAAE","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n","import Label from \"./Label\"\n\nexport const CLOSE_LABEL_ID = \"__close-label-id__\"\n\n/**\n * CloseLabel is a label used for closing the menu.\n */\nexport default function newCloseLabel(choiseIndex?: number) { return new Label(CLOSE_LABEL_ID, [], undefined, choiseIndex) }\n"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ;;;ACrGO,IAAM,iBAAiB;AAKf,SAAR,cAAkD,aAAsB;AAAE,SAAO,IAAI,MAAS,gBAAgB,CAAC,GAAG,QAAW,WAAW;AAAE","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { getLabelById } from \"../decorators\"\nimport { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n","import Label from \"./Label\"\n\nexport const CLOSE_LABEL_ID = \"__close-label-id__\"\n\n/**\n * CloseLabel is a label used for closing the menu.\n */\nexport default function newCloseLabel<T extends {} = {}>(choiseIndex?: number) { return new Label<T>(CLOSE_LABEL_ID, [], undefined, choiseIndex) }\n"]}
@@ -20,7 +20,7 @@ var Label = class {
20
20
  this._choiseIndex = choiseIndex;
21
21
  }
22
22
  /**
23
- * Get the id of the label
23
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
24
24
  */
25
25
  get id() {
26
26
  return this._id;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACQA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ;;;ACpGO,IAAM,iBAAiB;AAKf,SAAR,cAA+B,aAAsB;AAAE,SAAO,IAAI,MAAM,gBAAgB,CAAC,GAAG,QAAW,WAAW;AAAE","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n","import Label from \"./Label\"\n\nexport const CLOSE_LABEL_ID = \"__close-label-id__\"\n\n/**\n * CloseLabel is a label used for closing the menu.\n */\nexport default function newCloseLabel(choiseIndex?: number) { return new Label(CLOSE_LABEL_ID, [], undefined, choiseIndex) }\n"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ;;;ACrGO,IAAM,iBAAiB;AAKf,SAAR,cAAkD,aAAsB;AAAE,SAAO,IAAI,MAAS,gBAAgB,CAAC,GAAG,QAAW,WAAW;AAAE","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { getLabelById } from \"../decorators\"\nimport { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n","import Label from \"./Label\"\n\nexport const CLOSE_LABEL_ID = \"__close-label-id__\"\n\n/**\n * CloseLabel is a label used for closing the menu.\n */\nexport default function newCloseLabel<T extends {} = {}>(choiseIndex?: number) { return new Label<T>(CLOSE_LABEL_ID, [], undefined, choiseIndex) }\n"]}
@@ -1,5 +1,6 @@
1
1
  import CharacterBaseModel from './CharacterBaseModel.mjs';
2
2
  import { StorageElementType } from '../types/StorageElementType.mjs';
3
+ import '../interface/CharacterBaseModelProps.mjs';
3
4
  import './StoredClassModel.mjs';
4
5
 
5
6
  type DialogueData = {
@@ -10,7 +11,7 @@ type DialogueData = {
10
11
  /**
11
12
  * The id of the character that is speaking.
12
13
  */
13
- characterId?: string;
14
+ character?: string;
14
15
  /**
15
16
  * Other parameters that can be stored in the dialogue.
16
17
  */
@@ -40,7 +41,7 @@ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = Characte
40
41
  /**
41
42
  * The id of the character that is speaking.
42
43
  */
43
- characterId?: string;
44
+ character?: string;
44
45
  /**
45
46
  * Other parameters that can be stored in the dialogue.
46
47
  */
@@ -1,5 +1,6 @@
1
1
  import CharacterBaseModel from './CharacterBaseModel.js';
2
2
  import { StorageElementType } from '../types/StorageElementType.js';
3
+ import '../interface/CharacterBaseModelProps.js';
3
4
  import './StoredClassModel.js';
4
5
 
5
6
  type DialogueData = {
@@ -10,7 +11,7 @@ type DialogueData = {
10
11
  /**
11
12
  * The id of the character that is speaking.
12
13
  */
13
- characterId?: string;
14
+ character?: string;
14
15
  /**
15
16
  * Other parameters that can be stored in the dialogue.
16
17
  */
@@ -40,7 +41,7 @@ declare class DialogueBaseModel<TCharacter extends CharacterBaseModel = Characte
40
41
  /**
41
42
  * The id of the character that is speaking.
42
43
  */
43
- characterId?: string;
44
+ character?: string;
44
45
  /**
45
46
  * Other parameters that can be stored in the dialogue.
46
47
  */
@@ -19,15 +19,15 @@ var DialogueBaseModel = class {
19
19
  if (typeof text === "string") {
20
20
  this.text = text;
21
21
  if (typeof character === "string") {
22
- this.characterId = character;
22
+ this.character = character;
23
23
  } else {
24
- this.characterId = character == null ? void 0 : character.id;
24
+ this.character = character == null ? void 0 : character.id;
25
25
  }
26
26
  this.oltherParams = oltherParams;
27
27
  } else {
28
28
  this.text = text.text;
29
- if (text.characterId) {
30
- this.characterId = text.characterId;
29
+ if (text.character) {
30
+ this.character = text.character;
31
31
  }
32
32
  this.oltherParams = text.oltherParams || {};
33
33
  }
@@ -40,7 +40,7 @@ var DialogueBaseModel = class {
40
40
  export() {
41
41
  return {
42
42
  text: this.text,
43
- characterId: this.characterId,
43
+ character: this.character,
44
44
  oltherParams: this.oltherParams
45
45
  };
46
46
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,YAAY,MAA6B,WAAiC,eAAsD,CAAC,GAAG;AAsBpI;AAAA;AAAA;AAAA,gBAAe;AAQf;AAAA;AAAA;AAAA,wBAAsD,CAAC;AA7BnD,QAAI,OAAO,SAAS,UAAU;AAC1B,WAAK,OAAO;AACZ,UAAI,OAAO,cAAc,UAAU;AAC/B,aAAK,cAAc;AAAA,MACvB,OACK;AACD,aAAK,cAAc,uCAAW;AAAA,MAClC;AACA,WAAK,eAAe;AAAA,IACxB,OACK;AACD,WAAK,OAAO,KAAK;AACjB,UAAI,KAAK,aAAa;AAClB,aAAK,cAAc,KAAK;AAAA,MAC5B;AACA,WAAK,eAAe,KAAK,gBAAgB,CAAC;AAAA,IAC9C;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,SAAuB;AACnB,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,IACvB;AAAA,EACJ;AACJ","sourcesContent":["import { StorageElementType } from \"../types\"\nimport CharacterBaseModel from \"./CharacterBaseModel\"\n\nexport type DialogueData = {\n /**\n * The text of the dialogue.\n */\n text: string\n /**\n * The id of the character that is speaking.\n */\n characterId?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams?: Record<string | number | symbol, StorageElementType>\n}\n\n/**\n * Base class for all dialogue models.\n * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.\n * @example\n * ```typescript\n * setDialogue(new DialogueBaseModel(\"Hello World\", character))\n * ```\n */\nexport default class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {\n /**\n * @param text The text of the dialogue.\n * @param character The id of the character that is speaking. \n * @param oltherParams Other parameters that can be stored in the dialogue.\n */\n constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams: { [key: string]: StorageElementType } = {}) {\n if (typeof text === \"string\") {\n this.text = text\n if (typeof character === \"string\") {\n this.characterId = character\n }\n else {\n this.characterId = character?.id\n }\n this.oltherParams = oltherParams\n }\n else {\n this.text = text.text\n if (text.characterId) {\n this.characterId = text.characterId\n }\n this.oltherParams = text.oltherParams || {}\n }\n }\n /**\n * The text of the dialogue.\n */\n text: string = \"\"\n /**\n * The id of the character that is speaking.\n */\n characterId?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams: { [key: string]: StorageElementType } = {}\n /**\n * Export the dialogue to a DialogueBaseData object.\n * \n * @returns The data of the dialogue.\n */\n export(): DialogueData {\n return {\n text: this.text,\n characterId: this.characterId,\n oltherParams: this.oltherParams\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,YAAY,MAA6B,WAAiC,eAAsD,CAAC,GAAG;AAsBpI;AAAA;AAAA;AAAA,gBAAe;AAQf;AAAA;AAAA;AAAA,wBAAsD,CAAC;AA7BnD,QAAI,OAAO,SAAS,UAAU;AAC1B,WAAK,OAAO;AACZ,UAAI,OAAO,cAAc,UAAU;AAC/B,aAAK,YAAY;AAAA,MACrB,OACK;AACD,aAAK,YAAY,uCAAW;AAAA,MAChC;AACA,WAAK,eAAe;AAAA,IACxB,OACK;AACD,WAAK,OAAO,KAAK;AACjB,UAAI,KAAK,WAAW;AAChB,aAAK,YAAY,KAAK;AAAA,MAC1B;AACA,WAAK,eAAe,KAAK,gBAAgB,CAAC;AAAA,IAC9C;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,SAAuB;AACnB,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX,WAAW,KAAK;AAAA,MAChB,cAAc,KAAK;AAAA,IACvB;AAAA,EACJ;AACJ","sourcesContent":["import { StorageElementType } from \"../types\"\nimport CharacterBaseModel from \"./CharacterBaseModel\"\n\nexport type DialogueData = {\n /**\n * The text of the dialogue.\n */\n text: string\n /**\n * The id of the character that is speaking.\n */\n character?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams?: Record<string | number | symbol, StorageElementType>\n}\n\n/**\n * Base class for all dialogue models.\n * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.\n * @example\n * ```typescript\n * setDialogue(new DialogueBaseModel(\"Hello World\", character))\n * ```\n */\nexport default class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {\n /**\n * @param text The text of the dialogue.\n * @param character The id of the character that is speaking. \n * @param oltherParams Other parameters that can be stored in the dialogue.\n */\n constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams: { [key: string]: StorageElementType } = {}) {\n if (typeof text === \"string\") {\n this.text = text\n if (typeof character === \"string\") {\n this.character = character\n }\n else {\n this.character = character?.id\n }\n this.oltherParams = oltherParams\n }\n else {\n this.text = text.text\n if (text.character) {\n this.character = text.character\n }\n this.oltherParams = text.oltherParams || {}\n }\n }\n /**\n * The text of the dialogue.\n */\n text: string = \"\"\n /**\n * The id of the character that is speaking.\n */\n character?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams: { [key: string]: StorageElementType } = {}\n /**\n * Export the dialogue to a DialogueBaseData object.\n * \n * @returns The data of the dialogue.\n */\n export(): DialogueData {\n return {\n text: this.text,\n character: this.character,\n oltherParams: this.oltherParams\n }\n }\n}\n"]}
@@ -17,15 +17,15 @@ var DialogueBaseModel = class {
17
17
  if (typeof text === "string") {
18
18
  this.text = text;
19
19
  if (typeof character === "string") {
20
- this.characterId = character;
20
+ this.character = character;
21
21
  } else {
22
- this.characterId = character == null ? void 0 : character.id;
22
+ this.character = character == null ? void 0 : character.id;
23
23
  }
24
24
  this.oltherParams = oltherParams;
25
25
  } else {
26
26
  this.text = text.text;
27
- if (text.characterId) {
28
- this.characterId = text.characterId;
27
+ if (text.character) {
28
+ this.character = text.character;
29
29
  }
30
30
  this.oltherParams = text.oltherParams || {};
31
31
  }
@@ -38,7 +38,7 @@ var DialogueBaseModel = class {
38
38
  export() {
39
39
  return {
40
40
  text: this.text,
41
- characterId: this.characterId,
41
+ character: this.character,
42
42
  oltherParams: this.oltherParams
43
43
  };
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,YAAY,MAA6B,WAAiC,eAAsD,CAAC,GAAG;AAsBpI;AAAA;AAAA;AAAA,gBAAe;AAQf;AAAA;AAAA;AAAA,wBAAsD,CAAC;AA7BnD,QAAI,OAAO,SAAS,UAAU;AAC1B,WAAK,OAAO;AACZ,UAAI,OAAO,cAAc,UAAU;AAC/B,aAAK,cAAc;AAAA,MACvB,OACK;AACD,aAAK,cAAc,uCAAW;AAAA,MAClC;AACA,WAAK,eAAe;AAAA,IACxB,OACK;AACD,WAAK,OAAO,KAAK;AACjB,UAAI,KAAK,aAAa;AAClB,aAAK,cAAc,KAAK;AAAA,MAC5B;AACA,WAAK,eAAe,KAAK,gBAAgB,CAAC;AAAA,IAC9C;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,SAAuB;AACnB,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX,aAAa,KAAK;AAAA,MAClB,cAAc,KAAK;AAAA,IACvB;AAAA,EACJ;AACJ","sourcesContent":["import { StorageElementType } from \"../types\"\nimport CharacterBaseModel from \"./CharacterBaseModel\"\n\nexport type DialogueData = {\n /**\n * The text of the dialogue.\n */\n text: string\n /**\n * The id of the character that is speaking.\n */\n characterId?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams?: Record<string | number | symbol, StorageElementType>\n}\n\n/**\n * Base class for all dialogue models.\n * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.\n * @example\n * ```typescript\n * setDialogue(new DialogueBaseModel(\"Hello World\", character))\n * ```\n */\nexport default class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {\n /**\n * @param text The text of the dialogue.\n * @param character The id of the character that is speaking. \n * @param oltherParams Other parameters that can be stored in the dialogue.\n */\n constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams: { [key: string]: StorageElementType } = {}) {\n if (typeof text === \"string\") {\n this.text = text\n if (typeof character === \"string\") {\n this.characterId = character\n }\n else {\n this.characterId = character?.id\n }\n this.oltherParams = oltherParams\n }\n else {\n this.text = text.text\n if (text.characterId) {\n this.characterId = text.characterId\n }\n this.oltherParams = text.oltherParams || {}\n }\n }\n /**\n * The text of the dialogue.\n */\n text: string = \"\"\n /**\n * The id of the character that is speaking.\n */\n characterId?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams: { [key: string]: StorageElementType } = {}\n /**\n * Export the dialogue to a DialogueBaseData object.\n * \n * @returns The data of the dialogue.\n */\n export(): DialogueData {\n return {\n text: this.text,\n characterId: this.characterId,\n oltherParams: this.oltherParams\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,YAAY,MAA6B,WAAiC,eAAsD,CAAC,GAAG;AAsBpI;AAAA;AAAA;AAAA,gBAAe;AAQf;AAAA;AAAA;AAAA,wBAAsD,CAAC;AA7BnD,QAAI,OAAO,SAAS,UAAU;AAC1B,WAAK,OAAO;AACZ,UAAI,OAAO,cAAc,UAAU;AAC/B,aAAK,YAAY;AAAA,MACrB,OACK;AACD,aAAK,YAAY,uCAAW;AAAA,MAChC;AACA,WAAK,eAAe;AAAA,IACxB,OACK;AACD,WAAK,OAAO,KAAK;AACjB,UAAI,KAAK,WAAW;AAChB,aAAK,YAAY,KAAK;AAAA,MAC1B;AACA,WAAK,eAAe,KAAK,gBAAgB,CAAC;AAAA,IAC9C;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,SAAuB;AACnB,WAAO;AAAA,MACH,MAAM,KAAK;AAAA,MACX,WAAW,KAAK;AAAA,MAChB,cAAc,KAAK;AAAA,IACvB;AAAA,EACJ;AACJ","sourcesContent":["import { StorageElementType } from \"../types\"\nimport CharacterBaseModel from \"./CharacterBaseModel\"\n\nexport type DialogueData = {\n /**\n * The text of the dialogue.\n */\n text: string\n /**\n * The id of the character that is speaking.\n */\n character?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams?: Record<string | number | symbol, StorageElementType>\n}\n\n/**\n * Base class for all dialogue models.\n * You can extend this class, but it is not reccomended. You can use the oltherParams property to store any other data you need.\n * @example\n * ```typescript\n * setDialogue(new DialogueBaseModel(\"Hello World\", character))\n * ```\n */\nexport default class DialogueBaseModel<TCharacter extends CharacterBaseModel = CharacterBaseModel> implements DialogueData {\n /**\n * @param text The text of the dialogue.\n * @param character The id of the character that is speaking. \n * @param oltherParams Other parameters that can be stored in the dialogue.\n */\n constructor(text: string | DialogueData, character?: string | TCharacter, oltherParams: { [key: string]: StorageElementType } = {}) {\n if (typeof text === \"string\") {\n this.text = text\n if (typeof character === \"string\") {\n this.character = character\n }\n else {\n this.character = character?.id\n }\n this.oltherParams = oltherParams\n }\n else {\n this.text = text.text\n if (text.character) {\n this.character = text.character\n }\n this.oltherParams = text.oltherParams || {}\n }\n }\n /**\n * The text of the dialogue.\n */\n text: string = \"\"\n /**\n * The id of the character that is speaking.\n */\n character?: string\n /**\n * Other parameters that can be stored in the dialogue.\n */\n oltherParams: { [key: string]: StorageElementType } = {}\n /**\n * Export the dialogue to a DialogueBaseData object.\n * \n * @returns The data of the dialogue.\n */\n export(): DialogueData {\n return {\n text: this.text,\n character: this.character,\n oltherParams: this.oltherParams\n }\n }\n}\n"]}
@@ -37,7 +37,7 @@ declare class Label<T extends {} = {}> {
37
37
  constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number);
38
38
  private _id;
39
39
  /**
40
- * Get the id of the label
40
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
41
41
  */
42
42
  get id(): LabelIdType;
43
43
  private _steps;
@@ -37,7 +37,7 @@ declare class Label<T extends {} = {}> {
37
37
  constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number);
38
38
  private _id;
39
39
  /**
40
- * Get the id of the label
40
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
41
41
  */
42
42
  get id(): LabelIdType;
43
43
  private _steps;
@@ -22,7 +22,7 @@ var Label = class {
22
22
  this._choiseIndex = choiseIndex;
23
23
  }
24
24
  /**
25
- * Get the id of the label
25
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
26
26
  */
27
27
  get id() {
28
28
  return this._id;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACQA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { getLabelById } from \"../decorators\"\nimport { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n"]}
@@ -20,7 +20,7 @@ var Label = class {
20
20
  this._choiseIndex = choiseIndex;
21
21
  }
22
22
  /**
23
- * Get the id of the label
23
+ * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}
24
24
  */
25
25
  get id() {
26
26
  return this._id;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACQA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";AAAA,OAAO,UAAU;AAmBV,SAAS,oBAAoB,OAAiD,OAA0D;AAC3I,SAAO,UAAU;AACrB;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,YAAY,IAAiB,OAAwD,WAAwC,aAAsB;AAC/I,SAAK,MAAM;AACX,SAAK,SAAS;AACd,SAAK,aAAa;AAClB,SAAK,eAAe;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,KAAkB;AACzB,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,QAA4B;AACnC,QAAI,OAAO,KAAK,WAAW,YAAY;AACnC,aAAO,KAAK,OAAO;AAAA,IACvB;AACA,WAAO,KAAK;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,eAAgE;AAC/F,QAAI,cAAc,WAAW,GAAG;AAC5B,aAAO;AAAA,IACX;AACA,QAAI,MAAc;AAClB,kBAAc,QAAQ,CAAC,MAAM,UAAU;AACnC,UAAI,oBAAoB,MAAM,KAAK,MAAM,KAAK,CAAC,GAAG;AAC9C,cAAM;AAAA,MACV;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,YAAsD;AAC7D,WAAO,KAAK;AAAA,EAChB;AAAA,EAGA,IAAW,cAAkC;AACzC,WAAO,KAAK;AAAA,EAChB;AACJ","sourcesContent":["import sha1 from 'crypto-js/sha1';\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\";\nimport { StepLabelType } from \"../types/StepLabelType\";\n\n/**\n * Convert StepLabel to StepHistoryData\n * @param step\n * @returns\n */\nexport function getStepSha1(step: StepLabelType): StepHistoryDataType {\n let sha1String = sha1(step.toString().toLocaleLowerCase())\n return sha1String.toString()\n}\n/**\n * Check if two steps are equal\n * @param step1\n * @param step2\n * @returns\n */\nexport function checkIfStepsIsEqual(step1: StepHistoryDataType | StepLabelType<any>, step2: StepHistoryDataType | StepLabelType<any>): boolean {\n return step1 === step2\n}\n","import { getLabelById } from \"../decorators\"\nimport { checkIfStepsIsEqual } from \"../functions/StepLabelUtility\"\nimport { LabelIdType } from \"../types/LabelIdType\"\nimport { StepHistoryDataType } from \"../types/StepHistoryDataType\"\nimport { StepLabelType } from \"../types/StepLabelType\"\n\n/**\n * Label is a class that contains a list of steps, which will be performed as the game continues.\n * For Ren'py this is the equivalent of a label.\n * @example\n * ```typescript\n * const START_LABEL_ID = \"StartLabel\"\n * \n * export const startLabel = newLabel(START_LABEL_ID,\n * [\n * (props) => {\n * GameWindowManager.clear()\n * setDialogue({ character: liam, text: \"Which test do you want to perform?\" })\n * setChoiceMenuOptions([\n * new ChoiceMenuOption(\"Events Test\", eventsTestLabel),\n * new ChoiceMenuOption(\"Show Image Test\", showImageTest),\n * ])\n * },\n * (props) => GameStepManager.jumpLabel(START_LABEL_ID, props),\n * ]\n * )\n * \n * GameStepManager.callLabel(StartLabel)\n * ```\n */\nexport default class Label<T extends {} = {}> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param onStepRun is a function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @param choiseIndex is the index of the choice that the label will perform\n */\n constructor(id: LabelIdType, steps: StepLabelType<T>[] | (() => StepLabelType<T>[]), onStepRun?: () => void | Promise<void>, choiseIndex?: number) {\n this._id = id\n this._steps = steps\n this._onStepRun = onStepRun\n this._choiseIndex = choiseIndex\n }\n\n private _id: LabelIdType\n /**\n * Get the id of the label. This variable is used in the system to get the label by id, {@link getLabelById}\n */\n public get id(): LabelIdType {\n return this._id\n }\n\n private _steps: StepLabelType<T>[] | (() => StepLabelType<T>[])\n /**\n * Get the steps of the label.\n * This class should be extended and the steps method should be overridden.\n * Every time you update this list will also be updated when the other game versions load.\n */\n public get steps(): StepLabelType<T>[] {\n if (typeof this._steps === \"function\") {\n return this._steps()\n }\n return this._steps\n }\n\n /**\n * Get the corresponding steps number\n * @param externalSteps\n * @returns Numer of corresponding steps, for example, if externalSteps is [ABC, DEF, GHI] and the steps of the label is [ABC, GHT], the result will be 1\n */\n public getCorrespondingStepsNumber(externalSteps: StepHistoryDataType[] | StepLabelType[]): number {\n if (externalSteps.length === 0) {\n return 0\n }\n let res: number = 0\n externalSteps.forEach((step, index) => {\n if (checkIfStepsIsEqual(step, this.steps[index])) {\n res = index\n }\n })\n return res\n }\n\n private _onStepRun: (() => void | Promise<void>) | undefined\n /**\n * Get the function that will be executed before any step is executed, is useful for example to make sure all images used have been cached\n * @returns Promise<void> or void\n * @example\n * ```typescript\n * newLabel(\"id\", [], () => {\n * Assets.load('path/to/image1.png')\n * Assets.load('path/to/image2.png')\n * })\n * ```\n */\n public get onStepRun(): (() => void | Promise<void>) | undefined {\n return this._onStepRun\n }\n\n private _choiseIndex: number | undefined\n public get choiseIndex(): number | undefined {\n return this._choiseIndex\n }\n}\n"]}
@@ -43,13 +43,13 @@ declare class StoredClassModel {
43
43
  * @param propertyName The name of the property to set.
44
44
  * @param value The value to set. If is undefined, the property will be removed from the storage.
45
45
  */
46
- setStorageProperty<T>(propertyName: string, value: T | undefined): void;
46
+ protected setStorageProperty<T>(propertyName: string, value: T | undefined): void;
47
47
  /**
48
48
  * Get a property from the storage.
49
49
  * @param propertyName The name of the property to get.
50
50
  * @returns The value of the property. If the property is not found, returns undefined.
51
51
  */
52
- getStorageProperty<T>(propertyName: string): T | undefined;
52
+ protected getStorageProperty<T>(propertyName: string): T | undefined;
53
53
  }
54
54
 
55
55
  export { StoredClassModel as default };
@@ -43,13 +43,13 @@ declare class StoredClassModel {
43
43
  * @param propertyName The name of the property to set.
44
44
  * @param value The value to set. If is undefined, the property will be removed from the storage.
45
45
  */
46
- setStorageProperty<T>(propertyName: string, value: T | undefined): void;
46
+ protected setStorageProperty<T>(propertyName: string, value: T | undefined): void;
47
47
  /**
48
48
  * Get a property from the storage.
49
49
  * @param propertyName The name of the property to get.
50
50
  * @returns The value of the property. If the property is not found, returns undefined.
51
51
  */
52
- getStorageProperty<T>(propertyName: string): T | undefined;
52
+ protected getStorageProperty<T>(propertyName: string): T | undefined;
53
53
  }
54
54
 
55
55
  export { StoredClassModel as default };