@linear_non/stellar-libs 1.1.1 → 1.1.3

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.1",
3
+ "version": "1.1.3",
4
4
  "description": "Reusable JavaScript libraries for Non-Linear Studio projects.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "author": "Non-Linear Studio",
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@linear_non/stellar-kit": "^2.1.21"
28
+ "@linear_non/stellar-kit": "3.0.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@linear_non/prettier-config": "^1.0.6",
@@ -12,6 +12,7 @@ export default class Smooth {
12
12
  this.sections = null
13
13
  this.scrollbar = null
14
14
  this.dpr = Math.max(1, Math.round(window.devicePixelRatio || 1))
15
+
15
16
  this.init()
16
17
  }
17
18
 
@@ -53,6 +54,8 @@ export default class Smooth {
53
54
  tick = ({ current }) => {
54
55
  const { isSmooth, isResizing } = kitStore.flags
55
56
  if (!isSmooth || isResizing) return
57
+ console.log("Test Log: ", current)
58
+
56
59
  this.current = current
57
60
  this.transformSections()
58
61
  }
@@ -13,7 +13,7 @@ function normalizeTargets(splitTargets) {
13
13
  export default class SplitonScroll {
14
14
  constructor({
15
15
  el,
16
- splitTargets,
16
+ splitText: splitTargets,
17
17
  isReady,
18
18
  reverse,
19
19
  resize,
@@ -42,6 +42,7 @@ export default class SplitonScroll {
42
42
 
43
43
  this._readyFired = false
44
44
  this._rebuilding = false
45
+ this._entering = false
45
46
 
46
47
  if (!this.element || !this.targets.length) {
47
48
  this._notifyReadyOnce([])
@@ -98,6 +99,10 @@ export default class SplitonScroll {
98
99
  }
99
100
 
100
101
  async handleEnter() {
102
+ // Prevent double-split if already entering or already split
103
+ if (this._entering || this.splits) return
104
+ this._entering = true
105
+
101
106
  const splitEmitter = splitText(this.targets)
102
107
 
103
108
  const { splits, groups } = await new Promise(resolve => {
@@ -119,6 +124,7 @@ export default class SplitonScroll {
119
124
 
120
125
  this.splits = splits
121
126
  this.groups = groups
127
+ this._entering = false
122
128
 
123
129
  this._notifyReadyOnce(splits, groups)
124
130
  }