@udixio/theme 1.3.1 → 2.1.0
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/CHANGELOG.md +23 -2
- package/dist/API.d.ts +7 -4
- package/dist/API.d.ts.map +1 -1
- package/dist/app.container.d.ts +1 -2
- package/dist/app.container.d.ts.map +1 -1
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +23 -18
- package/dist/browser.js +34 -29
- package/dist/color/color.api.d.ts +16 -31
- package/dist/color/color.api.d.ts.map +1 -1
- package/dist/color/color.d.ts +100 -0
- package/dist/color/color.d.ts.map +1 -0
- package/dist/color/color.manager.d.ts +9 -18
- package/dist/color/color.manager.d.ts.map +1 -1
- package/dist/color/color.utils.d.ts +14 -3
- package/dist/color/color.utils.d.ts.map +1 -1
- package/dist/color/default-color.d.ts +5 -1
- package/dist/color/default-color.d.ts.map +1 -1
- package/dist/color/index.d.ts +1 -1
- package/dist/color/index.d.ts.map +1 -1
- package/dist/config/config.interface.d.ts +4 -4
- package/dist/config/config.interface.d.ts.map +1 -1
- package/dist/context/context.d.ts +41 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.module.d.ts +3 -0
- package/dist/context/context.module.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/font.plugin-5Xpo-ntw.js +228 -0
- package/dist/font.plugin-FPU_gL1Y.cjs +227 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/{load-from-path-Bo1kCfh9.js → load-from-path-CBnO8ESw.js} +1 -1
- package/dist/{load-from-path-DoZnR1-p.cjs → load-from-path-kuofMGN3.cjs} +2 -2
- package/dist/loader/loader.d.ts +1 -1
- package/dist/loader/loader.d.ts.map +1 -1
- package/dist/loader-BzsrGBu-.cjs +3905 -0
- package/dist/loader-CoayTlSl.js +3906 -0
- package/dist/material-color-utilities/dynamic_color.d.ts +0 -22
- package/dist/material-color-utilities/dynamic_color.d.ts.map +1 -1
- package/dist/material-color-utilities/toneDeltaPair.d.ts +8 -8
- package/dist/material-color-utilities/toneDeltaPair.d.ts.map +1 -1
- package/dist/node.cjs +24 -19
- package/dist/node.js +36 -31
- package/dist/palette/index.d.ts +4 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/palette.api.d.ts +13 -0
- package/dist/palette/palette.api.d.ts.map +1 -0
- package/dist/palette/palette.d.ts +33 -0
- package/dist/palette/palette.d.ts.map +1 -0
- package/dist/palette/palette.manager.d.ts +20 -0
- package/dist/palette/palette.manager.d.ts.map +1 -0
- package/dist/palette/palette.module.d.ts +3 -0
- package/dist/palette/palette.module.d.ts.map +1 -0
- package/dist/plugins/font/font.plugin.d.ts +1 -1
- package/dist/plugins/font/font.plugin.d.ts.map +1 -1
- package/dist/variant/index.d.ts +3 -0
- package/dist/variant/index.d.ts.map +1 -0
- package/dist/variant/variant.d.ts +31 -0
- package/dist/variant/variant.d.ts.map +1 -0
- package/dist/variant/variants/expressive.variant.d.ts +2 -0
- package/dist/variant/variants/expressive.variant.d.ts.map +1 -0
- package/dist/{theme → variant}/variants/index.d.ts +1 -1
- package/dist/variant/variants/index.d.ts.map +1 -0
- package/dist/variant/variants/neutral.variant.d.ts.map +1 -0
- package/dist/variant/variants/tonal-spot.variant.d.ts.map +1 -0
- package/dist/variant/variants/udixio.variant.d.ts +3 -0
- package/dist/variant/variants/udixio.variant.d.ts.map +1 -0
- package/dist/variant/variants/vibrant.variant.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/API.ts +12 -5
- package/src/app.container.ts +22 -11
- package/src/bootstrap.ts +1 -1
- package/src/color/color.api.ts +189 -47
- package/src/color/color.manager.ts +34 -189
- package/src/color/color.ts +295 -0
- package/src/color/color.utils.ts +48 -3
- package/src/color/default-color.ts +390 -425
- package/src/color/index.ts +1 -1
- package/src/config/config.interface.ts +5 -4
- package/src/context/context.module.ts +7 -0
- package/src/context/context.ts +169 -0
- package/src/context/index.ts +2 -0
- package/src/index.ts +6 -4
- package/src/loader/loader.ts +11 -24
- package/src/material-color-utilities/dynamic_color.ts +25 -34
- package/src/material-color-utilities/toneDeltaPair.ts +44 -41
- package/src/palette/index.ts +3 -0
- package/src/palette/palette.api.ts +43 -0
- package/src/palette/palette.manager.ts +74 -0
- package/src/palette/palette.module.ts +9 -0
- package/src/palette/palette.ts +206 -0
- package/src/plugins/font/font.plugin.ts +1 -1
- package/src/variant/index.ts +2 -0
- package/src/variant/variant.ts +84 -0
- package/src/{theme → variant}/variants/expressive.variant.ts +33 -29
- package/src/{theme → variant}/variants/index.ts +2 -2
- package/src/variant/variants/neutral.variant.ts +47 -0
- package/src/variant/variants/tonal-spot.variant.ts +37 -0
- package/src/variant/variants/udixio.variant.ts +846 -0
- package/src/{theme → variant}/variants/vibrant.variant.ts +23 -22
- package/dist/color/configurable-color.d.ts +0 -31
- package/dist/color/configurable-color.d.ts.map +0 -1
- package/dist/define-config-BasMdCqD.js +0 -430
- package/dist/define-config-CKSsLMnc.cjs +0 -429
- package/dist/loader-C8_TyOuS.js +0 -2698
- package/dist/loader-R7hccp8_.cjs +0 -2697
- package/dist/theme/index.d.ts +0 -8
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/scheme.d.ts +0 -20
- package/dist/theme/scheme.d.ts.map +0 -1
- package/dist/theme/scheme.manager.d.ts +0 -31
- package/dist/theme/scheme.manager.d.ts.map +0 -1
- package/dist/theme/theme.api.d.ts +0 -24
- package/dist/theme/theme.api.d.ts.map +0 -1
- package/dist/theme/theme.module.d.ts +0 -3
- package/dist/theme/theme.module.d.ts.map +0 -1
- package/dist/theme/variant.d.ts +0 -36
- package/dist/theme/variant.d.ts.map +0 -1
- package/dist/theme/variant.manager.d.ts +0 -14
- package/dist/theme/variant.manager.d.ts.map +0 -1
- package/dist/theme/variants/expressive.variant.d.ts +0 -3
- package/dist/theme/variants/expressive.variant.d.ts.map +0 -1
- package/dist/theme/variants/fidelity.variant.d.ts +0 -3
- package/dist/theme/variants/fidelity.variant.d.ts.map +0 -1
- package/dist/theme/variants/index.d.ts.map +0 -1
- package/dist/theme/variants/neutral.variant.d.ts.map +0 -1
- package/dist/theme/variants/tonal-spot.variant.d.ts.map +0 -1
- package/dist/theme/variants/vibrant.variant.d.ts.map +0 -1
- package/src/color/configurable-color.ts +0 -67
- package/src/theme/index.ts +0 -7
- package/src/theme/scheme.manager.ts +0 -100
- package/src/theme/scheme.ts +0 -66
- package/src/theme/theme.api.ts +0 -82
- package/src/theme/theme.module.ts +0 -11
- package/src/theme/variant.manager.ts +0 -58
- package/src/theme/variant.ts +0 -53
- package/src/theme/variants/fidelity.variant.ts +0 -38
- package/src/theme/variants/neutral.variant.ts +0 -45
- package/src/theme/variants/tonal-spot.variant.ts +0 -35
- /package/dist/{theme → variant}/variants/neutral.variant.d.ts +0 -0
- /package/dist/{theme → variant}/variants/tonal-spot.variant.d.ts +0 -0
- /package/dist/{theme → variant}/variants/vibrant.variant.d.ts +0 -0
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { getPiecewiseHue, getRotatedHue, Variant } from '../variant';
|
|
2
|
-
import { TonalPalette } from '@material/material-color-utilities';
|
|
3
|
-
|
|
4
|
-
export const fidelityVariant: Variant = {
|
|
5
|
-
name: 'fidelity',
|
|
6
|
-
palettes: {
|
|
7
|
-
primary: ({ sourceColorHct, isDark }) =>
|
|
8
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, sourceColorHct.chroma),
|
|
9
|
-
secondary: ({ sourceColorHct }) =>
|
|
10
|
-
TonalPalette.fromHueAndChroma(
|
|
11
|
-
sourceColorHct.hue,
|
|
12
|
-
sourceColorHct.chroma * 0.5,
|
|
13
|
-
),
|
|
14
|
-
tertiary: ({ sourceColorHct }) =>
|
|
15
|
-
TonalPalette.fromHueAndChroma(
|
|
16
|
-
getRotatedHue(
|
|
17
|
-
sourceColorHct,
|
|
18
|
-
[0, 20, 71, 161, 333, 360],
|
|
19
|
-
[-40, 48, -32, 40, -32],
|
|
20
|
-
),
|
|
21
|
-
sourceColorHct.chroma,
|
|
22
|
-
),
|
|
23
|
-
neutral: ({ sourceColorHct }) =>
|
|
24
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 5),
|
|
25
|
-
neutralVariant: ({ sourceColorHct }) =>
|
|
26
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 5 * 1.7),
|
|
27
|
-
error: ({ sourceColorHct }) => {
|
|
28
|
-
const errorHue = getPiecewiseHue(
|
|
29
|
-
sourceColorHct,
|
|
30
|
-
[0, 3, 13, 23, 33, 43, 153, 273, 360],
|
|
31
|
-
[12, 22, 32, 12, 22, 32, 22, 12],
|
|
32
|
-
);
|
|
33
|
-
return TonalPalette.fromHueAndChroma(errorHue, 60);
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
customPalettes: ({ colorHct , sourceColorHct}) =>
|
|
37
|
-
TonalPalette.fromHueAndChroma(colorHct.hue, sourceColorHct.chroma),
|
|
38
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { getPiecewiseHue, getRotatedHue, Variant } from '../variant';
|
|
2
|
-
import { TonalPalette } from '@material/material-color-utilities';
|
|
3
|
-
import { Hct } from '../../material-color-utilities/htc';
|
|
4
|
-
|
|
5
|
-
export const neutralVariant: Variant = {
|
|
6
|
-
name: 'neutral',
|
|
7
|
-
palettes: {
|
|
8
|
-
primary: ({ sourceColorHct }) =>
|
|
9
|
-
TonalPalette.fromHueAndChroma(
|
|
10
|
-
sourceColorHct.hue,
|
|
11
|
-
Hct.isBlue(sourceColorHct.hue) ? 12 : 8,
|
|
12
|
-
),
|
|
13
|
-
secondary: ({ sourceColorHct }) =>
|
|
14
|
-
TonalPalette.fromHueAndChroma(
|
|
15
|
-
sourceColorHct.hue,
|
|
16
|
-
Hct.isBlue(sourceColorHct.hue) ? 6 : 4,
|
|
17
|
-
),
|
|
18
|
-
tertiary: ({ sourceColorHct }) =>
|
|
19
|
-
TonalPalette.fromHueAndChroma(
|
|
20
|
-
getRotatedHue(
|
|
21
|
-
sourceColorHct,
|
|
22
|
-
[0, 38, 105, 161, 204, 278, 333, 360],
|
|
23
|
-
[-32, 26, 10, -39, 24, -15, -32],
|
|
24
|
-
),
|
|
25
|
-
20,
|
|
26
|
-
),
|
|
27
|
-
neutral: ({ sourceColorHct }) =>
|
|
28
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 1.4),
|
|
29
|
-
neutralVariant: ({ sourceColorHct }) =>
|
|
30
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 1.4 * 2.2),
|
|
31
|
-
error: ({ sourceColorHct }) => {
|
|
32
|
-
const errorHue = getPiecewiseHue(
|
|
33
|
-
sourceColorHct,
|
|
34
|
-
[0, 3, 13, 23, 33, 43, 153, 273, 360],
|
|
35
|
-
[12, 22, 32, 12, 22, 32, 22, 12],
|
|
36
|
-
);
|
|
37
|
-
return TonalPalette.fromHueAndChroma(errorHue, 50);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
customPalettes: ({ colorHct }) =>
|
|
41
|
-
TonalPalette.fromHueAndChroma(
|
|
42
|
-
colorHct.hue,
|
|
43
|
-
Hct.isBlue(colorHct.hue) ? 6 : 4,
|
|
44
|
-
),
|
|
45
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { getPiecewiseHue, getRotatedHue, Variant } from '../variant';
|
|
2
|
-
import { TonalPalette } from '@material/material-color-utilities';
|
|
3
|
-
|
|
4
|
-
export const tonalSpotVariant: Variant = {
|
|
5
|
-
name: 'tonalSpot',
|
|
6
|
-
palettes: {
|
|
7
|
-
primary: ({ sourceColorHct, isDark }) =>
|
|
8
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, isDark ? 26 : 32),
|
|
9
|
-
secondary: ({ sourceColorHct }) =>
|
|
10
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 16),
|
|
11
|
-
tertiary: ({ sourceColorHct }) =>
|
|
12
|
-
TonalPalette.fromHueAndChroma(
|
|
13
|
-
getRotatedHue(
|
|
14
|
-
sourceColorHct,
|
|
15
|
-
[0, 20, 71, 161, 333, 360],
|
|
16
|
-
[-40, 48, -32, 40, -32],
|
|
17
|
-
),
|
|
18
|
-
28,
|
|
19
|
-
),
|
|
20
|
-
neutral: ({ sourceColorHct }) =>
|
|
21
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 5),
|
|
22
|
-
neutralVariant: ({ sourceColorHct }) =>
|
|
23
|
-
TonalPalette.fromHueAndChroma(sourceColorHct.hue, 5 * 1.7),
|
|
24
|
-
error: ({ sourceColorHct }) => {
|
|
25
|
-
const errorHue = getPiecewiseHue(
|
|
26
|
-
sourceColorHct,
|
|
27
|
-
[0, 3, 13, 23, 33, 43, 153, 273, 360],
|
|
28
|
-
[12, 22, 32, 12, 22, 32, 22, 12],
|
|
29
|
-
);
|
|
30
|
-
return TonalPalette.fromHueAndChroma(errorHue, 60);
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
customPalettes: ({ colorHct }) =>
|
|
34
|
-
TonalPalette.fromHueAndChroma(colorHct.hue, 16),
|
|
35
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|