@quenty/highlight 10.21.0 → 10.21.2-canary.547.11ae689.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/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.21.2-canary.547.11ae689.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/highlight@10.21.0...@quenty/highlight@10.21.2-canary.547.11ae689.0) (2025-04-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+ * Bump package versions for republishing ([ba47c62](https://github.com/Quenty/NevermoreEngine/commit/ba47c62e32170bf74377b0c658c60b84306dc294))
13
+
14
+
15
+
16
+
17
+
18
+ ## [10.21.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/highlight@10.21.0...@quenty/highlight@10.21.1) (2025-04-07)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
24
+
25
+
26
+
27
+
28
+
6
29
  # [10.21.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/highlight@10.20.4...@quenty/highlight@10.21.0) (2025-04-02)
7
30
 
8
31
  **Note:** Version bump only for package @quenty/highlight
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2024 James Onnen (Quenty)
3
+ Copyright (c) 2014-2025 James Onnen (Quenty)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/highlight",
3
- "version": "10.21.0",
3
+ "version": "10.21.2-canary.547.11ae689.0",
4
4
  "description": "Animated highlight system for the Roblox highlight object",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,25 +26,25 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/baseobject": "^10.8.0",
30
- "@quenty/basicpane": "^13.17.0",
31
- "@quenty/blend": "^12.18.0",
32
- "@quenty/ducktype": "^5.8.1",
33
- "@quenty/enumutils": "^3.4.0",
34
- "@quenty/instanceutils": "^13.17.0",
35
- "@quenty/loader": "^10.8.0",
36
- "@quenty/maid": "^3.4.0",
37
- "@quenty/math": "^2.7.1",
38
- "@quenty/observablecollection": "^12.20.0",
39
- "@quenty/rx": "^13.17.0",
40
- "@quenty/selectionutils": "^8.17.0",
41
- "@quenty/signal": "^7.10.0",
42
- "@quenty/statestack": "^14.18.0",
43
- "@quenty/table": "^3.7.1",
44
- "@quenty/valueobject": "^13.17.0"
29
+ "@quenty/baseobject": "10.8.2-canary.547.11ae689.0",
30
+ "@quenty/basicpane": "13.17.2-canary.547.11ae689.0",
31
+ "@quenty/blend": "12.18.2-canary.547.11ae689.0",
32
+ "@quenty/ducktype": "5.8.3-canary.547.11ae689.0",
33
+ "@quenty/enumutils": "3.4.2-canary.547.11ae689.0",
34
+ "@quenty/instanceutils": "13.17.2-canary.547.11ae689.0",
35
+ "@quenty/loader": "10.8.2-canary.547.11ae689.0",
36
+ "@quenty/maid": "3.4.2-canary.547.11ae689.0",
37
+ "@quenty/math": "2.7.3-canary.547.11ae689.0",
38
+ "@quenty/observablecollection": "12.20.2-canary.547.11ae689.0",
39
+ "@quenty/rx": "13.17.2-canary.547.11ae689.0",
40
+ "@quenty/selectionutils": "8.17.2-canary.547.11ae689.0",
41
+ "@quenty/signal": "7.10.2-canary.547.11ae689.0",
42
+ "@quenty/statestack": "14.18.2-canary.547.11ae689.0",
43
+ "@quenty/table": "3.7.3-canary.547.11ae689.0",
44
+ "@quenty/valueobject": "13.17.2-canary.547.11ae689.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "e8ea56930e65322fcffc05a1556d5df988068f0b"
49
+ "gitHead": "11ae6894c9c40c596e521dc1d2a71977af63752f"
50
50
  }
@@ -51,7 +51,13 @@ function AnimatedHighlight.new()
51
51
  return self
52
52
  end
53
53
 
54
- function AnimatedHighlight.isAnimatedHighlight(value)
54
+ --[=[
55
+ Returns true if it's an animated highlight
56
+
57
+ @param value any
58
+ @return boolean
59
+ ]=]
60
+ function AnimatedHighlight.isAnimatedHighlight(value: any): boolean
55
61
  return DuckTypeUtils.isImplementation(AnimatedHighlight, value)
56
62
  end
57
63
 
@@ -93,27 +99,27 @@ function AnimatedHighlight:SetPropertiesFrom(sourceHighlight)
93
99
  transferSpringValue(self._percentVisible, sourceHighlight._percentVisible)
94
100
  end
95
101
 
96
- function AnimatedHighlight:SetTransparencySpeed(speed)
102
+ function AnimatedHighlight:SetTransparencySpeed(speed: number)
97
103
  assert(type(speed) == "number", "Bad speed")
98
104
 
99
105
  self._fillTransparencySpring.Speed = speed
100
106
  self._outlineTransparencySpring.Speed = speed
101
107
  end
102
108
 
103
- function AnimatedHighlight:SetColorSpeed(speed)
109
+ function AnimatedHighlight:SetColorSpeed(speed: number)
104
110
  assert(type(speed) == "number", "Bad speed")
105
111
 
106
112
  self._fillColorSpring.Speed = speed
107
113
  self._outlineColorSpring.Speed = speed
108
114
  end
109
115
 
110
- function AnimatedHighlight:SetSpeed(speed)
116
+ function AnimatedHighlight:SetSpeed(speed: number)
111
117
  assert(type(speed) == "number", "Bad speed")
112
118
 
113
119
  self._percentVisible.Speed = speed
114
120
  end
115
121
 
116
- function AnimatedHighlight:Finish(doNotAnimate, callback)
122
+ function AnimatedHighlight:Finish(doNotAnimate: boolean?, callback)
117
123
  if self._percentVisible.p == 0 and self._percentVisible.v == 0 then
118
124
  callback()
119
125
  return
@@ -150,9 +156,9 @@ end
150
156
  Sets the fill color
151
157
 
152
158
  @param color Color3
153
- @param doNotAnimate boolean | nil
159
+ @param doNotAnimate boolean?
154
160
  ]=]
