@digdir/designsystemet 0.1.0-next.21 → 0.1.0-next.22

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 (71) hide show
  1. package/dist/bin/designsystemet.js +2 -2
  2. package/dist/src/migrations/codemods/css/plugins.js +14 -15
  3. package/dist/src/migrations/codemods/jsx/classname-prefix.js +8 -7
  4. package/dist/src/tokens/actions.js +1 -1
  5. package/dist/src/tokens/build.js +26 -15
  6. package/dist/src/tokens/configs.js +20 -16
  7. package/dist/src/tokens/formats/css.js +36 -23
  8. package/dist/src/tokens/formats/js-tokens.js +8 -4
  9. package/dist/src/tokens/transformers.js +7 -3
  10. package/dist/src/tokens/utils/entryfile.js +31 -0
  11. package/dist/src/tokens/utils/permutateThemes.js +2 -2
  12. package/dist/src/tokens/utils/utils.js +11 -0
  13. package/dist/types/bin/designsystemet.d.ts +3 -0
  14. package/dist/types/bin/designsystemet.d.ts.map +1 -0
  15. package/dist/types/src/colors/colorUtils.d.ts +126 -0
  16. package/dist/types/src/colors/colorUtils.d.ts.map +1 -0
  17. package/dist/types/src/colors/index.d.ts +4 -0
  18. package/dist/types/src/colors/index.d.ts.map +1 -0
  19. package/dist/types/src/colors/themeUtils.d.ts +102 -0
  20. package/dist/types/src/colors/themeUtils.d.ts.map +1 -0
  21. package/dist/types/src/colors/types.d.ts +16 -0
  22. package/dist/types/src/colors/types.d.ts.map +1 -0
  23. package/dist/types/src/init/createTokensPackage.d.ts +5 -0
  24. package/dist/types/src/init/createTokensPackage.d.ts.map +1 -0
  25. package/dist/types/src/init/generateMetadataJson.d.ts +6 -0
  26. package/dist/types/src/init/generateMetadataJson.d.ts.map +1 -0
  27. package/dist/types/src/init/generateThemesJson.d.ts +3 -0
  28. package/dist/types/src/init/generateThemesJson.d.ts.map +1 -0
  29. package/dist/types/src/init/index.d.ts +3 -0
  30. package/dist/types/src/init/index.d.ts.map +1 -0
  31. package/dist/types/src/init/nextStepsMarkdown.d.ts +3 -0
  32. package/dist/types/src/init/nextStepsMarkdown.d.ts.map +1 -0
  33. package/dist/types/src/init/template/prettier.config.d.mts +9 -0
  34. package/dist/types/src/init/template/prettier.config.d.mts.map +1 -0
  35. package/dist/types/src/init/utils.d.ts +4 -0
  36. package/dist/types/src/init/utils.d.ts.map +1 -0
  37. package/dist/types/src/migrations/beta-to-v1.d.ts +3 -0
  38. package/dist/types/src/migrations/beta-to-v1.d.ts.map +1 -0
  39. package/dist/types/src/migrations/codemods/css/plugins.d.ts +6 -0
  40. package/dist/types/src/migrations/codemods/css/plugins.d.ts.map +1 -0
  41. package/dist/types/src/migrations/codemods/css/run.d.ts +8 -0
  42. package/dist/types/src/migrations/codemods/css/run.d.ts.map +1 -0
  43. package/dist/types/src/migrations/codemods/jsx/classname-prefix.d.ts +10 -0
  44. package/dist/types/src/migrations/codemods/jsx/classname-prefix.d.ts.map +1 -0
  45. package/dist/types/src/migrations/codemods/jsx/run.d.ts +7 -0
  46. package/dist/types/src/migrations/codemods/jsx/run.d.ts.map +1 -0
  47. package/dist/types/src/migrations/index.d.ts +6 -0
  48. package/dist/types/src/migrations/index.d.ts.map +1 -0
  49. package/dist/types/src/migrations/react-beta-to-v1.d.ts +3 -0
  50. package/dist/types/src/migrations/react-beta-to-v1.d.ts.map +1 -0
  51. package/dist/types/src/tokens/actions.d.ts +6 -0
  52. package/dist/types/src/tokens/actions.d.ts.map +1 -0
  53. package/dist/types/src/tokens/build.d.ts +11 -0
  54. package/dist/types/src/tokens/build.d.ts.map +1 -0
  55. package/dist/types/src/tokens/configs.d.ts +31 -0
  56. package/dist/types/src/tokens/configs.d.ts.map +1 -0
  57. package/dist/types/src/tokens/formats/css.d.ts +5 -0
  58. package/dist/types/src/tokens/formats/css.d.ts.map +1 -0
  59. package/dist/types/src/tokens/formats/js-tokens.d.ts +6 -0
  60. package/dist/types/src/tokens/formats/js-tokens.d.ts.map +1 -0
  61. package/dist/types/src/tokens/transformers.d.ts +5 -0
  62. package/dist/types/src/tokens/transformers.d.ts.map +1 -0
  63. package/dist/types/src/tokens/utils/entryfile.d.ts +11 -0
  64. package/dist/types/src/tokens/utils/entryfile.d.ts.map +1 -0
  65. package/dist/types/src/tokens/utils/noCase.d.ts +11 -0
  66. package/dist/types/src/tokens/utils/noCase.d.ts.map +1 -0
  67. package/dist/types/src/tokens/utils/permutateThemes.d.ts +17 -0
  68. package/dist/types/src/tokens/utils/permutateThemes.d.ts.map +1 -0
  69. package/dist/types/src/tokens/utils/utils.d.ts +25 -0
  70. package/dist/types/src/tokens/utils/utils.d.ts.map +1 -0
  71. package/package.json +24 -22
