bloxd.io.d.ts 1.0.1 → 1.1.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/api-type-def/normal/index.d.ts +3 -1
- package/api-type-def/normal/message/broadcastMessage.d.ts +18 -0
- package/api-type-def/normal/message/index.d.ts +6 -0
- package/api-type-def/normal/message/sendFlyingMiddleMessage.d.ts +22 -0
- package/api-type-def/normal/message/sendMessage.d.ts +28 -0
- package/package.json +28 -28
- package/type/color/StringColor.d.ts +179 -0
- package/type/color/index.d.ts +1 -0
- package/type/index.d.ts +1 -0
- package/type/message/CustomTextStyling.d.ts +9 -0
- package/type/message/EntityName.d.ts +9 -0
- package/type/message/StyledIcon.d.ts +11 -0
- package/type/message/StyledText.d.ts +7 -0
- package/type/message/TextStyle.d.ts +9 -0
- package/type/message/TranslatedText.d.ts +6 -0
- package/type/message/index.d.ts +6 -0
|
@@ -10,6 +10,7 @@ import { PositionApis } from "./positions";
|
|
|
10
10
|
import { StandingOnApis } from "./standingOns";
|
|
11
11
|
import { HealthApis } from "./health";
|
|
12
12
|
import { KillstreakApis } from "./killstreak";
|
|
13
|
+
import { MessageApis } from "./message";
|
|
13
14
|
import { MargeObject } from "../../type";
|
|
14
15
|
|
|
15
16
|
type AllNormalApiIntersection = PositionApis &
|
|
@@ -23,6 +24,7 @@ type AllNormalApiIntersection = PositionApis &
|
|
|
23
24
|
ShopApis &
|
|
24
25
|
ShieldApis &
|
|
25
26
|
HealthApis &
|
|
26
|
-
KillstreakApis
|
|
27
|
+
KillstreakApis &
|
|
28
|
+
MessageApis;
|
|
27
29
|
|
|
28
30
|
export type NormalApi = MargeObject<AllNormalApiIntersection>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CustomTextStyling } from "../../../type/message";
|
|
2
|
+
|
|
3
|
+
interface BroadcastMessageInterface {
|
|
4
|
+
/**
|
|
5
|
+
* Send a message to everyone
|
|
6
|
+
*
|
|
7
|
+
* @param {string | CustomTextStyling} message - The text contained within the message. Can use `Custom Text Styling`.
|
|
8
|
+
* @param { { fontWeight?: number | string; color?: string } } [style] - An optional style argument. Can contain values for fontWeight and color of the message.
|
|
9
|
+
* style is ignored if message uses custom text styling (i.e. is not a string).
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
broadcastMessage(
|
|
13
|
+
message: string | CustomTextStyling,
|
|
14
|
+
style?: { fontWeight?: number | string; color?: string },
|
|
15
|
+
): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default BroadcastMessageInterface;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BroadcastMessageInterface from "./broadcastMessage";
|
|
2
|
+
import SendMessageInterface from "./sendMessage";
|
|
3
|
+
import SendFlyingMiddleMessage from "./sendFlyingMiddleMessage";
|
|
4
|
+
export type MessageApis = BroadcastMessageInterface &
|
|
5
|
+
SendMessageInterface &
|
|
6
|
+
SendFlyingMiddleMessage;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CustomTextStyling, PlayerId } from "../../../type";
|
|
2
|
+
|
|
3
|
+
interface SendFlyingMiddleMessage {
|
|
4
|
+
/**
|
|
5
|
+
* Send a flying middle message to a specific player
|
|
6
|
+
*
|
|
7
|
+
* @param {PlayerId} playerId - Id of the player
|
|
8
|
+
* @param {string | CustomTextStyling} message - The text contained within the message. Can be either a string or use `Custom Text Styling`.
|
|
9
|
+
* @param {number} distanceFromAction - The distance from the action that has caused this message to be displayed,
|
|
10
|
+
* this value will be used to determine how the message flies across the screen.
|
|
11
|
+
* @param {number} [lifetimeMs] - How long the message will be visible in milliseconds. Defaults to 1000ms.
|
|
12
|
+
* @returns {void}
|
|
13
|
+
*/
|
|
14
|
+
sendFlyingMiddleMessage(
|
|
15
|
+
playerId: PlayerId,
|
|
16
|
+
message: string | CustomTextStyling,
|
|
17
|
+
distanceFromAction?: number,
|
|
18
|
+
lifetimeMs?: number,
|
|
19
|
+
): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default SendFlyingMiddleMessage;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PlayerId, CustomTextStyling } from "../../../type";
|
|
2
|
+
|
|
3
|
+
interface SendMessageInterface {
|
|
4
|
+
/**
|
|
5
|
+
* Send a message to a specific player
|
|
6
|
+
*
|
|
7
|
+
* @param {PlayerId} playerId - Id of the player
|
|
8
|
+
* @param {string} message - The text contained within the message.
|
|
9
|
+
* @param { { fontWeight?: number | string; color?: string } } [style] - An optional style argument. Can contain values for fontWeight and color of the message.
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
sendMessage(
|
|
13
|
+
playerId: PlayerId,
|
|
14
|
+
message: string,
|
|
15
|
+
style: { fontWeight?: number | string; color?: string },
|
|
16
|
+
): void;
|
|
17
|
+
/**
|
|
18
|
+
* Send a message to a specific player
|
|
19
|
+
*
|
|
20
|
+
* @param {PlayerId} playerId - Id of the player
|
|
21
|
+
* @param {CustomTextStyling} message - The text contained within the message.
|
|
22
|
+
*
|
|
23
|
+
* @returns {void}
|
|
24
|
+
*/
|
|
25
|
+
sendMessage(playerId: PlayerId, message: CustomTextStyling): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default SendMessageInterface;
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bloxd.io.d.ts",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "yo",
|
|
5
|
-
"types": "bloxd-api.d.ts",
|
|
6
|
-
"exports": {
|
|
7
|
-
"./global": {
|
|
8
|
-
"types": "./bloxd-api.d.ts"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/bulebrainbrand/bloxd.io.d.ts.git"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [],
|
|
16
|
-
"author": "",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"type": "module",
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/bulebrainbrand/bloxd.io.d.ts/issues"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/bulebrainbrand/bloxd.io.d.ts#readme",
|
|
23
|
-
"files": [
|
|
24
|
-
"bloxd-api.d.ts",
|
|
25
|
-
"type/",
|
|
26
|
-
"api-type-def/"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "bloxd.io.d.ts",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "yo",
|
|
5
|
+
"types": "bloxd-api.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./global": {
|
|
8
|
+
"types": "./bloxd-api.d.ts"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/bulebrainbrand/bloxd.io.d.ts.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/bulebrainbrand/bloxd.io.d.ts/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/bulebrainbrand/bloxd.io.d.ts#readme",
|
|
23
|
+
"files": [
|
|
24
|
+
"bloxd-api.d.ts",
|
|
25
|
+
"type/",
|
|
26
|
+
"api-type-def/"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* this type is color.
|
|
3
|
+
* allow all css color type.
|
|
4
|
+
* @example
|
|
5
|
+
* `#ff0000` | `rgb(255,0,0)` | `red` | `Red` | `#f00` | `rgba(255,0,0,1)` | `hsl(0,100%,50%)` | `hsla(0,100%,50%,1)` is all red
|
|
6
|
+
*/
|
|
7
|
+
export type StringColor =
|
|
8
|
+
// Hex colors
|
|
9
|
+
| `#${string}`
|
|
10
|
+
// RGB and RGBA
|
|
11
|
+
| `rgb(${string})`
|
|
12
|
+
| `rgba(${string})`
|
|
13
|
+
// HSL and HSLA
|
|
14
|
+
| `hsl(${string})`
|
|
15
|
+
| `hsla(${string})`
|
|
16
|
+
// HWB
|
|
17
|
+
| `hwb(${string})`
|
|
18
|
+
// LAB and LCH
|
|
19
|
+
| `lab(${string})`
|
|
20
|
+
| `lch(${string})`
|
|
21
|
+
// OKLAB and OKLCH
|
|
22
|
+
| `oklab(${string})`
|
|
23
|
+
| `oklch(${string})`
|
|
24
|
+
// color() function
|
|
25
|
+
| `color(${string})`
|
|
26
|
+
// Special values
|
|
27
|
+
| "currentColor"
|
|
28
|
+
| "transparent"
|
|
29
|
+
// CSS named colors (full list)
|
|
30
|
+
| "aliceblue"
|
|
31
|
+
| "antiquewhite"
|
|
32
|
+
| "aqua"
|
|
33
|
+
| "aquamarine"
|
|
34
|
+
| "azure"
|
|
35
|
+
| "beige"
|
|
36
|
+
| "bisque"
|
|
37
|
+
| "black"
|
|
38
|
+
| "blanchedalmond"
|
|
39
|
+
| "blue"
|
|
40
|
+
| "blueviolet"
|
|
41
|
+
| "brown"
|
|
42
|
+
| "burlywood"
|
|
43
|
+
| "cadetblue"
|
|
44
|
+
| "chartreuse"
|
|
45
|
+
| "chocolate"
|
|
46
|
+
| "coral"
|
|
47
|
+
| "cornflowerblue"
|
|
48
|
+
| "cornsilk"
|
|
49
|
+
| "crimson"
|
|
50
|
+
| "cyan"
|
|
51
|
+
| "darkblue"
|
|
52
|
+
| "darkcyan"
|
|
53
|
+
| "darkgoldenrod"
|
|
54
|
+
| "darkgray"
|
|
55
|
+
| "darkgreen"
|
|
56
|
+
| "darkgrey"
|
|
57
|
+
| "darkkhaki"
|
|
58
|
+
| "darkmagenta"
|
|
59
|
+
| "darkolivegreen"
|
|
60
|
+
| "darkorange"
|
|
61
|
+
| "darkorchid"
|
|
62
|
+
| "darkred"
|
|
63
|
+
| "darksalmon"
|
|
64
|
+
| "darkseagreen"
|
|
65
|
+
| "darkslateblue"
|
|
66
|
+
| "darkslategray"
|
|
67
|
+
| "darkslategrey"
|
|
68
|
+
| "darkturquoise"
|
|
69
|
+
| "darkviolet"
|
|
70
|
+
| "deeppink"
|
|
71
|
+
| "deepskyblue"
|
|
72
|
+
| "dimgray"
|
|
73
|
+
| "dimgrey"
|
|
74
|
+
| "dodgerblue"
|
|
75
|
+
| "firebrick"
|
|
76
|
+
| "floralwhite"
|
|
77
|
+
| "forestgreen"
|
|
78
|
+
| "fuchsia"
|
|
79
|
+
| "gainsboro"
|
|
80
|
+
| "ghostwhite"
|
|
81
|
+
| "gold"
|
|
82
|
+
| "goldenrod"
|
|
83
|
+
| "gray"
|
|
84
|
+
| "green"
|
|
85
|
+
| "greenyellow"
|
|
86
|
+
| "grey"
|
|
87
|
+
| "honeydew"
|
|
88
|
+
| "hotpink"
|
|
89
|
+
| "indianred"
|
|
90
|
+
| "indigo"
|
|
91
|
+
| "ivory"
|
|
92
|
+
| "khaki"
|
|
93
|
+
| "lavender"
|
|
94
|
+
| "lavenderblush"
|
|
95
|
+
| "lawngreen"
|
|
96
|
+
| "lemonchiffon"
|
|
97
|
+
| "lightblue"
|
|
98
|
+
| "lightcoral"
|
|
99
|
+
| "lightcyan"
|
|
100
|
+
| "lightgoldenrodyellow"
|
|
101
|
+
| "lightgray"
|
|
102
|
+
| "lightgreen"
|
|
103
|
+
| "lightgrey"
|
|
104
|
+
| "lightpink"
|
|
105
|
+
| "lightsalmon"
|
|
106
|
+
| "lightseagreen"
|
|
107
|
+
| "lightskyblue"
|
|
108
|
+
| "lightslategray"
|
|
109
|
+
| "lightslategrey"
|
|
110
|
+
| "lightsteelblue"
|
|
111
|
+
| "lightyellow"
|
|
112
|
+
| "lime"
|
|
113
|
+
| "limegreen"
|
|
114
|
+
| "linen"
|
|
115
|
+
| "magenta"
|
|
116
|
+
| "maroon"
|
|
117
|
+
| "mediumaquamarine"
|
|
118
|
+
| "mediumblue"
|
|
119
|
+
| "mediumorchid"
|
|
120
|
+
| "mediumpurple"
|
|
121
|
+
| "mediumseagreen"
|
|
122
|
+
| "mediumslateblue"
|
|
123
|
+
| "mediumspringgreen"
|
|
124
|
+
| "mediumturquoise"
|
|
125
|
+
| "mediumvioletred"
|
|
126
|
+
| "midnightblue"
|
|
127
|
+
| "mintcream"
|
|
128
|
+
| "mistyrose"
|
|
129
|
+
| "moccasin"
|
|
130
|
+
| "navajowhite"
|
|
131
|
+
| "navy"
|
|
132
|
+
| "oldlace"
|
|
133
|
+
| "olive"
|
|
134
|
+
| "olivedrab"
|
|
135
|
+
| "orange"
|
|
136
|
+
| "orangered"
|
|
137
|
+
| "orchid"
|
|
138
|
+
| "palegoldenrod"
|
|
139
|
+
| "palegreen"
|
|
140
|
+
| "paleturquoise"
|
|
141
|
+
| "palevioletred"
|
|
142
|
+
| "papayawhip"
|
|
143
|
+
| "peachpuff"
|
|
144
|
+
| "peru"
|
|
145
|
+
| "pink"
|
|
146
|
+
| "plum"
|
|
147
|
+
| "powderblue"
|
|
148
|
+
| "purple"
|
|
149
|
+
| "rebeccapurple"
|
|
150
|
+
| "red"
|
|
151
|
+
| "rosybrown"
|
|
152
|
+
| "royalblue"
|
|
153
|
+
| "saddlebrown"
|
|
154
|
+
| "salmon"
|
|
155
|
+
| "sandybrown"
|
|
156
|
+
| "seagreen"
|
|
157
|
+
| "seashell"
|
|
158
|
+
| "sienna"
|
|
159
|
+
| "silver"
|
|
160
|
+
| "skyblue"
|
|
161
|
+
| "slateblue"
|
|
162
|
+
| "slategray"
|
|
163
|
+
| "slategrey"
|
|
164
|
+
| "snow"
|
|
165
|
+
| "springgreen"
|
|
166
|
+
| "steelblue"
|
|
167
|
+
| "tan"
|
|
168
|
+
| "teal"
|
|
169
|
+
| "thistle"
|
|
170
|
+
| "tomato"
|
|
171
|
+
| "turquoise"
|
|
172
|
+
| "violet"
|
|
173
|
+
| "wheat"
|
|
174
|
+
| "white"
|
|
175
|
+
| "whitesmoke"
|
|
176
|
+
| "yellow"
|
|
177
|
+
| "yellowgreen"
|
|
178
|
+
// fallback allowance for any other valid CSS color syntaxes not listed above
|
|
179
|
+
| string;
|
package/type/color/index.d.ts
CHANGED
package/type/index.d.ts
CHANGED