diff --git a/src/common/cluster-store/allowed-resources-injection-token.ts b/src/common/cluster-store/allowed-resources-injection-token.ts index ad387d26a2..353d0b309c 100644 --- a/src/common/cluster-store/allowed-resources-injection-token.ts +++ b/src/common/cluster-store/allowed-resources-injection-token.ts @@ -6,8 +6,6 @@ import { getInjectionToken } from "@ogre-tools/injectable"; import type { IComputedValue } from "mobx"; -export const allowedResourcesInjectionToken = getInjectionToken< - IComputedValue> ->({ +export const allowedResourcesInjectionToken = getInjectionToken>>({ id: "allowed-resources", }); diff --git a/src/extensions/renderer-api/theming.ts b/src/extensions/renderer-api/theming.ts index a39efc80b7..435cf23504 100644 --- a/src/extensions/renderer-api/theming.ts +++ b/src/extensions/renderer-api/theming.ts @@ -3,11 +3,17 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import themeStoreInjectable from "../../renderer/themes/store.injectable"; +import activeThemeInjectable from "../../renderer/themes/active.injectable"; +import type { LensTheme } from "../../renderer/themes/store"; import { asLegacyGlobalForExtensionApi } from "../as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api"; -const themeStore = asLegacyGlobalForExtensionApi(themeStoreInjectable); +export const activeTheme = asLegacyGlobalForExtensionApi(activeThemeInjectable); +/** + * @deprecated This hides the reactivity of active theme, use {@link activeTheme} instead + */ export function getActiveTheme() { - return themeStore.activeTheme; + return activeTheme.get(); } + +export type { LensTheme }; diff --git a/src/features/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap b/src/features/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap index 3dccc2e925..b9d854220c 100644 --- a/src/features/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap +++ b/src/features/cluster/__snapshots__/order-of-sidebar-items.test.tsx.snap @@ -350,6 +350,7 @@ exports[`cluster - order of sidebar items when rendered renders 1`] = `
+
+
+
+