@lightningjs/blits 1.35.2 → 1.35.4

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
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.35.3
4
+
5
+ _03 Aug 2025_
6
+
7
+ - Changed order of `focus`-hook and `hasFocus` variable to distinguish between focus and refocus
8
+ - Updated focus related documentation
9
+
10
+ ## v1.35.3
11
+
12
+ _31 Jul 2025_
13
+
14
+ - Fixed issue with navigation data being overridden by route data.
15
+ - Fixed issue with incorrect focus chain paths.
16
+
3
17
  ## v1.35.2
4
18
 
5
19
  _25 Jul 2025_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightningjs/blits",
3
- "version": "1.35.2",
3
+ "version": "1.35.4",
4
4
  "description": "Blits: The Lightning 3 App Development Framework",
5
5
  "bin": "bin/index.js",
6
6
  "exports": {
package/src/focus.js CHANGED
@@ -44,7 +44,7 @@ export default {
44
44
  // early return if already focused
45
45
  if (component === focusedComponent) return
46
46
 
47
- if (focusChain.length === 0) {
47
+ if (focusedComponent === null) {
48
48
  focusChain = getAncestors([component])
49
49
  }
50
50
 
@@ -77,12 +77,13 @@ export default {
77
77
  this.previous = this.current
78
78
  this.current = v
79
79
  if (v === 'refocus') return
80
- if (v === 'focus') this.component[symbols.state].hasFocus = true
81
- if (v === 'unfocus') this.component[symbols.state].hasFocus = false
82
80
  // emit 'private' hook
83
81
  privateEmit(v, this.component[symbols.identifier], this.component)
84
82
  // emit 'public' hook
85
83
  emit(v, this.component[symbols.identifier], this.component)
84
+ // update the built-in hasFocus state variable
85
+ if (v === 'focus') this.component[symbols.state].hasFocus = true
86
+ if (v === 'unfocus') this.component[symbols.state].hasFocus = false
86
87
  }
87
88
  },
88
89
  }
@@ -216,8 +216,8 @@ export const navigate = async function () {
216
216
  }
217
217
 
218
218
  route.data = {
219
- ...navigationData,
220
219
  ...route.data,
220
+ ...navigationData,
221
221
  ...queryParamsData,
222
222
  }
223
223
  // Adding the location hash to the route if it exists.