From 017e12ee7e55b0d8586bf3ce5c0a2ff276ad201d Mon Sep 17 00:00:00 2001 From: Remi Schnekenburger Date: Thu, 14 Nov 2024 11:38:01 +0100 Subject: [PATCH] feat: support readonly property ThemeColor id (#14437) fix #14404 contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger --- CHANGELOG.md | 2 ++ packages/core/src/common/theme.ts | 2 +- packages/plugin-ext/src/plugin/types-impl.ts | 2 +- packages/plugin/src/theia.d.ts | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dca6f5fcd8b1..c39fb1adc1ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ +- [plugin] added support for ThemeColor property id [#14437](https://github.com/eclipse-theia/theia/pull/14437) - Contributed on behalf of STMicroelectronics + ## 1.55.0 - 10/31/2024 - [ai] added logic to allow to order and clear AI History view [#14233](https://github.com/eclipse-theia/theia/pull/14233) diff --git a/packages/core/src/common/theme.ts b/packages/core/src/common/theme.ts index 8350011737611..73207acfb2b3c 100644 --- a/packages/core/src/common/theme.ts +++ b/packages/core/src/common/theme.ts @@ -38,7 +38,7 @@ export interface ThemeChangeEvent { } export interface ThemeColor { - id: string; + readonly id: string; } export interface ThemeIcon { diff --git a/packages/plugin-ext/src/plugin/types-impl.ts b/packages/plugin-ext/src/plugin/types-impl.ts index d7a0734259657..1bccfbdc39c0a 100644 --- a/packages/plugin-ext/src/plugin/types-impl.ts +++ b/packages/plugin-ext/src/plugin/types-impl.ts @@ -725,7 +725,7 @@ export class SnippetString { @es5ClassCompat export class ThemeColor { - constructor(public id: string) { } + constructor(public readonly id: string) { } } @es5ClassCompat diff --git a/packages/plugin/src/theia.d.ts b/packages/plugin/src/theia.d.ts index c98c3ccef5691..5a4fe1d8a5722 100644 --- a/packages/plugin/src/theia.d.ts +++ b/packages/plugin/src/theia.d.ts @@ -2696,6 +2696,11 @@ export module '@theia/plugin' { * Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color. */ export class ThemeColor { + /** + * The id of this color. + */ + readonly id: string; + /** * Creates a reference to a theme color. */