@mantine/colors-generator 7.13.5-alpha.1 → 7.13.5

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.
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var chroma = require('chroma-js');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var chroma__default = /*#__PURE__*/_interopDefault(chroma);
9
+
10
+ const LIGHTNESS_MAP = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34];
11
+ const SATURATION_MAP = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32];
12
+ function getClosestLightness(colorObject) {
13
+ const lightnessGoal = colorObject.get("hsl.l");
14
+ return LIGHTNESS_MAP.reduce(
15
+ (prev, curr) => Math.abs(curr - lightnessGoal) < Math.abs(prev - lightnessGoal) ? curr : prev
16
+ );
17
+ }
18
+ function generateColorsMap(color) {
19
+ const colorObject = chroma__default.default(color);
20
+ const closestLightness = getClosestLightness(colorObject);
21
+ const baseColorIndex = LIGHTNESS_MAP.findIndex((l) => l === closestLightness);
22
+ const colors = LIGHTNESS_MAP.map((l) => colorObject.set("hsl.l", l)).map((c) => chroma__default.default(c)).map((c, i) => {
23
+ const saturationDelta = SATURATION_MAP[i] - SATURATION_MAP[baseColorIndex];
24
+ return saturationDelta >= 0 ? c.saturate(saturationDelta) : c.desaturate(saturationDelta * -1);
25
+ });
26
+ return { baseColorIndex, colors };
27
+ }
28
+ function generateColors(color) {
29
+ return generateColorsMap(color).colors.map((c) => c.hex());
30
+ }
31
+
32
+ exports.generateColors = generateColors;
33
+ exports.generateColorsMap = generateColorsMap;
34
+ //# sourceMappingURL=generate-colors.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-colors.cjs","sources":["../src/generate-colors.ts"],"sourcesContent":["import chroma from 'chroma-js';\n\nconst LIGHTNESS_MAP = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34];\nconst SATURATION_MAP = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32];\n\nfunction getClosestLightness(colorObject: chroma.Color) {\n const lightnessGoal = colorObject.get('hsl.l');\n return LIGHTNESS_MAP.reduce((prev, curr) =>\n Math.abs(curr - lightnessGoal) < Math.abs(prev - lightnessGoal) ? curr : prev\n );\n}\n\nexport function generateColorsMap(color: string) {\n const colorObject = chroma(color);\n const closestLightness = getClosestLightness(colorObject);\n const baseColorIndex = LIGHTNESS_MAP.findIndex((l) => l === closestLightness);\n\n const colors = LIGHTNESS_MAP.map((l) => colorObject.set('hsl.l', l))\n .map((c) => chroma(c))\n .map((c, i) => {\n const saturationDelta = SATURATION_MAP[i] - SATURATION_MAP[baseColorIndex];\n return saturationDelta >= 0\n ? c.saturate(saturationDelta)\n : c.desaturate(saturationDelta * -1);\n });\n\n return { baseColorIndex, colors };\n}\n\nexport type MantineColorsTuple = readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n];\n\nexport function generateColors(color: string) {\n return generateColorsMap(color).colors.map((c) => c.hex()) as unknown as MantineColorsTuple;\n}\n"],"names":["chroma"],"mappings":";;;;;;;;;AAEA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,GAAG,CAAC,CAAA,CAAA,CAAA,CAAI,EAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA,CAAA,CAAA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A,CAAA,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAC,CAAA,CAAA,CAAG,EAAE,CAAC,CAAA;AAC5D,CAAA;;;"}
package/cjs/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var generateColors = require('./generate-colors.cjs');
4
+
5
+
6
+
7
+ exports.generateColors = generateColors.generateColors;
8
+ exports.generateColorsMap = generateColors.generateColorsMap;
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ import chroma from 'chroma-js';
3
+
4
+ const LIGHTNESS_MAP = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34];
5
+ const SATURATION_MAP = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32];
6
+ function getClosestLightness(colorObject) {
7
+ const lightnessGoal = colorObject.get("hsl.l");
8
+ return LIGHTNESS_MAP.reduce(
9
+ (prev, curr) => Math.abs(curr - lightnessGoal) < Math.abs(prev - lightnessGoal) ? curr : prev
10
+ );
11
+ }
12
+ function generateColorsMap(color) {
13
+ const colorObject = chroma(color);
14
+ const closestLightness = getClosestLightness(colorObject);
15
+ const baseColorIndex = LIGHTNESS_MAP.findIndex((l) => l === closestLightness);
16
+ const colors = LIGHTNESS_MAP.map((l) => colorObject.set("hsl.l", l)).map((c) => chroma(c)).map((c, i) => {
17
+ const saturationDelta = SATURATION_MAP[i] - SATURATION_MAP[baseColorIndex];
18
+ return saturationDelta >= 0 ? c.saturate(saturationDelta) : c.desaturate(saturationDelta * -1);
19
+ });
20
+ return { baseColorIndex, colors };
21
+ }
22
+ function generateColors(color) {
23
+ return generateColorsMap(color).colors.map((c) => c.hex());
24
+ }
25
+
26
+ export { generateColors, generateColorsMap };
27
+ //# sourceMappingURL=generate-colors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-colors.mjs","sources":["../src/generate-colors.ts"],"sourcesContent":["import chroma from 'chroma-js';\n\nconst LIGHTNESS_MAP = [0.96, 0.907, 0.805, 0.697, 0.605, 0.547, 0.518, 0.445, 0.395, 0.34];\nconst SATURATION_MAP = [0.32, 0.16, 0.08, 0.04, 0, 0, 0.04, 0.08, 0.16, 0.32];\n\nfunction getClosestLightness(colorObject: chroma.Color) {\n const lightnessGoal = colorObject.get('hsl.l');\n return LIGHTNESS_MAP.reduce((prev, curr) =>\n Math.abs(curr - lightnessGoal) < Math.abs(prev - lightnessGoal) ? curr : prev\n );\n}\n\nexport function generateColorsMap(color: string) {\n const colorObject = chroma(color);\n const closestLightness = getClosestLightness(colorObject);\n const baseColorIndex = LIGHTNESS_MAP.findIndex((l) => l === closestLightness);\n\n const colors = LIGHTNESS_MAP.map((l) => colorObject.set('hsl.l', l))\n .map((c) => chroma(c))\n .map((c, i) => {\n const saturationDelta = SATURATION_MAP[i] - SATURATION_MAP[baseColorIndex];\n return saturationDelta >= 0\n ? c.saturate(saturationDelta)\n : c.desaturate(saturationDelta * -1);\n });\n\n return { baseColorIndex, colors };\n}\n\nexport type MantineColorsTuple = readonly [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n ...string[],\n];\n\nexport function generateColors(color: string) {\n return generateColorsMap(color).colors.map((c) => c.hex()) as unknown as MantineColorsTuple;\n}\n"],"names":[],"mappings":";;;AAEA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,GAAG,CAAC,CAAA,CAAA,CAAA,CAAI,EAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAK,CAAA,CAAA,CAAA,CAAA,C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C,CAAC,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAG,CAAA,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAC,CAAA,CAAA,CAAG,EAAE,CAAC,CAAA;AAC5D,CAAA;;"}
package/esm/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ export { generateColors, generateColorsMap } from './generate-colors.mjs';
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import chroma from 'chroma-js';
2
+ export declare function generateColorsMap(color: string): {
3
+ baseColorIndex: number;
4
+ colors: chroma.Color[];
5
+ };
6
+ export type MantineColorsTuple = readonly [
7
+ string,
8
+ string,
9
+ string,
10
+ string,
11
+ string,
12
+ string,
13
+ string,
14
+ string,
15
+ string,
16
+ string,
17
+ ...string[]
18
+ ];
19
+ export declare function generateColors(color: string): MantineColorsTuple;
@@ -0,0 +1 @@
1
+ export { generateColors, generateColorsMap } from './generate-colors';
package/lib/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { generateColors, generateColorsMap } from './generate-colors';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine/colors-generator",
3
- "version": "7.13.5-alpha.1",
3
+ "version": "7.13.5",
4
4
  "description": "A library to generate 10 shades of color based on provided color value",
5
5
  "homepage": "https://mantine.dev",
6
6
  "license": "MIT",