@drincs/pixi-vn 0.6.2 → 0.6.3

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 (407) hide show
  1. package/dist/classes/CanvasEvent.js +1 -1
  2. package/dist/classes/CanvasEvent.js.map +1 -1
  3. package/dist/classes/CanvasEvent.mjs +1 -1
  4. package/dist/classes/CanvasEvent.mjs.map +1 -1
  5. package/dist/classes/CharacterBaseModel.js +15 -15
  6. package/dist/classes/CharacterBaseModel.js.map +1 -1
  7. package/dist/classes/CharacterBaseModel.mjs +15 -15
  8. package/dist/classes/CharacterBaseModel.mjs.map +1 -1
  9. package/dist/classes/ChoiceMenuOption.js +15 -15
  10. package/dist/classes/ChoiceMenuOption.js.map +1 -1
  11. package/dist/classes/ChoiceMenuOption.mjs +15 -15
  12. package/dist/classes/ChoiceMenuOption.mjs.map +1 -1
  13. package/dist/classes/CloseLabel.js +1 -1
  14. package/dist/classes/CloseLabel.js.map +1 -1
  15. package/dist/classes/CloseLabel.mjs +1 -1
  16. package/dist/classes/CloseLabel.mjs.map +1 -1
  17. package/dist/classes/DialogueBaseModel.js +1 -1
  18. package/dist/classes/DialogueBaseModel.js.map +1 -1
  19. package/dist/classes/DialogueBaseModel.mjs +1 -1
  20. package/dist/classes/DialogueBaseModel.mjs.map +1 -1
  21. package/dist/classes/Label.js +1 -1
  22. package/dist/classes/Label.js.map +1 -1
  23. package/dist/classes/Label.mjs +1 -1
  24. package/dist/classes/Label.mjs.map +1 -1
  25. package/dist/classes/StoredClassModel.js +15 -15
  26. package/dist/classes/StoredClassModel.js.map +1 -1
  27. package/dist/classes/StoredClassModel.mjs +15 -15
  28. package/dist/classes/StoredClassModel.mjs.map +1 -1
  29. package/dist/classes/canvas/CanvasBase.js +1 -1
  30. package/dist/classes/canvas/CanvasBase.js.map +1 -1
  31. package/dist/classes/canvas/CanvasBase.mjs +1 -1
  32. package/dist/classes/canvas/CanvasBase.mjs.map +1 -1
  33. package/dist/classes/canvas/CanvasContainer.js +13 -13
  34. package/dist/classes/canvas/CanvasContainer.js.map +1 -1
  35. package/dist/classes/canvas/CanvasContainer.mjs +13 -13
  36. package/dist/classes/canvas/CanvasContainer.mjs.map +1 -1
  37. package/dist/classes/canvas/CanvasImage.js +2 -4
  38. package/dist/classes/canvas/CanvasImage.js.map +1 -1
  39. package/dist/classes/canvas/CanvasImage.mjs +2 -4
  40. package/dist/classes/canvas/CanvasImage.mjs.map +1 -1
  41. package/dist/classes/canvas/CanvasSprite.js +2 -4
  42. package/dist/classes/canvas/CanvasSprite.js.map +1 -1
  43. package/dist/classes/canvas/CanvasSprite.mjs +2 -4
  44. package/dist/classes/canvas/CanvasSprite.mjs.map +1 -1
  45. package/dist/classes/canvas/CanvasText.js +11 -11
  46. package/dist/classes/canvas/CanvasText.js.map +1 -1
  47. package/dist/classes/canvas/CanvasText.mjs +11 -11
  48. package/dist/classes/canvas/CanvasText.mjs.map +1 -1
  49. package/dist/classes/canvas/index.js +13 -13
  50. package/dist/classes/canvas/index.js.map +1 -1
  51. package/dist/classes/canvas/index.mjs +13 -13
  52. package/dist/classes/canvas/index.mjs.map +1 -1
  53. package/dist/classes/index.js +15 -15
  54. package/dist/classes/index.js.map +1 -1
  55. package/dist/classes/index.mjs +15 -15
  56. package/dist/classes/index.mjs.map +1 -1
  57. package/dist/classes/ticker/FadeAlphaTicker.js +15 -15
  58. package/dist/classes/ticker/FadeAlphaTicker.js.map +1 -1
  59. package/dist/classes/ticker/FadeAlphaTicker.mjs +15 -15
  60. package/dist/classes/ticker/FadeAlphaTicker.mjs.map +1 -1
  61. package/dist/classes/ticker/MoveTicker.js +15 -15
  62. package/dist/classes/ticker/MoveTicker.js.map +1 -1
  63. package/dist/classes/ticker/MoveTicker.mjs +15 -15
  64. package/dist/classes/ticker/MoveTicker.mjs.map +1 -1
  65. package/dist/classes/ticker/RotateTicker.js +15 -15
  66. package/dist/classes/ticker/RotateTicker.js.map +1 -1
  67. package/dist/classes/ticker/RotateTicker.mjs +15 -15
  68. package/dist/classes/ticker/RotateTicker.mjs.map +1 -1
  69. package/dist/classes/ticker/TickerBase.js +1 -1
  70. package/dist/classes/ticker/TickerBase.js.map +1 -1
  71. package/dist/classes/ticker/TickerBase.mjs +1 -1
  72. package/dist/classes/ticker/TickerBase.mjs.map +1 -1
  73. package/dist/classes/ticker/ZoomTicker.js +15 -15
  74. package/dist/classes/ticker/ZoomTicker.js.map +1 -1
  75. package/dist/classes/ticker/ZoomTicker.mjs +15 -15
  76. package/dist/classes/ticker/ZoomTicker.mjs.map +1 -1
  77. package/dist/classes/ticker/index.js +15 -15
  78. package/dist/classes/ticker/index.js.map +1 -1
  79. package/dist/classes/ticker/index.mjs +15 -15
  80. package/dist/classes/ticker/index.mjs.map +1 -1
  81. package/dist/constants.d.mts +1 -1
  82. package/dist/constants.d.ts +1 -1
  83. package/dist/constants.js +2 -2
  84. package/dist/constants.js.map +1 -1
  85. package/dist/constants.mjs +2 -2
  86. package/dist/constants.mjs.map +1 -1
  87. package/dist/decorators/CanvasElementDecorator.js +13 -13
  88. package/dist/decorators/CanvasElementDecorator.js.map +1 -1
  89. package/dist/decorators/CanvasElementDecorator.mjs +13 -13
  90. package/dist/decorators/CanvasElementDecorator.mjs.map +1 -1
  91. package/dist/decorators/CharacterDecorator.js +1 -1
  92. package/dist/decorators/CharacterDecorator.js.map +1 -1
  93. package/dist/decorators/CharacterDecorator.mjs +1 -1
  94. package/dist/decorators/CharacterDecorator.mjs.map +1 -1
  95. package/dist/decorators/EventDecorator.js +1 -1
  96. package/dist/decorators/EventDecorator.js.map +1 -1
  97. package/dist/decorators/EventDecorator.mjs +1 -1
  98. package/dist/decorators/EventDecorator.mjs.map +1 -1
  99. package/dist/decorators/LabelDecorator.js +15 -15
  100. package/dist/decorators/LabelDecorator.js.map +1 -1
  101. package/dist/decorators/LabelDecorator.mjs +15 -15
  102. package/dist/decorators/LabelDecorator.mjs.map +1 -1
  103. package/dist/decorators/TickerDecorator.js +1 -1
  104. package/dist/decorators/TickerDecorator.js.map +1 -1
  105. package/dist/decorators/TickerDecorator.mjs +1 -1
  106. package/dist/decorators/TickerDecorator.mjs.map +1 -1
  107. package/dist/decorators/index.js +15 -15
  108. package/dist/decorators/index.js.map +1 -1
  109. package/dist/decorators/index.mjs +15 -15
  110. package/dist/decorators/index.mjs.map +1 -1
  111. package/dist/functions/CanvasUtility.js +13 -13
  112. package/dist/functions/CanvasUtility.js.map +1 -1
  113. package/dist/functions/CanvasUtility.mjs +13 -13
  114. package/dist/functions/CanvasUtility.mjs.map +1 -1
  115. package/dist/functions/DialogueUtility.js +15 -15
  116. package/dist/functions/DialogueUtility.js.map +1 -1
  117. package/dist/functions/DialogueUtility.mjs +15 -15
  118. package/dist/functions/DialogueUtility.mjs.map +1 -1
  119. package/dist/functions/DiffUtility.js +1 -1
  120. package/dist/functions/DiffUtility.js.map +1 -1
  121. package/dist/functions/DiffUtility.mjs +1 -1
  122. package/dist/functions/DiffUtility.mjs.map +1 -1
  123. package/dist/functions/EasterEgg.js +1 -1
  124. package/dist/functions/EasterEgg.js.map +1 -1
  125. package/dist/functions/EasterEgg.mjs +1 -1
  126. package/dist/functions/EasterEgg.mjs.map +1 -1
  127. package/dist/functions/ExportUtility.js +1 -1
  128. package/dist/functions/ExportUtility.js.map +1 -1
  129. package/dist/functions/ExportUtility.mjs +1 -1
  130. package/dist/functions/ExportUtility.mjs.map +1 -1
  131. package/dist/functions/FlagsUtility.js +15 -15
  132. package/dist/functions/FlagsUtility.js.map +1 -1
  133. package/dist/functions/FlagsUtility.mjs +15 -15
  134. package/dist/functions/FlagsUtility.mjs.map +1 -1
  135. package/dist/functions/GameUtility.js +15 -15
  136. package/dist/functions/GameUtility.js.map +1 -1
  137. package/dist/functions/GameUtility.mjs +15 -15
  138. package/dist/functions/GameUtility.mjs.map +1 -1
  139. package/dist/functions/ImageUtility.js +15 -15
  140. package/dist/functions/ImageUtility.js.map +1 -1
  141. package/dist/functions/ImageUtility.mjs +15 -15
  142. package/dist/functions/ImageUtility.mjs.map +1 -1
  143. package/dist/functions/SavesUtility.js +16 -16
  144. package/dist/functions/SavesUtility.js.map +1 -1
  145. package/dist/functions/SavesUtility.mjs +16 -16
  146. package/dist/functions/SavesUtility.mjs.map +1 -1
  147. package/dist/functions/StepLabelUtility.js +1 -1
  148. package/dist/functions/StepLabelUtility.js.map +1 -1
  149. package/dist/functions/StepLabelUtility.mjs +1 -1
  150. package/dist/functions/StepLabelUtility.mjs.map +1 -1
  151. package/dist/functions/TextureUtility.js +10 -8
  152. package/dist/functions/TextureUtility.js.map +1 -1
  153. package/dist/functions/TextureUtility.mjs +10 -8
  154. package/dist/functions/TextureUtility.mjs.map +1 -1
  155. package/dist/functions/TickerUtility.js +1 -1
  156. package/dist/functions/TickerUtility.js.map +1 -1
  157. package/dist/functions/TickerUtility.mjs +1 -1
  158. package/dist/functions/TickerUtility.mjs.map +1 -1
  159. package/dist/functions/index.js +16 -16
  160. package/dist/functions/index.js.map +1 -1
  161. package/dist/functions/index.mjs +16 -16
  162. package/dist/functions/index.mjs.map +1 -1
  163. package/dist/index.js +119 -17
  164. package/dist/index.js.map +1 -1
  165. package/dist/index.mjs +120 -18
  166. package/dist/index.mjs.map +1 -1
  167. package/dist/interface/CharacterBaseModelProps.js +1 -1
  168. package/dist/interface/CharacterBaseModelProps.js.map +1 -1
  169. package/dist/interface/CharacterBaseModelProps.mjs +1 -1
  170. package/dist/interface/CharacterBaseModelProps.mjs.map +1 -1
  171. package/dist/interface/DialogueHistory.js +1 -1
  172. package/dist/interface/DialogueHistory.js.map +1 -1
  173. package/dist/interface/DialogueHistory.mjs +1 -1
  174. package/dist/interface/DialogueHistory.mjs.map +1 -1
  175. package/dist/interface/IHistoryStep.js +1 -1
  176. package/dist/interface/IHistoryStep.js.map +1 -1
  177. package/dist/interface/IHistoryStep.mjs +1 -1
  178. package/dist/interface/IHistoryStep.mjs.map +1 -1
  179. package/dist/interface/IOpenedLabel.js +1 -1
  180. package/dist/interface/IOpenedLabel.js.map +1 -1
  181. package/dist/interface/IOpenedLabel.mjs +1 -1
  182. package/dist/interface/IOpenedLabel.mjs.map +1 -1
  183. package/dist/interface/ISaveData.js +1 -1
  184. package/dist/interface/ISaveData.js.map +1 -1
  185. package/dist/interface/ISaveData.mjs +1 -1
  186. package/dist/interface/ISaveData.mjs.map +1 -1
  187. package/dist/interface/ITicker.js +1 -1
  188. package/dist/interface/ITicker.js.map +1 -1
  189. package/dist/interface/ITicker.mjs +1 -1
  190. package/dist/interface/ITicker.mjs.map +1 -1
  191. package/dist/interface/ITickersSteps.js +1 -1
  192. package/dist/interface/ITickersSteps.js.map +1 -1
  193. package/dist/interface/ITickersSteps.mjs +1 -1
  194. package/dist/interface/ITickersSteps.mjs.map +1 -1
  195. package/dist/interface/TickerHistory.js +1 -1
  196. package/dist/interface/TickerHistory.js.map +1 -1
  197. package/dist/interface/TickerHistory.mjs +1 -1
  198. package/dist/interface/TickerHistory.mjs.map +1 -1
  199. package/dist/interface/TickerProgrationType.js +1 -1
  200. package/dist/interface/TickerProgrationType.js.map +1 -1
  201. package/dist/interface/TickerProgrationType.mjs +1 -1
  202. package/dist/interface/TickerProgrationType.mjs.map +1 -1
  203. package/dist/interface/TickerTimeoutHistory.js +1 -1
  204. package/dist/interface/TickerTimeoutHistory.js.map +1 -1
  205. package/dist/interface/TickerTimeoutHistory.mjs +1 -1
  206. package/dist/interface/TickerTimeoutHistory.mjs.map +1 -1
  207. package/dist/interface/canvas/ICanvasBaseMemory.js +1 -1
  208. package/dist/interface/canvas/ICanvasBaseMemory.js.map +1 -1
  209. package/dist/interface/canvas/ICanvasBaseMemory.mjs +1 -1
  210. package/dist/interface/canvas/ICanvasBaseMemory.mjs.map +1 -1
  211. package/dist/interface/canvas/ICanvasContainerMemory.js +1 -1
  212. package/dist/interface/canvas/ICanvasContainerMemory.js.map +1 -1
  213. package/dist/interface/canvas/ICanvasContainerMemory.mjs +1 -1
  214. package/dist/interface/canvas/ICanvasContainerMemory.mjs.map +1 -1
  215. package/dist/interface/canvas/ICanvasImageMemory.js +1 -1
  216. package/dist/interface/canvas/ICanvasImageMemory.js.map +1 -1
  217. package/dist/interface/canvas/ICanvasImageMemory.mjs +1 -1
  218. package/dist/interface/canvas/ICanvasImageMemory.mjs.map +1 -1
  219. package/dist/interface/canvas/ICanvasSpriteMemory.js +1 -1
  220. package/dist/interface/canvas/ICanvasSpriteMemory.js.map +1 -1
  221. package/dist/interface/canvas/ICanvasSpriteMemory.mjs +1 -1
  222. package/dist/interface/canvas/ICanvasSpriteMemory.mjs.map +1 -1
  223. package/dist/interface/canvas/ICanvasTextTextMemory.js +1 -1
  224. package/dist/interface/canvas/ICanvasTextTextMemory.js.map +1 -1
  225. package/dist/interface/canvas/ICanvasTextTextMemory.mjs +1 -1
  226. package/dist/interface/canvas/ICanvasTextTextMemory.mjs.map +1 -1
  227. package/dist/interface/canvas/ITextureMemory.js +1 -1
  228. package/dist/interface/canvas/ITextureMemory.js.map +1 -1
  229. package/dist/interface/canvas/ITextureMemory.mjs +1 -1
  230. package/dist/interface/canvas/ITextureMemory.mjs.map +1 -1
  231. package/dist/interface/canvas/index.js +1 -1
  232. package/dist/interface/canvas/index.js.map +1 -1
  233. package/dist/interface/canvas/index.mjs +1 -1
  234. package/dist/interface/canvas/index.mjs.map +1 -1
  235. package/dist/interface/export/ExportedCanvas.js +1 -1
  236. package/dist/interface/export/ExportedCanvas.js.map +1 -1
  237. package/dist/interface/export/ExportedCanvas.mjs +1 -1
  238. package/dist/interface/export/ExportedCanvas.mjs.map +1 -1
  239. package/dist/interface/export/ExportedStep.js +1 -1
  240. package/dist/interface/export/ExportedStep.js.map +1 -1
  241. package/dist/interface/export/ExportedStep.mjs +1 -1
  242. package/dist/interface/export/ExportedStep.mjs.map +1 -1
  243. package/dist/interface/export/ExportedStorage.js +1 -1
  244. package/dist/interface/export/ExportedStorage.js.map +1 -1
  245. package/dist/interface/export/ExportedStorage.mjs +1 -1
  246. package/dist/interface/export/ExportedStorage.mjs.map +1 -1
  247. package/dist/interface/export/index.js +1 -1
  248. package/dist/interface/export/index.js.map +1 -1
  249. package/dist/interface/export/index.mjs +1 -1
  250. package/dist/interface/export/index.mjs.map +1 -1
  251. package/dist/interface/index.js +1 -1
  252. package/dist/interface/index.js.map +1 -1
  253. package/dist/interface/index.mjs +1 -1
  254. package/dist/interface/index.mjs.map +1 -1
  255. package/dist/labels/BaseCanvasElementTestLabel.js +917 -23
  256. package/dist/labels/BaseCanvasElementTestLabel.js.map +1 -1
  257. package/dist/labels/BaseCanvasElementTestLabel.mjs +917 -23
  258. package/dist/labels/BaseCanvasElementTestLabel.mjs.map +1 -1
  259. package/dist/labels/CanvasEventsTestLabel.js +15 -15
  260. package/dist/labels/CanvasEventsTestLabel.js.map +1 -1
  261. package/dist/labels/CanvasEventsTestLabel.mjs +15 -15
  262. package/dist/labels/CanvasEventsTestLabel.mjs.map +1 -1
  263. package/dist/labels/CustomTickerCanvasElementTestLabel.js +15 -18
  264. package/dist/labels/CustomTickerCanvasElementTestLabel.js.map +1 -1
  265. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs +15 -18
  266. package/dist/labels/CustomTickerCanvasElementTestLabel.mjs.map +1 -1
  267. package/dist/labels/ImagesAnimationsTestLabel.js +15 -15
  268. package/dist/labels/ImagesAnimationsTestLabel.js.map +1 -1
  269. package/dist/labels/ImagesAnimationsTestLabel.mjs +15 -15
  270. package/dist/labels/ImagesAnimationsTestLabel.mjs.map +1 -1
  271. package/dist/labels/MarkdownTest.js +15 -15
  272. package/dist/labels/MarkdownTest.js.map +1 -1
  273. package/dist/labels/MarkdownTest.mjs +15 -15
  274. package/dist/labels/MarkdownTest.mjs.map +1 -1
  275. package/dist/labels/StartLabel.js +121 -19
  276. package/dist/labels/StartLabel.js.map +1 -1
  277. package/dist/labels/StartLabel.mjs +122 -20
  278. package/dist/labels/StartLabel.mjs.map +1 -1
  279. package/dist/labels/TestConstant.js +15 -15
  280. package/dist/labels/TestConstant.js.map +1 -1
  281. package/dist/labels/TestConstant.mjs +15 -15
  282. package/dist/labels/TestConstant.mjs.map +1 -1
  283. package/dist/labels/index.js +121 -19
  284. package/dist/labels/index.js.map +1 -1
  285. package/dist/labels/index.mjs +122 -20
  286. package/dist/labels/index.mjs.map +1 -1
  287. package/dist/managers/StepManager.js +15 -15
  288. package/dist/managers/StepManager.js.map +1 -1
  289. package/dist/managers/StepManager.mjs +15 -15
  290. package/dist/managers/StepManager.mjs.map +1 -1
  291. package/dist/managers/StorageManager.js +1 -1
  292. package/dist/managers/StorageManager.js.map +1 -1
  293. package/dist/managers/StorageManager.mjs +1 -1
  294. package/dist/managers/StorageManager.mjs.map +1 -1
  295. package/dist/managers/WindowManager.d.mts +1 -1
  296. package/dist/managers/WindowManager.d.ts +1 -1
  297. package/dist/managers/WindowManager.js +15 -15
  298. package/dist/managers/WindowManager.js.map +1 -1
  299. package/dist/managers/WindowManager.mjs +15 -15
  300. package/dist/managers/WindowManager.mjs.map +1 -1
  301. package/dist/managers/index.js +15 -15
  302. package/dist/managers/index.js.map +1 -1
  303. package/dist/managers/index.mjs +15 -15
  304. package/dist/managers/index.mjs.map +1 -1
  305. package/dist/override/StepLabelProps.js +1 -1
  306. package/dist/override/StepLabelProps.js.map +1 -1
  307. package/dist/override/StepLabelProps.mjs +1 -1
  308. package/dist/override/StepLabelProps.mjs.map +1 -1
  309. package/dist/override/StepLabelResult.js +1 -1
  310. package/dist/override/StepLabelResult.js.map +1 -1
  311. package/dist/override/StepLabelResult.mjs +1 -1
  312. package/dist/override/StepLabelResult.mjs.map +1 -1
  313. package/dist/override/index.js +1 -1
  314. package/dist/override/index.js.map +1 -1
  315. package/dist/override/index.mjs +1 -1
  316. package/dist/override/index.mjs.map +1 -1
  317. package/dist/types/CanvasElementTagType.js +1 -1
  318. package/dist/types/CanvasElementTagType.js.map +1 -1
  319. package/dist/types/CanvasElementTagType.mjs +1 -1
  320. package/dist/types/CanvasElementTagType.mjs.map +1 -1
  321. package/dist/types/CanvasEventNamesType.js +1 -1
  322. package/dist/types/CanvasEventNamesType.js.map +1 -1
  323. package/dist/types/CanvasEventNamesType.mjs +1 -1
  324. package/dist/types/CanvasEventNamesType.mjs.map +1 -1
  325. package/dist/types/ChoiceMenuOptionsType.js +1 -1
  326. package/dist/types/ChoiceMenuOptionsType.js.map +1 -1
  327. package/dist/types/ChoiceMenuOptionsType.mjs +1 -1
  328. package/dist/types/ChoiceMenuOptionsType.mjs.map +1 -1
  329. package/dist/types/CloseType.js +1 -1
  330. package/dist/types/CloseType.js.map +1 -1
  331. package/dist/types/CloseType.mjs +1 -1
  332. package/dist/types/CloseType.mjs.map +1 -1
  333. package/dist/types/EventIdType.js +1 -1
  334. package/dist/types/EventIdType.js.map +1 -1
  335. package/dist/types/EventIdType.mjs +1 -1
  336. package/dist/types/EventIdType.mjs.map +1 -1
  337. package/dist/types/HistoryChoiceMenuOption.js +1 -1
  338. package/dist/types/HistoryChoiceMenuOption.js.map +1 -1
  339. package/dist/types/HistoryChoiceMenuOption.mjs +1 -1
  340. package/dist/types/HistoryChoiceMenuOption.mjs.map +1 -1
  341. package/dist/types/LabelIdType.js +1 -1
  342. package/dist/types/LabelIdType.js.map +1 -1
  343. package/dist/types/LabelIdType.mjs +1 -1
  344. package/dist/types/LabelIdType.mjs.map +1 -1
  345. package/dist/types/LabelRunModeType.js +1 -1
  346. package/dist/types/LabelRunModeType.js.map +1 -1
  347. package/dist/types/LabelRunModeType.mjs +1 -1
  348. package/dist/types/LabelRunModeType.mjs.map +1 -1
  349. package/dist/types/PauseType.js +1 -1
  350. package/dist/types/PauseType.js.map +1 -1
  351. package/dist/types/PauseType.mjs +1 -1
  352. package/dist/types/PauseType.mjs.map +1 -1
  353. package/dist/types/RepeatType.js +1 -1
  354. package/dist/types/RepeatType.js.map +1 -1
  355. package/dist/types/RepeatType.mjs +1 -1
  356. package/dist/types/RepeatType.mjs.map +1 -1
  357. package/dist/types/StepHistoryDataType.js +1 -1
  358. package/dist/types/StepHistoryDataType.js.map +1 -1
  359. package/dist/types/StepHistoryDataType.mjs +1 -1
  360. package/dist/types/StepHistoryDataType.mjs.map +1 -1
  361. package/dist/types/StepLabelType.js +1 -1
  362. package/dist/types/StepLabelType.js.map +1 -1
  363. package/dist/types/StepLabelType.mjs +1 -1
  364. package/dist/types/StepLabelType.mjs.map +1 -1
  365. package/dist/types/StorageElementType.js +1 -1
  366. package/dist/types/StorageElementType.js.map +1 -1
  367. package/dist/types/StorageElementType.mjs +1 -1
  368. package/dist/types/StorageElementType.mjs.map +1 -1
  369. package/dist/types/TickerIdType.js +1 -1
  370. package/dist/types/TickerIdType.js.map +1 -1
  371. package/dist/types/TickerIdType.mjs +1 -1
  372. package/dist/types/TickerIdType.mjs.map +1 -1
  373. package/dist/types/index.js +1 -1
  374. package/dist/types/index.js.map +1 -1
  375. package/dist/types/index.mjs +1 -1
  376. package/dist/types/index.mjs.map +1 -1
  377. package/dist/types/ticker/FadeAlphaTickerProps.js +1 -1
  378. package/dist/types/ticker/FadeAlphaTickerProps.js.map +1 -1
  379. package/dist/types/ticker/FadeAlphaTickerProps.mjs +1 -1
  380. package/dist/types/ticker/FadeAlphaTickerProps.mjs.map +1 -1
  381. package/dist/types/ticker/MoveTickerProps.js +1 -1
  382. package/dist/types/ticker/MoveTickerProps.js.map +1 -1
  383. package/dist/types/ticker/MoveTickerProps.mjs +1 -1
  384. package/dist/types/ticker/MoveTickerProps.mjs.map +1 -1
  385. package/dist/types/ticker/RotateTickerProps.js +1 -1
  386. package/dist/types/ticker/RotateTickerProps.js.map +1 -1
  387. package/dist/types/ticker/RotateTickerProps.mjs +1 -1
  388. package/dist/types/ticker/RotateTickerProps.mjs.map +1 -1
  389. package/dist/types/ticker/TagToRemoveAfterType.js +1 -1
  390. package/dist/types/ticker/TagToRemoveAfterType.js.map +1 -1
  391. package/dist/types/ticker/TagToRemoveAfterType.mjs +1 -1
  392. package/dist/types/ticker/TagToRemoveAfterType.mjs.map +1 -1
  393. package/dist/types/ticker/ZoomTickerProps.js +1 -1
  394. package/dist/types/ticker/ZoomTickerProps.js.map +1 -1
  395. package/dist/types/ticker/ZoomTickerProps.mjs +1 -1
  396. package/dist/types/ticker/ZoomTickerProps.mjs.map +1 -1
  397. package/dist/types/ticker/index.js +1 -1
  398. package/dist/types/ticker/index.js.map +1 -1
  399. package/dist/types/ticker/index.mjs +1 -1
  400. package/dist/types/ticker/index.mjs.map +1 -1
  401. package/package.json +4 -4
  402. package/dist/labels/TickerTestLabel.d.mts +0 -9
  403. package/dist/labels/TickerTestLabel.d.ts +0 -9
  404. package/dist/labels/TickerTestLabel.js +0 -2675
  405. package/dist/labels/TickerTestLabel.js.map +0 -1
  406. package/dist/labels/TickerTestLabel.mjs +0 -2669
  407. package/dist/labels/TickerTestLabel.mjs.map +0 -1
