asajs 4.1.2-indev → 4.1.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 (116) hide show
  1. package/config.d.ts +1 -0
  2. package/dist/js/analyzer/generate-code.js +1 -0
  3. package/dist/js/analyzer/generate-ui-defs.js +1 -0
  4. package/dist/js/analyzer/rebaseUIFiles.js +12 -25
  5. package/dist/js/analyzer/utils.js +1 -0
  6. package/dist/js/analyzer/vanilladefs.js +1 -0
  7. package/dist/js/compilers/Configuration.js +3 -1
  8. package/dist/js/compilers/FormatProperties.js +1 -0
  9. package/dist/js/compilers/Memory.js +1 -0
  10. package/dist/js/compilers/PreCompile.js +1 -0
  11. package/dist/js/compilers/Random.js +1 -0
  12. package/dist/js/compilers/bindings/Binary.js +1 -0
  13. package/dist/js/compilers/bindings/Checker.js +1 -0
  14. package/dist/js/compilers/bindings/Function.js +1 -0
  15. package/dist/js/compilers/bindings/Lexer.js +1 -0
  16. package/dist/js/compilers/bindings/Parser.js +3 -0
  17. package/dist/js/compilers/bindings/index.js +1 -0
  18. package/dist/js/compilers/bindings/types.js +1 -0
  19. package/dist/js/compilers/ui/buildcache.js +1 -0
  20. package/dist/js/compilers/ui/builder.js +12 -3
  21. package/dist/js/compilers/ui/installer.js +1 -0
  22. package/dist/js/compilers/ui/linker.js +1 -0
  23. package/dist/js/compilers/ui/manifest.js +1 -0
  24. package/dist/js/components/API.js +1 -0
  25. package/dist/js/components/Animation.js +1 -0
  26. package/dist/js/components/AnimationKeyframe.js +1 -0
  27. package/dist/js/components/Class.js +1 -0
  28. package/dist/js/components/KeyframeController.js +1 -0
  29. package/dist/js/components/UI.js +9 -2
  30. package/dist/js/components/Utils.js +1 -0
  31. package/dist/js/index.js +1 -0
  32. package/dist/js/types/enums/Anchor.js +1 -0
  33. package/dist/js/types/enums/AnimType.js +1 -0
  34. package/dist/js/types/enums/ArrayName.js +1 -0
  35. package/dist/js/types/enums/BagBinding.js +1 -0
  36. package/dist/js/types/enums/Binding.js +1 -0
  37. package/dist/js/types/enums/BindingCondition.js +1 -0
  38. package/dist/js/types/enums/BindingType.js +1 -0
  39. package/dist/js/types/enums/ButtonId.js +1 -0
  40. package/dist/js/types/enums/ClipDirection.js +1 -0
  41. package/dist/js/types/enums/CollectionName.js +1 -0
  42. package/dist/js/types/enums/Color.js +1 -0
  43. package/dist/js/types/enums/DebugColor.js +1 -0
  44. package/dist/js/types/enums/Easing.js +1 -0
  45. package/dist/js/types/enums/FocusNavigationMode.js +1 -0
  46. package/dist/js/types/enums/FontSize.js +1 -0
  47. package/dist/js/types/enums/FontType.js +1 -0
  48. package/dist/js/types/enums/GlobalVariables.js +1 -0
  49. package/dist/js/types/enums/GridDimensions.js +1 -0
  50. package/dist/js/types/enums/InputModeCondition.js +1 -0
  51. package/dist/js/types/enums/Items.js +1 -0
  52. package/dist/js/types/enums/Links.js +1 -0
  53. package/dist/js/types/enums/MappingType.js +1 -0
  54. package/dist/js/types/enums/McColor.js +1 -0
  55. package/dist/js/types/enums/Operation.js +1 -0
  56. package/dist/js/types/enums/Orientation.js +1 -0
  57. package/dist/js/types/enums/Renderer.js +1 -0
  58. package/dist/js/types/enums/Rotation.js +1 -0
  59. package/dist/js/types/enums/Scope.js +1 -0
  60. package/dist/js/types/enums/SliderName.js +1 -0
  61. package/dist/js/types/enums/SmartAnimation.js +1 -0
  62. package/dist/js/types/enums/TextAlignment.js +1 -0
  63. package/dist/js/types/enums/TextType.js +1 -0
  64. package/dist/js/types/enums/TextboxName.js +1 -0
  65. package/dist/js/types/enums/ToggleName.js +1 -0
  66. package/dist/js/types/enums/Type.js +1 -0
  67. package/dist/js/types/enums/index.js +1 -0
  68. package/dist/js/types/properties/components.js +1 -0
  69. package/dist/js/types/properties/element/Animation.js +1 -0
  70. package/dist/js/types/properties/element/Button.js +1 -0
  71. package/dist/js/types/properties/element/CarouselLabel.js +1 -0
  72. package/dist/js/types/properties/element/Collection.js +1 -0
  73. package/dist/js/types/properties/element/Control.js +1 -0
  74. package/dist/js/types/properties/element/CustomRenderer.js +1 -0
  75. package/dist/js/types/properties/element/Cycler.js +1 -0
  76. package/dist/js/types/properties/element/DataBinding.js +1 -0
  77. package/dist/js/types/properties/element/DropdownName.js +1 -0
  78. package/dist/js/types/properties/element/EditBox.js +1 -0
  79. package/dist/js/types/properties/element/Factory.js +1 -0
  80. package/dist/js/types/properties/element/Focus.js +1 -0
  81. package/dist/js/types/properties/element/Grid.js +1 -0
  82. package/dist/js/types/properties/element/GridItem.js +1 -0
  83. package/dist/js/types/properties/element/GridPageIndicator.js +1 -0
  84. package/dist/js/types/properties/element/Input.js +1 -0
  85. package/dist/js/types/properties/element/Layout.js +1 -0
  86. package/dist/js/types/properties/element/Screen.js +1 -0
  87. package/dist/js/types/properties/element/ScrollView.js +1 -0
  88. package/dist/js/types/properties/element/SelectionWheel.js +1 -0
  89. package/dist/js/types/properties/element/Slider.js +1 -0
  90. package/dist/js/types/properties/element/Sliderbox.js +1 -0
  91. package/dist/js/types/properties/element/Sound.js +1 -0
  92. package/dist/js/types/properties/element/Sprite.js +1 -0
  93. package/dist/js/types/properties/element/StackPanel.js +1 -0
  94. package/dist/js/types/properties/element/TTS.js +1 -0
  95. package/dist/js/types/properties/element/Tab.js +1 -0
  96. package/dist/js/types/properties/element/Text.js +1 -0
  97. package/dist/js/types/properties/element/Toggle.js +1 -0
  98. package/dist/js/types/properties/element/TooltipTrigger.js +1 -0
  99. package/dist/js/types/properties/element/index.js +1 -0
  100. package/dist/js/types/properties/index.js +1 -0
  101. package/dist/js/types/properties/value.js +1 -0
  102. package/dist/js/types/vanilla/index.js +1 -0
  103. package/dist/js/types/vanilla/intellisense.js +1 -0
  104. package/dist/js/types/vanilla/paths.js +1 -0
  105. package/dist/types/compilers/Configuration.d.ts +1 -0
  106. package/dist/types/compilers/bindings/Parser.d.ts +1 -0
  107. package/dist/types/components/AnimationKeyframe.d.ts +4 -4
  108. package/package.json +1 -1
  109. package/dist/js/analyzer/custom-ui.js +0 -1
  110. package/dist/js/analyzer/generate-ui-code.js +0 -1
  111. package/dist/js/analyzer/rebase.js +0 -29
  112. package/dist/js/analyzer/remove-not-ui.js +0 -29
  113. package/dist/types/analyzer/custom-ui.d.ts +0 -1
  114. package/dist/types/analyzer/generate-ui-code.d.ts +0 -1
  115. package/dist/types/analyzer/rebase.d.ts +0 -1
  116. package/dist/types/analyzer/remove-not-ui.d.ts +0 -1
