@quenty/colorpicker 10.19.0 → 10.19.1-canary.545.2374fb2.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,17 @@
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.19.1-canary.545.2374fb2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpicker@10.19.0...@quenty/colorpicker@10.19.1-canary.545.2374fb2.0) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [10.19.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/colorpicker@10.18.2...@quenty/colorpicker@10.19.0) (2025-04-02)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/colorpicker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/colorpicker",
3
- "version": "10.19.0",
3
+ "version": "10.19.1-canary.545.2374fb2.0",
4
4
  "description": "Color picking UI system for Roblox.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,17 +28,17 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@quenty/baseobject": "^10.8.0",
32
- "@quenty/basicpane": "^13.17.0",
33
- "@quenty/blend": "^12.18.0",
34
- "@quenty/buttondragmodel": "^1.15.0",
35
- "@quenty/color3utils": "^11.18.0",
36
- "@quenty/inputobjectutils": "^4.18.0",
37
- "@quenty/instanceutils": "^13.17.0",
38
- "@quenty/loader": "^10.8.0",
39
- "@quenty/maid": "^3.4.0",
40
- "@quenty/math": "^2.7.1",
41
- "@quenty/valueobject": "^13.17.0"
31
+ "@quenty/baseobject": "10.8.1-canary.545.2374fb2.0",
32
+ "@quenty/basicpane": "13.17.1-canary.545.2374fb2.0",
33
+ "@quenty/blend": "12.18.1-canary.545.2374fb2.0",
34
+ "@quenty/buttondragmodel": "1.15.1-canary.545.2374fb2.0",
35
+ "@quenty/color3utils": "11.18.1-canary.545.2374fb2.0",
36
+ "@quenty/inputobjectutils": "4.18.1-canary.545.2374fb2.0",
37
+ "@quenty/instanceutils": "13.17.1-canary.545.2374fb2.0",
38
+ "@quenty/loader": "10.8.1-canary.545.2374fb2.0",
39
+ "@quenty/maid": "3.4.1-canary.545.2374fb2.0",
40
+ "@quenty/math": "2.7.2-canary.545.2374fb2.0",
41
+ "@quenty/valueobject": "13.17.1-canary.545.2374fb2.0"
42
42
  },
43
- "gitHead": "e8ea56930e65322fcffc05a1556d5df988068f0b"
43
+ "gitHead": "2374fb2b043cfbe0e9b507b3316eec46a4e353a0"
44
44
  }
@@ -58,7 +58,7 @@ function ColorPickerCursorPreview:SetColor(color)
58
58
  self._colorValue.Value = color
59
59
  end
60
60
 
61
- function ColorPickerCursorPreview:SetTransparency(transparency)
61
+ function ColorPickerCursorPreview:SetTransparency(transparency: number)
62
62
  assert(type(transparency) == "number", "Bad transparency")
63
63
 
64
64
  self._transparency.Value = transparency
@@ -81,7 +81,7 @@ function ColorPickerCursorPreview:_render()
81
81
  Name = "Preview";
82
82
  BackgroundTransparency = 1;
83
83
  Size = Blend.Computed(self._heightAbs, function(heightAbs)
84
- return UDim2.fromOffset(heightAbs, heightAbs);
84
+ return UDim2.fromOffset(heightAbs, heightAbs)
85
85
  end);
86
86
  AnchorPoint = Vector2.new(0.5, 0.5);
87
87
  Position = Blend.Computed(self._position, self._offsetAbs, self._heightAbs, function(pos, offsetAbs, heightAbs)
@@ -46,7 +46,7 @@ function ColorPickerTriangle:SetColor(color)
46
46
  self._color.Value = color
47
47
  end
48
48
 
49
- function ColorPickerTriangle:SetTransparency(transparency)
49
+ function ColorPickerTriangle:SetTransparency(transparency: number)
50
50
  assert(type(transparency) == "number", "Bad transparency")
51
51
 
52
52
  self._transparency.Value = transparency
@@ -88,7 +88,7 @@ end
88
88
 
89
89
  @param transparency number
90
90
  ]=]
91
- function HSColorPickerCursor:SetTransparency(transparency)
91
+ function HSColorPickerCursor:SetTransparency(transparency: number)
92
92
  assert(type(transparency) == "number", "Bad transparency")
