@pathscale/ui 1.1.24 → 1.1.25

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.
@@ -42,34 +42,33 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
42
42
  const GRAYSCALE_SWATCHES = [
43
43
  {
44
44
  label: "White",
45
- lightness: 10
45
+ theme: "light"
46
46
  },
47
47
  {
48
48
  label: "Light gray",
49
- lightness: 5
49
+ theme: "light"
50
50
  },
51
51
  {
52
52
  label: "Gray",
53
- lightness: 0
53
+ theme: "light"
54
54
  },
55
55
  {
56
56
  label: "Dark gray",
57
- lightness: -5
57
+ theme: "dark"
58
58
  },
59
59
  {
60
60
  label: "Charcoal",
61
- lightness: -10
61
+ theme: "dark"
62
62
  },
63
63
  {
64
64
  label: "Black",
65
- lightness: -15
65
+ theme: "dark"
66
66
  }
67
67
  ];
68
- const handleGrayscale = (lightnessOffset)=>{
68
+ const handleGrayscale = (theme)=>{
69
69
  store().setThemeColor(null);
70
70
  local.onColorChange?.(null, 0);
71
- if (lightnessOffset >= 5) local.onThemeSwitch?.("light");
72
- else if (lightnessOffset <= -10) local.onThemeSwitch?.("dark");
71
+ local.onThemeSwitch?.(theme);
73
72
  };
74
73
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
75
74
  if (!isOpen()) return;
@@ -159,7 +158,7 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
159
158
  each: GRAYSCALE_SWATCHES,
160
159
  children: (g, i)=>(()=>{
161
160
  var _el$6 = _tmpl$4();
162
- _el$6.$$click = ()=>handleGrayscale(g.lightness);
161
+ _el$6.$$click = ()=>handleGrayscale(g.theme);
163
162
  (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
164
163
  var _v$ = `oklch(${[
165
164
  95,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathscale/ui",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "author": "pathscale",
5
5
  "repository": {
6
6
  "type": "git",