package/config.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface Config {
15
15
  fixInventoryItemRenderer?: boolean
16
16
  buildFolder?: string
17
17
  fileExtension?: string
18
+ uiBuildFolder?: string
18
19
  }
19
20
 
20
21
  ui_analyzer?: {
@@ -80,3 +80,4 @@ export default function Modify<T extends Namespace, K extends Element<T>>(namesp
80
80
  ...Elements,
81
81
  ].join("\n\n"), "utf-8");
82
82
  }
83
+ //# sourceMappingURL=generate-code.js.map
@@ -115,3 +115,4 @@ export function generateUIDefs(pack_folder) {
115
115
  fs.mkdirSync("database");
116
116
  fs.writeFileSync(path.join("database", `${pack_folder}-defs.json`), JSON.stringify(uiMap, null, 4), "utf-8");
117
117
  }
118
+ //# sourceMappingURL=generate-ui-defs.js.map
@@ -9,33 +9,20 @@ export function rebaseUIFiles(pack_folder) {
9
9
  ui.add("ui/_global_variables.json");
10
10
  if (!fs.existsSync(targetDir))
11
11
  return;
12
- const processDirectory = (currentDir) => {
13
- const entries = fs.readdirSync(currentDir, { withFileTypes: true });
14
- for (const entry of entries) {
15
- const fullPath = path.join(currentDir, entry.name);
16
- if (entry.isDirectory()) {
17
- processDirectory(fullPath);
18
- if (fs.readdirSync(fullPath).length === 0) {
19
- fs.rmdirSync(fullPath);
12
+ for (const relativePath of ui) {
13
+ const fullPath = path.join(targetDir, relativePath);
14
+ if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) {
15
+ try {
16
+ const fileContent = fs.readFileSync(fullPath, "utf-8");
17
+ const parsedData = parse(fileContent);
18
+ if (parsedData !== undefined) {
19
+ fs.writeFileSync(fullPath, JSON.stringify(parsedData, null, 4), "utf-8");
20
20
  }
21
21
  }
22
- else if (entry.isFile()) {
23
- const relativePath = fullPath.replace(targetDir + path.sep, "");
24
- const normalizedPath = relativePath.split(path.sep).join("/");
25
- if (ui.has(normalizedPath)) {
26
- try {
27
- const fileContent = fs.readFileSync(fullPath, "utf-8");
28
- const parsedData = parse(fileContent);
29
- if (parsedData !== undefined) {
30
- fs.writeFileSync(fullPath, JSON.stringify(parsedData, null, 4), "utf-8");
31
- }
32
- }
33
- catch (error) {
34
- console.error(`Parser error: ${fullPath}`, error);
35
- }
36
- }
22
+ catch (error) {
23
+ console.error(`Parser error: ${fullPath}`, error);
37
24
  }
38
25
  }
39
- };
40
- processDirectory(targetDir);
26
+ }
41
27
  }
28
+ //# sourceMappingURL=rebaseUIFiles.js.map
@@ -16,3 +16,4 @@ export function uiFiles(pack_folder) {
16
16
  vanillaUIDefsMap.set(pack_folder, set);
17
17
  return set;
18
18
  }
19
+ //# sourceMappingURL=utils.js.map
@@ -143586,3 +143586,4 @@ export const vanilladefs = {
143586
143586
  }
143587
143587
  }
143588
143588
  };
143589
+ //# sourceMappingURL=vanilladefs.js.map
@@ -44,7 +44,7 @@ if (!fs.existsSync("asajs.config.js")) {
44
44
  else {
45
45
  fs.writeFileSync("asajs.config.js", [
46
46
  'import { RandomBindingString } from "asajs"\n',
47
- fs.readFileSync("node_modules/asajs/resources/example-config.js", "utf-8"),
47
+ fs.readFileSync(path.join(process.cwd(), "node_modules/asajs/resources/example-config.js"), "utf-8"),
48
48
  ].join("\n"));
49
49
  }
50
50
  }
@@ -53,6 +53,7 @@ export const isBuildMode = options["build"] ?? config.compiler?.enabled ?? false
53
53
  export const isLinkMode = options["link"] ?? config.compiler?.autoImport ?? false;
54
54
  export const unLinked = options["unlink"] ?? !(config.compiler?.autoImport ?? true);
55
55
  export const buildFolder = config.compiler?.buildFolder || "build";
56
+ export const uiBuildFolder = config.compiler?.uiBuildFolder || "asajs";
56
57
  export const bindingFuntions = config.binding_functions;
57
58
  if (!fs.existsSync(".gitignore")) {
58
59
  fs.writeFileSync(".gitignore", "node_modules\ncustom", "utf-8");
@@ -72,3 +73,4 @@ if (config.ui_analyzer?.enabled) {
72
73
  }
73
74
  });