93
93
 
94
94
  self._transparency.Value = transparency
@@ -98,7 +98,7 @@ function HSColorPickerCursor:_render()
98
98
  return Blend.New "Frame" {
99
99
  Name = "HSColorPickerCursor";
100
100
  Size = Blend.Computed(self._height, function(height)
101
- return UDim2.fromScale(height, height);
101
+ return UDim2.fromScale(height, height)
102
102
  end);
103
103
  BackgroundTransparency = 1;
104
104
  AnchorPoint = Vector2.new(0.5, 0.5);
@@ -143,7 +143,7 @@ function HSColorPickerCursor:_render()
143
143
  CornerRadius = UDim.new(1, 0);
144
144
  };
145
145
  };
146
- };
146
+ }
147
147
  end
148
148
 
149
149
 
@@ -154,7 +154,7 @@ end
154
154
 
155
155
  @param transparency number
156
156
  ]=]
157
- function HSColorPicker:SetTransparency(transparency)
157
+ function HSColorPicker:SetTransparency(transparency: number)
158
158
  assert(type(transparency) == "number", "Bad transparency")
159
159
 
160
160
  self._transparency.Value = transparency
@@ -165,7 +165,7 @@ end
165
165
 
166
166
  @param height number
167
167
  ]=]
168
- function HSColorPicker:SetSize(height)
168
+ function HSColorPicker:SetSize(height: number)
169
169
  assert(type(height) == "number", "Bad height")
170
170
 
171
171
  self._sizeValue.Value = Vector2.new(height, height)
@@ -200,7 +200,7 @@ function HSColorPicker:_render()
200
200
 
201
201
  self._preview.Gui;
202
202
  self._cursor.Gui;
203
- };
203
+ }
204
204
  end
205
205
 
206
206
  return HSColorPicker
@@ -85,7 +85,7 @@ end
85
85
 
86
86
  @param height number
87
87
  ]=]
88
- function HSVColorPicker:SetSize(height)
88
+ function HSVColorPicker:SetSize(height: number)
89
89
  assert(type(height) == "number", "Bad height")
90
90
 
91
91
  self._hueSaturationPicker:SetSize(height)
@@ -156,7 +156,7 @@ end
156
156
 
157
157
  @param color Color3
158
158
  ]=]
159
- function HSVColorPicker:SetColor(color)
159
+ function HSVColorPicker:SetColor(color: Color3)
160
160
  local h, s, v = Color3.toHSV(color)
161
161
  self._hsvColorValue.Value = Vector3.new(h, s, v)
162
162
  end
@@ -166,7 +166,7 @@ end
166
166
 
167
167
  @return Color3
168
168
  ]=]
169
- function HSVColorPicker:GetColor()
169
+ function HSVColorPicker:GetColor(): Color3
170
170
  local current = self._hsvColorValue.Value
171
171
  local h, s, v = current.x, current.y, current.z
172
172
  return Color3.fromHSV(h, s, v)
@@ -174,13 +174,13 @@ end
174
174
 
175
175
  --[=[
176
176
  A size value that defines the aspect ratio and size of this picker. See [SetSize]
177
- @return Vector3
177
+ @return ValueObject<Vector2>
178
178
  ]=]
179
- function HSVColorPicker:GetSizeValue()
179
+ function HSVColorPicker:GetSizeValue(): ValueObject.ValueObject<Vector2>
180
180
  return self._sizeValue
181
181
  end
182
182
 
183
- function HSVColorPicker:GetMeasureValue()
183
+ function HSVColorPicker:GetMeasureValue(): ValueObject.ValueObject<Vector2>
184
184
  return self._sizeValue
185
185
  end
186
186
 
@@ -189,14 +189,14 @@ end
189
189
 
190
190
  @param transparency number
191
191
  ]=]
192
- function HSVColorPicker:SetTransparency(transparency)
192
+ function HSVColorPicker:SetTransparency(transparency: number)
193
193
  assert(type(transparency) == "number", "Bad transparency")
194
194
 
195
195
  self._transparency.Value = transparency
196
196
  end
197
197
 
198
198
  function HSVColorPicker:_updateSize()