155
- function AnimatedHighlight:SetFillColor(color, doNotAnimate)
161
+ function AnimatedHighlight:SetFillColor(color: Color3, doNotAnimate: boolean?)
156
162
  assert(typeof(color) == "Color3", "Bad color")
157
163
 
158
164
  self._fillColorSpring:SetTarget(color, doNotAnimate)
@@ -162,21 +168,28 @@ end
162
168
  Sets the outline color
163
169
 
164
170
  @param color Color3
165
- @param doNotAnimate boolean | nil
171
+ @param doNotAnimate boolean?
166
172
  ]=]
167
- function AnimatedHighlight:SetOutlineColor(color, doNotAnimate)
173
+ function AnimatedHighlight:SetOutlineColor(color: Color3, doNotAnimate: boolean?)
168
174
  assert(typeof(color) == "Color3", "Bad color")
169
175
 
170
176
  self._outlineColorSpring:SetTarget(color, doNotAnimate)
171
177
  end
172
178
 
173
- function AnimatedHighlight:SetAdornee(adornee)
179
+ --[=[
180
+ Sets the adornee
181
+ ]=]
182
+ function AnimatedHighlight:SetAdornee(adornee: Instance?)
174
183
  assert(typeof(adornee) == "Instance" or adornee == nil, "Bad adornee")
175
184
 
176
185
  self._adornee.Value = adornee
177
186
  end
178
187
 
179
- function AnimatedHighlight:GetAdornee()
188
+ --[=[
189
+ Gets the adornee
190
+ @return Instance?
191
+ ]=]
192
+ function AnimatedHighlight:GetAdornee(): Instance?
180
193
  return self._adornee.Value
181
194
  end
182
195
 
@@ -184,9 +197,9 @@ end
184
197
  Sets the outlineTransparency
185
198
 
186
199
  @param outlineTransparency number
187
- @param doNotAnimate boolean | nil
200
+ @param doNotAnimate boolean?
188
201
  ]=]
189
- function AnimatedHighlight:SetOutlineTransparency(outlineTransparency, doNotAnimate)
202
+ function AnimatedHighlight:SetOutlineTransparency(outlineTransparency: number, doNotAnimate: boolean?)
190
203
  assert(type(outlineTransparency) == "number", "Bad outlineTransparency")
191
204
 
192
205
  self._outlineTransparencySpring.Target = outlineTransparency
@@ -200,9 +213,9 @@ end
200
213
  Sets the fillTransparency
201
214
 
202
215
  @param fillTransparency number
203
- @param doNotAnimate boolean | nil
216
+ @param doNotAnimate boolean?
204
217
  ]=]