@@ -84,5 +84,5 @@ function newCloseLabel(choiseIndex) {
84
84
 
85
85
  exports.CLOSE_LABEL_ID = CLOSE_LABEL_ID;
86
86
  exports.default = newCloseLabel;
87
- //# sourceMappingURL=out.js.map
87
+ //# sourceMappingURL=CloseLabel.js.map
88
88
  //# sourceMappingURL=CloseLabel.js.map
@@ -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;;;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
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";;;;;;;AAmBO,SAAS,mBAAA,CAAoB,OAAiD,KAA0D,EAAA;AAC3I,EAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AACrB,CAAA;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,WAAY,CAAA,EAAA,EAAiB,KAAwD,EAAA,SAAA,EAAwC,WAAsB,EAAA;AAC/I,IAAA,IAAA,CAAK,GAAM,GAAA,EAAA,CAAA;AACX,IAAA,IAAA,CAAK,MAAS,GAAA,KAAA,CAAA;AACd,IAAA,IAAA,CAAK,UAAa,GAAA,SAAA,CAAA;AAClB,IAAA,IAAA,CAAK,YAAe,GAAA,WAAA,CAAA;AAAA,GACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,EAAkB,GAAA;AACzB,IAAA,OAAO,IAAK,CAAA,GAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,KAA4B,GAAA;AACnC,IAAI,IAAA,OAAO,IAAK,CAAA,MAAA,KAAW,UAAY,EAAA;AACnC,MAAA,OAAO,KAAK,MAAO,EAAA,CAAA;AAAA,KACvB;AACA,IAAA,OAAO,IAAK,CAAA,MAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,aAAgE,EAAA;AAC/F,IAAI,IAAA,aAAA,CAAc,WAAW,CAAG,EAAA;AAC5B,MAAO,OAAA,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,GAAc,GAAA,CAAA,CAAA;AAClB,IAAc,aAAA,CAAA,OAAA,CAAQ,CAAC,IAAA,EAAM,KAAU,KAAA;AACnC,MAAA,IAAI,oBAAoB,IAAM,EAAA,IAAA,CAAK,KAAM,CAAA,KAAK,CAAC,CAAG,EAAA;AAC9C,QAAM,GAAA,GAAA,KAAA,CAAA;AAAA,OACV;AAAA,KACH,CAAA,CAAA;AACD,IAAO,OAAA,GAAA,CAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,SAAsD,GAAA;AAC7D,IAAA,OAAO,IAAK,CAAA,UAAA,CAAA;AAAA,GAChB;AAAA,EAGA,IAAW,WAAkC,GAAA;AACzC,IAAA,OAAO,IAAK,CAAA,YAAA,CAAA;AAAA,GAChB;AACJ,CAAA,CAAA;;;ACrGO,IAAM,cAAiB,GAAA,qBAAA;AAKf,SAAR,cAAkD,WAAsB,EAAA;AAAE,EAAA,OAAO,IAAI,KAAS,CAAA,cAAA,EAAgB,EAAC,EAAG,QAAW,WAAW,CAAA,CAAA;AAAE","file":"CloseLabel.js","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"]}
@@ -79,5 +79,5 @@ function newCloseLabel(choiseIndex) {
79
79
  }