74
75
  }
76
+ //# sourceMappingURL=Configuration.js.map
@@ -33,3 +33,4 @@ export function FormatAnimationProperties(properties) {
33
33
  }
34
34
  return properties;
35
35
  }
36
+ //# sourceMappingURL=FormatProperties.js.map
@@ -31,3 +31,4 @@ export class Memory extends Class {
31
31
  return data;
32
32
  }
33
33
  }
34
+ //# sourceMappingURL=Memory.js.map
@@ -20,3 +20,4 @@ function TypeHighlight(type) {
20
20
  export function Log(type, message) {
21
21
  console.log(`\x1b[90m[${(performance.now() - now).toFixed(2)}ms]\x1b[0m`, `[${TypeHighlight(type)}]`, message, "\x1b[0m");
22
22
  }
23
+ //# sourceMappingURL=PreCompile.js.map
@@ -3,3 +3,4 @@ const namespaces = Array.from({ length: 15 }, () => RandomString(16));
3
3
  export function RandomNamespace() {
4
4
  return namespaces[Math.floor(Math.random() * namespaces.length)];
5
5
  }
6
+ //# sourceMappingURL=Random.js.map
@@ -34,3 +34,4 @@ export function binToInt(input) {
34
34
  bindings,
35
35
  };
36
36
  }
37
+ //# sourceMappingURL=Binary.js.map
@@ -31,3 +31,4 @@ export function isNumber(input) {
31
31
  export function isString(input) {
32
32
  return /^'.+'$/.test(input);
33
33
  }
34
+ //# sourceMappingURL=Checker.js.map
@@ -289,3 +289,4 @@ if (bindingFuntions)
289
289
  };
290
290
  });
291
291
  });
292
+ //# sourceMappingURL=Function.js.map
@@ -247,3 +247,4 @@ export function Lexer(input, start = 0, end) {
247
247
  } while (++index < length);
248
248
  return tokens;
249
249
  }
250
+ //# sourceMappingURL=Lexer.js.map
@@ -11,6 +11,7 @@ export class Parser {
11
11
  genBindings = [];
12
12
  output;
13
13
  tokens;
14
+ static hasError = false;
14
15
  constructor(input, cache = new Map(), tokens) {
15
16
  this.input = input;
16
17
  this.cache = cache;
@@ -330,6 +331,7 @@ export class Parser {
330
331
  expect(kind, err) {
331
332
  const prev = this.at() || this.last();
332
333
  if (!prev || prev.kind !== kind) {
334
+ Parser.hasError = true;
333
335
  throw new Error(`\x1b[31m${this.getPointer(prev)}\n` + `[ERROR]: ${err}\x1b[0m - Expected ${TokenKind[kind]}`);
334
336
  }
335
337
  }
@@ -352,3 +354,4 @@ export class Parser {
352
354
  };
353
355
  }
354
356
  }
357
+ //# sourceMappingURL=Parser.js.map
@@ -2,3 +2,4 @@ export * from "./Checker.js";
2
2
  export * from "./Lexer.js";
3
3
  export * from "./Parser.js";
4
4
  export * from "./types.js";
5
+ //# sourceMappingURL=index.js.map
@@ -25,3 +25,4 @@ export function makeToken(input, kind, start, length = 1) {
25
25
  return { kind, start, length, value: input.slice(start, start + length) };
26
26
  }
27
27
  }