@@ -0,0 +1,126 @@
1
+ import type { CssColor } from '@adobe/leonardo-contrast-colors';
2
+ /**
3
+ * Converts a HEX color '#xxxxxx' into a CSS HSL string 'hsl(x,x,x)'
4
+ *
5
+ * @param hex A hex color string
6
+ * @param valuesOnly If true, only the values are returned
7
+ * @returns A CSS HSL string
8
+ */
9
+ export declare const hexToCssHsl: (hex: string, valuesOnly?: boolean) => string;
10
+ /**
11
+ * Converts a HEX string '#xxxxxx' into an array of HSL values '[h,s,l]'
12
+ *
13
+ * @param H A Hex color string
14
+ * @returns HSL values in an array
15
+ */
16
+ export declare const hexToHSL: (H: string) => number[];
17
+ /**
18
+ * Converts a HEX color '#xxxxxx' into an array of HSLuv values '[h,s,l]'
19
+ *
20
+ * @param hex A hex color string
21
+ * @returns
22
+ */
23
+ export declare const hexToHsluv: (hex: string) => number[];
24
+ /**
25
+ * Converts a HSL number array '[h,s,l]' into HSL CSS string 'hsl(x,x,x)'
26
+ *
27
+ * @param HSL A HSL number array '[h,s,l]'
28
+ * @returns A hex color string
29
+ */
30
+ export declare const hslArrToCss: (HSL: number[]) => string;
31
+ /**
32
+ * Converts a HSL CSS string 'hsl(x,x,x)' into an array of HSL values '[h,s,l]'
33
+ *
34
+ * @param h The HSL hue
35
+ * @param s The HSL saturation
36
+ * @param l The HSL lightness
37
+ * @returns HEX color string
38
+ */
39
+ export declare const HSLToHex: (h: number, s: number, l: number) => string;
40
+ /**
41
+ * Converts a HEX color '#xxxxxx' into an array of RGB values '[R, G, B]'
42
+ *
43
+ * @param hex A hex color string
44
+ * @returns RGB values in an array
45
+ */
46
+ export declare const hexToRgb: (hex: string) => {
47
+ r: number;
48
+ g: number;
49
+ b: number;
50
+ } | null;
51
+ /**
52
+ * Get the luminance of an RGB color
53
+ *
54
+ * @param r RGB red value
55
+ * @param G RGB green value
56
+ * @param b RGB blue value
57
+ * @returns
58
+ */
59
+ export declare const luminanceFromRgb: (r: string, g: string, b: string) => number;
60
+ /**
61
+ * Get the luminance of a HEX color
62
+ *
63
+ * @param hex A hex color string
64
+ * @returns
65
+ */
66
+ export declare const luminanceFromHex: (hex: CssColor) => number;
67
+ /**
68
+ * Get the contrast ratio between two luminance values
69
+ *
70
+ * @param lum1 The first luminance value
71
+ * @param lum2 The second luminance value
72
+ * @returns
73
+ */
74
+ export declare const getRatioFromLum: (lum1: number, lum2: number) => number;
75
+ /**
76
+ * Get the HSL lightness from a HEX color
77
+ *
78
+ * @param hex A hex color string
79
+ * @returns
80
+ */
81
+ export declare const getHslLightessFromHex: (hex: CssColor) => number;
82
+ export declare const getHslSaturationFromHex: (hex: CssColor) => number;
83
+ /**
84
+ * Get the HSLuv lightness from a HEX color
85
+ *
86
+ * @param hex A hex color string
87
+ * @returns
88
+ */
89
+ export declare const getLightnessFromHex: (hex: string) => number;
90
+ /**
91
+ * Get the contrast ratio between two HEX colors
92
+ *
93
+ * @param {CssColor} color1 The first color
94
+ * @param {CssColor} color2 The second color
95
+ * @returns
96
+ */
97
+ export declare const getContrastFromHex: (color1: CssColor, color2: CssColor) => number;
98
+ /**
99
+ * Get the contrast ratio between two colors at a specific lightness
100
+ *
101
+ * @param lightness The lightness value
102
+ * @param mainColor The main color
103
+ * @param backgroundColor The background color
104
+ * @returns The contrast ratio
105
+ */
106
+ export declare const getContrastFromLightness: (lightness: number, mainColor: CssColor, backgroundColor: CssColor) => number;
107
+ /**
108
+ * Maps the numbers from [start1 - end1] to the range [start2 - end2], maintaining the proportionality between the numbers in the ranges using lineaer interpolation.
109
+ */
110
+ /**
111
+ * Check if two colors have enough contrast to be used together
112
+ *
113
+ * @param {CssColor} color1 The first color
114
+ * @param {CssColor} color2 The second color
115
+ * @returns {boolean} If the colors have enough contrast
116
+ */
117
+ export declare const areColorsContrasting: (color1: CssColor, color2: CssColor, type?: "decorative" | "aa" | "aaa") => boolean;
118
+ export declare const getApcaContrastLc: (textColor: CssColor, backgroundColor: CssColor) => string | number;
119
+ /**
120
+ * Check if aa string value is a HEX color
121
+ *
122
+ * @param {string} hex The string to check
123
+ * @returns {boolean} If the string is a HEX color
124
+ */
125
+ export declare const isHexColor: (hex: string) => boolean;
126
+ //# sourceMappingURL=colorUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../src/colors/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAKhE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,iCA6CtC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,MAAO,MAAM,aAwCjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,aAKrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,EAAE,WAExC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,WA+CvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAS,MAAM;;;;QAYnC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,MAAO,MAAM,KAAK,MAAM,KAAK,MAAM,WAM/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAS,QAAQ,WAS7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,QAAQ,MAAM,WAKzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAS,QAAQ,WAElD,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,QAAQ,WAEpD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAS,MAAM,WAK9C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,WAAY,QAAQ,UAAU,QAAQ,WAOpE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,cAAe,MAAM,aAAa,QAAQ,mBAAmB,QAAQ,WAYzG,CAAC;AAEF;;GAEG;AAKH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,WAAY,QAAQ,UAAU,QAAQ,SAAQ,YAAY,GAAG,IAAI,GAAG,KAAK,YAYzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,QAAQ,mBAAmB,QAAQ,oBAW/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,YAErC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './colorUtils';
2
+ export * from './themeUtils';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,102 @@
1
+ import type { CssColor } from '@adobe/leonardo-contrast-colors';
2
+ import type { ColorInfo, ColorNumber, ContrastMode, Mode, ThemeInfo } from './types';
3
+ export type ColorError = 'none' | 'decorative' | 'interaction';
4
+ type GlobalGenType = {
5
+ themeMode?: Mode | 'all';
6
+ contrastMode?: ContrastMode;
7
+ };
8
+ type ThemeGenType = {
9
+ colors: {
10
+ accent: CssColor;
11
+ neutral: CssColor;
12
+ brand1: CssColor;
13
+ brand2: CssColor;
14
+ brand3: CssColor;
15
+ };
16
+ contrastMode?: ContrastMode;
17
+ };
18
+ /**
19
+ *
20
+ * Generates a color scale based on a base color and a mode.
21
+ *
22
+ * @param color The base color that is used to generate the color scale
23
+ * @param mode The mode of the theme
24
+ */
25
+ export declare const generateScaleForColor: (color: CssColor, mode: Mode, contrastMode?: "aa" | "aaa") => ColorInfo[];
26
+ /**
27
+ *
28
+ * Generates a color theme based on a base color. Light, Dark and Contrast scales are includes.
29
+ *
30
+ * @param color The base color that is used to generate the color theme
31
+ */
32
+ export declare const generateThemeForColor: (color: CssColor, contrastMode?: "aa" | "aaa") => ThemeInfo;
33
+ export declare const generateGlobalColors: ({ contrastMode }: GlobalGenType) => {
34
+ blue: ThemeInfo;
35
+ green: ThemeInfo;
36
+ orange: ThemeInfo;
37
+ purple: ThemeInfo;
38
+ red: ThemeInfo;
39
+ yellow: ThemeInfo;
40
+ };
41
+ /**
42
+ * This function generates a complete theme for a set of colors.
43
+ *
44
+ * @param colors Which colors to generate the theme for
45
+ * @param contrastMode The contrast mode to use
46
+ * @returns
47
+ */
48
+ export declare const generateColorTheme: ({ colors, contrastMode }: ThemeGenType) => {
49
+ accent: ThemeInfo;
50
+ neutral: ThemeInfo;
51
+ brand1: ThemeInfo;
52
+ brand2: ThemeInfo;
53
+ brand3: ThemeInfo;
54
+ };
55
+ /**
56
+ *
57
+ * This function calculates a color that can be used as a strong contrast color to a base color.
58
+ *
59
+ * @param baseColor The base color
60
+ */
61
+ export declare const calculateContrastOneColor: (baseColor: CssColor) => "#ffffff" | "#000000";
62
+ /**
63
+ *
64
+ * This function calculates a color that can be used as a subtle contrast color to a base color.
65
+ *
66
+ * @param color The base color
67
+ */
68
+ export declare const calculateContrastTwoColor: (color: CssColor) => CssColor;
69
+ /**
70
+ *
71
+ * This function checks if white or black text can be used on 2 different colors at 4.5:1 contrast.
72
+ *
73
+ * @param baseDefaultColor Base default color
74
+ * @param baseActiveColor Base active color
75
+ */
76
+ export declare const canTextBeUsedOnColors: (baseDefaultColor: CssColor, baseActiveColor: CssColor) => boolean;
77
+ /**
78
+ *
79
+ * This function creates a color with a specific lightness value.
80
+ *
81
+ * @param color The base color
82
+ * @param lightness The lightness value from 0 to 100
83
+ */
84
+ export declare const createColorWithLightness: (color: CssColor, lightness: number) => CssColor;
85
+ /**
86
+ *
87
+ * This function returns the color number based on the color name.
88
+ *
89
+ * @param name The name of the color
90
+ */
91
+ export declare const getColorNumberFromName: (name: string) => ColorNumber;
92
+ /**
93
+ *
94
+ * This function returns the color name based on the color number.
95
+ *
96
+ * @param number The number of the color
97
+ */
98
+ export declare const getColorNameFromNumber: (number: ColorNumber) => string;
99
+ export declare const getBaseColor: (color: CssColor) => CssColor;
100
+ export declare const getCssVariable: (colorType: string, colorNumber: ColorNumber) => string;
101
+ export {};
102
+ //# sourceMappingURL=themeUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeUtils.d.ts","sourceRoot":"","sources":["../../../../src/colors/themeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAKhE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AASrF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,CAAC;AAE/D,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE;QACN,MAAM,EAAE,QAAQ,CAAC;QACjB,OAAO,EAAE,QAAQ,CAAC;QAClB,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,QAAQ,CAAC;KAClB,CAAC;IACF,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAoEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,UAAW,QAAQ,QAAQ,IAAI,iBAAgB,IAAI,GAAG,KAAK,KAAU,SAAS,EAuC/G,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UAAW,QAAQ,iBAAgB,IAAI,GAAG,KAAK,KAS1E,SACN,CAAC;AAEF,eAAO,MAAM,oBAAoB,qBAA6B,aAAa;;;;;;;CAgB1E,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,6BAAqC,YAAY;;;;;;CAc/E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,cAAe,QAAQ,0BAO5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,UAAW,QAAQ,aAaxD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,qBAAsB,QAAQ,mBAAmB,QAAQ,YAe1F,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,UAAW,QAAQ,aAAa,MAAM,aAkB1E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,MAAM,KAAG,WAmBrD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,WAAY,WAAW,KAAG,MAmB5D,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,QAAQ,KAQvB,QACpB,CAAC;AAEF,eAAO,MAAM,cAAc,cAAe,MAAM,eAAe,WAAW,WAEzE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { CssColor } from '@adobe/leonardo-contrast-colors';
2
+ export type Mode = 'light' | 'dark' | 'contrast';
3
+ export type ContrastMode = 'aa' | 'aaa';
4
+ export type ColorNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
5
+ export type ColorType = 'accent' | 'neutral' | 'brand1' | 'brand2' | 'brand3';
6
+ export type ColorInfo = {
7
+ hex: CssColor;
8
+ number: ColorNumber;
9
+ name: string;
10
+ };
11
+ export type ThemeInfo = {
12
+ light: ColorInfo[];
13
+ dark: ColorInfo[];
14
+ contrast: ColorInfo[];
15
+ };
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/colors/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,KAAK,CAAC;AACxC,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAC1F,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC9E,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,QAAQ,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const MODES: readonly ["Light", "Dark", "Contrast"];
2
+ export type Mode = (typeof MODES)[number];
3
+ export declare function createTokensPackage(targetDir: string): Promise<void>;
4
+ export {};
5
+ //# sourceMappingURL=createTokensPackage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTokensPackage.d.ts","sourceRoot":"","sources":["../../../../src/init/createTokensPackage.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,KAAK,wCAAyC,CAAC;AACrD,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AA0B1C,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,iBAyO1D"}
@@ -0,0 +1,6 @@
1
+ interface Metadata {
2
+ tokenSetOrder: string[];
3
+ }
4
+ export default function generateMetadataJson(modes: Array<'Light' | 'Dark' | 'Contrast'>, themes: string[]): Metadata;
5
+ export {};
6
+ //# sourceMappingURL=generateMetadataJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateMetadataJson.d.ts","sourceRoot":"","sources":["../../../../src/init/generateMetadataJson.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAcpH"}
@@ -0,0 +1,3 @@
1
+ import { type ThemeObject } from '@tokens-studio/types';
2
+ export default function generateThemesJson(modes: Array<'Light' | 'Dark' | 'Contrast'>, themes: string[]): ThemeObject[];
3
+ //# sourceMappingURL=generateThemesJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateThemesJson.d.ts","sourceRoot":"","sources":["../../../../src/init/generateThemesJson.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AAIxE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,KAAK,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC,EAC3C,MAAM,EAAE,MAAM,EAAE,GACf,WAAW,EAAE,CAEf"}
@@ -0,0 +1,3 @@
1
+ import { type Command } from '@commander-js/extra-typings';
2
+ export declare function makeInitCommand(command: Command): Command<[string], {}>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAIrE,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,yBAQ/C"}
@@ -0,0 +1,3 @@
1
+ import type { Mode } from './createTokensPackage.js';
2
+ export declare function nextStepsMarkdown(themes: string[], modes: Mode[], tokensTargetDir: string, packageName: string): string;
3
+ //# sourceMappingURL=nextStepsMarkdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextStepsMarkdown.d.ts","sourceRoot":"","sources":["../../../../src/init/nextStepsMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAGrD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UA4F9G"}
@@ -0,0 +1,9 @@
1
+ export default config;
2
+ /**
3
+ * NOTE: This config exists to ensure files in the template dir are
4
+ * formatted using the default prettier rules
5
+ * @see https://prettier.io/docs/en/configuration.html
6
+ * @type {import("prettier").Config}
7
+ */
8
+ declare const config: import("prettier").Config;
9
+ //# sourceMappingURL=prettier.config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier.config.d.mts","sourceRoot":"","sources":["../../../../../src/init/template/prettier.config.mjs"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,sBAFU,OAAO,UAAU,EAAE,MAAM,CAEjB"}
@@ -0,0 +1,4 @@
1
+ export declare function normalizeTokenSetName(name: string): string;
2
+ export declare function toGeneratedCssFileName(name: string): string;
3
+ export declare function toValidPackageName(projectName: string): string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/init/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,UAOrD"}
@@ -0,0 +1,3 @@
1
+ declare const _default: (glob?: string) => Promise<void>;
2
+ export default _default;
3
+ //# sourceMappingURL=beta-to-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beta-to-v1.d.ts","sourceRoot":"","sources":["../../../../src/migrations/beta-to-v1.ts"],"names":[],"mappings":"gCAGuB,MAAM;AAA7B,wBAmVK"}
@@ -0,0 +1,6 @@
1
+ import type { Plugin } from 'postcss';
2
+ type PluginGenerator = (dictionary: Record<string, string>) => Plugin;
3
+ export declare const cssClassRename: PluginGenerator;
4
+ export declare const cssVarRename: PluginGenerator;
5
+ export {};
6
+ //# sourceMappingURL=plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../../../src/migrations/codemods/css/plugins.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,MAAM,EAAE,MAAM,SAAS,CAAC;AAGnD,KAAK,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;AAOtE,eAAO,MAAM,cAAc,EAAE,eAe3B,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,eA2BzB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { AcceptedPlugin } from 'postcss';
2
+ type CssCodemodProps = {
3
+ plugins: AcceptedPlugin[];
4
+ globPattern?: string;
5
+ };
6
+ export declare const runCssCodemod: ({ plugins, globPattern }: CssCodemodProps) => Promise<void>;
7
+ export {};
8
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../../src/migrations/codemods/css/run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,6BAAwD,eAAe,kBAkBhG,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { API, FileInfo } from 'jscodeshift';
2
+ /**
3
+ * Replace all class prefixes from 'fds-' to 'ds-'
4
+ * @param file
5
+ * @param api
6
+ * @returns
7
+ */
8
+ declare function replaceClassNamePrefix(file: FileInfo, api: API): string | undefined;
9
+ export default replaceClassNamePrefix;
10
+ //# sourceMappingURL=classname-prefix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classname-prefix.d.ts","sourceRoot":"","sources":["../../../../../../src/migrations/codemods/jsx/classname-prefix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AAoElE;;;;;GAKG;AACH,iBAAS,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAiB5E;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ type CssCodemodProps = {
2
+ globPattern?: string;
3
+ dry?: boolean;
4
+ };
5
+ export declare const runJSXCodemod: ({ globPattern, dry }: CssCodemodProps) => Promise<void>;
6
+ export {};
7
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../../../src/migrations/codemods/jsx/run.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAIF,eAAO,MAAM,aAAa,yBAA+C,eAAe,kBAiBvF,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ 'css-beta-to-v1': (glob?: string) => Promise<void>;
3
+ 'react-beta-to-v1': (glob?: string) => Promise<void>;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/migrations/index.ts"],"names":[],"mappings":";;;;AAGA,wBAGE"}
@@ -0,0 +1,3 @@
1
+ declare const _default: (glob?: string) => Promise<void>;
2
+ export default _default;
3
+ //# sourceMappingURL=react-beta-to-v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-beta-to-v1.d.ts","sourceRoot":"","sources":["../../../../src/migrations/react-beta-to-v1.ts"],"names":[],"mappings":"gCAEuB,MAAM;AAA7B,wBAAuE"}
@@ -0,0 +1,6 @@
1
+ import type { Action } from 'style-dictionary/types';
2
+ /**
3
+ * Creates a CSS entry file that imports base CSS files for a theme
4
+ */
5
+ export declare const makeEntryFile: Action;
6
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/tokens/actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASrD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAuB3B,CAAC"}
@@ -0,0 +1,11 @@
1
+ type Options = {
2
+ /** Design tokens path */
3
+ tokens: string;
4
+ /** Output directoru for built tokens */
5
+ out: string;
6
+ /** Generate preview tokens */
7
+ preview: boolean;
8
+ };
9
+ export declare function run(options: Options): Promise<void>;
10
+ export {};
11
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/tokens/build.ts"],"names":[],"mappings":"AAaA,KAAK,OAAO,GAAG;IACb,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAMF,wBAAsB,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA4FzD"}
@@ -0,0 +1,31 @@
1
+ import type { ThemeObject } from '@tokens-studio/types';
2
+ import type { Config, TransformedToken } from 'style-dictionary/types';
3
+ import type { PermutatedThemes } from './utils/permutateThemes.js';
4
+ export declare const prefix = "ds";
5
+ export declare const basePxFontSize = 16;
6
+ export declare const separator = "_";
7
+ export type IsCalculatedToken = (token: TransformedToken, options?: Config) => boolean;
8
+ export declare const permutateThemes: ($themes: ThemeObject[]) => PermutatedThemes;
9
+ type GetConfig = (options: {
10
+ mode?: string;
11
+ theme?: string;
12
+ semantic?: string;
13
+ size?: string;
14
+ typography?: string;
15
+ outPath?: string;
16
+ }) => Config;
17
+ export declare const colorModeVariables: GetConfig;
18
+ export declare const semanticVariables: GetConfig;
19
+ export declare const typescriptTokens: GetConfig;
20
+ export declare const typographyCSS: GetConfig;
21
+ type getConfigs = (getConfig: GetConfig, outPath: string, tokensDir: string, themes: PermutatedThemes) => {
22
+ mode: string;
23
+ theme: string;
24
+ semantic: string;
25
+ size: string;
26
+ typography: string;
27
+ config: Config;
28
+ }[];
29
+ export declare const getConfigs: getConfigs;
30
+ export {};
31
+ //# sourceMappingURL=configs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../../src/tokens/configs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAOvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAQnE,eAAO,MAAM,MAAM,OAAO,CAAC;AAC3B,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,SAAS,MAAM,CAAC;AAyC7B,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvF,eAAO,MAAM,eAAe,YAAa,WAAW,EAAE,qBAGlD,CAAC;AAEL,KAAK,SAAS,GAAG,CAAC,OAAO,EAAE;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,KAAK,MAAM,CAAC;AAEb,eAAO,MAAM,kBAAkB,EAAE,SAkChC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SA+C/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAqC9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SA2C3B,CAAC;AAEF,KAAK,UAAU,GAAG,CAChB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,gBAAgB,KACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC;AAE3G,eAAO,MAAM,UAAU,EAAE,UAqCd,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Format } from 'style-dictionary/types';
2
+ export declare const colormode: Format;
3
+ export declare const semantic: Format;
4
+ export declare const typography: Format;
5
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/formats/css.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAarD,eAAO,MAAM,SAAS,EAAE,MA4BvB,CAAC;AAIF,eAAO,MAAM,QAAQ,EAAE,MAsCtB,CAAC;AAsCF,eAAO,MAAM,UAAU,EAAE,MAyFxB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Format } from 'style-dictionary/types';
2
+ /**
3
+ * Format for displaying tokens in storefront
4
+ */
5
+ export declare const jsTokens: Format;
6
+ //# sourceMappingURL=js-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js-tokens.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/formats/js-tokens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,wBAAwB,CAAC;AAkBvE;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MA2BtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Transform } from 'style-dictionary/types';
2
+ export declare const sizeRem: Transform;
3
+ export declare const nameKebab: Transform;
4
+ export declare const typographyShorthand: Transform;
5
+ //# sourceMappingURL=transformers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../../../src/tokens/transformers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAOxD,eAAO,MAAM,OAAO,EAAE,SAyBrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SASvB,CAAC;AASF,eAAO,MAAM,mBAAmB,EAAE,SASjC,CAAC"}
@@ -0,0 +1,11 @@
1
+ type EntryFile = (options: {
2
+ outPath: string;
3
+ buildPath: string;
4
+ theme: string;
5
+ }) => Promise<undefined>;
6
+ /**
7
+ * Creates a CSS entry file that imports base CSS files for a theme
8
+ */
9
+ export declare const makeEntryFile: EntryFile;
10
+ export {};
11
+ //# sourceMappingURL=entryfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entryfile.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/utils/entryfile.ts"],"names":[],"mappings":"AA2BA,KAAK,SAAS,GAAG,CAAC,OAAO,EAAE;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAO3B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface Options {
2
+ splitRegexp?: RegExp | RegExp[];
3
+ stripRegexp?: RegExp | RegExp[];
4
+ delimiter?: string;
5
+ transform?: (part: string, index: number, parts: string[]) => string;
6
+ }
7
+ /**
8
+ * Normalize the string into something other libraries can manipulate easier.
9
+ */
10
+ export declare function noCase(input: string, options?: Options): string;
11
+ //# sourceMappingURL=noCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noCase.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/utils/noCase.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;CACtE;AAQD;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,OAAY,UAkB1D"}
@@ -0,0 +1,17 @@
1
+ import type { ThemeObject } from '@tokens-studio/types';
2
+ declare interface Options {
3
+ separator?: string;
4
+ }
5
+ export type PermutatedTheme = {
6
+ mode?: string;
7
+ semantic?: string;
8
+ size?: string;
9
+ theme?: string;
10
+ typography?: string;
11
+ name: string;
12
+ selectedTokenSets: string[];
13
+ };
14
+ export type PermutatedThemes = PermutatedTheme[];
15
+ export declare function permutateThemes(themes: ThemeObject[], { separator }?: Options): PermutatedThemes;
16
+ export {};
17
+ //# sourceMappingURL=permutateThemes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permutateThemes.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/utils/permutateThemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,OAAO,WAAW,OAAO;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,eAAe,EAAE,CAAC;AAMjD,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,SAAe,EAAE,GAAS,OAAO,GAAG,gBAAgB,CAoD5G"}
@@ -0,0 +1,25 @@
1
+ import type { DesignToken, TransformedToken } from 'style-dictionary/types';
2
+ /**
3
+ * Returns type based on design token format used. Read more:https://v4.styledictionary.com/info/dtcg/
4
+ * @param token Transformed token
5
+ * @returns type
6
+ */
7
+ export declare const getType: (token: TransformedToken) => string;
8
+ /**
9
+ * Returns value based on design token format used. Read more:https://v4.styledictionary.com/info/dtcg/
10
+ *
11
+ * Use generic (`<T>`) to define return value type
12
+ * @param token Transformed or Design token
13
+ * @returns value
14
+ */
15
+ export declare const getValue: <T>(token: TransformedToken | DesignToken) => T;
16
+ /**
17
+ * Check if token type matches provided type
18
+ * This function is curried
19
+ * @param types Type or array of types to check against
20
+ * @param token Transformed token
21
+ * @returns boolean
22
+ */
23
+ export declare const typeEquals: import("ts-toolbelt/out/Function/Curry").Curry<(types: string[] | string, token: TransformedToken) => boolean>;
24
+ export declare const pathStartsWithOneOf: import("ts-toolbelt/out/Function/Curry").Curry<(paths: string[], token: TransformedToken) => boolean>;
25
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/tokens/utils/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM5E;;;;GAIG;AACH,eAAO,MAAM,OAAO,UAAW,gBAAgB,WAAkD,CAAC;AAElG;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,gBAAgB,GAAG,WAAW,KAAG,CAAuC,CAAC;AAE5G;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,yDAAmB,MAAM,EAAE,GAAG,MAAM,SAAS,gBAAgB,aAMlF,CAAC;AAEH,eAAO,MAAM,mBAAmB,yDAAmB,MAAM,EAAE,SAAS,gBAAgB,aASlF,CAAC"}