asajs 4.1.5 → 4.1.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.
|
@@ -12,7 +12,7 @@ import { Parser } from "../bindings/Parser.js";
|
|
|
12
12
|
async function buildUI() {
|
|
13
13
|
const build = Memory.build();
|
|
14
14
|
build.set("ui/_ui_defs.json", {
|
|
15
|
-
ui_defs: Array.from(build.keys()),
|
|
15
|
+
ui_defs: Array.from(build.keys(), v => v.replace(/\\/g, "/")),
|
|
16
16
|
});
|
|
17
17
|
if (config.global_variables)
|
|
18
18
|
build.set("ui/_global_variables.json", config.global_variables);
|
|
@@ -166,6 +166,13 @@ export function RandomBindingString(length = 16, base = 32, force) {
|
|
|
166
166
|
else
|
|
167
167
|
return `#${StringID}_binding_${rndStrBind++}`;
|
|
168
168
|
}
|
|
169
|
+
let rndVarBind = 1;
|
|
170
|
+
export function RandomVariableBinding(length = 16, base = 32, force) {
|
|
171
|
+
if (force || allowRandomStringName)
|
|
172
|
+
return `$${GenRandomString(length, base)}`;
|
|
173
|
+
else
|
|
174
|
+
return `$${StringID}_binding_${rndVarBind++}`;
|
|
175
|
+
}
|
|
169
176
|
const rndMap = new Map();
|
|
170
177
|
export function s(input) {
|
|
171
178
|
if (isNotObfuscate)
|
|
@@ -193,6 +200,19 @@ export function bs(input) {
|
|
|
193
200
|
}
|
|
194
201
|
}
|
|
195
202
|
}
|
|
203
|
+
export function vs(input) {
|
|
204
|
+
if (isNotObfuscate)
|
|
205
|
+
return input;
|
|
206
|
+
else {
|
|
207
|
+
if (rndMap.has(input))
|
|
208
|
+
return rndMap.get(input);
|
|
209
|
+
else {
|
|
210
|
+
const ret = RandomVariableBinding();
|
|
211
|
+
rndMap.set(input, ret);
|
|
212
|
+
return ret;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
196
216
|
export function GetItemByAuxID(auxID) {
|
|
197
217
|
const item = ItemAuxID[auxID];
|
|
198
218
|
if (item)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from "../types/enums/Type.js";
|
|
2
|
-
import { Array3, Binding, BindingItem } from "../types/properties/value.js";
|
|
2
|
+
import { Array3, Binding, BindingItem, Variable } from "../types/properties/value.js";
|
|
3
3
|
import { ModifyUI, UI } from "./UI.js";
|
|
4
4
|
import { Renderer } from "../types/enums/Renderer.js";
|
|
5
5
|
import { Properties, CollectionPanel, Grid, Image, InputPanel, Label, Panel, Screen, StackPanel, TooltipTrigger, Button, Toggle, Dropdown, SelectionWheel, EditBox, ScrollbarBox, ScrollbarTrack, ScrollView, Slider, SliderBox } from "../types/properties/components.js";
|
|
@@ -19,8 +19,10 @@ export declare function GenRandomString(length: number, base?: number): string;
|
|
|
19
19
|
export declare function RandomNamespace(): string;
|
|
20
20
|
export declare function RandomString(length: number, base?: number, force?: boolean): string;
|
|
21
21
|
export declare function RandomBindingString(length?: number, base?: number, force?: boolean): Binding;
|
|
22
|
+
export declare function RandomVariableBinding(length?: number, base?: number, force?: boolean): Variable;
|
|
22
23
|
export declare function s(input: string): string;
|
|
23
|
-
export declare function bs(input:
|
|
24
|
+
export declare function bs(input: Binding): Binding;
|
|
25
|
+
export declare function vs(input: Variable): Variable;
|
|
24
26
|
export declare function GetItemByAuxID(auxID: number): string | undefined;
|
|
25
27
|
/**
|
|
26
28
|
* Return format string binding input
|