28
+ //# sourceMappingURL=types.js.map
@@ -54,3 +54,4 @@ export class BuildCache {
54
54
  });
55
55
  }
56
56
  }
57
+ //# sourceMappingURL=buildcache.js.map
@@ -8,6 +8,7 @@ import { disableRSP, enableRSP } from "./installer.js";
8
8
  import { Log } from "../PreCompile.js";
9
9
  import path from "path";
10
10
  import { API_events } from "../../components/API.js";
11
+ import { Parser } from "../bindings/Parser.js";
11
12
  async function buildUI() {
12
13
  const build = Memory.build();
13
14
  build.set("ui/_ui_defs.json", {
@@ -25,7 +26,7 @@ async function buildUI() {
25
26
  const extend = value.extend;
26
27
  return [extend ? key + String(extend) : key, value];
27
28
  }))), "utf-8")
28
- .then(() => Log("INFO", `${outFile} with ${Object.keys(value).length} elements created!`));
29
+ .then(() => Log("INFO", `${outFile.replace(/\\/g, "/")} with ${Object.keys(value).length} elements created!`));
29
30
  build.delete(file);
30
31
  return file;
31
32
  }));
@@ -40,8 +41,11 @@ async function buildUI() {
40
41
  BuildCache.set("version", version).then(() => Log("INFO", "version set!")),
41
42
  fs
42
43
  .stat(`${buildFolder}/pack_icon.png`)
43
- .catch(() => fs.copyFile(isTestMode ? "resources/pack_icon.png" : "node_modules/asajs/resources/pack_icon.png", `${buildFolder}/pack_icon.png`))
44
- .then(() => Log("INFO", `${buildFolder}/pack_icon.png copied!`))
44
+ .catch(() => fs
45
+ .copyFile(isTestMode
46
+ ? "resources/pack_icon.png"
47
+ : path.join(process.cwd(), "node_modules/asajs/resources/pack_icon.png"), `${buildFolder}/pack_icon.png`)
48
+ .then(() => Log("INFO", `${buildFolder}/pack_icon.png copied!`)))
45
49
  .catch(() => Log("WARN", `cannot copy ${buildFolder}/pack_icon.png!`)),
46
50
  ]).catch(error => console.error(error));
47
51
  return out.length;
@@ -51,6 +55,10 @@ if (isBuildMode) {
51
55
  process.on("beforeExit", async () => {
52
56
  if (first) {
53
57
  first = false;
58
+ if (Parser.hasError) {
59
+ console.error();
60
+ return;
61
+ }
54
62
  await createBuildFolder();
55
63
  await buildUI();
56
64
  if (isLinkMode)
@@ -77,3 +85,4 @@ else if (isLinkMode)
77
85
  linkToGame();
78
86
  else if (unLinked)
79
87
  unlink();
88
+ //# sourceMappingURL=builder.js.map
@@ -156,3 +156,4 @@ export function getGamedataPath() {
156
156
  }
157
157
  }
158
158
  }
159
+ //# sourceMappingURL=installer.js.map
@@ -68,3 +68,4 @@ export async function getUUID() {
68
68
  return [genUUID(), genUUID()];
69
69
  });
70
70
  }
71
+ //# sourceMappingURL=linker.js.map
@@ -24,3 +24,4 @@ export async function genManifest() {
24
24
  metadata: config.packinfo?.metadata,
25
25
  });
26
26
  }
27
+ //# sourceMappingURL=manifest.js.map
@@ -6,3 +6,4 @@ export const API = {
6
6
  API_events.onBuildFinish.push(callback);
7
7
  },
8
8
  };
9
+ //# sourceMappingURL=API.js.map
@@ -131,3 +131,4 @@ export class Animation extends Class {
131
131
  return `\x1b[33mAnimation\x1b[0m<\x1b[92m${this.type}\x1b[0m> \x1b[92m"${this}\x1b[92m"\x1b[0m {\n${out.join("\n")}\n}\n`;
132
132
  }
133
133
  }
134
+ //# sourceMappingURL=Animation.js.map
@@ -57,3 +57,4 @@ export class AnimationKeyframe extends Class {
57
57
  return `\x1b[33mAnimationKeyFrame\x1b[0m<\x1b[92m${this.type}\x1b[0m> \x1b[92m"${this}\x1b[92m"\x1b[0m ${util.inspect(this.toJsonUI(), opts)}\n`;
58
58
  }
59
59
  }
60
+ //# sourceMappingURL=AnimationKeyframe.js.map
@@ -8,3 +8,4 @@ export class Class {
8
8
  static call() { }
9
9
  static toString() { }
10
10
  }
11
+ //# sourceMappingURL=Class.js.map
@@ -7,3 +7,4 @@ export class KeyframeController extends AnimationKeyframe {
7
7
  return this.toJsonUI();
8
8
  }
9
9
  }
10
+ //# sourceMappingURL=KeyframeController.js.map
@@ -5,8 +5,14 @@ import { Operation } from "../types/enums/Operation.js";
5
5
  import { Class } from "./Class.js";
6
6
  import { RandomString, ResolveBinding } from "./Utils.js";
7
7
  import { RandomNamespace } from "../compilers/Random.js";
8
+ import nodepath from "path";
8
9
  import util from "node:util";