80
80
 
81
81
  export { CLOSE_LABEL_ID, newCloseLabel as default };
82
- //# sourceMappingURL=out.js.map
82
+ //# sourceMappingURL=CloseLabel.mjs.map
83
83
  //# sourceMappingURL=CloseLabel.mjs.map
@@ -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;;;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
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts","../../src/classes/CloseLabel.ts"],"names":[],"mappings":";;;AAmBO,SAAS,mBAAA,CAAoB,OAAiD,KAA0D,EAAA;AAC3I,EAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AACrB,CAAA;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,WAAY,CAAA,EAAA,EAAiB,KAAwD,EAAA,SAAA,EAAwC,WAAsB,EAAA;AAC/I,IAAA,IAAA,CAAK,GAAM,GAAA,EAAA,CAAA;AACX,IAAA,IAAA,CAAK,MAAS,GAAA,KAAA,CAAA;AACd,IAAA,IAAA,CAAK,UAAa,GAAA,SAAA,CAAA;AAClB,IAAA,IAAA,CAAK,YAAe,GAAA,WAAA,CAAA;AAAA,GACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,EAAkB,GAAA;AACzB,IAAA,OAAO,IAAK,CAAA,GAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,KAA4B,GAAA;AACnC,IAAI,IAAA,OAAO,IAAK,CAAA,MAAA,KAAW,UAAY,EAAA;AACnC,MAAA,OAAO,KAAK,MAAO,EAAA,CAAA;AAAA,KACvB;AACA,IAAA,OAAO,IAAK,CAAA,MAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,aAAgE,EAAA;AAC/F,IAAI,IAAA,aAAA,CAAc,WAAW,CAAG,EAAA;AAC5B,MAAO,OAAA,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,GAAc,GAAA,CAAA,CAAA;AAClB,IAAc,aAAA,CAAA,OAAA,CAAQ,CAAC,IAAA,EAAM,KAAU,KAAA;AACnC,MAAA,IAAI,oBAAoB,IAAM,EAAA,IAAA,CAAK,KAAM,CAAA,KAAK,CAAC,CAAG,EAAA;AAC9C,QAAM,GAAA,GAAA,KAAA,CAAA;AAAA,OACV;AAAA,KACH,CAAA,CAAA;AACD,IAAO,OAAA,GAAA,CAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,SAAsD,GAAA;AAC7D,IAAA,OAAO,IAAK,CAAA,UAAA,CAAA;AAAA,GAChB;AAAA,EAGA,IAAW,WAAkC,GAAA;AACzC,IAAA,OAAO,IAAK,CAAA,YAAA,CAAA;AAAA,GAChB;AACJ,CAAA,CAAA;;;ACrGO,IAAM,cAAiB,GAAA,qBAAA;AAKf,SAAR,cAAkD,WAAsB,EAAA;AAAE,EAAA,OAAO,IAAI,KAAS,CAAA,cAAA,EAAgB,EAAC,EAAG,QAAW,WAAW,CAAA,CAAA;AAAE","file":"CloseLabel.mjs","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"]}
@@ -47,5 +47,5 @@ var DialogueBaseModel = class {
47
47
  };
