@lightningjs/blits 2.0.0-beta.6 → 2.0.0-beta.7
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/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/component/setup/state.js +1 -1
- package/src/component.js +2 -2
- package/src/lib/lifecycle.js +2 -2
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightningjs/blits",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.7",
|
|
4
4
|
"description": "Blits: The Lightning 3 App Development Framework",
|
|
5
5
|
"bin": "bin/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"tape": "^5.5.0"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@lightningjs/renderer": "3.0.0-
|
|
79
|
+
"@lightningjs/renderer": "^3.0.0-beta23",
|
|
80
80
|
"magic-string": "^0.30.21"
|
|
81
81
|
},
|
|
82
82
|
"repository": {
|
|
@@ -37,7 +37,7 @@ export default (component, state = () => {}) => {
|
|
|
37
37
|
stateKeys.push('$hasFocus')
|
|
38
38
|
}
|
|
39
39
|
// add built-in isHovered key
|
|
40
|
-
stateKeys.push(['isHovered'])
|
|
40
|
+
stateKeys.push(['$isHovered'])
|
|
41
41
|
const stateKeysLength = stateKeys.length
|
|
42
42
|
|
|
43
43
|
for (let i = 0; i < stateKeysLength; i++) {
|
package/src/component.js
CHANGED
|
@@ -246,8 +246,8 @@ const Component = (name = required('name'), config = required('config')) => {
|
|
|
246
246
|
// add $hasFocus key in
|
|
247
247
|
this[symbols.originalState]['$hasFocus'] = false
|
|
248
248
|
|
|
249
|
-
// add isHovered key in
|
|
250
|
-
this[symbols.originalState]['isHovered'] = false
|
|
249
|
+
// add $isHovered key in
|
|
250
|
+
this[symbols.originalState]['$isHovered'] = false
|
|
251
251
|
|
|
252
252
|
// generate a reactive state (using the result of previously execute state function)
|
|
253
253
|
// and store it
|
package/src/lib/lifecycle.js
CHANGED
|
@@ -93,8 +93,8 @@ export default {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
// update the built-in isHovered state variable
|
|
96
|
-
if (v === 'hover') this.component[symbols.state]
|
|
97
|
-
if (v === 'unhover') this.component[symbols.state]
|
|
96
|
+
if (v === 'hover') this.component[symbols.state].$isHovered = true
|
|
97
|
+
if (v === 'unhover') this.component[symbols.state].$isHovered = false
|
|
98
98
|
if (v === 'focus') {
|
|
99
99
|
this.component[symbols.state].$hasFocus = true
|
|
100
100
|
if (
|