@diskette/palette 0.15.0 → 0.18.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.
Files changed (77) hide show
  1. package/dist/cli/cli.js +11 -0
  2. package/dist/cli/commands/generate.d.ts +64 -0
  3. package/dist/cli/commands/generate.js +87 -0
  4. package/dist/cli/commands/list.d.ts +48 -0
  5. package/dist/cli/commands/list.js +33 -0
  6. package/dist/colors/amber.d.ts +1 -5
  7. package/dist/colors/amber.js +0 -4
  8. package/dist/colors/blue.d.ts +1 -5
  9. package/dist/colors/blue.js +0 -4
  10. package/dist/colors/bronze.d.ts +1 -5
  11. package/dist/colors/bronze.js +0 -4
  12. package/dist/colors/brown.d.ts +1 -5
  13. package/dist/colors/brown.js +0 -4
  14. package/dist/colors/crimson.d.ts +1 -5
  15. package/dist/colors/crimson.js +0 -4
  16. package/dist/colors/cyan.d.ts +1 -5
  17. package/dist/colors/cyan.js +0 -4
  18. package/dist/colors/gold.d.ts +1 -5
  19. package/dist/colors/gold.js +0 -4
  20. package/dist/colors/grass.d.ts +1 -5
  21. package/dist/colors/grass.js +0 -4
  22. package/dist/colors/gray.d.ts +1 -5
  23. package/dist/colors/gray.js +0 -4
  24. package/dist/colors/green.d.ts +1 -5
  25. package/dist/colors/green.js +0 -4
  26. package/dist/colors/indigo.d.ts +1 -5
  27. package/dist/colors/indigo.js +0 -4
  28. package/dist/colors/iris.d.ts +1 -5
  29. package/dist/colors/iris.js +0 -4
  30. package/dist/colors/jade.d.ts +1 -5
  31. package/dist/colors/jade.js +0 -4
  32. package/dist/colors/lime.d.ts +1 -5
  33. package/dist/colors/lime.js +0 -4
  34. package/dist/colors/mauve.d.ts +1 -5
  35. package/dist/colors/mauve.js +0 -4
  36. package/dist/colors/mint.d.ts +1 -5
  37. package/dist/colors/mint.js +0 -4
  38. package/dist/colors/olive.d.ts +1 -5
  39. package/dist/colors/olive.js +0 -4
  40. package/dist/colors/orange.d.ts +1 -5
  41. package/dist/colors/orange.js +0 -4
  42. package/dist/colors/pink.d.ts +1 -5
  43. package/dist/colors/pink.js +0 -4
  44. package/dist/colors/plum.d.ts +1 -5
  45. package/dist/colors/plum.js +0 -4
  46. package/dist/colors/purple.d.ts +1 -5
  47. package/dist/colors/purple.js +0 -4
  48. package/dist/colors/red.d.ts +1 -5
  49. package/dist/colors/red.js +0 -4
  50. package/dist/colors/ruby.d.ts +1 -5
  51. package/dist/colors/ruby.js +0 -4
  52. package/dist/colors/sage.d.ts +1 -5
  53. package/dist/colors/sage.js +0 -4
  54. package/dist/colors/sand.d.ts +1 -5
  55. package/dist/colors/sand.js +0 -4
  56. package/dist/colors/sky.d.ts +1 -5
  57. package/dist/colors/sky.js +0 -4
  58. package/dist/colors/slate.d.ts +1 -5
  59. package/dist/colors/slate.js +0 -4
  60. package/dist/colors/teal.d.ts +1 -5
  61. package/dist/colors/teal.js +0 -4
  62. package/dist/colors/tomato.d.ts +1 -5
  63. package/dist/colors/tomato.js +0 -4
  64. package/dist/colors/violet.d.ts +1 -5
  65. package/dist/colors/violet.js +0 -4
  66. package/dist/colors/yellow.d.ts +1 -5
  67. package/dist/colors/yellow.js +0 -4
  68. package/dist/css.d.ts +2 -2
  69. package/dist/css.js +0 -6
  70. package/dist/index.d.ts +3754 -3846
  71. package/dist/index.js +3 -2
  72. package/dist/types.d.ts +7 -7
  73. package/package.json +4 -4
  74. package/dist/cli/clit.d.ts +0 -1
  75. package/dist/cli/clit.js +0 -21
  76. package/dist/cli.js +0 -100
  77. /package/dist/{cli.d.ts → cli/cli.d.ts} +0 -0
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  skyA10: string;
26
26
  skyA11: string;
