@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.
@@ -1 +1 @@
1
- {"version":3,"file":"ColorsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ColorsSection.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,SAAS,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAenE,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACvD;AAYD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,EAAE,kBAAkB,2CA8apB"}
1
+ {"version":3,"file":"ColorsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ColorsSection.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,SAAS,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAenE,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CACvD;AAYD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,GAClB,EAAE,kBAAkB,2CA6ZpB"}
package/dist/index.cjs CHANGED
@@ -1587,33 +1587,21 @@ function ColorsSection({
1587
1587
  editableValue: true
1588
1588
  }
1589
1589
  ),
1590
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12, alignItems: "flex-end" }, children: [
1591
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1592
- components.Select,
1593
- {
1594
- options: STRENGTH_OPTIONS,
1595
- value: palette.desaturationStrength,
1596
- onValueChange: (strength) => dispatch({
1597
- type: "SET_PALETTE_DESAT_STRENGTH",
1598
- index: activePaletteIndex,
1599
- strength
1600
- }),
1601
- label: "Desaturation"
1602
- }
1603
- ) }),
1604
- palette.desaturationStrength !== "none" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { paddingBottom: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1605
- components.Toggle,
1606
- {
1607
- value: palette.desaturationDirection === "dark",
1608
- onValueChange: (v) => dispatch({
1609
- type: "SET_PALETTE_DESAT_DIRECTION",
1610
- index: activePaletteIndex,
1611
- direction: v ? "dark" : "light"
1612
- }),
1613
- label: "Invert"
1614
- }
1615
- ) })
1616
- ] }),
1590
+ /* @__PURE__ */ jsxRuntime.jsx(
1591
+ components.Slider,
1592
+ {
1593
+ value: Math.round((palette.desaturation ?? 0) * 100),
1594
+ onValueChange: (v) => dispatch({
1595
+ type: "SET_PALETTE_DESATURATION",
1596
+ index: activePaletteIndex,
1597
+ desaturation: v / 100
1598
+ }),
1599
+ min: -100,
1600
+ max: 100,
1601
+ label: "Desaturation",
1602
+ editableValue: true
1603
+ }
1604
+ ),
1617
1605
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 12, alignItems: "flex-end" }, children: [
1618
1606
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1619
1607
  components.Select,