48
48
 
49
49
  module.exports = DialogueBaseModel;
50
- //# sourceMappingURL=out.js.map
50
+ //# sourceMappingURL=DialogueBaseModel.js.map
51
51
  //# sourceMappingURL=DialogueBaseModel.js.map
@@ -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,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"]}
1
+ {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";;;AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,WAAY,CAAA,IAAA,EAA6B,SAAiC,EAAA,YAAA,GAAsD,EAAI,EAAA;AAsBpI;AAAA;AAAA;AAAA,IAAe,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA;AAQf;AAAA;AAAA;AAAA,IAAA,IAAA,CAAA,YAAA,GAAsD,EAAC,CAAA;AA7BnD,IAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC1B,MAAA,IAAA,CAAK,IAAO,GAAA,IAAA,CAAA;AACZ,MAAI,IAAA,OAAO,cAAc,QAAU,EAAA;AAC/B,QAAA,IAAA,CAAK,SAAY,GAAA,SAAA,CAAA;AAAA,OAEhB,MAAA;AACD,QAAA,IAAA,CAAK,YAAY,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAA,IAAA,CAAK,YAAe,GAAA,YAAA,CAAA;AAAA,KAEnB,MAAA;AACD,MAAA,IAAA,CAAK,OAAO,IAAK,CAAA,IAAA,CAAA;AACjB,MAAA,IAAI,KAAK,SAAW,EAAA;AAChB,QAAA,IAAA,CAAK,YAAY,IAAK,CAAA,SAAA,CAAA;AAAA,OAC1B;AACA,MAAK,IAAA,CAAA,YAAA,GAAe,IAAK,CAAA,YAAA,IAAgB,EAAC,CAAA;AAAA,KAC9C;AAAA,GACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,MAAuB,GAAA;AACnB,IAAO,OAAA;AAAA,MACH,MAAM,IAAK,CAAA,IAAA;AAAA,MACX,WAAW,IAAK,CAAA,SAAA;AAAA,MAChB,cAAc,IAAK,CAAA,YAAA;AAAA,KACvB,CAAA;AAAA,GACJ;AACJ","file":"DialogueBaseModel.js","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"]}
@@ -45,5 +45,5 @@ var DialogueBaseModel = class {
45
45
  };
