asajs 4.1.2-indev → 4.1.3-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/config.d.ts +1 -0
- package/dist/js/analyzer/generate-code.js +1 -0
- package/dist/js/analyzer/generate-ui-defs.js +1 -0
- package/dist/js/analyzer/rebaseUIFiles.js +12 -25
- package/dist/js/analyzer/utils.js +1 -0
- package/dist/js/analyzer/vanilladefs.js +1 -0
- package/dist/js/compilers/Configuration.js +2 -0
- package/dist/js/compilers/FormatProperties.js +1 -0
- package/dist/js/compilers/Memory.js +1 -0
- package/dist/js/compilers/PreCompile.js +1 -0
- package/dist/js/compilers/Random.js +1 -0
- package/dist/js/compilers/bindings/Binary.js +1 -0
- package/dist/js/compilers/bindings/Checker.js +1 -0
- package/dist/js/compilers/bindings/Function.js +1 -0
- package/dist/js/compilers/bindings/Lexer.js +1 -0
- package/dist/js/compilers/bindings/Parser.js +1 -0
- package/dist/js/compilers/bindings/index.js +1 -0
- package/dist/js/compilers/bindings/types.js +1 -0
- package/dist/js/compilers/ui/buildcache.js +1 -0
- package/dist/js/compilers/ui/builder.js +1 -0
- package/dist/js/compilers/ui/installer.js +1 -0
- package/dist/js/compilers/ui/linker.js +1 -0
- package/dist/js/compilers/ui/manifest.js +1 -0
- package/dist/js/components/API.js +1 -0
- package/dist/js/components/Animation.js +1 -0
- package/dist/js/components/AnimationKeyframe.js +1 -0
- package/dist/js/components/Class.js +1 -0
- package/dist/js/components/KeyframeController.js +1 -0
- package/dist/js/components/UI.js +3 -2
- package/dist/js/components/Utils.js +1 -0
- package/dist/js/index.js +1 -0
- package/dist/js/types/enums/Anchor.js +1 -0
- package/dist/js/types/enums/AnimType.js +1 -0
- package/dist/js/types/enums/ArrayName.js +1 -0
- package/dist/js/types/enums/BagBinding.js +1 -0
- package/dist/js/types/enums/Binding.js +1 -0
- package/dist/js/types/enums/BindingCondition.js +1 -0
- package/dist/js/types/enums/BindingType.js +1 -0
- package/dist/js/types/enums/ButtonId.js +1 -0
- package/dist/js/types/enums/ClipDirection.js +1 -0
- package/dist/js/types/enums/CollectionName.js +1 -0
- package/dist/js/types/enums/Color.js +1 -0
- package/dist/js/types/enums/DebugColor.js +1 -0
- package/dist/js/types/enums/Easing.js +1 -0
- package/dist/js/types/enums/FocusNavigationMode.js +1 -0
- package/dist/js/types/enums/FontSize.js +1 -0
- package/dist/js/types/enums/FontType.js +1 -0
- package/dist/js/types/enums/GlobalVariables.js +1 -0
- package/dist/js/types/enums/GridDimensions.js +1 -0
- package/dist/js/types/enums/InputModeCondition.js +1 -0
- package/dist/js/types/enums/Items.js +1 -0
- package/dist/js/types/enums/Links.js +1 -0
- package/dist/js/types/enums/MappingType.js +1 -0
- package/dist/js/types/enums/McColor.js +1 -0
- package/dist/js/types/enums/Operation.js +1 -0
- package/dist/js/types/enums/Orientation.js +1 -0
- package/dist/js/types/enums/Renderer.js +1 -0
- package/dist/js/types/enums/Rotation.js +1 -0
- package/dist/js/types/enums/Scope.js +1 -0
- package/dist/js/types/enums/SliderName.js +1 -0
- package/dist/js/types/enums/SmartAnimation.js +1 -0
- package/dist/js/types/enums/TextAlignment.js +1 -0
- package/dist/js/types/enums/TextType.js +1 -0
- package/dist/js/types/enums/TextboxName.js +1 -0
- package/dist/js/types/enums/ToggleName.js +1 -0
- package/dist/js/types/enums/Type.js +1 -0
- package/dist/js/types/enums/index.js +1 -0
- package/dist/js/types/properties/components.js +1 -0
- package/dist/js/types/properties/element/Animation.js +1 -0
- package/dist/js/types/properties/element/Button.js +1 -0
- package/dist/js/types/properties/element/CarouselLabel.js +1 -0
- package/dist/js/types/properties/element/Collection.js +1 -0
- package/dist/js/types/properties/element/Control.js +1 -0
- package/dist/js/types/properties/element/CustomRenderer.js +1 -0
- package/dist/js/types/properties/element/Cycler.js +1 -0
- package/dist/js/types/properties/element/DataBinding.js +1 -0
- package/dist/js/types/properties/element/DropdownName.js +1 -0
- package/dist/js/types/properties/element/EditBox.js +1 -0
- package/dist/js/types/properties/element/Factory.js +1 -0
- package/dist/js/types/properties/element/Focus.js +1 -0
- package/dist/js/types/properties/element/Grid.js +1 -0
- package/dist/js/types/properties/element/GridItem.js +1 -0
- package/dist/js/types/properties/element/GridPageIndicator.js +1 -0
- package/dist/js/types/properties/element/Input.js +1 -0
- package/dist/js/types/properties/element/Layout.js +1 -0
- package/dist/js/types/properties/element/Screen.js +1 -0
- package/dist/js/types/properties/element/ScrollView.js +1 -0
- package/dist/js/types/properties/element/SelectionWheel.js +1 -0
- package/dist/js/types/properties/element/Slider.js +1 -0
- package/dist/js/types/properties/element/Sliderbox.js +1 -0
- package/dist/js/types/properties/element/Sound.js +1 -0
- package/dist/js/types/properties/element/Sprite.js +1 -0
- package/dist/js/types/properties/element/StackPanel.js +1 -0
- package/dist/js/types/properties/element/TTS.js +1 -0
- package/dist/js/types/properties/element/Tab.js +1 -0
- package/dist/js/types/properties/element/Text.js +1 -0
- package/dist/js/types/properties/element/Toggle.js +1 -0
- package/dist/js/types/properties/element/TooltipTrigger.js +1 -0
- package/dist/js/types/properties/element/index.js +1 -0
- package/dist/js/types/properties/index.js +1 -0
- package/dist/js/types/properties/value.js +1 -0
- package/dist/js/types/vanilla/index.js +1 -0
- package/dist/js/types/vanilla/intellisense.js +1 -0
- package/dist/js/types/vanilla/paths.js +1 -0
- package/dist/types/compilers/Configuration.d.ts +1 -0
- package/package.json +1 -1
- package/dist/js/analyzer/custom-ui.js +0 -1
- package/dist/js/analyzer/generate-ui-code.js +0 -1
- package/dist/js/analyzer/rebase.js +0 -29
- package/dist/js/analyzer/remove-not-ui.js +0 -29
- package/dist/types/analyzer/custom-ui.d.ts +0 -1
- package/dist/types/analyzer/generate-ui-code.d.ts +0 -1
- package/dist/types/analyzer/rebase.d.ts +0 -1
- package/dist/types/analyzer/remove-not-ui.d.ts +0 -1
package/config.d.ts
CHANGED
|
@@ -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
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
fs.
|
|
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
|
-
|
|
23
|
-
|
|
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
|
|
@@ -143586,3 +143586,4 @@ export const vanilladefs = {
|
|
|
143586
143586
|
}
|
|
143587
143587
|
}
|
|
143588
143588
|
};
|
|
143589
|
+
//# sourceMappingURL=vanilladefs.js.map
|
|
@@ -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
|
package/dist/js/components/UI.js
CHANGED
|
@@ -6,7 +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
|
+
import { config, uiBuildFolder } from "../compilers/Configuration.js";
|
|
10
10
|
export class UI extends Class {
|
|
11
11
|
type;
|
|
12
12
|
path;
|
|
@@ -32,7 +32,7 @@ export class UI extends Class {
|
|
|
32
32
|
this.name = name?.match(/^(\w|\/)+/)?.[0] || RandomString(16);
|
|
33
33
|
this.namespace = namespace || RandomNamespace();
|
|
34
34
|
if (!path)
|
|
35
|
-
this.path =
|
|
35
|
+
this.path = `${uiBuildFolder}/${this.namespace}${config.compiler?.fileExtension ? (config.compiler.fileExtension.startsWith(".") ? config.compiler.fileExtension : `.${config.compiler.fileExtension}`) : ".json"}`;
|
|
36
36
|
else
|
|
37
37
|
this.path = path;
|
|
38
38
|
this.extendable = this.name.search("/") === -1;
|
|
@@ -343,3 +343,4 @@ export class ModifyUI extends UI {
|
|
|
343
343
|
return `\x1b[33mUI\x1b[0m<\x1b[92mmodify\x1b[0m> \x1b[92m"${this}\x1b[92m"\x1b[0m ${util.inspect(this.toJsonUIModify(), opts)}\n`;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
+
//# sourceMappingURL=UI.js.map
|
package/dist/js/index.js
CHANGED
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -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;
|