@quenty/highlight 4.5.0 → 5.0.0-canary.439.eb597ee.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,14 @@
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
+ # [5.0.0-canary.439.eb597ee.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/highlight@4.5.0...@quenty/highlight@5.0.0-canary.439.eb597ee.0) (2024-01-17)
7
+
8
+ **Note:** Version bump only for package @quenty/highlight
9
+
10
+
11
+
12
+
13
+
6
14
  # [4.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/highlight@4.4.0...@quenty/highlight@4.5.0) (2024-01-08)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/highlight
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/highlight",
3
- "version": "4.5.0",
3
+ "version": "5.0.0-canary.439.eb597ee.0",
4
4
  "description": "Animated highlight system for the Roblox highlight object",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,24 +26,25 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/baseobject": "^7.2.0",
30
- "@quenty/basicpane": "^8.4.0",
31
- "@quenty/blend": "^7.4.0",
32
- "@quenty/enumutils": "^3.1.0",
33
- "@quenty/instanceutils": "^8.4.0",
34
- "@quenty/loader": "^7.3.0",
35
- "@quenty/maid": "^2.6.0",
36
- "@quenty/math": "^2.5.0",
37
- "@quenty/observablecollection": "^6.5.0",
38
- "@quenty/rx": "^8.4.0",
39
- "@quenty/selectionutils": "^3.4.0",
40
- "@quenty/signal": "^3.2.0",
41
- "@quenty/statestack": "^9.4.0",
42
- "@quenty/table": "^3.4.0",
43
- "@quenty/valueobject": "^8.4.0"
29
+ "@quenty/baseobject": "8.0.0-canary.439.eb597ee.0",
30
+ "@quenty/basicpane": "9.0.0-canary.439.eb597ee.0",
31
+ "@quenty/blend": "8.0.0-canary.439.eb597ee.0",
32
+ "@quenty/ducktype": "3.0.0-canary.439.eb597ee.0",
33
+ "@quenty/enumutils": "3.1.0",
34
+ "@quenty/instanceutils": "9.0.0-canary.439.eb597ee.0",
35
+ "@quenty/loader": "8.0.0-canary.439.eb597ee.0",
36
+ "@quenty/maid": "2.6.0",
37
+ "@quenty/math": "2.5.0",
38
+ "@quenty/observablecollection": "7.0.0-canary.439.eb597ee.0",
39
+ "@quenty/rx": "9.0.0-canary.439.eb597ee.0",
40
+ "@quenty/selectionutils": "4.0.0-canary.439.eb597ee.0",
41
+ "@quenty/signal": "4.0.0-canary.439.eb597ee.0",
42
+ "@quenty/statestack": "10.0.0-canary.439.eb597ee.0",
43
+ "@quenty/table": "3.4.0",
44
+ "@quenty/valueobject": "9.0.0-canary.439.eb597ee.0"
44
45
  },
45
46
  "publishConfig": {
46
47
  "access": "public"
47
48
  },
48
- "gitHead": "075fb03a03f12ade8758f667767ba738204e0c4b"
49
+ "gitHead": "eb597ee01e62e4dd91190bb7abd1d1404652d5ff"
49
50
  }
@@ -13,6 +13,7 @@ local ValueObject = require("ValueObject")
13
13
  local EnumUtils = require("EnumUtils")
14
14
  local Maid = require("Maid")
15
15
  local Signal = require("Signal")
16
+ local DuckTypeUtils = require("DuckTypeUtils")
16
17
 
17
18
  local AnimatedHighlight = setmetatable({}, BasicPane)
18
19
  AnimatedHighlight.ClassName = "AnimatedHighlight"
@@ -21,26 +22,13 @@ AnimatedHighlight.__index = AnimatedHighlight
21
22
  function AnimatedHighlight.new()
22
23
  local self = setmetatable(BasicPane.new(), AnimatedHighlight)
23
24
 
