@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.
Files changed (54) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/bin.cjs +1 -1
  3. package/dist/bin.js +1 -1
  4. package/dist/browser.cjs +3 -2
  5. package/dist/browser.js +24 -23
  6. package/dist/color/color.api.d.ts +5 -1
  7. package/dist/color/color.api.d.ts.map +1 -1
  8. package/dist/color/color.d.ts +1 -0
  9. package/dist/color/color.d.ts.map +1 -1
  10. package/dist/color/color.manager.d.ts +1 -2
  11. package/dist/color/color.manager.d.ts.map +1 -1
  12. package/dist/color/default-color.d.ts +5 -1
  13. package/dist/color/default-color.d.ts.map +1 -1
  14. package/dist/{font.plugin-DZtMajJV.js → font.plugin-B2IbI3Qs.js} +1 -1
  15. package/dist/{font.plugin-BZ-TTeTo.cjs → font.plugin-Czq_-M7T.cjs} +1 -1
  16. package/dist/{load-from-path-DZ35yiXK.cjs → load-from-path-Bvj18-eg.cjs} +2 -2
  17. package/dist/{load-from-path-Dobe0beV.js → load-from-path-CjLV8qqN.js} +1 -1
  18. package/dist/loader/loader.d.ts.map +1 -1
  19. package/dist/{loader-C8LnOoqg.cjs → loader-DuLiOKuW.cjs} +1171 -463
  20. package/dist/{loader-BS_Esfwg.js → loader-Dy9GSe3X.js} +1191 -483
  21. package/dist/node.cjs +4 -3
  22. package/dist/node.js +26 -25
  23. package/dist/palette/palette.d.ts.map +1 -1
  24. package/dist/variant/variant.d.ts +2 -0
  25. package/dist/variant/variant.d.ts.map +1 -1
  26. package/dist/variant/variants/expressive.variant.d.ts.map +1 -1
  27. package/dist/variant/variants/index.d.ts +1 -1
  28. package/dist/variant/variants/neutral.variant.d.ts.map +1 -1
  29. package/dist/variant/variants/tonal-spot.variant.d.ts.map +1 -1
  30. package/dist/variant/variants/udixio.variant.d.ts +3 -0
  31. package/dist/variant/variants/udixio.variant.d.ts.map +1 -0
  32. package/dist/variant/variants/vibrant.variant.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/src/app.module.ts +1 -1
  35. package/src/color/color.api.ts +24 -3
  36. package/src/color/color.manager.ts +4 -16
  37. package/src/color/color.module.ts +2 -2
  38. package/src/color/color.ts +4 -0
  39. package/src/color/default-color.ts +34 -68
  40. package/src/context/context.module.ts +1 -1
  41. package/src/loader/loader.ts +0 -4
  42. package/src/palette/palette.module.ts +2 -2
  43. package/src/palette/palette.ts +1 -2
  44. package/src/plugin/plugin.module.ts +1 -1
  45. package/src/variant/variant.ts +3 -0
  46. package/src/variant/variants/expressive.variant.ts +2 -0
  47. package/src/variant/variants/index.ts +2 -2
  48. package/src/variant/variants/neutral.variant.ts +2 -0
  49. package/src/variant/variants/tonal-spot.variant.ts +2 -0
  50. package/src/variant/variants/udixio.variant.ts +846 -0
  51. package/src/variant/variants/vibrant.variant.ts +2 -0
  52. package/dist/variant/variants/fidelity.variant.d.ts +0 -3
  53. package/dist/variant/variants/fidelity.variant.d.ts.map +0 -1
  54. 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,3 +0,0 @@
1
- import { Variant } from '../variant';
2
- export declare const fidelityVariant: Variant;
3
- //# sourceMappingURL=fidelity.variant.d.ts.map
@@ -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
- });