205
- function AnimatedHighlight:SetFillTransparency(fillTransparency, doNotAnimate)
218
+ function AnimatedHighlight:SetFillTransparency(fillTransparency: number, doNotAnimate: boolean?)
206
219
  assert(type(fillTransparency) == "number", "Bad fillTransparency")
207
220
 
208
221
  self._fillTransparencySpring.Target = fillTransparency
@@ -223,13 +236,13 @@ function AnimatedHighlight:_render()
223
236
  self._fillTransparencySpring:ObserveRenderStepped(),
224
237
  self._percentVisible:ObserveRenderStepped(),
225
238
  function(transparency, visible)
226
- return Math.map(visible, 0, 1, 1, transparency);
239
+ return Math.map(visible, 0, 1, 1, transparency)
227
240
  end);
228
241
  OutlineTransparency = Blend.Computed(
229
242
  self._outlineTransparencySpring:ObserveRenderStepped(),
230
243
  self._percentVisible:ObserveRenderStepped(),
231
244
  function(transparency, visible)
232
- return Math.map(visible, 0, 1, 1, transparency);
245
+ return Math.map(visible, 0, 1, 1, transparency)
233
246
  end);
234
247
  Adornee = self._adornee;
235
248
  Parent = self._adornee;
@@ -42,25 +42,25 @@ end
42
42
 
43
43
  @param depthMode Enum.HighlightDepthMode
44
44
  ]=]
45
- function AnimatedHighlightGroup:SetDefaultHighlightDepthMode(depthMode)
45
+ function AnimatedHighlightGroup:SetDefaultHighlightDepthMode(depthMode: Enum.HighlightDepthMode)
46
46
  assert(EnumUtils.isOfType(Enum.HighlightDepthMode, depthMode))
47
47
 
48
48
  self._defaultValues:SetHighlightDepthMode(depthMode)
49
49
  end
50
50
 
51
- function AnimatedHighlightGroup:SetDefaultFillTransparency(transparency)
51
+ function AnimatedHighlightGroup:SetDefaultFillTransparency(transparency: number)
52
52
  assert(type(transparency) == "number", "Bad transparency")
53
53
 
54
54
  self._defaultValues:SetFillTransparency(transparency)
55
55
  end
56
56
 
57
- function AnimatedHighlightGroup:SetDefaultOutlineTransparency(outlineTransparency)
57
+ function AnimatedHighlightGroup:SetDefaultOutlineTransparency(outlineTransparency: number)
58
58
  assert(type(outlineTransparency) == "number", "Bad outlineTransparency")
59
59
 
60
60
  self._defaultValues:SetOutlineTransparency(outlineTransparency)
61
61
  end
62
62
 
63
- function AnimatedHighlightGroup:SetDefaultFillColor(color)
63
+ function AnimatedHighlightGroup:SetDefaultFillColor(color: Color3)
64
64
  assert(typeof(color) == "Color3", "Bad color")
65
65
 
66
66
  self._defaultValues:SetFillColor(color)
@@ -70,19 +70,19 @@ function AnimatedHighlightGroup:GetDefaultFillColor()
70
70
  return self._defaultValues:GetFillColor()
71
71
  end
72
72
 
73
- function AnimatedHighlightGroup:SetDefaultOutlineColor(color)
73
+ function AnimatedHighlightGroup:SetDefaultOutlineColor(color: Color3)
74
74
  assert(typeof(color) == "Color3", "Bad color")
75
75
 
76
76
  self._defaultValues:SetOutlineColor(color)
77
77
  end
78
78
 
79
- function AnimatedHighlightGroup:SetDefaultTransparencySpeed(speed)
79
+ function AnimatedHighlightGroup:SetDefaultTransparencySpeed(speed: number)
80
80
  assert(type(speed) == "number", "Bad speed")
81
81
 
82
82
  self._defaultValues:SetTransparencySpeed(speed)
83
83
  end
84
84
 
85
- function AnimatedHighlightGroup:SetDefaultSpeed(speed)
85
+ function AnimatedHighlightGroup:SetDefaultSpeed(speed: number)
86
86
  assert(type(speed) == "number", "Bad speed")
87
87
 
88
88
  self._defaultValues:SetSpeed(speed)