24
- self._adornee = ValueObject.new(nil)
25
- self._maid:GiveTask(self._adornee)
26
-
27
- self._highlightDepthMode = ValueObject.new(Enum.HighlightDepthMode.AlwaysOnTop)
28
- self._maid:GiveTask(self._highlightDepthMode)
29
-
30
- self._fillColorSpring = SpringObject.new(Color3.new(1, 1, 1), 40)
31
- self._maid:GiveTask(self._fillColorSpring)
32
-
33
- self._outlineColorSpring = SpringObject.new(Color3.new(1, 1, 1), 40)
34
- self._maid:GiveTask(self._outlineColorSpring)
35
-
36
- self._fillTransparencySpring = SpringObject.new(0.5, 40)
37
- self._maid:GiveTask(self._fillTransparencySpring)
38
-
39
- self._outlineTransparencySpring = SpringObject.new(0, 40)
40
- self._maid:GiveTask(self._outlineTransparencySpring)
41
-
42
- self._percentVisible = SpringObject.new(0, 20)
43
- self._maid:GiveTask(self._percentVisible)
25
+ self._adornee = self._maid:Add(ValueObject.new(nil))
26
+ self._highlightDepthMode = self._maid:Add(ValueObject.new(Enum.HighlightDepthMode.AlwaysOnTop))
27
+ self._fillColorSpring = self._maid:Add(SpringObject.new(Color3.new(1, 1, 1), 40))
28
+ self._outlineColorSpring = self._maid:Add(SpringObject.new(Color3.new(1, 1, 1), 40))
29
+ self._fillTransparencySpring = self._maid:Add(SpringObject.new(0.5, 40))
30
+ self._outlineTransparencySpring = self._maid:Add(SpringObject.new(0, 40))
31
+ self._percentVisible = self._maid:Add(SpringObject.new(0, 20))
44
32
 