9
- import { config } from "../compilers/Configuration.js";
10
+ import { config, uiBuildFolder } from "../compilers/Configuration.js";
11
+ const fileExt = config.compiler?.fileExtension
12
+ ? config.compiler.fileExtension.startsWith(".")
13
+ ? config.compiler.fileExtension
14
+ : `.${config.compiler.fileExtension}`
15
+ : ".json";
10
16
  export class UI extends Class {
11
17
  type;
12
18
  path;
@@ -32,7 +38,7 @@ export class UI extends Class {
32
38
  this.name = name?.match(/^(\w|\/)+/)?.[0] || RandomString(16);
33
39
  this.namespace = namespace || RandomNamespace();
34
40
  if (!path)
35
- this.path = `asajs/${this.namespace}${config.compiler?.fileExtension ? (config.compiler.fileExtension.startsWith(".") ? config.compiler.fileExtension : `.${config.compiler.fileExtension}`) : ".json"}`;
41
+ this.path = nodepath.join(uiBuildFolder, `${this.namespace}${fileExt}`);
36
42
  else
37
43
  this.path = path;
38
44
  this.extendable = this.name.search("/") === -1;
@@ -343,3 +349,4 @@ export class ModifyUI extends UI {
343
349
  return `\x1b[33mUI\x1b[0m<\x1b[92mmodify\x1b[0m> \x1b[92m"${this}\x1b[92m"\x1b[0m ${util.inspect(this.toJsonUIModify(), opts)}\n`;
344
350
  }
345
351
  }
352
+ //# sourceMappingURL=UI.js.map
@@ -329,3 +329,4 @@ export function AnimationExtendsOf(animation, properties) {
329
329
  anim.extend = animation;
330
330
  return anim;
331
331
  }
332
+ //# sourceMappingURL=Utils.js.map
package/dist/js/index.js CHANGED
@@ -13,3 +13,4 @@ export { ArrayName, Operation } from "./types/properties/index.js";
13
13
  export * from "./compilers/bindings/Binary.js";
14
14
  export { API } from "./components/API.js";
15
15
  export { MemoryModify } from "./compilers/Memory.js";
16
+ //# sourceMappingURL=index.js.map
@@ -10,3 +10,4 @@ export var Anchor;
10
10
  Anchor["BOTTOM_MIDDLE"] = "bottom_middle";
11
11
  Anchor["BOTTOM_RIGHT"] = "bottom_right";
12
12
  })(Anchor || (Anchor = {}));
13
+ //# sourceMappingURL=Anchor.js.map
@@ -10,3 +10,4 @@ export var AnimType;
10
10
  AnimType["WAIT"] = "wait";
11
11
  AnimType["ASEPRITE_FLIP_BOOK"] = "aseprite_flip_book";
12
12
  })(AnimType || (AnimType = {}));
13
+ //# sourceMappingURL=AnimType.js.map
@@ -4,3 +4,4 @@ export var ArrayName;
4
4
  ArrayName["BINDINGS"] = "bindings";
5
5
  ArrayName["BUTTON_MAPPINGS"] = "button_mappings";
6
6
  })(ArrayName || (ArrayName = {}));
7
+ //# sourceMappingURL=ArrayName.js.map
@@ -65,3 +65,4 @@ export var BagBinding;
65
65
  BagBinding["HYPERLINK"] = "#hyperlink";
66
66
  BagBinding["SEACH_RESULTS_CLOSE_BUTTON_VISIBLE"] = "#seach_results_close_button_visible";
67
67
  })(BagBinding || (BagBinding = {}));
68
+ //# sourceMappingURL=BagBinding.js.map
@@ -2792,3 +2792,4 @@ export var Binding;
2792
2792
  Binding["EDU_AI_LESSON_CRAFTER_ON"] = "#edu_ai_lesson_crafter_on";
2793
2793
  Binding["EDITIONS_VISIBLE_AND_NOT_REALMS_PROMO_VISIBLE"] = "#editions_visible_and_not_realms_promo_visible";
2794
2794
  })(Binding || (Binding = {}));
2795
+ //# sourceMappingURL=Binding.js.map
@@ -7,3 +7,4 @@ export var BindingCondition;
7
7
  BindingCondition["ONCE"] = "once";
8
8
  BindingCondition["VISIBILITY_CHANGED"] = "visibility_changed";
9
9
  })(BindingCondition || (BindingCondition = {}));
10
+ //# sourceMappingURL=BindingCondition.js.map
@@ -6,3 +6,4 @@ export var BindingType;
6
6
  BindingType["VIEW"] = "view";
7
7
  BindingType["NONE"] = "none";
8
8
  })(BindingType || (BindingType = {}));
9
+ //# sourceMappingURL=BindingType.js.map
@@ -1110,3 +1110,4 @@ export var ButtonId;
1110
1110
  ButtonId["UPDATE_AND_PLAY"] = "button.update_and_play";
1111
1111
  ButtonId["SELECT_WORLDS"] = "button.select_worlds";
1112
1112
  })(ButtonId || (ButtonId = {}));
1113
+ //# sourceMappingURL=ButtonId.js.map
@@ -6,3 +6,4 @@ export var ClipDirection;
6
6
  ClipDirection["DOWN"] = "down";
7
7
  ClipDirection["CENTER"] = "center";
8
8
  })(ClipDirection || (ClipDirection = {}));
9
+ //# sourceMappingURL=ClipDirection.js.map
@@ -168,3 +168,4 @@ export var CollectionName;
168
168
  CollectionName["LABTABLE_INPUT"] = "labtable_input";