46
46
 
47
47
  export { DialogueBaseModel as default };
48
- //# sourceMappingURL=out.js.map
48
+ //# sourceMappingURL=DialogueBaseModel.mjs.map
49
49
  //# sourceMappingURL=DialogueBaseModel.mjs.map
@@ -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,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"]}
1
+ {"version":3,"sources":["../../src/classes/DialogueBaseModel.ts"],"names":[],"mappings":";AA0BA,IAAqB,oBAArB,MAA2H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvH,WAAY,CAAA,IAAA,EAA6B,SAAiC,EAAA,YAAA,GAAsD,EAAI,EAAA;AAsBpI;AAAA;AAAA;AAAA,IAAe,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA;AAQf;AAAA;AAAA;AAAA,IAAA,IAAA,CAAA,YAAA,GAAsD,EAAC,CAAA;AA7BnD,IAAI,IAAA,OAAO,SAAS,QAAU,EAAA;AAC1B,MAAA,IAAA,CAAK,IAAO,GAAA,IAAA,CAAA;AACZ,MAAI,IAAA,OAAO,cAAc,QAAU,EAAA;AAC/B,QAAA,IAAA,CAAK,SAAY,GAAA,SAAA,CAAA;AAAA,OAEhB,MAAA;AACD,QAAA,IAAA,CAAK,YAAY,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAA,IAAA,CAAK,YAAe,GAAA,YAAA,CAAA;AAAA,KAEnB,MAAA;AACD,MAAA,IAAA,CAAK,OAAO,IAAK,CAAA,IAAA,CAAA;AACjB,MAAA,IAAI,KAAK,SAAW,EAAA;AAChB,QAAA,IAAA,CAAK,YAAY,IAAK,CAAA,SAAA,CAAA;AAAA,OAC1B;AACA,MAAK,IAAA,CAAA,YAAA,GAAe,IAAK,CAAA,YAAA,IAAgB,EAAC,CAAA;AAAA,KAC9C;AAAA,GACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,MAAuB,GAAA;AACnB,IAAO,OAAA;AAAA,MACH,MAAM,IAAK,CAAA,IAAA;AAAA,MACX,WAAW,IAAK,CAAA,SAAA;AAAA,MAChB,cAAc,IAAK,CAAA,YAAA;AAAA,KACvB,CAAA;AAAA,GACJ;AACJ","file":"DialogueBaseModel.mjs","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"]}
@@ -75,5 +75,5 @@ var Label = class {
75
75
  };
