asajs 4.0.0-indev-1 → 4.0.0-indev-3
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 +26 -0
- package/dist/js/compilers/Configuration.js +20 -1
- package/dist/js/compilers/Memory.js +1 -3
- package/dist/js/compilers/bindings/Checker.js +9 -0
- package/dist/js/compilers/bindings/Function.js +71 -0
- package/dist/js/compilers/bindings/Funtion.js +30 -6
- package/dist/js/compilers/bindings/Lexer.js +49 -6
- package/dist/js/compilers/bindings/Parser.js +152 -12
- package/dist/js/compilers/ui/buildcache.js +53 -0
- package/dist/js/compilers/ui/builddata.js +4 -0
- package/dist/js/compilers/ui/builder.js +30 -9
- package/dist/js/compilers/ui/installer.js +15 -1
- package/dist/js/compilers/ui/linker.js +43 -1
- package/dist/js/compilers/ui/manifest.js +25 -1
- package/dist/js/compilers/ui/prevdata.js +8 -0
- package/dist/js/components/AnimationKeyframe.js +1 -1
- package/dist/js/components/UI.js +25 -13
- package/dist/js/components/Utils.js +100 -23
- package/dist/js/config..js +1 -0
- package/dist/js/config.js +1 -0
- package/dist/js/index.js +4 -0
- package/dist/js/types/config.js +1 -0
- package/dist/types/compilers/Configuration.d.ts +5 -1
- package/dist/types/compilers/bindings/Checker.d.ts +3 -0
- package/dist/types/compilers/bindings/Function.d.ts +7 -0
- package/dist/types/compilers/bindings/Funtion.d.ts +1 -1
- package/dist/types/compilers/bindings/Parser.d.ts +12 -3
- package/dist/types/compilers/ui/buildcache.d.ts +8 -0
- package/dist/types/compilers/ui/builddata.d.ts +1 -0
- package/dist/types/compilers/ui/installer.d.ts +1 -1
- package/dist/types/compilers/ui/linker.d.ts +4 -0
- package/dist/types/compilers/ui/manifest.d.ts +1 -1
- package/dist/types/compilers/ui/prevdata.d.ts +3 -0
- package/dist/types/components/AnimationKeyframe.d.ts +4 -4
- package/dist/types/components/UI.d.ts +9 -2
- package/dist/types/components/Utils.d.ts +17 -16
- package/dist/types/config..d.ts +2 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/types/config.d.ts +13 -0
- package/dist/types/types/enums/index.d.ts +0 -1
- package/package.json +1 -1
- package/resources/asajs.config.cjs +14 -0
|
@@ -11,7 +11,7 @@ import { Animation } from "./Animation.js";
|
|
|
11
11
|
import { SmartAnimation } from "../types/enums/SmartAnimation.js";
|
|
12
12
|
type CompileBinding = `[${string}]`;
|
|
13
13
|
export declare function Color(hex: string | number): Array3<number>;
|
|
14
|
-
export declare function ResolveBinding(...bindings: BindingItem[]): BindingItem[];
|
|
14
|
+
export declare function ResolveBinding(cache: Map<string, unknown>, ...bindings: BindingItem[]): BindingItem[];
|
|
15
15
|
export declare function RandomString(length: number, base?: number): string;
|
|
16
16
|
export declare function RandomBindingString(length: number, base?: number): Binding;
|
|
17
17
|
export declare function GetItemByAuxID(auxID: number): string | undefined;
|
|
@@ -49,22 +49,23 @@ export declare function ScrollView(properties?: ScrollView, namespace?: string,
|
|
|
49
49
|
export declare function Slider(properties?: Slider, namespace?: string, name?: string): UI<Type.SLIDER, null>;
|
|
50
50
|
export declare function SliderBox(properties?: SliderBox, namespace?: string, name?: string): UI<Type.SLIDER_BOX, null>;
|
|
51
51
|
export declare function ExtendsOf<T extends Type, K extends Renderer | null>(element: UI<T, K>, properties?: Properties<T, K>, namespace?: string, name?: string): typeof element;
|
|
52
|
-
export declare function
|
|
53
|
-
export declare function
|
|
54
|
-
export declare function
|
|
55
|
-
export declare function
|
|
56
|
-
export declare function
|
|
57
|
-
export declare function
|
|
58
|
-
export declare function
|
|
59
|
-
export declare function
|
|
60
|
-
export declare function
|
|
52
|
+
export declare function VanillaExtendsOf<T extends Namespace, K extends Exclude<Element<T>, `${string}/${string}`>>(originNamespace: T, originName: K, properties?: Properties<VanillaType<T, K>, null>, namespace?: string, name?: string): UI<VanillaType<T, K>, null>;
|
|
53
|
+
export declare function OffsetKeyframe(properties?: KeyframeAnimationProperties<AnimType.OFFSET>, namespace?: string, name?: string): AnimationKeyframe<AnimType.OFFSET>;
|
|
54
|
+
export declare function SizeKeyframe(properties?: KeyframeAnimationProperties<AnimType.SIZE>, namespace?: string, name?: string): AnimationKeyframe<AnimType.SIZE>;
|
|
55
|
+
export declare function UVKeyframe(properties?: KeyframeAnimationProperties<AnimType.UV>, namespace?: string, name?: string): AnimationKeyframe<AnimType.UV>;
|
|
56
|
+
export declare function ClipKeyframe(properties?: KeyframeAnimationProperties<AnimType.CLIP>, namespace?: string, name?: string): AnimationKeyframe<AnimType.CLIP>;
|
|
57
|
+
export declare function ColorKeyframe(properties?: KeyframeAnimationProperties<AnimType.COLOR>, namespace?: string, name?: string): AnimationKeyframe<AnimType.COLOR>;
|
|
58
|
+
export declare function AlphaKeyframe(properties?: KeyframeAnimationProperties<AnimType.ALPHA>, namespace?: string, name?: string): AnimationKeyframe<AnimType.ALPHA>;
|
|
59
|
+
export declare function WaitKeyframe(properties?: KeyframeAnimationProperties<AnimType.WAIT>, namespace?: string, name?: string): AnimationKeyframe<AnimType.WAIT>;
|
|
60
|
+
export declare function FlipBookKeyframe(properties?: KeyframeAnimationProperties<AnimType.FLIP_BOOK>, namespace?: string, name?: string): AnimationKeyframe<AnimType.FLIP_BOOK>;
|
|
61
|
+
export declare function AsepriteFlipBookKeyframe(properties?: KeyframeAnimationProperties<AnimType.ASEPRITE_FLIP_BOOK>, namespace?: string, name?: string): AnimationKeyframe<AnimType.ASEPRITE_FLIP_BOOK>;
|
|
61
62
|
type Anim<T extends AnimType> = AnimationProperties<T> | number;
|
|
62
63
|
type AnimWithSmartAnim<T extends AnimType> = [SmartAnimation | Anim<T>, ...Anim<T>[]];
|
|
63
|
-
export declare function
|
|
64
|
-
export declare function
|
|
65
|
-
export declare function
|
|
66
|
-
export declare function
|
|
67
|
-
export declare function
|
|
68
|
-
export declare function
|
|
64
|
+
export declare function OffsetAnimation(...keyframes: AnimWithSmartAnim<AnimType.OFFSET>): Animation<AnimType.OFFSET>;
|
|
65
|
+
export declare function SizeAnimation(...keyframes: AnimWithSmartAnim<AnimType.SIZE>): Animation<AnimType.SIZE>;
|
|
66
|
+
export declare function UVAnimation(...keyframes: AnimWithSmartAnim<AnimType.UV>): Animation<AnimType.UV>;
|
|
67
|
+
export declare function ClipAnimation(...keyframes: AnimWithSmartAnim<AnimType.CLIP>): Animation<AnimType.CLIP>;
|
|
68
|
+
export declare function ColorAnimation(...keyframes: AnimWithSmartAnim<AnimType.COLOR>): Animation<AnimType.COLOR>;
|
|
69
|
+
export declare function AlphaAnimation(...keyframes: AnimWithSmartAnim<AnimType.ALPHA>): Animation<AnimType.ALPHA>;
|
|
69
70
|
export declare function AnimationExtendsOf<T extends AnimType>(animation: AnimationKeyframe<T> | Animation<T>, properties?: AnimationProperties<T>): AnimationKeyframe<T>;
|
|
70
71
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Variable } from "./src/types/properties/value.js";
|
|
2
|
+
export interface Config {
|
|
3
|
+
compiler?: {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
linked?: boolean;
|
|
6
|
+
};
|
|
7
|
+
packinfo?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
version?: [number, number, number];
|
|
11
|
+
};
|
|
12
|
+
global_variables?: Record<Variable, string>;
|
|
13
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import "./compilers/Configuration.js";
|
|
1
2
|
import "./compilers/PreCompile.js";
|
|
2
3
|
import "./compilers/ui/builder.js";
|
|
4
|
+
import "./compilers/ui/installer.js";
|
|
3
5
|
export { Animation } from "./components/Animation.js";
|
|
4
6
|
export { AnimationKeyframe } from "./components/AnimationKeyframe.js";
|
|
5
7
|
export { ModifyUI, UI } from "./components/UI.js";
|
|
@@ -7,3 +9,5 @@ export * from "./components/Utils.js";
|
|
|
7
9
|
export * from "./types/enums/index.js";
|
|
8
10
|
export * as Properties from "./types/properties/index.js";
|
|
9
11
|
export { ItemAuxID } from "./types/enums/Items.js";
|
|
12
|
+
export { ArrayName, Operation } from "./types/properties/index.js";
|
|
13
|
+
export { Lexer } from "./compilers/bindings/Lexer.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Variable } from "./properties/value.js";
|
|
2
|
+
export interface Config {
|
|
3
|
+
compiler?: {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
linked?: boolean;
|
|
6
|
+
};
|
|
7
|
+
packinfo?: {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
version?: [number, number, number];
|
|
11
|
+
};
|
|
12
|
+
global_variables?: Record<Variable, string>;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
},
|
|
10
|
+
compiler: {
|
|
11
|
+
enabled: true,
|
|
12
|
+
linked: false,
|
|
13
|
+
},
|
|
14
|
+
}
|