@weasel-js/ui 1.3.0-pre.0 → 1.4.0-pre.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.
- package/dist/chunks/{ActionBar-BTev_ZZl.js → ActionBar-D4N1o4LB.js} +2 -2
- package/dist/chunks/{ActionBar-BTev_ZZl.js.map → ActionBar-D4N1o4LB.js.map} +1 -1
- package/dist/chunks/{ActionsBar-gTuCtkv8.js → ActionsBar-B-gWm0NE.js} +3 -3
- package/dist/chunks/{ActionsBar-gTuCtkv8.js.map → ActionsBar-B-gWm0NE.js.map} +1 -1
- package/dist/chunks/{Badge-9dPfvYOk.js → Badge-BXTDs-zi.js} +1 -1
- package/dist/chunks/{Badge-9dPfvYOk.js.map → Badge-BXTDs-zi.js.map} +1 -1
- package/dist/chunks/{BandEditor-DKbcHG2_.js → BandEditor-D13ybQN_.js} +1 -1
- package/dist/chunks/{BandEditor-DKbcHG2_.js.map → BandEditor-D13ybQN_.js.map} +1 -1
- package/dist/chunks/{Button-CIu40Epu.js → Button-0OdcoOMx.js} +1 -1
- package/dist/chunks/{Button-CIu40Epu.js.map → Button-0OdcoOMx.js.map} +1 -1
- package/dist/chunks/{Callout-CHs98djt.js → Callout-DAFusbzz.js} +1 -1
- package/dist/chunks/Callout-DAFusbzz.js.map +1 -0
- package/dist/chunks/{Checkbox-BLEw-wEb.js → Checkbox-BePa_djO.js} +1 -1
- package/dist/chunks/{Checkbox-BLEw-wEb.js.map → Checkbox-BePa_djO.js.map} +1 -1
- package/dist/chunks/{ColorField-D1t-BdSa.js → ColorField-CKbnsEUN.js} +2 -2
- package/dist/chunks/{ColorField-D1t-BdSa.js.map → ColorField-CKbnsEUN.js.map} +1 -1
- package/dist/chunks/{ComboBox-cvdKolWv.js → ComboBox-B6QS8y3j.js} +2 -2
- package/dist/chunks/{ComboBox-cvdKolWv.js.map → ComboBox-B6QS8y3j.js.map} +1 -1
- package/dist/chunks/{CurveEditor-BaA-PabB.js → CurveEditor-COJ6WK9K.js} +3 -2
- package/dist/chunks/{CurveEditor-BaA-PabB.js.map → CurveEditor-COJ6WK9K.js.map} +1 -1
- package/dist/chunks/DataGrid-BWZZUekH.js +107 -0
- package/dist/chunks/DataGrid-BWZZUekH.js.map +1 -0
- package/dist/chunks/DetentSlider-CXIeTHaM.js +83 -0
- package/dist/chunks/DetentSlider-CXIeTHaM.js.map +1 -0
- package/dist/chunks/{Dialog-DC1x46Sq.js → Dialog-CQAZ7hS7.js} +1 -1
- package/dist/chunks/{Dialog-DC1x46Sq.js.map → Dialog-CQAZ7hS7.js.map} +1 -1
- package/dist/chunks/DragHandleGlyph--2zsZzA2.js +47 -0
- package/dist/chunks/DragHandleGlyph--2zsZzA2.js.map +1 -0
- package/dist/chunks/{Field-BjFl_yng.js → Field-BCcTt6Fd.js} +1 -1
- package/dist/chunks/{Field-BjFl_yng.js.map → Field-BCcTt6Fd.js.map} +1 -1
- package/dist/chunks/FontFamilySelect-DwkwRYrr.js +29 -0
- package/dist/chunks/FontFamilySelect-DwkwRYrr.js.map +1 -0
- package/dist/chunks/{GradientEditor-BJRD0n1g.js → GradientEditor-FwNdxxf-.js} +4 -4
- package/dist/chunks/{GradientEditor-BJRD0n1g.js.map → GradientEditor-FwNdxxf-.js.map} +1 -1
- package/dist/chunks/{PaintInput-Cggm9OIl.js → Icon-CxoJb_bw.js} +17 -127
- package/dist/chunks/Icon-CxoJb_bw.js.map +1 -0
- package/dist/chunks/{InlineRange-C6UYKxLD.js → InlineRange-mb19EGOI.js} +1 -1
- package/dist/chunks/{InlineRange-C6UYKxLD.js.map → InlineRange-mb19EGOI.js.map} +1 -1
- package/dist/chunks/{Input-DhWBgpRx.js → Input-DRUeowbz.js} +2 -2
- package/dist/chunks/{Input-DhWBgpRx.js.map → Input-DRUeowbz.js.map} +1 -1
- package/dist/chunks/ItemList-BUTk9E8-.js +42 -0
- package/dist/chunks/ItemList-BUTk9E8-.js.map +1 -0
- package/dist/chunks/{Keycaps-BhCKdyws.js → Keycaps-DszN5Dwl.js} +1 -1
- package/dist/chunks/{Keycaps-BhCKdyws.js.map → Keycaps-DszN5Dwl.js.map} +1 -1
- package/dist/chunks/LayerStack-htMwIsJ6.js +145 -0
- package/dist/chunks/LayerStack-htMwIsJ6.js.map +1 -0
- package/dist/chunks/{NumberField-ZdVa4bpJ.js → NumberField-CQ7OJORF.js} +2 -2
- package/dist/chunks/{NumberField-ZdVa4bpJ.js.map → NumberField-CQ7OJORF.js.map} +1 -1
- package/dist/chunks/{OptionsBar-DahCI4Aq.js → OptionsBar-efIwfqYe.js} +3 -3
- package/dist/chunks/{OptionsBar-DahCI4Aq.js.map → OptionsBar-efIwfqYe.js.map} +1 -1
- package/dist/chunks/PaintInput-CgZR3B0r.js +118 -0
- package/dist/chunks/PaintInput-CgZR3B0r.js.map +1 -0
- package/dist/chunks/{PatternPicker-B63SlDoF.js → PatternPicker-v9BFsaMM.js} +2 -2
- package/dist/chunks/{PatternPicker-B63SlDoF.js.map → PatternPicker-v9BFsaMM.js.map} +1 -1
- package/dist/chunks/Plot2D-B08SYGQV.js +134 -0
- package/dist/chunks/Plot2D-B08SYGQV.js.map +1 -0
- package/dist/chunks/{PointPlotter-CLd9u5Bq.js → PointPlotter-DEh7a3xB.js} +2 -2
- package/dist/chunks/{PointPlotter-CLd9u5Bq.js.map → PointPlotter-DEh7a3xB.js.map} +1 -1
- package/dist/chunks/{Powerline-DhQJYaUg.js → Powerline-M1Q3Hx5E.js} +2 -2
- package/dist/chunks/{Powerline-DhQJYaUg.js.map → Powerline-M1Q3Hx5E.js.map} +1 -1
- package/dist/chunks/{Prefs-BSJ0lMmJ.js → Prefs-C2qhxnmt.js} +11 -11
- package/dist/chunks/{Prefs-BSJ0lMmJ.js.map → Prefs-C2qhxnmt.js.map} +1 -1
- package/dist/chunks/Properties-CFRJ8mYH.js +655 -0
- package/dist/chunks/Properties-CFRJ8mYH.js.map +1 -0
- package/dist/chunks/{RadioGroup-vtwjRiUm.js → RadioGroup-B8eMJ6lu.js} +2 -2
- package/dist/chunks/{RadioGroup-vtwjRiUm.js.map → RadioGroup-B8eMJ6lu.js.map} +1 -1
- package/dist/chunks/{RangeSlider-B-n_7AgJ.js → RangeSlider-JczhglgA.js} +1 -1
- package/dist/chunks/RangeSlider-JczhglgA.js.map +1 -0
- package/dist/chunks/{ResizeHandle--ZExnMfa.js → ResizeHandle-CXBXV6Px.js} +1 -1
- package/dist/chunks/{ResizeHandle--ZExnMfa.js.map → ResizeHandle-CXBXV6Px.js.map} +1 -1
- package/dist/chunks/{Select--BVTi-j0.js → Select-g8PhE010.js} +2 -2
- package/dist/chunks/{Select--BVTi-j0.js.map → Select-g8PhE010.js.map} +1 -1
- package/dist/chunks/SelectionPanel-Cl18SdD6.js +561 -0
- package/dist/chunks/SelectionPanel-Cl18SdD6.js.map +1 -0
- package/dist/chunks/{Sidebar-CtwBdr4n.js → Sidebar-mWGsndWw.js} +1 -1
- package/dist/chunks/{Sidebar-CtwBdr4n.js.map → Sidebar-mWGsndWw.js.map} +1 -1
- package/dist/chunks/SidebarPanel-B2d0erLv.js +59 -0
- package/dist/chunks/SidebarPanel-B2d0erLv.js.map +1 -0
- package/dist/chunks/Slider-BbbmHE0c.js +291 -0
- package/dist/chunks/Slider-BbbmHE0c.js.map +1 -0
- package/dist/chunks/{StatusBar-D_wu-SZh.js → StatusBar-xxCcWsfq.js} +1 -1
- package/dist/chunks/{StatusBar-D_wu-SZh.js.map → StatusBar-xxCcWsfq.js.map} +1 -1
- package/dist/chunks/{Switch-CtZwp5zm.js → Switch-QviBb61l.js} +1 -1
- package/dist/chunks/{Switch-CtZwp5zm.js.map → Switch-QviBb61l.js.map} +1 -1
- package/dist/chunks/{Tabs-lB0IB4TX.js → Tabs-DT-dIt6d.js} +1 -1
- package/dist/chunks/{Tabs-lB0IB4TX.js.map → Tabs-DT-dIt6d.js.map} +1 -1
- package/dist/chunks/Timeline-DsLeV5I1.js +894 -0
- package/dist/chunks/Timeline-DsLeV5I1.js.map +1 -0
- package/dist/chunks/{Toast-hr9BYsho.js → Toast-CfkiN0Nv.js} +1 -1
- package/dist/chunks/{Toast-hr9BYsho.js.map → Toast-CfkiN0Nv.js.map} +1 -1
- package/dist/chunks/{ToggleBar-BxgWq-wO.js → ToggleBar-D0veW91s.js} +2 -2
- package/dist/chunks/{ToggleBar-BxgWq-wO.js.map → ToggleBar-D0veW91s.js.map} +1 -1
- package/dist/chunks/{ToolButton-CJrPjbsj.js → ToolButton-CLoR9Z4o.js} +2 -2
- package/dist/chunks/{ToolButton-CJrPjbsj.js.map → ToolButton-CLoR9Z4o.js.map} +1 -1
- package/dist/chunks/{ToolGroup-D_lDzkvU.js → ToolGroup-BnE23mcA.js} +1 -1
- package/dist/chunks/{ToolGroup-D_lDzkvU.js.map → ToolGroup-BnE23mcA.js.map} +1 -1
- package/dist/chunks/{ToolOptionsBar-BA6Sb3U2.js → ToolOptionsBar-ByHX7y1M.js} +1 -1
- package/dist/chunks/{ToolOptionsBar-BA6Sb3U2.js.map → ToolOptionsBar-ByHX7y1M.js.map} +1 -1
- package/dist/chunks/{ToolPalette-TMvkaJwr.js → ToolPalette-W-rAsomq.js} +5 -5
- package/dist/chunks/{ToolPalette-TMvkaJwr.js.map → ToolPalette-W-rAsomq.js.map} +1 -1
- package/dist/chunks/{Tooltip-Di7vxbFa.js → Tooltip-Bq8Hvj4r.js} +1 -1
- package/dist/chunks/{Tooltip-Di7vxbFa.js.map → Tooltip-Bq8Hvj4r.js.map} +1 -1
- package/dist/chunks/dlog-CMYiRF3Q.js +38 -0
- package/dist/chunks/dlog-CMYiRF3Q.js.map +1 -0
- package/dist/chunks/icons-CdLHgzV8.js +144 -0
- package/dist/chunks/icons-CdLHgzV8.js.map +1 -0
- package/dist/chunks/{keyGlyph-DNpLxF8u.js → keyGlyph-BLFMKZgF.js} +1 -1
- package/dist/chunks/{keyGlyph-DNpLxF8u.js.map → keyGlyph-BLFMKZgF.js.map} +1 -1
- package/dist/chunks/number-D3TDawLC.js +18 -0
- package/dist/chunks/number-D3TDawLC.js.map +1 -0
- package/dist/chunks/{segmentedControl.module-D4b7x19O.js → segmentedControl.module-XADeq9e5.js} +1 -1
- package/dist/chunks/{segmentedControl.module-D4b7x19O.js.map → segmentedControl.module-XADeq9e5.js.map} +1 -1
- package/dist/chunks/useReorderDragList-nQMVwNBd.js +109 -0
- package/dist/chunks/useReorderDragList-nQMVwNBd.js.map +1 -0
- package/dist/chunks/{useRovingTabIndex-CQz8EiKh.js → useRovingTabIndex-ByjY4lnw.js} +1 -1
- package/dist/chunks/{useRovingTabIndex-CQz8EiKh.js.map → useRovingTabIndex-ByjY4lnw.js.map} +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/ActionsBar/index.js +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/BandEditor/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Callout/Callout.d.ts +3 -3
- 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/index.js +1 -1
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DetentSlider/DetentSlider.d.ts +52 -0
- package/dist/components/DetentSlider/DetentSlider.d.ts.map +1 -0
- package/dist/components/DetentSlider/index.d.ts +3 -0
- package/dist/components/DetentSlider/index.d.ts.map +1 -0
- package/dist/components/DetentSlider/index.js +2 -0
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts +12 -0
- package/dist/components/DragHandleGlyph/DragHandleGlyph.d.ts.map +1 -0
- package/dist/components/DragHandleGlyph/index.d.ts +3 -0
- package/dist/components/DragHandleGlyph/index.d.ts.map +1 -0
- package/dist/components/DragHandleGlyph/index.js +2 -0
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FontFamilySelect/FontFamilySelect.d.ts +15 -0
- package/dist/components/FontFamilySelect/FontFamilySelect.d.ts.map +1 -0
- package/dist/components/FontFamilySelect/index.d.ts +3 -0
- package/dist/components/FontFamilySelect/index.d.ts.map +1 -0
- package/dist/components/FontFamilySelect/index.js +2 -0
- 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/ItemList/ItemList.d.ts +45 -0
- package/dist/components/ItemList/ItemList.d.ts.map +1 -0
- package/dist/components/ItemList/index.d.ts +3 -0
- package/dist/components/ItemList/index.d.ts.map +1 -0
- package/dist/components/ItemList/index.js +2 -0
- package/dist/components/Keycaps/index.js +2 -2
- package/dist/components/LayerStack/LayerStack.d.ts +49 -0
- package/dist/components/LayerStack/LayerStack.d.ts.map +1 -0
- package/dist/components/LayerStack/index.d.ts +2 -0
- package/dist/components/LayerStack/index.d.ts.map +1 -0
- package/dist/components/LayerStack/index.js +2 -0
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OptionsBar/index.js +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 +2 -2
- package/dist/components/Prefs/index.js +1 -1
- package/dist/components/Properties/CurveField.d.ts +37 -0
- package/dist/components/Properties/CurveField.d.ts.map +1 -0
- package/dist/components/Properties/EffectCard.d.ts +68 -0
- package/dist/components/Properties/EffectCard.d.ts.map +1 -0
- package/dist/components/Properties/PropertyGroup.d.ts +24 -0
- package/dist/components/Properties/PropertyGroup.d.ts.map +1 -0
- package/dist/components/Properties/PropertyPanel.d.ts +195 -0
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -0
- package/dist/components/Properties/index.d.ts +9 -0
- package/dist/components/Properties/index.d.ts.map +1 -0
- package/dist/components/Properties/index.js +2 -0
- package/dist/components/Properties/storyLayouts.d.ts +11 -0
- package/dist/components/Properties/storyLayouts.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/RangeSlider/RangeSlider.d.ts +2 -2
- package/dist/components/RangeSlider/index.js +1 -1
- package/dist/components/ResizeHandle/index.js +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
- package/dist/components/SelectionPanel/index.js +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -1
- package/dist/components/SidebarPanel/index.js +1 -1
- package/dist/components/Slider/Slider.d.ts +16 -1
- package/dist/components/Slider/Slider.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/AnimatedTimeline.d.ts +15 -0
- package/dist/components/Timeline/AnimatedTimeline.d.ts.map +1 -0
- package/dist/components/Timeline/EasingPicker.d.ts +8 -0
- package/dist/components/Timeline/EasingPicker.d.ts.map +1 -0
- package/dist/components/Timeline/Lane.d.ts +28 -0
- package/dist/components/Timeline/Lane.d.ts.map +1 -0
- package/dist/components/Timeline/Ruler.d.ts +12 -0
- package/dist/components/Timeline/Ruler.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +39 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/Transport.d.ts +14 -0
- package/dist/components/Timeline/Transport.d.ts.map +1 -0
- package/dist/components/Timeline/easingSpec.d.ts +16 -0
- package/dist/components/Timeline/easingSpec.d.ts.map +1 -0
- package/dist/components/Timeline/index.d.ts +11 -0
- package/dist/components/Timeline/index.d.ts.map +1 -0
- package/dist/components/Timeline/index.js +2 -0
- package/dist/components/Timeline/keys.d.ts +34 -0
- package/dist/components/Timeline/keys.d.ts.map +1 -0
- package/dist/components/Timeline/lanes.d.ts +24 -0
- package/dist/components/Timeline/lanes.d.ts.map +1 -0
- package/dist/components/Timeline/timeScale.d.ts +31 -0
- package/dist/components/Timeline/timeScale.d.ts.map +1 -0
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleBar/index.js +1 -1
- package/dist/components/ToolButton/index.js +1 -1
- package/dist/components/ToolGroup/index.js +1 -1
- package/dist/components/ToolOptionsBar/index.js +1 -1
- package/dist/components/ToolPalette/index.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/format/number.d.ts +13 -0
- package/dist/format/number.d.ts.map +1 -1
- package/dist/icons/index.d.ts +3 -1
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/paths.d.ts +2 -0
- package/dist/icons/paths.d.ts.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -184
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -4
- package/dist/chunks/Callout-CHs98djt.js.map +0 -1
- package/dist/chunks/DataGrid-D15I779H.js +0 -210
- package/dist/chunks/DataGrid-D15I779H.js.map +0 -1
- package/dist/chunks/PaintInput-Cggm9OIl.js.map +0 -1
- package/dist/chunks/Plot2D-sPXTw_-l.js +0 -168
- package/dist/chunks/Plot2D-sPXTw_-l.js.map +0 -1
- package/dist/chunks/RangeSlider-B-n_7AgJ.js.map +0 -1
- package/dist/chunks/SelectionPanel-C7kygTFE.js +0 -446
- package/dist/chunks/SelectionPanel-C7kygTFE.js.map +0 -1
- package/dist/chunks/SidebarPanel-AeSc7wNR.js +0 -59
- package/dist/chunks/SidebarPanel-AeSc7wNR.js.map +0 -1
- package/dist/chunks/Slider-cxWR47gi.js +0 -259
- package/dist/chunks/Slider-cxWR47gi.js.map +0 -1
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
import { t as e } from "./dlog-CMYiRF3Q.js";
|
|
2
|
+
import { n as t, t as n } from "./Tooltip-Bq8Hvj4r.js";
|
|
3
|
+
import { i as r, n as i } from "./number-D3TDawLC.js";
|
|
4
|
+
import { n as a } from "./CurveEditor-COJ6WK9K.js";
|
|
5
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
import { useCallback as l, useMemo as u, useState as d } from "react";
|
|
7
|
+
import { Focusable as f } from "react-aria-components";
|
|
8
|
+
var p = {
|
|
9
|
+
field: "_field_17u88_1",
|
|
10
|
+
plot: "_plot_17u88_12",
|
|
11
|
+
marks: "_marks_17u88_17",
|
|
12
|
+
actions: "_actions_17u88_23",
|
|
13
|
+
action: "_action_17u88_23"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/Properties/CurveField.tsx
|
|
17
|
+
function m({ values: t, min: n, max: r, step: i, width: o, height: d = 110, defaults: f, onChange: m, marks: h }) {
|
|
18
|
+
let g = u(() => {
|
|
19
|
+
let e = [];
|
|
20
|
+
for (let n = 0; n + 1 < t.length; n += 2) e.push({
|
|
21
|
+
x: t[n],
|
|
22
|
+
y: t[n + 1]
|
|
23
|
+
});
|
|
24
|
+
return e;
|
|
25
|
+
}, [t]), _ = l((t) => {
|
|
26
|
+
let a = Array(t.length * 2);
|
|
27
|
+
for (let e = 0; e < t.length; e++) {
|
|
28
|
+
let o = Math.round(t[e].y / i) * i, s = Math.max(n, Math.min(r, o));
|
|
29
|
+
a[e * 2] = t[e].x, a[e * 2 + 1] = s;
|
|
30
|
+
}
|
|
31
|
+
e("curve-field", "handleChange", {
|
|
32
|
+
nLen: t.length,
|
|
33
|
+
flatLen: a.length,
|
|
34
|
+
sample: a.slice(0, 4)
|
|
35
|
+
}), m(a);
|
|
36
|
+
}, [
|
|
37
|
+
m,
|
|
38
|
+
n,
|
|
39
|
+
r,
|
|
40
|
+
i
|
|
41
|
+
]), v = l(() => {
|
|
42
|
+
let e = [];
|
|
43
|
+
for (let n = 0; n + 1 < t.length; n += 2) e.push({
|
|
44
|
+
x: 1 - t[n],
|
|
45
|
+
y: t[n + 1]
|
|
46
|
+
});
|
|
47
|
+
e.sort((e, t) => e.x - t.x);
|
|
48
|
+
let n = [];
|
|
49
|
+
for (let t of e) n.push(t.x, t.y);
|
|
50
|
+
m(n);
|
|
51
|
+
}, [t, m]), y = l(() => {
|
|
52
|
+
let e = (n + r) / 2, i = Array(t.length);
|
|
53
|
+
for (let n = 0; n + 1 < t.length; n += 2) i[n] = t[n], i[n + 1] = 2 * e - t[n + 1];
|
|
54
|
+
m(i);
|
|
55
|
+
}, [
|
|
56
|
+
t,
|
|
57
|
+
n,
|
|
58
|
+
r,
|
|
59
|
+
m
|
|
60
|
+
]);
|
|
61
|
+
return /* @__PURE__ */ c("div", {
|
|
62
|
+
className: p.field,
|
|
63
|
+
children: [/* @__PURE__ */ c("div", {
|
|
64
|
+
className: p.plot,
|
|
65
|
+
children: [/* @__PURE__ */ s(a, {
|
|
66
|
+
value: g,
|
|
67
|
+
onInput: _,
|
|
68
|
+
domain: "1d",
|
|
69
|
+
constrain: "function",
|
|
70
|
+
xRange: [0, 1],
|
|
71
|
+
yRange: [n, r],
|
|
72
|
+
width: o,
|
|
73
|
+
height: d,
|
|
74
|
+
endpoints: "pinned-x",
|
|
75
|
+
addPointMode: "click-curve",
|
|
76
|
+
minPoints: 2,
|
|
77
|
+
grid: {},
|
|
78
|
+
history: !1
|
|
79
|
+
}), h && h.length > 0 && /* @__PURE__ */ s("svg", {
|
|
80
|
+
className: p.marks,
|
|
81
|
+
width: o,
|
|
82
|
+
height: d,
|
|
83
|
+
viewBox: `0 0 ${o} ${d}`,
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
children: h.map((e) => {
|
|
86
|
+
let t = e.color ?? "#ffcc00";
|
|
87
|
+
if (e.kind === "band") {
|
|
88
|
+
let n = Math.max(0, Math.min(1, e.x[0])) * o, r = Math.max(0, Math.min(1, e.x[1])) * o, i = Math.min(n, r), a = Math.abs(r - n);
|
|
89
|
+
return /* @__PURE__ */ c("g", { children: [
|
|
90
|
+
/* @__PURE__ */ s("rect", {
|
|
91
|
+
x: i,
|
|
92
|
+
y: 0,
|
|
93
|
+
width: a,
|
|
94
|
+
height: d,
|
|
95
|
+
fill: t,
|
|
96
|
+
fillOpacity: .4
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ s("line", {
|
|
99
|
+
x1: i,
|
|
100
|
+
y1: 0,
|
|
101
|
+
x2: i,
|
|
102
|
+
y2: d,
|
|
103
|
+
stroke: t,
|
|
104
|
+
strokeOpacity: .85,
|
|
105
|
+
strokeWidth: 1
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ s("line", {
|
|
108
|
+
x1: i + a,
|
|
109
|
+
y1: 0,
|
|
110
|
+
x2: i + a,
|
|
111
|
+
y2: d,
|
|
112
|
+
stroke: t,
|
|
113
|
+
strokeOpacity: .85,
|
|
114
|
+
strokeWidth: 1
|
|
115
|
+
})
|
|
116
|
+
] }, `band-${e.x[0]}-${e.x[1]}-${t}`);
|
|
117
|
+
}
|
|
118
|
+
let n = Math.max(0, Math.min(1, e.x)) * o;
|
|
119
|
+
return /* @__PURE__ */ s("line", {
|
|
120
|
+
x1: n,
|
|
121
|
+
y1: 0,
|
|
122
|
+
x2: n,
|
|
123
|
+
y2: d,
|
|
124
|
+
stroke: t,
|
|
125
|
+
strokeWidth: 1
|
|
126
|
+
}, `mark-${e.x}-${t}`);
|
|
127
|
+
})
|
|
128
|
+
})]
|
|
129
|
+
}), /* @__PURE__ */ c("div", {
|
|
130
|
+
className: p.actions,
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ s("button", {
|
|
133
|
+
type: "button",
|
|
134
|
+
className: p.action,
|
|
135
|
+
onClick: v,
|
|
136
|
+
children: "Flip horizontally"
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ s("button", {
|
|
139
|
+
type: "button",
|
|
140
|
+
className: p.action,
|
|
141
|
+
onClick: y,
|
|
142
|
+
children: "Flip vertically"
|
|
143
|
+
}),
|
|
144
|
+
f && /* @__PURE__ */ s("button", {
|
|
145
|
+
type: "button",
|
|
146
|
+
className: p.action,
|
|
147
|
+
onClick: () => m([...f]),
|
|
148
|
+
children: "Reset"
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
var h = {
|
|
155
|
+
panel: "_panel_1t04m_9",
|
|
156
|
+
list: "_list_1t04m_3",
|
|
157
|
+
row: "_row_1t04m_4",
|
|
158
|
+
group: "_group_1t04m_4",
|
|
159
|
+
subpanel: "_subpanel_1t04m_3",
|
|
160
|
+
card: "_card_1t04m_14",
|
|
161
|
+
cardList: "_cardList_1t04m_15",
|
|
162
|
+
panelTitle: "_panelTitle_1t04m_35",
|
|
163
|
+
listPairs: "_listPairs_1t04m_3",
|
|
164
|
+
rowColor: "_rowColor_1t04m_4",
|
|
165
|
+
span: "_span_1t04m_66",
|
|
166
|
+
rowLabel: "_rowLabel_1t04m_94",
|
|
167
|
+
readout: "_readout_1t04m_120",
|
|
168
|
+
help: "_help_1t04m_132",
|
|
169
|
+
readoutInput: "_readoutInput_1t04m_164",
|
|
170
|
+
readoutGroup: "_readoutGroup_1t04m_202",
|
|
171
|
+
readoutUnit: "_readoutUnit_1t04m_208",
|
|
172
|
+
rowInline: "_rowInline_1t04m_268",
|
|
173
|
+
toggle: "_toggle_1t04m_286",
|
|
174
|
+
alpha: "_alpha_1t04m_401",
|
|
175
|
+
alphaDisabled: "_alphaDisabled_1t04m_419",
|
|
176
|
+
rowCheckbox: "_rowCheckbox_1t04m_441",
|
|
177
|
+
toggleButton: "_toggleButton_1t04m_473",
|
|
178
|
+
toggleButtonSelected: "_toggleButtonSelected_1t04m_499",
|
|
179
|
+
groupTitle: "_groupTitle_1t04m_518",
|
|
180
|
+
groupBody: "_groupBody_1t04m_4",
|
|
181
|
+
groupPairs: "_groupPairs_1t04m_549",
|
|
182
|
+
subpanelTitle: "_subpanelTitle_1t04m_581",
|
|
183
|
+
cardDragging: "_cardDragging_1t04m_625",
|
|
184
|
+
cardExpanded: "_cardExpanded_1t04m_629",
|
|
185
|
+
cardAccented: "_cardAccented_1t04m_633",
|
|
186
|
+
cardHead: "_cardHead_1t04m_648",
|
|
187
|
+
cardHandle: "_cardHandle_1t04m_669",
|
|
188
|
+
cardIndexBadge: "_cardIndexBadge_1t04m_682",
|
|
189
|
+
cardTitle: "_cardTitle_1t04m_700",
|
|
190
|
+
cardPrimary: "_cardPrimary_1t04m_710",
|
|
191
|
+
cardRemove: "_cardRemove_1t04m_725",
|
|
192
|
+
cardBody: "_cardBody_1t04m_754",
|
|
193
|
+
cardListWrap: "_cardListWrap_1t04m_766",
|
|
194
|
+
cardDropHint: "_cardDropHint_1t04m_770",
|
|
195
|
+
cardListEmpty: "_cardListEmpty_1t04m_778"
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/components/Properties/EffectCard.tsx
|
|
199
|
+
function g({ title: e, children: t, className: n }) {
|
|
200
|
+
return /* @__PURE__ */ c("div", {
|
|
201
|
+
className: n ? `${h.subpanel} ${n}` : h.subpanel,
|
|
202
|
+
children: [/* @__PURE__ */ c("h4", {
|
|
203
|
+
className: h.subpanelTitle,
|
|
204
|
+
children: [/* @__PURE__ */ s("span", { children: e }), /* @__PURE__ */ s("hr", {})]
|
|
205
|
+
}), t]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function _({ title: e, primary: t, accent: n, index: r, expanded: i = !0, onToggleExpanded: a, onRemove: o, draggable: l, onPressHandle: u, onReleaseHandle: d, onDragStart: f, onDragEnd: p, onDragOver: m, onDragLeave: g, onDrop: _, dragging: y, children: b, className: x }) {
|
|
209
|
+
let S = `${i ? ` ${h.cardExpanded}` : ""}${y ? ` ${h.cardDragging}` : ""}${n ? ` ${h.cardAccented}` : ""}`, C = `${h.card}${S}${x ? ` ${x}` : ""}`, w = n ? { "--wzl-effect-card-accent": n } : void 0, T = a ? {
|
|
210
|
+
role: "button",
|
|
211
|
+
tabIndex: 0,
|
|
212
|
+
onClick: a,
|
|
213
|
+
onKeyDown: (e) => {
|
|
214
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
215
|
+
}
|
|
216
|
+
} : {};
|
|
217
|
+
return /* @__PURE__ */ c("div", {
|
|
218
|
+
className: C,
|
|
219
|
+
style: w,
|
|
220
|
+
draggable: l,
|
|
221
|
+
onDragStart: f,
|
|
222
|
+
onDragEnd: p,
|
|
223
|
+
onDragOver: m,
|
|
224
|
+
onDragLeave: g,
|
|
225
|
+
onDrop: _,
|
|
226
|
+
children: [/* @__PURE__ */ c("div", {
|
|
227
|
+
className: h.cardHead,
|
|
228
|
+
...T,
|
|
229
|
+
children: [
|
|
230
|
+
r == null ? /* @__PURE__ */ s("span", {
|
|
231
|
+
className: h.cardHandle,
|
|
232
|
+
"aria-hidden": "true",
|
|
233
|
+
title: "Drag to reorder",
|
|
234
|
+
onMouseDown: u,
|
|
235
|
+
onMouseUp: d,
|
|
236
|
+
children: /* @__PURE__ */ s(v, {})
|
|
237
|
+
}) : /* @__PURE__ */ s("button", {
|
|
238
|
+
type: "button",
|
|
239
|
+
className: `${h.cardIndexBadge} ${h.cardHandle}`,
|
|
240
|
+
title: "Drag to reorder · click to toggle",
|
|
241
|
+
"aria-label": `Item ${r + 1} — drag to reorder, click to toggle`,
|
|
242
|
+
onMouseDown: u,
|
|
243
|
+
onMouseUp: d,
|
|
244
|
+
onClick: (e) => {
|
|
245
|
+
e.stopPropagation(), a?.();
|
|
246
|
+
},
|
|
247
|
+
children: r + 1
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ s("span", {
|
|
250
|
+
className: h.cardTitle,
|
|
251
|
+
children: e
|
|
252
|
+
}),
|
|
253
|
+
t != null && /* @__PURE__ */ s("span", {
|
|
254
|
+
className: h.cardPrimary,
|
|
255
|
+
children: t
|
|
256
|
+
}),
|
|
257
|
+
o && /* @__PURE__ */ s("button", {
|
|
258
|
+
type: "button",
|
|
259
|
+
className: h.cardRemove,
|
|
260
|
+
onClick: (e) => {
|
|
261
|
+
e.stopPropagation(), o();
|
|
262
|
+
},
|
|
263
|
+
title: "Remove",
|
|
264
|
+
"aria-label": "Remove",
|
|
265
|
+
children: "✕"
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
}), i && /* @__PURE__ */ s("div", {
|
|
269
|
+
className: h.cardBody,
|
|
270
|
+
children: b
|
|
271
|
+
})]
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
function v() {
|
|
275
|
+
return /* @__PURE__ */ c("svg", {
|
|
276
|
+
width: "10",
|
|
277
|
+
height: "14",
|
|
278
|
+
viewBox: "0 0 10 14",
|
|
279
|
+
"aria-hidden": "true",
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ s("circle", {
|
|
282
|
+
cx: "3",
|
|
283
|
+
cy: "3",
|
|
284
|
+
r: "1.3",
|
|
285
|
+
fill: "currentColor"
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ s("circle", {
|
|
288
|
+
cx: "7",
|
|
289
|
+
cy: "3",
|
|
290
|
+
r: "1.3",
|
|
291
|
+
fill: "currentColor"
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ s("circle", {
|
|
294
|
+
cx: "3",
|
|
295
|
+
cy: "7",
|
|
296
|
+
r: "1.3",
|
|
297
|
+
fill: "currentColor"
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ s("circle", {
|
|
300
|
+
cx: "7",
|
|
301
|
+
cy: "7",
|
|
302
|
+
r: "1.3",
|
|
303
|
+
fill: "currentColor"
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ s("circle", {
|
|
306
|
+
cx: "3",
|
|
307
|
+
cy: "11",
|
|
308
|
+
r: "1.3",
|
|
309
|
+
fill: "currentColor"
|
|
310
|
+
}),
|
|
311
|
+
/* @__PURE__ */ s("circle", {
|
|
312
|
+
cx: "7",
|
|
313
|
+
cy: "11",
|
|
314
|
+
r: "1.3",
|
|
315
|
+
fill: "currentColor"
|
|
316
|
+
})
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function y({ items: e, renderItem: t, onReorder: n, empty: r, defaultExpandedIds: i }) {
|
|
321
|
+
let [a, l] = d(() => new Set(i ?? [])), [u, f] = d(null), [p, m] = d(null), [g, _] = d(null);
|
|
322
|
+
return e.length === 0 ? /* @__PURE__ */ s(o, { children: r ?? /* @__PURE__ */ s("div", {
|
|
323
|
+
className: h.cardListEmpty,
|
|
324
|
+
children: "No items."
|
|
325
|
+
}) }) : /* @__PURE__ */ s("div", {
|
|
326
|
+
className: h.cardList,
|
|
327
|
+
children: e.map((e) => {
|
|
328
|
+
let r = a.has(e.id), i = u === e.id, o = p === e.id, d = g && g.id === e.id && g.position === "before", v = g && g.id === e.id && g.position === "after", y = () => l((t) => {
|
|
329
|
+
let n = new Set(t);
|
|
330
|
+
return n.has(e.id) ? n.delete(e.id) : n.add(e.id), n;
|
|
331
|
+
});
|
|
332
|
+
return /* @__PURE__ */ c("div", {
|
|
333
|
+
className: h.cardListWrap,
|
|
334
|
+
children: [
|
|
335
|
+
d && /* @__PURE__ */ s("div", { className: h.cardDropHint }),
|
|
336
|
+
t(e, {
|
|
337
|
+
isExpanded: r,
|
|
338
|
+
isDragging: i,
|
|
339
|
+
toggleExpanded: y,
|
|
340
|
+
cardProps: {
|
|
341
|
+
expanded: r,
|
|
342
|
+
dragging: i,
|
|
343
|
+
draggable: o,
|
|
344
|
+
onToggleExpanded: y,
|
|
345
|
+
onPressHandle: () => m(e.id),
|
|
346
|
+
onReleaseHandle: () => m(null),
|
|
347
|
+
onDragStart: (t) => {
|
|
348
|
+
t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", String(e.id)), f(e.id);
|
|
349
|
+
},
|
|
350
|
+
onDragEnd: () => {
|
|
351
|
+
f(null), m(null), _(null);
|
|
352
|
+
},
|
|
353
|
+
onDragOver: (t) => {
|
|
354
|
+
if (u === null || u === e.id) return;
|
|
355
|
+
t.preventDefault(), t.dataTransfer.dropEffect = "move";
|
|
356
|
+
let n = t.currentTarget.getBoundingClientRect(), r = t.clientY < n.top + n.height / 2 ? "before" : "after";
|
|
357
|
+
_({
|
|
358
|
+
id: e.id,
|
|
359
|
+
position: r
|
|
360
|
+
});
|
|
361
|
+
},
|
|
362
|
+
onDragLeave: () => {
|
|
363
|
+
_((t) => t && t.id === e.id ? null : t);
|
|
364
|
+
},
|
|
365
|
+
onDrop: (t) => {
|
|
366
|
+
if (t.preventDefault(), u === null || u === e.id) {
|
|
367
|
+
_(null);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
let r = t.currentTarget.getBoundingClientRect(), i = t.clientY < r.top + r.height / 2 ? "before" : "after";
|
|
371
|
+
n(u, e.id, i), _(null);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}),
|
|
375
|
+
v && /* @__PURE__ */ s("div", { className: h.cardDropHint })
|
|
376
|
+
]
|
|
377
|
+
}, String(e.id));
|
|
378
|
+
})
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/components/Properties/PropertyGroup.tsx
|
|
383
|
+
function b({ title: e, hidden: t, children: n, className: r, pack: i = "auto-color" }) {
|
|
384
|
+
if (t) return null;
|
|
385
|
+
let a = i === "pairs" ? ` ${h.groupPairs}` : "";
|
|
386
|
+
return /* @__PURE__ */ c("div", {
|
|
387
|
+
className: `${h.group}${a}${r ? ` ${r}` : ""}`,
|
|
388
|
+
children: [/* @__PURE__ */ c("h3", {
|
|
389
|
+
className: h.groupTitle,
|
|
390
|
+
children: [
|
|
391
|
+
/* @__PURE__ */ s("hr", {}),
|
|
392
|
+
/* @__PURE__ */ s("span", { children: e }),
|
|
393
|
+
/* @__PURE__ */ s("hr", {})
|
|
394
|
+
]
|
|
395
|
+
}), /* @__PURE__ */ s("div", {
|
|
396
|
+
className: h.groupBody,
|
|
397
|
+
children: n
|
|
398
|
+
})]
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/components/Properties/PropertyPanel.tsx
|
|
403
|
+
function x({ title: e, children: t, className: n }) {
|
|
404
|
+
return /* @__PURE__ */ c("div", {
|
|
405
|
+
className: n ? `${h.panel} ${n}` : h.panel,
|
|
406
|
+
children: [e != null && /* @__PURE__ */ s("h2", {
|
|
407
|
+
className: h.panelTitle,
|
|
408
|
+
children: e
|
|
409
|
+
}), t]
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
function S({ children: e, className: t, pack: n = "auto-color" }) {
|
|
413
|
+
let r = n === "pairs" ? ` ${h.listPairs}` : "";
|
|
414
|
+
return /* @__PURE__ */ s("div", {
|
|
415
|
+
className: `${h.list}${r}${t ? ` ${t}` : ""}`,
|
|
416
|
+
children: e
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
function C({ children: e, className: t }) {
|
|
420
|
+
return /* @__PURE__ */ s("div", {
|
|
421
|
+
className: t ? `${h.span} ${t}` : h.span,
|
|
422
|
+
children: e
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function w({ label: e, readout: t, description: n, variant: r = "default", layout: i = "block", span: a, children: o, htmlFor: l, className: u }) {
|
|
426
|
+
let d = r === "color" ? ` ${h.rowColor}` : r === "checkbox" ? ` ${h.rowCheckbox}` : "", f = r === "default" && i === "inline" ? ` ${h.rowInline}` : "", p = a ? ` ${h.span}` : "";
|
|
427
|
+
return /* @__PURE__ */ c("label", {
|
|
428
|
+
className: `${h.row}${d}${f}${p}${u ? ` ${u}` : ""}`,
|
|
429
|
+
htmlFor: l,
|
|
430
|
+
children: [/* @__PURE__ */ c("span", {
|
|
431
|
+
className: h.rowLabel,
|
|
432
|
+
children: [
|
|
433
|
+
e,
|
|
434
|
+
n ? /* @__PURE__ */ s(T, {
|
|
435
|
+
label: e,
|
|
436
|
+
description: n
|
|
437
|
+
}) : null,
|
|
438
|
+
t != null && /* @__PURE__ */ s("em", {
|
|
439
|
+
className: h.readout,
|
|
440
|
+
children: t
|
|
441
|
+
})
|
|
442
|
+
]
|
|
443
|
+
}), o]
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function T({ label: e, description: r }) {
|
|
447
|
+
let i = typeof e == "string" ? e : "this setting";
|
|
448
|
+
return /* @__PURE__ */ c(t, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s("button", {
|
|
449
|
+
type: "button",
|
|
450
|
+
className: h.help,
|
|
451
|
+
"aria-label": `About ${i}`,
|
|
452
|
+
onClick: (e) => {
|
|
453
|
+
e.preventDefault(), e.stopPropagation();
|
|
454
|
+
},
|
|
455
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
456
|
+
children: "ⓘ"
|
|
457
|
+
}) }), /* @__PURE__ */ s(n, { children: r })] });
|
|
458
|
+
}
|
|
459
|
+
function E({ label: t, value: n, min: r, max: a, step: o = 1, onChange: c, format: l, unit: u, layout: d, description: f, span: p }) {
|
|
460
|
+
let m = o >= 1 ? 0 : Math.min(6, Math.max(0, Math.ceil(-Math.log10(o))));
|
|
461
|
+
return /* @__PURE__ */ s(w, {
|
|
462
|
+
span: p,
|
|
463
|
+
label: t,
|
|
464
|
+
readout: /* @__PURE__ */ s(D, {
|
|
465
|
+
value: n,
|
|
466
|
+
min: r,
|
|
467
|
+
max: a,
|
|
468
|
+
format: l ?? ((e) => i(e, {
|
|
469
|
+
useGrouping: !1,
|
|
470
|
+
minimumFractionDigits: m,
|
|
471
|
+
maximumFractionDigits: m
|
|
472
|
+
})),
|
|
473
|
+
unit: u,
|
|
474
|
+
onCommit: c
|
|
475
|
+
}),
|
|
476
|
+
layout: d,
|
|
477
|
+
description: f,
|
|
478
|
+
children: /* @__PURE__ */ s("input", {
|
|
479
|
+
type: "range",
|
|
480
|
+
tabIndex: -1,
|
|
481
|
+
min: r,
|
|
482
|
+
max: a,
|
|
483
|
+
step: o,
|
|
484
|
+
value: n,
|
|
485
|
+
onChange: (n) => {
|
|
486
|
+
let r = Number(n.target.value);
|
|
487
|
+
e("property-panel", "slider", {
|
|
488
|
+
label: t,
|
|
489
|
+
value: r
|
|
490
|
+
}), c(r);
|
|
491
|
+
}
|
|
492
|
+
})
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
function D({ value: e, min: t, max: n, format: a, unit: o, onCommit: l }) {
|
|
496
|
+
let [u, f] = d(null), p = (e) => a ? a(e) : i(e, {
|
|
497
|
+
useGrouping: !1,
|
|
498
|
+
maximumFractionDigits: 20
|
|
499
|
+
}), m = u === null ? (() => {
|
|
500
|
+
let t = p(e);
|
|
501
|
+
return typeof t == "string" ? t : String(t);
|
|
502
|
+
})() : u, g = o == null ? null : typeof o == "string" ? /* @__PURE__ */ s("span", {
|
|
503
|
+
className: h.readoutUnit,
|
|
504
|
+
children: o
|
|
505
|
+
}) : o, _ = () => {
|
|
506
|
+
if (u !== null) {
|
|
507
|
+
let e = r(u);
|
|
508
|
+
Number.isFinite(e) && l(Math.min(n, Math.max(t, e)));
|
|
509
|
+
}
|
|
510
|
+
f(null);
|
|
511
|
+
};
|
|
512
|
+
return /* @__PURE__ */ c("span", {
|
|
513
|
+
className: h.readoutGroup,
|
|
514
|
+
children: [/* @__PURE__ */ s("input", {
|
|
515
|
+
type: "text",
|
|
516
|
+
inputMode: "decimal",
|
|
517
|
+
className: h.readoutInput,
|
|
518
|
+
value: m,
|
|
519
|
+
onFocus: (t) => {
|
|
520
|
+
let n = p(e);
|
|
521
|
+
f(typeof n == "string" ? n : String(n)), t.currentTarget.select();
|
|
522
|
+
},
|
|
523
|
+
onChange: (e) => f(e.target.value.replace(/-/g, "−")),
|
|
524
|
+
onBlur: _,
|
|
525
|
+
onClick: (e) => {
|
|
526
|
+
e.preventDefault(), e.stopPropagation(), e.currentTarget.focus();
|
|
527
|
+
},
|
|
528
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
529
|
+
onKeyDown: (e) => {
|
|
530
|
+
e.key === "Enter" ? (_(), e.currentTarget.blur()) : e.key === "Escape" && (f(null), e.currentTarget.blur());
|
|
531
|
+
}
|
|
532
|
+
}), g]
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
function O({ label: e, value: t, onChange: n, alpha: r, onAlphaChange: i, alphaDisabled: a, description: o, span: l }) {
|
|
536
|
+
let u = r != null;
|
|
537
|
+
return /* @__PURE__ */ c(w, {
|
|
538
|
+
span: l,
|
|
539
|
+
label: e,
|
|
540
|
+
variant: "color",
|
|
541
|
+
className: a ? h.alphaDisabled : void 0,
|
|
542
|
+
description: o,
|
|
543
|
+
children: [/* @__PURE__ */ s("input", {
|
|
544
|
+
type: "color",
|
|
545
|
+
value: t,
|
|
546
|
+
onChange: (e) => n(e.target.value)
|
|
547
|
+
}), u && /* @__PURE__ */ s("input", {
|
|
548
|
+
type: "range",
|
|
549
|
+
className: h.alpha,
|
|
550
|
+
min: 0,
|
|
551
|
+
max: 1,
|
|
552
|
+
step: .01,
|
|
553
|
+
value: r,
|
|
554
|
+
disabled: a,
|
|
555
|
+
onChange: (e) => i?.(Number(e.target.value))
|
|
556
|
+
})]
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
function k({ label: e, value: t, onChange: n, span: r, description: i }) {
|
|
560
|
+
return /* @__PURE__ */ s(w, {
|
|
561
|
+
span: r,
|
|
562
|
+
label: e,
|
|
563
|
+
variant: "checkbox",
|
|
564
|
+
description: i,
|
|
565
|
+
children: /* @__PURE__ */ s("input", {
|
|
566
|
+
type: "checkbox",
|
|
567
|
+
checked: t,
|
|
568
|
+
onChange: (e) => n(e.target.checked)
|
|
569
|
+
})
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function A({ label: e, value: t, onChange: n, placeholder: r, maxLength: i, layout: a, description: o, span: c }) {
|
|
573
|
+
return /* @__PURE__ */ s(w, {
|
|
574
|
+
span: c,
|
|
575
|
+
label: e,
|
|
576
|
+
layout: a,
|
|
577
|
+
description: o,
|
|
578
|
+
children: /* @__PURE__ */ s("input", {
|
|
579
|
+
type: "text",
|
|
580
|
+
value: t,
|
|
581
|
+
placeholder: r,
|
|
582
|
+
maxLength: i,
|
|
583
|
+
onChange: (e) => n(e.target.value)
|
|
584
|
+
})
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
function j({ label: e, value: t, onChange: n, min: r, max: i, step: a, placeholder: o, layout: c, description: l, span: u }) {
|
|
588
|
+
return /* @__PURE__ */ s(w, {
|
|
589
|
+
span: u,
|
|
590
|
+
label: e,
|
|
591
|
+
layout: c,
|
|
592
|
+
description: l,
|
|
593
|
+
children: /* @__PURE__ */ s("input", {
|
|
594
|
+
type: "number",
|
|
595
|
+
value: t,
|
|
596
|
+
min: r,
|
|
597
|
+
max: i,
|
|
598
|
+
step: a,
|
|
599
|
+
placeholder: o,
|
|
600
|
+
onChange: (e) => {
|
|
601
|
+
let t = e.target.value;
|
|
602
|
+
if (t === "") return;
|
|
603
|
+
let r = Number(t);
|
|
604
|
+
Number.isFinite(r) && n(r);
|
|
605
|
+
}
|
|
606
|
+
})
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
function M({ label: t, value: n, options: r, onChange: i, layout: a, description: o, span: c }) {
|
|
610
|
+
return /* @__PURE__ */ s(w, {
|
|
611
|
+
span: c,
|
|
612
|
+
label: t,
|
|
613
|
+
layout: a,
|
|
614
|
+
description: o,
|
|
615
|
+
children: /* @__PURE__ */ s("select", {
|
|
616
|
+
value: n,
|
|
617
|
+
onChange: (n) => {
|
|
618
|
+
let r = n.target.value;
|
|
619
|
+
e("property-panel", "select", {
|
|
620
|
+
label: t,
|
|
621
|
+
value: r
|
|
622
|
+
}), i(r);
|
|
623
|
+
},
|
|
624
|
+
children: r.map((e) => /* @__PURE__ */ s("option", {
|
|
625
|
+
value: e.value,
|
|
626
|
+
children: e.label
|
|
627
|
+
}, e.value))
|
|
628
|
+
})
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
function N({ label: e, value: t, options: n, onChange: r, layout: i, description: a, span: o }) {
|
|
632
|
+
return /* @__PURE__ */ s(w, {
|
|
633
|
+
span: o,
|
|
634
|
+
label: e,
|
|
635
|
+
layout: i,
|
|
636
|
+
description: a,
|
|
637
|
+
children: /* @__PURE__ */ s("div", {
|
|
638
|
+
className: h.toggle,
|
|
639
|
+
children: n.map((e) => {
|
|
640
|
+
let n = e.value === t;
|
|
641
|
+
return /* @__PURE__ */ s("button", {
|
|
642
|
+
type: "button",
|
|
643
|
+
"aria-pressed": n,
|
|
644
|
+
className: n ? `${h.toggleButton} ${h.toggleButtonSelected}` : h.toggleButton,
|
|
645
|
+
onClick: () => r(e.value),
|
|
646
|
+
children: e.label
|
|
647
|
+
}, e.value);
|
|
648
|
+
})
|
|
649
|
+
})
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
//#endregion
|
|
653
|
+
export { x as a, M as c, N as d, b as f, m as g, g as h, S as i, E as l, y as m, O as n, w as o, _ as p, j as r, C as s, k as t, A as u };
|
|
654
|
+
|
|
655
|
+
//# sourceMappingURL=Properties-CFRJ8mYH.js.map
|