@weasel-js/ui 1.5.0 → 1.5.1
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/dist/chunks/{ActionBar-DxGp3WuZ.js → ActionBar-GZdcfdQL.js} +1 -2
- package/dist/chunks/{ActionBar-DxGp3WuZ.js.map → ActionBar-GZdcfdQL.js.map} +1 -1
- package/dist/chunks/{ActionsBar-D1VFreoj.js → ActionsBar-Fhx_40iP.js} +2 -2
- package/dist/chunks/{ActionsBar-D1VFreoj.js.map → ActionsBar-Fhx_40iP.js.map} +1 -1
- package/dist/chunks/{BandEditor-BeWO56_w.js → BandEditor-D8I5Uun-.js} +93 -98
- package/dist/chunks/BandEditor-D8I5Uun-.js.map +1 -0
- package/dist/chunks/{Callout-BPIA2is-.js → Callout-cx5_CWcW.js} +1 -1
- package/dist/chunks/{Callout-BPIA2is-.js.map → Callout-cx5_CWcW.js.map} +1 -1
- package/dist/chunks/{Checkbox-D-pVpobU.js → Checkbox-BZZsPaVF.js} +1 -1
- package/dist/chunks/{Checkbox-D-pVpobU.js.map → Checkbox-BZZsPaVF.js.map} +1 -1
- package/dist/chunks/{ColorField-C20aRvCg.js → ColorField-YVf8irfr.js} +2 -2
- package/dist/chunks/{ColorField-C20aRvCg.js.map → ColorField-YVf8irfr.js.map} +1 -1
- package/dist/chunks/{ComboBox-CPES6Y1i.js → ComboBox-D57tNYDD.js} +2 -2
- package/dist/chunks/{ComboBox-CPES6Y1i.js.map → ComboBox-D57tNYDD.js.map} +1 -1
- package/dist/chunks/{CurveEditor-Cj0lLiyR.js → CurveEditor-BXiMoN9d.js} +175 -175
- package/dist/chunks/CurveEditor-BXiMoN9d.js.map +1 -0
- package/dist/chunks/DetentSlider-BWNSv07Z.js +72 -0
- package/dist/chunks/DetentSlider-BWNSv07Z.js.map +1 -0
- package/dist/chunks/{Dialog-CYBLjwbd.js → Dialog-DuOzsR2g.js} +1 -1
- package/dist/chunks/{Dialog-CYBLjwbd.js.map → Dialog-DuOzsR2g.js.map} +1 -1
- package/dist/chunks/{Disclosure-DiA6UKdM.js → Disclosure-9UgDzc7Z.js} +6 -6
- package/dist/chunks/{Disclosure-DiA6UKdM.js.map → Disclosure-9UgDzc7Z.js.map} +1 -1
- package/dist/chunks/{Field-dzlxOGxT.js → Field-BNqvUJfg.js} +1 -1
- package/dist/chunks/{Field-dzlxOGxT.js.map → Field-BNqvUJfg.js.map} +1 -1
- package/dist/chunks/{FontFamilySelect-DIJ4phXz.js → FontFamilySelect-CO19kyOO.js} +2 -2
- package/dist/chunks/{FontFamilySelect-DIJ4phXz.js.map → FontFamilySelect-CO19kyOO.js.map} +1 -1
- package/dist/chunks/{GradientEditor-dBprHbS0.js → GradientEditor-B_ymIr4Q.js} +74 -51
- package/dist/chunks/GradientEditor-B_ymIr4Q.js.map +1 -0
- package/dist/chunks/Icon-QhLhaGFe.js +498 -0
- package/dist/chunks/Icon-QhLhaGFe.js.map +1 -0
- package/dist/chunks/{InlineRange-CcfzY80y.js → InlineRange-DdIlfGqG.js} +2 -2
- package/dist/chunks/{InlineRange-CcfzY80y.js.map → InlineRange-DdIlfGqG.js.map} +1 -1
- package/dist/chunks/{Input-CoKOtyD0.js → Input-B9Vh7ASP.js} +2 -2
- package/dist/chunks/{Input-CoKOtyD0.js.map → Input-B9Vh7ASP.js.map} +1 -1
- package/dist/chunks/Jog-BYrxbAQU.js +81 -0
- package/dist/chunks/Jog-BYrxbAQU.js.map +1 -0
- package/dist/chunks/{Keycaps-DSeq6QWH.js → Keycaps-CGNQV2Pz.js} +5 -5
- package/dist/chunks/Keycaps-CGNQV2Pz.js.map +1 -0
- package/dist/chunks/{MenuButton-Do8fFUx1.js → MenuButton-DGE-0DP0.js} +1 -1
- package/dist/chunks/{MenuButton-Do8fFUx1.js.map → MenuButton-DGE-0DP0.js.map} +1 -1
- package/dist/chunks/MeshEditor-CHoGQ9K8.js +123 -0
- package/dist/chunks/MeshEditor-CHoGQ9K8.js.map +1 -0
- package/dist/chunks/{NumberField-BWzhqS19.js → NumberField-CQzS6TjF.js} +2 -2
- package/dist/chunks/{NumberField-BWzhqS19.js.map → NumberField-CQzS6TjF.js.map} +1 -1
- package/dist/chunks/{OptionsBar-D_Cd3ZYs.js → OptionsBar-BWaYG_OH.js} +2 -2
- package/dist/chunks/{OptionsBar-D_Cd3ZYs.js.map → OptionsBar-BWaYG_OH.js.map} +1 -1
- package/dist/chunks/PaintField-BVYMu3OI.js +62 -0
- package/dist/chunks/PaintField-BVYMu3OI.js.map +1 -0
- package/dist/chunks/PaintInput-BzAHCKro.js +131 -0
- package/dist/chunks/PaintInput-BzAHCKro.js.map +1 -0
- package/dist/chunks/{PatternPicker-Ba22Bf4L.js → PatternPicker-C4OryrYi.js} +2 -2
- package/dist/chunks/{PatternPicker-Ba22Bf4L.js.map → PatternPicker-C4OryrYi.js.map} +1 -1
- package/dist/chunks/{Plot2D-CVZwQpWJ.js → Plot2D-Czvyt_vG.js} +1 -1
- package/dist/chunks/{Plot2D-CVZwQpWJ.js.map → Plot2D-Czvyt_vG.js.map} +1 -1
- package/dist/chunks/{PointPlotter-anTHwz8f.js → PointPlotter-Xvb98GwB.js} +2 -2
- package/dist/chunks/{PointPlotter-anTHwz8f.js.map → PointPlotter-Xvb98GwB.js.map} +1 -1
- package/dist/chunks/{Powerline-BaHDJlcO.js → Powerline-B_EH-7Z-.js} +1 -1
- package/dist/chunks/{Powerline-BaHDJlcO.js.map → Powerline-B_EH-7Z-.js.map} +1 -1
- package/dist/chunks/Prefs-FuaJBs3t.js +308 -0
- package/dist/chunks/Prefs-FuaJBs3t.js.map +1 -0
- package/dist/chunks/Properties-B3KU69NI.js +874 -0
- package/dist/chunks/Properties-B3KU69NI.js.map +1 -0
- package/dist/chunks/{RadioGroup-B2_LUgDp.js → RadioGroup-C6xpdQNg.js} +2 -2
- package/dist/chunks/{RadioGroup-B2_LUgDp.js.map → RadioGroup-C6xpdQNg.js.map} +1 -1
- package/dist/chunks/{RangeSlider-S2R3zA8N.js → RangeSlider-CzgeGLVS.js} +1 -1
- package/dist/chunks/{RangeSlider-S2R3zA8N.js.map → RangeSlider-CzgeGLVS.js.map} +1 -1
- package/dist/chunks/{ResizeHandle-CiExUWP-.js → ResizeHandle-1Ey8AOij.js} +1 -1
- package/dist/chunks/{ResizeHandle-CiExUWP-.js.map → ResizeHandle-1Ey8AOij.js.map} +1 -1
- package/dist/chunks/{Select-CacMfs4v.js → Select-BMYVh10x.js} +20 -17
- package/dist/chunks/Select-BMYVh10x.js.map +1 -0
- package/dist/chunks/{SelectionPanel-CbyUT3Dh.js → SelectionPanel-DTpcQidl.js} +12 -12
- package/dist/chunks/{SelectionPanel-CbyUT3Dh.js.map → SelectionPanel-DTpcQidl.js.map} +1 -1
- package/dist/chunks/{Sidebar-Cqcfx3_s.js → Sidebar-BlUjn8lD.js} +1 -1
- package/dist/chunks/{Sidebar-Cqcfx3_s.js.map → Sidebar-BlUjn8lD.js.map} +1 -1
- package/dist/chunks/{SidebarPanel-BLzBo0S2.js → SidebarPanel-BqHfz6VK.js} +2 -2
- package/dist/chunks/{SidebarPanel-BLzBo0S2.js.map → SidebarPanel-BqHfz6VK.js.map} +1 -1
- package/dist/chunks/Slider-B2ywUZH6.js +381 -0
- package/dist/chunks/Slider-B2ywUZH6.js.map +1 -0
- package/dist/chunks/{StatusBar-B9NQ8atD.js → StatusBar-BFt7Yw5O.js} +1 -1
- package/dist/chunks/{StatusBar-B9NQ8atD.js.map → StatusBar-BFt7Yw5O.js.map} +1 -1
- package/dist/chunks/{Switch-C4NU-me1.js → Switch-Om3t3ASc.js} +1 -1
- package/dist/chunks/{Switch-C4NU-me1.js.map → Switch-Om3t3ASc.js.map} +1 -1
- package/dist/chunks/{Tabs-9sODd2Ut.js → Tabs-EAvYywil.js} +1 -1
- package/dist/chunks/{Tabs-9sODd2Ut.js.map → Tabs-EAvYywil.js.map} +1 -1
- package/dist/chunks/{Timeline-DOZgb1CG.js → Timeline-BEyKaBXl.js} +254 -253
- package/dist/chunks/Timeline-BEyKaBXl.js.map +1 -0
- package/dist/chunks/{Toast-LpN1WK8E.js → Toast-iqLDD_XZ.js} +1 -1
- package/dist/chunks/{Toast-LpN1WK8E.js.map → Toast-iqLDD_XZ.js.map} +1 -1
- package/dist/chunks/{ToggleBar-Bxwv6xvj.js → ToggleBar--9As2PWG.js} +8 -8
- package/dist/chunks/ToggleBar--9As2PWG.js.map +1 -0
- package/dist/chunks/TokenPanel-BL9hlq7x.js +374 -0
- package/dist/chunks/TokenPanel-BL9hlq7x.js.map +1 -0
- package/dist/chunks/{ToolButton-B81YjdwO.js → ToolButton-Dd-1T5aX.js} +1 -1
- package/dist/chunks/{ToolButton-B81YjdwO.js.map → ToolButton-Dd-1T5aX.js.map} +1 -1
- package/dist/chunks/{ToolGroup-D7juDOC_.js → ToolGroup-BBI-W-Gm.js} +1 -1
- package/dist/chunks/{ToolGroup-D7juDOC_.js.map → ToolGroup-BBI-W-Gm.js.map} +1 -1
- package/dist/chunks/{ToolPalette-BSzmRJS7.js → ToolPalette-BmTDDpmz.js} +3 -3
- package/dist/chunks/{ToolPalette-BSzmRJS7.js.map → ToolPalette-BmTDDpmz.js.map} +1 -1
- package/dist/chunks/{createKeyframeLayer-AL4jP0EX.js → createKeyframeLayer-7j7ukrSx.js} +198 -193
- package/dist/chunks/createKeyframeLayer-7j7ukrSx.js.map +1 -0
- package/dist/chunks/{icons-BV27dhKB.js → icons-Btrs-JD7.js} +35 -32
- package/dist/chunks/icons-Btrs-JD7.js.map +1 -0
- package/dist/chunks/range.module-DSsOIq1R.js +8 -0
- package/dist/chunks/range.module-DSsOIq1R.js.map +1 -0
- package/dist/chunks/{schema-CPdFNeP6.js → schema-MCVT1MLv.js} +1 -1
- package/dist/chunks/{schema-CPdFNeP6.js.map → schema-MCVT1MLv.js.map} +1 -1
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js +11 -0
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js.map +1 -0
- package/dist/chunks/snap-B0WQwetQ.js +13 -0
- package/dist/chunks/snap-B0WQwetQ.js.map +1 -0
- package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/ActionsBar/index.js +1 -1
- package/dist/components/BandEditor/BandEditor.d.ts.map +1 -1
- package/dist/components/BandEditor/index.js +1 -1
- package/dist/components/BandEditor/scale.d.ts +1 -8
- package/dist/components/BandEditor/scale.d.ts.map +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/ColorField/index.js +1 -1
- package/dist/components/ComboBox/index.js +1 -1
- package/dist/components/CurveEditor/createFunctionLayer.d.ts.map +1 -1
- package/dist/components/CurveEditor/createKeyframeLayer.d.ts.map +1 -1
- package/dist/components/CurveEditor/index.d.ts +1 -1
- package/dist/components/CurveEditor/index.d.ts.map +1 -1
- package/dist/components/CurveEditor/index.js +4 -3
- package/dist/components/DetentSlider/DetentSlider.d.ts +9 -10
- package/dist/components/DetentSlider/DetentSlider.d.ts.map +1 -1
- package/dist/components/DetentSlider/index.js +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Disclosure/index.js +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FontFamilySelect/index.js +1 -1
- package/dist/components/GradientEditor/GradientEditor.d.ts +3 -0
- package/dist/components/GradientEditor/GradientEditor.d.ts.map +1 -1
- package/dist/components/GradientEditor/index.js +1 -1
- package/dist/components/InlineRange/index.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/Jog/Jog.d.ts +28 -0
- package/dist/components/Jog/Jog.d.ts.map +1 -0
- package/dist/components/Jog/index.d.ts +3 -0
- package/dist/components/Jog/index.d.ts.map +1 -0
- package/dist/components/Jog/index.js +2 -0
- package/dist/components/Keycaps/index.js +1 -1
- package/dist/components/MenuButton/index.js +1 -1
- package/dist/components/MeshEditor/MeshEditor.d.ts +30 -0
- package/dist/components/MeshEditor/MeshEditor.d.ts.map +1 -0
- package/dist/components/MeshEditor/index.d.ts +3 -0
- package/dist/components/MeshEditor/index.d.ts.map +1 -0
- package/dist/components/MeshEditor/index.js +2 -0
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OptionsBar/index.js +1 -1
- package/dist/components/PaintField/PaintField.d.ts +36 -0
- package/dist/components/PaintField/PaintField.d.ts.map +1 -0
- package/dist/components/PaintField/index.d.ts +3 -0
- package/dist/components/PaintField/index.d.ts.map +1 -0
- package/dist/components/PaintField/index.js +2 -0
- package/dist/components/PaintInput/PaintInput.d.ts.map +1 -1
- package/dist/components/PaintInput/index.js +1 -1
- package/dist/components/PatternPicker/index.js +1 -1
- package/dist/components/Plot2D/index.js +1 -1
- package/dist/components/PointPlotter/index.js +1 -1
- package/dist/components/Powerline/index.js +1 -1
- package/dist/components/Prefs/PrefsForm.d.ts +4 -0
- package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
- package/dist/components/Prefs/index.js +2 -2
- package/dist/components/Properties/PinDot.d.ts +18 -0
- package/dist/components/Properties/PinDot.d.ts.map +1 -0
- package/dist/components/Properties/PropertyPanel.d.ts +93 -8
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
- package/dist/components/Properties/index.d.ts +4 -2
- package/dist/components/Properties/index.d.ts.map +1 -1
- package/dist/components/Properties/index.js +2 -2
- package/dist/components/Properties/storyLayouts.d.ts +1 -1
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/RangeSlider/index.js +1 -1
- package/dist/components/ResizeHandle/index.js +1 -1
- package/dist/components/Select/Select.d.ts +8 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectionPanel/index.js +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/SidebarPanel/index.js +1 -1
- package/dist/components/Slider/Slider.d.ts +19 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/index.d.ts +1 -1
- package/dist/components/Slider/index.d.ts.map +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/StatusBar/index.js +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Lane.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +2 -2
- package/dist/components/Timeline/keys.d.ts +1 -1
- package/dist/components/Timeline/keys.d.ts.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleBar/index.js +1 -1
- package/dist/components/TokenPanel/TokenPanel.d.ts +33 -0
- package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -0
- package/dist/components/TokenPanel/color.d.ts +7 -0
- package/dist/components/TokenPanel/color.d.ts.map +1 -0
- package/dist/components/TokenPanel/index.d.ts +5 -0
- package/dist/components/TokenPanel/index.d.ts.map +1 -0
- package/dist/components/TokenPanel/index.js +2 -0
- package/dist/components/TokenPanel/tokenTypes.d.ts +31 -0
- package/dist/components/TokenPanel/tokenTypes.d.ts.map +1 -0
- package/dist/components/ToolButton/index.js +1 -1
- package/dist/components/ToolGroup/index.js +1 -1
- package/dist/components/ToolPalette/index.js +1 -1
- package/dist/components/paintValue.d.ts +8 -0
- package/dist/components/paintValue.d.ts.map +1 -1
- package/dist/handles.d.ts +20 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/icons/Icon.d.ts +10 -2
- package/dist/icons/Icon.d.ts.map +1 -1
- package/dist/icons/index.d.ts +6 -3
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/paths.d.ts +270 -16
- package/dist/icons/paths.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -70
- package/dist/index.js.map +1 -1
- package/dist/paintPreview.d.ts +13 -0
- package/dist/paintPreview.d.ts.map +1 -0
- package/dist/{components/CurveEditor/snap.d.ts → snap.d.ts} +2 -0
- package/dist/snap.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +8 -7
- package/dist/chunks/BandEditor-BeWO56_w.js.map +0 -1
- package/dist/chunks/CurveEditor-Cj0lLiyR.js.map +0 -1
- package/dist/chunks/DetentSlider-CYicfnKr.js +0 -83
- package/dist/chunks/DetentSlider-CYicfnKr.js.map +0 -1
- package/dist/chunks/GradientEditor-dBprHbS0.js.map +0 -1
- package/dist/chunks/Icon-DBXtBB1f.js +0 -101
- package/dist/chunks/Icon-DBXtBB1f.js.map +0 -1
- package/dist/chunks/Keycaps-DSeq6QWH.js.map +0 -1
- package/dist/chunks/PaintInput-DAevU7fd.js +0 -118
- package/dist/chunks/PaintInput-DAevU7fd.js.map +0 -1
- package/dist/chunks/Prefs-CzIn-hlq.js +0 -302
- package/dist/chunks/Prefs-CzIn-hlq.js.map +0 -1
- package/dist/chunks/Properties-DJaDEJkT.js +0 -765
- package/dist/chunks/Properties-DJaDEJkT.js.map +0 -1
- package/dist/chunks/Select-CacMfs4v.js.map +0 -1
- package/dist/chunks/Slider--DFRC_hc.js +0 -303
- package/dist/chunks/Slider--DFRC_hc.js.map +0 -1
- package/dist/chunks/Timeline-DOZgb1CG.js.map +0 -1
- package/dist/chunks/ToggleBar-Bxwv6xvj.js.map +0 -1
- package/dist/chunks/createKeyframeLayer-AL4jP0EX.js.map +0 -1
- package/dist/chunks/icons-BV27dhKB.js.map +0 -1
- package/dist/chunks/range.module-CvSfABmu.js +0 -8
- package/dist/chunks/range.module-CvSfABmu.js.map +0 -1
- package/dist/chunks/segmentedControl.module-BgvAPkSZ.js +0 -11
- package/dist/chunks/segmentedControl.module-BgvAPkSZ.js.map +0 -1
- package/dist/components/CurveEditor/snap.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./Slider
|
|
2
|
-
import { t } from "./ToggleBar
|
|
3
|
-
import { t as n } from "./ColorField-
|
|
1
|
+
import { t as e } from "./Slider-B2ywUZH6.js";
|
|
2
|
+
import { t } from "./ToggleBar--9As2PWG.js";
|
|
3
|
+
import { t as n } from "./ColorField-YVf8irfr.js";
|
|
4
4
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
import { fillInPoseFrame as o, fillToBoundsFrame as s, gradientGeometry as c, isGradientFill as l, sampleGradientStops as u, useActionsRegistry as d, useHandleDrag as f, useNodeOverlayFrame as p, withGradientKind as m } from "@weasel-js/core";
|
|
6
6
|
import { useCallback as h, useRef as g } from "react";
|
|
@@ -54,26 +54,39 @@ var y = {
|
|
|
54
54
|
value: "conic-gradient",
|
|
55
55
|
label: "Conic"
|
|
56
56
|
}
|
|
57
|
-
], x =
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
], x = [
|
|
58
|
+
{
|
|
59
|
+
value: "rgb",
|
|
60
|
+
label: "sRGB"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
value: "oklab",
|
|
64
|
+
label: "OKLab"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: "oklch",
|
|
68
|
+
label: "OKLCh"
|
|
69
|
+
}
|
|
70
|
+
], S = 2;
|
|
71
|
+
function C(r) {
|
|
72
|
+
let { value: o, onInput: s, onChange: c, kindSwitch: l = !0, spaceSwitch: d = !0, className: f } = r, p = o.stops, g = o.interpolate ?? "rgb", _ = h((e) => ({
|
|
60
73
|
...o,
|
|
61
74
|
stops: e
|
|
62
|
-
}), [o]),
|
|
75
|
+
}), [o]), C = p.map((e) => ({
|
|
63
76
|
value: e.offset,
|
|
64
77
|
color: e.color
|
|
65
|
-
})),
|
|
78
|
+
})), w = (e) => e.map((e) => ({
|
|
66
79
|
offset: e.value,
|
|
67
80
|
color: e.color
|
|
68
|
-
})),
|
|
81
|
+
})), T = (e, t) => p.map((n, r) => r === e ? {
|
|
69
82
|
...n,
|
|
70
83
|
color: t
|
|
71
|
-
} : n),
|
|
84
|
+
} : n), E = p.map((e, t) => ({
|
|
72
85
|
stop: e,
|
|
73
86
|
index: t
|
|
74
87
|
})).sort((e, t) => e.stop.offset - t.stop.offset);
|
|
75
88
|
return /* @__PURE__ */ a("div", {
|
|
76
|
-
className: [y.root,
|
|
89
|
+
className: [y.root, f].filter(Boolean).join(" "),
|
|
77
90
|
children: [
|
|
78
91
|
l && /* @__PURE__ */ i(t, {
|
|
79
92
|
items: b,
|
|
@@ -87,65 +100,75 @@ function S(r) {
|
|
|
87
100
|
max: 1,
|
|
88
101
|
step: .005,
|
|
89
102
|
constraint: "free",
|
|
90
|
-
thumbs:
|
|
103
|
+
thumbs: C,
|
|
91
104
|
ariaLabel: "Gradient stops",
|
|
92
105
|
readoutPlacement: "none",
|
|
93
|
-
onInput: (e) => s?.(
|
|
94
|
-
onChange: (e) => c(
|
|
106
|
+
onInput: (e) => s?.(_(w(e))),
|
|
107
|
+
onChange: (e) => c(_(w(e))),
|
|
95
108
|
onAddThumb: (e) => ({
|
|
96
109
|
value: e,
|
|
97
|
-
color: u(
|
|
110
|
+
color: u(p, e, g)
|
|
98
111
|
}),
|
|
99
|
-
onRemoveThumb: () =>
|
|
112
|
+
onRemoveThumb: () => p.length > S,
|
|
100
113
|
renderTrack: v({
|
|
101
|
-
gradient: (e) => u(
|
|
102
|
-
samples: 32
|
|
114
|
+
gradient: (e) => u(p, e, g),
|
|
115
|
+
samples: g === "rgb" ? 32 : 64
|
|
116
|
+
})
|
|
117
|
+
}),
|
|
118
|
+
d && /* @__PURE__ */ i(t, {
|
|
119
|
+
items: x,
|
|
120
|
+
value: g,
|
|
121
|
+
size: "sm",
|
|
122
|
+
ariaLabel: "Blend space",
|
|
123
|
+
onChange: (e) => e && c({
|
|
124
|
+
...o,
|
|
125
|
+
interpolate: e
|
|
103
126
|
})
|
|
104
127
|
}),
|
|
105
128
|
/* @__PURE__ */ i("div", {
|
|
106
129
|
className: y.swatches,
|
|
107
|
-
children:
|
|
130
|
+
children: E.map(({ stop: e, index: t }) => /* @__PURE__ */ i(n, {
|
|
108
131
|
value: e.color,
|
|
109
132
|
alpha: !0,
|
|
110
133
|
"aria-label": `Stop ${t + 1} at ${Math.round(e.offset * 100)}%`,
|
|
111
134
|
className: y.swatch,
|
|
112
|
-
onInput: (e) => s?.(
|
|
113
|
-
onChange: (e) => c(
|
|
135
|
+
onInput: (e) => s?.(_(T(t, e))),
|
|
136
|
+
onChange: (e) => c(_(T(t, e)))
|
|
114
137
|
}, t))
|
|
115
138
|
})
|
|
116
139
|
]
|
|
117
140
|
});
|
|
118
141
|
}
|
|
119
|
-
var
|
|
142
|
+
var w = {
|
|
120
143
|
overlay: "_overlay_6yu3h_3",
|
|
121
144
|
guide: "_guide_6yu3h_13",
|
|
122
145
|
handle: "_handle_6yu3h_21"
|
|
123
146
|
};
|
|
124
147
|
//#endregion
|
|
125
148
|
//#region src/components/GradientEditor/GradientHandles.tsx
|
|
126
|
-
function
|
|
149
|
+
function T(e) {
|
|
127
150
|
let { value: t, toScreen: n, toLocal: r, onInput: a, onChange: o, width: s, height: c, className: l } = e;
|
|
128
151
|
return /* @__PURE__ */ i("svg", {
|
|
129
|
-
className: [
|
|
152
|
+
className: [w.overlay, l].filter(Boolean).join(" "),
|
|
130
153
|
width: s,
|
|
131
154
|
height: c,
|
|
132
|
-
children:
|
|
155
|
+
children: E(t, n, r, a, o)
|
|
133
156
|
});
|
|
134
157
|
}
|
|
135
|
-
function
|
|
158
|
+
function E(e, t, n, o, s) {
|
|
136
159
|
let l = (e, t) => {
|
|
137
160
|
t === "input" ? o?.(e) : s(e);
|
|
138
161
|
};
|
|
139
162
|
if (e.fill === "linear-gradient") {
|
|
140
163
|
let o = t(e.from), s = t(e.to);
|
|
141
164
|
return /* @__PURE__ */ a(r, { children: [
|
|
142
|
-
/* @__PURE__ */ i(
|
|
165
|
+
/* @__PURE__ */ i(O, {
|
|
143
166
|
x1: o.x,
|
|
144
167
|
y1: o.y,
|
|
145
168
|
x2: s.x,
|
|
146
169
|
y2: s.y
|
|
147
170
|
}),
|
|
148
|
-
/* @__PURE__ */ i(
|
|
171
|
+
/* @__PURE__ */ i(k, {
|
|
149
172
|
at: o,
|
|
150
173
|
label: "Gradient start",
|
|
151
174
|
onDrag: (t, r) => l({
|
|
@@ -153,7 +176,7 @@ function T(e, t, n, o, s) {
|
|
|
153
176
|
from: n(t)
|
|
154
177
|
}, r)
|
|
155
178
|
}),
|
|
156
|
-
/* @__PURE__ */ i(
|
|
179
|
+
/* @__PURE__ */ i(k, {
|
|
157
180
|
at: s,
|
|
158
181
|
label: "Gradient end",
|
|
159
182
|
onDrag: (t, r) => l({
|
|
@@ -170,12 +193,12 @@ function T(e, t, n, o, s) {
|
|
|
170
193
|
}), c = Math.hypot(s.x - o.x, s.y - o.y);
|
|
171
194
|
return /* @__PURE__ */ a(r, { children: [
|
|
172
195
|
/* @__PURE__ */ i("circle", {
|
|
173
|
-
className:
|
|
196
|
+
className: w.guide,
|
|
174
197
|
cx: o.x,
|
|
175
198
|
cy: o.y,
|
|
176
199
|
r: c
|
|
177
200
|
}),
|
|
178
|
-
/* @__PURE__ */ i(
|
|
201
|
+
/* @__PURE__ */ i(k, {
|
|
179
202
|
at: o,
|
|
180
203
|
label: "Gradient center",
|
|
181
204
|
onDrag: (t, r) => l({
|
|
@@ -183,14 +206,14 @@ function T(e, t, n, o, s) {
|
|
|
183
206
|
center: n(t)
|
|
184
207
|
}, r)
|
|
185
208
|
}),
|
|
186
|
-
/* @__PURE__ */ i(
|
|
209
|
+
/* @__PURE__ */ i(k, {
|
|
187
210
|
at: s,
|
|
188
211
|
label: "Gradient radius",
|
|
189
212
|
onDrag: (t, r) => {
|
|
190
213
|
let i = n(t), a = Math.hypot(i.x - e.center.x, i.y - e.center.y);
|
|
191
214
|
l({
|
|
192
215
|
...e,
|
|
193
|
-
radius: Math.max(
|
|
216
|
+
radius: Math.max(D, a)
|
|
194
217
|
}, r);
|
|
195
218
|
}
|
|
196
219
|
})
|
|
@@ -201,13 +224,13 @@ function T(e, t, n, o, s) {
|
|
|
201
224
|
y: e.center.y + Math.sin(e.angle) * d
|
|
202
225
|
});
|
|
203
226
|
return /* @__PURE__ */ a(r, { children: [
|
|
204
|
-
/* @__PURE__ */ i(
|
|
227
|
+
/* @__PURE__ */ i(O, {
|
|
205
228
|
x1: u.x,
|
|
206
229
|
y1: u.y,
|
|
207
230
|
x2: f.x,
|
|
208
231
|
y2: f.y
|
|
209
232
|
}),
|
|
210
|
-
/* @__PURE__ */ i(
|
|
233
|
+
/* @__PURE__ */ i(k, {
|
|
211
234
|
at: u,
|
|
212
235
|
label: "Gradient center",
|
|
213
236
|
onDrag: (t, r) => l({
|
|
@@ -215,7 +238,7 @@ function T(e, t, n, o, s) {
|
|
|
215
238
|
center: n(t)
|
|
216
239
|
}, r)
|
|
217
240
|
}),
|
|
218
|
-
/* @__PURE__ */ i(
|
|
241
|
+
/* @__PURE__ */ i(k, {
|
|
219
242
|
at: f,
|
|
220
243
|
label: "Gradient angle",
|
|
221
244
|
onDrag: (t, r) => {
|
|
@@ -228,14 +251,14 @@ function T(e, t, n, o, s) {
|
|
|
228
251
|
})
|
|
229
252
|
] });
|
|
230
253
|
}
|
|
231
|
-
var
|
|
232
|
-
function
|
|
254
|
+
var D = 1;
|
|
255
|
+
function O(e) {
|
|
233
256
|
return /* @__PURE__ */ i("line", {
|
|
234
|
-
className:
|
|
257
|
+
className: w.guide,
|
|
235
258
|
...e
|
|
236
259
|
});
|
|
237
260
|
}
|
|
238
|
-
function
|
|
261
|
+
function k({ at: e, label: t, onDrag: n }) {
|
|
239
262
|
let r = g(e), a = f({
|
|
240
263
|
onStart: () => {
|
|
241
264
|
r.current = e;
|
|
@@ -251,15 +274,15 @@ function O({ at: e, label: t, onDrag: n }) {
|
|
|
251
274
|
}
|
|
252
275
|
});
|
|
253
276
|
return /* @__PURE__ */ i("circle", {
|
|
254
|
-
className:
|
|
277
|
+
className: w.handle,
|
|
255
278
|
cx: e.x,
|
|
256
279
|
cy: e.y,
|
|
257
|
-
r:
|
|
280
|
+
r: A,
|
|
258
281
|
role: "button",
|
|
259
282
|
"aria-label": t,
|
|
260
283
|
tabIndex: 0,
|
|
261
284
|
onKeyDown: (t) => {
|
|
262
|
-
let r = t.shiftKey ?
|
|
285
|
+
let r = t.shiftKey ? j * 10 : j, i = 0, a = 0;
|
|
263
286
|
if (t.key === "ArrowLeft") i = -r;
|
|
264
287
|
else if (t.key === "ArrowRight") i = r;
|
|
265
288
|
else if (t.key === "ArrowUp") a = -r;
|
|
@@ -275,17 +298,17 @@ function O({ at: e, label: t, onDrag: n }) {
|
|
|
275
298
|
...a
|
|
276
299
|
});
|
|
277
300
|
}
|
|
278
|
-
var
|
|
301
|
+
var A = 7, j = 1;
|
|
279
302
|
//#endregion
|
|
280
303
|
//#region src/components/GradientEditor/SceneGradientHandles.tsx
|
|
281
|
-
function
|
|
282
|
-
let { scene: t, containerRef: n, nodeId: r, slot: a, view: c, className: l } = e, u = d(), f = p(t, n, r, { view: c }), m = g(null), h = f ? N(
|
|
304
|
+
function M(e) {
|
|
305
|
+
let { scene: t, containerRef: n, nodeId: r, slot: a, view: c, className: l } = e, u = d(), f = p(t, n, r, { view: c }), m = g(null), h = f ? P(N(t, r, a)) : null;
|
|
283
306
|
if (!f || !h) return null;
|
|
284
307
|
let _ = (e, t) => {
|
|
285
308
|
let n = s(e, f.box), r = a === "fill" ? "setFill" : "setStroke";
|
|
286
309
|
m.current ? m.current.update({ paint: n }) : m.current = u?.begin(r, { paint: n }) ?? null, t === "commit" && m.current && (m.current.end("commit"), m.current = null);
|
|
287
310
|
};
|
|
288
|
-
return /* @__PURE__ */ i(
|
|
311
|
+
return /* @__PURE__ */ i(T, {
|
|
289
312
|
value: o(h, f.box),
|
|
290
313
|
toScreen: f.toScreen,
|
|
291
314
|
toLocal: f.toLocal,
|
|
@@ -296,15 +319,15 @@ function j(e) {
|
|
|
296
319
|
onChange: (e) => _(e, "commit")
|
|
297
320
|
});
|
|
298
321
|
}
|
|
299
|
-
function
|
|
322
|
+
function N(e, t, n) {
|
|
300
323
|
if (t == null) return;
|
|
301
324
|
let r = e.nodes.get(t)?.data;
|
|
302
325
|
if (r) return n === "fill" ? r.fill : r.stroke?.paint;
|
|
303
326
|
}
|
|
304
|
-
function
|
|
327
|
+
function P(e) {
|
|
305
328
|
return l(e) ? e : null;
|
|
306
329
|
}
|
|
307
330
|
//#endregion
|
|
308
|
-
export { v as i,
|
|
331
|
+
export { v as i, T as n, C as r, M as t };
|
|
309
332
|
|
|
310
|
-
//# sourceMappingURL=GradientEditor-
|
|
333
|
+
//# sourceMappingURL=GradientEditor-B_ymIr4Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientEditor-B_ymIr4Q.js","names":[],"sources":["../../src/paintGradientTrack.tsx","../../src/components/GradientEditor/GradientEditor.module.css","../../src/components/GradientEditor/GradientEditor.tsx","../../src/components/GradientEditor/GradientHandles.module.css","../../src/components/GradientEditor/GradientHandles.tsx","../../src/components/GradientEditor/SceneGradientHandles.tsx"],"sourcesContent":["import type { ReactNode, CSSProperties } from 'react';\nimport type { TrackCtx } from './components/Slider';\n\n/**\n * Options for {@link paintGradientTrack}.\n *\n * `gradient` maps a normalized position along the track (0 to 1) to a CSS\n * color; `samples` is how many stops the resulting linear-gradient uses.\n * `activeRange`, given in the slider's own value units, keeps that span at\n * full strength and dims + hatches the rest.\n */\nexport type GradientTrackOpts = {\n gradient: (t: number) => string;\n samples?: number;\n activeRange?: [number, number];\n hatch?: {\n angleDeg?: number;\n stripe?: number;\n gap?: number;\n dim?: number;\n };\n};\n\nconst DEFAULT_HATCH = { angleDeg: 135, stripe: 2, gap: 4, dim: 75 };\n\n/**\n * Builds a `Slider` `renderTrack` function that paints the track as a\n * sampled color gradient, optionally dimming and hatching the portions\n * outside an active range.\n */\nexport function paintGradientTrack(opts: GradientTrackOpts): (ctx: TrackCtx) => ReactNode {\n const { gradient, samples = 16, activeRange, hatch } = opts;\n\n return (ctx: TrackCtx) => {\n const stops: string[] = [];\n for (let i = 0; i <= samples; i++) {\n const t = i / samples;\n stops.push(`${gradient(t)} ${(t * 100).toFixed(1)}%`);\n }\n const baseGradient = `linear-gradient(to right, ${stops.join(', ')})`;\n\n const layers: string[] = [];\n if (activeRange) {\n const lowPct = ctx.valueToFraction(activeRange[0]) * 100;\n const highPct = ctx.valueToFraction(activeRange[1]) * 100;\n const h = { ...DEFAULT_HATCH, ...hatch };\n const stripe = `repeating-linear-gradient(${h.angleDeg}deg, transparent 0 ${h.stripe}px, var(--wzl-surface) ${h.stripe}px ${h.stripe + h.gap}px)`;\n const dimColor = `color-mix(in srgb, var(--wzl-surface) ${h.dim}%, transparent)`;\n const dimOverlay = `linear-gradient(${dimColor}, ${dimColor})`;\n\n if (lowPct > 0) {\n layers.push(`${dimOverlay} left 0 / ${lowPct.toFixed(2)}% 100% no-repeat`);\n layers.push(`${stripe} left 0 / ${lowPct.toFixed(2)}% 100% no-repeat`);\n }\n if (highPct < 100) {\n const wR = (100 - highPct).toFixed(2);\n layers.push(`${dimOverlay} right 0 / ${wR}% 100% no-repeat`);\n layers.push(`${stripe} right 0 / ${wR}% 100% no-repeat`);\n }\n }\n layers.push(baseGradient);\n\n const style: CSSProperties = {\n position: 'absolute',\n inset: 0,\n background: layers.join(', '),\n };\n return <div style={style} />;\n };\n}\n",".root {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-inline-size: 0;\n}\n\n.swatches {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n/* Each stop's opacity slider would otherwise stretch the row to a width no\n * properties panel has; the chip stays legible, the slider yields. */\n.swatch {\n flex: 0 1 auto;\n min-inline-size: 0;\n}\n","import { useCallback, type ReactElement } from 'react';\nimport {\n sampleGradientStops,\n withGradientKind,\n type ColorSpace,\n type GradStop,\n type GradientFill,\n type GradientKind,\n} from '@weasel-js/core';\nimport { Slider, type Thumb } from '../Slider';\nimport { ColorField } from '../ColorField';\nimport { ToggleBar, type ToggleBarItem } from '../ToggleBar';\nimport { paintGradientTrack } from '../../paintGradientTrack';\nimport s from './GradientEditor.module.css';\n\nconst KINDS: readonly ToggleBarItem<GradientKind>[] = [\n { value: 'linear-gradient', label: 'Linear' },\n { value: 'radial-gradient', label: 'Radial' },\n { value: 'conic-gradient', label: 'Conic' },\n];\n\nconst SPACES: readonly ToggleBarItem<ColorSpace>[] = [\n { value: 'rgb', label: 'sRGB' },\n { value: 'oklab', label: 'OKLab' },\n { value: 'oklch', label: 'OKLCh' },\n];\n\n/** Fewer than two stops is not a gradient any renderer can ramp between. */\nconst MIN_STOPS = 2;\n\n/**\n * Props for {@link GradientEditor}. `onInput` fires throughout a gesture and\n * `onChange` once at its end.\n */\nexport interface GradientEditorProps {\n /** The gradient being edited. */\n value: GradientFill;\n /**\n * Live value during a gesture — a stop drag, a color-picker scrub. Wire\n * it for preview; it fires many times per gesture and must not be\n * written to history.\n */\n onInput?: (next: GradientFill) => void;\n /** Committed value: one call per completed gesture. Pair with an\n * undoable write. */\n onChange: (next: GradientFill) => void;\n /** Show the linear / radial / conic switch. Default true; turn it off\n * when the surrounding UI already owns the kind. */\n kindSwitch?: boolean;\n /** Show the sRGB / OKLab / OKLCh switch, which writes `interpolate`.\n * Default true. */\n spaceSwitch?: boolean;\n className?: string;\n}\n\ntype StopThumb = Thumb & { color: string };\n\n/**\n * Editor for a gradient's kind and stop list.\n *\n * Geometry (`from`/`to`, `center`, `radius`, `angle`) is deliberately not\n * edited here — on a canvas that belongs on the artwork, via\n * `<GradientHandles>`. This component owns the parts with no spatial\n * meaning, so it composes into a properties panel at any width.\n *\n * Stops are addressed by their position in `value.stops`, which is never\n * reordered — dragging one stop past another leaves both indices alone, so\n * a drag can cross a neighbour without the two swapping under the pointer.\n * Rendering sorts a copy.\n */\nexport function GradientEditor(props: GradientEditorProps): ReactElement {\n const { value, onInput, onChange, kindSwitch = true, spaceSwitch = true, className } = props;\n const stops = value.stops;\n const space = value.interpolate ?? 'rgb';\n\n const withStops = useCallback(\n (next: GradStop[]): GradientFill => ({ ...value, stops: next }),\n [value],\n );\n\n const thumbs: StopThumb[] = stops.map((stop) => ({ value: stop.offset, color: stop.color }));\n\n const applyThumbs = (next: StopThumb[]): GradStop[] =>\n next.map((t) => ({ offset: t.value, color: t.color }));\n\n const setStopColor = (index: number, color: string): GradStop[] =>\n stops.map((stop, i) => (i === index ? { ...stop, color } : stop));\n\n // Sorted view for the swatch row, carrying each stop's real index so a\n // recolor writes back to the right entry.\n const ordered = stops\n .map((stop, index) => ({ stop, index }))\n .sort((a, b) => a.stop.offset - b.stop.offset);\n\n return (\n <div className={[s.root, className].filter(Boolean).join(' ')}>\n {kindSwitch && (\n <ToggleBar<GradientKind>\n items={KINDS}\n value={value.fill}\n size=\"sm\"\n ariaLabel=\"Gradient kind\"\n onChange={(kind) => kind && onChange(withGradientKind(value, kind))}\n />\n )}\n\n <Slider<StopThumb>\n min={0}\n max={1}\n step={0.005}\n constraint=\"free\"\n thumbs={thumbs}\n ariaLabel=\"Gradient stops\"\n readoutPlacement=\"none\"\n onInput={(next) => onInput?.(withStops(applyThumbs(next)))}\n onChange={(next) => onChange(withStops(applyThumbs(next)))}\n onAddThumb={(at) => ({ value: at, color: sampleGradientStops(stops, at, space) })}\n onRemoveThumb={() => stops.length > MIN_STOPS}\n renderTrack={paintGradientTrack({\n gradient: (t) => sampleGradientStops(stops, t, space),\n // The track lerps between samples in sRGB whatever the gradient does,\n // so a hue arc needs more of them to not read as a straight line.\n samples: space === 'rgb' ? 32 : 64,\n })}\n />\n\n {spaceSwitch && (\n <ToggleBar<ColorSpace>\n items={SPACES}\n value={space}\n size=\"sm\"\n ariaLabel=\"Blend space\"\n onChange={(next) => next && onChange({ ...value, interpolate: next })}\n />\n )}\n\n <div className={s.swatches}>\n {ordered.map(({ stop, index }) => (\n <ColorField\n key={index}\n value={stop.color}\n alpha\n aria-label={`Stop ${index + 1} at ${Math.round(stop.offset * 100)}%`}\n className={s.swatch}\n onInput={(hex) => onInput?.(withStops(setStopColor(index, hex)))}\n onChange={(hex) => onChange(withStops(setStopColor(index, hex)))}\n />\n ))}\n </div>\n </div>\n );\n}\n","/* The overlay covers the canvas but must not intercept tool input; only the\n * handles opt back into hit-testing. */\n.overlay {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n/* These sit over artwork of unknown color, not over the app's own surface,\n * so they are deliberately not themed: a themed handle disappears against\n * whatever the user painted underneath. White-on-dark reads on anything,\n * which is why every editor draws handles this way. */\n.guide {\n fill: none;\n stroke: #ffffff;\n stroke-opacity: 0.7;\n stroke-dasharray: 4 4;\n paint-order: stroke;\n}\n\n.handle {\n fill: #ffffff;\n stroke: #222222;\n stroke-width: 2;\n cursor: grab;\n pointer-events: auto;\n}\n\n.handle:active {\n cursor: grabbing;\n}\n\n.handle:focus-visible {\n outline: 2px solid var(--wzl-accent, #4a9eff);\n outline-offset: 2px;\n}\n","import { useRef, type KeyboardEvent as ReactKeyboardEvent, type ReactElement, type ReactNode } from 'react';\nimport { useHandleDrag, gradientGeometry, type GradientFill } from '@weasel-js/core';\nimport s from './GradientHandles.module.css';\n\n/** Structural, and deliberately not exported — `Plot2D` and `CurveEditor`\n * each publish their own `Point`, and a third would only be ambiguous at\n * the package barrel. Consumers pass any `{ x, y }`. */\ninterface Point {\n x: number;\n y: number;\n}\n\n/**\n * Props for {@link GradientHandles}. `onInput` fires throughout a drag and\n * `onChange` once at its end.\n */\nexport interface GradientHandlesProps {\n /**\n * The gradient whose geometry these handles move, in a **resolved,\n * isotropic** frame — one where `radius` is a length in the same units as\n * `center.x` and a right angle is a right angle.\n *\n * A `units: 'bounds'` gradient is not such a frame: `x` and `y` are\n * fractions of two different lengths, so a circle there is an ellipse on\n * screen and polar math silently mixes scales. Resolve it first with\n * `fillInPoseFrame(fill, box)` and convert edits back with\n * `fillToBoundsFrame(next, box)`.\n */\n value: GradientFill;\n /**\n * Gradient space → overlay pixels. For a `units: 'local'` gradient this\n * is the node's local-to-screen transform; for `'world'`, the view.\n */\n toScreen: (p: Point) => Point;\n /** Overlay pixels → gradient space. Must invert `toScreen`. */\n toLocal: (p: Point) => Point;\n /** Live during a drag — wire for preview, do not write to history. */\n onInput?: (next: GradientFill) => void;\n /** Committed at drag end: one call per gesture. */\n onChange: (next: GradientFill) => void;\n /** Overlay size in CSS pixels. */\n width: number;\n height: number;\n className?: string;\n}\n\n/**\n * Direct-manipulation handles for a gradient's geometry, drawn as an SVG\n * overlay above a canvas: endpoints for linear, center and radius for\n * radial, center and angle arm for conic.\n *\n * Positioning is entirely the consumer's `toScreen` / `toLocal` — this\n * component never sees a view or a scene node, so the same handles serve a\n * node-local gradient, a world-space one, and a plain unzoomed preview.\n *\n * The overlay ignores pointer events except on the handles themselves, so\n * it can sit over live canvas content without swallowing tool input.\n */\nexport function GradientHandles(props: GradientHandlesProps): ReactElement {\n const { value, toScreen, toLocal, onInput, onChange, width, height, className } = props;\n\n return (\n <svg\n className={[s.overlay, className].filter(Boolean).join(' ')}\n width={width}\n height={height}\n >\n {renderForKind(value, toScreen, toLocal, onInput, onChange)}\n </svg>\n );\n}\n\nfunction renderForKind(\n value: GradientFill,\n toScreen: (p: Point) => Point,\n toLocal: (p: Point) => Point,\n onInput: ((next: GradientFill) => void) | undefined,\n onChange: (next: GradientFill) => void,\n): ReactNode {\n const emit = (next: GradientFill, phase: 'input' | 'commit'): void => {\n if (phase === 'input') onInput?.(next);\n else onChange(next);\n };\n\n if (value.fill === 'linear-gradient') {\n const from = toScreen(value.from);\n const to = toScreen(value.to);\n return (\n <>\n <Guide x1={from.x} y1={from.y} x2={to.x} y2={to.y} />\n <DragPoint\n at={from}\n label=\"Gradient start\"\n onDrag={(p, phase) => emit({ ...value, from: toLocal(p) }, phase)}\n />\n <DragPoint\n at={to}\n label=\"Gradient end\"\n onDrag={(p, phase) => emit({ ...value, to: toLocal(p) }, phase)}\n />\n </>\n );\n }\n\n if (value.fill === 'radial-gradient') {\n const center = toScreen(value.center);\n // The radius handle rides the +x axis of gradient space, so it stays on\n // the drawn circle under a rotated or anisotropic transform.\n const edge = toScreen({ x: value.center.x + value.radius, y: value.center.y });\n const screenRadius = Math.hypot(edge.x - center.x, edge.y - center.y);\n return (\n <>\n <circle className={s.guide} cx={center.x} cy={center.y} r={screenRadius} />\n <DragPoint\n at={center}\n label=\"Gradient center\"\n onDrag={(p, phase) => emit({ ...value, center: toLocal(p) }, phase)}\n />\n <DragPoint\n at={edge}\n label=\"Gradient radius\"\n onDrag={(p, phase) => {\n const local = toLocal(p);\n const radius = Math.hypot(local.x - value.center.x, local.y - value.center.y);\n emit({ ...value, radius: Math.max(MIN_RADIUS, radius) }, phase);\n }}\n />\n </>\n );\n }\n\n const center = toScreen(value.center);\n const { radius } = gradientGeometry(value);\n const tip = toScreen({\n x: value.center.x + Math.cos(value.angle) * radius,\n y: value.center.y + Math.sin(value.angle) * radius,\n });\n return (\n <>\n <Guide x1={center.x} y1={center.y} x2={tip.x} y2={tip.y} />\n <DragPoint\n at={center}\n label=\"Gradient center\"\n onDrag={(p, phase) => emit({ ...value, center: toLocal(p) }, phase)}\n />\n <DragPoint\n at={tip}\n label=\"Gradient angle\"\n onDrag={(p, phase) => {\n const local = toLocal(p);\n const angle = Math.atan2(local.y - value.center.y, local.x - value.center.x);\n emit({ ...value, angle }, phase);\n }}\n />\n </>\n );\n}\n\n/** A radius of zero divides by zero in the shader's `t`; keep it off the floor. */\nconst MIN_RADIUS = 1;\n\nfunction Guide(props: { x1: number; y1: number; x2: number; y2: number }): ReactElement {\n return <line className={s.guide} {...props} />;\n}\n\nfunction DragPoint({\n at,\n label,\n onDrag,\n}: {\n at: Point;\n label: string;\n onDrag: (p: Point, phase: 'input' | 'commit') => void;\n}): ReactElement {\n const start = useRef<Point>(at);\n const drag = useHandleDrag<SVGCircleElement>({\n onStart: () => { start.current = at; },\n onMove: (p) => { onDrag(p, 'input'); },\n onEnd: ({ point, moved }) => {\n // A press that never moved is not an edit and must not write anything.\n if (moved) onDrag(point, 'commit');\n },\n // An abandoned gesture is not an edit either — put the live preview back\n // where it started rather than committing where it was left.\n onCancel: () => { onDrag(start.current, 'input'); },\n });\n const onKeyDown = (e: ReactKeyboardEvent<SVGCircleElement>): void => {\n const amount = e.shiftKey ? KEY_STEP * 10 : KEY_STEP;\n let dx = 0;\n let dy = 0;\n if (e.key === 'ArrowLeft') dx = -amount;\n else if (e.key === 'ArrowRight') dx = amount;\n else if (e.key === 'ArrowUp') dy = -amount;\n else if (e.key === 'ArrowDown') dy = amount;\n else return;\n e.preventDefault();\n const next = { x: at.x + dx, y: at.y + dy };\n onDrag(next, 'input');\n onDrag(next, 'commit');\n };\n return (\n <circle\n className={s.handle}\n cx={at.x}\n cy={at.y}\n r={HANDLE_RADIUS}\n // Not `slider`: the handle carries a 2-D position, not one value, so\n // it has no `aria-valuenow` to honor the role's contract with.\n role=\"button\"\n aria-label={label}\n tabIndex={0}\n onKeyDown={onKeyDown}\n {...drag}\n />\n );\n}\n\nconst HANDLE_RADIUS = 7;\n\n/** One arrow-key step, in overlay pixels. */\nconst KEY_STEP = 1;\n","import { useRef, type ReactElement, type RefObject } from 'react';\nimport {\n fillInPoseFrame,\n fillToBoundsFrame,\n isGradientFill,\n useActionsRegistry,\n useNodeOverlayFrame,\n type FillStyle,\n type GradientFill,\n type RectPose,\n type Scene,\n type Stroke,\n type UiOngoingControl,\n type View,\n} from '@weasel-js/core';\nimport { GradientHandles } from './GradientHandles';\n\n/** The paint slots a node carries. Either may hold a gradient, and each has\n * its own action, so the overlay is told which one it is editing. */\nexport type PaintSlot = 'fill' | 'stroke';\n\n/** What `SceneGradientHandles` reads off a node. Every field is optional, so\n * any richer app data shape satisfies it. */\nexport interface PaintedNodeData {\n fill?: FillStyle | null;\n stroke?: Stroke | null;\n}\n\nexport interface SceneGradientHandlesProps<\n TData extends PaintedNodeData,\n TLayer extends string,\n TPose extends RectPose,\n> {\n scene: Scene<TData, TLayer, TPose>;\n /** The element the overlay is positioned in. Must be the canvas's own box,\n * or the handles land somewhere other than the paint. */\n containerRef: RefObject<HTMLElement | null>;\n /** The node whose paint is being edited — usually the lone selected id. */\n nodeId: string | null | undefined;\n /** Which of the node's two paints these handles move. */\n slot: PaintSlot;\n /** Current viewport; a thunk is re-read per projection. See\n * `useNodeOverlayFrame`. */\n view?: View | (() => View);\n className?: string;\n}\n\n/**\n * Scene-aware `GradientHandles`: on-canvas geometry handles for the gradient\n * in one node's `fill` or `stroke`, committed through the `setFill` /\n * `setStroke` actions as a single undo entry per drag.\n *\n * Renders nothing unless the targeted slot holds a gradient. The node stores\n * its gradient in `units: 'bounds'` — fractions of its own box, so the paint\n * survives pan, zoom and resize — which is not a frame polar math can work\n * in; the handles get it resolved onto the box and every edit is normalized\n * back on the way out.\n *\n * `slot` is a prop rather than state the kit keeps: an app that edits fill\n * and stroke separately already knows which one has focus.\n */\nexport function SceneGradientHandles<\n TData extends PaintedNodeData,\n TLayer extends string,\n TPose extends RectPose,\n>(props: SceneGradientHandlesProps<TData, TLayer, TPose>): ReactElement | null {\n const { scene, containerRef, nodeId, slot, view, className } = props;\n const actions = useActionsRegistry();\n const frame = useNodeOverlayFrame(scene, containerRef, nodeId, { view });\n const ctrlRef = useRef<UiOngoingControl | null>(null);\n\n const gradient = frame ? gradientInSlot(paintOf(scene, nodeId, slot)) : null;\n if (!frame || !gradient) return null;\n\n const dispatch = (next: GradientFill, phase: 'input' | 'commit'): void => {\n const paint = fillToBoundsFrame(next, frame.box);\n const id = slot === 'fill' ? 'setFill' : 'setStroke';\n if (!ctrlRef.current) ctrlRef.current = actions?.begin(id, { paint }) ?? null;\n else ctrlRef.current.update({ paint });\n if (phase === 'commit' && ctrlRef.current) {\n ctrlRef.current.end('commit');\n ctrlRef.current = null;\n }\n };\n\n return (\n <GradientHandles\n value={fillInPoseFrame(gradient, frame.box) as GradientFill}\n toScreen={frame.toScreen}\n toLocal={frame.toLocal}\n width={frame.width}\n height={frame.height}\n className={className}\n onInput={(next) => dispatch(next, 'input')}\n onChange={(next) => dispatch(next, 'commit')}\n />\n );\n}\n\nfunction paintOf<TData extends PaintedNodeData, TLayer extends string, TPose extends RectPose>(\n scene: Scene<TData, TLayer, TPose>,\n nodeId: string | null | undefined,\n slot: PaintSlot,\n): FillStyle | null | undefined {\n if (nodeId == null) return undefined;\n const data = (scene.nodes as ReadonlyMap<string, { data: TData }>).get(nodeId)?.data;\n if (!data) return undefined;\n return slot === 'fill' ? data.fill : data.stroke?.paint;\n}\n\nfunction gradientInSlot(paint: FillStyle | null | undefined): GradientFill | null {\n return isGradientFill(paint) ? paint : null;\n}\n"],"mappings":";;;;;;;AAuBA,IAAM,IAAgB;CAAE,UAAU;CAAK,QAAQ;CAAG,KAAK;CAAG,KAAK;CAAI;AAOnE,SAAgB,EAAmB,GAAuD;CACxF,IAAM,EAAE,aAAU,aAAU,IAAI,gBAAa,aAAU;AAEvD,SAAQ,MAAkB;EACxB,IAAM,IAAkB,EAAE;AAC1B,OAAK,IAAI,IAAI,GAAG,KAAK,GAAS,KAAK;GACjC,IAAM,IAAI,IAAI;AACd,KAAM,KAAK,GAAG,EAAS,EAAE,CAAC,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC,GAAG;;EAEvD,IAAM,IAAe,6BAA6B,EAAM,KAAK,KAAK,CAAC,IAE7D,IAAmB,EAAE;AAC3B,MAAI,GAAa;GACf,IAAM,IAAS,EAAI,gBAAgB,EAAY,GAAG,GAAG,KAC/C,IAAU,EAAI,gBAAgB,EAAY,GAAG,GAAG,KAChD,IAAI;IAAE,GAAG;IAAe,GAAG;IAAO,EAClC,IAAS,6BAA6B,EAAE,SAAS,qBAAqB,EAAE,OAAO,yBAAyB,EAAE,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,MACvI,IAAW,yCAAyC,EAAE,IAAI,kBAC1D,IAAa,mBAAmB,EAAS,IAAI,EAAS;AAM5D,OAJI,IAAS,MACX,EAAO,KAAK,GAAG,EAAW,YAAY,EAAO,QAAQ,EAAE,CAAC,kBAAkB,EAC1E,EAAO,KAAK,GAAG,EAAO,YAAY,EAAO,QAAQ,EAAE,CAAC,kBAAkB,GAEpE,IAAU,KAAK;IACjB,IAAM,KAAM,MAAM,GAAS,QAAQ,EAAE;A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