@instructure/theme-registry
Advanced tools
Comparing version 10.6.1-snapshot-1 to 10.6.1-snapshot-11
@@ -6,3 +6,3 @@ # Change Log | ||
## [10.6.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1-snapshot-1) (2024-11-19) | ||
## [10.6.1-snapshot-11](https://github.com/instructure/instructure-ui/compare/v10.6.0...v10.6.1-snapshot-11) (2024-11-22) | ||
@@ -9,0 +9,0 @@ **Note:** Version bump only for package @instructure/theme-registry |
@@ -32,2 +32,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
* --- | ||
* DEPRECATED. This will be deleted, please use InstUISettingsProvider instead. | ||
* A global theme registry used for registering theme objects, setting globally available themes | ||
@@ -91,3 +92,4 @@ * and receiving the currently used theme. | ||
* Get the global theme registry. | ||
* @return {Registry} the theme registry | ||
* @deprecated since version 10 | ||
* @return The theme registry | ||
* @module getRegistry | ||
@@ -101,2 +103,3 @@ */ | ||
* Set the global theme registry. | ||
* @deprecated since version 10 | ||
* @param {Registry} registry - the registry to set/replace the current registry with. | ||
@@ -112,2 +115,3 @@ * @returns {void} | ||
* Clear/reset the global theme registry. | ||
* @deprecated since version 10 | ||
* @module clearRegistry | ||
@@ -122,2 +126,3 @@ * @returns {void} | ||
* Get the activated theme object. | ||
* @deprecated since version 10 | ||
* @return {RegisteredTheme} the default theme object | ||
@@ -170,2 +175,7 @@ * @module getCurrentTheme | ||
...rest, | ||
/** | ||
* Activate a global theme with the given overrides. | ||
* @deprecated since version 10 | ||
* @param arg | ||
*/ | ||
use(arg) { | ||
@@ -194,5 +204,7 @@ activateTheme(key, (arg === null || arg === void 0 ? void 0 : arg.overrides) || {}); | ||
* Registers the passed theme into the ThemeRegistry. | ||
* @deprecated since version 10 | ||
* @param {BaseTheme} theme - the theme object to register into the ThemeRegistry | ||
* @returns {RegisteredTheme} If the given theme is already in the ThemeRegistry then simply return that theme. | ||
* Otherwise returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* Otherwise, returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* This function also adds a `variables` prop for backwards compatibility (deprecated). | ||
* @module registerTheme | ||
@@ -215,2 +227,6 @@ */ | ||
} | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
const ThemeRegistry = { | ||
@@ -217,0 +233,0 @@ getRegistry, |
@@ -47,2 +47,3 @@ "use strict"; | ||
* --- | ||
* DEPRECATED. This will be deleted, please use InstUISettingsProvider instead. | ||
* A global theme registry used for registering theme objects, setting globally available themes | ||
@@ -102,3 +103,4 @@ * and receiving the currently used theme. | ||
* Get the global theme registry. | ||
* @return {Registry} the theme registry | ||
* @deprecated since version 10 | ||
* @return The theme registry | ||
* @module getRegistry | ||
@@ -112,2 +114,3 @@ */ | ||
* Set the global theme registry. | ||
* @deprecated since version 10 | ||
* @param {Registry} registry - the registry to set/replace the current registry with. | ||
@@ -123,2 +126,3 @@ * @returns {void} | ||
* Clear/reset the global theme registry. | ||
* @deprecated since version 10 | ||
* @module clearRegistry | ||
@@ -133,2 +137,3 @@ * @returns {void} | ||
* Get the activated theme object. | ||
* @deprecated since version 10 | ||
* @return {RegisteredTheme} the default theme object | ||
@@ -181,2 +186,7 @@ * @module getCurrentTheme | ||
...rest, | ||
/** | ||
* Activate a global theme with the given overrides. | ||
* @deprecated since version 10 | ||
* @param arg | ||
*/ | ||
use(arg) { | ||
@@ -205,5 +215,7 @@ activateTheme(key, (arg === null || arg === void 0 ? void 0 : arg.overrides) || {}); | ||
* Registers the passed theme into the ThemeRegistry. | ||
* @deprecated since version 10 | ||
* @param {BaseTheme} theme - the theme object to register into the ThemeRegistry | ||
* @returns {RegisteredTheme} If the given theme is already in the ThemeRegistry then simply return that theme. | ||
* Otherwise returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* Otherwise, returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* This function also adds a `variables` prop for backwards compatibility (deprecated). | ||
* @module registerTheme | ||
@@ -226,2 +238,6 @@ */ | ||
} | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
const ThemeRegistry = exports.ThemeRegistry = { | ||
@@ -228,0 +244,0 @@ getRegistry, |
{ | ||
"name": "@instructure/theme-registry", | ||
"version": "10.6.1-snapshot-1", | ||
"version": "10.6.1-snapshot-11", | ||
"description": "Package for global ThemeRegistry.", | ||
@@ -25,10 +25,10 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"@babel/runtime": "^7.25.6", | ||
"@instructure/console": "10.6.1-snapshot-1", | ||
"@instructure/shared-types": "10.6.1-snapshot-1", | ||
"@instructure/ui-utils": "10.6.1-snapshot-1" | ||
"@instructure/console": "10.6.1-snapshot-11", | ||
"@instructure/shared-types": "10.6.1-snapshot-11", | ||
"@instructure/ui-utils": "10.6.1-snapshot-11" | ||
}, | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "10.6.1-snapshot-1", | ||
"@instructure/ui-test-utils": "10.6.1-snapshot-1" | ||
"@instructure/ui-babel-preset": "10.6.1-snapshot-11", | ||
"@instructure/ui-test-utils": "10.6.1-snapshot-11" | ||
} | ||
} |
@@ -29,2 +29,3 @@ /* | ||
* --- | ||
* DEPRECATED. This will be deleted, please use InstUISettingsProvider instead. | ||
* A global theme registry used for registering theme objects, setting globally available themes | ||
@@ -56,3 +57,10 @@ * and receiving the currently used theme. | ||
type RegisteredTheme<T extends BaseTheme = BaseTheme> = T & { | ||
/** | ||
* @deprecated since version 10 | ||
* @param arg the theme overrides | ||
*/ | ||
use(arg?: { overrides: DeepPartial<BaseThemeVariables> }): void | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
variables: BaseThemeVariables | ||
@@ -120,3 +128,4 @@ } | ||
* Get the global theme registry. | ||
* @return {Registry} the theme registry | ||
* @deprecated since version 10 | ||
* @return The theme registry | ||
* @module getRegistry | ||
@@ -130,2 +139,3 @@ */ | ||
* Set the global theme registry. | ||
* @deprecated since version 10 | ||
* @param {Registry} registry - the registry to set/replace the current registry with. | ||
@@ -141,2 +151,3 @@ * @returns {void} | ||
* Clear/reset the global theme registry. | ||
* @deprecated since version 10 | ||
* @module clearRegistry | ||
@@ -151,2 +162,3 @@ * @returns {void} | ||
* Get the activated theme object. | ||
* @deprecated since version 10 | ||
* @return {RegisteredTheme} the default theme object | ||
@@ -211,2 +223,7 @@ * @module getCurrentTheme | ||
...rest, | ||
/** | ||
* Activate a global theme with the given overrides. | ||
* @deprecated since version 10 | ||
* @param arg | ||
*/ | ||
use(arg?: { overrides: DeepPartial<BaseThemeVariables> }): void { | ||
@@ -233,5 +250,7 @@ activateTheme(key, arg?.overrides || {}) | ||
* Registers the passed theme into the ThemeRegistry. | ||
* @deprecated since version 10 | ||
* @param {BaseTheme} theme - the theme object to register into the ThemeRegistry | ||
* @returns {RegisteredTheme} If the given theme is already in the ThemeRegistry then simply return that theme. | ||
* Otherwise returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* Otherwise, returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* This function also adds a `variables` prop for backwards compatibility (deprecated). | ||
* @module registerTheme | ||
@@ -260,2 +279,5 @@ */ | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
const ThemeRegistry = { | ||
@@ -262,0 +284,0 @@ getRegistry, |
@@ -11,5 +11,12 @@ import type { BaseTheme, BaseThemeVariables, DeepPartial } from '@instructure/shared-types'; | ||
type RegisteredTheme<T extends BaseTheme = BaseTheme> = T & { | ||
/** | ||
* @deprecated since version 10 | ||
* @param arg the theme overrides | ||
*/ | ||
use(arg?: { | ||
overrides: DeepPartial<BaseThemeVariables>; | ||
}): void; | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
variables: BaseThemeVariables; | ||
@@ -19,3 +26,4 @@ }; | ||
* Get the global theme registry. | ||
* @return {Registry} the theme registry | ||
* @deprecated since version 10 | ||
* @return The theme registry | ||
* @module getRegistry | ||
@@ -26,2 +34,3 @@ */ | ||
* Set the global theme registry. | ||
* @deprecated since version 10 | ||
* @param {Registry} registry - the registry to set/replace the current registry with. | ||
@@ -34,2 +43,3 @@ * @returns {void} | ||
* Clear/reset the global theme registry. | ||
* @deprecated since version 10 | ||
* @module clearRegistry | ||
@@ -41,2 +51,3 @@ * @returns {void} | ||
* Get the activated theme object. | ||
* @deprecated since version 10 | ||
* @return {RegisteredTheme} the default theme object | ||
@@ -48,8 +59,13 @@ * @module getCurrentTheme | ||
* Registers the passed theme into the ThemeRegistry. | ||
* @deprecated since version 10 | ||
* @param {BaseTheme} theme - the theme object to register into the ThemeRegistry | ||
* @returns {RegisteredTheme} If the given theme is already in the ThemeRegistry then simply return that theme. | ||
* Otherwise returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* Otherwise, returns the theme with a wrapper around it, so it can be `.use()`-ed to activate the given theme from the registry. | ||
* This function also adds a `variables` prop for backwards compatibility (deprecated). | ||
* @module registerTheme | ||
*/ | ||
declare function registerTheme<T extends BaseTheme>(theme: T): RegisteredTheme<T>; | ||
/** | ||
* @deprecated since version 10 | ||
*/ | ||
declare const ThemeRegistry: { | ||
@@ -56,0 +72,0 @@ getRegistry: typeof getRegistry; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
143323
910
29
309
+ Added@instructure/console@10.6.1-snapshot-11(transitive)
+ Added@instructure/shared-types@10.6.1-snapshot-11(transitive)
+ Added@instructure/ui-dom-utils@10.6.1-snapshot-11(transitive)
+ Added@instructure/ui-utils@10.6.1-snapshot-11(transitive)
- Removed@instructure/console@10.6.1-snapshot-1(transitive)
- Removed@instructure/shared-types@10.6.1-snapshot-1(transitive)
- Removed@instructure/ui-dom-utils@10.6.1-snapshot-1(transitive)
- Removed@instructure/ui-utils@10.6.1-snapshot-1(transitive)