76
76
 
77
77
  module.exports = Label;
78
- //# sourceMappingURL=out.js.map
78
+ //# sourceMappingURL=Label.js.map
79
79
  //# sourceMappingURL=Label.js.map
@@ -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;;;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"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";;;;;AAmBO,SAAS,mBAAA,CAAoB,OAAiD,KAA0D,EAAA;AAC3I,EAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AACrB,CAAA;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,WAAY,CAAA,EAAA,EAAiB,KAAwD,EAAA,SAAA,EAAwC,WAAsB,EAAA;AAC/I,IAAA,IAAA,CAAK,GAAM,GAAA,EAAA,CAAA;AACX,IAAA,IAAA,CAAK,MAAS,GAAA,KAAA,CAAA;AACd,IAAA,IAAA,CAAK,UAAa,GAAA,SAAA,CAAA;AAClB,IAAA,IAAA,CAAK,YAAe,GAAA,WAAA,CAAA;AAAA,GACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,EAAkB,GAAA;AACzB,IAAA,OAAO,IAAK,CAAA,GAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,KAA4B,GAAA;AACnC,IAAI,IAAA,OAAO,IAAK,CAAA,MAAA,KAAW,UAAY,EAAA;AACnC,MAAA,OAAO,KAAK,MAAO,EAAA,CAAA;AAAA,KACvB;AACA,IAAA,OAAO,IAAK,CAAA,MAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,aAAgE,EAAA;AAC/F,IAAI,IAAA,aAAA,CAAc,WAAW,CAAG,EAAA;AAC5B,MAAO,OAAA,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,GAAc,GAAA,CAAA,CAAA;AAClB,IAAc,aAAA,CAAA,OAAA,CAAQ,CAAC,IAAA,EAAM,KAAU,KAAA;AACnC,MAAA,IAAI,oBAAoB,IAAM,EAAA,IAAA,CAAK,KAAM,CAAA,KAAK,CAAC,CAAG,EAAA;AAC9C,QAAM,GAAA,GAAA,KAAA,CAAA;AAAA,OACV;AAAA,KACH,CAAA,CAAA;AACD,IAAO,OAAA,GAAA,CAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,SAAsD,GAAA;AAC7D,IAAA,OAAO,IAAK,CAAA,UAAA,CAAA;AAAA,GAChB;AAAA,EAGA,IAAW,WAAkC,GAAA;AACzC,IAAA,OAAO,IAAK,CAAA,YAAA,CAAA;AAAA,GAChB;AACJ","file":"Label.js","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"]}
@@ -73,5 +73,5 @@ var Label = class {
73
73
  };
