asajs 3.0.2 → 3.0.5

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 (286) hide show
  1. package/dist/cjs/compilers/BindingCompiler.js +458 -0
  2. package/dist/cjs/compilers/BindingFunctions.js +267 -0
  3. package/dist/cjs/compilers/Compiler.js +158 -0
  4. package/dist/cjs/compilers/Compress.js +55 -0
  5. package/dist/cjs/compilers/Config.js +138 -0
  6. package/dist/cjs/compilers/Encoder.js +90 -0
  7. package/dist/cjs/compilers/Installer.js +123 -0
  8. package/dist/cjs/compilers/PreCompile.js +86 -0
  9. package/dist/cjs/compilers/generator/GenerateDir.js +51 -0
  10. package/dist/cjs/compilers/generator/JsonBuilder.js +66 -0
  11. package/dist/cjs/compilers/generator/LangBuilder.js +65 -0
  12. package/dist/cjs/compilers/generator/Log.js +45 -0
  13. package/dist/cjs/compilers/generator/Manifest.js +63 -0
  14. package/dist/cjs/compilers/generator/Save.js +87 -0
  15. package/dist/cjs/compilers/generator/SearchFiles.js +70 -0
  16. package/dist/cjs/compilers/generator/Sounds.js +91 -0
  17. package/dist/cjs/compilers/generator/Template.js +54 -0
  18. package/dist/cjs/compilers/generator/UIBuilder.js +123 -0
  19. package/dist/cjs/compilers/reader/Audio.js +81 -0
  20. package/dist/cjs/compilers/reader/Color.js +65 -0
  21. package/dist/cjs/compilers/reader/CurrentLine.js +36 -0
  22. package/dist/cjs/compilers/reader/Env.js +21 -0
  23. package/dist/cjs/compilers/reader/GlobalVariables.js +23 -0
  24. package/dist/cjs/compilers/reader/Object.js +44 -0
  25. package/dist/cjs/compilers/reader/ReadBinding.js +67 -0
  26. package/dist/cjs/compilers/reader/ReadProperties.js +118 -0
  27. package/dist/cjs/components/AddCollectionChill.js +41 -0
  28. package/dist/cjs/components/Animation.js +127 -0
  29. package/dist/cjs/components/AnimationKeyFrame.js +49 -0
  30. package/dist/cjs/components/Class.js +95 -0
  31. package/dist/cjs/components/LocalizeText.js +59 -0
  32. package/dist/cjs/components/Modify.js +377 -0
  33. package/dist/cjs/components/Random.js +104 -0
  34. package/dist/cjs/components/UI.js +387 -0
  35. package/dist/cjs/components/Vanilla.js +57915 -0
  36. package/dist/cjs/index.js +291 -0
  37. package/dist/cjs/package.json +1 -0
  38. package/dist/cjs/template.js +37 -0
  39. package/dist/cjs/types/components/ChildIdentifier.js +16 -0
  40. package/dist/cjs/types/components/Identifier.js +17 -0
  41. package/dist/cjs/types/components/NameCallback.js +16 -0
  42. package/dist/cjs/types/components/UIIdentifier.js +16 -0
  43. package/dist/cjs/types/components/UIInterface.js +16 -0
  44. package/dist/cjs/types/enums/Anchor.js +39 -0
  45. package/dist/cjs/types/enums/AnimTypes.js +39 -0
  46. package/dist/cjs/types/enums/BindingCondition.js +36 -0
  47. package/dist/cjs/types/enums/BindingName.js +4208 -0
  48. package/dist/cjs/types/enums/BindingType.js +35 -0
  49. package/dist/cjs/types/enums/ClipDirecion.js +35 -0
  50. package/dist/cjs/types/enums/Collection.js +202 -0
  51. package/dist/cjs/types/enums/Direction.js +33 -0
  52. package/dist/cjs/types/enums/EasingTypes.js +62 -0
  53. package/dist/cjs/types/enums/EnumColor.js +37 -0
  54. package/dist/cjs/types/enums/FocusNavigationMode.js +34 -0
  55. package/dist/cjs/types/enums/FontSize.js +34 -0
  56. package/dist/cjs/types/enums/FontType.js +35 -0
  57. package/dist/cjs/types/enums/GlobalVariables.js +345 -0
  58. package/dist/cjs/types/enums/InputModeCondition.js +33 -0
  59. package/dist/cjs/types/enums/ItemAuxID.js +31 -0
  60. package/dist/cjs/types/enums/JsonUIArrayName.js +36 -0
  61. package/dist/cjs/types/enums/MappingFrom.js +81 -0
  62. package/dist/cjs/types/enums/MappingTo.js +248 -0
  63. package/dist/cjs/types/enums/MappingTypes.js +34 -0
  64. package/dist/cjs/types/enums/Orientation.js +32 -0
  65. package/dist/cjs/types/enums/Renderer.js +68 -0
  66. package/dist/cjs/types/enums/Rotation.js +33 -0
  67. package/dist/cjs/types/enums/Scope.js +32 -0
  68. package/dist/cjs/types/enums/TextTypes.js +33 -0
  69. package/dist/cjs/types/enums/TextureFileSystem.js +41 -0
  70. package/dist/cjs/types/enums/Types.js +57 -0
  71. package/dist/cjs/types/objects/Animation.js +16 -0
  72. package/dist/cjs/types/objects/BindingHook.js +16 -0
  73. package/dist/cjs/types/objects/BindingInterface.js +16 -0
  74. package/dist/cjs/types/objects/ButtonMapping.js +16 -0
  75. package/dist/cjs/types/objects/Factory.js +16 -0
  76. package/dist/cjs/types/objects/Installer.js +53 -0
  77. package/dist/cjs/types/objects/Manifest.js +56 -0
  78. package/dist/cjs/types/objects/Modify.js +16 -0
  79. package/dist/cjs/types/objects/PropertyBag.js +16 -0
  80. package/dist/cjs/types/objects/Sound.js +16 -0
  81. package/dist/cjs/types/objects/Variables.js +16 -0
  82. package/dist/cjs/types/objects/elements/Button.js +17 -0
  83. package/dist/cjs/types/objects/elements/CollectionPanel.js +17 -0
  84. package/dist/cjs/types/objects/elements/Custom.js +17 -0
  85. package/dist/cjs/types/objects/elements/Dropdown.js +17 -0
  86. package/dist/cjs/types/objects/elements/EditBox.js +17 -0
  87. package/dist/cjs/types/objects/elements/Grid.js +16 -0
  88. package/dist/cjs/types/objects/elements/Image.js +17 -0
  89. package/dist/cjs/types/objects/elements/InputPanel.js +16 -0
  90. package/dist/cjs/types/objects/elements/Label.js +17 -0
  91. package/dist/cjs/types/objects/elements/PropertiesType.js +17 -0
  92. package/dist/cjs/types/objects/elements/Screen.js +17 -0
  93. package/dist/cjs/types/objects/elements/ScrollView.js +17 -0
  94. package/dist/cjs/types/objects/elements/ScrollbarBox.js +17 -0
  95. package/dist/cjs/types/objects/elements/ScrollbarTrack.js +17 -0
  96. package/dist/cjs/types/objects/elements/SelectionWheel.js +17 -0
  97. package/dist/cjs/types/objects/elements/Slider.js +17 -0
  98. package/dist/cjs/types/objects/elements/SliderBox.js +17 -0
  99. package/dist/cjs/types/objects/elements/StackPanel.js +16 -0
  100. package/dist/cjs/types/objects/elements/Toggle.js +17 -0
  101. package/dist/cjs/types/objects/elements/TooltipTrigger.js +16 -0
  102. package/dist/cjs/types/objects/elements/panel.js +16 -0
  103. package/dist/cjs/types/objects/properties/Buttons.js +16 -0
  104. package/dist/cjs/types/objects/properties/CollectionIndexs.js +16 -0
  105. package/dist/cjs/types/objects/properties/Collections.js +16 -0
  106. package/dist/cjs/types/objects/properties/Controls.js +16 -0
  107. package/dist/cjs/types/objects/properties/Dropdowns.js +16 -0
  108. package/dist/cjs/types/objects/properties/Focus.js +16 -0
  109. package/dist/cjs/types/objects/properties/FocusContainerCustom.js +16 -0
  110. package/dist/cjs/types/objects/properties/Grids.js +16 -0
  111. package/dist/cjs/types/objects/properties/Inputs.js +16 -0
  112. package/dist/cjs/types/objects/properties/Layouts.js +16 -0
  113. package/dist/cjs/types/objects/properties/Properties.js +16 -0
  114. package/dist/cjs/types/objects/properties/Renderers.js +16 -0
  115. package/dist/cjs/types/objects/properties/Screens.js +16 -0
  116. package/dist/cjs/types/objects/properties/ScrollViews.js +16 -0
  117. package/dist/cjs/types/objects/properties/SelectionWheels.js +16 -0
  118. package/dist/cjs/types/objects/properties/SliderBoxs.js +16 -0
  119. package/dist/cjs/types/objects/properties/Sliders.js +16 -0
  120. package/dist/cjs/types/objects/properties/Sounds.js +16 -0
  121. package/dist/cjs/types/objects/properties/Specials.js +16 -0
  122. package/dist/cjs/types/objects/properties/Sprites.js +16 -0
  123. package/dist/cjs/types/objects/properties/StackPanels.js +16 -0
  124. package/dist/cjs/types/objects/properties/TTS.js +16 -0
  125. package/dist/cjs/types/objects/properties/TextEdits.js +16 -0
  126. package/dist/cjs/types/objects/properties/Texts.js +16 -0
  127. package/dist/cjs/types/objects/properties/Toggles.js +16 -0
  128. package/dist/cjs/types/objects/properties/TooltipTriggers.js +16 -0
  129. package/dist/cjs/types/objects/properties/Variables.js +16 -0
  130. package/dist/cjs/types/values/Any.js +16 -0
  131. package/dist/cjs/types/values/Binding.js +16 -0
  132. package/dist/cjs/types/values/Bool.js +16 -0
  133. package/dist/cjs/types/values/ColorVector.js +16 -0
  134. package/dist/cjs/types/values/ElementPath.js +16 -0
  135. package/dist/cjs/types/values/Hex.js +16 -0
  136. package/dist/cjs/types/values/Number.js +16 -0
  137. package/dist/cjs/types/values/RangeVector.js +16 -0
  138. package/dist/cjs/types/values/Str.js +16 -0
  139. package/dist/cjs/types/values/StringVector.js +16 -0
  140. package/dist/cjs/types/values/TargetElementPath.js +16 -0
  141. package/dist/cjs/types/values/Variable.js +16 -0
  142. package/dist/cjs/types/values/Vector.js +16 -0
  143. package/dist/esm/index.js +68470 -0
  144. package/dist/esm/package.json +1 -0
  145. package/dist/types/compilers/BindingCompiler.d.ts +44 -0
  146. package/dist/types/compilers/BindingFunctions.d.ts +10 -0
  147. package/dist/types/compilers/Compiler.d.ts +3 -0
  148. package/dist/types/compilers/Compress.d.ts +1 -0
  149. package/dist/types/compilers/Config.d.ts +95 -0
  150. package/dist/types/compilers/Encoder.d.ts +11 -0
  151. package/dist/types/compilers/Installer.d.ts +14 -0
  152. package/dist/types/compilers/PreCompile.d.ts +4 -0
  153. package/dist/types/compilers/generator/GenerateDir.d.ts +1 -0
  154. package/dist/types/compilers/generator/JsonBuilder.d.ts +28 -0
  155. package/dist/types/compilers/generator/LangBuilder.d.ts +4 -0
  156. package/dist/types/compilers/generator/Log.d.ts +9 -0
  157. package/dist/types/compilers/generator/Manifest.d.ts +21 -0
  158. package/dist/types/compilers/generator/Save.d.ts +16 -0
  159. package/dist/types/compilers/generator/SearchFiles.d.ts +11 -0
  160. package/dist/types/compilers/generator/Sounds.d.ts +5 -0
  161. package/dist/types/compilers/generator/Template.d.ts +1 -0
  162. package/dist/types/compilers/generator/UIBuilder.d.ts +9 -0
  163. package/dist/types/compilers/reader/Audio.d.ts +1 -0
  164. package/dist/types/compilers/reader/Color.d.ts +5 -0
  165. package/dist/types/compilers/reader/CurrentLine.d.ts +1 -0
  166. package/dist/types/compilers/reader/Env.d.ts +1 -0
  167. package/dist/types/compilers/reader/GlobalVariables.d.ts +1 -0
  168. package/dist/types/compilers/reader/Object.d.ts +11 -0
  169. package/dist/types/compilers/reader/ReadBinding.d.ts +6 -0
  170. package/dist/types/compilers/reader/ReadProperties.d.ts +3 -0
  171. package/dist/types/components/AddCollectionChill.d.ts +6 -0
  172. package/dist/types/components/Animation.d.ts +15 -0
  173. package/dist/types/components/AnimationKeyFrame.d.ts +10 -0
  174. package/dist/types/components/Class.d.ts +68 -0
  175. package/dist/types/components/LocalizeText.d.ts +21 -0
  176. package/dist/types/components/Modify.d.ts +30 -0
  177. package/dist/types/components/Random.d.ts +20 -0
  178. package/dist/types/components/UI.d.ts +89 -0
  179. package/dist/types/components/Vanilla.d.ts +19729 -0
  180. package/dist/types/index.d.ts +136 -0
  181. package/dist/types/template.d.ts +4 -0
  182. package/dist/types/types/components/ChildIdentifier.d.ts +11 -0
  183. package/dist/types/types/components/Identifier.d.ts +4 -0
  184. package/dist/types/types/components/NameCallback.d.ts +3 -0
  185. package/dist/types/types/components/UIIdentifier.d.ts +4 -0
  186. package/dist/types/types/components/UIInterface.d.ts +16 -0
  187. package/dist/types/types/enums/Anchor.d.ts +11 -0
  188. package/dist/types/types/enums/AnimTypes.d.ts +11 -0
  189. package/dist/types/types/enums/BindingCondition.d.ts +8 -0
  190. package/dist/types/types/enums/BindingName.d.ts +4180 -0
  191. package/dist/types/types/enums/BindingType.d.ts +7 -0
  192. package/dist/types/types/enums/ClipDirecion.d.ts +7 -0
  193. package/dist/types/types/enums/Collection.d.ts +174 -0
  194. package/dist/types/types/enums/Direction.d.ts +5 -0
  195. package/dist/types/types/enums/EasingTypes.d.ts +34 -0
  196. package/dist/types/types/enums/EnumColor.d.ts +9 -0
  197. package/dist/types/types/enums/FocusNavigationMode.d.ts +6 -0
  198. package/dist/types/types/enums/FontSize.d.ts +6 -0
  199. package/dist/types/types/enums/FontType.d.ts +7 -0
  200. package/dist/types/types/enums/GlobalVariables.d.ts +317 -0
  201. package/dist/types/types/enums/InputModeCondition.d.ts +5 -0
  202. package/dist/types/types/enums/ItemAuxID.d.ts +3 -0
  203. package/dist/types/types/enums/JsonUIArrayName.d.ts +7 -0
  204. package/dist/types/types/enums/MappingFrom.d.ts +53 -0
  205. package/dist/types/types/enums/MappingTo.d.ts +220 -0
  206. package/dist/types/types/enums/MappingTypes.d.ts +6 -0
  207. package/dist/types/types/enums/Orientation.d.ts +4 -0
  208. package/dist/types/types/enums/Renderer.d.ts +40 -0
  209. package/dist/types/types/enums/Rotation.d.ts +5 -0
  210. package/dist/types/types/enums/Scope.d.ts +4 -0
  211. package/dist/types/types/enums/TextTypes.d.ts +5 -0
  212. package/dist/types/types/enums/TextureFileSystem.d.ts +13 -0
  213. package/dist/types/types/enums/Types.d.ts +29 -0
  214. package/dist/types/types/objects/Animation.d.ts +36 -0
  215. package/dist/types/types/objects/BindingHook.d.ts +1 -0
  216. package/dist/types/types/objects/BindingInterface.d.ts +21 -0
  217. package/dist/types/types/objects/ButtonMapping.d.ts +18 -0
  218. package/dist/types/types/objects/Factory.d.ts +2 -0
  219. package/dist/types/types/objects/Installer.d.ts +26 -0
  220. package/dist/types/types/objects/Manifest.d.ts +74 -0
  221. package/dist/types/types/objects/Modify.d.ts +52 -0
  222. package/dist/types/types/objects/PropertyBag.d.ts +2 -0
  223. package/dist/types/types/objects/Sound.d.ts +8 -0
  224. package/dist/types/types/objects/Variables.d.ts +1 -0
  225. package/dist/types/types/objects/elements/Button.d.ts +4 -0
  226. package/dist/types/types/objects/elements/CollectionPanel.d.ts +4 -0
  227. package/dist/types/types/objects/elements/Custom.d.ts +5 -0
  228. package/dist/types/types/objects/elements/Dropdown.d.ts +4 -0
  229. package/dist/types/types/objects/elements/EditBox.d.ts +4 -0
  230. package/dist/types/types/objects/elements/Grid.d.ts +4 -0
  231. package/dist/types/types/objects/elements/Image.d.ts +4 -0
  232. package/dist/types/types/objects/elements/InputPanel.d.ts +7 -0
  233. package/dist/types/types/objects/elements/Label.d.ts +4 -0
  234. package/dist/types/types/objects/elements/PropertiesType.d.ts +45 -0
  235. package/dist/types/types/objects/elements/Screen.d.ts +4 -0
  236. package/dist/types/types/objects/elements/ScrollView.d.ts +5 -0
  237. package/dist/types/types/objects/elements/ScrollbarBox.d.ts +4 -0
  238. package/dist/types/types/objects/elements/ScrollbarTrack.d.ts +4 -0
  239. package/dist/types/types/objects/elements/SelectionWheel.d.ts +4 -0
  240. package/dist/types/types/objects/elements/Slider.d.ts +4 -0
  241. package/dist/types/types/objects/elements/SliderBox.d.ts +5 -0
  242. package/dist/types/types/objects/elements/StackPanel.d.ts +7 -0
  243. package/dist/types/types/objects/elements/Toggle.d.ts +4 -0
  244. package/dist/types/types/objects/elements/TooltipTrigger.d.ts +8 -0
  245. package/dist/types/types/objects/elements/panel.d.ts +6 -0
  246. package/dist/types/types/objects/properties/Buttons.d.ts +5 -0
  247. package/dist/types/types/objects/properties/CollectionIndexs.d.ts +4 -0
  248. package/dist/types/types/objects/properties/Collections.d.ts +6 -0
  249. package/dist/types/types/objects/properties/Controls.d.ts +27 -0
  250. package/dist/types/types/objects/properties/Dropdowns.d.ts +6 -0
  251. package/dist/types/types/objects/properties/Focus.d.ts +28 -0
  252. package/dist/types/types/objects/properties/FocusContainerCustom.d.ts +5 -0
  253. package/dist/types/types/objects/properties/Grids.d.ts +15 -0
  254. package/dist/types/types/objects/properties/Inputs.d.ts +13 -0
  255. package/dist/types/types/objects/properties/Layouts.d.ts +35 -0
  256. package/dist/types/types/objects/properties/Properties.d.ts +27 -0
  257. package/dist/types/types/objects/properties/Renderers.d.ts +5 -0
  258. package/dist/types/types/objects/properties/Screens.d.ts +23 -0
  259. package/dist/types/types/objects/properties/ScrollViews.d.ts +17 -0
  260. package/dist/types/types/objects/properties/SelectionWheels.d.ts +13 -0
  261. package/dist/types/types/objects/properties/SliderBoxs.d.ts +6 -0
  262. package/dist/types/types/objects/properties/Sliders.d.ts +23 -0
  263. package/dist/types/types/objects/properties/Sounds.d.ts +10 -0
  264. package/dist/types/types/objects/properties/Specials.d.ts +60 -0
  265. package/dist/types/types/objects/properties/Sprites.d.ts +33 -0
  266. package/dist/types/types/objects/properties/StackPanels.d.ts +5 -0
  267. package/dist/types/types/objects/properties/TTS.d.ts +24 -0
  268. package/dist/types/types/objects/properties/TextEdits.d.ts +19 -0
  269. package/dist/types/types/objects/properties/Texts.d.ts +26 -0
  270. package/dist/types/types/objects/properties/Toggles.d.ts +24 -0
  271. package/dist/types/types/objects/properties/TooltipTriggers.d.ts +7 -0
  272. package/dist/types/types/objects/properties/Variables.d.ts +3 -0
  273. package/dist/types/types/values/Any.d.ts +4 -0
  274. package/dist/types/types/values/Binding.d.ts +2 -0
  275. package/dist/types/types/values/Bool.d.ts +2 -0
  276. package/dist/types/types/values/ColorVector.d.ts +6 -0
  277. package/dist/types/types/values/ElementPath.d.ts +2 -0
  278. package/dist/types/types/values/Hex.d.ts +1 -0
  279. package/dist/types/types/values/Number.d.ts +4 -0
  280. package/dist/types/types/values/RangeVector.d.ts +5 -0
  281. package/dist/types/types/values/Str.d.ts +2 -0
  282. package/dist/types/types/values/StringVector.d.ts +6 -0
  283. package/dist/types/types/values/TargetElementPath.d.ts +1 -0
  284. package/dist/types/types/values/Variable.d.ts +1 -0
  285. package/dist/types/types/values/Vector.d.ts +5 -0
  286. package/package.json +4 -4
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Object_exports = {};
20
+ __export(Object_exports, {
21
+ Obj: () => Obj
22
+ });
23
+ module.exports = __toCommonJS(Object_exports);
24
+ var import_Class = require("../../components/Class");
25
+ class Obj extends import_Class.Class {
26
+ static forEach(data, callback) {
27
+ for (const key in data) {
28
+ const element = data[key];
29
+ callback(key, element);
30
+ }
31
+ }
32
+ static map(data, callback) {
33
+ for (const key in data) {
34
+ const getdata = callback(key, data[key]);
35
+ delete data[key];
36
+ data[getdata.key] = getdata.value;
37
+ }
38
+ return data;
39
+ }
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ Obj
44
+ });
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ReadBinding_exports = {};
20
+ __export(ReadBinding_exports, {
21
+ ReadBinding: () => ReadBinding
22
+ });
23
+ module.exports = __toCommonJS(ReadBinding_exports);
24
+ var import_BindingType = require("../../types/enums/BindingType");
25
+ var import_BindingCompiler = require("../BindingCompiler");
26
+ var import_Log = require("../generator/Log");
27
+ var import_CurrentLine = require("./CurrentLine");
28
+ function ReadBinding(binding, arg) {
29
+ if (typeof binding === "string")
30
+ return {
31
+ binding_name: binding
32
+ };
33
+ else {
34
+ const bindingObject = binding;
35
+ if (bindingObject.source_property_name) {
36
+ bindingObject.binding_type || (bindingObject.binding_type = import_BindingType.BindingType.View);
37
+ const srcBin = bindingObject.source_property_name;
38
+ if (srcBin && import_BindingCompiler.BindingCompiler.isCanCompile(srcBin)) {
39
+ if (bindingObject.source_control_name) {
40
+ const srcControlName = bindingObject.source_control_name;
41
+ delete bindingObject.source_control_name;
42
+ const newBindings = import_BindingCompiler.BindingCompiler.findSourceBindings(
43
+ import_BindingCompiler.BindingCompiler.getCompilePart(srcBin),
44
+ srcControlName,
45
+ arg.sourceBindings
46
+ );
47
+ for (const key in newBindings.reSourceBindings)
48
+ arg.sourceBindings[key] = newBindings.reSourceBindings[key];
49
+ bindingObject.source_property_name = import_BindingCompiler.BindingCompiler.compile(
50
+ "[".concat(newBindings.newTokens.join(""), "]"),
51
+ arg
52
+ );
53
+ } else bindingObject.source_property_name = import_BindingCompiler.BindingCompiler.compile(srcBin, arg);
54
+ }
55
+ if (!bindingObject.target_property_name) {
56
+ import_Log.Log.error("".concat((0, import_CurrentLine.CurrentLine)(), " missing target_property_name."));
57
+ }
58
+ } else if (bindingObject.binding_collection_name) {
59
+ bindingObject.binding_type || (bindingObject.binding_type = import_BindingType.BindingType.Collection);
60
+ }
61
+ return bindingObject;
62
+ }
63
+ }
64
+ // Annotate the CommonJS export names for ESM import in node:
65
+ 0 && (module.exports = {
66
+ ReadBinding
67
+ });
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var ReadProperties_exports = {};
20
+ __export(ReadProperties_exports, {
21
+ ReadProperties: () => ReadProperties,
22
+ ReadValue: () => ReadValue
23
+ });
24
+ module.exports = __toCommonJS(ReadProperties_exports);
25
+ var import_Animation = require("../../components/Animation");
26
+ var import_LocalizeText = require("../../components/LocalizeText");
27
+ var import_Modify = require("../../components/Modify");
28
+ var import_UI = require("../../components/UI");
29
+ var import_Log = require("../generator/Log");
30
+ var import_Sounds = require("../generator/Sounds");
31
+ var import_Color = require("./Color");
32
+ var import_Object = require("./Object");
33
+ function ReadValue(value, callback) {
34
+ if (Array.isArray(value)) {
35
+ if (typeof value[0] === "string") {
36
+ if (value[0].startsWith("#") || value[0].startsWith("0x"))
37
+ value = import_Color.ColorHandler.parse(value[0]);
38
+ else if (value[0].startsWith("$")) return callback == null ? void 0 : callback("var");
39
+ }
40
+ } else if (value instanceof import_Animation.Animation) return value.getKeyIndex(0);
41
+ else if (value instanceof import_LocalizeText.LocalizeText) return value.get();
42
+ else if (value instanceof import_UI.UI || value instanceof import_Modify.Modify) return value.getPath();
43
+ return value;
44
+ }
45
+ function ReadProperties(properties) {
46
+ if (properties.x || properties.y) {
47
+ properties.offset = [properties.x || 0, properties.y || 0];
48
+ delete properties.x;
49
+ delete properties.y;
50
+ }
51
+ if (properties.min_w || properties.min_h) {
52
+ properties.min_size = [properties.min_w || 0, properties.min_h || 0];
53
+ delete properties.min_w;
54
+ delete properties.min_h;
55
+ } else if (properties.min_size !== void 0 && !Array.isArray(properties.min_size) && typeof properties.min_size === "string" && !properties.min_size.startsWith("$"))
56
+ properties.min_size = [properties.min_size, properties.min_size];
57
+ if (properties.max_w || properties.max_h) {
58
+ properties.max_size = [properties.max_w || 0, properties.max_h || 0];
59
+ delete properties.max_w;
60
+ delete properties.max_h;
61
+ } else if (properties.max_size !== void 0 && !Array.isArray(properties.max_size) && typeof properties.max_size === "string" && !properties.max_size.startsWith("$"))
62
+ properties.max_size = [properties.max_size, properties.max_size];
63
+ if (properties.w || properties.h) {
64
+ properties.size = [properties.w || 0, properties.h || 0];
65
+ delete properties.w;
66
+ delete properties.h;
67
+ } else if (properties.size !== void 0 && !Array.isArray(properties.size) && typeof properties.size === "string" && !properties.size.startsWith("$"))
68
+ properties.size = [properties.size, properties.size];
69
+ if (properties.sound_path) {
70
+ properties.sound_name = import_Sounds.SoundHandler.get(properties.sound_path);
71
+ delete properties.sound_path;
72
+ }
73
+ if (properties.sounds) {
74
+ properties.sounds = properties.sounds.map((sound) => {
75
+ if (sound.sound_path) {
76
+ const soundId = import_Sounds.SoundHandler.get(sound.sound_path);
77
+ delete sound.sound_path;
78
+ return {
79
+ sound_name: soundId
80
+ };
81
+ } else return sound;
82
+ });
83
+ }
84
+ import_Object.Obj.forEach(properties, (key, value) => {
85
+ if (key.startsWith("#")) {
86
+ if (["string", "number", "boolean"].includes(typeof value)) {
87
+ (properties.property_bag || (properties.property_bag = {}))[key] = value;
88
+ } else import_Log.Log.error('Invalid value for property "'.concat(key, '"'));
89
+ delete properties[key];
90
+ } else {
91
+ properties[key] = ReadValue(value, (type) => {
92
+ if (type === "var") {
93
+ const isSpecialProperty = ["size", "min_size", "max_size"].includes(key);
94
+ const disableDefault = value[2];
95
+ const propertyName = disableDefault ? value[0] : "".concat(value[0], "|default");
96
+ if (isSpecialProperty) {
97
+ if (Array.isArray(value[1])) properties[propertyName] = value[1];
98
+ else properties[propertyName] = [value[1], value[1]];
99
+ } else {
100
+ properties[propertyName] = ReadValue(value[1]);
101
+ }
102
+ return value[0];
103
+ }
104
+ });
105
+ }
106
+ });
107
+ if (properties.anchor) {
108
+ properties.anchor_from = properties.anchor;
109
+ properties.anchor_to = properties.anchor;
110
+ delete properties.anchor;
111
+ }
112
+ return properties;
113
+ }
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ ReadProperties,
117
+ ReadValue
118
+ });
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var AddCollectionChill_exports = {};
20
+ __export(AddCollectionChill_exports, {
21
+ AddCollectionChild: () => AddCollectionChild
22
+ });
23
+ module.exports = __toCommonJS(AddCollectionChill_exports);
24
+ function AddCollectionChild(parent, child, collectionLength, startIndex = 0, properties, setName, callback) {
25
+ for (let index = startIndex; index < collectionLength; index++) {
26
+ const name = setName == null ? void 0 : setName(index);
27
+ parent.addChild(
28
+ child,
29
+ {
30
+ ...properties,
31
+ collection_index: index
32
+ },
33
+ name,
34
+ callback
35
+ );
36
+ }
37
+ }
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ AddCollectionChild
41
+ });
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+ var Animation_exports = {};
22
+ __export(Animation_exports, {
23
+ Animation: () => Animation
24
+ });
25
+ module.exports = __toCommonJS(Animation_exports);
26
+ var import_Config = require("../compilers/Config");
27
+ var import_AnimTypes = require("../types/enums/AnimTypes");
28
+ var import_AnimationKeyFrame = require("./AnimationKeyFrame");
29
+ var import_Class = require("./Class");
30
+ var import_Random = require("./Random");
31
+ class Animation extends import_Class.Class {
32
+ constructor(animation, identifier) {
33
+ super();
34
+ this.identifier = identifier;
35
+ __publicField(this, "keyFrames", []);
36
+ __publicField(this, "buildKey", 0);
37
+ __publicField(this, "config", import_Config.Configs.getConfig());
38
+ if (!(identifier && !this.config.compiler.UI.obfuscateName))
39
+ identifier = {
40
+ name: import_Random.Random.getAnimationName(),
41
+ namespace: import_Random.Random.getNamespace()
42
+ };
43
+ else {
44
+ if (!identifier.name) identifier.name = import_Random.Random.getAnimationName();
45
+ if (!identifier.namespace) identifier.namespace = import_Random.Random.getAnimationName();
46
+ }
47
+ this.buildAnimation(animation, identifier);
48
+ }
49
+ static register(animation, identifier) {
50
+ return new Animation(animation, identifier);
51
+ }
52
+ getKeyIndex(index) {
53
+ let i = index < 0 ? 0 : Math.min(index, this.keyFrames.length);
54
+ return "@".concat(this.keyFrames[index]);
55
+ }
56
+ buildAnimation({ from, keyFrames, loop, type, durationPerKeyFrame = 1, smartCycle, defaultEase }, identifier) {
57
+ var _a;
58
+ const prefix = keyFrames.length - 1;
59
+ if ((smartCycle === void 0 || smartCycle) && loop) {
60
+ if (typeof keyFrames[prefix] == "number") keyFrames[prefix] = {
61
+ duration: keyFrames[prefix],
62
+ to: from
63
+ };
64
+ else if (JSON.stringify(keyFrames[prefix].to) != JSON.stringify(from)) {
65
+ keyFrames.push({
66
+ to: (_a = keyFrames[0].from) != null ? _a : from,
67
+ duration: durationPerKeyFrame,
68
+ easing: defaultEase
69
+ });
70
+ }
71
+ }
72
+ const frameLength = keyFrames.length - 1;
73
+ keyFrames.forEach((keyFrame, index) => {
74
+ var _a2;
75
+ this.keyFrames.push("".concat(identifier.namespace, ".").concat(identifier.name));
76
+ const currentIdentifier = identifier;
77
+ let next;
78
+ if (index === frameLength) {
79
+ if (loop) next = this.getKeyIndex(0);
80
+ } else {
81
+ identifier = this.generateIdentifier();
82
+ next = this.getFrameKeyByIdentifier(identifier);
83
+ }
84
+ if (typeof keyFrame == "number") {
85
+ new import_AnimationKeyFrame.AnimationKeyFrame(
86
+ {
87
+ next,
88
+ anim_type: import_AnimTypes.AnimationTypes.Wait,
89
+ duration: keyFrame
90
+ },
91
+ currentIdentifier
92
+ );
93
+ } else {
94
+ new import_AnimationKeyFrame.AnimationKeyFrame(
95
+ {
96
+ next,
97
+ anim_type: type,
98
+ from,
99
+ duration: (_a2 = keyFrame.duration) != null ? _a2 : durationPerKeyFrame,
100
+ easing: defaultEase,
101
+ ...keyFrame
102
+ },
103
+ currentIdentifier
104
+ );
105
+ }
106
+ if (typeof keyFrame === "object") from = keyFrame.to;
107
+ });
108
+ }
109
+ generateIdentifier() {
110
+ var _a, _b;
111
+ if (this.config.compiler.UI.obfuscateName) return {
112
+ name: import_Random.Random.getAnimationName(),
113
+ namespace: import_Random.Random.getNamespace()
114
+ };
115
+ else return {
116
+ name: ((_a = this.identifier) == null ? void 0 : _a.name) ? "".concat(this.identifier.name, "-f").concat(this.buildKey++) : import_Random.Random.getAnimationName(),
117
+ namespace: ((_b = this.identifier) == null ? void 0 : _b.namespace) || import_Random.Random.getNamespace()
118
+ };
119
+ }
120
+ getFrameKeyByIdentifier(identifier) {
121
+ return "@".concat(identifier.namespace, ".").concat(identifier.name);
122
+ }
123
+ }
124
+ // Annotate the CommonJS export names for ESM import in node:
125
+ 0 && (module.exports = {
126
+ Animation
127
+ });
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+ var AnimationKeyFrame_exports = {};
22
+ __export(AnimationKeyFrame_exports, {
23
+ AnimationKeyFrame: () => AnimationKeyFrame
24
+ });
25
+ module.exports = __toCommonJS(AnimationKeyFrame_exports);
26
+ var import_JsonBuilder = require("../compilers/generator/JsonBuilder");
27
+ var import_ReadProperties = require("../compilers/reader/ReadProperties");
28
+ var import_Class = require("./Class");
29
+ class AnimationKeyFrame extends import_Class.Class {
30
+ constructor(keyFrame, identifier) {
31
+ super();
32
+ this.identifier = identifier;
33
+ __publicField(this, "properties");
34
+ this.properties = keyFrame;
35
+ if (this.properties.from) this.properties.from = (0, import_ReadProperties.ReadValue)(this.properties.from);
36
+ if (this.properties.to) this.properties.to = (0, import_ReadProperties.ReadValue)(this.properties.to);
37
+ import_JsonBuilder.JsonBuilder.registerElement(identifier.namespace || "", this);
38
+ }
39
+ getFullPath() {
40
+ return this.identifier.name || "";
41
+ }
42
+ getUI() {
43
+ return this.properties;
44
+ }
45
+ }
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ AnimationKeyFrame
49
+ });
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+ var Class_exports = {};
22
+ __export(Class_exports, {
23
+ Class: () => Class
24
+ });
25
+ module.exports = __toCommonJS(Class_exports);
26
+ class Class {
27
+ /**
28
+ * A static method that seems to serve as a placeholder, but has no functionality as of now.
29
+ *
30
+ * @private
31
+ * @static
32
+ */
33
+ static apply() {
34
+ }
35
+ /**
36
+ * A static method that seems to serve as a placeholder, but has no functionality as of now.
37
+ *
38
+ * @private
39
+ * @static
40
+ */
41
+ static bind() {
42
+ }
43
+ /**
44
+ * A static method that seems to serve as a placeholder, but has no functionality as of now.
45
+ *
46
+ * @private
47
+ * @static
48
+ */
49
+ static call() {
50
+ }
51
+ /**
52
+ * A static method that seems to serve as a placeholder, but has no functionality as of now.
53
+ *
54
+ * @private
55
+ * @static
56
+ */
57
+ static toString() {
58
+ }
59
+ }
60
+ /**
61
+ * A static property initialized to an empty string, likely intended to hold arguments or be overridden in the future.
62
+ *
63
+ * @private
64
+ * @static
65
+ * @type {string}
66
+ */
67
+ __publicField(Class, "arguments", "");
68
+ /**
69
+ * A static property initialized to an empty string, likely intended to hold caller information or be overridden in the future.
70
+ *
71
+ * @private
72
+ * @static
73
+ * @type {string}
74
+ */
75
+ __publicField(Class, "caller", "");
76
+ /**
77
+ * A static property initialized to an empty string, likely intended to hold length-related data or be overridden in the future.
78
+ *
79
+ * @private
80
+ * @static
81
+ * @type {string}
82
+ */
83
+ __publicField(Class, "length", "");
84
+ /**
85
+ * A static property initialized to an empty string, likely intended to hold a name or be overridden in the future.
86
+ *
87
+ * @private
88
+ * @static
89
+ * @type {string}
90
+ */
91
+ __publicField(Class, "name", "");
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ Class
95
+ });
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var LocalizeText_exports = {};
20
+ __export(LocalizeText_exports, {
21
+ LocalizeText: () => LocalizeText,
22
+ localizeText: () => localizeText
23
+ });
24
+ module.exports = __toCommonJS(LocalizeText_exports);
25
+ var import_UI = require("./UI");
26
+ const localizeText = {};
27
+ class LocalizeText {
28
+ constructor(key, value) {
29
+ this.key = key;
30
+ if (typeof value === "string") {
31
+ this.set({ en_US: value });
32
+ } else {
33
+ this.set(value);
34
+ }
35
+ }
36
+ createLabel(properties, identifier) {
37
+ const label = import_UI.UI.label(properties, identifier);
38
+ label.setProperties({
39
+ text: this.key
40
+ });
41
+ return label;
42
+ }
43
+ set(texts) {
44
+ for (const language in texts) {
45
+ (localizeText[language] || (localizeText[language] = {}))[this.key] = texts[language];
46
+ }
47
+ }
48
+ get() {
49
+ return this.key;
50
+ }
51
+ static register(key, value) {
52
+ return new LocalizeText(key, value);
53
+ }
54
+ }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ LocalizeText,
58
+ localizeText
59
+ });