@exmg/exm-theme 1.0.3 → 1.0.4-alpha.21
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/{index.d.ts → dist/index.d.ts} +16 -6
- package/{src → dist}/index.js +16 -0
- package/package.json +6 -6
- package/index.js +0 -19
- package/src/index.d.ts +0 -11
- /package/{src → dist}/config.d.ts +0 -0
- /package/{src → dist}/config.js +0 -0
- /package/{src → dist}/material-color-helpers.d.ts +0 -0
- /package/{src → dist}/material-color-helpers.js +0 -0
- /package/{src → dist}/storage.d.ts +0 -0
- /package/{src → dist}/storage.js +0 -0
- /package/{src → dist}/theme-mixin.d.ts +0 -0
- /package/{src → dist}/theme-mixin.js +0 -0
- /package/{src → dist}/theme-signals.d.ts +0 -0
- /package/{src → dist}/theme-signals.js +0 -0
- /package/{src → dist}/theme.d.ts +0 -0
- /package/{src → dist}/theme.js +0 -0
- /package/{src → dist}/types.d.ts +0 -0
- /package/{src → dist}/types.js +0 -0
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { changeColor, changeColorAndMode, changeColorMode, getCurrentMode, getCurrentSeedColor, getCurrentThemeString, getLastSavedAutoColorMode, isModeDark } from './theme.js';
|
|
2
|
+
import { ThemeChangeColorEvent, ThemeChangeDarkModeEvent, ColorMode } from './types.js';
|
|
3
|
+
import { hctFromHex, hexFromHct } from './material-color-helpers.js';
|
|
4
|
+
export declare const initTheme: (config?: {
|
|
5
|
+
themeColor?: string;
|
|
6
|
+
colorMode?: ColorMode;
|
|
7
|
+
}) => void;
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementEventMap {
|
|
10
|
+
'theme-change-color': ThemeChangeColorEvent;
|
|
11
|
+
'theme-change-mode': ThemeChangeDarkModeEvent;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export { ThemeChangeColorEvent, ThemeChangeDarkModeEvent, ColorMode } from './types.js';
|
|
5
15
|
export declare const ThemeUtils: {
|
|
6
16
|
changeColor: typeof changeColor;
|
|
7
17
|
changeColorAndMode: typeof changeColorAndMode;
|
|
@@ -14,5 +24,5 @@ export declare const ThemeUtils: {
|
|
|
14
24
|
hctFromHex: typeof hctFromHex;
|
|
15
25
|
hexFromHct: typeof hexFromHct;
|
|
16
26
|
};
|
|
17
|
-
export { ThemeMixin } from './
|
|
18
|
-
export { themeCurrentMode } from './
|
|
27
|
+
export { ThemeMixin } from './theme-mixin.js';
|
|
28
|
+
export { themeCurrentMode } from './theme-signals.js';
|
package/{src → dist}/index.js
RENAMED
|
@@ -2,6 +2,7 @@ import { DEFAULT_THEME_COLOR } from './config.js';
|
|
|
2
2
|
import { applyTheme } from './material-color-helpers.js';
|
|
3
3
|
import { loadfromStorage } from './storage.js';
|
|
4
4
|
import { changeColor, changeColorAndMode, changeColorMode, getCurrentMode, getCurrentSeedColor, getCurrentThemeString, getLastSavedAutoColorMode, isModeDark, } from './theme.js';
|
|
5
|
+
import { hctFromHex, hexFromHct } from './material-color-helpers.js';
|
|
5
6
|
/**
|
|
6
7
|
* Determines whether to update the theme on page navigation if the mode is
|
|
7
8
|
* 'auto'.
|
|
@@ -51,4 +52,19 @@ export const initTheme = (config) => {
|
|
|
51
52
|
}
|
|
52
53
|
determinePageNavigationAutoMode();
|
|
53
54
|
};
|
|
55
|
+
export { ThemeChangeColorEvent, ThemeChangeDarkModeEvent } from './types.js';
|
|
56
|
+
export const ThemeUtils = {
|
|
57
|
+
changeColor,
|
|
58
|
+
changeColorAndMode,
|
|
59
|
+
changeColorMode,
|
|
60
|
+
getCurrentMode,
|
|
61
|
+
getCurrentSeedColor,
|
|
62
|
+
getCurrentThemeString,
|
|
63
|
+
getLastSavedAutoColorMode,
|
|
64
|
+
isModeDark,
|
|
65
|
+
hctFromHex,
|
|
66
|
+
hexFromHct,
|
|
67
|
+
};
|
|
68
|
+
export { ThemeMixin } from './theme-mixin.js';
|
|
69
|
+
export { themeCurrentMode } from './theme-signals.js';
|
|
54
70
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4-alpha.21+c2aa974",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
7
|
"description": "Helper to initialize theme for material components",
|
|
8
8
|
"contributors": [
|
|
9
9
|
"Ex Machina Group"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@exmg/lit-cli": "1.1.13"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://
|
|
30
|
+
"homepage": "https://bitbucket.org/exmachina/exm-web-components",
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "git@
|
|
33
|
+
"url": "git@bitbucket.org:exmachina/exm-web-components.git",
|
|
34
34
|
"directory": "packages/exm-theme"
|
|
35
35
|
},
|
|
36
36
|
"license": "MIT",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c2aa974c62f61fe7ed595abc52fef3ab1e05c916"
|
|
44
44
|
}
|
package/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { initTheme } from './src/index.js';
|
|
2
|
-
export { ThemeChangeColorEvent, ThemeChangeDarkModeEvent } from './src/types.js';
|
|
3
|
-
import { changeColor, changeColorAndMode, changeColorMode, getCurrentMode, getCurrentSeedColor, getCurrentThemeString, getLastSavedAutoColorMode, isModeDark, } from './src/theme.js';
|
|
4
|
-
import { hctFromHex, hexFromHct } from './src/material-color-helpers.js';
|
|
5
|
-
export const ThemeUtils = {
|
|
6
|
-
changeColor,
|
|
7
|
-
changeColorAndMode,
|
|
8
|
-
changeColorMode,
|
|
9
|
-
getCurrentMode,
|
|
10
|
-
getCurrentSeedColor,
|
|
11
|
-
getCurrentThemeString,
|
|
12
|
-
getLastSavedAutoColorMode,
|
|
13
|
-
isModeDark,
|
|
14
|
-
hctFromHex,
|
|
15
|
-
hexFromHct,
|
|
16
|
-
};
|
|
17
|
-
export { ThemeMixin } from './src/theme-mixin.js';
|
|
18
|
-
export { themeCurrentMode } from './src/theme-signals.js';
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/src/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ThemeChangeColorEvent, ThemeChangeDarkModeEvent, ColorMode } from './types.js';
|
|
2
|
-
export declare const initTheme: (config?: {
|
|
3
|
-
themeColor?: string;
|
|
4
|
-
colorMode?: ColorMode;
|
|
5
|
-
}) => void;
|
|
6
|
-
declare global {
|
|
7
|
-
interface HTMLElementEventMap {
|
|
8
|
-
'theme-change-color': ThemeChangeColorEvent;
|
|
9
|
-
'theme-change-mode': ThemeChangeDarkModeEvent;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
File without changes
|
/package/{src → dist}/config.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src → dist}/storage.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{src → dist}/theme.d.ts
RENAMED
|
File without changes
|
/package/{src → dist}/theme.js
RENAMED
|
File without changes
|
/package/{src → dist}/types.d.ts
RENAMED
|
File without changes
|
/package/{src → dist}/types.js
RENAMED
|
File without changes
|