impact-ui 5.0.1-beta.1 → 5.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/halloween_devil_morning_final.html.js +1304 -0
- package/dist/assets/halloween_devil_night_Final.html.js +1299 -0
- package/dist/components/HalloweenStyleIntro/HalloweenStyleIntroProvider.d.ts.map +1 -1
- package/dist/components/HalloweenStyleIntro/HalloweenStyleIntroProvider.js +23 -4
- package/dist/components/HalloweenStyleIntro/halloweenIntro.constants.d.ts +5 -0
- package/dist/components/HalloweenStyleIntro/halloweenIntro.constants.d.ts.map +1 -1
- package/dist/components/HalloweenStyleIntro/halloweenIntro.constants.js +5 -0
- package/dist/components/HalloweenStyleIntro/halloweenIntroHtml.d.ts +10 -3
- package/dist/components/HalloweenStyleIntro/halloweenIntroHtml.d.ts.map +1 -1
- package/dist/components/HalloweenStyleIntro/halloweenIntroHtml.js +129 -9
- package/dist/components/HalloweenStyleIntro/halloweenIntroHtml.test.d.ts +2 -0
- package/dist/components/HalloweenStyleIntro/halloweenIntroHtml.test.d.ts.map +1 -0
- package/dist/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Header/Header.types.d.ts.map +1 -1
- package/dist/components/Header/index.d.ts +1 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +4 -0
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.d.ts.map +1 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationChipsList.js +3 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +1 -1
- package/dist/components/Notification/NotificationBody/NotificationTaskList.js +4 -2
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/ProfileMenu/ProfileMenu.types.d.ts +5 -0
- package/dist/components/ProfileMenu/ProfileMenu.types.d.ts.map +1 -1
- package/dist/components/ProfileMenu/index.d.ts +1 -1
- package/dist/components/ProfileMenu/index.d.ts.map +1 -1
- package/dist/components/ProfileMenu/index.js +5 -1
- package/dist/components/TableV36/index.d.ts.map +1 -1
- package/dist/components/TableV36/index.js +8 -1
- package/dist/components/ThemingPanel/StylesSection.d.ts.map +1 -1
- package/dist/components/ThemingPanel/StylesSection.js +5 -4
- package/dist/components/ThemingPanel/ThemingPanel.d.ts +1 -1
- package/dist/components/ThemingPanel/ThemingPanel.d.ts.map +1 -1
- package/dist/components/ThemingPanel/ThemingPanel.js +24 -11
- package/dist/components/ThemingPanel/ThemingPanel.types.d.ts +5 -3
- package/dist/components/ThemingPanel/ThemingPanel.types.d.ts.map +1 -1
- package/dist/components/ThemingPanel/themingPanel.constants.d.ts +4 -0
- package/dist/components/ThemingPanel/themingPanel.constants.d.ts.map +1 -1
- package/dist/components/ThemingPanel/themingPanel.constants.js +11 -3
- package/dist/locales/de-DE.json.d.ts +4 -1
- package/dist/locales/de-DE.json.js +4 -1
- package/dist/locales/en-US.json.d.ts +4 -1
- package/dist/locales/en-US.json.js +4 -1
- package/dist/locales/es-ES.json.d.ts +4 -1
- package/dist/locales/es-ES.json.js +4 -1
- package/dist/mcp-component-registry.json +14 -53
- package/dist/stories/designTokensStoryHelpers.d.ts.map +1 -1
- package/dist/tokens/ImpactUiThemeProvider.js +2 -2
- package/dist/tokens/impactUiPreferences.d.ts +23 -0
- package/dist/tokens/impactUiPreferences.d.ts.map +1 -0
- package/dist/tokens/impactUiPreferences.js +92 -0
- package/dist/tokens/impactUiPreferences.test.d.ts +2 -0
- package/dist/tokens/impactUiPreferences.test.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/interfaceStyleDom.d.ts +7 -2
- package/dist/tokens/interfaceStyleDom.d.ts.map +1 -1
- package/dist/tokens/interfaceStyleDom.js +4 -10
- package/dist/tokens/themeDom.d.ts +4 -1
- package/dist/tokens/themeDom.d.ts.map +1 -1
- package/dist/tokens/themeDom.js +4 -10
- package/package.json +1 -1
- package/dist/assets/halloween_candle_light.html.js +0 -2320
- package/dist/assets/halloween_night.html.js +0 -2307
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"impactUiPreferences.test.d.ts","sourceRoot":"","sources":["../../src/tokens/impactUiPreferences.test.ts"],"names":[],"mappings":""}
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { ImpactUiThemeProvider, ImpactUiThemeContext, DEFAULT_IMPACT_UI_THEME_MO
|
|
|
13
13
|
export type { UseImpactUiThemeResult, ImpactUiThemeMode, ImpactUiThemeChangeDetail, } from './theme.types';
|
|
14
14
|
export { applyImpactUiThemeToDom, readImpactUiThemeModeFromDom, readImpactUiThemePreferenceFromDom, getSemanticColorFromDom, resolveThemeAppearance, setImpactUiTheme, IU_THEME_MODE_ATTR, IU_THEME_STORAGE_KEY, IU_THEME_TRANSITION_CLASS, IMPACT_UI_THEME_CHANGE, } from './themeDom';
|
|
15
15
|
export { applyImpactUiInterfaceStyleToDom, readImpactUiInterfaceStyleFromDom, readImpactUiInterfaceStyleFromStorage, setImpactUiInterfaceStyle, notifyImpactUiInterfaceStyleChange, IU_INTERFACE_STYLE_ATTR, IU_INTERFACE_STYLE_STORAGE_KEY, IMPACT_UI_INTERFACE_STYLE_CHANGE, type ImpactUiInterfaceStyleId, type ImpactUiInterfaceStyleChangeDetail, type ImpactUiDomPersistOptions, } from './interfaceStyleDom';
|
|
16
|
+
export { IU_PREFERENCES_STORAGE_KEY, IU_PREFERENCES_VERSION, readImpactUiPreferences, patchImpactUiPreferences, type ImpactUiPreferences, type ImpactUiPreferencesV1, type ImpactUiStoredInterfaceStyle, } from './impactUiPreferences';
|
|
16
17
|
export { createImpactUiMuiTheme, impactUiDrawerSx, mergeImpactUiDrawerSx, } from './createImpactUiMuiTheme';
|
|
17
18
|
export { ImpactUiAppProviders, type ImpactUiAppProvidersProps, type ImpactUiMuiIntegration, } from './ImpactUiAppProviders';
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EAClC,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,qCAAqC,EACrC,yBAAyB,EACzB,kCAAkC,EAClC,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,0BAA0B,GAChC,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,kCAAkC,EAClC,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,qCAAqC,EACrC,yBAAyB,EACzB,kCAAkC,EAClC,uBAAuB,EACvB,8BAA8B,EAC9B,gCAAgC,EAChC,KAAK,wBAAwB,EAC7B,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,GAC5B,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { ImpactUiStoredInterfaceStyle } from './impactUiPreferences';
|
|
2
|
+
|
|
2
3
|
export declare const IU_INTERFACE_STYLE_ATTR: "data-iu-interface-style";
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use {@link IU_PREFERENCES_STORAGE_KEY} (`impact-ui-preferences` JSON).
|
|
6
|
+
* Legacy scalar key is migrated automatically on read.
|
|
7
|
+
*/
|
|
3
8
|
export declare const IU_INTERFACE_STYLE_STORAGE_KEY: "impact-ui-interface-style";
|
|
4
9
|
export declare const IMPACT_UI_INTERFACE_STYLE_CHANGE: "impact-ui-interface-style-change";
|
|
5
|
-
export type ImpactUiInterfaceStyleId =
|
|
10
|
+
export type ImpactUiInterfaceStyleId = ImpactUiStoredInterfaceStyle;
|
|
6
11
|
export interface ImpactUiInterfaceStyleChangeDetail {
|
|
7
12
|
style: ImpactUiInterfaceStyleId;
|
|
8
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaceStyleDom.d.ts","sourceRoot":"","sources":["../../src/tokens/interfaceStyleDom.ts"],"names":[],"mappings":"AAAA,sHAAsH;AAEtH,eAAO,MAAM,uBAAuB,EAAG,yBAAkC,CAAC;AAE1E,eAAO,MAAM,8BAA8B,EAAG,2BAAoC,CAAC;AAEnF,eAAO,MAAM,gCAAgC,EAAG,kCAA2C,CAAC;AAE5F,MAAM,MAAM,wBAAwB,GAAG,
|
|
1
|
+
{"version":3,"file":"interfaceStyleDom.d.ts","sourceRoot":"","sources":["../../src/tokens/interfaceStyleDom.ts"],"names":[],"mappings":"AAAA,sHAAsH;AAEtH,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,uBAAuB,EAAG,yBAAkC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAG,2BAAoC,CAAC;AAEnF,eAAO,MAAM,gCAAgC,EAAG,kCAA2C,CAAC;AAE5F,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;AAEpE,MAAM,WAAW,kCAAkC;IACjD,KAAK,EAAE,wBAAwB,CAAC;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAID,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,wBAAwB,CAE3F;AAED,4DAA4D;AAC5D,wBAAgB,qCAAqC,IAAI,wBAAwB,CAEhF;AAWD,kEAAkE;AAClE,wBAAgB,iCAAiC,IAAI,wBAAwB,CAK5E;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,wBAAwB,EAC/B,OAAO,GAAE,yBAA8B,GACtC,IAAI,CAgBN;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,kCAAkC,GACzC,IAAI,CAGN;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,wBAAwB,EAC/B,OAAO,GAAE,yBAA8B,GACtC,IAAI,CAGN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { patchImpactUiPreferences, readImpactUiPreferences } from "./impactUiPreferences.js";
|
|
1
2
|
const IU_INTERFACE_STYLE_ATTR = "data-iu-interface-style";
|
|
2
|
-
const IU_INTERFACE_STYLE_STORAGE_KEY = "impact-ui-interface-style";
|
|
3
3
|
const IMPACT_UI_INTERFACE_STYLE_CHANGE = "impact-ui-interface-style-change";
|
|
4
4
|
const VALID_STYLES = /* @__PURE__ */ new Set(["none", "laborDay", "halloween", "christmas"]);
|
|
5
5
|
function isImpactUiInterfaceStyleId(value) {
|
|
@@ -11,11 +11,10 @@ function readImpactUiInterfaceStyleFromStorage() {
|
|
|
11
11
|
function readFromStorage() {
|
|
12
12
|
if (typeof localStorage === "undefined") return "none";
|
|
13
13
|
try {
|
|
14
|
-
|
|
15
|
-
if (raw && isImpactUiInterfaceStyleId(raw)) return raw;
|
|
14
|
+
return readImpactUiPreferences().interfaceStyle;
|
|
16
15
|
} catch {
|
|
16
|
+
return "none";
|
|
17
17
|
}
|
|
18
|
-
return "none";
|
|
19
18
|
}
|
|
20
19
|
function readImpactUiInterfaceStyleFromDom() {
|
|
21
20
|
if (typeof document === "undefined") return readFromStorage();
|
|
@@ -34,11 +33,7 @@ function applyImpactUiInterfaceStyleToDom(style, options = {}) {
|
|
|
34
33
|
if (options.persist === false) return;
|
|
35
34
|
if (typeof localStorage !== "undefined") {
|
|
36
35
|
try {
|
|
37
|
-
|
|
38
|
-
localStorage.removeItem(IU_INTERFACE_STYLE_STORAGE_KEY);
|
|
39
|
-
} else {
|
|
40
|
-
localStorage.setItem(IU_INTERFACE_STYLE_STORAGE_KEY, style);
|
|
41
|
-
}
|
|
36
|
+
patchImpactUiPreferences({ interfaceStyle: style });
|
|
42
37
|
} catch {
|
|
43
38
|
}
|
|
44
39
|
}
|
|
@@ -54,7 +49,6 @@ function setImpactUiInterfaceStyle(style, options = {}) {
|
|
|
54
49
|
export {
|
|
55
50
|
IMPACT_UI_INTERFACE_STYLE_CHANGE,
|
|
56
51
|
IU_INTERFACE_STYLE_ATTR,
|
|
57
|
-
IU_INTERFACE_STYLE_STORAGE_KEY,
|
|
58
52
|
applyImpactUiInterfaceStyleToDom,
|
|
59
53
|
isImpactUiInterfaceStyleId,
|
|
60
54
|
notifyImpactUiInterfaceStyleChange,
|
|
@@ -5,7 +5,10 @@ import { ImpactUiThemeChangeDetail, ImpactUiThemeMode } from './theme.types';
|
|
|
5
5
|
export { IU_THEME_ATTR };
|
|
6
6
|
/** Stores user preference (`light` | `dark` | `system`). Omitted when `light`. */
|
|
7
7
|
export declare const IU_THEME_MODE_ATTR: "data-iu-theme-mode";
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use {@link IU_PREFERENCES_STORAGE_KEY} (`impact-ui-preferences` JSON).
|
|
10
|
+
* Legacy scalar key is migrated automatically on read.
|
|
11
|
+
*/
|
|
9
12
|
export declare const IU_THEME_STORAGE_KEY: "impact-ui-theme-preference";
|
|
10
13
|
export declare const IMPACT_UI_THEME_CHANGE = "impact-ui-theme-change";
|
|
11
14
|
/** @deprecated Theme color cross-fade is disabled; class is no longer applied on mode change. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeDom.d.ts","sourceRoot":"","sources":["../../src/tokens/themeDom.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"themeDom.d.ts","sourceRoot":"","sources":["../../src/tokens/themeDom.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAG,oBAA6B,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAG,4BAAqC,CAAC;AAE1E,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,EAAG,mBAA4B,CAAC;AAOtE,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAG/E;AAED,4EAA4E;AAC5E,wBAAgB,4BAA4B,IAAI,SAAS,CAGxD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEpE;AAoBD;;GAEG;AACH,wBAAgB,kCAAkC,CAChD,QAAQ,GAAE,iBAA2B,GACpC,iBAAiB,CAcnB;AAED,0DAA0D;AAC1D,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,GAAE,SAA8C,EACxD,OAAO,GAAE,yBAA8B,GACtC,IAAI,CAqBN;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,yBAAyB,GAAG,IAAI,CAGjF;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,iBAAiB,EACvB,OAAO,GAAE,yBAA8B,GACtC,IAAI,CAIN;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAO3E;AAED,wBAAgB,4BAA4B,IAAI,SAAS,CAExD"}
|
package/dist/tokens/themeDom.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { patchImpactUiPreferences, readImpactUiPreferences } from "./impactUiPreferences.js";
|
|
1
2
|
import { IU_THEME_ATTR, getColorToken } from "../styles/tokens/tokens.generated.js";
|
|
2
3
|
const IU_THEME_MODE_ATTR = "data-iu-theme-mode";
|
|
3
|
-
const IU_THEME_STORAGE_KEY = "impact-ui-theme-preference";
|
|
4
4
|
const IMPACT_UI_THEME_CHANGE = "impact-ui-theme-change";
|
|
5
5
|
function getSystemAppearance() {
|
|
6
6
|
if (typeof window === "undefined") return "light";
|
|
@@ -20,20 +20,15 @@ function getSemanticColorFromDom(name) {
|
|
|
20
20
|
function readStoredThemePreference() {
|
|
21
21
|
if (typeof window === "undefined") return null;
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
if (stored === "light" || stored === "dark" || stored === "system") return stored;
|
|
23
|
+
return readImpactUiPreferences().theme;
|
|
25
24
|
} catch {
|
|
25
|
+
return null;
|
|
26
26
|
}
|
|
27
|
-
return null;
|
|
28
27
|
}
|
|
29
28
|
function persistThemePreference(preference) {
|
|
30
29
|
if (typeof window === "undefined") return;
|
|
31
30
|
try {
|
|
32
|
-
|
|
33
|
-
localStorage.removeItem(IU_THEME_STORAGE_KEY);
|
|
34
|
-
} else {
|
|
35
|
-
localStorage.setItem(IU_THEME_STORAGE_KEY, preference);
|
|
36
|
-
}
|
|
31
|
+
patchImpactUiPreferences({ theme: preference });
|
|
37
32
|
} catch {
|
|
38
33
|
}
|
|
39
34
|
}
|
|
@@ -90,7 +85,6 @@ export {
|
|
|
90
85
|
IMPACT_UI_THEME_CHANGE,
|
|
91
86
|
IU_THEME_ATTR,
|
|
92
87
|
IU_THEME_MODE_ATTR,
|
|
93
|
-
IU_THEME_STORAGE_KEY,
|
|
94
88
|
applyImpactUiThemeToDom,
|
|
95
89
|
getSemanticColorFromDom,
|
|
96
90
|
getSystemColorSchemeSnapshot,
|