@lightningjs/blits 0.9.5 → 0.9.6
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 +46 -39
- package/package.json +2 -2
- package/src/application.d.ts +25 -0
- package/src/components/Circle.js +27 -30
- package/src/components/Circle.orig.js +29 -3
- package/src/components/FPScounter.js +1024 -1078
- package/src/components/FPScounter.orig.js +1024 -41
- package/src/components/Image.js +18 -21
- package/src/components/Image.orig.js +20 -2
- package/src/components/RouterView.js +17 -20
- package/src/components/RouterView.orig.js +19 -3
- package/src/components/Sprite.js +23 -27
- package/src/components/Sprite.orig.js +25 -3
- package/src/components/Text.js +53 -57
- package/src/components/Text.orig.js +55 -21
- package/src/lib/codegenerator/generator.js +8 -5
- package/src/router/router.js +22 -4
package/src/components/Image.js
CHANGED
|
@@ -19,29 +19,26 @@ import Component from '../component.js'
|
|
|
19
19
|
|
|
20
20
|
export default () =>
|
|
21
21
|
Component('Image', {
|
|
22
|
-
/* eslint-disable no-unused-vars */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
/* eslint-disable no-unused-vars */
|
|
23
|
+
code: { render: function anonymous(parent,component,context
|
|
24
|
+
) {
|
|
25
|
+
const elms = []
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (!elms[0].nodeId) {
|
|
33
|
-
elms[0].populate(elementConfig0)
|
|
34
|
-
}
|
|
27
|
+
if(!elms[0]) {
|
|
28
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
29
|
+
}
|
|
30
|
+
const elementConfig0 = {}
|
|
31
|
+
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
if(!elms[0].nodeId) {
|
|
34
|
+
elms[0].populate(elementConfig0)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return elms
|
|
38
|
+
}, effects: [function anonymous(component,elms,context
|
|
39
|
+
) {
|
|
40
|
+
elms[0].set('imageSource', component.imageSource)
|
|
41
|
+
}], context: {}},
|
|
45
42
|
props: ['src'],
|
|
46
43
|
computed: {
|
|
47
44
|
imageSource() {
|
|
@@ -19,8 +19,26 @@ import Component from '../component.js'
|
|
|
19
19
|
|
|
20
20
|
export default () =>
|
|
21
21
|
Component('Image', {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
/* eslint-disable no-unused-vars */
|
|
23
|
+
code: { render: function anonymous(parent,component,context
|
|
24
|
+
) {
|
|
25
|
+
const elms = []
|
|
26
|
+
|
|
27
|
+
if(!elms[0]) {
|
|
28
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
29
|
+
}
|
|
30
|
+
const elementConfig0 = {}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if(!elms[0].nodeId) {
|
|
34
|
+
elms[0].populate(elementConfig0)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return elms
|
|
38
|
+
}, effects: [function anonymous(component,elms,context
|
|
39
|
+
) {
|
|
40
|
+
elms[0].set('imageSource', component.imageSource)
|
|
41
|
+
}], context: {}},
|
|
24
42
|
props: ['src'],
|
|
25
43
|
computed: {
|
|
26
44
|
imageSource() {
|
|
@@ -22,28 +22,25 @@ let handler
|
|
|
22
22
|
|
|
23
23
|
export default () =>
|
|
24
24
|
Component('RouterView', {
|
|
25
|
-
/* eslint-disable no-unused-vars */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
/* eslint-disable no-unused-vars */
|
|
26
|
+
code: { render: function anonymous(parent,component,context
|
|
27
|
+
) {
|
|
28
|
+
const elms = []
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
if(!elms[0]) {
|
|
31
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
32
|
+
}
|
|
33
|
+
const elementConfig0 = {}
|
|
34
|
+
|
|
35
|
+
elementConfig0['w'] = parent.node.width * (100 / 100)
|
|
36
|
+
elementConfig0['height'] = parent.node.height * (100 / 100)
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return elms
|
|
43
|
-
},
|
|
44
|
-
effects: [],
|
|
45
|
-
context: {},
|
|
46
|
-
},
|
|
38
|
+
if(!elms[0].nodeId) {
|
|
39
|
+
elms[0].populate(elementConfig0)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return elms
|
|
43
|
+
}, effects: [], context: {}},
|
|
47
44
|
state() {
|
|
48
45
|
return {
|
|
49
46
|
activeView: null,
|
|
@@ -22,9 +22,25 @@ let handler
|
|
|
22
22
|
|
|
23
23
|
export default () =>
|
|
24
24
|
Component('RouterView', {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/* eslint-disable no-unused-vars */
|
|
26
|
+
code: { render: function anonymous(parent,component,context
|
|
27
|
+
) {
|
|
28
|
+
const elms = []
|
|
29
|
+
|
|
30
|
+
if(!elms[0]) {
|
|
31
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
32
|
+
}
|
|
33
|
+
const elementConfig0 = {}
|
|
34
|
+
|
|
35
|
+
elementConfig0['w'] = parent.node.width * (100 / 100)
|
|
36
|
+
elementConfig0['height'] = parent.node.height * (100 / 100)
|
|
37
|
+
|
|
38
|
+
if(!elms[0].nodeId) {
|
|
39
|
+
elms[0].populate(elementConfig0)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return elms
|
|
43
|
+
}, effects: [], context: {}},
|
|
28
44
|
state() {
|
|
29
45
|
return {
|
|
30
46
|
activeView: null,
|
package/src/components/Sprite.js
CHANGED
|
@@ -21,35 +21,31 @@ import symbols from '../lib/symbols.js'
|
|
|
21
21
|
|
|
22
22
|
export default () =>
|
|
23
23
|
Component('Sprite', {
|
|
24
|
-
/* eslint-disable no-unused-vars */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
/* eslint-disable no-unused-vars */
|
|
25
|
+
code: { render: function anonymous(parent,component,context
|
|
26
|
+
) {
|
|
27
|
+
const elms = []
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!elms[0].nodeId) {
|
|
38
|
-
elms[0].populate(elementConfig0)
|
|
39
|
-
}
|
|
29
|
+
if(!elms[0]) {
|
|
30
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
31
|
+
}
|
|
32
|
+
const elementConfig0 = {}
|
|
33
|
+
|
|
34
|
+
elementConfig0['w'] = parent.node.width * (100 / 100)
|
|
35
|
+
elementConfig0['h'] = parent.node.height * (100 / 100)
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
if(!elms[0].nodeId) {
|
|
38
|
+
elms[0].populate(elementConfig0)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return elms
|
|
42
|
+
}, effects: [function anonymous(component,elms,context
|
|
43
|
+
) {
|
|
44
|
+
elms[0].set('texture', component.texture)
|
|
45
|
+
},function anonymous(component,elms,context
|
|
46
|
+
) {
|
|
47
|
+
elms[0].set('color', component.color)
|
|
48
|
+
}], context: {}},
|
|
53
49
|
props: ['image', 'map', 'frame', 'color'],
|
|
54
50
|
state() {
|
|
55
51
|
return {
|
|
@@ -21,9 +21,31 @@ import symbols from '../lib/symbols.js'
|
|
|
21
21
|
|
|
22
22
|
export default () =>
|
|
23
23
|
Component('Sprite', {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/* eslint-disable no-unused-vars */
|
|
25
|
+
code: { render: function anonymous(parent,component,context
|
|
26
|
+
) {
|
|
27
|
+
const elms = []
|
|
28
|
+
|
|
29
|
+
if(!elms[0]) {
|
|
30
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
31
|
+
}
|
|
32
|
+
const elementConfig0 = {}
|
|
33
|
+
|
|
34
|
+
elementConfig0['w'] = parent.node.width * (100 / 100)
|
|
35
|
+
elementConfig0['h'] = parent.node.height * (100 / 100)
|
|
36
|
+
|
|
37
|
+
if(!elms[0].nodeId) {
|
|
38
|
+
elms[0].populate(elementConfig0)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return elms
|
|
42
|
+
}, effects: [function anonymous(component,elms,context
|
|
43
|
+
) {
|
|
44
|
+
elms[0].set('texture', component.texture)
|
|
45
|
+
},function anonymous(component,elms,context
|
|
46
|
+
) {
|
|
47
|
+
elms[0].set('color', component.color)
|
|
48
|
+
}], context: {}},
|
|
27
49
|
props: ['image', 'map', 'frame', 'color'],
|
|
28
50
|
state() {
|
|
29
51
|
return {
|
package/src/components/Text.js
CHANGED
|
@@ -20,65 +20,61 @@ import Settings from '../settings.js'
|
|
|
20
20
|
|
|
21
21
|
export default () =>
|
|
22
22
|
Component('Text', {
|
|
23
|
-
/* eslint-disable no-unused-vars */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/* eslint-disable no-unused-vars */
|
|
24
|
+
code: { render: function anonymous(parent,component,context
|
|
25
|
+
) {
|
|
26
|
+
const elms = []
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
if(!elms[0]) {
|
|
29
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
30
|
+
}
|
|
31
|
+
const elementConfig0 = {}
|
|
32
|
+
|
|
33
|
+
elementConfig0['__textnode'] = true
|
|
34
|
+
elementConfig0['fontFamily'] = component.font
|
|
35
|
+
elementConfig0['letterSpacing'] = component.letterspacing
|
|
36
|
+
elementConfig0['lineHeight'] = component._lineheight
|
|
37
|
+
elementConfig0['stretch'] = component.stretch
|
|
38
|
+
elementConfig0['contain'] = component._contain
|
|
39
|
+
elementConfig0['@loaded'] = component['@loaded'] && component['@loaded'].bind(component)
|
|
40
|
+
elementConfig0['@error'] = component['@error'] && component['@error'].bind(component)
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
function anonymous(component, elms, context) {
|
|
71
|
-
elms[0].set('h', component.maxheight)
|
|
72
|
-
},
|
|
73
|
-
function anonymous(component, elms, context) {
|
|
74
|
-
elms[0].set('textAlign', component.align)
|
|
75
|
-
},
|
|
76
|
-
function anonymous(component, elms, context) {
|
|
77
|
-
elms[0].set('overflowSuffix', component.textoverflow)
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
context: {},
|
|
81
|
-
},
|
|
42
|
+
if(!elms[0].nodeId) {
|
|
43
|
+
elms[0].populate(elementConfig0)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return elms
|
|
47
|
+
}, effects: [function anonymous(component,elms,context
|
|
48
|
+
) {
|
|
49
|
+
elms[0].set('text', component.content)
|
|
50
|
+
},function anonymous(component,elms,context
|
|
51
|
+
) {
|
|
52
|
+
elms[0].set('fontSize', component.size)
|
|
53
|
+
},function anonymous(component,elms,context
|
|
54
|
+
) {
|
|
55
|
+
elms[0].set('color', component.color)
|
|
56
|
+
},function anonymous(component,elms,context
|
|
57
|
+
) {
|
|
58
|
+
elms[0].set('style', component.style)
|
|
59
|
+
},function anonymous(component,elms,context
|
|
60
|
+
) {
|
|
61
|
+
elms[0].set('weight', component.weight)
|
|
62
|
+
},function anonymous(component,elms,context
|
|
63
|
+
) {
|
|
64
|
+
elms[0].set('wordWrap', component.wordwrap)
|
|
65
|
+
},function anonymous(component,elms,context
|
|
66
|
+
) {
|
|
67
|
+
elms[0].set('maxLines', component.maxlines)
|
|
68
|
+
},function anonymous(component,elms,context
|
|
69
|
+
) {
|
|
70
|
+
elms[0].set('h', component.maxheight)
|
|
71
|
+
},function anonymous(component,elms,context
|
|
72
|
+
) {
|
|
73
|
+
elms[0].set('textAlign', component.align)
|
|
74
|
+
},function anonymous(component,elms,context
|
|
75
|
+
) {
|
|
76
|
+
elms[0].set('overflowSuffix', component.textoverflow)
|
|
77
|
+
}], context: {}},
|
|
82
78
|
props: [
|
|
83
79
|
'content',
|
|
84
80
|
{
|
|
@@ -20,27 +20,61 @@ import Settings from '../settings.js'
|
|
|
20
20
|
|
|
21
21
|
export default () =>
|
|
22
22
|
Component('Text', {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
23
|
+
/* eslint-disable no-unused-vars */
|
|
24
|
+
code: { render: function anonymous(parent,component,context
|
|
25
|
+
) {
|
|
26
|
+
const elms = []
|
|
27
|
+
|
|
28
|
+
if(!elms[0]) {
|
|
29
|
+
elms[0] = this.element({parent: parent || 'root'}, component)
|
|
30
|
+
}
|
|
31
|
+
const elementConfig0 = {}
|
|
32
|
+
|
|
33
|
+
elementConfig0['__textnode'] = true
|
|
34
|
+
elementConfig0['fontFamily'] = component.font
|
|
35
|
+
elementConfig0['letterSpacing'] = component.letterspacing
|
|
36
|
+
elementConfig0['lineHeight'] = component._lineheight
|
|
37
|
+
elementConfig0['stretch'] = component.stretch
|
|
38
|
+
elementConfig0['contain'] = component._contain
|
|
39
|
+
elementConfig0['@loaded'] = component['@loaded'] && component['@loaded'].bind(component)
|
|
40
|
+
elementConfig0['@error'] = component['@error'] && component['@error'].bind(component)
|
|
41
|
+
|
|
42
|
+
if(!elms[0].nodeId) {
|
|
43
|
+
elms[0].populate(elementConfig0)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return elms
|
|
47
|
+
}, effects: [function anonymous(component,elms,context
|
|
48
|
+
) {
|
|
49
|
+
elms[0].set('text', component.content)
|
|
50
|
+
},function anonymous(component,elms,context
|
|
51
|
+
) {
|
|
52
|
+
elms[0].set('fontSize', component.size)
|
|
53
|
+
},function anonymous(component,elms,context
|
|
54
|
+
) {
|
|
55
|
+
elms[0].set('color', component.color)
|
|
56
|
+
},function anonymous(component,elms,context
|
|
57
|
+
) {
|
|
58
|
+
elms[0].set('style', component.style)
|
|
59
|
+
},function anonymous(component,elms,context
|
|
60
|
+
) {
|
|
61
|
+
elms[0].set('weight', component.weight)
|
|
62
|
+
},function anonymous(component,elms,context
|
|
63
|
+
) {
|
|
64
|
+
elms[0].set('wordWrap', component.wordwrap)
|
|
65
|
+
},function anonymous(component,elms,context
|
|
66
|
+
) {
|
|
67
|
+
elms[0].set('maxLines', component.maxlines)
|
|
68
|
+
},function anonymous(component,elms,context
|
|
69
|
+
) {
|
|
70
|
+
elms[0].set('h', component.maxheight)
|
|
71
|
+
},function anonymous(component,elms,context
|
|
72
|
+
) {
|
|
73
|
+
elms[0].set('textAlign', component.align)
|
|
74
|
+
},function anonymous(component,elms,context
|
|
75
|
+
) {
|
|
76
|
+
elms[0].set('overflowSuffix', component.textoverflow)
|
|
77
|
+
}], context: {}},
|
|
44
78
|
props: [
|
|
45
79
|
'content',
|
|
46
80
|
{
|
|
@@ -218,7 +218,7 @@ const generateForLoopCode = function (templateObject, parent) {
|
|
|
218
218
|
ctx.renderCode.push(`parent = ${parent}`)
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
const
|
|
221
|
+
const forStartCounter = counter
|
|
222
222
|
|
|
223
223
|
// reference all reactive attributes (except those referencing the iterator item),
|
|
224
224
|
// to ensure that reactivity is registered, even when the initial array is empty
|
|
@@ -282,12 +282,15 @@ const generateForLoopCode = function (templateObject, parent) {
|
|
|
282
282
|
ctx.renderCode = ctx.renderCode.concat(ctx.effectsCode)
|
|
283
283
|
ctx.renderCode.push('}')
|
|
284
284
|
|
|
285
|
+
const forEndCounter = counter
|
|
285
286
|
ctx.renderCode.push(`
|
|
286
|
-
if(elms[${
|
|
287
|
-
Object.keys(elms[${
|
|
287
|
+
if(elms[${forStartCounter}]) {
|
|
288
|
+
Object.keys(elms[${forStartCounter}]).forEach(key => {
|
|
288
289
|
if(keys.indexOf(key) === -1) {
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
for(let i=${forStartCounter}; i <= ${forEndCounter}; i++){
|
|
291
|
+
elms[i][key].destroy && elms[i][key].destroy()
|
|
292
|
+
delete elms[i][key]
|
|
293
|
+
}
|
|
291
294
|
}
|
|
292
295
|
})
|
|
293
296
|
}
|
package/src/router/router.js
CHANGED
|
@@ -46,6 +46,9 @@ const normalizePath = (path) => {
|
|
|
46
46
|
.toLowerCase()
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
|
+
const isObject = (v) => typeof v === 'object' && v !== null
|
|
50
|
+
|
|
51
|
+
const isString = (v) => typeof v === 'string'
|
|
49
52
|
|
|
50
53
|
export const matchHash = (path, routes = []) => {
|
|
51
54
|
// remove trailing slashes
|
|
@@ -57,6 +60,7 @@ export const matchHash = (path, routes = []) => {
|
|
|
57
60
|
const route = routes[i]
|
|
58
61
|
route.path = normalizePath(route.path)
|
|
59
62
|
if (route.path === path) {
|
|
63
|
+
route.params = {}
|
|
60
64
|
matchingRoute = route
|
|
61
65
|
} else if (route.path.indexOf(':') > -1) {
|
|
62
66
|
// match dynamic route parts
|
|
@@ -96,6 +100,9 @@ export const matchHash = (path, routes = []) => {
|
|
|
96
100
|
|
|
97
101
|
if (matchingRoute) {
|
|
98
102
|
matchingRoute.options = { ...matchingRoute.options, ...overrideOptions }
|
|
103
|
+
if (!matchingRoute.data) {
|
|
104
|
+
matchingRoute.data = {}
|
|
105
|
+
}
|
|
99
106
|
currentRoute = matchingRoute
|
|
100
107
|
}
|
|
101
108
|
|
|
@@ -107,9 +114,20 @@ export const navigate = async function () {
|
|
|
107
114
|
if (this.parent[symbols.routes]) {
|
|
108
115
|
const previousRoute = currentRoute
|
|
109
116
|
const hash = getHash()
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
let route = matchHash(hash, this.parent[symbols.routes])
|
|
118
|
+
let beforeHookOutput
|
|
112
119
|
if (route) {
|
|
120
|
+
if (route.hooks) {
|
|
121
|
+
if (route.hooks.before) {
|
|
122
|
+
beforeHookOutput = await route.hooks.before(route, previousRoute)
|
|
123
|
+
if (isString(beforeHookOutput)) {
|
|
124
|
+
currentRoute = previousRoute
|
|
125
|
+
to(beforeHookOutput)
|
|
126
|
+
return
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
route = isObject(beforeHookOutput) ? beforeHookOutput : route
|
|
113
131
|
// add the previous route (technically still the current route at this point)
|
|
114
132
|
// into the history stack, unless navigating back or inHistory flag of route is false
|
|
115
133
|
if (navigatingBack === false && previousRoute && previousRoute.options.inHistory === true) {
|
|
@@ -134,8 +152,8 @@ export const navigate = async function () {
|
|
|
134
152
|
holder.populate({})
|
|
135
153
|
holder.set('w', '100%')
|
|
136
154
|
holder.set('h', '100%')
|
|
137
|
-
// merge props with potential route params to be injected into the component instance
|
|
138
|
-
const props = { ...this[symbols.props], ...route.params, ...navigationData }
|
|
155
|
+
// merge props with potential route params, navigation data and route data to be injected into the component instance
|
|
156
|
+
const props = { ...this[symbols.props], ...route.params, ...navigationData, ...route.data }
|
|
139
157
|
|
|
140
158
|
view = await route.component({ props }, holder, this)
|
|
141
159
|
if (view[Symbol.toStringTag] === 'Module') {
|