169
169
  CollectionName["MATREDUCE_OUTPUT"] = "matreduce_output";
170
170
  })(CollectionName || (CollectionName = {}));
171
+ //# sourceMappingURL=CollectionName.js.map
@@ -1,3 +1,4 @@
1
1
  export var Color;
2
2
  (function (Color) {
3
3
  })(Color || (Color = {}));
4
+ //# sourceMappingURL=Color.js.map
@@ -9,3 +9,4 @@ export var DebugColor;
9
9
  DebugColor["YELLOW"] = "yellow";
10
10
  DebugColor["PURPLE"] = "purple";
11
11
  })(DebugColor || (DebugColor = {}));
12
+ //# sourceMappingURL=DebugColor.js.map
@@ -33,3 +33,4 @@ export var Easing;
33
33
  Easing["OUT_ELASTIC"] = "out_elastic";
34
34
  Easing["IN_OUT_ELASTIC"] = "in_out_elastic";
35
35
  })(Easing || (Easing = {}));
36
+ //# sourceMappingURL=Easing.js.map
@@ -5,3 +5,4 @@ export var FocusNavigationMode;
5
5
  FocusNavigationMode["CUSTOM"] = "custom";
6
6
  FocusNavigationMode["STOP"] = "stop";
7
7
  })(FocusNavigationMode || (FocusNavigationMode = {}));
8
+ //# sourceMappingURL=FocusNavigationMode.js.map
@@ -6,3 +6,4 @@ export var FontSize;
6
6
  FontSize["LARGE"] = "large";
7
7
  FontSize["EXTRA_LARGE"] = "extra_large";
8
8
  })(FontSize || (FontSize = {}));
9
+ //# sourceMappingURL=FontSize.js.map
@@ -5,3 +5,4 @@ export var FontType;
5
5
  FontType["UNICODE"] = "unicode";
6
6
  FontType["SMOOTH"] = "smooth";
7
7
  })(FontType || (FontType = {}));
8
+ //# sourceMappingURL=FontType.js.map
@@ -57,3 +57,4 @@ export var GlobalVariables;
57
57
  GlobalVariables["IS_BERWICK"] = "$is_berwick";
58
58
  GlobalVariables["EDIT_MODE"] = "$edit_mode";
59
59
  })(GlobalVariables || (GlobalVariables = {}));
60
+ //# sourceMappingURL=GlobalVariables.js.map
@@ -85,3 +85,4 @@ export var GridDimensions;
85
85
  GridDimensions["PROGRESSIONS_GRID_DIMENSION"] = "#progressions_grid_dimension";
86
86
  GridDimensions["DEV_NEW_ACHIEVEMENTS_SCREENS_RADIO_DIMENSION"] = "#dev_new_achievements_screens_radio_dimension";
87
87
  })(GridDimensions || (GridDimensions = {}));
88
+ //# sourceMappingURL=GridDimensions.js.map
@@ -5,3 +5,4 @@ export var InputModeCondition;
5
5
  InputModeCondition["NOT_GAMEPAD"] = "not_gamepad";
6
6
  InputModeCondition["GAMEPAD_AND_NOT_GAZE"] = "gamepad_and_not_gaze";
7
7
  })(InputModeCondition || (InputModeCondition = {}));
8
+ //# sourceMappingURL=InputModeCondition.js.map
@@ -1488,3 +1488,4 @@ export var ItemAuxID;
1488
1488
  ItemAuxID[ItemAuxID["ZOMBIE_SPAWN_EGG"] = 31457280] = "ZOMBIE_SPAWN_EGG";
1489
1489
  ItemAuxID[ItemAuxID["ZOMBIE_VILLAGER_SPAWN_EGG"] = 33488896] = "ZOMBIE_VILLAGER_SPAWN_EGG";
1490
1490
  })(ItemAuxID || (ItemAuxID = {}));
1491
+ //# sourceMappingURL=Items.js.map
@@ -31,3 +31,4 @@ export var Links;
31
31
  Links["SWITCHCONTENT"] = "https://aka.ms/switchcontent";
32
32
  Links["CHANGEGAMERTAG"] = "https://social.xbox.com/changegamertag";
33
33
  })(Links || (Links = {}));
34
+ //# sourceMappingURL=Links.js.map
@@ -5,3 +5,4 @@ export var MappingType;
5
5
  MappingType["DOUBLE_PRESSED"] = "double_pressed";
6
6
  MappingType["FOCUSED"] = "focused";
7
7
  })(MappingType || (MappingType = {}));
8
+ //# sourceMappingURL=MappingType.js.map
@@ -13,3 +13,4 @@ export var McColor;
13
13
  McColor["GRAY"] = "gray";
14
14
  McColor["BLUE"] = "blue";
15
15
  })(McColor || (McColor = {}));
16
+ //# sourceMappingURL=McColor.js.map
@@ -12,3 +12,4 @@ export var Operation;
12
12
  Operation["REMOVE"] = "remove";
13
13
  Operation["REPLACE"] = "replace";
14
14
  })(Operation || (Operation = {}));
15
+ //# sourceMappingURL=Operation.js.map
@@ -4,3 +4,4 @@ export var Orientation;
4
4
  Orientation["HORIZONTAL"] = "horizontal";
5
5
  Orientation["NONE"] = "none";
6
6
  })(Orientation || (Orientation = {}));