45
33
  self._maid:GiveTask(self.VisibleChanged:Connect(function(isVisible, doNotAnimate)
46
34
  self._percentVisible.t = isVisible and 1 or 0
@@ -64,8 +52,7 @@ function AnimatedHighlight.new()
64
52
  end
65
53
 
66
54
  function AnimatedHighlight.isAnimatedHighlight(value)
67
- return type(value) == "table" and
68
- getmetatable(value) == AnimatedHighlight
55
+ return DuckTypeUtils.isImplementation(AnimatedHighlight, value)
69
56
  end
70
57
 
71
58
  --[=[
@@ -19,9 +19,7 @@ AnimatedHighlightGroup.__index = AnimatedHighlightGroup
19
19
  function AnimatedHighlightGroup.new()
20
20
  local self = setmetatable(BaseObject.new(), AnimatedHighlightGroup)
21
21
 
22
- self._defaultValues = AnimatedHighlightModel.new()
23
- self._maid:GiveTask(self._defaultValues)
24
-
22
+ self._defaultValues = self._maid:Add(AnimatedHighlightModel.new())
25
23
  self._defaultValues:SetHighlightDepthMode(Enum.HighlightDepthMode.AlwaysOnTop)
26
24
  self._defaultValues:SetFillColor(Color3.new(1, 1, 1))
27
25
  self._defaultValues:SetOutlineColor(Color3.new(1, 1, 1))
@@ -22,8 +22,7 @@ function HighlightServiceClient:Init(serviceBag)
22
22
  self._serviceBag = assert(serviceBag, "No serviceBag")
23
23
  self._maid = Maid.new()
24
24
 
25
- self._group = AnimatedHighlightGroup.new()
26
- self._maid:GiveTask(self._group)
25
+ self._group = self._maid:Add(AnimatedHighlightGroup.new())
27
26
  end
28
27
 
29
28
  --[=[
@@ -8,6 +8,7 @@ local BaseObject = require("BaseObject")
8
8
  local ValueObject = require("ValueObject")
9
9
  local EnumUtils = require("EnumUtils")
10
10
  local Signal = require("Signal")
11
+ local DuckTypeUtils = require("DuckTypeUtils")
11
12
 
12
13
  local AnimatedHighlightModel = setmetatable({}, BaseObject)
13
14
  AnimatedHighlightModel.ClassName = "AnimatedHighlightModel"
@@ -23,32 +24,15 @@ AnimatedHighlightModel.__index = AnimatedHighlightModel
23
24
  function AnimatedHighlightModel.new()
24
25
  local self = setmetatable(BaseObject.new(), AnimatedHighlightModel)
25
26
 
26
- self.HighlightDepthMode = ValueObject.new(nil)
27
- self._maid:GiveTask(self.HighlightDepthMode)
28
-
29
- self.FillColor = ValueObject.new(nil)
30
- self._maid:GiveTask(self.FillColor)
31
-
32
- self.OutlineColor = ValueObject.new(nil)
33
- self._maid:GiveTask(self.OutlineColor)
34
-
35
- self.FillTransparency = ValueObject.new(nil)
36
- self._maid:GiveTask(self.FillTransparency)
37
-
38
- self.OutlineTransparency = ValueObject.new(nil)
39
- self._maid:GiveTask(self.OutlineTransparency)
40
-
41
- self.Speed = ValueObject.new(nil)
42
- self._maid:GiveTask(self.Speed)
43
-
44
- self.ColorSpeed = ValueObject.new(nil)
45
- self._maid:GiveTask(self.ColorSpeed)
46
-
47
- self.TransparencySpeed = ValueObject.new(nil)
48
- self._maid:GiveTask(self.TransparencySpeed)
49
-
50
- self.FillSpeed = ValueObject.new(nil)
51
- self._maid:GiveTask(self.FillSpeed)
27
+ self.HighlightDepthMode = self._maid:Add(ValueObject.new(nil))
28
+ self.FillColor = self._maid:Add(ValueObject.new(nil))
29
+ self.OutlineColor = self._maid:Add(ValueObject.new(nil))
30
+ self.FillTransparency = self._maid:Add(ValueObject.new(nil))
31
+ self.OutlineTransparency = self._maid:Add(ValueObject.new(nil))
32
+ self.Speed = self._maid:Add(ValueObject.new(nil))
33
+ self.ColorSpeed = self._maid:Add(ValueObject.new(nil))
34
+ self.TransparencySpeed = self._maid:Add(ValueObject.new(nil))
35
+ self.FillSpeed = self._maid:Add(ValueObject.new(nil))
52
36
 
53
37
  self.Destroying = Signal.new()
54
38
  self._maid:GiveTask(function()
@@ -66,7 +50,7 @@ end
66
50
  @return boolean
67
51
  ]=]
68
52
  function AnimatedHighlightModel.isAnimatedHighlightModel(value)
69
- return type(value) == "table" and getmetatable(value) == AnimatedHighlightModel
53
+ return DuckTypeUtils.isImplementation(AnimatedHighlightModel, value)
70
54
  end
71
55
 
72
56
  --[=[
@@ -12,6 +12,7 @@ local Rx = require("Rx")
12
12
  local Signal = require("Signal")
13
13
  local ObservableSortedList = require("ObservableSortedList")
14
14
  local ValueObject = require("ValueObject")
15
+ local DuckTypeUtils = require("DuckTypeUtils")
15
16
 
16
17
  local AnimatedHighlightStack = setmetatable({}, BaseObject)
17
18
  AnimatedHighlightStack.ClassName = "AnimatedHighlightStack"
@@ -24,17 +25,11 @@ function AnimatedHighlightStack.new(adornee, defaultModelValues)
24
25
 
25
26
  self._defaultModelValues = assert(defaultModelValues, "No defaultModelValues")
26
27
 
27
- self._list = ObservableSortedList.new()
28
- self._maid:GiveTask(self._list)
28
+ self._list = self._maid:Add(ObservableSortedList.new())
29
+ self._currentModel = self._maid:Add(AnimatedHighlightModel.new())
30
+ self._hasEntries = self._maid:Add(ValueObject.new(false, "boolean"))
29
31
 
30
- self.Done = Signal.new()
31
- self._maid:GiveTask(self.Done)
32
-
33
- self._currentModel = AnimatedHighlightModel.new()
34
- self._maid:GiveTask(self._currentModel)
35
-
36
- self._hasEntries = ValueObject.new(false, "boolean")
37
- self._maid:GiveTask(self._hasEntries)
32
+ self.Done = self._maid:Add(Signal.new())
38
33
 
39
34
  self._maid:GiveTask(self._list:ObserveCount():Pipe({
40
35
  Rx.switchMap(function(count)
@@ -85,7 +80,7 @@ end
85
80
  @return boolean
86
81
  ]=]
87
82
  function AnimatedHighlightStack.isAnimatedHighlightStack(value)
88
- return type(value) == "table" and getmetatable(value) == AnimatedHighlightStack
83
+ return DuckTypeUtils.isImplementation(AnimatedHighlightStack, value)
89
84
  end
90
85
 
91
86
  --[=[