27
27
  skyA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  sky1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  skyA10: string;
53
52
  skyA11: string;
54
53
  skyA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  skyA10: string;
82
80
  skyA11: string;
83
81
  skyA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  sky1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  skyA10: string;
109
106
  skyA11: string;
110
107
  skyA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "sky";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  skyA10: '#00bcf38b',
26
26
  skyA11: '#00749e',
27
27
  skyA12: '#002540e2',
28
- surface: '#eef9fdcc',
29
28
  },
30
29
  dark: {
31
30
  sky1: '#0d141f',
@@ -52,7 +51,6 @@ export default {
52
51
  skyA10: '#a8eeff',
53
52
  skyA11: '#7cd3ffef',
54
53
  skyA12: '#c2f3ff',
55
- surface: '#13233b80',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  skyA10: 'color(display-p3 0.004 0.647 0.914 / 0.444)',
82
80
  skyA11: 'color(display-p3 0.193 0.448 0.605)',
83
81
  skyA12: 'color(display-p3 0.145 0.241 0.329)',
84
- surface: 'color(display-p3 0.9412 0.9765 0.9843 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  sky1: 'color(display-p3 0.056 0.078 0.116)',
@@ -108,7 +105,6 @@ export default {
108
105
  skyA10: 'color(display-p3 0.722 0.933 1 / 0.992)',
109
106
  skyA11: 'color(display-p3 0.536 0.772 0.924)',
110
107
  skyA12: 'color(display-p3 0.799 0.947 0.993)',
111
- surface: 'color(display-p3 0.0863 0.1333 0.2196 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: '#1c2024',
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  slateA10: string;
26
26
  slateA11: string;
27
27
  slateA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  slate1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  slateA10: string;
53
52
  slateA11: string;
54
53
  slateA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  slateA10: string;
82
80
  slateA11: string;
83
81
  slateA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  slate1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  slateA10: string;
109
106
  slateA11: string;
110
107
  slateA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "slate";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  slateA10: '#00071b7f',
26
26
  slateA11: '#0007149f',
27
27
  slateA12: '#000509e3',
28
- surface: '#ffffffcc',
29
28
  },
30
29
  dark: {
31
30
  slate1: '#111113',
@@ -52,7 +51,6 @@ export default {
52
51
  slateA10: '#e5edfd7b',
53
52
  slateA11: '#f1f7feb5',
54
53
  slateA12: '#fcfdffef',
55
- surface: '#1f212380',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  slateA10: 'color(display-p3 0.004 0.027 0.098 / 0.499)',
82
80
  slateA11: 'color(display-p3 0 0.02 0.063 / 0.62)',
83
81
  slateA12: 'color(display-p3 0 0.012 0.031 / 0.887)',
84
- surface: 'color(display-p3 1 1 1 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  slate1: 'color(display-p3 0.067 0.067 0.074)',
@@ -108,7 +105,6 @@ export default {
108
105
  slateA10: 'color(display-p3 0.918 0.945 1 / 0.475)',
109
106
  slateA11: 'color(display-p3 0.949 0.969 0.996 / 0.708)',
110
107
  slateA12: 'color(display-p3 0.988 0.992 1 / 0.937)',
111
- surface: 'color(display-p3 0.1176 0.1255 0.1333 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: 'white',
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  tealA10: string;
26
26
  tealA11: string;
27
27
  tealA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  teal1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  tealA10: string;
53
52
  tealA11: string;
54
53
  tealA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  tealA10: string;
82
80
  tealA11: string;
83
81
  tealA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  teal1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  tealA10: string;
109
106
  tealA11: string;
110
107
  tealA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "teal";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  tealA10: '#009684f2',
26
26
  tealA11: '#008573',
27
27
  tealA12: '#00332df2',
28
- surface: '#f0faf8cc',
29
28
  },
30
29
  dark: {
31
30
  teal1: '#0d1514',
@@ -52,7 +51,6 @@ export default {
52
51
  tealA10: '#0dffe0ae',
53
52
  tealA11: '#0afed5d6',
54
53
  tealA12: '#b8ffebef',
55
- surface: '#13272580',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  tealA10: 'color(display-p3 0 0.451 0.369 / 0.726)',
82
80
  tealA11: 'color(display-p3 0.08 0.5 0.43)',
83
81
  tealA12: 'color(display-p3 0.11 0.235 0.219)',
84
- surface: 'color(display-p3 0.9451 0.9804 0.9725 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  teal1: 'color(display-p3 0.059 0.083 0.079)',
@@ -108,7 +105,6 @@ export default {
108
105
  tealA10: 'color(display-p3 0.439 0.996 0.89 / 0.669)',
109
106
  tealA11: 'color(display-p3 0.388 0.835 0.719)',
110
107
  tealA12: 'color(display-p3 0.734 0.934 0.87)',
111
- surface: 'color(display-p3 0.0863 0.149 0.1412 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: 'white',
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  tomatoA10: string;
26
26
  tomatoA11: string;
27
27
  tomatoA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  tomato1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  tomatoA10: string;
53
52
  tomatoA11: string;
54
53
  tomatoA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  tomatoA10: string;
82
80
  tomatoA11: string;
83
81
  tomatoA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  tomato1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  tomatoA10: string;
109
106
  tomatoA11: string;
110
107
  tomatoA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "tomato";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  tomatoA10: '#d72400da',
26
26
  tomatoA11: '#cd2200ea',
27
27
  tomatoA12: '#460900e0',
28
- surface: '#fff6f5cc',
29
28
  },
30
29
  dark: {
31
30
  tomato1: '#181111',
@@ -52,7 +51,6 @@ export default {
52
51
  tomatoA10: '#ff6847eb',
53
52
  tomatoA11: '#ff977d',
54
53
  tomatoA12: '#ffd6cefb',
55
- surface: '#2d191580',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  tomatoA10: 'color(display-p3 0.757 0.141 0 / 0.8)',
82
80
  tomatoA11: 'color(display-p3 0.755 0.259 0.152)',
83
81
  tomatoA12: 'color(display-p3 0.335 0.165 0.132)',
84
- surface: 'color(display-p3 0.9922 0.9647 0.9608 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  tomato1: 'color(display-p3 0.09 0.068 0.067)',
@@ -108,7 +105,6 @@ export default {
108
105
  tomatoA10: 'color(display-p3 1 0.478 0.341 / 0.853)',
109
106
  tomatoA11: 'color(display-p3 1 0.585 0.455)',
110
107
  tomatoA12: 'color(display-p3 0.959 0.833 0.802)',
111
- surface: 'color(display-p3 0.1569 0.0941 0.0784 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: 'white',
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  violetA10: string;
26
26
  violetA11: string;
27
27
  violetA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  violet1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  violetA10: string;
53
52
  violetA11: string;
54
53
  violetA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  violetA10: string;
82
80
  violetA11: string;
83
81
  violetA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  violet1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  violetA10: string;
109
106
  violetA11: string;
110
107
  violetA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "violet";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  violetA10: '#2300abb2',
26
26
  violetA11: '#1f0099af',
27
27
  violetA12: '#0b0043d9',
28
- surface: '#f9f6ffcc',
29
28
  },
30
29
  dark: {
31
30
  violet1: '#14121f',
@@ -52,7 +51,6 @@ export default {
52
51
  violetA10: '#9176fed7',
53
52
  violetA11: '#baa7ff',
54
53
  violetA12: '#e3defffe',
55
- surface: '#25193980',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  violetA10: 'color(display-p3 0.11 0 0.627 / 0.695)',
82
80
  violetA11: 'color(display-p3 0.383 0.317 0.702)',
83
81
  violetA12: 'color(display-p3 0.179 0.15 0.359)',
84
- surface: 'color(display-p3 0.9725 0.9647 0.9961 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  violet1: 'color(display-p3 0.077 0.071 0.118)',
@@ -108,7 +105,6 @@ export default {
108
105
  violetA10: 'color(display-p3 0.576 0.482 1 / 0.811)',
109
106
  violetA11: 'color(display-p3 0.72 0.65 1)',
110
107
  violetA12: 'color(display-p3 0.883 0.867 0.986)',
111
- surface: 'color(display-p3 0.1333 0.102 0.2118 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: 'white',
@@ -25,7 +25,6 @@ declare const _default: {
25
25
  yellowA10: string;
26
26
  yellowA11: string;
27
27
  yellowA12: string;
28
- surface: string;
29
28
  };
30
29
  dark: {
31
30
  yellow1: string;
@@ -52,7 +51,6 @@ declare const _default: {
52
51
  yellowA10: string;
53
52
  yellowA11: string;
54
53
  yellowA12: string;
55
- surface: string;
56
54
  };
57
55
  };
58
56
  p3: {
@@ -81,7 +79,6 @@ declare const _default: {
81
79
  yellowA10: string;
82
80
  yellowA11: string;
83
81
  yellowA12: string;
84
- surface: string;
85
82
  };
86
83
  dark: {
87
84
  yellow1: string;
@@ -108,7 +105,6 @@ declare const _default: {
108
105
  yellowA10: string;
109
106
  yellowA11: string;
110
107
  yellowA12: string;
111
- surface: string;
112
108
  };
113
109
  };
114
110
  contrast: string;
@@ -124,6 +120,6 @@ declare const _default: {
124
120
  dark: string;
125
121
  };
126
122
  };
127
- name: string;
123
+ name: "yellow";
128
124
  };
129
125
  export default _default;
@@ -25,7 +25,6 @@ export default {
25
25
  yellowA10: '#ffdc00',
26
26
  yellowA11: '#9e6c00',
27
27
  yellowA12: '#2e2000e0',
28
- surface: '#fefbe4cc',
29
28
  },
30
29
  dark: {
31
30
  yellow1: '#14120b',
@@ -52,7 +51,6 @@ export default {
52
51
  yellowA10: '#ffff57',
53
52
  yellowA11: '#fee949f5',
54
53
  yellowA12: '#fef6baf6',
55
- surface: '#231f1380',
56
54
  },
57
55
  },
58
56
  p3: {
@@ -81,7 +79,6 @@ export default {
81
79
  yellowA10: 'color(display-p3 0.969 0.812 0 / 0.71)',
82
80
  yellowA11: 'color(display-p3 0.6 0.44 0)',
83
81
  yellowA12: 'color(display-p3 0.271 0.233 0.137)',
84
- surface: 'color(display-p3 0.9961 0.9922 0.902 / 0.8)',
85
82
  },
86
83
  dark: {
87
84
  yellow1: 'color(display-p3 0.078 0.069 0.047)',
@@ -108,7 +105,6 @@ export default {
108
105
  yellowA10: 'color(display-p3 1 1 0.455)',
109
106
  yellowA11: 'color(display-p3 0.948 0.885 0.392)',
110
107
  yellowA12: 'color(display-p3 0.959 0.934 0.731)',
111
- surface: 'color(display-p3 0.1333 0.1176 0.0706 / 0.5)',
112
108
  },
113
109
  },
114
110
  contrast: '#21201c',
package/dist/css.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AnyPalette } from './types.ts';
1
+ import type { AnyColorScale } from './types.ts';
2
2
  type AlphaConfig = {
3
3
  srgb: Record<string, string>;
4
4
  p3: Record<string, string>;
@@ -9,7 +9,7 @@ type PaletteOptions = {
9
9
  /** Include alpha scale variables (e.g., --amber-a1). Defaults to false */
10
10
  alpha?: boolean;
11
11
  };
12
- declare function palette(name: string, config: AnyPalette, options?: PaletteOptions): string;
12
+ declare function palette(name: string, config: AnyColorScale, options?: PaletteOptions): string;
13
13
  declare function alpha(config: AlphaConfig): string;
14
14
  declare function accents(colorNames: string[]): string;
15
15
  declare function grays(names: readonly string[], className: string): string;
package/dist/css.js CHANGED
@@ -15,10 +15,6 @@ function palette(name, config, options = {}) {
15
15
  const selector = schemeSelector(scheme);
16
16
  const srgbScale = isLight ? config.srgb.light : config.srgb.dark;
17
17
  const p3Scale = isLight ? config.p3.light : config.p3.dark;
18
- const srgbSurface = isLight
19
- ? config.surface.srgb.light
20
- : config.surface.srgb.dark;
21
- const p3Surface = isLight ? config.surface.p3.light : config.surface.p3.dark;
22
18
  const srgb = [];
23
19
  const p3 = [];
24
20
  for (const n of steps) {
@@ -31,8 +27,6 @@ function palette(name, config, options = {}) {
31
27
  p3.push(`--${name}-a${n}: ${p3Scale[`${name}A${n}`]}`);
32
28
  }
33
29
  }
34
- srgb.push(`--${name}-surface: ${srgbSurface}`);
35
- p3.push(`--${name}-surface: ${p3Surface}`);
36
30
  output.push(formatRule(selector, srgb));
37
31
  output.push(formatP3(selector, p3));
38
32
  }