74
74
 
75
75
  export { Label as default };
76
- //# sourceMappingURL=out.js.map
76
+ //# sourceMappingURL=Label.mjs.map
77
77
  //# sourceMappingURL=Label.mjs.map
@@ -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;;;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"]}
1
+ {"version":3,"sources":["../../src/functions/StepLabelUtility.ts","../../src/classes/Label.ts"],"names":[],"mappings":";;;AAmBO,SAAS,mBAAA,CAAoB,OAAiD,KAA0D,EAAA;AAC3I,EAAA,OAAO,KAAU,KAAA,KAAA,CAAA;AACrB,CAAA;;;ACSA,IAAqB,QAArB,MAA8C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO1C,WAAY,CAAA,EAAA,EAAiB,KAAwD,EAAA,SAAA,EAAwC,WAAsB,EAAA;AAC/I,IAAA,IAAA,CAAK,GAAM,GAAA,EAAA,CAAA;AACX,IAAA,IAAA,CAAK,MAAS,GAAA,KAAA,CAAA;AACd,IAAA,IAAA,CAAK,UAAa,GAAA,SAAA,CAAA;AAClB,IAAA,IAAA,CAAK,YAAe,GAAA,WAAA,CAAA;AAAA,GACxB;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,EAAkB,GAAA;AACzB,IAAA,OAAO,IAAK,CAAA,GAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,KAA4B,GAAA;AACnC,IAAI,IAAA,OAAO,IAAK,CAAA,MAAA,KAAW,UAAY,EAAA;AACnC,MAAA,OAAO,KAAK,MAAO,EAAA,CAAA;AAAA,KACvB;AACA,IAAA,OAAO,IAAK,CAAA,MAAA,CAAA;AAAA,GAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,4BAA4B,aAAgE,EAAA;AAC/F,IAAI,IAAA,aAAA,CAAc,WAAW,CAAG,EAAA;AAC5B,MAAO,OAAA,CAAA,CAAA;AAAA,KACX;AACA,IAAA,IAAI,GAAc,GAAA,CAAA,CAAA;AAClB,IAAc,aAAA,CAAA,OAAA,CAAQ,CAAC,IAAA,EAAM,KAAU,KAAA;AACnC,MAAA,IAAI,oBAAoB,IAAM,EAAA,IAAA,CAAK,KAAM,CAAA,KAAK,CAAC,CAAG,EAAA;AAC9C,QAAM,GAAA,GAAA,KAAA,CAAA;AAAA,OACV;AAAA,KACH,CAAA,CAAA;AACD,IAAO,OAAA,GAAA,CAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,IAAW,SAAsD,GAAA;AAC7D,IAAA,OAAO,IAAK,CAAA,UAAA,CAAA;AAAA,GAChB;AAAA,EAGA,IAAW,WAAkC,GAAA;AACzC,IAAA,OAAO,IAAK,CAAA,YAAA,CAAA;AAAA,GAChB;AACJ","file":"Label.mjs","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"]}
@@ -84,7 +84,7 @@ var CanvasContainer = class extends pixi_js.Container {
84
84
  constructor(options) {
85
85
  super(options);
86
86
  this.pixivnId = CANVAS_CONTAINER_ID;
87
- this.pixivnId = this.constructor.prototype.pixivnId;
87
+ this.pixivnId = this.constructor.prototype.pixivnId || CANVAS_CONTAINER_ID;
88
88
  }
89
89
  get memory() {
90
90
  let memory = getMemoryContainer(this);
@@ -122,7 +122,6 @@ function getMemoryContainer(element) {
122
122
  position: { x: element.position.x, y: element.position.y },
123
123
  skew: { x: element.skew.x, y: element.skew.y },
124
124
  visible: element.visible,
125
- culled: element.culled,
126
125
  x: element.x,
127
126
  y: element.y,
128
127
  boundsArea: element.boundsArea,
@@ -160,7 +159,6 @@ function setMemoryContainer(element, memory) {
160
159
  memory.position && element.position.set(memory.position.x, memory.position.y);
161
160
  memory.skew && element.skew.set(memory.skew.x, memory.skew.y);
162
161
  memory.visible && (element.visible = memory.visible);
163
- memory.culled && (element.culled = memory.culled);
164
162
  memory.x && (element.x = memory.x);
165
163
  memory.y && (element.y = memory.y);
166
164
  memory.boundsArea && (element.boundsArea = memory.boundsArea);
@@ -191,17 +189,19 @@ function getTexture(imageUrl) {
191
189
  });
192
190
  });
193
191
  }
