@newtonedev/editor 0.1.11 → 0.1.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonedev/editor",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Shared color system editor for Newtone applications",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -11,7 +11,7 @@ import {
11
11
  import type { ColorMode } from "@newtonedev/components";
12
12
  import { srgbToHex } from "newtone";
13
13
  import type { ColorResult, DynamicRange } from "newtone";
14
- import type { DesaturationStrength, HueGradingStrength } from "newtone";
14
+ import type { HueGradingStrength } from "newtone";
15
15
  import type { ConfiguratorState } from "@newtonedev/configurator";
16
16
  import type { ConfiguratorAction } from "@newtonedev/configurator";
17
17
  import {
@@ -400,37 +400,20 @@ export function ColorsSection({
400
400
  />
401
401
 
402
402
  {/* Desaturation */}
403
- <div style={{ display: "flex", gap: 12, alignItems: "flex-end" }}>
404
- <div style={{ flex: 1 }}>
405
- <Select
406
- options={STRENGTH_OPTIONS}
407
- value={palette.desaturationStrength}
408
- onValueChange={(strength) =>
409
- dispatch({
410
- type: "SET_PALETTE_DESAT_STRENGTH",
411
- index: activePaletteIndex,
412
- strength: strength as DesaturationStrength,
413
- })
414
- }
415
- label="Desaturation"
416
- />
417
- </div>
418
- {palette.desaturationStrength !== "none" && (
419
- <div style={{ paddingBottom: 2 }}>
420
- <Toggle
421
- value={palette.desaturationDirection === "dark"}
422
- onValueChange={(v) =>
423
- dispatch({
424
- type: "SET_PALETTE_DESAT_DIRECTION",
425
- index: activePaletteIndex,
426
- direction: v ? "dark" : "light",
427
- })
428
- }
429
- label="Invert"
430
- />
431
- </div>
432
- )}
433
- </div>
403
+ <Slider
404
+ value={Math.round((palette.desaturation ?? 0) * 100)}
405
+ onValueChange={(v) =>
406
+ dispatch({
407
+ type: "SET_PALETTE_DESATURATION",
408
+ index: activePaletteIndex,
409
+ desaturation: v / 100,
410
+ })
411
+ }
412
+ min={-100}
413
+ max={100}
414
+ label="Desaturation"
415
+ editableValue
416
+ />
434
417
 
435
418
  {/* Hue Grading */}
436
419
  <div style={{ display: "flex", gap: 12, alignItems: "flex-end" }}>