asajs 4.0.15-indev → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ export function RandomBindingString(length, base = 32) {
2
+ const chars = "0123456789abcdefghijklmnopqrstuvwxyz".slice(0, base)
3
+ const out = new Array()
4
+
5
+ try {
6
+ const buffer = new Uint8Array(length)
7
+ crypto.getRandomValues(buffer)
8
+ for (let i = 0; i < length; i++) {
9
+ out[i] = chars[buffer[i] % base]
10
+ }
11
+ } catch {
12
+ for (let i = 0; i < length; i++) {
13
+ out[i] = chars[Math.floor(Math.random() * base)]
14
+ }
15
+ }
16
+
17
+ return `#${out.join("")}`
18
+ }
19
+
20
+ /**
21
+ * Configuration object for the AsaJS build process.
22
+ * @type {import('./config.d.ts').Config}
23
+ */
24
+ export const config = {
25
+ packinfo: {
26
+ name: "AsaJS",
27
+ description: "Create your Minecraft JSON-UI resource packs using JavaScript.",
28
+ version: [1, 0, 0],
29
+ },
30
+ compiler: {
31
+ enabled: true,
32
+ autoImport: true,
33
+ autoEnable: true,
34
+ importToPreview: false,
35
+ },
36
+ binding_functions: {
37
+ custom_abs: function (number) {
38
+ const randomAbs = RandomBindingString(16)
39
+
40
+ return {
41
+ generate_bindings: [
42
+ {
43
+ source_property_name: `[ abs(${number}) ]`,
44
+ target_property_name: randomAbs,
45
+ },
46
+ ],
47
+ return_value: randomAbs,
48
+ }
49
+ },
50
+ },
51
+ }
package/config.d.ts CHANGED
@@ -14,10 +14,12 @@ export interface Config {
14
14
  gdkUserId?: string
15
15
  fixInventoryItemRenderer?: boolean
16
16
  buildFolder?: string
17
+ fileExtension?: string
17
18
  }
18
19
 
19
20
  ui_analyzer?: {
20
21
  enabled?: boolean
22
+ generate_path?: string
21
23
  imports?: string[]
22
24
  }
23
25
 
