@amodx/schemas 0.0.21 → 0.0.25
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/Inputs/DefaultInputs.d.ts +2 -1
- package/Inputs/DefaultInputs.js +13 -1
- package/Inputs/registerInput.d.ts +1 -1
- package/Properties.d.ts +1 -0
- package/Properties.js +2 -1
- package/package.json +1 -27
- package/Schema/Node.d.ts +0 -0
- package/Schema/Node.js +0 -1
- package/Schema/Object.d.ts +0 -0
- package/Schema/Object.js +0 -1
- package/Schema/Property.d.ts +0 -0
- package/Schema/Property.js +0 -1
- package/Schema/Schema.d.ts +0 -2
- package/Schema/Schema.js +0 -2
|
@@ -2,6 +2,7 @@ declare const StringInput: import("./registerInput").RegisteredInput<string, imp
|
|
|
2
2
|
min: number;
|
|
3
3
|
max: number;
|
|
4
4
|
}>;
|
|
5
|
+
declare const ButtonInput: import("./registerInput").RegisteredInput<Function, import("./PropertyInput").PropertyInputBaseProperties>;
|
|
5
6
|
declare const HEXColorInput: import("./registerInput").RegisteredInput<string, import("./PropertyInput").PropertyInputBaseProperties>;
|
|
6
7
|
declare const Color3Input: import("./registerInput").RegisteredInput<{
|
|
7
8
|
r: number;
|
|
@@ -45,4 +46,4 @@ declare const SelectInput: import("./registerInput").RegisteredInput<string | nu
|
|
|
45
46
|
mode?: string;
|
|
46
47
|
}>;
|
|
47
48
|
declare const BooleanInput: import("./registerInput").RegisteredInput<boolean, import("./PropertyInput").PropertyInputBaseProperties>;
|
|
48
|
-
export { HEXColorInput as HexColorPropertyInput, Color3Input as Color3PropertyInput, Color4Input as Color4PropertyInput, RangeInput as RangePropertyInput, FloatInput as FloatPropertyInput, Vec2Input as Vec2PropertyInput, Vec3Input as Vec3PropertyInput, IntInput as IntPropertyInput, StringInput as StringPropertyInput, SelectInput as SelectPropertyInput, BooleanInput as BooleanPropertyInput, };
|
|
49
|
+
export { ButtonInput as ButtonPropertyInput, HEXColorInput as HexColorPropertyInput, Color3Input as Color3PropertyInput, Color4Input as Color4PropertyInput, RangeInput as RangePropertyInput, FloatInput as FloatPropertyInput, Vec2Input as Vec2PropertyInput, Vec3Input as Vec3PropertyInput, IntInput as IntPropertyInput, StringInput as StringPropertyInput, SelectInput as SelectPropertyInput, BooleanInput as BooleanPropertyInput, };
|
package/Inputs/DefaultInputs.js
CHANGED
|
@@ -13,6 +13,18 @@ const StringInput = registerInput({
|
|
|
13
13
|
};
|
|
14
14
|
},
|
|
15
15
|
});
|
|
16
|
+
const ButtonInput = registerInput({
|
|
17
|
+
id: "button",
|
|
18
|
+
name: "Button",
|
|
19
|
+
compare(value1, value2) {
|
|
20
|
+
return value1 == value2;
|
|
21
|
+
},
|
|
22
|
+
createProperties(properties) {
|
|
23
|
+
return {
|
|
24
|
+
...properties,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
});
|
|
16
28
|
const HEXColorInput = registerInput({
|
|
17
29
|
id: "hex-color",
|
|
18
30
|
name: "Hex Color",
|
|
@@ -146,4 +158,4 @@ const BooleanInput = registerInput({
|
|
|
146
158
|
};
|
|
147
159
|
},
|
|
148
160
|
});
|
|
149
|
-
export { HEXColorInput as HexColorPropertyInput, Color3Input as Color3PropertyInput, Color4Input as Color4PropertyInput, RangeInput as RangePropertyInput, FloatInput as FloatPropertyInput, Vec2Input as Vec2PropertyInput, Vec3Input as Vec3PropertyInput, IntInput as IntPropertyInput, StringInput as StringPropertyInput, SelectInput as SelectPropertyInput, BooleanInput as BooleanPropertyInput, };
|
|
161
|
+
export { ButtonInput as ButtonPropertyInput, HEXColorInput as HexColorPropertyInput, Color3Input as Color3PropertyInput, Color4Input as Color4PropertyInput, RangeInput as RangePropertyInput, FloatInput as FloatPropertyInput, Vec2Input as Vec2PropertyInput, Vec3Input as Vec3PropertyInput, IntInput as IntPropertyInput, StringInput as StringPropertyInput, SelectInput as SelectPropertyInput, BooleanInput as BooleanPropertyInput, };
|
|
@@ -11,7 +11,7 @@ export type RegisteredInput<Value extends any = any, Properties extends Property
|
|
|
11
11
|
properties: Properties;
|
|
12
12
|
value: Value;
|
|
13
13
|
createPropertyFC(defaultValue: Value): PropertyFC<Value, PropertyInputBase<Value, Properties>>;
|
|
14
|
-
createPropertyRenderFC<RenderedData extends any = any, Props extends
|
|
14
|
+
createPropertyRenderFC<RenderedData extends any = any, Props extends {} = {}>(fc: (props: {
|
|
15
15
|
node: SchemaNode<Value, PropertyInputBase<Value, Properties>>;
|
|
16
16
|
} & Props) => RenderedData): PropertyRenderFC<RenderedData, Value, PropertyInputBase<Value, Properties>, Props>;
|
|
17
17
|
};
|
package/Properties.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const StringProp: PropertyFC<string, import("./Inputs").PropertyI
|
|
|
14
14
|
min: number;
|
|
15
15
|
max: number;
|
|
16
16
|
}>>;
|
|
17
|
+
export declare const ButtonProp: PropertyFC<Function, import("./Inputs").PropertyInputBase<Function, import("./Inputs").PropertyInputBaseProperties>>;
|
|
17
18
|
export declare const FloatProp: PropertyFC<number, import("./Inputs").PropertyInputBase<number, import("./Inputs").PropertyInputBaseProperties & {
|
|
18
19
|
min: number;
|
|
19
20
|
max: number;
|
package/Properties.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color3PropertyInput, Color4PropertyInput, HexColorPropertyInput, FloatPropertyInput, IntPropertyInput, RangePropertyInput, SelectPropertyInput, StringPropertyInput, Vec2PropertyInput, Vec3PropertyInput, BooleanPropertyInput, } from "./Inputs/DefaultInputs";
|
|
1
|
+
import { Color3PropertyInput, Color4PropertyInput, HexColorPropertyInput, FloatPropertyInput, IntPropertyInput, RangePropertyInput, SelectPropertyInput, StringPropertyInput, Vec2PropertyInput, Vec3PropertyInput, BooleanPropertyInput, ButtonPropertyInput, } from "./Inputs/DefaultInputs";
|
|
2
2
|
import { ObjectPath } from "./Properties/ObjectPath";
|
|
3
3
|
import { Property } from "./Properties/Property";
|
|
4
4
|
import { PropertyCondition } from "./Properties/PropertyCondition";
|
|
@@ -28,6 +28,7 @@ export const AnyProp = (id, data = {}) => {
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
export const StringProp = StringPropertyInput.createPropertyFC("");
|
|
31
|
+
export const ButtonProp = ButtonPropertyInput.createPropertyFC(() => { });
|
|
31
32
|
export const FloatProp = FloatPropertyInput.createPropertyFC(0);
|
|
32
33
|
export const IntProp = IntPropertyInput.createPropertyFC(0);
|
|
33
34
|
export const RangeProp = RangePropertyInput.createPropertyFC(0);
|
package/package.json
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@amodx/schemas",
|
|
3
|
-
"version": "0.0.21",
|
|
4
|
-
"module": "index.js",
|
|
5
|
-
"types": "index.d.ts",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"description": "Tool for object schemas.",
|
|
8
|
-
"keywords": [],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cd ./src && npx tsc",
|
|
11
|
-
"compile": "cd ./src && npx tsc --watch"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"url": "git+https://github.com/Amodx/Libraries.git"
|
|
15
|
-
},
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/Amodx/Libraries/issues"
|
|
18
|
-
},
|
|
19
|
-
"homepage": "https://github.com/Amodx/Libraries",
|
|
20
|
-
"author": "Amodx",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"devDependencies": {},
|
|
23
|
-
"main": "index.js",
|
|
24
|
-
"publishConfig": {
|
|
25
|
-
"access": "public"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{"name":"@amodx/schemas","version":"0.0.25","module":"index.js","types":"index.d.ts","type":"module","description":"Tool for object schemas.","keywords":[],"scripts":{"build":"mkdir -p dist && rm -rf dist/* && cp package.json dist/package.json && cd ./src && npx tsc","compile":"cd ./src && npx tsc --watch"},"repository":{"url":"git+https://github.com/Amodx/Libraries.git"},"bugs":{"url":"https://github.com/Amodx/Libraries/issues"},"homepage":"https://github.com/Amodx/Libraries","author":"Amodx","license":"MIT","devDependencies":{},"main":"index.js","publishConfig":{"access":"public"}}
|
package/Schema/Node.d.ts
DELETED
|
File without changes
|
package/Schema/Node.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/Schema/Object.d.ts
DELETED
|
File without changes
|
package/Schema/Object.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/Schema/Property.d.ts
DELETED
|
File without changes
|
package/Schema/Property.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/Schema/Schema.d.ts
DELETED
package/Schema/Schema.js
DELETED