7
+ //# sourceMappingURL=Orientation.js.map
@@ -53,3 +53,4 @@ export var Renderer;
53
53
  Renderer["NETEASE_PAPER_DOLL_RENDERER"] = "netease_paper_doll_renderer";
54
54
  Renderer["NETEASE_MINI_MAP_RENDERER"] = "netease_mini_map_renderer";
55
55
  })(Renderer || (Renderer = {}));
56
+ //# sourceMappingURL=Renderer.js.map
@@ -5,3 +5,4 @@ export var Rotation;
5
5
  Rotation["GESTURE_X"] = "gesture_x";
6
6
  Rotation["CUSTOM_Y"] = "custom_y";
7
7
  })(Rotation || (Rotation = {}));
8
+ //# sourceMappingURL=Rotation.js.map
@@ -4,3 +4,4 @@ export var Scope;
4
4
  Scope["VIEW"] = "view";
5
5
  Scope["CONTROLLER"] = "controller";
6
6
  })(Scope || (Scope = {}));
7
+ //# sourceMappingURL=Scope.js.map
@@ -66,3 +66,4 @@ export var SliderName;
66
66
  SliderName["NEUTRAL_VOLUME"] = "neutral_volume";
67
67
  SliderName["RECORD_VOLUME"] = "record_volume";
68
68
  })(SliderName || (SliderName = {}));
69
+ //# sourceMappingURL=SliderName.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=SmartAnimation.js.map
@@ -4,3 +4,4 @@ export var TextAlignment;
4
4
  TextAlignment["RIGHT"] = "right";
5
5
  TextAlignment["CENTER"] = "center";
6
6
  })(TextAlignment || (TextAlignment = {}));
7
+ //# sourceMappingURL=TextAlignment.js.map
@@ -4,3 +4,4 @@ export var TextType;
4
4
  TextType["IDENTIFIERCHARS"] = "IdentifierChars";
5
5
  TextType["NUMBERCHARS"] = "NumberChars";
6
6
  })(TextType || (TextType = {}));
7
+ //# sourceMappingURL=TextType.js.map
@@ -95,3 +95,4 @@ export var TextboxName;
95
95
  TextboxName["DEV_PROGRESSION_ID"] = "dev_progression_id";
96
96
  TextboxName["ANIMATION_TIME_FIELD"] = "#animation_time_field";
97
97
  })(TextboxName || (TextboxName = {}));
98
+ //# sourceMappingURL=TextboxName.js.map
@@ -321,3 +321,4 @@ export var ToggleName;
321
321
  ToggleName["SIDEBAR_OPTION_DROPDOWN"] = "toggle.sidebar_option_dropdown";
322
322
  ToggleName["ANIMATION_MODE_DROPDOWN"] = "animation_mode_dropdown";
323
323
  })(ToggleName || (ToggleName = {}));
324
+ //# sourceMappingURL=ToggleName.js.map
@@ -35,3 +35,4 @@ export var Type;
35
35
  Type["MUL_LINES"] = "mul_lines";
36
36
  Type["UNKNOWN"] = "unknown";
37
37
  })(Type || (Type = {}));
38
+ //# sourceMappingURL=Type.js.map
@@ -28,3 +28,4 @@ export { SliderName } from "./SliderName.js";
28
28
  export { ToggleName } from "./ToggleName.js";
29
29
  export { BagBinding } from "./BagBinding.js";
30
30
  export { Binding } from "./Binding.js";
31
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,3 @@
1
1
  import { Renderer } from "../enums/Renderer.js";
2
2
  import { Type } from "../enums/Type.js";
3
+ //# sourceMappingURL=components.js.map
@@ -1 +1,2 @@
1
1
  import { AnimType } from "../../enums/AnimType.js";
2
+ //# sourceMappingURL=Animation.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Button.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=CarouselLabel.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Collection.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Control.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=CustomRenderer.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Cycler.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=DataBinding.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=DropdownName.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=EditBox.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Factory.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Focus.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Grid.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=GridItem.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=GridPageIndicator.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Input.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Layout.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Screen.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=ScrollView.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=SelectionWheel.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Slider.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Sliderbox.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Sound.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Sprite.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=StackPanel.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=TTS.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Tab.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Text.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=Toggle.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=TooltipTrigger.js.map
@@ -28,3 +28,4 @@ export * from "./Text.js";
28
28
  export * from "./Toggle.js";
29
29
  export * from "./TooltipTrigger.js";
30
30
  export * from "./TTS.js";
31
+ //# sourceMappingURL=index.js.map
@@ -3,3 +3,4 @@ export * as ComponentProperties from "./components.js";
3
3
  export * as Value from "./value.js";
4
4
  export { ArrayName } from "../enums/ArrayName.js";
5
5
  export { Operation } from "../enums/Operation.js";
6
+ //# sourceMappingURL=index.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=value.js.map
@@ -1 +1,2 @@
1
1
  export * from "./intellisense.js";
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=intellisense.js.map
@@ -208,3 +208,4 @@ export const paths = {
208
208
  xbl_immediate_signin: "ui/xbl_immediate_signin.json",
209
209
  win10_trial_conversion: "ui/win10_trial_conversion_screen.json",
210
210
  };
211
+ //# sourceMappingURL=paths.js.map
@@ -5,4 +5,5 @@ export declare const isBuildMode: {};
5
5
  export declare const isLinkMode: {};
6
6
  export declare const unLinked: {};
