@udixio/theme 2.0.0 → 2.1.1
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 +26 -0
- package/dist/bin.cjs +1 -1
- package/dist/bin.js +1 -1
- package/dist/browser.cjs +3 -2
- package/dist/browser.js +24 -23
- package/dist/color/color.api.d.ts +5 -1
- package/dist/color/color.api.d.ts.map +1 -1
- package/dist/color/color.d.ts +1 -0
- package/dist/color/color.d.ts.map +1 -1
- package/dist/color/color.manager.d.ts +1 -2
- package/dist/color/color.manager.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/{font.plugin-DZtMajJV.js → font.plugin-B2IbI3Qs.js} +1 -1
- package/dist/{font.plugin-BZ-TTeTo.cjs → font.plugin-Czq_-M7T.cjs} +1 -1
- package/dist/{load-from-path-DZ35yiXK.cjs → load-from-path-Bvj18-eg.cjs} +2 -2
- package/dist/{load-from-path-Dobe0beV.js → load-from-path-CjLV8qqN.js} +1 -1
- package/dist/loader/loader.d.ts.map +1 -1
- package/dist/{loader-C8LnOoqg.cjs → loader-DuLiOKuW.cjs} +1171 -463
- package/dist/{loader-BS_Esfwg.js → loader-Dy9GSe3X.js} +1191 -483
- package/dist/node.cjs +4 -3
- package/dist/node.js +26 -25
- package/dist/palette/palette.d.ts.map +1 -1
- package/dist/variant/variant.d.ts +2 -0
- package/dist/variant/variant.d.ts.map +1 -1
- package/dist/variant/variants/expressive.variant.d.ts.map +1 -1
- package/dist/variant/variants/index.d.ts +1 -1
- package/dist/variant/variants/neutral.variant.d.ts.map +1 -1
- package/dist/variant/variants/tonal-spot.variant.d.ts.map +1 -1
- 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 -1
- package/package.json +1 -1
- package/src/app.module.ts +1 -1
- package/src/color/color.api.ts +24 -3
- package/src/color/color.manager.ts +4 -16
- package/src/color/color.module.ts +2 -2
- package/src/color/color.ts +4 -0
- package/src/color/default-color.ts +34 -68
- package/src/context/context.module.ts +1 -1
- package/src/loader/loader.ts +0 -4
- package/src/palette/palette.module.ts +2 -2
- package/src/palette/palette.ts +1 -2
- package/src/plugin/plugin.module.ts +1 -1
- package/src/variant/variant.ts +3 -0
- package/src/variant/variants/expressive.variant.ts +2 -0
- package/src/variant/variants/index.ts +2 -2
- package/src/variant/variants/neutral.variant.ts +2 -0
- package/src/variant/variants/tonal-spot.variant.ts +2 -0
- package/src/variant/variants/udixio.variant.ts +846 -0
- package/src/variant/variants/vibrant.variant.ts +2 -0
- package/dist/variant/variants/fidelity.variant.d.ts +0 -3
- package/dist/variant/variants/fidelity.variant.d.ts.map +0 -1
- package/src/variant/variants/fidelity.variant.ts +0 -46
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getPiecewiseHue, getRotatedHue, variant, Variant } from '../variant';
|
|
2
2
|
import { TonalPalette } from '@material/material-color-utilities';
|
|
3
3
|
import { Hct } from '../../material-color-utilities/htc';
|
|
4
|
+
import { defaultColors } from '../../color';
|
|
4
5
|
|
|
5
6
|
const getVibrantNeutralHue = (sourceColor: Hct): number => {
|
|
6
7
|
return getRotatedHue(
|
|
@@ -68,4 +69,5 @@ export const vibrantVariant: Variant = variant({
|
|
|
68
69
|
),
|
|
69
70
|
56,
|
|
70
71
|
),
|
|
72
|
+
colors: defaultColors,
|
|
71
73
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fidelity.variant.d.ts","sourceRoot":"","sources":["../../../src/variant/variants/fidelity.variant.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,OAAO,EAAE,MAAM,YAAY,CAAC;AAE9E,eAAO,MAAM,eAAe,EAAE,OA2C5B,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { getPiecewiseHue, getRotatedHue, variant, Variant } from '../variant';
|
|
2
|
-
|
|
3
|
-
export const fidelityVariant: Variant = variant({
|
|
4
|
-
name: 'fidelity',
|
|
5
|
-
palettes: {
|
|
6
|
-
primary: ({ sourceColor }) => ({
|
|
7
|
-
hue: sourceColor.hue,
|
|
8
|
-
chroma: sourceColor.chroma,
|
|
9
|
-
}),
|
|
10
|
-
secondary: ({ sourceColor }) => ({
|
|
11
|
-
hue: sourceColor.hue,
|
|
12
|
-
chroma: sourceColor.chroma / 1.4,
|
|
13
|
-
}),
|
|
14
|
-
tertiary: ({ sourceColor }) => ({
|
|
15
|
-
hue: getRotatedHue(
|
|
16
|
-
sourceColor,
|
|
17
|
-
[0, 20, 71, 161, 333, 360],
|
|
18
|
-
[-40, 48, -32, 40, -32],
|
|
19
|
-
),
|
|
20
|
-
chroma: sourceColor.chroma,
|
|
21
|
-
}),
|
|
22
|
-
neutral: ({ sourceColor }) => ({
|
|
23
|
-
hue: sourceColor.hue,
|
|
24
|
-
chroma: 5,
|
|
25
|
-
}),
|
|
26
|
-
neutralVariant: ({ sourceColor }) => ({
|
|
27
|
-
hue: sourceColor.hue,
|
|
28
|
-
chroma: 5 * 1.7,
|
|
29
|
-
}),
|
|
30
|
-
error: ({ sourceColor }) => {
|
|
31
|
-
const errorHue = getPiecewiseHue(
|
|
32
|
-
sourceColor,
|
|
33
|
-
[0, 3, 13, 23, 33, 43, 153, 273, 360],
|
|
34
|
-
[12, 22, 32, 12, 22, 32, 22, 12],
|
|
35
|
-
);
|
|
36
|
-
return {
|
|
37
|
-
hue: errorHue,
|
|
38
|
-
chroma: 60,
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
customPalettes: ({ sourceColor }, colorHct) => ({
|
|
43
|
-
hue: colorHct.hue,
|
|
44
|
-
chroma: sourceColor.chroma,
|
|
45
|
-
}),
|
|
46
|
-
});
|