@linear_non/stellar-libs 1.1.8 → 1.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linear_non/stellar-libs",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Reusable JavaScript libraries for Non-Linear Studio projects.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -44,7 +44,7 @@ export default class Smooth {
44
44
  bottom,
45
45
  offset,
46
46
  speed,
47
- out: true,
47
+ out: false,
48
48
  transform: 0,
49
49
  _roundedY: 0,
50
50
  })
@@ -43,6 +43,7 @@ export default class SplitonScroll {
43
43
  this._readyFired = false
44
44
  this._rebuilding = false
45
45
  this._entering = false
46
+ this._hasEntered = false
46
47
 
47
48
  if (!this.element || !this.targets.length) {
48
49
  this._notifyReadyOnce([])
@@ -67,7 +68,7 @@ export default class SplitonScroll {
67
68
  if (this._readyFired) return
68
69
  this._readyFired = true
69
70
 
70
- this.isReadyCallback(splits, groups)
71
+ this.isReadyCallback({ splits, groups })
71
72
  this._resolveReady?.({ splits, groups })
72
73
  this._resolveReady = null
73
74
  }
@@ -125,6 +126,7 @@ export default class SplitonScroll {
125
126
  this.splits = splits
126
127
  this.groups = groups
127
128
  this._entering = false
129
+ this._hasEntered = true
128
130
 
129
131
  this._notifyReadyOnce(splits, groups)
130
132
  }
@@ -149,16 +151,20 @@ export default class SplitonScroll {
149
151
  this.groups = groups
150
152
  this._rebuilding = false
151
153
 
152
- this.isResizeCallback(splits, groups)
154
+ this.isResizeCallback({ splits, groups })
153
155
  }
154
156
 
155
157
  handleLeave() {
158
+ // Don't reverse if we haven't fully entered yet
159
+ if (!this._hasEntered) return
160
+
156
161
  if (this.splits) {
157
162
  reverseSplit(this.splits)
158
163
  this.splits = null
159
164
  this.groups = null
160
165
  }
161
166
 
167
+ this._hasEntered = false
162
168
  this.reverseCallback()
163
169
 
164
170
  if (this.once) {