@@ -0,0 +1,82 @@
1
+ import path from "node:path";
2
+ import fs from "fs";
3
+ import { config } from "../compilers/Configuration.js";
4
+ import { Type } from "../types/enums/Type.js";
5
+ const importType = 'import { Type, MemoryModify, ModifyUI } from "asajs"';
6
+ function toCamelCase(str) {
7
+ return str.replace(/[-_]\w/g, m => m[1].toUpperCase());
8
+ }
9
+ export function genCustomCode(pack_folder) {
10
+ const database = JSON.parse(fs.readFileSync(path.join("database", `${pack_folder}-defs.json`), "utf-8"));
11
+ const Elements = [];
12
+ const json = {};
13
+ const UI = [
14
+ "type UI = {",
15
+ ...Object.entries(database).map(args => {
16
+ const [key, element] = args;
17
+ const typeName = `${key[0].toUpperCase()}${toCamelCase(key).slice(1)}`;
18
+ const filepaths = {};
19
+ Elements.push([
20
+ `type ${typeName} = {`,
21
+ ...Object.entries(element).map(([elementPath, elementData]) => {
22
+ filepaths[elementPath] = elementData.file;
23
+ const type = elementData.type.toUpperCase();
24
+ // @ts-ignore
25
+ return ` "${elementPath}": {\n type: Type.${Type[type] ? type : "PANEL"},\n children: ${elementData.children ? elementData.children.map(c => `"${c}"`).join(" | ") : "string"}\n },`;
26
+ }),
27
+ "}",
28
+ ].join("\n"));
29
+ json[key] = {
30
+ ...(json[key] || {}),
31
+ ...filepaths,
32
+ };
33
+ return ` "${key}": ${typeName},`;
34
+ }),
35
+ "}",
36
+ ].join("\n");
37
+ const paths = `const paths = ${JSON.stringify(json, null, 4)}`;
38
+ if (config.ui_analyzer?.generate_path) {
39
+ if (!fs.existsSync(config.ui_analyzer?.generate_path)) {
40
+ fs.mkdirSync(config.ui_analyzer?.generate_path, { recursive: true });
41
+ }
42
+ }
43
+ fs.writeFileSync(path.join(config.ui_analyzer?.generate_path || "database", `${pack_folder}.ts`), [
44
+ importType,
45
+ `type Namespace = keyof UI
46
+ type Element<T extends Namespace> = Extract<keyof UI[T], string>
47
+ type ElementInfos<T extends Namespace, K extends Element<T>> = UI[T][K]
48
+ // @ts-ignore
49
+ type GetType<T extends Namespace, K extends Element<T>> = ElementInfos<T, K>["type"]
50
+ // @ts-ignore
51
+ type GetChilds<T extends Namespace, K extends Element<T>> = ElementInfos<T, K>["children"]
52
+
53
+ export default function Modify<T extends Namespace, K extends Element<T>>(namespace: T, name: K) {
54
+ // @ts-ignore
55
+ const getPath = paths[namespace][name]
56
+ // @ts-ignore
57
+ const memoryUI = MemoryModify[getPath]?.[name]
58
+ // @ts-ignore
59
+ if (memoryUI) return memoryUI as ModifyUI<GetType<T, K>, GetChilds<T, K>>
60
+ const path = paths[namespace]
61
+ if (!path) {
62
+ throw new Error(\`Namespace '\${namespace}' does not exist\`)
63
+ // @ts-ignore
64
+ } else if (typeof path !== "string" && !getPath) {
65
+ throw new Error(\`Element '\${name}' does not exist in namespace '\${namespace}'\`)
66
+ }
67
+ // @ts-ignore
68
+ const modifyUI = new ModifyUI<GetType<T, K>, GetChilds<T, K>>(
69
+ namespace,
70
+ name,
71
+ // @ts-ignore
72
+ typeof path === "string" ? path : getPath,
73
+ )
74
+ // @ts-ignore
75
+ ;(MemoryModify[getPath] ||= {})[name] = modifyUI
76
+ return modifyUI
77
+ }`,
78
+ paths,
79
+ UI,
80
+ ...Elements,
81
+ ].join("\n\n"), "utf-8");
82
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,117 @@
1
1
  import path from "path";
2
2
  import { uiFiles } from "./utils.js";
3
3
  import fs from "fs";
4
+ import { paths } from "../types/vanilla/paths.js";
5
+ import { vanilladefs } from "./vanilladefs.js";
6
+ const map = new Map();
7
+ Object.entries(paths).forEach(([namespace, path]) => {
8
+ map.set(path, namespace);
9
+ });
4
10
  export function generateUIDefs(pack_folder) {
11
+ const uiMap = new Map();
5
12
  uiFiles(pack_folder).forEach(file => {
6
13
  try {
7
14
  const fileContent = JSON.parse(fs.readFileSync(path.join("custom", pack_folder, file), "utf-8"));
8
- delete fileContent[""];
15
+ if (fileContent["file_signature"])
16
+ delete fileContent["file_signature"];
17
+ let n = fileContent["namespace"];
18
+ if (n)
19
+ delete fileContent["namespace"];
20
+ else
21
+ n = map.get(file);
22
+ const namespace = n;
23
+ const elementMap = new Map();
24
+ function scanElement(elements, prefix = "") {
25
+ const childElement = [];
26
+ elements.forEach(([element, properties]) => {
27
+ if (properties.anim_type)
28
+ return;
29
+ const [name, extend] = element.split("@");
30
+ if (name.startsWith("$"))
31
+ return;
32
+ childElement.push(name);
33
+ const elementPath = `${prefix}${name}`;
34
+ let extendsName;
35
+ let extendsNamespace;
36
+ if (extend) {
37
+ const [extnamespace, name] = extend.split(".");
38
+ if (name) {
39
+ extendsName = name;
40
+ extendsNamespace = extnamespace;
41
+ }
42
+ else {
43
+ extendsName = extnamespace;
44
+ extendsNamespace = namespace;
45
+ }
46
+ }
47
+ const controls = properties.controls;
48
+ const out = {
49
+ file,
50
+ };
51
+ if (controls && Array.isArray(controls)) {
52
+ const children = scanElement(controls.map((c) => Object.entries(c)[0]), `${prefix}${name}/`);
53
+ if (children.length)
54
+ out.children = children;
55
+ }
56
+ if (properties.type)
57
+ out.type = properties.type;
58
+ if (extendsName && extendsNamespace)
59
+ out.extends = { name: extendsName, namespace: extendsNamespace };
60
+ elementMap.set(elementPath, out);
61
+ });
62
+ return childElement;
63
+ }
64
+ scanElement(Object.entries(fileContent));
65
+ uiMap.set(namespace, elementMap);
9
66
  }
10
67
  catch (error) { }
11
68
  });
69
+ function scanElementType(name, namespace) {
70
+ const element = uiMap.get(namespace)?.get(name);
71
+ if (element) {
72
+ if (element.type)
73
+ return element.type;
74
+ else {
75
+ const extend = element.extends;
76
+ if (extend)
77
+ return scanElementType(extend.name, extend.namespace);
78
+ }
79
+ }
80
+ return vanilladefs[namespace]?.[name]?.type;
81
+ }
82
+ uiMap.entries().forEach(([namespace, elementsMap]) => {
83
+ elementsMap.entries().forEach(([name, { file, type, extends: extend }]) => {
84
+ if (type)
85
+ return;
86
+ else {
87
+ if (extend) {
88
+ const type = scanElementType(extend.name, extend.namespace);
89
+ if (type) {
90
+ elementsMap.set(name, {
91
+ ...elementsMap.get(name),
92
+ type,
93
+ });
94
+ }
95
+ else
96
+ elementsMap.delete(name);
97
+ }
98
+ else {
99
+ const elementDefs = vanilladefs[namespace]?.[name];
100
+ if (elementDefs) {
101
+ elementsMap.set(name, {
102
+ ...elementsMap.get(name),
103
+ type: elementDefs.type,
104
+ });
105
+ }
106
+ else
107
+ elementsMap.delete(name);
108
+ }
109
+ }
110
+ });
111
+ if (!elementsMap.size)
112
+ uiMap.delete(namespace);
113
+ });
114
+ if (!fs.existsSync("database"))
115
+ fs.mkdirSync("database");
116
+ fs.writeFileSync(path.join("database", `${pack_folder}-defs.json`), JSON.stringify(uiMap, null, 4), "utf-8");
12
117
  }
@@ -5,6 +5,8 @@ import { uiFiles } from "./utils.js";
5
5
  export function rebaseUIFiles(pack_folder) {
6
6
  const ui = uiFiles(pack_folder);
7
7
  const targetDir = path.join("custom", pack_folder);
8
+ ui.add("ui/_ui_defs.json");
9
+ ui.add("ui/_global_variables.json");
8
10
  if (!fs.existsSync(targetDir))
9
11
  return;
10
12
  const processDirectory = (currentDir) => {
@@ -20,10 +22,7 @@ export function rebaseUIFiles(pack_folder) {
20
22
  else if (entry.isFile()) {
21
23
  const relativePath = fullPath.replace(targetDir + path.sep, "");
22
24
  const normalizedPath = relativePath.split(path.sep).join("/");
23
- if (!ui.has(normalizedPath)) {
24
- fs.rmSync(fullPath, { force: true });
25
- }
26
- else {
25
+ if (ui.has(normalizedPath)) {
27
26
  try {
28
27
  const fileContent = fs.readFileSync(fullPath, "utf-8");
29
28
  const parsedData = parse(fileContent);
@@ -32,7 +31,7 @@ export function rebaseUIFiles(pack_folder) {
32
31
  }
33
32
  }
34
33
  catch (error) {
35
- console.error(`Lỗi parse file: ${fullPath}`, error);
34
+ console.error(`Parser error: ${fullPath}`, error);
36
35
  }
37
36
  }
38
37
  }
@@ -12,7 +12,7 @@ export function uiFiles(pack_folder) {
12
12
  if (vanillaUIDefsMap.has(pack_folder))
13
13
  return vanillaUIDefsMap.get(pack_folder);
14
14
  const ui_defs = readUIDefs(pack_folder);
15
- const set = new Set(ui_defs.concat(...vanilla_ui_defs, "ui/_ui_defs.json", "ui/_global_variables.json"));
15
+ const set = new Set(ui_defs.concat(...vanilla_ui_defs));
16
16
  vanillaUIDefsMap.set(pack_folder, set);
17
17
  return set;
18
18
  }
@@ -2,6 +2,9 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import jsonc from "jsonc-parser";
4
4
  import { createRequire } from "module";
5
+ import { rebaseUIFiles } from "../analyzer/rebaseUIFiles.js";
6
+ import { generateUIDefs } from "../analyzer/generate-ui-defs.js";
7
+ import { genCustomCode } from "../analyzer/generate-code.js";
5
8
  const options = {};
6
9
  for (const arg of process.argv) {
7
10
  if (arg.startsWith("--"))
@@ -52,5 +55,20 @@ export const unLinked = options["unlink"] ?? !(config.compiler?.autoImport ?? tr
52
55
  export const buildFolder = config.compiler?.buildFolder || "build";
53
56
  export const bindingFuntions = config.binding_functions;
54
57
  if (!fs.existsSync(".gitignore")) {
55
- fs.writeFileSync(".gitignore", `node_modules`, "utf-8");
58
+ fs.writeFileSync(".gitignore", "node_modules\ncustom", "utf-8");
59
+ }
60
+ if (config.ui_analyzer?.enabled) {
61
+ config.ui_analyzer.imports?.forEach(v => {
62
+ if (!fs.existsSync(path.join(config.ui_analyzer?.generate_path || "database", `${v}.ts`))) {
63
+ if (!fs.existsSync(path.join("database", `${v}-defs.json`))) {
64
+ if (fs.existsSync(path.join("custom", v, "ui/_ui_defs.json"))) {
65
+ rebaseUIFiles(v);
66
+ generateUIDefs(v);
67
+ }
68
+ else
69
+ throw new Error(`${v} ui_defs.json not found`);
70
+ }
71
+ genCustomCode(v);
72
+ }
73
+ });
56
74
  }
@@ -6,6 +6,7 @@ import { Class } from "./Class.js";
6
6
  import { RandomString, ResolveBinding } from "./Utils.js";
7
7
  import { RandomNamespace } from "../compilers/Random.js";
8
8
  import util from "node:util";
9
+ import { config } from "../compilers/Configuration.js";
9
10
  export class UI extends Class {
10
11
  type;
11
12
  path;
@@ -28,14 +29,10 @@ export class UI extends Class {
28
29
  console.error("The 'namespace' cannot be used as a name");
29
30
  process.exit(1);
30
31
  }
31
- if (namespace && !/^\w+$/.test(namespace)) {
32
- console.error(`The '${namespace}' cannot be used as a namespace`);
33
- process.exit(1);
34
- }
35
32
  this.name = name?.match(/^(\w|\/)+/)?.[0] || RandomString(16);
36
33
  this.namespace = namespace || RandomNamespace();
37
34
  if (!path)
38
- this.path = `asajs/${this.namespace}.json`;
35
+ this.path = `asajs/${this.namespace}${config.compiler?.fileExtension ? (config.compiler.fileExtension.startsWith(".") ? config.compiler.fileExtension : `.${config.compiler.fileExtension}`) : ".json"}`;
39
36
  else
40
37
  this.path = path;
41
38
  this.extendable = this.name.search("/") === -1;
@@ -102,10 +102,16 @@ export function ResolveBinding(cache, ...bindings) {
102
102
  binding.source_property_name = out;
103
103
  }
104
104
  }
105
- binding.binding_type = BindingType.VIEW;
105
+ binding.binding_type ||= BindingType.VIEW;
106
106
  if (!binding.target_property_name)
107
107
  throw new Error("Binding must have a target property name");
108
108
  }
109
+ else if (binding.binding_collection_name) {
110
+ if (Object.keys(binding).length > 1)
111
+ binding.binding_type ||= BindingType.COLLECTION;
112
+ else
113
+ binding.binding_type ||= BindingType.COLLECTION_DETAILS;
114
+ }
109
115
  result.push(binding);
110
116
  }
111
117
  return result;
@@ -159,7 +165,9 @@ export function b(input) {
159
165
  // Quick Elements
160
166
  export function Modify(namespace, name) {
161
167
  // @ts-ignore
162
- const memoryUI = MemoryModify[paths[namespace][name]]?.[name];
168
+ const getPath = paths[namespace] || paths[namespace][name];
169
+ // @ts-ignore
170
+ const memoryUI = MemoryModify[getPath]?.[name];
163
171
  // @ts-ignore
164
172
  if (memoryUI)
165
173
  return memoryUI;
@@ -168,14 +176,14 @@ export function Modify(namespace, name) {
168
176
  throw new Error(`Namespace '${namespace}' does not exist`);
169
177
  // @ts-ignore
170
178
  }
171
- else if (typeof path !== "string" && !paths[namespace][name]) {
179
+ else if (typeof path !== "string" && !getPath) {
172
180
  throw new Error(`Element '${name}' does not exist in namespace '${namespace}'`);
173
181
  }
174
182
  // @ts-ignore
175
183
  const modifyUI = new ModifyUI(namespace, name,
176
184
  // @ts-ignore
177
- typeof path === "string" ? path : paths[namespace][name]);
178
- (MemoryModify[paths[namespace][name]] ||= {})[name] = modifyUI;
185
+ typeof path === "string" ? path : getPath);
186
+ (MemoryModify[getPath] ||= {})[name] = modifyUI;
179
187
  return modifyUI;
180
188
  }
181
189
  export function Panel(properties, namespace, name) {
package/dist/js/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./compilers/Configuration.js";
2
1
  import "./compilers/PreCompile.js";
2
+ import "./compilers/Configuration.js";
3
3
  import "./compilers/ui/builder.js";
4
4
  import "./compilers/ui/installer.js";
5
5
  export { Animation } from "./components/Animation.js";
@@ -12,4 +12,4 @@ export { ItemAuxID } from "./types/enums/Items.js";
12
12
  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
- export * from "./analyzer/generate-ui-defs.js";
15
+ export { MemoryModify } from "./compilers/Memory.js";
@@ -1,210 +1,210 @@
1
1
  export const paths = {
2
- "achievement": "ui/achievement_screen.json",
3
- "add_external_server": "ui/add_external_server_screen.json",
4
- "adhoc_inprogress": "ui/adhoc_inprogess_screen.json",
5
- "adhoc": "ui/adhoc_screen.json",
6
- "anvil": "ui/anvil_screen.json",
7
- "anvil_pocket": "ui/anvil_screen_pocket.json",
8
- "authentication_modals": "ui/authentication_modals.json",
9
- "authentication": "ui/authentication_screen.json",
10
- "auto_save_info": "ui/auto_save_info_screen.json",
11
- "beacon": "ui/beacon_screen.json",
12
- "beacon_pocket": "ui/beacon_screen_pocket.json",
13
- "blast_furnace": "ui/blast_furnace_screen.json",
14
- "book": "ui/book_screen.json",
15
- "brewing_stand": "ui/brewing_stand_screen.json",
16
- "brewing_stand_pocket": "ui/brewing_stand_screen_pocket.json",
17
- "bundle_purchase_warning": "ui/bundle_purchase_warning_screen.json",
18
- "cartography": "ui/cartography_screen.json",
19
- "cartography_pocket": "ui/cartography_screen_pocket.json",
20
- "chalkboard": "ui/chalkboard_screen.json",
21
- "chat": "ui/chat_screen.json",
22
- "chat_settings": "ui/chat_settings_menu_screen.json",
23
- "chest": "ui/chest_screen.json",
24
- "choose_realm": "ui/choose_realm_screen.json",
25
- "coin_purchase": "ui/coin_purchase_screen.json",
26
- "command_block": "ui/command_block_screen.json",
27
- "confirm_delete_account": "ui/confirm_delete_account_screen.json",
28
- "content_log": "ui/content_log.json",
29
- "content_log_history": "ui/content_log_history_screen.json",
30
- "crafter_pocket": "ui/crafter_screen_pocket.json",
31
- "create_world_upsell": "ui/create_world_upsell_screen.json",
32
- "credits": "ui/credits_screen.json",
33
- "csb_purchase_error": "ui/csb_purchase_error_screen.json",
34
- "csb": "ui/csb_screen.json",
35
- "csb_content": "ui/csb_sections/content_section.json",
36
- "csb_banner": "ui/csb_sections/csb_banner.json",
37
- "csb_buy": "ui/csb_sections/csb_buy_now_screen.json",
38
- "common_csb": "ui/csb_sections/csb_common.json",
39
- "csb_purchase_amazondevicewarning": "ui/csb_sections/csb_purchase_amazondevicewarning_screen.json",
40
- "csb_purchase_warning": "ui/csb_sections/csb_purchase_warning_screen.json",
41
- "csb_subscription_panel": "ui/csb_sections/csb_subscription_panel.json",
42
- "csb_upsell": "ui/csb_sections/csb_upsell_dialog.json",
43
- "csb_packs": "ui/csb_sections/csb_view_packs_screen.json",
44
- "csb_welcome": "ui/csb_sections/csb_welcome_screen.json",
45
- "csb_faq": "ui/csb_sections/faq_section.json",
46
- "csb_landing": "ui/csb_sections/landing_section.json",
47
- "custom_templates": "ui/custom_templates_screen.json",
48
- "world_conversion_complete": "ui/world_conversion_complete_screen.json",
49
- "day_one_experience_intro": "ui/day_one_experience_intro_screen.json",
50
- "day_one_experience": "ui/day_one_experience_screen.json",
51
- "death": "ui/death_screen.json",
52
- "debug_screen": "ui/debug_screen.json",
53
- "dev_console": "ui/dev_console_screen.json",
54
- "disconnect": "ui/disconnect_screen.json",
55
- "display_logged_error": "ui/display_logged_error_screen.json",
56
- "discovery_dialog": "ui/edu_discovery_dialog.json",
57
- "edu_featured": "ui/edu_featured.json",
58
- "edu_quit_button": "ui/edu_pause_screen_pause_button.json",
59
- "persona_emote": "ui/emote_wheel_screen.json",
60
- "enchanting": "ui/enchanting_screen.json",
61
- "enchanting_pocket": "ui/enchanting_screen_pocket.json",
62
- "encyclopedia": "ui/encyclopedia_screen.json",
63
- "expanded_skin_pack": "ui/expanded_skin_pack_screen.json",
64
- "feed_common": "ui/feed_common.json",
65
- "file_upload": "ui/file_upload_screen.json",
66
- "furnace": "ui/furnace_screen.json",
67
- "furnace_pocket": "ui/furnace_screen_pocket.json",
68
- "game_tip": "ui/game_tip_screen.json",
69
- "gamepad_disconnected": "ui/gamepad_disconnected.json",
70
- "gameplay": "ui/gameplay_common.json",
71
- "gathering_info": "ui/gathering_info_screen.json",
72
- "globalpause": "ui/global_pause_screen.json",
73
- "grindstone": "ui/grindstone_screen.json",
74
- "grindstone_pocket": "ui/grindstone_screen_pocket.json",
75
- "gamma_calibration": "ui/gamma_calibration_screen.json",
76
- "horse": "ui/horse_screen.json",
77
- "horse_pocket": "ui/horse_screen_pocket.json",
78
- "how_to_play_common": "ui/how_to_play_common.json",
79
- "how_to_play": "ui/how_to_play_screen.json",
80
- "hud": "ui/hud_screen.json",
81
- "host_options": "ui/host_options_screen.json",
82
- "bed": "ui/in_bed_screen.json",
83
- "im_reader": "ui/immersive_reader.json",
84
- "crafting": "ui/inventory_screen.json",
85
- "crafting_pocket": "ui/inventory_screen_pocket.json",
86
- "invite": "ui/invite_screen.json",
87
- "jigsaw_editor": "ui/jigsaw_editor_screen.json",
88
- "late_join": "ui/late_join_pregame_screen.json",
89
- "library_modal": "ui/library_modal_screen.json",
90
- "local_world_picker": "ui/local_world_picker_screen.json",
91
- "loom": "ui/loom_screen.json",
92
- "loom_pocket": "ui/loom_screen_pocket.json",
93
- "manage_feed": "ui/manage_feed_screen.json",
94
- "manifest_validation": "ui/manifest_validation_screen.json",
95
- "sdl_label": "ui/marketplace_sdl/sdl_label.json",
96
- "sdl_dropdowns": "ui/marketplace_sdl/sdl_dropdowns.json",
97
- "sdl_image_row": "ui/marketplace_sdl/sdl_image_row.json",
98
- "sdl_text_row": "ui/marketplace_sdl/sdl_text_row.json",
99
- "mob_effect": "ui/mob_effect_screen.json",
100
- "non_xbl_user_management": "ui/non_xbl_user_management_screen.json",
101
- "npc_interact": "ui/npc_interact_screen.json",
102
- "online_safety": "ui/online_safety_screen.json",
103
- "pack_settings": "ui/pack_settings_screen.json",
104
- "panorama": "ui/panorama_screen.json",
105
- "patch_notes": "ui/patch_notes_screen.json",
106
- "pause": "ui/pause_screen.json",
107
- "pdp": "ui/pdp_screen.json",
108
- "pdp_screenshots": "ui/pdp_screenshots_section.json",
109
- "permissions": "ui/permissions_screen.json",
110
- "persona_cast_character_screen": "ui/persona_cast_character_screen.json",
111
- "persona_common": "ui/persona_common.json",
112
- "persona_popups": "ui/persona_popups.json",
113
- "play": "ui/play_screen.json",
114
- "perf_turtle": "ui/perf_turtle.json",
115
- "pocket_containers": "ui/pocket_containers.json",
116
- "popup_dialog": "ui/popup_dialog.json",
117
- "portfolio": "ui/portfolio_screen.json",
118
- "progress": "ui/progress_screen.json",
119
- "rating_prompt": "ui/rating_prompt.json",
120
- "realms_common": "ui/realms_common.json",
121
- "realms_create": "ui/realms_create.json",
122
- "realms_pending_invitations": "ui/realms_pending_invitations.json",
123
- "realms_slots": "ui/realms_slots_screen.json",
124
- "realms_settings": "ui/realms_settings_screen.json",
125
- "realms_allowlist": "ui/realms_allowlist.json",
126
- "realms_invite_link_settings": "ui/realms_invite_link_settings_screen.json",
127
- "realms_plus_ended": "ui/realms_plus_ended_screen.json",
128
- "realmsPlus": "ui/realmsPlus_screen.json",
129
- "realmsPlus_content": "ui/realmsPlus_sections/content_section.json",
130
- "realmsPlus_faq": "ui/realmsPlus_sections/faq_section.json",
131
- "realmsPlus_landing": "ui/realmsPlus_sections/landing_section.json",
132
- "realmsPlus_buy": "ui/realmsPlus_sections/realmsPlus_buy_now_screen.json",
133
- "realmsPlus_packs": "ui/realmsPlus_sections/realmsPlus_view_packs_screen.json",
134
- "realmsPlus_purchase_warning": "ui/realmsPlus_sections/realmsPlus_purchase_warning_screen.json",
135
- "realms_stories_transition": "ui/realms_stories_transition_screen.json",
136
- "redstone": "ui/redstone_screen.json",
137
- "resource_packs": "ui/resource_packs_screen.json",
138
- "safe_zone": "ui/safe_zone_screen.json",
139
- "storage_migration_common": "ui/storage_migration_common.json",
140
- "storage_migration_generic": "ui/storage_migration_generic_screen.json",
141
- "scoreboard": "ui/scoreboards.json",
142
- "screenshot": "ui/screenshot_screen.json",
143
- "select_world": "ui/select_world_screen.json",
144
- "server_form": "ui/server_form.json",
145
- "settings": "ui/settings_screen.json",
146
- "controls_section": "ui/settings_sections/controls_section.json",
147
- "general_section": "ui/settings_sections/general_section.json",
148
- "realms_world_section": "ui/settings_sections/realms_world_section.json",
149
- "settings_common": "ui/settings_sections/settings_common.json",
150
- "world_section": "ui/settings_sections/world_section.json",
151
- "social_section": "ui/settings_sections/social_section.json",
152
- "sidebar_navigation": "ui/sidebar_navigation.json",
153
- "sign": "ui/sign_screen.json",
154
- "simple_inprogress": "ui/simple_inprogress_screen.json",
155
- "skin_pack_purchase": "ui/skin_pack_purchase_screen.json",
156
- "skin_picker": "ui/skin_picker_screen.json",
157
- "smithing_table": "ui/smithing_table_screen.json",
158
- "smithing_table_2": "ui/smithing_table_2_screen.json",
159
- "smithing_table_pocket": "ui/smithing_table_screen_pocket.json",
160
- "smithing_table_2_pocket": "ui/smithing_table_2_screen_pocket.json",
161
- "smoker": "ui/smoker_screen.json",
162
- "start": "ui/start_screen.json",
163
- "stonecutter": "ui/stonecutter_screen.json",
164
- "stonecutter_pocket": "ui/stonecutter_screen_pocket.json",
165
- "storage_management": "ui/storage_management.json",
166
- "storage_management_popup": "ui/storage_management_popup.json",
167
- "common_store": "ui/store_common.json",
168
- "store_layout": "ui/store_data_driven_screen.json",
169
- "filter_menu": "ui/store_filter_menu_screen.json",
170
- "store_inventory": "ui/store_inventory_screen.json",
171
- "store_item_list": "ui/store_item_list_screen.json",
172
- "store_progress": "ui/store_progress_screen.json",
173
- "promo_timeline": "ui/store_promo_timeline_screen.json",
174
- "store_sale_item_list": "ui/store_sales_item_list_screen.json",
175
- "store_search": "ui/store_search_screen.json",
176
- "sort_menu": "ui/store_sort_menu_screen.json",
177
- "structure_editor": "ui/structure_editor_screen.json",
178
- "submit_feedback": "ui/submit_feedback_screen.json",
179
- "tabbed_upsell": "ui/tabbed_upsell_screen.json",
180
- "thanks_for_testing": "ui/thanks_for_testing_screen.json",
181
- "third_party_store": "ui/third_party_store_screen.json",
182
- "toast_screen": "ui/toast_screen.json",
183
- "token_faq": "ui/token_faq_screen.json",
184
- "trade": "ui/trade_screen.json",
185
- "trade_pocket": "ui/trade_screen_pocket.json",
186
- "trade2": "ui/trade_2_screen.json",
187
- "trade2_pocket": "ui/trade_2_screen_pocket.json",
188
- "trialUpsell": "ui/trial_upsell_screen.json",
189
- "ugc_viewer": "ui/ugc_viewer_screen.json",
190
- "common_art": "ui/ui_art_assets_common.json",
191
- "common": "ui/ui_common.json",
2
+ achievement: "ui/achievement_screen.json",
3
+ add_external_server: "ui/add_external_server_screen.json",
4
+ adhoc_inprogress: "ui/adhoc_inprogess_screen.json",
5
+ adhoc: "ui/adhoc_screen.json",
6
+ anvil: "ui/anvil_screen.json",
7
+ anvil_pocket: "ui/anvil_screen_pocket.json",
8
+ authentication_modals: "ui/authentication_modals.json",
9
+ authentication: "ui/authentication_screen.json",
10
+ auto_save_info: "ui/auto_save_info_screen.json",
11
+ beacon: "ui/beacon_screen.json",
12
+ beacon_pocket: "ui/beacon_screen_pocket.json",
13
+ blast_furnace: "ui/blast_furnace_screen.json",
14
+ book: "ui/book_screen.json",
15
+ brewing_stand: "ui/brewing_stand_screen.json",
16
+ brewing_stand_pocket: "ui/brewing_stand_screen_pocket.json",
17
+ bundle_purchase_warning: "ui/bundle_purchase_warning_screen.json",
18
+ cartography: "ui/cartography_screen.json",
19
+ cartography_pocket: "ui/cartography_screen_pocket.json",
20
+ chalkboard: "ui/chalkboard_screen.json",
21
+ chat: "ui/chat_screen.json",
22
+ chat_settings: "ui/chat_settings_menu_screen.json",
23
+ chest: "ui/chest_screen.json",
24
+ choose_realm: "ui/choose_realm_screen.json",
25
+ coin_purchase: "ui/coin_purchase_screen.json",
26
+ command_block: "ui/command_block_screen.json",
27
+ confirm_delete_account: "ui/confirm_delete_account_screen.json",
28
+ content_log: "ui/content_log.json",
29
+ content_log_history: "ui/content_log_history_screen.json",
30
+ crafter_pocket: "ui/crafter_screen_pocket.json",
31
+ create_world_upsell: "ui/create_world_upsell_screen.json",
32
+ credits: "ui/credits_screen.json",
33
+ csb_purchase_error: "ui/csb_purchase_error_screen.json",
34
+ csb: "ui/csb_screen.json",
35
+ csb_content: "ui/csb_sections/content_section.json",
36
+ csb_banner: "ui/csb_sections/csb_banner.json",
37
+ csb_buy: "ui/csb_sections/csb_buy_now_screen.json",
38
+ common_csb: "ui/csb_sections/csb_common.json",
39
+ csb_purchase_amazondevicewarning: "ui/csb_sections/csb_purchase_amazondevicewarning_screen.json",
40
+ csb_purchase_warning: "ui/csb_sections/csb_purchase_warning_screen.json",
41
+ csb_subscription_panel: "ui/csb_sections/csb_subscription_panel.json",
42
+ csb_upsell: "ui/csb_sections/csb_upsell_dialog.json",
43
+ csb_packs: "ui/csb_sections/csb_view_packs_screen.json",
44
+ csb_welcome: "ui/csb_sections/csb_welcome_screen.json",
45
+ csb_faq: "ui/csb_sections/faq_section.json",
46
+ csb_landing: "ui/csb_sections/landing_section.json",
47
+ custom_templates: "ui/custom_templates_screen.json",
48
+ world_conversion_complete: "ui/world_conversion_complete_screen.json",
49
+ day_one_experience_intro: "ui/day_one_experience_intro_screen.json",
50
+ day_one_experience: "ui/day_one_experience_screen.json",
51
+ death: "ui/death_screen.json",
52
+ debug_screen: "ui/debug_screen.json",
53
+ dev_console: "ui/dev_console_screen.json",
54
+ disconnect: "ui/disconnect_screen.json",
55
+ display_logged_error: "ui/display_logged_error_screen.json",
56
+ discovery_dialog: "ui/edu_discovery_dialog.json",
57
+ edu_featured: "ui/edu_featured.json",
58
+ edu_quit_button: "ui/edu_pause_screen_pause_button.json",
59
+ persona_emote: "ui/emote_wheel_screen.json",
60
+ enchanting: "ui/enchanting_screen.json",
61
+ enchanting_pocket: "ui/enchanting_screen_pocket.json",
62
+ encyclopedia: "ui/encyclopedia_screen.json",
63
+ expanded_skin_pack: "ui/expanded_skin_pack_screen.json",
64
+ feed_common: "ui/feed_common.json",
65
+ file_upload: "ui/file_upload_screen.json",
66
+ furnace: "ui/furnace_screen.json",
67
+ furnace_pocket: "ui/furnace_screen_pocket.json",
68
+ game_tip: "ui/game_tip_screen.json",
69
+ gamepad_disconnected: "ui/gamepad_disconnected.json",
70
+ gameplay: "ui/gameplay_common.json",
71
+ gathering_info: "ui/gathering_info_screen.json",
72
+ globalpause: "ui/global_pause_screen.json",
73
+ grindstone: "ui/grindstone_screen.json",
74
+ grindstone_pocket: "ui/grindstone_screen_pocket.json",
75
+ gamma_calibration: "ui/gamma_calibration_screen.json",
76
+ horse: "ui/horse_screen.json",
77
+ horse_pocket: "ui/horse_screen_pocket.json",
78
+ how_to_play_common: "ui/how_to_play_common.json",
79
+ how_to_play: "ui/how_to_play_screen.json",
80
+ hud: "ui/hud_screen.json",
81
+ host_options: "ui/host_options_screen.json",
82
+ bed: "ui/in_bed_screen.json",
83
+ im_reader: "ui/immersive_reader.json",
84
+ crafting: "ui/inventory_screen.json",
85
+ crafting_pocket: "ui/inventory_screen_pocket.json",
86
+ invite: "ui/invite_screen.json",
87
+ jigsaw_editor: "ui/jigsaw_editor_screen.json",
88
+ late_join: "ui/late_join_pregame_screen.json",
89
+ library_modal: "ui/library_modal_screen.json",
90
+ local_world_picker: "ui/local_world_picker_screen.json",
91
+ loom: "ui/loom_screen.json",
92
+ loom_pocket: "ui/loom_screen_pocket.json",
93
+ manage_feed: "ui/manage_feed_screen.json",
94
+ manifest_validation: "ui/manifest_validation_screen.json",
95
+ sdl_label: "ui/marketplace_sdl/sdl_label.json",
96
+ sdl_dropdowns: "ui/marketplace_sdl/sdl_dropdowns.json",
97
+ sdl_image_row: "ui/marketplace_sdl/sdl_image_row.json",
98
+ sdl_text_row: "ui/marketplace_sdl/sdl_text_row.json",
99
+ mob_effect: "ui/mob_effect_screen.json",
100
+ non_xbl_user_management: "ui/non_xbl_user_management_screen.json",
101
+ npc_interact: "ui/npc_interact_screen.json",
102
+ online_safety: "ui/online_safety_screen.json",
103
+ pack_settings: "ui/pack_settings_screen.json",
104
+ panorama: "ui/panorama_screen.json",
105
+ patch_notes: "ui/patch_notes_screen.json",
106
+ pause: "ui/pause_screen.json",
107
+ pdp: "ui/pdp_screen.json",
108
+ pdp_screenshots: "ui/pdp_screenshots_section.json",
109
+ permissions: "ui/permissions_screen.json",
110
+ persona_cast_character_screen: "ui/persona_cast_character_screen.json",
111
+ persona_common: "ui/persona_common.json",
112
+ persona_popups: "ui/persona_popups.json",
113
+ play: "ui/play_screen.json",
114
+ perf_turtle: "ui/perf_turtle.json",
115
+ pocket_containers: "ui/pocket_containers.json",
116
+ popup_dialog: "ui/popup_dialog.json",
117
+ portfolio: "ui/portfolio_screen.json",
118
+ progress: "ui/progress_screen.json",
119
+ rating_prompt: "ui/rating_prompt.json",
120
+ realms_common: "ui/realms_common.json",
121
+ realms_create: "ui/realms_create.json",
122
+ realms_pending_invitations: "ui/realms_pending_invitations.json",
123
+ realms_slots: "ui/realms_slots_screen.json",
124
+ realms_settings: "ui/realms_settings_screen.json",
125
+ realms_allowlist: "ui/realms_allowlist.json",
126
+ realms_invite_link_settings: "ui/realms_invite_link_settings_screen.json",
127
+ realms_plus_ended: "ui/realms_plus_ended_screen.json",
128
+ realmsPlus: "ui/realmsPlus_screen.json",
129
+ realmsPlus_content: "ui/realmsPlus_sections/content_section.json",
130
+ realmsPlus_faq: "ui/realmsPlus_sections/faq_section.json",
131
+ realmsPlus_landing: "ui/realmsPlus_sections/landing_section.json",
132
+ realmsPlus_buy: "ui/realmsPlus_sections/realmsPlus_buy_now_screen.json",
133
+ realmsPlus_packs: "ui/realmsPlus_sections/realmsPlus_view_packs_screen.json",
134
+ realmsPlus_purchase_warning: "ui/realmsPlus_sections/realmsPlus_purchase_warning_screen.json",
135
+ realms_stories_transition: "ui/realms_stories_transition_screen.json",
136
+ redstone: "ui/redstone_screen.json",
137
+ resource_packs: "ui/resource_packs_screen.json",
138
+ safe_zone: "ui/safe_zone_screen.json",
139
+ storage_migration_common: "ui/storage_migration_common.json",
140
+ storage_migration_generic: "ui/storage_migration_generic_screen.json",
141
+ scoreboard: "ui/scoreboards.json",
142
+ screenshot: "ui/screenshot_screen.json",
143
+ select_world: "ui/select_world_screen.json",
144
+ server_form: "ui/server_form.json",
145
+ settings: "ui/settings_screen.json",
146
+ controls_section: "ui/settings_sections/controls_section.json",
147
+ general_section: "ui/settings_sections/general_section.json",
148
+ realms_world_section: "ui/settings_sections/realms_world_section.json",
149
+ settings_common: "ui/settings_sections/settings_common.json",
150
+ world_section: "ui/settings_sections/world_section.json",
151
+ social_section: "ui/settings_sections/social_section.json",
152
+ sidebar_navigation: "ui/sidebar_navigation.json",
153
+ sign: "ui/sign_screen.json",
154
+ simple_inprogress: "ui/simple_inprogress_screen.json",
155
+ skin_pack_purchase: "ui/skin_pack_purchase_screen.json",
156
+ skin_picker: "ui/skin_picker_screen.json",
157
+ smithing_table: "ui/smithing_table_screen.json",
158
+ smithing_table_2: "ui/smithing_table_2_screen.json",
159
+ smithing_table_pocket: "ui/smithing_table_screen_pocket.json",
160
+ smithing_table_2_pocket: "ui/smithing_table_2_screen_pocket.json",
161
+ smoker: "ui/smoker_screen.json",
162
+ start: "ui/start_screen.json",
163
+ stonecutter: "ui/stonecutter_screen.json",
164
+ stonecutter_pocket: "ui/stonecutter_screen_pocket.json",
165
+ storage_management: "ui/storage_management.json",
166
+ storage_management_popup: "ui/storage_management_popup.json",
167
+ common_store: "ui/store_common.json",
168
+ store_layout: "ui/store_data_driven_screen.json",
169
+ filter_menu: "ui/store_filter_menu_screen.json",
170
+ store_inventory: "ui/store_inventory_screen.json",
171
+ store_item_list: "ui/store_item_list_screen.json",
172
+ store_progress: "ui/store_progress_screen.json",
173
+ promo_timeline: "ui/store_promo_timeline_screen.json",
174
+ store_sale_item_list: "ui/store_sales_item_list_screen.json",
175
+ store_search: "ui/store_search_screen.json",
176
+ sort_menu: "ui/store_sort_menu_screen.json",
177
+ structure_editor: "ui/structure_editor_screen.json",
178
+ submit_feedback: "ui/submit_feedback_screen.json",
179
+ tabbed_upsell: "ui/tabbed_upsell_screen.json",
180
+ thanks_for_testing: "ui/thanks_for_testing_screen.json",
181
+ third_party_store: "ui/third_party_store_screen.json",
182
+ toast_screen: "ui/toast_screen.json",
183
+ token_faq: "ui/token_faq_screen.json",
184
+ trade: "ui/trade_screen.json",
185
+ trade_pocket: "ui/trade_screen_pocket.json",
186
+ trade2: "ui/trade_2_screen.json",
187
+ trade2_pocket: "ui/trade_2_screen_pocket.json",
188
+ trialUpsell: "ui/trial_upsell_screen.json",
189
+ ugc_viewer: "ui/ugc_viewer_screen.json",
190
+ common_art: "ui/ui_art_assets_common.json",
191
+ common: "ui/ui_common.json",
192
192
  "common-classic": "ui/ui_common_classic.json",
193
- "edu_common": "ui/ui_edu_common.json",
194
- "purchase_common": "ui/ui_purchase_common.json",
195
- "common_buttons": "ui/ui_template_buttons.json",
196
- "common_dialogs": "ui/ui_template_dialogs.json",
197
- "common_tabs": "ui/ui_template_tabs.json",
198
- "common_toggles": "ui/ui_template_toggles.json",
199
- "friendsbutton": "ui/ui_friendsbutton.json",
200
- "iconbutton": "ui/ui_iconbutton.json",
201
- "update_dimensions": "ui/update_dimensions.json",
202
- "update_version": "ui/update_version.json",
203
- "world_recovery": "ui/world_recovery_screen.json",
204
- "world_templates": "ui/world_templates_screen.json",
205
- "xbl_console_qr_signin": "ui/xbl_console_qr_signin.json",
206
- "xbl_console_signin": "ui/xbl_console_signin.json",
207
- "xbl_console_signin_succeeded": "ui/xbl_console_signin_succeeded.json",
208
- "xbl_immediate_signin": "ui/xbl_immediate_signin.json",
209
- "win10_trial_conversion": "ui/win10_trial_conversion_screen.json"
193
+ edu_common: "ui/ui_edu_common.json",
194
+ purchase_common: "ui/ui_purchase_common.json",
195
+ common_buttons: "ui/ui_template_buttons.json",
196
+ common_dialogs: "ui/ui_template_dialogs.json",
197
+ common_tabs: "ui/ui_template_tabs.json",
198
+ common_toggles: "ui/ui_template_toggles.json",
199
+ friendsbutton: "ui/ui_friendsbutton.json",
200
+ iconbutton: "ui/ui_iconbutton.json",
201
+ update_dimensions: "ui/update_dimensions.json",
202
+ update_version: "ui/update_version.json",
203
+ world_recovery: "ui/world_recovery_screen.json",
204
+ world_templates: "ui/world_templates_screen.json",
205
+ xbl_console_qr_signin: "ui/xbl_console_qr_signin.json",
206
+ xbl_console_signin: "ui/xbl_console_signin.json",
207
+ xbl_console_signin_succeeded: "ui/xbl_console_signin_succeeded.json",
208
+ xbl_immediate_signin: "ui/xbl_immediate_signin.json",
209
+ win10_trial_conversion: "ui/win10_trial_conversion_screen.json",
210
210
  };
@@ -0,0 +1 @@
1
+ export declare function genCustomCode(pack_folder: string): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -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").Array2<string | number> | undefined;
19
- to?: import("../types/properties/value.js").Array2<string | number> | undefined;
18
+ from?: import("../types/properties/value.js").Value<number> | undefined;
19
+ to?: import("../types/properties/value.js").Value<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").Value<number> | undefined;
37
- to?: import("../types/properties/value.js").Value<number> | undefined;
36
+ from?: import("../types/properties/value.js").Array2<string | number> | undefined;
37
+ to?: import("../types/properties/value.js").Array2<string | 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>>;
@@ -1,5 +1,5 @@
1
- import "./compilers/Configuration.js";
2
1
  import "./compilers/PreCompile.js";
2
+ import "./compilers/Configuration.js";
3
3
  import "./compilers/ui/builder.js";
4
4
  import "./compilers/ui/installer.js";
5
5
  export { Animation } from "./components/Animation.js";
@@ -12,4 +12,4 @@ export { ItemAuxID } from "./types/enums/Items.js";
12
12
  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
- export * from "./analyzer/generate-ui-defs.js";
15
+ export { MemoryModify } from "./compilers/Memory.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asajs",
3
- "version": "4.0.15-indev",
3
+ "version": "4.1.1",
4
4
  "description": "Create your Minecraft JSON-UI resource packs using JavaScript",
5
5
  "keywords": [
6
6
  "Minecraft",
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Configuration object for the AsaJS build process.
3
+ * @type {import('asajs/config.d.ts').Config}
4
+ */
5
+ export const config = {
6
+ packinfo: {
7
+ name: "AsaJS",
8
+ description: "Create your Minecraft JSON-UI resource packs using JavaScript.",
9
+ version: [1, 0, 0],
10
+ },
11
+ compiler: {
12
+ enabled: true,
13
+ autoImport: true,
14
+ autoEnable: true,
15
+ importToPreview: false,
16
+ },
17
+ binding_functions: {
18
+ custom_abs: function (number) {
19
+ const randomAbs = RandomBindingString(16)
20
+
21
+ return {
22
+ generate_bindings: [
23
+ {
24
+ source_property_name: `[ abs(${number}) ]`,
25
+ target_property_name: randomAbs,
26
+ },
27
+ ],
28
+ return_value: randomAbs,
29
+ }
30
+ },
31
+ },
32
+ }