asajs 4.0.13 → 4.0.14-indev
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.
- package/dist/js/analyzer/custom-ui.js +1 -0
- package/dist/js/analyzer/generate-ui-defs.js +12 -0
- package/dist/js/analyzer/rebase.js +29 -0
- package/dist/js/analyzer/rebaseUIFiles.js +42 -0
- package/dist/js/analyzer/remove-not-ui.js +29 -0
- package/dist/js/analyzer/utils.js +18 -0
- package/dist/js/analyzer/vanilladefs.js +143588 -0
- package/dist/js/components/UI.js +1 -1
- package/dist/js/components/Utils.js +4 -3
- package/dist/js/index.js +1 -0
- package/dist/js/types/enums/Items.js +1 -0
- package/dist/js/types/vanilla/paths.js +208 -19472
- package/dist/types/analyzer/custom-ui.d.ts +1 -0
- package/dist/types/analyzer/generate-ui-defs.d.ts +1 -0
- package/dist/types/analyzer/rebase.d.ts +1 -0
- package/dist/types/analyzer/rebaseUIFiles.d.ts +1 -0
- package/dist/types/analyzer/remove-not-ui.d.ts +1 -0
- package/dist/types/analyzer/utils.d.ts +3 -0
- package/dist/types/analyzer/vanilladefs.d.ts +16 -0
- package/dist/types/components/AnimationKeyframe.d.ts +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/types/enums/Items.d.ts +1 -0
- package/dist/types/types/vanilla/intellisense.d.ts +564 -368
- package/dist/types/types/vanilla/paths.d.ts +208 -19472
- package/package.json +4 -3
package/dist/js/components/UI.js
CHANGED
|
@@ -94,7 +94,7 @@ export class UI extends Class {
|
|
|
94
94
|
throw new Error("Cannot add a child to itself");
|
|
95
95
|
const childName = name || RandomString(16);
|
|
96
96
|
this.controls.set(childName, [child, properties || {}]);
|
|
97
|
-
callback?.(childName);
|
|
97
|
+
callback?.apply(this, [childName]);
|
|
98
98
|
return this;
|
|
99
99
|
}
|
|
100
100
|
addAnimations(...anims) {
|
|
@@ -163,17 +163,18 @@ export function Modify(namespace, name) {
|
|
|
163
163
|
// @ts-ignore
|
|
164
164
|
if (memoryUI)
|
|
165
165
|
return memoryUI;
|
|
166
|
-
|
|
166
|
+
const path = paths[namespace];
|
|
167
|
+
if (!path) {
|
|
167
168
|
throw new Error(`Namespace '${namespace}' does not exist`);
|
|
168
169
|
// @ts-ignore
|
|
169
170
|
}
|
|
170
|
-
else if (!paths[namespace][name]) {
|
|
171
|
+
else if (typeof path !== "string" && !paths[namespace][name]) {
|
|
171
172
|
throw new Error(`Element '${name}' does not exist in namespace '${namespace}'`);
|
|
172
173
|
}
|
|
173
174
|
// @ts-ignore
|
|
174
175
|
const modifyUI = new ModifyUI(namespace, name,
|
|
175
176
|
// @ts-ignore
|
|
176
|
-
paths[namespace][name]);
|
|
177
|
+
typeof path === "string" ? path : paths[namespace][name]);
|
|
177
178
|
(MemoryModify[paths[namespace][name]] ||= {})[name] = modifyUI;
|
|
178
179
|
return modifyUI;
|
|
179
180
|
}
|
package/dist/js/index.js
CHANGED
|
@@ -558,6 +558,7 @@ export var ItemAuxID;
|
|
|
558
558
|
ItemAuxID[ItemAuxID["GOLDEN_BOOTS"] = 25296896] = "GOLDEN_BOOTS";
|
|
559
559
|
ItemAuxID[ItemAuxID["GOLDEN_CARROT"] = 20447232] = "GOLDEN_CARROT";
|
|
560
560
|
ItemAuxID[ItemAuxID["GOLDEN_CHESTPLATE"] = 25165824] = "GOLDEN_CHESTPLATE";
|
|
561
|
+
ItemAuxID[ItemAuxID["GOLDEN_DANDELION"] = -71499776] = "GOLDEN_DANDELION";
|
|
561
562
|
ItemAuxID[ItemAuxID["GOLDEN_HELMET"] = 25100288] = "GOLDEN_HELMET";
|
|
562
563
|
ItemAuxID[ItemAuxID["GOLDEN_HOE"] = 23920640] = "GOLDEN_HOE";
|
|
563
564
|
ItemAuxID[ItemAuxID["GOLDEN_HORSE_ARMOR"] = 37421056] = "GOLDEN_HORSE_ARMOR";
|