rotor-framework 0.3.3 β 0.3.5
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/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Rotor Framework
|
|
2
2
|
|
|
3
|
-
[](https://github.com/mobalazs/rotor-framework/actions/workflows/main-workflow.yml)
|
|
4
|
+
[](https://coveralls.io/github/mobalazs/rotor-framework?branch=main)
|
|
4
5
|
[](https://www.npmjs.com/package/rotor-framework)
|
|
5
|
-
[](
|
|
6
|
+
[](LICENSE)
|
|
6
7
|
[](https://rokudevelopers.slack.com)
|
|
7
8
|
|
|
8
9
|
**Rotor** is a modular, ViewModel-first UI framework for Roku applications built with BrighterScript and SceneGraph. It is lightweight and designed to intuitively speed up development time while simplifying both the implementation and long-term maintenance process. It features a rich ViewBuilder system and a Roku-friendly implementation of the MVI (Model-View-Intent) design pattern. It helps developers structure large-scale apps with reusable components, state-driven logic, and optimized rendering.
|
|
@@ -89,7 +90,7 @@ You can find [π±](./docs/ai/readme.opt.yaml) symbols in all documentation page
|
|
|
89
90
|
|
|
90
91
|
## π Learn More
|
|
91
92
|
|
|
92
|
-

|
|
93
94
|
|
|
94
95
|
### Framework Core
|
|
95
96
|
|
|
@@ -127,8 +128,8 @@ You can find [π±](./docs/ai/readme.opt.yaml) symbols in all documentation page
|
|
|
127
128
|
|
|
128
129
|
## π License
|
|
129
130
|
|
|
130
|
-
Rotor is
|
|
131
|
+
Rotor Frameworkβ’ is licensed under the [MIT License](LICENSE).
|
|
131
132
|
|
|
132
|
-
|
|
133
|
+
Β© 2025 BalΓ‘zs MolnΓ‘r β Rotor Frameworkβ’
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
---
|
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rotor-framework",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.5",
|
|
4
|
+
"description": "Roku toolkit library providing a ViewBuilder, full UI lifecycle with focus handling and many core features, plus MVI-based state management.",
|
|
5
5
|
"author": "BalΓ‘zs MolnΓ‘r",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "bsc --project bsconfig.json --createPackage=false",
|
|
9
9
|
"build-tests": "bsc --project bsconfig-tests.json --createPackage=false",
|
|
10
|
-
"coverage": "
|
|
11
|
-
"collect-coverage": "node scripts/collect-coverage.js",
|
|
12
|
-
"fix-coverage": "node scripts/fix-coverage-paths.js",
|
|
10
|
+
"coverage": "node scripts/collect-coverage.js",
|
|
13
11
|
"lint": "npx bslint --project bsconfig.json --lintConfig bslint.json",
|
|
14
|
-
"linter": "bsc --create-package --copy-to-staging false",
|
|
15
12
|
"update-version": "node scripts/update-version.js"
|
|
16
13
|
},
|
|
17
14
|
"files": [
|
|
@@ -23,7 +20,7 @@
|
|
|
23
20
|
"src/source/RotorFramework.bs",
|
|
24
21
|
"src/source/RotorFrameworkTask.bs",
|
|
25
22
|
"README.md",
|
|
26
|
-
"LICENSE
|
|
23
|
+
"LICENSE",
|
|
27
24
|
"!src/source/**/*.spec.bs"
|
|
28
25
|
],
|
|
29
26
|
"publishConfig": {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
'
|
|
1
|
+
' =========================================================================
|
|
2
2
|
' ββββ βββββββββββ ββββ βββββββββ βββ ββ βββββββββ ββ βββ ββββ ββ ββ
|
|
3
3
|
' ββ ββββ ββ β ββ ββββ ββ ββ ββ ββββ ββββββββββ ββ ββββ ββββ βββββββ
|
|
4
4
|
' βββββββ ββ β ββ βββββββ βββββββββββββββββ βββββββββ ββββ βββββββββββ
|
|
5
5
|
' ββ βββββββ β βββββββ ββ ββ ββ ββββ ββββ βββββββββββββββββββ ββββ ββ
|
|
6
|
-
' Rotor Frameworkβ’
|
|
7
|
-
' Version 0.3.
|
|
8
|
-
'
|
|
6
|
+
' Rotor Frameworkβ’
|
|
7
|
+
' Version 0.3.5
|
|
8
|
+
' Β© 2025 BalΓ‘zs MolnΓ‘r β MIT License
|
|
9
|
+
' =========================================================================
|
|
9
10
|
|
|
10
11
|
' constants
|
|
11
12
|
import "engine/Constants.bs"
|
|
@@ -84,7 +85,7 @@ namespace Rotor
|
|
|
84
85
|
class Framework
|
|
85
86
|
|
|
86
87
|
name = "Rotor Framework"
|
|
87
|
-
version = "0.3.
|
|
88
|
+
version = "0.3.5"
|
|
88
89
|
|
|
89
90
|
config = {
|
|
90
91
|
tasks: invalid, ' @array (optional)
|
|
@@ -381,7 +382,7 @@ namespace Rotor
|
|
|
381
382
|
#if debug
|
|
382
383
|
print `[DEVICEINFO] Graphics Platform: ${m.info.device.graphicsPlatform}`
|
|
383
384
|
print `[DEVICEINFO] modelDisplayName: ${m.info.device.modelDisplayName}`
|
|
384
|
-
print `[DEVICEINFO] OSVersion: ${m.info.device.OSVersion}`
|
|
385
|
+
print `[DEVICEINFO] OSVersion: ${m.info.device.OSVersion.major}.${m.info.device.OSVersion.minor}.${m.info.device.OSVersion.revision}.${m.info.device.OSVersion.build}`
|
|
385
386
|
#end if
|
|
386
387
|
end sub
|
|
387
388
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
'
|
|
1
|
+
' =========================================================================
|
|
2
2
|
' ββββ βββββββββββ ββββ βββββββββ βββ ββ βββββββββ ββ βββ ββββ ββ ββ
|
|
3
3
|
' ββ ββββ ββ β ββ ββββ ββ ββ ββ ββββ ββββββββββ ββ ββββ ββββ βββββββ
|
|
4
4
|
' βββββββ ββ β ββ βββββββ βββββββββββββββββ βββββββββ ββββ βββββββββββ
|
|
5
5
|
' ββ βββββββ β βββββββ ββ ββ ββ ββββ ββββ βββββββββββββββββββ ββββ ββ
|
|
6
|
-
' Rotor Frameworkβ’
|
|
7
|
-
' Version 0.3.
|
|
8
|
-
'
|
|
6
|
+
' Rotor Frameworkβ’
|
|
7
|
+
' Version 0.3.5
|
|
8
|
+
' Β© 2025 BalΓ‘zs MolnΓ‘r β MIT License
|
|
9
|
+
' =========================================================================
|
|
9
10
|
|
|
10
11
|
' constants
|
|
11
12
|
import "engine/Constants.bs"
|
|
@@ -69,7 +70,7 @@ namespace Rotor
|
|
|
69
70
|
class FrameworkTask
|
|
70
71
|
|
|
71
72
|
name = "Rotor Framework"
|
|
72
|
-
version = "0.3.
|
|
73
|
+
version = "0.3.5"
|
|
73
74
|
|
|
74
75
|
config = {
|
|
75
76
|
tasks: invalid, ' optional
|
|
@@ -18,6 +18,7 @@ namespace Rotor.ViewBuilder
|
|
|
18
18
|
cache = {}
|
|
19
19
|
locale as string
|
|
20
20
|
isRTL = false
|
|
21
|
+
rootWidget as Rotor.Widget
|
|
21
22
|
frameworkInstance as Rotor.Framework
|
|
22
23
|
|
|
23
24
|
' RTL language codes
|
|
@@ -29,20 +30,25 @@ namespace Rotor.ViewBuilder
|
|
|
29
30
|
' @param {Rotor.Framework} frameworkInstance - Framework instance reference
|
|
30
31
|
'
|
|
31
32
|
sub init(frameworkInstance as Rotor.Framework)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'
|
|
35
|
-
|
|
33
|
+
' Set current locale from framework device info
|
|
34
|
+
currentLocale = frameworkInstance.getInfo().device.currentLocale
|
|
35
|
+
' Store rootWidget reference
|
|
36
|
+
m.rootWidget = frameworkInstance.getRootWidget()
|
|
37
|
+
' Store current locale
|
|
38
|
+
m.setLocale(currentLocale)
|
|
36
39
|
end sub
|
|
37
40
|
|
|
38
41
|
' ---------------------------------------------------------------------
|
|
39
|
-
'
|
|
42
|
+
' setLocale - Sets the current locale and updates RTL flag
|
|
40
43
|
'
|
|
41
44
|
' @param {string} locale - Locale string (e.g., "en_US", "ar_SA")
|
|
42
45
|
'
|
|
43
|
-
sub
|
|
46
|
+
sub setLocale(locale as string)
|
|
44
47
|
m.locale = locale
|
|
45
48
|
m.isRTL = m.detectRTL(locale)
|
|
49
|
+
' update root widget's locale and isRTL
|
|
50
|
+
m.rootWidget.viewModelState.locale = m.locale
|
|
51
|
+
m.rootWidget.viewModelState.isRTL = m.isRTL
|
|
46
52
|
end sub
|
|
47
53
|
|
|
48
54
|
' ---------------------------------------------------------------------
|
|
@@ -82,6 +88,10 @@ namespace Rotor.ViewBuilder
|
|
|
82
88
|
'
|
|
83
89
|
sub setL10n(l10n as object)
|
|
84
90
|
m.l10n = l10n
|
|
91
|
+
|
|
92
|
+
' Update root widget's l10n reference
|
|
93
|
+
m.rootWidget.viewModelState.l10n = m.l10n
|
|
94
|
+
|
|
85
95
|
m.refreshCache()
|
|
86
96
|
end sub
|
|
87
97
|
|
|
@@ -92,6 +102,7 @@ namespace Rotor.ViewBuilder
|
|
|
92
102
|
'
|
|
93
103
|
sub extendL10n(l10n as object)
|
|
94
104
|
Rotor.Utils.deepExtendAA(m.l10n, l10n)
|
|
105
|
+
m.rootWidget.viewModelState.l10n = m.l10n
|
|
95
106
|
m.refreshCache()
|
|
96
107
|
end sub
|
|
97
108
|
|
|
@@ -99,7 +110,7 @@ namespace Rotor.ViewBuilder
|
|
|
99
110
|
' destroy - Cleans up cache and l10n data
|
|
100
111
|
'
|
|
101
112
|
sub destroy()
|
|
102
|
-
|
|
113
|
+
m.rootWidget = invalid
|
|
103
114
|
m.cache.Clear()
|
|
104
115
|
m.l10n.Clear()
|
|
105
116
|
end sub
|
|
@@ -110,7 +121,6 @@ namespace Rotor.ViewBuilder
|
|
|
110
121
|
' @private
|
|
111
122
|
'
|
|
112
123
|
sub refreshCache()
|
|
113
|
-
m.cache.Clear()
|
|
114
124
|
for each cacheKey in m.cache
|
|
115
125
|
m.cache[cacheKey] = Rotor.Utils.getCloneByKeyPath(m.l10n, cacheKey)
|
|
116
126
|
end for
|
|
File without changes
|