@instructure/theme-registry
Advanced tools
Comparing version 10.5.0 to 10.5.1-pr-snapshot-1731420479891
@@ -6,2 +6,10 @@ # Change Log | ||
## [10.5.1-pr-snapshot-1731420479891](https://github.com/instructure/instructure-ui/compare/v10.5.0...v10.5.1-pr-snapshot-1731420479891) (2024-11-12) | ||
**Note:** Version bump only for package @instructure/theme-registry | ||
# [10.5.0](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.5.0) (2024-11-07) | ||
@@ -8,0 +16,0 @@ |
@@ -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.5.0", | ||
"version": "10.5.1-pr-snapshot-1731420479891", | ||
"description": "Package for global ThemeRegistry.", | ||
@@ -25,10 +25,10 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"@babel/runtime": "^7.25.6", | ||
"@instructure/console": "10.5.0", | ||
"@instructure/shared-types": "10.5.0", | ||
"@instructure/ui-utils": "10.5.0" | ||
"@instructure/console": "10.5.1-pr-snapshot-1731420479891", | ||
"@instructure/shared-types": "10.5.1-pr-snapshot-1731420479891", | ||
"@instructure/ui-utils": "10.5.1-pr-snapshot-1731420479891" | ||
}, | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "10.5.0", | ||
"@instructure/ui-test-utils": "10.5.0" | ||
"@instructure/ui-babel-preset": "10.5.1-pr-snapshot-1731420479891", | ||
"@instructure/ui-test-utils": "10.5.1-pr-snapshot-1731420479891" | ||
} | ||
} |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
143264
910
1
+ Added@instructure/console@10.5.1-pr-snapshot-1731420479891(transitive)
+ Added@instructure/shared-types@10.5.1-pr-snapshot-1731420479891(transitive)
+ Added@instructure/ui-dom-utils@10.5.1-pr-snapshot-1731420479891(transitive)
+ Added@instructure/ui-utils@10.5.1-pr-snapshot-1731420479891(transitive)
- Removed@instructure/console@10.5.0(transitive)
- Removed@instructure/shared-types@10.5.0(transitive)
- Removed@instructure/ui-dom-utils@10.5.0(transitive)
- Removed@instructure/ui-utils@10.5.0(transitive)
Updated@instructure/console@10.5.1-pr-snapshot-1731420479891
Updated@instructure/shared-types@10.5.1-pr-snapshot-1731420479891
Updated@instructure/ui-utils@10.5.1-pr-snapshot-1731420479891