7
7
  export declare const buildFolder: string;
8
+ export declare const uiBuildFolder: string;
8
9
  export declare const bindingFuntions: Record<string, (...args: string[]) => RetBindingValue> | undefined;
@@ -7,6 +7,7 @@ export declare class Parser {
7
7
  genBindings: GenBinding[];
8
8
  output: Expression;
9
9
  tokens: Token[];
10
+ static hasError: boolean;
10
11
  constructor(input: string, cache?: Map<string, unknown>, tokens?: Token[]);
11
12
  static intToBin(input: string): {
12
13
  ret: `#${string}`;
@@ -15,8 +15,8 @@ export declare class AnimationKeyframe<T extends AnimType> extends Class {
15
15
  clearNext(): this;
16
16
  protected toJsonUI(): KeyframeAnimationProperties<AnimType>;
17
17
  protected toJSON(): (Partial<import("../types/properties/element/Animation.js").DurationAnimation> & import("../types/properties/element/Animation.js").KeyframeAnimationPropertiesItem) | (Partial<import("../types/properties/element/Animation.js").AsepriteFlipBookAnimation> & import("../types/properties/element/Animation.js").KeyframeAnimationPropertiesItem) | {
18
- from?: import("../types/properties/value.js").Value<number> | undefined;
19
- to?: import("../types/properties/value.js").Value<number> | undefined;
18
+ from?: import("../types/properties/value.js").Array2<string | number> | undefined;
19
+ to?: import("../types/properties/value.js").Array2<string | number> | undefined;
20
20
  duration?: import("../types/properties/value.js").Value<number> | undefined;
21
21
  easing?: import("../types/properties/value.js").Value<string | import("../index.js").Easing> | undefined;
22
22
  next?: import("../types/properties/value.js").Value<string | AnimationKeyframe<AnimType> | Animation<AnimType>>;
@@ -33,8 +33,8 @@ export declare class AnimationKeyframe<T extends AnimType> extends Class {
33
33
  wait_until_rendered_to_play?: import("../types/properties/value.js").Value<boolean>;
34
34
  anim_type: T;
35
35
  } | {
36
- from?: import("../types/properties/value.js").Array2<string | number> | undefined;
37
- to?: import("../types/properties/value.js").Array2<string | number> | undefined;
36
+ from?: import("../types/properties/value.js").Value<number> | undefined;
37
+ to?: import("../types/properties/value.js").Value<number> | undefined;
38
38
  duration?: import("../types/properties/value.js").Value<number> | undefined;
39
39
  easing?: import("../types/properties/value.js").Value<string | import("../index.js").Easing> | undefined;
40
40
  next?: import("../types/properties/value.js").Value<string | AnimationKeyframe<AnimType> | Animation<AnimType>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asajs",
3
- "version": "4.1.2-indev",
3
+ "version": "4.1.3",
4
4
  "description": "Create your Minecraft JSON-UI resource packs using JavaScript",
5
5
  "keywords": [
6
6
  "Minecraft",
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,29 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { uiFiles } from "./utils.js";
4
- export function rebaseUIFiles(pack_folder) {
5
- const ui = uiFiles(pack_folder);
6
- const targetDir = path.join("custom", pack_folder);
7
- if (!fs.existsSync(targetDir))
8
- return;
9
- const processDirectory = (currentDir) => {
10
- const entries = fs.readdirSync(currentDir, { withFileTypes: true });
11
- for (const entry of entries) {
12
- const fullPath = path.join(currentDir, entry.name);
13
- if (entry.isDirectory()) {
14
- processDirectory(fullPath);
15
- if (fs.readdirSync(fullPath).length === 0) {
16
- fs.rmdirSync(fullPath);
17
- }
18
- }
19
- else if (entry.isFile()) {
20
- const relativePath = fullPath.replace(targetDir + path.sep, "");
21
- const normalizedPath = relativePath.split(path.sep).join("/");
22
- if (!ui.has(normalizedPath)) {
23
- fs.rmSync(fullPath, { force: true });
24
- }
25
- }
26
- }
27
- };
28
- processDirectory(targetDir);
29
- }
@@ -1,29 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { uiFiles } from "./utils.js";
4
- export function removeNotUIFiles(pack_folder) {
5
- const ui = uiFiles(pack_folder);
6
- const targetDir = path.join("custom", pack_folder);
7
- if (!fs.existsSync(targetDir))
8
- return;
9
- const processDirectory = (currentDir) => {
10
- const entries = fs.readdirSync(currentDir, { withFileTypes: true });
11
- for (const entry of entries) {
12
- const fullPath = path.join(currentDir, entry.name);
13
- if (entry.isDirectory()) {
14
- processDirectory(fullPath);
15
- if (fs.readdirSync(fullPath).length === 0) {
16
- fs.rmdirSync(fullPath);
17
- }
18
- }
19
- else if (entry.isFile()) {
20
- const relativePath = fullPath.replace(targetDir + path.sep, "");
21
- const normalizedPath = relativePath.split(path.sep).join("/");
22
- if (!ui.has(normalizedPath)) {
23
- fs.rmSync(fullPath, { force: true });
24
- }
25
- }
26
- }
27
- };
28
- processDirectory(targetDir);
29
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare function rebaseUIFiles(pack_folder: string): void;
@@ -1 +0,0 @@
1
- export declare function removeNotUIFiles(pack_folder: string): void;