194
- function getTextStyle(style) {
195
- let fill = style.fill;
196
- if (fill instanceof Object) {
197
- console.warn("[Pixi'VN] CanvasText.style.fill is a FillGradient or FillPattern, this is not supported yet.", fill);
198
- fill = "#00FF00";
192
+ function getFillGradientFillPattern(prop, propName) {
193
+ if (!(prop instanceof Object)) {
194
+ return prop;
199
195
  }
196
+ console.warn(`[Pixi'VN] CanvasText.style.${propName} is a FillGradient or FillPattern, this is not supported yet.`, prop);
197
+ return void 0;
198
+ }
199
+ function getTextStyle(style) {
200
200
  return {
201
201
  align: style.align,
202
202
  breakWords: style.breakWords,
203
203
  dropShadow: style.dropShadow,
204
- fill,
204
+ fill: getFillGradientFillPattern(style.stroke, "fill"),
205
205
  fontFamily: style.fontFamily,
206
206
  fontSize: style.fontSize,
207
207
  fontStyle: style.fontStyle,
@@ -211,7 +211,7 @@ function getTextStyle(style) {
211
211
  letterSpacing: style.letterSpacing,
212
212
  lineHeight: style.lineHeight,
213
213
  padding: style.padding,
214
- stroke: style.stroke,
214
+ stroke: getFillGradientFillPattern(style.stroke, "stroke"),
215
215
  textBaseline: style.textBaseline,
216
216
  trim: style.trim,
217
217
  whiteSpace: style.whiteSpace,
@@ -258,7 +258,7 @@ var CanvasSprite = class _CanvasSprite extends pixi_js.Sprite {
258
258
  super(options);
259
259
  this.pixivnId = CANVAS_SPRITE_ID;
260
260
  this._onEvents = {};
261
- this.pixivnId = this.constructor.prototype.pixivnId;
261
+ this.pixivnId = this.constructor.prototype.pixivnId || CANVAS_SPRITE_ID;
262
262
  }
263
263
  get memory() {
264
264
  return getMemorySprite(this);
@@ -414,7 +414,7 @@ var CanvasText = class extends pixi_js.Text {
414
414
  super(options);
415
415
  this.pixivnId = CANVAS_TEXT_ID;
416
416
  this._onEvents = {};
417
- this.pixivnId = this.constructor.prototype.pixivnId;
417
+ this.pixivnId = this.constructor.prototype.pixivnId || CANVAS_TEXT_ID;
418
418
  }
419
419
  get memory() {
420
420
  return getMemoryText(this);
@@ -1042,7 +1042,7 @@ var _GameWindowManager = class _GameWindowManager {
1042
1042
  height
1043
1043
  }, options)).then(() => {
1044
1044
  _GameWindowManager._isInitialized = true;
1045
- this.addCanvasIntoElement(element);
1045
+ this.addCanvasIntoHTMLElement(element);
1046
1046
  window.addEventListener("resize", _GameWindowManager.resize);
1047
1047
  _GameWindowManager.resize();
1048
1048
  asciiArtLog();
@@ -1053,7 +1053,7 @@ var _GameWindowManager = class _GameWindowManager {
1053
1053
  * Add the canvas into a html element.
1054
1054
  * @param element it is the html element where I will put the canvas. Example: document.body
1055
1055
  */
1056
- static addCanvasIntoElement(element) {
1056
+ static addCanvasIntoHTMLElement(element) {
1057
1057
  if (_GameWindowManager.isInitialized) {
1058
1058
  element.appendChild(_GameWindowManager.app.canvas);
1059
1059
  } else {
@@ -1767,5 +1767,5 @@ var StoredClassModel = class {
1767
1767
  };
1768
1768
 
1769
1769
  module.exports = StoredClassModel;
1770
- //# sourceMappingURL=out.js.map
1770
+ //# sourceMappingURL=StoredClassModel.js.map
1771
1771
  //# sourceMappingURL=StoredClassModel.js.map