asajs 3.0.5 → 3.0.7
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/.prettierrc +6 -6
- package/LICENSE +674 -674
- package/README.md +72 -72
- package/dist/cjs/compilers/reader/ReadProperties.js +3 -3
- package/dist/cjs/components/Modify.js +22 -4
- package/dist/cjs/components/UI.js +31 -23
- package/dist/cjs/components/Vanilla.js +38110 -38488
- package/dist/cjs/index.js +204 -204
- package/dist/esm/index.js +39516 -39869
- package/dist/types/components/Modify.d.ts +2 -0
- package/dist/types/components/UI.d.ts +5 -5
- package/dist/types/components/Vanilla.d.ts +19320 -19450
- package/dist/types/index.d.ts +102 -102
- package/dist/types/types/objects/Modify.d.ts +4 -0
- package/package.json +48 -48
package/dist/types/index.d.ts
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
1
|
import "./compilers/PreCompile";
|
|
2
2
|
import "./compilers/generator/Template";
|
|
3
3
|
export * from "./compilers/Config";
|
|
4
|
+
export * from "./compilers/BindingCompiler";
|
|
5
|
+
export * from "./compilers/BindingFunctions";
|
|
6
|
+
export * from "./compilers/Compiler";
|
|
7
|
+
export * from "./compilers/Compress";
|
|
8
|
+
export * from "./compilers/Encoder";
|
|
9
|
+
export * from "./compilers/generator/GenerateDir";
|
|
10
|
+
export * from "./compilers/generator/JsonBuilder";
|
|
11
|
+
export * from "./compilers/generator/LangBuilder";
|
|
12
|
+
export * from "./compilers/generator/Log";
|
|
13
|
+
export * from "./compilers/generator/Manifest";
|
|
14
|
+
export * from "./compilers/generator/Save";
|
|
15
|
+
export * from "./compilers/generator/SearchFiles";
|
|
16
|
+
export * from "./compilers/generator/Sounds";
|
|
17
|
+
export * from "./compilers/generator/UIBuilder";
|
|
18
|
+
export * from "./compilers/Installer";
|
|
19
|
+
export * from "./compilers/reader/Audio";
|
|
20
|
+
export * from "./compilers/reader/Color";
|
|
21
|
+
export * from "./compilers/reader/CurrentLine";
|
|
22
|
+
export * from "./compilers/reader/Object";
|
|
23
|
+
export * from "./compilers/reader/ReadBinding";
|
|
24
|
+
export * from "./compilers/reader/ReadProperties";
|
|
4
25
|
export * from "./components/AddCollectionChill";
|
|
5
|
-
export * from "./components/Random";
|
|
6
26
|
export * from "./components/Animation";
|
|
7
|
-
export * from "./components/Modify";
|
|
8
|
-
export * from "./components/Vanilla";
|
|
9
27
|
export * from "./components/AnimationKeyFrame";
|
|
10
|
-
export * from "./components/UI";
|
|
11
28
|
export * from "./components/LocalizeText";
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
29
|
+
export * from "./components/Modify";
|
|
30
|
+
export * from "./components/Random";
|
|
31
|
+
export * from "./components/UI";
|
|
32
|
+
export * from "./components/Vanilla";
|
|
14
33
|
export * from "./types/components/ChildIdentifier";
|
|
15
|
-
export * from "./types/components/
|
|
34
|
+
export * from "./types/components/Identifier";
|
|
16
35
|
export * from "./types/components/NameCallback";
|
|
17
|
-
export * from "./types/
|
|
18
|
-
export * from "./types/
|
|
19
|
-
export * from "./types/enums/
|
|
36
|
+
export * from "./types/components/UIIdentifier";
|
|
37
|
+
export * from "./types/components/UIInterface";
|
|
38
|
+
export * from "./types/enums/Anchor";
|
|
39
|
+
export * from "./types/enums/AnimTypes";
|
|
40
|
+
export * from "./types/enums/BindingCondition";
|
|
41
|
+
export * from "./types/enums/BindingName";
|
|
20
42
|
export * from "./types/enums/BindingType";
|
|
21
|
-
export * from "./types/enums/
|
|
22
|
-
export * from "./types/enums/
|
|
43
|
+
export * from "./types/enums/ClipDirecion";
|
|
44
|
+
export * from "./types/enums/Collection";
|
|
23
45
|
export * from "./types/enums/Direction";
|
|
24
|
-
export * from "./types/enums/
|
|
25
|
-
export * from "./types/enums/
|
|
26
|
-
export * from "./types/enums/Scope";
|
|
46
|
+
export * from "./types/enums/EasingTypes";
|
|
47
|
+
export * from "./types/enums/EnumColor";
|
|
27
48
|
export * from "./types/enums/FocusNavigationMode";
|
|
49
|
+
export * from "./types/enums/FontSize";
|
|
50
|
+
export * from "./types/enums/FontType";
|
|
51
|
+
export * from "./types/enums/InputModeCondition";
|
|
28
52
|
export * from "./types/enums/JsonUIArrayName";
|
|
29
|
-
export * from "./types/enums/
|
|
30
|
-
export * from "./types/enums/
|
|
31
|
-
export * from "./types/enums/EnumColor";
|
|
32
|
-
export * from "./types/enums/BindingCondition";
|
|
33
|
-
export * from "./types/enums/Orientation";
|
|
53
|
+
export * from "./types/enums/MappingFrom";
|
|
54
|
+
export * from "./types/enums/MappingTo";
|
|
34
55
|
export * from "./types/enums/MappingTypes";
|
|
35
|
-
export * from "./types/enums/
|
|
36
|
-
export * from "./types/enums/ClipDirecion";
|
|
37
|
-
export * from "./types/enums/TextureFileSystem";
|
|
56
|
+
export * from "./types/enums/Orientation";
|
|
38
57
|
export * from "./types/enums/Renderer";
|
|
39
|
-
export * from "./types/enums/
|
|
40
|
-
export * from "./types/enums/
|
|
41
|
-
export * from "./types/enums/
|
|
42
|
-
export * from "./types/
|
|
43
|
-
export * from "./types/
|
|
44
|
-
export * from "./types/objects/properties/Sliders";
|
|
45
|
-
export * from "./types/objects/properties/TooltipTriggers";
|
|
46
|
-
export * from "./types/objects/properties/StackPanels";
|
|
47
|
-
export * from "./types/objects/properties/CollectionIndexs";
|
|
48
|
-
export * from "./types/objects/properties/Sounds";
|
|
49
|
-
export * from "./types/objects/properties/Screens";
|
|
50
|
-
export * from "./types/objects/properties/Collections";
|
|
51
|
-
export * from "./types/objects/properties/Inputs";
|
|
52
|
-
export * from "./types/objects/properties/ScrollViews";
|
|
53
|
-
export * from "./types/objects/properties/Focus";
|
|
54
|
-
export * from "./types/objects/properties/Properties";
|
|
55
|
-
export * from "./types/objects/properties/SelectionWheels";
|
|
56
|
-
export * from "./types/objects/properties/Texts";
|
|
57
|
-
export * from "./types/objects/properties/Grids";
|
|
58
|
-
export * from "./types/objects/properties/Specials";
|
|
59
|
-
export * from "./types/objects/properties/FocusContainerCustom";
|
|
60
|
-
export * from "./types/objects/properties/TTS";
|
|
61
|
-
export * from "./types/objects/properties/Renderers";
|
|
62
|
-
export * from "./types/objects/properties/SliderBoxs";
|
|
63
|
-
export * from "./types/objects/properties/Sprites";
|
|
64
|
-
export * from "./types/objects/properties/Layouts";
|
|
65
|
-
export * from "./types/objects/properties/Variables";
|
|
66
|
-
export * from "./types/objects/properties/Buttons";
|
|
67
|
-
export * from "./types/objects/properties/Toggles";
|
|
68
|
-
export * from "./types/objects/properties/Controls";
|
|
69
|
-
export * from "./types/objects/properties/Dropdowns";
|
|
70
|
-
export * from "./types/objects/properties/TextEdits";
|
|
58
|
+
export * from "./types/enums/Rotation";
|
|
59
|
+
export * from "./types/enums/Scope";
|
|
60
|
+
export * from "./types/enums/TextTypes";
|
|
61
|
+
export * from "./types/enums/TextureFileSystem";
|
|
62
|
+
export * from "./types/enums/Types";
|
|
71
63
|
export * from "./types/objects/Animation";
|
|
72
|
-
export * from "./types/objects/
|
|
73
|
-
export * from "./types/objects/ButtonMapping";
|
|
64
|
+
export * from "./types/objects/BindingHook";
|
|
74
65
|
export * from "./types/objects/BindingInterface";
|
|
75
|
-
export * from "./types/objects/
|
|
66
|
+
export * from "./types/objects/ButtonMapping";
|
|
67
|
+
export * from "./types/objects/elements/Button";
|
|
68
|
+
export * from "./types/objects/elements/CollectionPanel";
|
|
69
|
+
export * from "./types/objects/elements/Custom";
|
|
70
|
+
export * from "./types/objects/elements/Dropdown";
|
|
76
71
|
export * from "./types/objects/elements/EditBox";
|
|
77
72
|
export * from "./types/objects/elements/Grid";
|
|
78
|
-
export * from "./types/objects/elements/
|
|
79
|
-
export * from "./types/objects/elements/TooltipTrigger";
|
|
80
|
-
export * from "./types/objects/elements/Slider";
|
|
81
|
-
export * from "./types/objects/elements/PropertiesType";
|
|
82
|
-
export * from "./types/objects/elements/Button";
|
|
73
|
+
export * from "./types/objects/elements/Image";
|
|
83
74
|
export * from "./types/objects/elements/InputPanel";
|
|
84
|
-
export * from "./types/objects/elements/
|
|
85
|
-
export * from "./types/objects/elements/StackPanel";
|
|
75
|
+
export * from "./types/objects/elements/Label";
|
|
86
76
|
export * from "./types/objects/elements/panel";
|
|
77
|
+
export * from "./types/objects/elements/PropertiesType";
|
|
78
|
+
export * from "./types/objects/elements/Screen";
|
|
79
|
+
export * from "./types/objects/elements/ScrollbarBox";
|
|
87
80
|
export * from "./types/objects/elements/ScrollbarTrack";
|
|
81
|
+
export * from "./types/objects/elements/ScrollView";
|
|
88
82
|
export * from "./types/objects/elements/SelectionWheel";
|
|
83
|
+
export * from "./types/objects/elements/Slider";
|
|
89
84
|
export * from "./types/objects/elements/SliderBox";
|
|
85
|
+
export * from "./types/objects/elements/StackPanel";
|
|
90
86
|
export * from "./types/objects/elements/Toggle";
|
|
91
|
-
export * from "./types/objects/elements/
|
|
92
|
-
export * from "./types/objects/
|
|
93
|
-
export * from "./types/objects/
|
|
94
|
-
export * from "./types/objects/
|
|
95
|
-
export * from "./types/objects/
|
|
87
|
+
export * from "./types/objects/elements/TooltipTrigger";
|
|
88
|
+
export * from "./types/objects/Factory";
|
|
89
|
+
export * from "./types/objects/Installer";
|
|
90
|
+
export * from "./types/objects/Manifest";
|
|
91
|
+
export * from "./types/objects/Modify";
|
|
92
|
+
export * from "./types/objects/properties/Buttons";
|
|
93
|
+
export * from "./types/objects/properties/CollectionIndexs";
|
|
94
|
+
export * from "./types/objects/properties/Collections";
|
|
95
|
+
export * from "./types/objects/properties/Controls";
|
|
96
|
+
export * from "./types/objects/properties/Dropdowns";
|
|
97
|
+
export * from "./types/objects/properties/Focus";
|
|
98
|
+
export * from "./types/objects/properties/FocusContainerCustom";
|
|
99
|
+
export * from "./types/objects/properties/Grids";
|
|
100
|
+
export * from "./types/objects/properties/Inputs";
|
|
101
|
+
export * from "./types/objects/properties/Layouts";
|
|
102
|
+
export * from "./types/objects/properties/Properties";
|
|
103
|
+
export * from "./types/objects/properties/Renderers";
|
|
104
|
+
export * from "./types/objects/properties/Screens";
|
|
105
|
+
export * from "./types/objects/properties/ScrollViews";
|
|
106
|
+
export * from "./types/objects/properties/SelectionWheels";
|
|
107
|
+
export * from "./types/objects/properties/SliderBoxs";
|
|
108
|
+
export * from "./types/objects/properties/Sliders";
|
|
109
|
+
export * from "./types/objects/properties/Sounds";
|
|
110
|
+
export * from "./types/objects/properties/Specials";
|
|
111
|
+
export * from "./types/objects/properties/Sprites";
|
|
112
|
+
export * from "./types/objects/properties/StackPanels";
|
|
113
|
+
export * from "./types/objects/properties/TextEdits";
|
|
114
|
+
export * from "./types/objects/properties/Texts";
|
|
115
|
+
export * from "./types/objects/properties/Toggles";
|
|
116
|
+
export * from "./types/objects/properties/TooltipTriggers";
|
|
117
|
+
export * from "./types/objects/properties/TTS";
|
|
118
|
+
export * from "./types/objects/properties/Variables";
|
|
96
119
|
export * from "./types/objects/PropertyBag";
|
|
97
|
-
export * from "./types/objects/Variables";
|
|
98
120
|
export * from "./types/objects/Sound";
|
|
99
|
-
export * from "./types/objects/
|
|
100
|
-
export * from "./types/
|
|
101
|
-
export * from "./types/values/Number";
|
|
121
|
+
export * from "./types/objects/Variables";
|
|
122
|
+
export * from "./types/values/Any";
|
|
102
123
|
export * from "./types/values/Binding";
|
|
103
|
-
export * from "./types/values/TargetElementPath";
|
|
104
|
-
export * from "./types/values/Variable";
|
|
105
|
-
export * from "./types/values/Hex";
|
|
106
|
-
export * from "./types/values/Str";
|
|
107
|
-
export * from "./types/values/ElementPath";
|
|
108
|
-
export * from "./types/values/ColorVector";
|
|
109
124
|
export * from "./types/values/Bool";
|
|
125
|
+
export * from "./types/values/ColorVector";
|
|
126
|
+
export * from "./types/values/ElementPath";
|
|
127
|
+
export * from "./types/values/Hex";
|
|
128
|
+
export * from "./types/values/Number";
|
|
110
129
|
export * from "./types/values/RangeVector";
|
|
111
|
-
export * from "./types/values/
|
|
130
|
+
export * from "./types/values/Str";
|
|
112
131
|
export * from "./types/values/StringVector";
|
|
132
|
+
export * from "./types/values/TargetElementPath";
|
|
133
|
+
export * from "./types/values/Variable";
|
|
113
134
|
export * from "./types/values/Vector";
|
|
114
|
-
export * from "./compilers/reader/ReadProperties";
|
|
115
|
-
export * from "./compilers/reader/CurrentLine";
|
|
116
|
-
export * from "./compilers/reader/ReadBinding";
|
|
117
|
-
export * from "./compilers/reader/Object";
|
|
118
|
-
export * from "./compilers/reader/Color";
|
|
119
|
-
export * from "./compilers/reader/Audio";
|
|
120
|
-
export * from "./compilers/BindingCompiler";
|
|
121
|
-
export * from "./compilers/Compiler";
|
|
122
|
-
export * from "./compilers/BindingFunctions";
|
|
123
|
-
export * from "./compilers/Compress";
|
|
124
|
-
export * from "./compilers/Encoder";
|
|
125
|
-
export * from "./compilers/Installer";
|
|
126
|
-
export * from "./compilers/generator/Manifest";
|
|
127
|
-
export * from "./compilers/generator/Sounds";
|
|
128
|
-
export * from "./compilers/generator/GenerateDir";
|
|
129
|
-
export * from "./compilers/generator/Save";
|
|
130
|
-
export * from "./compilers/generator/LangBuilder";
|
|
131
|
-
export * from "./compilers/generator/UIBuilder";
|
|
132
|
-
export * from "./compilers/generator/Log";
|
|
133
|
-
export * from "./compilers/generator/JsonBuilder";
|
|
134
|
-
export * from "./compilers/generator/SearchFiles";
|
|
135
135
|
export * from "./compilers/reader/Env";
|
|
136
136
|
export * from "./compilers/reader/GlobalVariables";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Animation } from "../../components/Animation";
|
|
1
2
|
import { Modify } from "../../components/Modify";
|
|
2
3
|
import { UI } from "../../components/UI";
|
|
3
4
|
import { ChildElement } from "../components/ChildIdentifier";
|
|
@@ -7,6 +8,7 @@ import { Types } from "../enums/Types";
|
|
|
7
8
|
import { Binding } from "../values/Binding";
|
|
8
9
|
import { Var } from "../values/Variable";
|
|
9
10
|
import { BindingInterface } from "./BindingInterface";
|
|
11
|
+
import { ButtonMapping } from "./ButtonMapping";
|
|
10
12
|
import { PropertiesType } from "./elements/PropertiesType";
|
|
11
13
|
import { VariablesInterface } from "./Variables";
|
|
12
14
|
export type ExtractUIType<T> = T extends UI<infer U> ? U : T extends Modify<infer U> ? U : never;
|
|
@@ -14,7 +16,9 @@ export interface OverrideInterface {
|
|
|
14
16
|
setProperties(properties: PropertiesType[Types]): OverrideInterface;
|
|
15
17
|
addChild<T extends string | UI<any>>(element?: T, properties?: PropertiesType[ExtractUIType<typeof element>], name?: string | null, callback?: UIChildNameCallback): OverrideInterface;
|
|
16
18
|
addBindings(binding?: BindingInterface | Binding | Var | Array<BindingInterface | Binding | Var>): OverrideInterface;
|
|
19
|
+
addMapping(mapping?: Array<ButtonMapping> | ButtonMapping): OverrideInterface;
|
|
17
20
|
addVariables(variables?: VariablesInterface): OverrideInterface;
|
|
21
|
+
addAnimation(animation?: Animation, startIndex?: number): OverrideInterface;
|
|
18
22
|
searchBinding(bindingName: BindingName, controlName: string): any;
|
|
19
23
|
sourceBindings: Record<string, string>;
|
|
20
24
|
}
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"devDependencies": {
|
|
3
|
-
"@types/adm-zip": "^0.5.7",
|
|
4
|
-
"@types/fs-extra": "^11.0.4",
|
|
5
|
-
"@types/node": "^22.10.5",
|
|
6
|
-
"debounce-fn": "^6.0.0",
|
|
7
|
-
"esbuild": "^0.25.0",
|
|
8
|
-
"tiny-glob": "^0.2.9",
|
|
9
|
-
"typescript": "^5.7.3"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"adm-zip": "^0.5.16",
|
|
13
|
-
"jsonc-parser": "^3.3.1"
|
|
14
|
-
},
|
|
15
|
-
"name": "asajs",
|
|
16
|
-
"version": "3.0.
|
|
17
|
-
"description": "Make your Minecraft JsonUI with ScriptingAPI",
|
|
18
|
-
"main": "./dist/cjs/index.js",
|
|
19
|
-
"module": "./dist/esm/index.js",
|
|
20
|
-
"types": "./dist/types/index.d.ts",
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "bun run ./scripts/build.ts --types",
|
|
23
|
-
"dev": "bun run ./scripts/build.ts --watch --sourcemap",
|
|
24
|
-
"ui-pull": "bun scripts/scanner/scan.ts",
|
|
25
|
-
"ui-build": "bun scripts/scanner/index.ts",
|
|
26
|
-
"import": "bun scripts/index.js",
|
|
27
|
-
"items": "bun scripts/items.js",
|
|
28
|
-
"stable": "yarn run ui-pull && yarn run ui-build && yarn run import && yarn run build",
|
|
29
|
-
"preview": "yarn run stable --preview"
|
|
30
|
-
},
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "git+https://github.com/asakiyuki/asajs.git"
|
|
34
|
-
},
|
|
35
|
-
"keywords": [
|
|
36
|
-
"Minecraft",
|
|
37
|
-
"JsonUI"
|
|
38
|
-
],
|
|
39
|
-
"author": "AsakiYuki",
|
|
40
|
-
"contributors": [
|
|
41
|
-
"NguyenDuck"
|
|
42
|
-
],
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://github.com/asakiyuki/asajs/issues"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://github.com/asakiyuki/asajs#readme"
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"devDependencies": {
|
|
3
|
+
"@types/adm-zip": "^0.5.7",
|
|
4
|
+
"@types/fs-extra": "^11.0.4",
|
|
5
|
+
"@types/node": "^22.10.5",
|
|
6
|
+
"debounce-fn": "^6.0.0",
|
|
7
|
+
"esbuild": "^0.25.0",
|
|
8
|
+
"tiny-glob": "^0.2.9",
|
|
9
|
+
"typescript": "^5.7.3"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"adm-zip": "^0.5.16",
|
|
13
|
+
"jsonc-parser": "^3.3.1"
|
|
14
|
+
},
|
|
15
|
+
"name": "asajs",
|
|
16
|
+
"version": "3.0.7",
|
|
17
|
+
"description": "Make your Minecraft JsonUI with ScriptingAPI",
|
|
18
|
+
"main": "./dist/cjs/index.js",
|
|
19
|
+
"module": "./dist/esm/index.js",
|
|
20
|
+
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "bun run ./scripts/build.ts --types",
|
|
23
|
+
"dev": "bun run ./scripts/build.ts --watch --sourcemap",
|
|
24
|
+
"ui-pull": "bun scripts/scanner/scan.ts",
|
|
25
|
+
"ui-build": "bun scripts/scanner/index.ts",
|
|
26
|
+
"import": "bun scripts/index.js",
|
|
27
|
+
"items": "bun scripts/items.js",
|
|
28
|
+
"stable": "yarn run ui-pull && yarn run ui-build && yarn run import && yarn run build",
|
|
29
|
+
"preview": "yarn run stable --preview"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/asakiyuki/asajs.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"Minecraft",
|
|
37
|
+
"JsonUI"
|
|
38
|
+
],
|
|
39
|
+
"author": "AsakiYuki",
|
|
40
|
+
"contributors": [
|
|
41
|
+
"NguyenDuck"
|
|
42
|
+
],
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/asakiyuki/asajs/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/asakiyuki/asajs#readme"
|
|
48
|
+
}
|