@quenty/scrollingframe 12.11.1 → 12.11.2

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
+ ## [12.11.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.1...@quenty/scrollingframe@12.11.2) (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
  ## [12.11.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/scrollingframe@12.11.0...@quenty/scrollingframe@12.11.1) (2025-03-21)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/scrollingframe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/scrollingframe",
3
- "version": "12.11.1",
3
+ "version": "12.11.2",
4
4
  "description": "Creates an inertia based scrolling frame that is animated and has inertia frames Alternative to a Roblox ScrollingFrame with inertia scrolling and complete control over behavior and style",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,14 +25,14 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/loader": "^10.8.0",
29
- "@quenty/maid": "^3.4.0",
30
- "@quenty/signal": "^7.10.0",
31
- "@quenty/spring": "^10.8.1",
32
- "@quenty/table": "^3.7.1"
28
+ "@quenty/loader": "^10.8.1",
29
+ "@quenty/maid": "^3.4.1",
30
+ "@quenty/signal": "^7.10.1",
31
+ "@quenty/spring": "^10.8.2",
32
+ "@quenty/table": "^3.7.2"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
37
+ "gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
38
38
  }
@@ -33,7 +33,7 @@ function ScrollingFrame.new(gui)
33
33
  self._maid = Maid.new()
34
34
  self.Gui = gui or error("No Gui")
35
35
  self._container = self.Gui.Parent or error("No container")
36
- self._scrollType = SCROLL_TYPE.Vertical;
36
+ self._scrollType = SCROLL_TYPE.Vertical
37
37
 
38
38
  self._scrollbars = {}
39
39
  self._model = ScrollModel.new()
@@ -80,7 +80,7 @@ function ScrollingFrame:RemoveScrollbar(scrollbar)
80
80
  end
81
81
 
82
82
  -- Scrolls to the position in pixels offset
83
- function ScrollingFrame:ScrollTo(position, doNotAnimate)
83
+ function ScrollingFrame:ScrollTo(position, doNotAnimate: boolean?)
84
84
  self._model.Target = position
85
85
  if doNotAnimate then
86
86
  self._model.position = self._model.Target
@@ -89,12 +89,12 @@ function ScrollingFrame:ScrollTo(position, doNotAnimate)
89
89
  end
90
90
 
91
91
  -- Scrolls to the top
92
- function ScrollingFrame:ScrollToTop(doNotAnimate)
92
+ function ScrollingFrame:ScrollToTop(doNotAnimate: boolean?)
93
93
  self:ScrollTo(self._model.Min, doNotAnimate)
94
94
  end
95
95
 
96
96
  -- Scrolls to the bottom
97
- function ScrollingFrame:ScrollToBottom(doNotAnimate)
97
+ function ScrollingFrame:ScrollToBottom(doNotAnimate: boolean?)
98
98
  self:ScrollTo(self._model.Max, doNotAnimate)
99
99
  end
100
100
 
@@ -116,7 +116,7 @@ function ScrollingFrame:_updateRender()
116
116
  error("[ScrollingFrame] - Bad ScrollType")
117
117
  end
118
118
 
119
- for _, scrollbar in pairs(self._scrollbars) do
119
+ for _, scrollbar in self._scrollbars do
120
120
  if scrollbar.Destroy then
121
121
  scrollbar:UpdateRender()
122
122
  else
@@ -182,12 +182,12 @@ function ScrollingFrame:_getVelocityTracker(strength)
182
182
  end
183
183
  end
184
184
 
185
- function ScrollingFrame:_getInputProcessor(inputBeganObject)
185
+ function ScrollingFrame:_getInputProcessor(inputBeganObject: InputObject)
186
186
  local startPos = self._model.Position
187
187
  local updateVelocity = self:_getVelocityTracker()
188
188
  local originalPos = inputBeganObject.Position
189
189
 
190
- return function(inputObject)
190
+ return function(inputObject: InputObject)
191
191
  local distance = (inputObject.Position - originalPos)[self._scrollType.Direction]
192
192
  local pos = startPos - distance
193
193
  self._model.Position = pos