asajs 3.0.2 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/compilers/BindingCompiler.js +458 -0
- package/dist/cjs/compilers/BindingFunctions.js +267 -0
- package/dist/cjs/compilers/Compiler.js +158 -0
- package/dist/cjs/compilers/Compress.js +55 -0
- package/dist/cjs/compilers/Config.js +138 -0
- package/dist/cjs/compilers/Encoder.js +90 -0
- package/dist/cjs/compilers/Installer.js +123 -0
- package/dist/cjs/compilers/PreCompile.js +86 -0
- package/dist/cjs/compilers/generator/GenerateDir.js +51 -0
- package/dist/cjs/compilers/generator/JsonBuilder.js +66 -0
- package/dist/cjs/compilers/generator/LangBuilder.js +65 -0
- package/dist/cjs/compilers/generator/Log.js +45 -0
- package/dist/cjs/compilers/generator/Manifest.js +63 -0
- package/dist/cjs/compilers/generator/Save.js +87 -0
- package/dist/cjs/compilers/generator/SearchFiles.js +70 -0
- package/dist/cjs/compilers/generator/Sounds.js +91 -0
- package/dist/cjs/compilers/generator/Template.js +54 -0
- package/dist/cjs/compilers/generator/UIBuilder.js +123 -0
- package/dist/cjs/compilers/reader/Audio.js +81 -0
- package/dist/cjs/compilers/reader/Color.js +65 -0
- package/dist/cjs/compilers/reader/CurrentLine.js +36 -0
- package/dist/cjs/compilers/reader/Env.js +21 -0
- package/dist/cjs/compilers/reader/GlobalVariables.js +23 -0
- package/dist/cjs/compilers/reader/Object.js +44 -0
- package/dist/cjs/compilers/reader/ReadBinding.js +67 -0
- package/dist/cjs/compilers/reader/ReadProperties.js +118 -0
- package/dist/cjs/components/AddCollectionChill.js +41 -0
- package/dist/cjs/components/Animation.js +127 -0
- package/dist/cjs/components/AnimationKeyFrame.js +49 -0
- package/dist/cjs/components/Class.js +95 -0
- package/dist/cjs/components/LocalizeText.js +59 -0
- package/dist/cjs/components/Modify.js +377 -0
- package/dist/cjs/components/Random.js +104 -0
- package/dist/cjs/components/UI.js +387 -0
- package/dist/cjs/components/Vanilla.js +57915 -0
- package/dist/cjs/index.js +291 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/template.js +37 -0
- package/dist/cjs/types/components/ChildIdentifier.js +16 -0
- package/dist/cjs/types/components/Identifier.js +17 -0
- package/dist/cjs/types/components/NameCallback.js +16 -0
- package/dist/cjs/types/components/UIIdentifier.js +16 -0
- package/dist/cjs/types/components/UIInterface.js +16 -0
- package/dist/cjs/types/enums/Anchor.js +39 -0
- package/dist/cjs/types/enums/AnimTypes.js +39 -0
- package/dist/cjs/types/enums/BindingCondition.js +36 -0
- package/dist/cjs/types/enums/BindingName.js +4208 -0
- package/dist/cjs/types/enums/BindingType.js +35 -0
- package/dist/cjs/types/enums/ClipDirecion.js +35 -0
- package/dist/cjs/types/enums/Collection.js +202 -0
- package/dist/cjs/types/enums/Direction.js +33 -0
- package/dist/cjs/types/enums/EasingTypes.js +62 -0
- package/dist/cjs/types/enums/EnumColor.js +37 -0
- package/dist/cjs/types/enums/FocusNavigationMode.js +34 -0
- package/dist/cjs/types/enums/FontSize.js +34 -0
- package/dist/cjs/types/enums/FontType.js +35 -0
- package/dist/cjs/types/enums/GlobalVariables.js +345 -0
- package/dist/cjs/types/enums/InputModeCondition.js +33 -0
- package/dist/cjs/types/enums/ItemAuxID.js +31 -0
- package/dist/cjs/types/enums/JsonUIArrayName.js +36 -0
- package/dist/cjs/types/enums/MappingFrom.js +81 -0
- package/dist/cjs/types/enums/MappingTo.js +248 -0
- package/dist/cjs/types/enums/MappingTypes.js +34 -0
- package/dist/cjs/types/enums/Orientation.js +32 -0
- package/dist/cjs/types/enums/Renderer.js +68 -0
- package/dist/cjs/types/enums/Rotation.js +33 -0
- package/dist/cjs/types/enums/Scope.js +32 -0
- package/dist/cjs/types/enums/TextTypes.js +33 -0
- package/dist/cjs/types/enums/TextureFileSystem.js +41 -0
- package/dist/cjs/types/enums/Types.js +57 -0
- package/dist/cjs/types/objects/Animation.js +16 -0
- package/dist/cjs/types/objects/BindingHook.js +16 -0
- package/dist/cjs/types/objects/BindingInterface.js +16 -0
- package/dist/cjs/types/objects/ButtonMapping.js +16 -0
- package/dist/cjs/types/objects/Factory.js +16 -0
- package/dist/cjs/types/objects/Installer.js +53 -0
- package/dist/cjs/types/objects/Manifest.js +56 -0
- package/dist/cjs/types/objects/Modify.js +16 -0
- package/dist/cjs/types/objects/PropertyBag.js +16 -0
- package/dist/cjs/types/objects/Sound.js +16 -0
- package/dist/cjs/types/objects/Variables.js +16 -0
- package/dist/cjs/types/objects/elements/Button.js +17 -0
- package/dist/cjs/types/objects/elements/CollectionPanel.js +17 -0
- package/dist/cjs/types/objects/elements/Custom.js +17 -0
- package/dist/cjs/types/objects/elements/Dropdown.js +17 -0
- package/dist/cjs/types/objects/elements/EditBox.js +17 -0
- package/dist/cjs/types/objects/elements/Grid.js +16 -0
- package/dist/cjs/types/objects/elements/Image.js +17 -0
- package/dist/cjs/types/objects/elements/InputPanel.js +16 -0
- package/dist/cjs/types/objects/elements/Label.js +17 -0
- package/dist/cjs/types/objects/elements/PropertiesType.js +17 -0
- package/dist/cjs/types/objects/elements/Screen.js +17 -0
- package/dist/cjs/types/objects/elements/ScrollView.js +17 -0
- package/dist/cjs/types/objects/elements/ScrollbarBox.js +17 -0
- package/dist/cjs/types/objects/elements/ScrollbarTrack.js +17 -0
- package/dist/cjs/types/objects/elements/SelectionWheel.js +17 -0
- package/dist/cjs/types/objects/elements/Slider.js +17 -0
- package/dist/cjs/types/objects/elements/SliderBox.js +17 -0
- package/dist/cjs/types/objects/elements/StackPanel.js +16 -0
- package/dist/cjs/types/objects/elements/Toggle.js +17 -0
- package/dist/cjs/types/objects/elements/TooltipTrigger.js +16 -0
- package/dist/cjs/types/objects/elements/panel.js +16 -0
- package/dist/cjs/types/objects/properties/Buttons.js +16 -0
- package/dist/cjs/types/objects/properties/CollectionIndexs.js +16 -0
- package/dist/cjs/types/objects/properties/Collections.js +16 -0
- package/dist/cjs/types/objects/properties/Controls.js +16 -0
- package/dist/cjs/types/objects/properties/Dropdowns.js +16 -0
- package/dist/cjs/types/objects/properties/Focus.js +16 -0
- package/dist/cjs/types/objects/properties/FocusContainerCustom.js +16 -0
- package/dist/cjs/types/objects/properties/Grids.js +16 -0
- package/dist/cjs/types/objects/properties/Inputs.js +16 -0
- package/dist/cjs/types/objects/properties/Layouts.js +16 -0
- package/dist/cjs/types/objects/properties/Properties.js +16 -0
- package/dist/cjs/types/objects/properties/Renderers.js +16 -0
- package/dist/cjs/types/objects/properties/Screens.js +16 -0
- package/dist/cjs/types/objects/properties/ScrollViews.js +16 -0
- package/dist/cjs/types/objects/properties/SelectionWheels.js +16 -0
- package/dist/cjs/types/objects/properties/SliderBoxs.js +16 -0
- package/dist/cjs/types/objects/properties/Sliders.js +16 -0
- package/dist/cjs/types/objects/properties/Sounds.js +16 -0
- package/dist/cjs/types/objects/properties/Specials.js +16 -0
- package/dist/cjs/types/objects/properties/Sprites.js +16 -0
- package/dist/cjs/types/objects/properties/StackPanels.js +16 -0
- package/dist/cjs/types/objects/properties/TTS.js +16 -0
- package/dist/cjs/types/objects/properties/TextEdits.js +16 -0
- package/dist/cjs/types/objects/properties/Texts.js +16 -0
- package/dist/cjs/types/objects/properties/Toggles.js +16 -0
- package/dist/cjs/types/objects/properties/TooltipTriggers.js +16 -0
- package/dist/cjs/types/objects/properties/Variables.js +16 -0
- package/dist/cjs/types/values/Any.js +16 -0
- package/dist/cjs/types/values/Binding.js +16 -0
- package/dist/cjs/types/values/Bool.js +16 -0
- package/dist/cjs/types/values/ColorVector.js +16 -0
- package/dist/cjs/types/values/ElementPath.js +16 -0
- package/dist/cjs/types/values/Hex.js +16 -0
- package/dist/cjs/types/values/Number.js +16 -0
- package/dist/cjs/types/values/RangeVector.js +16 -0
- package/dist/cjs/types/values/Str.js +16 -0
- package/dist/cjs/types/values/StringVector.js +16 -0
- package/dist/cjs/types/values/TargetElementPath.js +16 -0
- package/dist/cjs/types/values/Variable.js +16 -0
- package/dist/cjs/types/values/Vector.js +16 -0
- package/dist/esm/index.js +68470 -0
- package/dist/esm/package.json +1 -0
- package/dist/types/compilers/BindingCompiler.d.ts +44 -0
- package/dist/types/compilers/BindingFunctions.d.ts +10 -0
- package/dist/types/compilers/Compiler.d.ts +3 -0
- package/dist/types/compilers/Compress.d.ts +1 -0
- package/dist/types/compilers/Config.d.ts +95 -0
- package/dist/types/compilers/Encoder.d.ts +11 -0
- package/dist/types/compilers/Installer.d.ts +14 -0
- package/dist/types/compilers/PreCompile.d.ts +4 -0
- package/dist/types/compilers/generator/GenerateDir.d.ts +1 -0
- package/dist/types/compilers/generator/JsonBuilder.d.ts +28 -0
- package/dist/types/compilers/generator/LangBuilder.d.ts +4 -0
- package/dist/types/compilers/generator/Log.d.ts +9 -0
- package/dist/types/compilers/generator/Manifest.d.ts +21 -0
- package/dist/types/compilers/generator/Save.d.ts +16 -0
- package/dist/types/compilers/generator/SearchFiles.d.ts +11 -0
- package/dist/types/compilers/generator/Sounds.d.ts +5 -0
- package/dist/types/compilers/generator/Template.d.ts +1 -0
- package/dist/types/compilers/generator/UIBuilder.d.ts +9 -0
- package/dist/types/compilers/reader/Audio.d.ts +1 -0
- package/dist/types/compilers/reader/Color.d.ts +5 -0
- package/dist/types/compilers/reader/CurrentLine.d.ts +1 -0
- package/dist/types/compilers/reader/Env.d.ts +1 -0
- package/dist/types/compilers/reader/GlobalVariables.d.ts +1 -0
- package/dist/types/compilers/reader/Object.d.ts +11 -0
- package/dist/types/compilers/reader/ReadBinding.d.ts +6 -0
- package/dist/types/compilers/reader/ReadProperties.d.ts +3 -0
- package/dist/types/components/AddCollectionChill.d.ts +6 -0
- package/dist/types/components/Animation.d.ts +15 -0
- package/dist/types/components/AnimationKeyFrame.d.ts +10 -0
- package/dist/types/components/Class.d.ts +68 -0
- package/dist/types/components/LocalizeText.d.ts +21 -0
- package/dist/types/components/Modify.d.ts +30 -0
- package/dist/types/components/Random.d.ts +20 -0
- package/dist/types/components/UI.d.ts +89 -0
- package/dist/types/components/Vanilla.d.ts +19729 -0
- package/dist/types/index.d.ts +136 -0
- package/dist/types/template.d.ts +4 -0
- package/dist/types/types/components/ChildIdentifier.d.ts +11 -0
- package/dist/types/types/components/Identifier.d.ts +4 -0
- package/dist/types/types/components/NameCallback.d.ts +3 -0
- package/dist/types/types/components/UIIdentifier.d.ts +4 -0
- package/dist/types/types/components/UIInterface.d.ts +16 -0
- package/dist/types/types/enums/Anchor.d.ts +11 -0
- package/dist/types/types/enums/AnimTypes.d.ts +11 -0
- package/dist/types/types/enums/BindingCondition.d.ts +8 -0
- package/dist/types/types/enums/BindingName.d.ts +4180 -0
- package/dist/types/types/enums/BindingType.d.ts +7 -0
- package/dist/types/types/enums/ClipDirecion.d.ts +7 -0
- package/dist/types/types/enums/Collection.d.ts +174 -0
- package/dist/types/types/enums/Direction.d.ts +5 -0
- package/dist/types/types/enums/EasingTypes.d.ts +34 -0
- package/dist/types/types/enums/EnumColor.d.ts +9 -0
- package/dist/types/types/enums/FocusNavigationMode.d.ts +6 -0
- package/dist/types/types/enums/FontSize.d.ts +6 -0
- package/dist/types/types/enums/FontType.d.ts +7 -0
- package/dist/types/types/enums/GlobalVariables.d.ts +317 -0
- package/dist/types/types/enums/InputModeCondition.d.ts +5 -0
- package/dist/types/types/enums/ItemAuxID.d.ts +3 -0
- package/dist/types/types/enums/JsonUIArrayName.d.ts +7 -0
- package/dist/types/types/enums/MappingFrom.d.ts +53 -0
- package/dist/types/types/enums/MappingTo.d.ts +220 -0
- package/dist/types/types/enums/MappingTypes.d.ts +6 -0
- package/dist/types/types/enums/Orientation.d.ts +4 -0
- package/dist/types/types/enums/Renderer.d.ts +40 -0
- package/dist/types/types/enums/Rotation.d.ts +5 -0
- package/dist/types/types/enums/Scope.d.ts +4 -0
- package/dist/types/types/enums/TextTypes.d.ts +5 -0
- package/dist/types/types/enums/TextureFileSystem.d.ts +13 -0
- package/dist/types/types/enums/Types.d.ts +29 -0
- package/dist/types/types/objects/Animation.d.ts +36 -0
- package/dist/types/types/objects/BindingHook.d.ts +1 -0
- package/dist/types/types/objects/BindingInterface.d.ts +21 -0
- package/dist/types/types/objects/ButtonMapping.d.ts +18 -0
- package/dist/types/types/objects/Factory.d.ts +2 -0
- package/dist/types/types/objects/Installer.d.ts +26 -0
- package/dist/types/types/objects/Manifest.d.ts +74 -0
- package/dist/types/types/objects/Modify.d.ts +52 -0
- package/dist/types/types/objects/PropertyBag.d.ts +2 -0
- package/dist/types/types/objects/Sound.d.ts +8 -0
- package/dist/types/types/objects/Variables.d.ts +1 -0
- package/dist/types/types/objects/elements/Button.d.ts +4 -0
- package/dist/types/types/objects/elements/CollectionPanel.d.ts +4 -0
- package/dist/types/types/objects/elements/Custom.d.ts +5 -0
- package/dist/types/types/objects/elements/Dropdown.d.ts +4 -0
- package/dist/types/types/objects/elements/EditBox.d.ts +4 -0
- package/dist/types/types/objects/elements/Grid.d.ts +4 -0
- package/dist/types/types/objects/elements/Image.d.ts +4 -0
- package/dist/types/types/objects/elements/InputPanel.d.ts +7 -0
- package/dist/types/types/objects/elements/Label.d.ts +4 -0
- package/dist/types/types/objects/elements/PropertiesType.d.ts +45 -0
- package/dist/types/types/objects/elements/Screen.d.ts +4 -0
- package/dist/types/types/objects/elements/ScrollView.d.ts +5 -0
- package/dist/types/types/objects/elements/ScrollbarBox.d.ts +4 -0
- package/dist/types/types/objects/elements/ScrollbarTrack.d.ts +4 -0
- package/dist/types/types/objects/elements/SelectionWheel.d.ts +4 -0
- package/dist/types/types/objects/elements/Slider.d.ts +4 -0
- package/dist/types/types/objects/elements/SliderBox.d.ts +5 -0
- package/dist/types/types/objects/elements/StackPanel.d.ts +7 -0
- package/dist/types/types/objects/elements/Toggle.d.ts +4 -0
- package/dist/types/types/objects/elements/TooltipTrigger.d.ts +8 -0
- package/dist/types/types/objects/elements/panel.d.ts +6 -0
- package/dist/types/types/objects/properties/Buttons.d.ts +5 -0
- package/dist/types/types/objects/properties/CollectionIndexs.d.ts +4 -0
- package/dist/types/types/objects/properties/Collections.d.ts +6 -0
- package/dist/types/types/objects/properties/Controls.d.ts +27 -0
- package/dist/types/types/objects/properties/Dropdowns.d.ts +6 -0
- package/dist/types/types/objects/properties/Focus.d.ts +28 -0
- package/dist/types/types/objects/properties/FocusContainerCustom.d.ts +5 -0
- package/dist/types/types/objects/properties/Grids.d.ts +15 -0
- package/dist/types/types/objects/properties/Inputs.d.ts +13 -0
- package/dist/types/types/objects/properties/Layouts.d.ts +35 -0
- package/dist/types/types/objects/properties/Properties.d.ts +27 -0
- package/dist/types/types/objects/properties/Renderers.d.ts +5 -0
- package/dist/types/types/objects/properties/Screens.d.ts +23 -0
- package/dist/types/types/objects/properties/ScrollViews.d.ts +17 -0
- package/dist/types/types/objects/properties/SelectionWheels.d.ts +13 -0
- package/dist/types/types/objects/properties/SliderBoxs.d.ts +6 -0
- package/dist/types/types/objects/properties/Sliders.d.ts +23 -0
- package/dist/types/types/objects/properties/Sounds.d.ts +10 -0
- package/dist/types/types/objects/properties/Specials.d.ts +60 -0
- package/dist/types/types/objects/properties/Sprites.d.ts +33 -0
- package/dist/types/types/objects/properties/StackPanels.d.ts +5 -0
- package/dist/types/types/objects/properties/TTS.d.ts +24 -0
- package/dist/types/types/objects/properties/TextEdits.d.ts +19 -0
- package/dist/types/types/objects/properties/Texts.d.ts +26 -0
- package/dist/types/types/objects/properties/Toggles.d.ts +24 -0
- package/dist/types/types/objects/properties/TooltipTriggers.d.ts +7 -0
- package/dist/types/types/objects/properties/Variables.d.ts +3 -0
- package/dist/types/types/values/Any.d.ts +4 -0
- package/dist/types/types/values/Binding.d.ts +2 -0
- package/dist/types/types/values/Bool.d.ts +2 -0
- package/dist/types/types/values/ColorVector.d.ts +6 -0
- package/dist/types/types/values/ElementPath.d.ts +2 -0
- package/dist/types/types/values/Hex.d.ts +1 -0
- package/dist/types/types/values/Number.d.ts +4 -0
- package/dist/types/types/values/RangeVector.d.ts +5 -0
- package/dist/types/types/values/Str.d.ts +2 -0
- package/dist/types/types/values/StringVector.d.ts +6 -0
- package/dist/types/types/values/TargetElementPath.d.ts +1 -0
- package/dist/types/types/values/Variable.d.ts +1 -0
- package/dist/types/types/values/Vector.d.ts +5 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "module"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { UI } from "../components/UI";
|
|
2
|
+
import { OverrideInterface } from "../types/objects/Modify";
|
|
3
|
+
import { Binding } from "../types/values/Binding";
|
|
4
|
+
export interface BindingFunctionObject {
|
|
5
|
+
[key: string]: (arg: UI | OverrideInterface, params: Array<string>) => Binding;
|
|
6
|
+
}
|
|
7
|
+
export declare class BindingCompiler {
|
|
8
|
+
static compile(propertyName: string | string[], arg: UI | OverrideInterface): string;
|
|
9
|
+
static getCompilePart(propertyName: string | string[]): string;
|
|
10
|
+
static build(propertyName: string, arg: UI | OverrideInterface): string;
|
|
11
|
+
static buildNewPropertyBag(token: string, arg: UI | OverrideInterface): any;
|
|
12
|
+
static checkAndBuild(token: string, arg: UI | OverrideInterface): any;
|
|
13
|
+
static compileSpecialOperator(tokens: Array<string>, arg: UI | OverrideInterface): string[];
|
|
14
|
+
static lexer(propertyName: string, arg: UI | OverrideInterface): string[];
|
|
15
|
+
static splitString(propertyName: string): string[];
|
|
16
|
+
static stringHandler(token: string, arg: UI | OverrideInterface): string;
|
|
17
|
+
static getStringTokens(token: string): string[];
|
|
18
|
+
static functionHandler(token: string, arg: UI | OverrideInterface): string;
|
|
19
|
+
static readFunctionFromToken(tokens: Array<string>, arg: UI | OverrideInterface): {
|
|
20
|
+
name: string;
|
|
21
|
+
params: string[];
|
|
22
|
+
};
|
|
23
|
+
static readTokens(strTokens: Array<string>): string[];
|
|
24
|
+
static getTokens(strTokens: Array<string>): string[];
|
|
25
|
+
static buildNewBinding(token: string, arg: UI | OverrideInterface): string;
|
|
26
|
+
static findSourceBindings(token: string, sourceControlsName: string, lastResourceBindings?: any): {
|
|
27
|
+
reSourceBindings: Record<string, string>;
|
|
28
|
+
newTokens: string[];
|
|
29
|
+
};
|
|
30
|
+
static isCanCompile(token: string | string[]): boolean;
|
|
31
|
+
static isString(token: string): boolean;
|
|
32
|
+
static isStringCode(token: string): boolean;
|
|
33
|
+
static isStringPattern(token: string): boolean;
|
|
34
|
+
static isNegativeNumber(token: string): boolean;
|
|
35
|
+
static isScientificNotation(token: string): boolean;
|
|
36
|
+
static isFunction(token: string): boolean;
|
|
37
|
+
static isArray(token: string): boolean;
|
|
38
|
+
static isCodeBlock(token: string): boolean;
|
|
39
|
+
static maybeFunctionName(token: string): boolean;
|
|
40
|
+
static isBindingOrVariable(token: string): boolean;
|
|
41
|
+
static isOperator(token: string): boolean;
|
|
42
|
+
static isHasBinding(token: string): boolean;
|
|
43
|
+
static isNumber(value: string): boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Class } from "../components/Class";
|
|
2
|
+
import { UI } from "../components/UI";
|
|
3
|
+
import { OverrideInterface, ModificationBindingsInterface } from "../types/objects/Modify";
|
|
4
|
+
import { Binding } from "../types/values/Binding";
|
|
5
|
+
import { BindingFunctionObject } from "./BindingCompiler";
|
|
6
|
+
export declare const funcObj: BindingFunctionObject;
|
|
7
|
+
export type BindingFunctionsCallback<T = UI | OverrideInterface | ModificationBindingsInterface> = (element: T, params: Array<string>) => Binding | string;
|
|
8
|
+
export declare class BindingFunctions extends Class {
|
|
9
|
+
static register<T = UI | OverrideInterface | ModificationBindingsInterface>(name: string, callback: BindingFunctionsCallback<T>, override?: boolean): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CompressPack(buildPath: string): void;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { UUID } from "crypto";
|
|
2
|
+
import { SemverString, Version } from "../types/objects/Manifest";
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing the structure of a config manifest.
|
|
5
|
+
* This is used to define the metadata of the resource pack.
|
|
6
|
+
*/
|
|
7
|
+
interface ConfigManifest {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
version: Version | SemverString;
|
|
11
|
+
baseGameVersion: Version;
|
|
12
|
+
uuid: UUID;
|
|
13
|
+
}
|
|
14
|
+
interface ConfigCompilerUI {
|
|
15
|
+
obfuscateName: boolean;
|
|
16
|
+
obfuscateType: boolean;
|
|
17
|
+
nameLength: number;
|
|
18
|
+
namespaceLength: number;
|
|
19
|
+
namespaceAmount: number;
|
|
20
|
+
}
|
|
21
|
+
interface ConfigCompiler {
|
|
22
|
+
UI: ConfigCompilerUI;
|
|
23
|
+
autoCompress: boolean;
|
|
24
|
+
fileExtension: string;
|
|
25
|
+
encodeJson: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface ConfigInstaller {
|
|
28
|
+
autoInstall: boolean;
|
|
29
|
+
developEvironment: boolean;
|
|
30
|
+
previewVersion: boolean;
|
|
31
|
+
customPath: boolean;
|
|
32
|
+
installPath?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface Config {
|
|
35
|
+
installer: ConfigInstaller;
|
|
36
|
+
compiler: ConfigCompiler;
|
|
37
|
+
manifest: ConfigManifest;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Reads an object and applies default values where necessary.
|
|
41
|
+
*
|
|
42
|
+
* This function allows deeply nested objects to be filled with default values when they are undefined.
|
|
43
|
+
*
|
|
44
|
+
* @param {object} [obj] - The object to read and apply the default values to.
|
|
45
|
+
* @param {object} [defaultObjValue] - The default values to use if any properties in `obj` are undefined.
|
|
46
|
+
* @returns {object} - The object with default values applied.
|
|
47
|
+
*/
|
|
48
|
+
export declare function readObject(obj?: object, defaultObjValue?: object): object;
|
|
49
|
+
/**
|
|
50
|
+
* A class to manage and load configuration settings.
|
|
51
|
+
*
|
|
52
|
+
* The class allows reading from a configuration file and merging the saved configuration
|
|
53
|
+
* with default values when necessary.
|
|
54
|
+
*/
|
|
55
|
+
export declare class Configs {
|
|
56
|
+
/**
|
|
57
|
+
* The current loaded configuration saved to disk.
|
|
58
|
+
*/
|
|
59
|
+
save: Config;
|
|
60
|
+
/**
|
|
61
|
+
* The statically cached configuration.
|
|
62
|
+
*/
|
|
63
|
+
static config: Config;
|
|
64
|
+
/**
|
|
65
|
+
* Loads the configuration file and parses it into the `save` property.
|
|
66
|
+
*/
|
|
67
|
+
constructor();
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves the current configuration, either from the saved configuration or the default values.
|
|
70
|
+
*
|
|
71
|
+
* @returns {Config} - The configuration object.
|
|
72
|
+
*/
|
|
73
|
+
static getConfig(): Config;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves the default configuration values.
|
|
76
|
+
*
|
|
77
|
+
* @returns {Config} - The default configuration object.
|
|
78
|
+
*/
|
|
79
|
+
static getDefaultConfig(): Config;
|
|
80
|
+
private static apply;
|
|
81
|
+
private static arguments;
|
|
82
|
+
private static bind;
|
|
83
|
+
private static call;
|
|
84
|
+
private static caller;
|
|
85
|
+
private static length;
|
|
86
|
+
private static name;
|
|
87
|
+
private static toString;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Exporting the Configs class to be used globally.
|
|
91
|
+
*
|
|
92
|
+
* This allows other modules to access the configuration settings through `config`.
|
|
93
|
+
*/
|
|
94
|
+
export declare const config: typeof Configs;
|
|
95
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Class } from "../components/Class";
|
|
2
|
+
export declare class Encoder extends Class {
|
|
3
|
+
static count: number;
|
|
4
|
+
static start(): void;
|
|
5
|
+
static replaceCode(path: string, code: any): void;
|
|
6
|
+
static encode(code: any): any;
|
|
7
|
+
static encodeArray(code: any[]): any[];
|
|
8
|
+
static encodeObject(code: any): object;
|
|
9
|
+
static encodeString(code: string): string;
|
|
10
|
+
static readCode(path: string): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SemverString, UUID, Version } from "./../types/objects/Manifest";
|
|
2
|
+
import { ResourcePackInterface } from "../types/objects/Installer";
|
|
3
|
+
export declare class ResourcePacks {
|
|
4
|
+
gamePath: string;
|
|
5
|
+
gameDataPath: string;
|
|
6
|
+
installPath: string;
|
|
7
|
+
globalResoucePacksPath: string;
|
|
8
|
+
constructor(data: ResourcePackInterface);
|
|
9
|
+
isPackInstalled(uuid: UUID, version: Version | SemverString): boolean;
|
|
10
|
+
installPack(uuid: UUID, version: Version | SemverString): void;
|
|
11
|
+
uninstallPack(uuid: UUID, version: Version | SemverString): void;
|
|
12
|
+
getInstallPath(): string;
|
|
13
|
+
packLink(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function GenerateDir(installPath: string, path?: string): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AnimationKeyFrame } from "../../components/AnimationKeyFrame";
|
|
2
|
+
import { Class } from "../../components/Class";
|
|
3
|
+
import { Modify } from "../../components/Modify";
|
|
4
|
+
import { UI } from "../../components/UI";
|
|
5
|
+
interface JsonObject {
|
|
6
|
+
build: {
|
|
7
|
+
[file: string]: {
|
|
8
|
+
namespace: string;
|
|
9
|
+
[element: string]: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
modify: {
|
|
13
|
+
[modifyFilePath: string]: {
|
|
14
|
+
[path: string]: Modify;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
globalVariables: {
|
|
18
|
+
[key: `$${string}`]: any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare class JsonBuilder extends Class {
|
|
22
|
+
static save: JsonObject;
|
|
23
|
+
static registerGlobalVariable(key: string, value: any): void;
|
|
24
|
+
static registerElement(namespace: string, element: UI | AnimationKeyFrame): void;
|
|
25
|
+
static getModify(modifyFile: string, modifyElement: string): Modify;
|
|
26
|
+
static registerModify(modifyFile: string, modifyElement: string, modify: Modify): Modify;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Class } from "../../components/Class";
|
|
2
|
+
export declare const Logs: Array<{
|
|
3
|
+
type: "warning" | "error";
|
|
4
|
+
message: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare class Log extends Class {
|
|
7
|
+
static warning(message: string): void;
|
|
8
|
+
static error(message: string): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UUID } from "crypto";
|
|
2
|
+
import { ManifestInterface, SemverString, Type, Version } from "../../types/objects/Manifest";
|
|
3
|
+
interface ManifestHeader {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
uuid?: UUID;
|
|
7
|
+
version?: Version | SemverString;
|
|
8
|
+
}
|
|
9
|
+
interface ManifestMetadata {
|
|
10
|
+
authors?: Array<string>;
|
|
11
|
+
license?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
producType?: string;
|
|
14
|
+
generatedWith?: object;
|
|
15
|
+
}
|
|
16
|
+
export declare class Manifest {
|
|
17
|
+
manifest: ManifestInterface;
|
|
18
|
+
constructor(header: ManifestHeader, type?: Type, metadata?: ManifestMetadata);
|
|
19
|
+
buildJson(): string;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Class } from "../../components/Class";
|
|
2
|
+
import { UUID } from "../../types/objects/Manifest";
|
|
3
|
+
type ReturnValue = () => any;
|
|
4
|
+
export declare class Save extends Class {
|
|
5
|
+
static isSaveCreated: boolean;
|
|
6
|
+
private static write;
|
|
7
|
+
private static read;
|
|
8
|
+
static createFile(path: string, data: ReturnValue, write?: Function, read?: Function): any;
|
|
9
|
+
static createJson(path: string, data: ReturnValue): any;
|
|
10
|
+
static updateFile(path: string, data: ReturnValue, write?: Function, read?: Function): any;
|
|
11
|
+
static updateJson(path: string, data: ReturnValue): any;
|
|
12
|
+
static uuid(): [UUID, UUID];
|
|
13
|
+
static resource(mcVersion?: "stable" | "preview"): any;
|
|
14
|
+
static getBuildID(): any;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Class } from "../../components/Class";
|
|
2
|
+
interface CallbackValue {
|
|
3
|
+
folder?: string;
|
|
4
|
+
file: string;
|
|
5
|
+
path: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class SearchFiles extends Class {
|
|
8
|
+
static array(folderPath: string, prefix?: string): Array<string>;
|
|
9
|
+
static forEach(folderPath: string, callback: (value: CallbackValue) => void): void;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function firstRun(): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class UIBuilder {
|
|
2
|
+
static delete(installPath: string): void;
|
|
3
|
+
static jsonUI(installPath: string): number;
|
|
4
|
+
static modify(installPath: string): number;
|
|
5
|
+
static uiDefs(installPath: string): number;
|
|
6
|
+
static contents(installPath: string): number;
|
|
7
|
+
static texturesList(installPath: string): number;
|
|
8
|
+
static globalVariables(installPath: string): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function FormatAudio(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CurrentLine(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Class } from "../../components/Class";
|
|
2
|
+
type CallbackObject = (key: string, value: any) => void;
|
|
3
|
+
type CallbackObjectMap = (key: string, value: any) => {
|
|
4
|
+
key: string;
|
|
5
|
+
value: any;
|
|
6
|
+
};
|
|
7
|
+
export declare class Obj extends Class {
|
|
8
|
+
static forEach(data: object, callback: CallbackObject): void;
|
|
9
|
+
static map(data: object, callback: CallbackObjectMap): object;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UI } from "../../components/UI";
|
|
2
|
+
import { BindingName } from "../../types/enums/BindingName";
|
|
3
|
+
import { BindingInterface } from "../../types/objects/BindingInterface";
|
|
4
|
+
import { OverrideInterface } from "../../types/objects/Modify";
|
|
5
|
+
import { Var } from "../../types/values/Variable";
|
|
6
|
+
export declare function ReadBinding(binding: BindingName | Var | BindingInterface, arg: UI | OverrideInterface): BindingInterface;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UIChildNameCallback } from "../types/components/NameCallback";
|
|
2
|
+
import { Properties } from "../types/objects/properties/Properties";
|
|
3
|
+
import { UI } from "./UI";
|
|
4
|
+
type setNameCallback = (index: number) => string;
|
|
5
|
+
export declare function AddCollectionChild(parent: UI, child: UI, collectionLength: number, startIndex?: number, properties?: Properties, setName?: setNameCallback, callback?: UIChildNameCallback): void;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Identifier } from "../types/components/Identifier";
|
|
2
|
+
import { AnimationInterface } from "../types/objects/Animation";
|
|
3
|
+
import { Class } from "./Class";
|
|
4
|
+
export declare class Animation extends Class {
|
|
5
|
+
private identifier?;
|
|
6
|
+
private keyFrames;
|
|
7
|
+
private buildKey;
|
|
8
|
+
private config;
|
|
9
|
+
static register(animation: AnimationInterface, identifier?: Identifier): Animation;
|
|
10
|
+
constructor(animation: AnimationInterface, identifier?: Identifier | undefined);
|
|
11
|
+
getKeyIndex(index: number): string;
|
|
12
|
+
private buildAnimation;
|
|
13
|
+
private generateIdentifier;
|
|
14
|
+
private getFrameKeyByIdentifier;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Identifier } from "../types/components/Identifier";
|
|
2
|
+
import { AnimationKeyFrameInterface } from "../types/objects/Animation";
|
|
3
|
+
import { Class } from "./Class";
|
|
4
|
+
export declare class AnimationKeyFrame extends Class {
|
|
5
|
+
private identifier;
|
|
6
|
+
private properties;
|
|
7
|
+
constructor(keyFrame: AnimationKeyFrameInterface, identifier: Identifier);
|
|
8
|
+
getFullPath(): string;
|
|
9
|
+
getUI(): AnimationKeyFrameInterface;
|
|
10
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a class with several static methods and properties that appear to serve as placeholders or utilities.
|
|
3
|
+
* The methods in this class are defined but not yet implemented, potentially for future extensions or overriding.
|
|
4
|
+
*
|
|
5
|
+
* @class Class
|
|
6
|
+
*/
|
|
7
|
+
export declare class Class {
|
|
8
|
+
/**
|
|
9
|
+
* A static method that seems to serve as a placeholder, but has no functionality as of now.
|
|
10
|
+
*
|
|
11
|
+
* @private
|
|
12
|
+
* @static
|
|
13
|
+
*/
|
|
14
|
+
private static apply;
|
|
15
|
+
/**
|
|
16
|
+
* A static property initialized to an empty string, likely intended to hold arguments or be overridden in the future.
|
|
17
|
+
*
|
|
18
|
+
* @private
|
|
19
|
+
* @static
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
private static arguments;
|
|
23
|
+
/**
|
|
24
|
+
* A static method that seems to serve as a placeholder, but has no functionality as of now.
|
|
25
|
+
*
|
|
26
|
+
* @private
|
|
27
|
+
* @static
|
|
28
|
+
*/
|
|
29
|
+
private static bind;
|
|
30
|
+
/**
|
|
31
|
+
* A static method that seems to serve as a placeholder, but has no functionality as of now.
|
|
32
|
+
*
|
|
33
|
+
* @private
|
|
34
|
+
* @static
|
|
35
|
+
*/
|
|
36
|
+
private static call;
|
|
37
|
+
/**
|
|
38
|
+
* A static property initialized to an empty string, likely intended to hold caller information or be overridden in the future.
|
|
39
|
+
*
|
|
40
|
+
* @private
|
|
41
|
+
* @static
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
private static caller;
|
|
45
|
+
/**
|
|
46
|
+
* A static property initialized to an empty string, likely intended to hold length-related data or be overridden in the future.
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
49
|
+
* @static
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
private static length;
|
|
53
|
+
/**
|
|
54
|
+
* A static property initialized to an empty string, likely intended to hold a name or be overridden in the future.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
* @static
|
|
58
|
+
* @type {string}
|
|
59
|
+
*/
|
|
60
|
+
private static name;
|
|
61
|
+
/**
|
|
62
|
+
* A static method that seems to serve as a placeholder, but has no functionality as of now.
|
|
63
|
+
*
|
|
64
|
+
* @private
|
|
65
|
+
* @static
|
|
66
|
+
*/
|
|
67
|
+
private static toString;
|
|
68
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { StaticUIInterface } from "../types/components/UIInterface";
|
|
2
|
+
import { Label } from "../types/objects/elements/Label";
|
|
3
|
+
import { UI } from "./UI";
|
|
4
|
+
interface LocalizeTextInterface {
|
|
5
|
+
[language: string]: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface SetLocalizeTextInterface {
|
|
10
|
+
[language: string]: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const localizeText: LocalizeTextInterface;
|
|
13
|
+
export declare class LocalizeText {
|
|
14
|
+
key: string;
|
|
15
|
+
constructor(key: string, value: string | SetLocalizeTextInterface);
|
|
16
|
+
createLabel(properties?: Omit<Label, "text">, identifier?: StaticUIInterface): UI<import("..").Types.Label>;
|
|
17
|
+
set(texts: SetLocalizeTextInterface): void;
|
|
18
|
+
get(): string;
|
|
19
|
+
static register(key: string, value: string | SetLocalizeTextInterface): LocalizeText;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Identifier } from "../types/components/Identifier";
|
|
2
|
+
import { ExtendInterface } from "../types/components/UIInterface";
|
|
3
|
+
import { Types } from "../types/enums/Types";
|
|
4
|
+
import { PropertiesType } from "../types/objects/elements/PropertiesType";
|
|
5
|
+
import { OverrideInterface, ModificationInterface, ExtractUIType } from "../types/objects/Modify";
|
|
6
|
+
import { Properties } from "../types/objects/properties/Properties";
|
|
7
|
+
import { Class } from "./Class";
|
|
8
|
+
import { UI } from "./UI";
|
|
9
|
+
export declare class Modify<T extends Types = Types.Any, K extends string = string> extends Class {
|
|
10
|
+
private properties;
|
|
11
|
+
private controls?;
|
|
12
|
+
private bindings?;
|
|
13
|
+
private variables?;
|
|
14
|
+
private isValidPath;
|
|
15
|
+
name: string;
|
|
16
|
+
namespace: string;
|
|
17
|
+
private modifyBindings?;
|
|
18
|
+
private removeModifyBindings?;
|
|
19
|
+
private modifyControls;
|
|
20
|
+
override: OverrideInterface;
|
|
21
|
+
modify: ModificationInterface<K>;
|
|
22
|
+
private constructor();
|
|
23
|
+
getPath(): string;
|
|
24
|
+
getElement(): string;
|
|
25
|
+
extend(identifier?: ExtendInterface, properties?: PropertiesType[ExtractUIType<typeof this>]): UI<this extends UI<infer U extends Types> ? U : this extends Modify<infer U_1 extends Types, string> ? U_1 : this extends string ? never : this extends Identifier ? never : never>;
|
|
26
|
+
getUI(): any;
|
|
27
|
+
addChild<T extends string | UI<any> | Modify<any, any>>(element: T, properties?: PropertiesType[ExtractUIType<typeof element>], elementName?: string): this;
|
|
28
|
+
static register<T extends Types = Types.Any, K extends string = string>(filePath: string, elementPath: string, properties?: Properties): Modify<T, K>;
|
|
29
|
+
static registerWithNamespace<T extends Types = Types.Any, K extends string = string>(filePath: string, elementPath: string, namespace: string, properties?: Properties): Modify<T, K>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UUID } from "../types/objects/Manifest";
|
|
2
|
+
import { Class } from "./Class";
|
|
3
|
+
import { Binding } from "../types/values/Binding";
|
|
4
|
+
export declare class Random extends Class {
|
|
5
|
+
private static namespaces?;
|
|
6
|
+
private static namespaceIndex;
|
|
7
|
+
private static _uiConfig?;
|
|
8
|
+
private static get uiConfig();
|
|
9
|
+
private static get isObfuscate();
|
|
10
|
+
private static _uniqueKey?;
|
|
11
|
+
private static get uniqueKey();
|
|
12
|
+
private static get prefix();
|
|
13
|
+
private static counter;
|
|
14
|
+
static genString(length: number, base?: number): string;
|
|
15
|
+
static getName(length?: number): string;
|
|
16
|
+
static getAnimationName(length?: number): string;
|
|
17
|
+
static getNamespace(): string;
|
|
18
|
+
static getUUID(): UUID;
|
|
19
|
+
static bindingName(): Binding;
|
|
20
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Identifier } from "../types/components/Identifier";
|
|
2
|
+
import { UIChildNameCallback } from "../types/components/NameCallback";
|
|
3
|
+
import { ExtendInterface, StaticUIInterface, UIInterface } from "../types/components/UIInterface";
|
|
4
|
+
import { Renderer } from "../types/enums/Renderer";
|
|
5
|
+
import { Types } from "../types/enums/Types";
|
|
6
|
+
import { BindingInterface } from "../types/objects/BindingInterface";
|
|
7
|
+
import { ButtonMapping } from "../types/objects/ButtonMapping";
|
|
8
|
+
import { Button } from "../types/objects/elements/Button";
|
|
9
|
+
import { CollectionPanel } from "../types/objects/elements/CollectionPanel";
|
|
10
|
+
import { Dropdown } from "../types/objects/elements/Dropdown";
|
|
11
|
+
import { EditBox } from "../types/objects/elements/EditBox";
|
|
12
|
+
import { Grid } from "../types/objects/elements/Grid";
|
|
13
|
+
import { Image } from "../types/objects/elements/Image";
|
|
14
|
+
import { InputPanel } from "../types/objects/elements/InputPanel";
|
|
15
|
+
import { Label } from "../types/objects/elements/Label";
|
|
16
|
+
import { Panel } from "../types/objects/elements/panel";
|
|
17
|
+
import { PropertiesType } from "../types/objects/elements/PropertiesType";
|
|
18
|
+
import { Screen } from "../types/objects/elements/Screen";
|
|
19
|
+
import { ScrollbarBox } from "../types/objects/elements/ScrollbarBox";
|
|
20
|
+
import { ScrollbarTrack } from "../types/objects/elements/ScrollbarTrack";
|
|
21
|
+
import { ScrollView } from "../types/objects/elements/ScrollView";
|
|
22
|
+
import { Slider } from "../types/objects/elements/Slider";
|
|
23
|
+
import { SliderBox } from "../types/objects/elements/SliderBox";
|
|
24
|
+
import { StackPanel } from "../types/objects/elements/StackPanel";
|
|
25
|
+
import { Toggle } from "../types/objects/elements/Toggle";
|
|
26
|
+
import { TooltipTrigger } from "../types/objects/elements/TooltipTrigger";
|
|
27
|
+
import { Specials } from "../types/objects/properties/Specials";
|
|
28
|
+
import { VariablesInterface } from "../types/objects/Variables";
|
|
29
|
+
import { Binding } from "../types/values/Binding";
|
|
30
|
+
import { Animation } from "./Animation";
|
|
31
|
+
import { Modify } from "./Modify";
|
|
32
|
+
type ExtractUIType<T, K extends Types = Types.Any> = T extends UI<infer U> ? U : T extends Modify<infer U> ? U : T extends string ? K : T extends Identifier ? K : never;
|
|
33
|
+
export declare class UI<T extends Types = Types.Any> {
|
|
34
|
+
name?: string;
|
|
35
|
+
namespace?: string;
|
|
36
|
+
extends?: string;
|
|
37
|
+
sourceBindings: Record<string, string>;
|
|
38
|
+
private type?;
|
|
39
|
+
private controls?;
|
|
40
|
+
private bindings?;
|
|
41
|
+
private button_mappings?;
|
|
42
|
+
private variables?;
|
|
43
|
+
private anims?;
|
|
44
|
+
private properties?;
|
|
45
|
+
constructor(identifier: UIInterface | UI | Modify);
|
|
46
|
+
static panel(properties?: Panel, identifier?: StaticUIInterface): UI<Types.Panel>;
|
|
47
|
+
static stackPanel(properties?: StackPanel, identifier?: StaticUIInterface): UI<Types.StackPanel>;
|
|
48
|
+
static collectionPanel(properties?: CollectionPanel, identifier?: StaticUIInterface): UI<Types.CollectionPanel>;
|
|
49
|
+
static inputPanel(properties?: InputPanel, identifier?: StaticUIInterface): UI<Types.InputPanel>;
|
|
50
|
+
static grid(properties?: Grid, identifier?: StaticUIInterface): UI<Types.Grid>;
|
|
51
|
+
static button(properties?: Button, identifier?: StaticUIInterface): UI<Types.Button>;
|
|
52
|
+
static toggle(properties?: Toggle, identifier?: StaticUIInterface): UI<Types.Toggle>;
|
|
53
|
+
static label(properties?: Label, identifier?: StaticUIInterface): UI<Types.Label>;
|
|
54
|
+
static image(properties?: Image, identifier?: StaticUIInterface): UI<Types.Image>;
|
|
55
|
+
static dropdown(properties?: Dropdown, identifier?: StaticUIInterface): UI<Types.Dropdown>;
|
|
56
|
+
static slider(properties?: Slider, identifier?: StaticUIInterface): UI<Types.Slider>;
|
|
57
|
+
static sliderBox(properties?: SliderBox, identifier?: StaticUIInterface): UI<Types.SliderBox>;
|
|
58
|
+
static editBox(properties?: EditBox, identifier?: StaticUIInterface): UI<Types.EditBox>;
|
|
59
|
+
static scrollView(properties?: ScrollView, identifier?: StaticUIInterface): UI<Types.ScrollView>;
|
|
60
|
+
static scrollbarTrack(properties?: ScrollbarTrack, identifier?: StaticUIInterface): UI<Types.ScrollbarTrack>;
|
|
61
|
+
static scrollbarBox(properties?: ScrollbarBox, identifier?: StaticUIInterface): UI<Types.ScrollbarBox>;
|
|
62
|
+
static screen(properties?: Screen, identifier?: StaticUIInterface): UI<Types.Screen>;
|
|
63
|
+
static custom<T extends Renderer>(renderer: T, properties?: Panel | Specials[T], identifier?: StaticUIInterface): UI<Types.Custom>;
|
|
64
|
+
static tooltipTrigger(properties?: TooltipTrigger, identifier?: StaticUIInterface): UI<Types.TooltipTrigger>;
|
|
65
|
+
static extend<K extends Types = Types.Any, T extends string | Identifier | UI | Modify = UI>(extendElement?: T, properties?: PropertiesType[ExtractUIType<typeof extendElement, K>], identifier?: StaticUIInterface): UI<ExtractUIType<T, K>>;
|
|
66
|
+
searchBinding(bindingName: Binding, controlName?: string, targetBindingName?: Binding): Binding | undefined;
|
|
67
|
+
setProperties(properties: PropertiesType[T]): this;
|
|
68
|
+
private isDuplicate;
|
|
69
|
+
private isRecusive;
|
|
70
|
+
addChild<K extends Types = Types.Any, T extends string | Identifier | UI | Modify = any>(element: T, properties?: PropertiesType[ExtractUIType<typeof element, K>] | null | 0, name?: string | null | 0, callback?: UIChildNameCallback): this;
|
|
71
|
+
addBindings(bindings: Array<BindingInterface> | BindingInterface): this;
|
|
72
|
+
addVariables(variables: VariablesInterface): this;
|
|
73
|
+
getUI(): any;
|
|
74
|
+
getPath(): string;
|
|
75
|
+
getElement(): string;
|
|
76
|
+
getFullPath(): string;
|
|
77
|
+
extend(identifier?: ExtendInterface, properties?: PropertiesType[T]): UI<T>;
|
|
78
|
+
addAnimation(animation: Animation, startIndex?: number): this;
|
|
79
|
+
addMapping(mapping: Array<ButtonMapping> | ButtonMapping): this;
|
|
80
|
+
private static apply;
|
|
81
|
+
private static arguments;
|
|
82
|
+
private static bind;
|
|
83
|
+
private static call;
|
|
84
|
+
private static caller;
|
|
85
|
+
private static length;
|
|
86
|
+
private static name;
|
|
87
|
+
private static toString;
|
|
88
|
+
}
|
|
89
|
+
export {};
|