rotor-framework 0.3.4 β†’ 0.3.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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Rotor Framework
2
2
 
3
- [![build status](https://img.shields.io/github/actions/workflow/status/mobalazs/rotor-framework/publish.yml?branch=main&logo=github&label=build)](https://github.com/mobalazs/rotor-framework/actions/workflows/publish.yml)[![Coverage Status](https://img.shields.io/coveralls/github/mobalazs/rotor-framework/main?logo=coveralls&logoColor=white&color=brightgreen)](https://coveralls.io/github/mobalazs/rotor-framework?branch=main)
3
+ [![build status](https://img.shields.io/github/actions/workflow/status/mobalazs/rotor-framework/main-workflow.yml?branch=main&logo=github&label=build)](https://github.com/mobalazs/rotor-framework/actions/workflows/main-workflow.yml)
4
+ [![Coverage Status](https://img.shields.io/coveralls/github/mobalazs/rotor-framework/main?logo=coveralls&logoColor=white&color=brightgreen)](https://coveralls.io/github/mobalazs/rotor-framework?branch=main)
4
5
  [![npm version](https://img.shields.io/npm/v/rotor-framework.svg?logo=npm)](https://www.npmjs.com/package/rotor-framework)
5
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square&logo=scale&logoColor=white)](LICENSE)
6
7
  [![Slack](https://img.shields.io/badge/Slack-RokuDevelopers-4A154B?logo=slack)](https://rokudevelopers.slack.com)
@@ -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
- ![Version](https://img.shields.io/badge/version-v0.3.4-blue?label=Documents%20TAG)
93
+ ![Version](https://img.shields.io/badge/version-v0.3.6-blue?label=Documents%20TAG)
93
94
 
94
95
  ### Framework Core
95
96
 
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "rotor-framework",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
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": "npm run collect-coverage && npm run fix-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
- "update-version": "node scripts/update-version.js"
12
+ "update-version": "node scripts/update-version.js",
13
+ "release:patch": "node scripts/release.js patch",
14
+ "release:minor": "node scripts/release.js minor",
15
+ "release:major": "node scripts/release.js major"
16
16
  },
17
17
  "files": [
18
18
  "src/source/base/**/*",
@@ -4,7 +4,7 @@
4
4
  ' β–β–›β–€β–šβ––β–β–Œ β–β–Œ β–ˆ β–β–Œ β–β–Œβ–β–›β–€β–šβ–– β–β–›β–€β–€β–˜β–β–›β–€β–šβ––β–β–›β–€β–œβ–Œβ–β–Œ β–β–Œβ–β–›β–€β–€β–˜β–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–›β–€β–šβ––β–β–›β–šβ––
5
5
  ' β–β–Œ β–β–Œβ–β–šβ–„β–žβ–˜ β–ˆ β–β–šβ–„β–žβ–˜β–β–Œ β–β–Œ β–β–Œ β–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–™β–„β–„β––β–β–™β–ˆβ–Ÿβ–Œβ–β–šβ–„β–žβ–˜β–β–Œ β–β–Œβ–β–Œ β–β–Œ
6
6
  ' Rotor Frameworkβ„’
7
- ' Version 0.3.4
7
+ ' Version 0.3.6
8
8
  ' Β© 2025 BalΓ‘zs MolnΓ‘r β€” MIT License
9
9
  ' =========================================================================
10
10
 
@@ -85,7 +85,7 @@ namespace Rotor
85
85
  class Framework
86
86
 
87
87
  name = "Rotor Framework"
88
- version = "0.3.4"
88
+ version = "0.3.6"
89
89
 
90
90
  config = {
91
91
  tasks: invalid, ' @array (optional)
@@ -382,7 +382,7 @@ namespace Rotor
382
382
  #if debug
383
383
  print `[DEVICEINFO] Graphics Platform: ${m.info.device.graphicsPlatform}`
384
384
  print `[DEVICEINFO] modelDisplayName: ${m.info.device.modelDisplayName}`
385
- 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}`
386
386
  #end if
387
387
  end sub
388
388
 
@@ -4,7 +4,7 @@
4
4
  ' β–β–›β–€β–šβ––β–β–Œ β–β–Œ β–ˆ β–β–Œ β–β–Œβ–β–›β–€β–šβ–– β–β–›β–€β–€β–˜β–β–›β–€β–šβ––β–β–›β–€β–œβ–Œβ–β–Œ β–β–Œβ–β–›β–€β–€β–˜β–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–›β–€β–šβ––β–β–›β–šβ––
5
5
  ' β–β–Œ β–β–Œβ–β–šβ–„β–žβ–˜ β–ˆ β–β–šβ–„β–žβ–˜β–β–Œ β–β–Œ β–β–Œ β–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–™β–„β–„β––β–β–™β–ˆβ–Ÿβ–Œβ–β–šβ–„β–žβ–˜β–β–Œ β–β–Œβ–β–Œ β–β–Œ
6
6
  ' Rotor Frameworkβ„’
7
- ' Version 0.3.4
7
+ ' Version 0.3.6
8
8
  ' Β© 2025 BalΓ‘zs MolnΓ‘r β€” MIT License
9
9
  ' =========================================================================
10
10
 
@@ -70,7 +70,7 @@ namespace Rotor
70
70
  class FrameworkTask
71
71
 
72
72
  name = "Rotor Framework"
73
- version = "0.3.4"
73
+ version = "0.3.6"
74
74
 
75
75
  config = {
76
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
- m.locale = "en_US"
33
- m.isRTL = m.detectRTL(m.locale)
34
- ' m.locale = frameworkInstance.getInfo().device.currentLocale
35
- ' m.frameworkInstance = frameworkInstance
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
- ' setLocal - Sets the current locale and updates RTL flag
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 setLocal(locale as string)
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
- ' m.frameworkInstance = invalid
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