@arcanejs/protocol 0.2.0 → 0.3.0
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/index.d.ts +19 -0
- package/package.json +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,16 @@ import { GroupComponentStyle } from './styles';
|
|
|
3
3
|
type BaseComponent = {
|
|
4
4
|
key: number;
|
|
5
5
|
};
|
|
6
|
+
export type Gradient = Array<{
|
|
7
|
+
/**
|
|
8
|
+
* CSS color value
|
|
9
|
+
*/
|
|
10
|
+
color: string;
|
|
11
|
+
/**
|
|
12
|
+
* Position of the color in the gradient, between 0 and 1
|
|
13
|
+
*/
|
|
14
|
+
position: number;
|
|
15
|
+
}>;
|
|
6
16
|
export type ButtonComponent = BaseComponent & {
|
|
7
17
|
component: 'button';
|
|
8
18
|
text: string;
|
|
@@ -43,6 +53,10 @@ export type LabelComponent = BaseComponent & {
|
|
|
43
53
|
export type RectComponent = BaseComponent & {
|
|
44
54
|
component: 'rect';
|
|
45
55
|
color: string;
|
|
56
|
+
/**
|
|
57
|
+
* Set to true if the component should increase its size to fill the available space.
|
|
58
|
+
*/
|
|
59
|
+
grow?: boolean;
|
|
46
60
|
};
|
|
47
61
|
export type SliderButtonComponent = BaseComponent & {
|
|
48
62
|
component: 'slider_button';
|
|
@@ -50,6 +64,11 @@ export type SliderButtonComponent = BaseComponent & {
|
|
|
50
64
|
max: number;
|
|
51
65
|
step: number;
|
|
52
66
|
value: number | null;
|
|
67
|
+
gradient?: Gradient;
|
|
68
|
+
/**
|
|
69
|
+
* Set to true if the component should increase its size to fill the available space.
|
|
70
|
+
*/
|
|
71
|
+
grow?: boolean;
|
|
53
72
|
};
|
|
54
73
|
export type SwitchComponent = BaseComponent & {
|
|
55
74
|
component: 'switch';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanejs/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The JSON protocol types for the @arcanejs Toolkit",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,11 +24,13 @@
|
|
|
24
24
|
"./styles": {
|
|
25
25
|
"@arcanejs/source": "./src/styles.ts",
|
|
26
26
|
"types": "./dist/styles.d.ts"
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/eslint": "^8.56.5",
|
|
31
32
|
"@types/jest": "^29.5.12",
|
|
33
|
+
"check-export-map": "^1.3.1",
|
|
32
34
|
"eslint": "^8.57.0",
|
|
33
35
|
"typescript": "^5.3.3",
|
|
34
36
|
"@arcanejs/diff": "^0.4.0",
|
|
@@ -43,6 +45,6 @@
|
|
|
43
45
|
},
|
|
44
46
|
"scripts": {
|
|
45
47
|
"lint": "eslint . --max-warnings 0",
|
|
46
|
-
"build": "rm -rf dist && tsc"
|
|
48
|
+
"build": "rm -rf dist && tsc && check-export-map"
|
|
47
49
|
}
|
|
48
50
|
}
|