@@ -99,7 +99,7 @@ end
99
99
  @param observeScore number
100
100
  @return AnimatedHighlightModel
101
101
  ]=]
102
- function AnimatedHighlightGroup:Highlight(adornee, observeScore)
102
+ function AnimatedHighlightGroup:Highlight(adornee: Instance, observeScore)
103
103
  observeScore = observeScore or Rx.of(0)
104
104
 
105
105
  if type(observeScore) == "number" then
@@ -112,7 +112,7 @@ function AnimatedHighlightGroup:Highlight(adornee, observeScore)
112
112
  return self:_getOrCreateHighlightStackHandle(adornee, observeScore)
113
113
  end
114
114
 
115
- function AnimatedHighlightGroup:_setDefaultValues(highlight, doNotAnimate)
115
+ function AnimatedHighlightGroup:_setDefaultValues(highlight, doNotAnimate: boolean?)
116
116
  highlight:SetHighlightDepthMode(self._defaultValues.HighlightDepthMode.Value)
117
117
  highlight:SetTransparencySpeed(self._defaultValues.TransparencySpeed.Value)
118
118
  highlight:SetSpeed(self._defaultValues.Speed.Value)
@@ -8,6 +8,7 @@ local require = require(script.Parent.loader).load(script)
8
8
 
9
9
  local AnimatedHighlightGroup = require("AnimatedHighlightGroup")
10
10
  local Maid = require("Maid")
11
+ local _ServiceBag = require("ServiceBag")
11
12
 
12
13
  local HighlightServiceClient = {}
13
14
  HighlightServiceClient.ServiceName = "HighlightServiceClient"
@@ -17,7 +18,7 @@ HighlightServiceClient.ServiceName = "HighlightServiceClient"
17
18
 
18
19
  @param serviceBag ServiceBag
19
20
  ]=]
20
- function HighlightServiceClient:Init(serviceBag)
21
+ function HighlightServiceClient:Init(serviceBag: _ServiceBag.ServiceBag)
21
22
  assert(not self._serviceBag, "Already initialized")
22
23
  self._serviceBag = assert(serviceBag, "No serviceBag")
23
24
  self._maid = Maid.new()
@@ -39,7 +40,7 @@ end
39
40
  Highlights an instance at the given priority
40
41
 
41
42
  @param adornee Instance
42
- @param observeScore Observable<number> | number | nil
43
+ @param observeScore Observable<number> | number?
43
44
  @return AnimatedHighlightModel
44
45
  ]=]
45
46
  function HighlightServiceClient:Highlight(adornee, observeScore)
@@ -49,14 +49,14 @@ end
49
49
  @param value any
50
50
  @return boolean
51
51
  ]=]
52
- function AnimatedHighlightModel.isAnimatedHighlightModel(value)
52
+ function AnimatedHighlightModel.isAnimatedHighlightModel(value: any): boolean
53
53
  return DuckTypeUtils.isImplementation(AnimatedHighlightModel, value)
54
54
  end
55
55
 
56
56
  --[=[
57
57
  @param depthMode HighlightDepthMode
58
58
  ]=]
59
- function AnimatedHighlightModel:SetHighlightDepthMode(depthMode)
59
+ function AnimatedHighlightModel:SetHighlightDepthMode(depthMode: Enum.HighlightDepthMode?)
60
60
  assert(EnumUtils.isOfType(Enum.HighlightDepthMode, depthMode) or depthMode == nil, "Bad depthMode")
61
61
 
62
62
  self.HighlightDepthMode.Value = depthMode
@@ -65,9 +65,9 @@ end
65
65
  --[=[
66
66
  Sets the transparency speed
67
67
 
68
- @param speed number | nil
68
+ @param speed number?
69
69
  ]=]
70
- function AnimatedHighlightModel:SetTransparencySpeed(speed)
70
+ function AnimatedHighlightModel:SetTransparencySpeed(speed: number?)
71
71
  assert(type(speed) == "number" or speed == nil, "Bad speed")
72
72
 
73
73
  self.TransparencySpeed:SetValue(speed)
@@ -76,21 +76,20 @@ end
76
76
  --[=[
77
77
  Sets the color speed
78
78
 
79
- @param speed number | nil
79
+ @param speed number?
80
80
  ]=]