199
- local valueSize = self._valuePicker:GetSizeValue().Value
199
+ local valueSize = self._valuePicker:GetSizeValue().Value
200
200
  local hueSize = self._hueSaturationPicker:GetSizeValue().Value
201
201
 
202
202
  local width = valueSize.x + hueSize.x + self._innerPadding.Value
@@ -207,54 +207,54 @@ end
207
207
 
208
208
  function HSVColorPicker:_render()
209
209
  local function container(picker, props)
210
- return Blend.New "Frame" {
211
- AnchorPoint = props.AnchorPoint;
212
- Position = props.Position;
213
- BackgroundTransparency = 1;
214
- Size = UDim2.new(1, 0, 1, 0);
210
+ return Blend.New("Frame")({
211
+ AnchorPoint = props.AnchorPoint,
212
+ Position = props.Position,
213
+ BackgroundTransparency = 1,
214
+ Size = UDim2.new(1, 0, 1, 0),
215
215
  ZIndex = Blend.Computed(picker:ObserveIsPressed(), function(isPressed)
216
216
  return isPressed and 2 or 1
217
- end);
217
+ end),
218
218
 
219
- picker.Gui;
219
+ picker.Gui,
220
220
 
221
- Blend.New "UIAspectRatioConstraint" {
221
+ Blend.New("UIAspectRatioConstraint")({
222
222
  AspectRatio = Blend.Computed(picker:GetSizeValue(), function(size)
223
223
  if size.x <= 0 or size.y <= 0 then
224
224
  return 1
225
225
  else
226
- return size.x/size.y
226
+ return size.x / size.y
227
227
  end
228
- end);
229
- };
230
- };
228
+ end),
229
+ }),
230
+ })
231
231
  end
232
232
 
233
- return Blend.New "Frame" {
234
- Name = "HSVColorPicker";
235
- Size = UDim2.new(1, 0, 1, 0);
236
- BackgroundTransparency = 1;
233
+ return Blend.New("Frame")({
234
+ Name = "HSVColorPicker",
235
+ Size = UDim2.new(1, 0, 1, 0),
236
+ BackgroundTransparency = 1,
237
237
 
238
- Blend.New "UIAspectRatioConstraint" {
238
+ Blend.New("UIAspectRatioConstraint")({
239
239
  AspectRatio = Blend.Computed(self._sizeValue, function(size)
240
240
  if size.x <= 0 or size.y <= 0 then
241
241
  return 1
242
242
  else
243
- return size.x/size.y
243
+ return size.x / size.y
244
244
  end
245
- end);
246
- };
245
+ end),
246
+ }),
247
247
 
248
248
  container(self._hueSaturationPicker, {
249
- AnchorPoint = Vector2.zero;
250
- Position = UDim2.fromScale(0, 0);
251
- });
249
+ AnchorPoint = Vector2.zero,
250
+ Position = UDim2.fromScale(0, 0),
251
+ }),
252
252
 
253
253
  container(self._valuePicker, {
254
- AnchorPoint = Vector2.new(1, 0);
255
- Position = UDim2.fromScale(1, 0);
256
- });
257
- };
254
+ AnchorPoint = Vector2.new(1, 0),
255
+ Position = UDim2.fromScale(1, 0),
256
+ }),
257
+ })
258
258
  end
259
259
 
260
260
  return HSVColorPicker
@@ -107,7 +107,7 @@ end
107
107
 
108
108
  @param height number
109
109
  ]=]
110
- function ValueColorPicker:SetSize(height)
110
+ function ValueColorPicker:SetSize(height: number)
111
111
  assert(type(height) == "number", "Bad height")
112
112
 
113
113
  self:_updateSize(height)
@@ -173,7 +173,7 @@ function ValueColorPicker:GetMeasureValue()
173
173
  return self._sizeValue
174
174
  end
175
175
 
176
- function ValueColorPicker:SetTransparency(transparency)
176
+ function ValueColorPicker:SetTransparency(transparency: number)
177
177
  assert(type(transparency) == "number", "Bad transparency")
178
178
 
179
179
  self._transparency.Value = transparency
@@ -264,7 +264,7 @@ function ValueColorPicker:_render()
264
264
 
265
265
  self._triangle.Gui;
266
266
  }
267
- };
267
+ }
268
268
  end
269
269
 
270
270
  return ValueColorPicker