Skip to content

Commit 8a841d7

Browse files
Merge pull request #408 from rdkcentral/release/5.5.0
Release/5.5.0
2 parents 9055aa2 + b6d8a78 commit 8a841d7

File tree

11 files changed

+182
-144
lines changed

11 files changed

+182
-144
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v5.5.0
4+
5+
*26 oct 2023*
6+
7+
- Added colors type definitions ([#394](https://github.com/rdkcentral/Lightning-SDK/issues/394))
8+
- Added support to allow Colors to take ARGB values([#399](https://github.com/rdkcentral/Lightning-SDK/issues/399))
9+
- Added condition for c2d upon app close([#403](https://github.com/rdkcentral/Lightning-SDK/issues/403))
10+
- Fixed Router cross fade issue([#406](https://github.com/rdkcentral/Lightning-SDK/issues/406))
11+
312
## v5.4.1
413

514
*30 aug 2023*

docs/changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## v5.5.0
4+
5+
*26 oct 2023*
6+
7+
- Added colors type definitions ([#394](https://github.com/rdkcentral/Lightning-SDK/issues/394))
8+
- Added support to allow Colors to take ARGB values([#399](https://github.com/rdkcentral/Lightning-SDK/issues/399))
9+
- Added condition for c2d upon app close([#403](https://github.com/rdkcentral/Lightning-SDK/issues/403))
10+
- Fixed Router cross fade issue([#406](https://github.com/rdkcentral/Lightning-SDK/issues/406))
11+
312
## v5.4.1
413

514
*30 aug 2023*

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "5.4.1",
3+
"version": "5.5.0",
44
"license": "Apache-2.0",
55
"types": "index.d.ts",
66
"scripts": {

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const Ads: any; // export { default as Ads } from './src/Ads'
2222
export { AppData, FontFaceDefinition } from './src/Application/index.js';
2323
export { default as Application } from './src/Application/index.js';
2424
export const AudioPlayer: any; // export { default as AudioPlayer } from './src/AudioPlayer'
25-
export const Colors: any; // export { default as Colors } from './src/Colors'
25+
export { default as Colors } from './src/Colors'
2626
export { default as Img } from './src/Img/index.js';
2727
export const Keyboard: any; // export { default as Keyboard } from './src/Keyboard'
2828
export { default as Launch } from './src/Launch/index.js';

package-lock.json

Lines changed: 140 additions & 136 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/sdk",
3-
"version": "5.4.1",
3+
"version": "5.5.0",
44
"license": "Apache-2.0",
55
"types": "index.d.ts",
66
"scripts": {

src/Colors/index.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export type ColorTransform = {
2+
alpha(value: number): ColorTransform;
3+
hue(value: number): ColorTransform;
4+
lightness(value: number): ColorTransform;
5+
saturation(value: number): ColorTransform;
6+
lighter(value: number): ColorTransform;
7+
darker(value: number): ColorTransform;
8+
mix(color: string, percentage: number): ColorTransform;
9+
get(): number;
10+
};
11+
12+
export type Colors = {
13+
(colorName: string): ColorTransform;
14+
} & {
15+
[colorName: string]: ColorTransform;
16+
};

src/Colors/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const normalizeColorToARGB = color => {
7979
if (!targetColor) {
8080
targetColor = color
8181
}
82-
const check = /^#([0-9A-F]{3}|[0-9A-F]{6})$/i
82+
const check = /^#([0-9A-F]{3}|[0-9A-F]{6}|[0-9A-F]{8})$/i
8383
if (isString(targetColor) && check.test(targetColor)) {
8484
let hex = check.exec(targetColor)[1]
8585
if (hex.length === 3) {
@@ -90,7 +90,7 @@ const normalizeColorToARGB = color => {
9090
})
9191
.join('')
9292
}
93-
targetColor = `0xff${hex}` * 1
93+
targetColor = (hex.length === 8 ? `0x${hex}` : `0xff${hex}`) * 1
9494
}
9595
if (!normalizedColors[color]) {
9696
normalizedColors[color] = targetColor

src/Router/utils/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ const cleanUp = (page, request) => {
433433
x: 0,
434434
y: 0,
435435
scale: 1,
436-
alpha: 1,
437436
visible: false,
437+
alpha: 1,
438438
})
439439
}
440440
}

src/startApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const getSettings = () => {
112112
if (stage.gl) {
113113
stage.gl.clearColor(0.0, 0.0, 0.0, 0.0)
114114
stage.gl.clear(stage.gl.COLOR_BUFFER_BIT)
115-
} else {
115+
} else if(stage.c2d) {
116116
stage.c2d.clearRect(0, 0, canvas.width, canvas.height)
117117
}
118118
}

0 commit comments

Comments
 (0)