81
- function AnimatedHighlightModel:SetColorSpeed(speed)
81
+ function AnimatedHighlightModel:SetColorSpeed(speed: number?)
82
82
  assert(type(speed) == "number" or speed == nil, "Bad speed")
83
83
 
84
84
  self.ColorSpeed:SetValue(speed)
85
85
  end
86
86
 
87
-
88
87
  --[=[
89
88
  Sets the visiblity speed speed
90
89
 
91
- @param speed number | nil
90
+ @param speed number?
92
91
  ]=]
93
- function AnimatedHighlightModel:SetSpeed(speed)
92
+ function AnimatedHighlightModel:SetSpeed(speed: number?)
94
93
  assert(type(speed) == "number" or speed == nil, "Bad speed")
95
94
 
96
95
  self.Speed:SetValue(speed)
@@ -99,10 +98,10 @@ end
99
98
  --[=[
100
99
  Sets fill color
101
100
 
102
- @param color Color3 | nil
103
- @param doNotAnimate boolean | nil
101
+ @param color Color3?
102
+ @param doNotAnimate boolean?
104
103
  ]=]
105
- function AnimatedHighlightModel:SetFillColor(color, doNotAnimate)
104
+ function AnimatedHighlightModel:SetFillColor(color: Color3?, doNotAnimate: boolean?)
106
105
  assert(typeof(color) == "Color3" or color == nil, "Bad color")
107
106
 
108
107
  self.FillColor:SetValue(color, doNotAnimate)
@@ -111,19 +110,19 @@ end
111
110
  --[=[
112
111
  Gets the fill color
113
112
 
114
- @return Color3 | nil
113
+ @return Color3?
115
114
  ]=]
116
- function AnimatedHighlightModel:GetFillColor()
115
+ function AnimatedHighlightModel:GetFillColor(): Color3?
117
116
  return self.FillColor.Value
118
117
  end
119
118
 
120
119
  --[=[
121
120
  Sets the outline color
122
121
 
123
- @param color Color3 | nil
124
- @param doNotAnimate boolean | nil
122
+ @param color Color3?
123
+ @param doNotAnimate boolean?
125
124
  ]=]
126
- function AnimatedHighlightModel:SetOutlineColor(color, doNotAnimate)
125
+ function AnimatedHighlightModel:SetOutlineColor(color: Color3?, doNotAnimate: boolean?)
127
126
  assert(typeof(color) == "Color3" or color == nil, "Bad color")
128
127
 
129
128
  self.OutlineColor:SetValue(color, doNotAnimate)
@@ -132,7 +131,7 @@ end
132
131
  --[=[
133
132
  Gets the outline color
134
133
 
135
- @return Color3 | nil
134
+ @return Color3?
136
135
  ]=]
137
136
  function AnimatedHighlightModel:GetOutlineColor()
138
137
  return self.OutlineColor.Value
@@ -142,9 +141,9 @@ end
142
141
  Sets the outline transparency
143
142
 
144
143
  @param outlineTransparency number
145
- @param doNotAnimate boolean | nil
144
+ @param doNotAnimate boolean?
146
145
  ]=]
147
- function AnimatedHighlightModel:SetOutlineTransparency(outlineTransparency, doNotAnimate)
146
+ function AnimatedHighlightModel:SetOutlineTransparency(outlineTransparency: number?, doNotAnimate: boolean?)
148
147
  assert(type(outlineTransparency) == "number" or outlineTransparency == nil, "Bad outlineTransparency")
149
148
 
150
149
  self.OutlineTransparency:SetValue(outlineTransparency, doNotAnimate)
@@ -154,9 +153,9 @@ end
154
153
  Sets the fill transparency
155
154
 
156
155
  @param fillTransparency number
157
- @param doNotAnimate boolean | nil
156
+ @param doNotAnimate boolean?
158
157
  ]=]
159
- function AnimatedHighlightModel:SetFillTransparency(fillTransparency, doNotAnimate)
158
+ function AnimatedHighlightModel:SetFillTransparency(fillTransparency: number?, doNotAnimate: boolean?)
160
159
  assert(type(fillTransparency) == "number" or fillTransparency == nil, "Bad fillTransparency")
161
160
 
162
161
  self.FillTransparency:SetValue(fillTransparency, doNotAnimate)