@weasel-js/ui 1.4.2 → 1.4.3
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-D4N1o4LB.js → ActionBar-DxGp3WuZ.js} +2 -2
- package/dist/chunks/{ActionBar-D4N1o4LB.js.map → ActionBar-DxGp3WuZ.js.map} +1 -1
- package/dist/chunks/{ActionsBar-C2oXIJk-.js → ActionsBar-D1VFreoj.js} +3 -3
- package/dist/chunks/{ActionsBar-C2oXIJk-.js.map → ActionsBar-D1VFreoj.js.map} +1 -1
- package/dist/chunks/{Badge-7yQseqZb.js → Badge-Bf8Rd1R6.js} +1 -1
- package/dist/chunks/{Badge-7yQseqZb.js.map → Badge-Bf8Rd1R6.js.map} +1 -1
- package/dist/chunks/{BandEditor-CqiMlSF9.js → BandEditor-CUlbOlJi.js} +1 -1
- package/dist/chunks/{BandEditor-CqiMlSF9.js.map → BandEditor-CUlbOlJi.js.map} +1 -1
- package/dist/chunks/{Button-0OdcoOMx.js → Button-Cq5LBUMD.js} +1 -1
- package/dist/chunks/{Button-0OdcoOMx.js.map → Button-Cq5LBUMD.js.map} +1 -1
- package/dist/chunks/Callout-Dvt6lqVn.js +122 -0
- package/dist/chunks/Callout-Dvt6lqVn.js.map +1 -0
- package/dist/chunks/{Checkbox-CkcngYWa.js → Checkbox-D-pVpobU.js} +1 -1
- package/dist/chunks/{Checkbox-CkcngYWa.js.map → Checkbox-D-pVpobU.js.map} +1 -1
- package/dist/chunks/{ColorField-CCBSv8dp.js → ColorField-D0OxUlvu.js} +2 -2
- package/dist/chunks/{ColorField-CCBSv8dp.js.map → ColorField-D0OxUlvu.js.map} +1 -1
- package/dist/chunks/ComboBox-BBRRWvdc.js +107 -0
- package/dist/chunks/ComboBox-BBRRWvdc.js.map +1 -0
- package/dist/chunks/{CurveEditor-BNbP2wgq.js → CurveEditor-DtjdpJVB.js} +2 -2
- package/dist/chunks/{CurveEditor-BNbP2wgq.js.map → CurveEditor-DtjdpJVB.js.map} +1 -1
- package/dist/chunks/{DataGrid-CiJGbgok.js → DataGrid-BVdDMZkQ.js} +2 -2
- package/dist/chunks/{DataGrid-CiJGbgok.js.map → DataGrid-BVdDMZkQ.js.map} +1 -1
- package/dist/chunks/{DetentSlider-C6RTsiPi.js → DetentSlider-BVWKdRyC.js} +2 -2
- package/dist/chunks/{DetentSlider-C6RTsiPi.js.map → DetentSlider-BVWKdRyC.js.map} +1 -1
- package/dist/chunks/Dialog-CYBLjwbd.js +61 -0
- package/dist/chunks/Dialog-CYBLjwbd.js.map +1 -0
- package/dist/chunks/{Disclosure-aSX2CZlw.js → Disclosure-DiA6UKdM.js} +1 -1
- package/dist/chunks/{Disclosure-aSX2CZlw.js.map → Disclosure-DiA6UKdM.js.map} +1 -1
- package/dist/chunks/{DragHandleGlyph-C6GJyfnm.js → DragHandleGlyph-CppAz4_8.js} +1 -1
- package/dist/chunks/{DragHandleGlyph-C6GJyfnm.js.map → DragHandleGlyph-CppAz4_8.js.map} +1 -1
- package/dist/chunks/{Field-BUroh92b.js → Field-dzlxOGxT.js} +1 -1
- package/dist/chunks/{Field-BUroh92b.js.map → Field-dzlxOGxT.js.map} +1 -1
- package/dist/chunks/{FontFamilySelect-xjOHQMsK.js → FontFamilySelect-DIJ4phXz.js} +2 -2
- package/dist/chunks/{FontFamilySelect-xjOHQMsK.js.map → FontFamilySelect-DIJ4phXz.js.map} +1 -1
- package/dist/chunks/{GradientEditor-D1IVEkHO.js → GradientEditor-C5NVILLk.js} +4 -4
- package/dist/chunks/{GradientEditor-D1IVEkHO.js.map → GradientEditor-C5NVILLk.js.map} +1 -1
- package/dist/chunks/{InlineRange-DG2dvtb4.js → InlineRange-50ulExCL.js} +2 -2
- package/dist/chunks/{InlineRange-DG2dvtb4.js.map → InlineRange-50ulExCL.js.map} +1 -1
- package/dist/chunks/{Input-CxMANia3.js → Input-CoKOtyD0.js} +2 -2
- package/dist/chunks/{Input-CxMANia3.js.map → Input-CoKOtyD0.js.map} +1 -1
- package/dist/chunks/{ItemList-BcdHAah3.js → ItemList-BZJQReXD.js} +1 -1
- package/dist/chunks/{ItemList-BcdHAah3.js.map → ItemList-BZJQReXD.js.map} +1 -1
- package/dist/chunks/{Keycaps-D-UGWDrt.js → Keycaps-DSeq6QWH.js} +1 -1
- package/dist/chunks/{Keycaps-D-UGWDrt.js.map → Keycaps-DSeq6QWH.js.map} +1 -1
- package/dist/chunks/{LayerStack-DQnWSOVC.js → LayerStack-DOylrQcm.js} +3 -3
- package/dist/chunks/{LayerStack-DQnWSOVC.js.map → LayerStack-DOylrQcm.js.map} +1 -1
- package/dist/chunks/{NumberField-DLw4UmF3.js → NumberField-DBowmOfe.js} +2 -2
- package/dist/chunks/{NumberField-DLw4UmF3.js.map → NumberField-DBowmOfe.js.map} +1 -1
- package/dist/chunks/{OptionsBar-BXyk_5gT.js → OptionsBar-D_Cd3ZYs.js} +3 -3
- package/dist/chunks/{OptionsBar-BXyk_5gT.js.map → OptionsBar-D_Cd3ZYs.js.map} +1 -1
- package/dist/chunks/{PaintInput-DCgWtKxw.js → PaintInput-67U-COE4.js} +5 -5
- package/dist/chunks/{PaintInput-DCgWtKxw.js.map → PaintInput-67U-COE4.js.map} +1 -1
- package/dist/chunks/{PatternPicker-CPFEhpXD.js → PatternPicker-Ba22Bf4L.js} +2 -2
- package/dist/chunks/{PatternPicker-CPFEhpXD.js.map → PatternPicker-Ba22Bf4L.js.map} +1 -1
- package/dist/chunks/{Plot2D-BtI_c25q.js → Plot2D-C97pO13t.js} +1 -1
- package/dist/chunks/{Plot2D-BtI_c25q.js.map → Plot2D-C97pO13t.js.map} +1 -1
- package/dist/chunks/{PointPlotter-B-DvXjkL.js → PointPlotter-CbDKVggs.js} +2 -2
- package/dist/chunks/{PointPlotter-B-DvXjkL.js.map → PointPlotter-CbDKVggs.js.map} +1 -1
- package/dist/chunks/{Powerline-CJYCbqSc.js → Powerline-BaHDJlcO.js} +2 -2
- package/dist/chunks/{Powerline-CJYCbqSc.js.map → Powerline-BaHDJlcO.js.map} +1 -1
- package/dist/chunks/Prefs-D0l0PXLF.js +294 -0
- package/dist/chunks/Prefs-D0l0PXLF.js.map +1 -0
- package/dist/chunks/{Properties-fLSEE65J.js → Properties-CMLua9mU.js} +6 -6
- package/dist/chunks/{Properties-fLSEE65J.js.map → Properties-CMLua9mU.js.map} +1 -1
- package/dist/chunks/{RadioGroup-VGAaLYaR.js → RadioGroup-B2_LUgDp.js} +2 -2
- package/dist/chunks/{RadioGroup-VGAaLYaR.js.map → RadioGroup-B2_LUgDp.js.map} +1 -1
- package/dist/chunks/{RangeSlider-DefoAOsh.js → RangeSlider-C3to8A52.js} +1 -1
- package/dist/chunks/{RangeSlider-DefoAOsh.js.map → RangeSlider-C3to8A52.js.map} +1 -1
- package/dist/chunks/{ResizeHandle-DMJdqRud.js → ResizeHandle-BrCO0JrH.js} +1 -1
- package/dist/chunks/{ResizeHandle-DMJdqRud.js.map → ResizeHandle-BrCO0JrH.js.map} +1 -1
- package/dist/chunks/Select-CacMfs4v.js +124 -0
- package/dist/chunks/Select-CacMfs4v.js.map +1 -0
- package/dist/chunks/{SelectionPanel-BwBevj5F.js → SelectionPanel-BWXU8BqW.js} +203 -202
- package/dist/chunks/SelectionPanel-BWXU8BqW.js.map +1 -0
- package/dist/chunks/{Sidebar-CeSRkWKK.js → Sidebar-BvwjZiFm.js} +1 -1
- package/dist/chunks/{Sidebar-CeSRkWKK.js.map → Sidebar-BvwjZiFm.js.map} +1 -1
- package/dist/chunks/{SidebarPanel-BWIiJv7M.js → SidebarPanel-D5Ua2vyP.js} +2 -2
- package/dist/chunks/{SidebarPanel-BWIiJv7M.js.map → SidebarPanel-D5Ua2vyP.js.map} +1 -1
- package/dist/chunks/{Slider-X6WcO-6s.js → Slider-Bk_G5sSW.js} +15 -15
- package/dist/chunks/Slider-Bk_G5sSW.js.map +1 -0
- package/dist/chunks/{StatusBar-COyPUoEs.js → StatusBar-Bqv4D0dW.js} +1 -1
- package/dist/chunks/{StatusBar-COyPUoEs.js.map → StatusBar-Bqv4D0dW.js.map} +1 -1
- package/dist/chunks/{Switch-Y097LD1L.js → Switch-C4NU-me1.js} +1 -1
- package/dist/chunks/{Switch-Y097LD1L.js.map → Switch-C4NU-me1.js.map} +1 -1
- package/dist/chunks/{Tabs-BDzkqWDE.js → Tabs-BT3CDkoQ.js} +1 -1
- package/dist/chunks/{Tabs-BDzkqWDE.js.map → Tabs-BT3CDkoQ.js.map} +1 -1
- package/dist/chunks/{Timeline-D9xQBdKN.js → Timeline-BmYwYjXd.js} +2 -2
- package/dist/chunks/{Timeline-D9xQBdKN.js.map → Timeline-BmYwYjXd.js.map} +1 -1
- package/dist/chunks/{Toast-DX0iLdC3.js → Toast-B7ylq7fz.js} +1 -1
- package/dist/chunks/{Toast-DX0iLdC3.js.map → Toast-B7ylq7fz.js.map} +1 -1
- package/dist/chunks/{ToggleBar-fQGk_Wf_.js → ToggleBar-Bxwv6xvj.js} +2 -2
- package/dist/chunks/{ToggleBar-fQGk_Wf_.js.map → ToggleBar-Bxwv6xvj.js.map} +1 -1
- package/dist/chunks/{ToolButton-DpqTcgLa.js → ToolButton-CtDkqUIc.js} +2 -2
- package/dist/chunks/{ToolButton-DpqTcgLa.js.map → ToolButton-CtDkqUIc.js.map} +1 -1
- package/dist/chunks/{ToolGroup-DOrObiiA.js → ToolGroup-zDtqt0QJ.js} +1 -1
- package/dist/chunks/{ToolGroup-DOrObiiA.js.map → ToolGroup-zDtqt0QJ.js.map} +1 -1
- package/dist/chunks/{ToolOptionsBar-f6b5u99i.js → ToolOptionsBar-B2xPWzJf.js} +1 -1
- package/dist/chunks/{ToolOptionsBar-f6b5u99i.js.map → ToolOptionsBar-B2xPWzJf.js.map} +1 -1
- package/dist/chunks/{ToolPalette-B_Zjw6dC.js → ToolPalette-BbrMHfQ9.js} +5 -5
- package/dist/chunks/{ToolPalette-B_Zjw6dC.js.map → ToolPalette-BbrMHfQ9.js.map} +1 -1
- package/dist/chunks/Tooltip-BHre_vbI.js +42 -0
- package/dist/chunks/Tooltip-BHre_vbI.js.map +1 -0
- package/dist/chunks/{keyGlyph-L5bsDQe5.js → keyGlyph-Bp0wnLHn.js} +1 -1
- package/dist/chunks/{keyGlyph-L5bsDQe5.js.map → keyGlyph-Bp0wnLHn.js.map} +1 -1
- package/dist/chunks/{number-Dy633mrx.js → number-Bv1nbhOJ.js} +1 -1
- package/dist/chunks/{number-Dy633mrx.js.map → number-Bv1nbhOJ.js.map} +1 -1
- package/dist/chunks/portalHost-CjpCnuGU.js +28 -0
- package/dist/chunks/portalHost-CjpCnuGU.js.map +1 -0
- package/dist/chunks/{range.module-CO59aXEH.js → range.module-CgURq-Ua.js} +1 -1
- package/dist/chunks/{range.module-CO59aXEH.js.map → range.module-CgURq-Ua.js.map} +1 -1
- package/dist/chunks/schema-CtWwGbqJ.js +41 -0
- package/dist/chunks/schema-CtWwGbqJ.js.map +1 -0
- package/dist/chunks/{segmentedControl.module-pcPOsNey.js → segmentedControl.module-BgvAPkSZ.js} +1 -1
- package/dist/chunks/{segmentedControl.module-pcPOsNey.js.map → segmentedControl.module-BgvAPkSZ.js.map} +1 -1
- package/dist/chunks/{useReorderDragList-C2fhvbU1.js → useReorderDragList-CSQGd7zQ.js} +1 -1
- package/dist/chunks/{useReorderDragList-C2fhvbU1.js.map → useReorderDragList-CSQGd7zQ.js.map} +1 -1
- package/dist/chunks/{useRovingTabIndex-DqXFNDaD.js → useRovingTabIndex-Dkpf_KhN.js} +1 -1
- package/dist/chunks/{useRovingTabIndex-DqXFNDaD.js.map → useRovingTabIndex-Dkpf_KhN.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 +2 -1
- package/dist/components/Callout/Callout.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/ComboBox.d.ts +9 -2
- package/dist/components/ComboBox/ComboBox.d.ts.map +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/index.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Disclosure/index.js +1 -1
- package/dist/components/DragHandleGlyph/index.js +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FontFamilySelect/index.js +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/ItemList/index.js +1 -1
- package/dist/components/Keycaps/index.js +2 -2
- package/dist/components/LayerStack/index.js +1 -1
- 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/PrefsForm.d.ts.map +1 -1
- package/dist/components/Prefs/index.d.ts +1 -1
- package/dist/components/Prefs/index.d.ts.map +1 -1
- package/dist/components/Prefs/index.js +3 -2
- package/dist/components/Prefs/schema.d.ts +17 -1
- package/dist/components/Prefs/schema.d.ts.map +1 -1
- package/dist/components/Properties/index.js +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 +2 -1
- package/dist/components/Select/Select.d.ts.map +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/index.js +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/index.js +1 -1
- 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/Tooltip.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -61
- package/dist/index.js.map +1 -1
- package/dist/overlays/portalHost.d.ts +55 -0
- package/dist/overlays/portalHost.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/chunks/Callout-63z0T-w3.js +0 -116
- package/dist/chunks/Callout-63z0T-w3.js.map +0 -1
- package/dist/chunks/ComboBox-TnIrRldB.js +0 -89
- package/dist/chunks/ComboBox-TnIrRldB.js.map +0 -1
- package/dist/chunks/Dialog-D8pVzsw8.js +0 -59
- package/dist/chunks/Dialog-D8pVzsw8.js.map +0 -1
- package/dist/chunks/Prefs-BqnwyjmH.js +0 -300
- package/dist/chunks/Prefs-BqnwyjmH.js.map +0 -1
- package/dist/chunks/Select-DGafwTF0.js +0 -121
- package/dist/chunks/Select-DGafwTF0.js.map +0 -1
- package/dist/chunks/SelectionPanel-BwBevj5F.js.map +0 -1
- package/dist/chunks/Slider-X6WcO-6s.js.map +0 -1
- package/dist/chunks/Tooltip-Bq8Hvj4r.js +0 -40
- package/dist/chunks/Tooltip-Bq8Hvj4r.js.map +0 -1
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { n as e, t } from "./Icon-DBXtBB1f.js";
|
|
2
|
-
import { t as n } from "./ToggleBar-
|
|
3
|
-
import { t as r } from "./InlineRange-
|
|
4
|
-
import { t as i } from "./ColorField-
|
|
5
|
-
import { t as a } from "./PaintInput-
|
|
6
|
-
import { t as o } from "./
|
|
7
|
-
import { t as s } from "./
|
|
8
|
-
import { t as c } from "./
|
|
9
|
-
import { t as l } from "./
|
|
10
|
-
import { t as u } from "./
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { t as n } from "./ToggleBar-Bxwv6xvj.js";
|
|
3
|
+
import { t as r } from "./InlineRange-50ulExCL.js";
|
|
4
|
+
import { t as i } from "./ColorField-D0OxUlvu.js";
|
|
5
|
+
import { t as a } from "./PaintInput-67U-COE4.js";
|
|
6
|
+
import { t as o } from "./Select-CacMfs4v.js";
|
|
7
|
+
import { t as s } from "./FontFamilySelect-DIJ4phXz.js";
|
|
8
|
+
import { t as c } from "./Input-CoKOtyD0.js";
|
|
9
|
+
import { t as l } from "./NumberField-DBowmOfe.js";
|
|
10
|
+
import { t as u } from "./Switch-C4NU-me1.js";
|
|
11
|
+
import { n as d } from "./schema-CtWwGbqJ.js";
|
|
12
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
|
+
import { MIXED as h, asNodeId as g, isBuiltinToolPref as _ } from "@weasel-js/core";
|
|
14
|
+
import { Fragment as v, useState as y, useSyncExternalStore as b } from "react";
|
|
14
15
|
//#region src/components/SelectionPanel/model.ts
|
|
15
|
-
function
|
|
16
|
+
function x(e, t) {
|
|
16
17
|
if (e.kind === "container") return "group";
|
|
17
18
|
for (let n of t) if (n.matches(e.data)) return n.name;
|
|
18
19
|
return "unknown";
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function S(e) {
|
|
21
22
|
return !("kind" in e);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
+
function C(e) {
|
|
24
25
|
let t = [], n = [], r = (e, t) => {
|
|
25
|
-
for (let [n, i] of Object.entries(e.children))
|
|
26
|
+
for (let [n, i] of Object.entries(e.children)) S(i) ? r(i, t) : t.push({
|
|
26
27
|
path: n,
|
|
27
28
|
leaf: i
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
|
-
for (let [i, a] of Object.entries(e.children)) if (
|
|
31
|
+
for (let [i, a] of Object.entries(e.children)) if (S(a)) {
|
|
31
32
|
let e = [];
|
|
32
33
|
r(a, e), t.push({
|
|
33
34
|
key: i,
|
|
34
35
|
name: a.name,
|
|
35
|
-
rows:
|
|
36
|
+
rows: w(e)
|
|
36
37
|
});
|
|
37
38
|
} else n.push({
|
|
38
39
|
path: i,
|
|
@@ -41,10 +42,10 @@ function S(e) {
|
|
|
41
42
|
return n.length > 0 && t.unshift({
|
|
42
43
|
key: "",
|
|
43
44
|
name: "",
|
|
44
|
-
rows:
|
|
45
|
+
rows: w(n)
|
|
45
46
|
}), t;
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function w(e) {
|
|
48
49
|
let t = [];
|
|
49
50
|
for (let n of e) {
|
|
50
51
|
let e = n.leaf.pair, r = t[t.length - 1];
|
|
@@ -55,14 +56,14 @@ function C(e) {
|
|
|
55
56
|
}
|
|
56
57
|
return t;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function T(e, t) {
|
|
59
60
|
let n = [...new Set(e)];
|
|
60
61
|
if (n.length === 0) return [];
|
|
61
62
|
let r = new Map(t.map((e) => [e.name, e])), i = n.map((e) => r.get(e)?.schema);
|
|
62
63
|
if (i.some((e) => e === void 0)) return [];
|
|
63
|
-
let [a, ...o] = i, s =
|
|
64
|
+
let [a, ...o] = i, s = C(a);
|
|
64
65
|
if (o.length === 0) return s;
|
|
65
|
-
let c = (e) => `${e.path}\0${e.leaf.kind}`, l = o.map((e) => new Set(
|
|
66
|
+
let c = (e) => `${e.path}\0${e.leaf.kind}`, l = o.map((e) => new Set(C(e).flatMap((e) => e.rows).flatMap((e) => e.leaves).map(c))), u = (e) => l.every((t) => t.has(c(e)));
|
|
66
67
|
return s.map((e) => ({
|
|
67
68
|
...e,
|
|
68
69
|
rows: e.rows.map((e) => ({
|
|
@@ -71,7 +72,7 @@ function w(e, t) {
|
|
|
71
72
|
})).filter((e) => e.leaves.length > 0)
|
|
72
73
|
})).filter((e) => e.rows.length > 0);
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function E(e, t) {
|
|
75
76
|
let n = t.split(".");
|
|
76
77
|
if (n.length < 2) return;
|
|
77
78
|
let r = n[0], i = r === "pose" ? e.pose : r === "data" ? e.data : void 0;
|
|
@@ -81,33 +82,33 @@ function T(e, t) {
|
|
|
81
82
|
}
|
|
82
83
|
return i;
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function D(e, t, n) {
|
|
85
86
|
let [r, ...i] = t;
|
|
86
87
|
if (i.length === 0) return Array.isArray(e) ? Object.assign([...e], { [r]: n }) : {
|
|
87
88
|
...e,
|
|
88
89
|
[r]: n
|
|
89
90
|
};
|
|
90
|
-
let a = e[r], o =
|
|
91
|
+
let a = e[r], o = D(Array.isArray(a) ? [...a] : typeof a == "object" && a ? { ...a } : {}, i, n);
|
|
91
92
|
return Array.isArray(e) ? Object.assign([...e], { [r]: o }) : {
|
|
92
93
|
...e,
|
|
93
94
|
[r]: o
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
+
function O(e, t) {
|
|
97
98
|
let n, r = !0;
|
|
98
99
|
for (let i of e) {
|
|
99
|
-
let e =
|
|
100
|
+
let e = E(i, t);
|
|
100
101
|
if (r) n = e, r = !1;
|
|
101
|
-
else if (!Object.is(e, n)) return
|
|
102
|
+
else if (!Object.is(e, n)) return h;
|
|
102
103
|
}
|
|
103
104
|
return n;
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function k(e) {
|
|
106
107
|
let t = /* @__PURE__ */ new Map();
|
|
107
108
|
for (let n of e) t.set(n, (t.get(n) ?? 0) + 1);
|
|
108
109
|
return [...t.entries()].map(([e, t]) => t > 1 ? `${e} ×${t}` : e).join(" · ");
|
|
109
110
|
}
|
|
110
|
-
var
|
|
111
|
+
var A = {
|
|
111
112
|
root: "_root_q9h3j_1",
|
|
112
113
|
header: "_header_q9h3j_8",
|
|
113
114
|
kind: "_kind_q9h3j_16",
|
|
@@ -130,71 +131,71 @@ var k = {
|
|
|
130
131
|
objectGroup: "_objectGroup_q9h3j_146",
|
|
131
132
|
slider: "_slider_q9h3j_153",
|
|
132
133
|
sliderReadout: "_sliderReadout_q9h3j_157"
|
|
133
|
-
},
|
|
134
|
-
function
|
|
135
|
-
let { scene: t, selection: n, properties: r, routing: i, renderers: a, kindLabel: o =
|
|
136
|
-
|
|
137
|
-
let l = n.current.map((e) => t.get(
|
|
138
|
-
if (l.length === 0) return /* @__PURE__ */
|
|
139
|
-
className: [
|
|
134
|
+
}, j = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1);
|
|
135
|
+
function M(e) {
|
|
136
|
+
let { scene: t, selection: n, properties: r, routing: i, renderers: a, kindLabel: o = j, emptyState: s = null, className: c } = e;
|
|
137
|
+
b(t.subscribe, t.getVersion, t.getVersion);
|
|
138
|
+
let l = n.current.map((e) => t.get(g(e))).filter((e) => e != null), u = l.map((e) => x(e, i)), d = l.map((e) => e.id).join(","), h = T(u, r);
|
|
139
|
+
if (l.length === 0) return /* @__PURE__ */ p("div", {
|
|
140
|
+
className: [A.root, c].filter(Boolean).join(" "),
|
|
140
141
|
children: s
|
|
141
142
|
});
|
|
142
|
-
let
|
|
143
|
+
let _ = (e, r) => {
|
|
143
144
|
let [i, ...a] = e.path.split(".");
|
|
144
145
|
if (a.length === 0) return;
|
|
145
|
-
let o = n.current.map(
|
|
146
|
+
let o = n.current.map(g);
|
|
146
147
|
t.batch(`Edit ${e.leaf.name}`, () => {
|
|
147
148
|
for (let e of o) {
|
|
148
149
|
let n = t.get(e);
|
|
149
|
-
n && (i === "pose" ? t.setPose(e,
|
|
150
|
+
n && (i === "pose" ? t.setPose(e, D(n.pose, a, r)) : i === "data" && t.update(e, { data: D(n.data, a, r) }));
|
|
150
151
|
}
|
|
151
152
|
});
|
|
152
153
|
};
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
-
className: [
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children: l.length === 1 ? /* @__PURE__ */
|
|
158
|
-
className:
|
|
154
|
+
return /* @__PURE__ */ m("div", {
|
|
155
|
+
className: [A.root, c].filter(Boolean).join(" "),
|
|
156
|
+
children: [/* @__PURE__ */ p("header", {
|
|
157
|
+
className: A.header,
|
|
158
|
+
children: l.length === 1 ? /* @__PURE__ */ p("span", {
|
|
159
|
+
className: A.kind,
|
|
159
160
|
children: o(u[0])
|
|
160
|
-
}) : /* @__PURE__ */
|
|
161
|
-
className:
|
|
161
|
+
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("span", {
|
|
162
|
+
className: A.kind,
|
|
162
163
|
children: [l.length, " selected"]
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
-
className:
|
|
165
|
-
children:
|
|
164
|
+
}), /* @__PURE__ */ p("span", {
|
|
165
|
+
className: A.breakdown,
|
|
166
|
+
children: k(u)
|
|
166
167
|
})] })
|
|
167
|
-
}),
|
|
168
|
+
}), h.map((e) => {
|
|
168
169
|
let t = e.rows.map((e) => ({
|
|
169
170
|
row: e,
|
|
170
|
-
controls:
|
|
171
|
+
controls: F(e.leaves.map((t) => N(t, e.leaves.length > 1 ? `${e.label} ${t.leaf.name}` : t.leaf.name, l, a, _, d)), a)
|
|
171
172
|
})).filter(({ controls: e }) => e.length > 0);
|
|
172
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
173
|
-
className:
|
|
174
|
-
children: [e.name !== "" && /* @__PURE__ */
|
|
175
|
-
className:
|
|
173
|
+
return t.length === 0 ? null : /* @__PURE__ */ m("section", {
|
|
174
|
+
className: A.section,
|
|
175
|
+
children: [e.name !== "" && /* @__PURE__ */ p("h3", {
|
|
176
|
+
className: A.sectionTitle,
|
|
176
177
|
children: e.name
|
|
177
|
-
}), t.map(({ row: t, controls: n }) => t.leaves.length === 1 && t.leaves[0].leaf.block ? /* @__PURE__ */
|
|
178
|
-
className:
|
|
178
|
+
}), t.map(({ row: t, controls: n }) => t.leaves.length === 1 && t.leaves[0].leaf.block ? /* @__PURE__ */ m("div", { children: [e.name === "" && t.leaves[0].leaf.kind !== "object" && /* @__PURE__ */ p("h4", {
|
|
179
|
+
className: A.sectionTitle,
|
|
179
180
|
title: t.leaves[0].leaf.description,
|
|
180
181
|
children: t.leaves[0].leaf.name
|
|
181
|
-
}), n[0].content] }, t.leaves[0].path) : /* @__PURE__ */
|
|
182
|
-
className:
|
|
183
|
-
children: [/* @__PURE__ */
|
|
184
|
-
className:
|
|
182
|
+
}), n[0].content] }, t.leaves[0].path) : /* @__PURE__ */ m("div", {
|
|
183
|
+
className: A.row,
|
|
184
|
+
children: [/* @__PURE__ */ p("span", {
|
|
185
|
+
className: A.rowLabel,
|
|
185
186
|
title: t.leaves[0].leaf.description,
|
|
186
187
|
children: t.label
|
|
187
|
-
}), /* @__PURE__ */
|
|
188
|
-
className:
|
|
189
|
-
children: n.map(({ key: e, content: t }) => /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ p("span", {
|
|
189
|
+
className: A.rowControls,
|
|
190
|
+
children: n.map(({ key: e, content: t }) => /* @__PURE__ */ p(v, { children: t }, e))
|
|
190
191
|
})]
|
|
191
192
|
}, t.leaves[0].path))]
|
|
192
193
|
}, e.key);
|
|
193
194
|
})]
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
-
let { path: o, leaf: s } = e, c =
|
|
197
|
+
function N(e, t, n, r, i, a) {
|
|
198
|
+
let { path: o, leaf: s } = e, c = O(n, o), l = c === h, u = {
|
|
198
199
|
path: o,
|
|
199
200
|
pref: s,
|
|
200
201
|
value: l ? void 0 : c,
|
|
@@ -202,8 +203,8 @@ function M(e, t, n, r, i, a) {
|
|
|
202
203
|
unset: !l && c === void 0,
|
|
203
204
|
setValue: (t) => i(e, t),
|
|
204
205
|
valueAt: (e) => {
|
|
205
|
-
let t =
|
|
206
|
-
return t ===
|
|
206
|
+
let t = O(n, e);
|
|
207
|
+
return t === h ? {
|
|
207
208
|
value: void 0,
|
|
208
209
|
mixed: !0
|
|
209
210
|
} : {
|
|
@@ -219,19 +220,19 @@ function M(e, t, n, r, i, a) {
|
|
|
219
220
|
ariaLabel: t,
|
|
220
221
|
render: () => {
|
|
221
222
|
let e = r?.[o] ?? r?.[s.kind];
|
|
222
|
-
return e ? e(u) :
|
|
223
|
+
return e ? e(u) : L(u, t, r, a);
|
|
223
224
|
}
|
|
224
225
|
};
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function P(e, t) {
|
|
227
228
|
let { leaf: n } = e;
|
|
228
229
|
return n.kind === "boolean" && n.control === "toggle" && n.pair !== void 0 && t?.[e.ctx.path] === void 0 && t?.[n.kind] === void 0;
|
|
229
230
|
}
|
|
230
|
-
function
|
|
231
|
+
function F(e, t) {
|
|
231
232
|
let n = [];
|
|
232
233
|
for (let r = 0; r < e.length;) {
|
|
233
234
|
let i = e[r];
|
|
234
|
-
if (!
|
|
235
|
+
if (!P(i, t)) {
|
|
235
236
|
let e = i.render();
|
|
236
237
|
e != null && n.push({
|
|
237
238
|
key: i.key,
|
|
@@ -242,13 +243,13 @@ function P(e, t) {
|
|
|
242
243
|
continue;
|
|
243
244
|
}
|
|
244
245
|
let a = r + 1;
|
|
245
|
-
for (; a < e.length &&
|
|
246
|
+
for (; a < e.length && P(e[a], t) && e[a].leaf.pair === i.leaf.pair;) a += 1;
|
|
246
247
|
let o = e.slice(r, a);
|
|
247
248
|
n.push({
|
|
248
249
|
key: i.key,
|
|
249
250
|
leaf: i.leaf,
|
|
250
251
|
block: o.every((e) => e.leaf.block === !0),
|
|
251
|
-
content: /* @__PURE__ */
|
|
252
|
+
content: /* @__PURE__ */ p(I, {
|
|
252
253
|
run: o,
|
|
253
254
|
ariaLabel: i.leaf.pair
|
|
254
255
|
})
|
|
@@ -256,19 +257,19 @@ function P(e, t) {
|
|
|
256
257
|
}
|
|
257
258
|
return n;
|
|
258
259
|
}
|
|
259
|
-
function
|
|
260
|
+
function I({ run: r, ariaLabel: i }) {
|
|
260
261
|
let a = r.filter((e) => e.ctx.value === !0).map((e) => e.key);
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ p(n, {
|
|
262
263
|
mode: "multiple",
|
|
263
264
|
size: "sm",
|
|
264
265
|
variant: "flat",
|
|
265
|
-
className:
|
|
266
|
+
className: A.flagToggle,
|
|
266
267
|
ariaLabel: i,
|
|
267
268
|
items: r.map((n) => {
|
|
268
269
|
let r = n.leaf;
|
|
269
270
|
return {
|
|
270
271
|
value: n.key,
|
|
271
|
-
label: r.icon && r.icon in e ? /* @__PURE__ */
|
|
272
|
+
label: r.icon && r.icon in e ? /* @__PURE__ */ p(t, {
|
|
272
273
|
name: r.icon,
|
|
273
274
|
size: 14
|
|
274
275
|
}) : r.short ?? r.name.slice(0, 1),
|
|
@@ -285,117 +286,117 @@ function F({ run: r, ariaLabel: i }) {
|
|
|
285
286
|
}
|
|
286
287
|
});
|
|
287
288
|
}
|
|
288
|
-
function
|
|
289
|
-
let { pref:
|
|
290
|
-
if (
|
|
291
|
-
let e =
|
|
292
|
-
return /* @__PURE__ */
|
|
293
|
-
className:
|
|
294
|
-
value:
|
|
295
|
-
mixed:
|
|
296
|
-
onChange:
|
|
289
|
+
function L(c, h, g, v = "", y = !1) {
|
|
290
|
+
let { pref: b, value: x, mixed: S, unset: C, setValue: w } = c;
|
|
291
|
+
if (b.kind === "font-family") {
|
|
292
|
+
let e = c.valueAt("data.style.fontWeight"), t = c.valueAt("data.style.fontStyle");
|
|
293
|
+
return /* @__PURE__ */ p(s, {
|
|
294
|
+
className: A.select,
|
|
295
|
+
value: S || typeof x != "string" ? void 0 : x,
|
|
296
|
+
mixed: S,
|
|
297
|
+
onChange: w,
|
|
297
298
|
weight: typeof e.value == "number" ? e.value : void 0,
|
|
298
299
|
fontStyle: t.value === "italic" ? "italic" : void 0,
|
|
299
|
-
"aria-label":
|
|
300
|
+
"aria-label": h
|
|
300
301
|
});
|
|
301
302
|
}
|
|
302
|
-
if (!
|
|
303
|
-
className:
|
|
303
|
+
if (!_(b)) return /* @__PURE__ */ m("span", {
|
|
304
|
+
className: A.unrenderable,
|
|
304
305
|
children: [
|
|
305
306
|
"(",
|
|
306
|
-
|
|
307
|
+
b.kind,
|
|
307
308
|
": no renderer)"
|
|
308
309
|
]
|
|
309
310
|
});
|
|
310
|
-
switch (
|
|
311
|
+
switch (b.kind) {
|
|
311
312
|
case "number": {
|
|
312
|
-
let e =
|
|
313
|
+
let e = b, t = typeof x == "number" && Number.isFinite(x) ? x : void 0, n = t === void 0 ? NaN : e.unit ? e.unit.toDisplay(t) : t, i = d(e);
|
|
313
314
|
if (e.control === "slider") {
|
|
314
|
-
let
|
|
315
|
-
return /* @__PURE__ */
|
|
316
|
-
min:
|
|
317
|
-
max:
|
|
318
|
-
step:
|
|
319
|
-
value:
|
|
320
|
-
disabled:
|
|
321
|
-
className:
|
|
322
|
-
"aria-label":
|
|
315
|
+
let a = i.min ?? 0, o = i.max ?? 100, s = !S && t !== void 0;
|
|
316
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(r, {
|
|
317
|
+
min: a,
|
|
318
|
+
max: o,
|
|
319
|
+
step: i.step,
|
|
320
|
+
value: s ? Math.min(Math.max(n, a), o) : a,
|
|
321
|
+
disabled: S,
|
|
322
|
+
className: A.slider,
|
|
323
|
+
"aria-label": h,
|
|
323
324
|
onChange: (t) => {
|
|
324
325
|
let n = Number(t.target.value);
|
|
325
|
-
|
|
326
|
+
w(e.unit ? e.unit.fromDisplay(n) : n);
|
|
326
327
|
}
|
|
327
|
-
}), /* @__PURE__ */
|
|
328
|
-
className:
|
|
328
|
+
}), /* @__PURE__ */ p("span", {
|
|
329
|
+
className: A.sliderReadout,
|
|
329
330
|
"aria-hidden": "true",
|
|
330
|
-
children:
|
|
331
|
+
children: s ? `${n}${e.unit?.suffix ?? ""}` : "—"
|
|
331
332
|
})] });
|
|
332
333
|
}
|
|
333
|
-
let
|
|
334
|
-
className:
|
|
335
|
-
value:
|
|
336
|
-
placeholder:
|
|
337
|
-
minValue:
|
|
338
|
-
maxValue:
|
|
339
|
-
step:
|
|
334
|
+
let a = /* @__PURE__ */ p(l, {
|
|
335
|
+
className: A.number,
|
|
336
|
+
value: S || t === void 0 ? NaN : n,
|
|
337
|
+
placeholder: S ? "Mixed" : void 0,
|
|
338
|
+
minValue: i.min,
|
|
339
|
+
maxValue: i.max,
|
|
340
|
+
step: i.step,
|
|
340
341
|
hideSteppers: !0,
|
|
341
|
-
"aria-label":
|
|
342
|
+
"aria-label": h,
|
|
342
343
|
onChange: (t) => {
|
|
343
|
-
Number.isNaN(t) ||
|
|
344
|
+
Number.isNaN(t) || w(e.unit ? e.unit.fromDisplay(t) : t);
|
|
344
345
|
}
|
|
345
346
|
});
|
|
346
|
-
return e.unit?.suffix === void 0 ?
|
|
347
|
-
className:
|
|
347
|
+
return e.unit?.suffix === void 0 ? a : /* @__PURE__ */ m(f, { children: [a, /* @__PURE__ */ p("span", {
|
|
348
|
+
className: A.unitSuffix,
|
|
348
349
|
"aria-hidden": "true",
|
|
349
350
|
children: e.unit.suffix
|
|
350
351
|
})] });
|
|
351
352
|
}
|
|
352
|
-
case "string": return /* @__PURE__ */
|
|
353
|
-
text:
|
|
354
|
-
placeholder:
|
|
355
|
-
ariaLabel:
|
|
356
|
-
onCommit:
|
|
353
|
+
case "string": return /* @__PURE__ */ p(z, {
|
|
354
|
+
text: S ? void 0 : typeof x == "string" ? x : "",
|
|
355
|
+
placeholder: S ? "Mixed" : void 0,
|
|
356
|
+
ariaLabel: h,
|
|
357
|
+
onCommit: w
|
|
357
358
|
});
|
|
358
359
|
case "boolean": {
|
|
359
|
-
let r =
|
|
360
|
-
if (r.control === "toggle") return /* @__PURE__ */
|
|
360
|
+
let r = b;
|
|
361
|
+
if (r.control === "toggle") return /* @__PURE__ */ p(n, {
|
|
361
362
|
mode: "multiple",
|
|
362
363
|
size: "sm",
|
|
363
364
|
variant: "flat",
|
|
364
|
-
className:
|
|
365
|
-
ariaLabel:
|
|
365
|
+
className: A.flagToggle,
|
|
366
|
+
ariaLabel: h,
|
|
366
367
|
items: [{
|
|
367
|
-
value:
|
|
368
|
-
label: r.icon && r.icon in e ? /* @__PURE__ */
|
|
368
|
+
value: c.path,
|
|
369
|
+
label: r.icon && r.icon in e ? /* @__PURE__ */ p(t, {
|
|
369
370
|
name: r.icon,
|
|
370
371
|
size: 14
|
|
371
372
|
}) : r.short ?? r.name.slice(0, 1),
|
|
372
|
-
ariaLabel:
|
|
373
|
+
ariaLabel: h
|
|
373
374
|
}],
|
|
374
|
-
value:
|
|
375
|
-
mixedValues:
|
|
376
|
-
onChange: (e) =>
|
|
375
|
+
value: x === !0 ? [c.path] : [],
|
|
376
|
+
mixedValues: S ? [c.path] : [],
|
|
377
|
+
onChange: (e) => w(e.includes(c.path))
|
|
377
378
|
});
|
|
378
|
-
let i = /* @__PURE__ */
|
|
379
|
-
isSelected: !!
|
|
380
|
-
onChange:
|
|
381
|
-
"aria-label":
|
|
379
|
+
let i = /* @__PURE__ */ p(u, {
|
|
380
|
+
isSelected: !!x,
|
|
381
|
+
onChange: w,
|
|
382
|
+
"aria-label": h
|
|
382
383
|
});
|
|
383
|
-
return !
|
|
384
|
-
className:
|
|
385
|
-
title:
|
|
384
|
+
return !S && !C ? i : /* @__PURE__ */ p("span", {
|
|
385
|
+
className: A.mixedSwitch,
|
|
386
|
+
title: S ? "Mixed" : "Not set",
|
|
386
387
|
children: i
|
|
387
388
|
});
|
|
388
389
|
}
|
|
389
390
|
case "enum": {
|
|
390
|
-
let r =
|
|
391
|
-
return r.control === "toggle" ? /* @__PURE__ */
|
|
391
|
+
let r = b, i = r.encoding ? S ? void 0 : r.encoding.read(x, c.siblings) : S || C ? void 0 : typeof x == "string" ? x : r.default, a = (e) => w(r.encoding ? r.encoding.write(e, c.siblings) : e);
|
|
392
|
+
return r.control === "toggle" ? /* @__PURE__ */ p(n, {
|
|
392
393
|
size: "sm",
|
|
393
394
|
variant: "flat",
|
|
394
|
-
className:
|
|
395
|
-
ariaLabel:
|
|
395
|
+
className: A.toggle,
|
|
396
|
+
ariaLabel: h,
|
|
396
397
|
items: r.options.map((n) => ({
|
|
397
398
|
value: n.value,
|
|
398
|
-
label: n.icon && n.icon in e ? /* @__PURE__ */
|
|
399
|
+
label: n.icon && n.icon in e ? /* @__PURE__ */ p(t, {
|
|
399
400
|
name: n.icon,
|
|
400
401
|
size: 14
|
|
401
402
|
}) : n.short ?? n.label,
|
|
@@ -406,52 +407,52 @@ function I(o, m, h, _ = "", v = !1) {
|
|
|
406
407
|
onChange: (e) => {
|
|
407
408
|
e !== null && a(e);
|
|
408
409
|
}
|
|
409
|
-
}) : /* @__PURE__ */
|
|
410
|
-
className:
|
|
410
|
+
}) : /* @__PURE__ */ p(o, {
|
|
411
|
+
className: A.select,
|
|
411
412
|
options: r.options.map((e) => ({
|
|
412
413
|
value: e.value,
|
|
413
414
|
label: e.label,
|
|
414
415
|
isDisabled: e.disabled
|
|
415
416
|
})),
|
|
416
417
|
selectedKey: i ?? null,
|
|
417
|
-
placeholder:
|
|
418
|
+
placeholder: S ? "Mixed" : C ? "—" : void 0,
|
|
418
419
|
onSelectionChange: a,
|
|
419
|
-
"aria-label":
|
|
420
|
+
"aria-label": h
|
|
420
421
|
});
|
|
421
422
|
}
|
|
422
423
|
case "color": {
|
|
423
|
-
let e =
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
value:
|
|
426
|
-
mixed:
|
|
424
|
+
let e = b;
|
|
425
|
+
return /* @__PURE__ */ p(i, {
|
|
426
|
+
value: S ? void 0 : typeof x == "string" ? x : e.default,
|
|
427
|
+
mixed: S,
|
|
427
428
|
alpha: e.alpha,
|
|
428
|
-
onChange:
|
|
429
|
-
"aria-label":
|
|
429
|
+
onChange: w,
|
|
430
|
+
"aria-label": h
|
|
430
431
|
});
|
|
431
432
|
}
|
|
432
|
-
case "paint": return /* @__PURE__ */
|
|
433
|
-
value:
|
|
434
|
-
mixed:
|
|
435
|
-
unset:
|
|
436
|
-
allowNone: !
|
|
437
|
-
onChange:
|
|
438
|
-
"aria-label":
|
|
439
|
-
},
|
|
440
|
-
case "object": return /* @__PURE__ */
|
|
441
|
-
ctx:
|
|
442
|
-
renderers:
|
|
443
|
-
selectionKey:
|
|
433
|
+
case "paint": return /* @__PURE__ */ p(a, {
|
|
434
|
+
value: x === null ? null : x ?? (S ? void 0 : b.default),
|
|
435
|
+
mixed: S,
|
|
436
|
+
unset: C,
|
|
437
|
+
allowNone: !y,
|
|
438
|
+
onChange: w,
|
|
439
|
+
"aria-label": h
|
|
440
|
+
}, v);
|
|
441
|
+
case "object": return /* @__PURE__ */ p(R, {
|
|
442
|
+
ctx: c,
|
|
443
|
+
renderers: g,
|
|
444
|
+
selectionKey: v
|
|
444
445
|
});
|
|
445
|
-
default: throw Error(`SelectionPanel: no control for built-in pref kind "${
|
|
446
|
+
default: throw Error(`SelectionPanel: no control for built-in pref kind "${b.kind}"`);
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
|
-
function
|
|
449
|
+
function R({ ctx: n, renderers: r, selectionKey: i = "" }) {
|
|
449
450
|
let a = n.pref, o = typeof n.value == "object" && n.value !== null ? n.value : void 0, s = Object.values(a.children).every((e) => !("kind" in e)), c = (s, l) => {
|
|
450
|
-
let u = [], d = (e) => typeof e == "object" && !!e && "controls" in e,
|
|
451
|
-
for (let { key: e, leaf: t, block: n, content: i } of
|
|
451
|
+
let u = [], d = (e) => typeof e == "object" && !!e && "controls" in e, f = [], h = () => {
|
|
452
|
+
for (let { key: e, leaf: t, block: n, content: i } of F(f, r)) {
|
|
452
453
|
let r = u[u.length - 1];
|
|
453
454
|
if (t.pair !== void 0 && d(r) && r.pair === t.pair) {
|
|
454
|
-
r.controls.push(/* @__PURE__ */
|
|
455
|
+
r.controls.push(/* @__PURE__ */ p(v, { children: i }, e)), r.block &&= n;
|
|
455
456
|
continue;
|
|
456
457
|
}
|
|
457
458
|
u.push({
|
|
@@ -460,19 +461,19 @@ function L({ ctx: n, renderers: r, selectionKey: i = "" }) {
|
|
|
460
461
|
label: t.pair ?? t.name,
|
|
461
462
|
title: t.description,
|
|
462
463
|
block: n,
|
|
463
|
-
controls: [/* @__PURE__ */
|
|
464
|
+
controls: [/* @__PURE__ */ p(v, { children: i }, e)]
|
|
464
465
|
});
|
|
465
466
|
}
|
|
466
|
-
|
|
467
|
+
f = [];
|
|
467
468
|
};
|
|
468
469
|
for (let [d, g] of Object.entries(s)) {
|
|
469
470
|
if (!("kind" in g)) {
|
|
470
471
|
let e = g.name !== "", t = c(g.children, e);
|
|
471
472
|
if (t.length === 0) continue;
|
|
472
|
-
h(), u.push(/* @__PURE__ */
|
|
473
|
-
className: e && l ?
|
|
474
|
-
children: [e && /* @__PURE__ */
|
|
475
|
-
className:
|
|
473
|
+
h(), u.push(/* @__PURE__ */ m("div", {
|
|
474
|
+
className: e && l ? A.objectGroup : void 0,
|
|
475
|
+
children: [e && /* @__PURE__ */ p("h5", {
|
|
476
|
+
className: A.sectionTitle,
|
|
476
477
|
children: g.name
|
|
477
478
|
}), t]
|
|
478
479
|
}, `group:${d}`));
|
|
@@ -499,16 +500,16 @@ function L({ ctx: n, renderers: r, selectionKey: i = "" }) {
|
|
|
499
500
|
});
|
|
500
501
|
}
|
|
501
502
|
};
|
|
502
|
-
|
|
503
|
+
f.push({
|
|
503
504
|
key: s,
|
|
504
505
|
leaf: g,
|
|
505
506
|
ctx: _,
|
|
506
507
|
ariaLabel: g.name,
|
|
507
508
|
render: () => {
|
|
508
|
-
let n = r?.[s] ?? r?.[g.kind], a = n ? n(_) :
|
|
509
|
-
return a == null ? null : (g.pair !== void 0 || g.block === !0) && g.icon && g.icon in e ? /* @__PURE__ */
|
|
510
|
-
className:
|
|
511
|
-
children: [/* @__PURE__ */
|
|
509
|
+
let n = r?.[s] ?? r?.[g.kind], a = n ? n(_) : L(_, g.name, r, i, !0);
|
|
510
|
+
return a == null ? null : (g.pair !== void 0 || g.block === !0) && g.icon && g.icon in e ? /* @__PURE__ */ m("span", {
|
|
511
|
+
className: A.namedField,
|
|
512
|
+
children: [/* @__PURE__ */ p(t, {
|
|
512
513
|
name: g.icon,
|
|
513
514
|
size: 14
|
|
514
515
|
}), a]
|
|
@@ -516,33 +517,33 @@ function L({ ctx: n, renderers: r, selectionKey: i = "" }) {
|
|
|
516
517
|
}
|
|
517
518
|
});
|
|
518
519
|
}
|
|
519
|
-
return h(), u.map((e) => typeof e == "object" && e && "controls" in e ? e.block ? /* @__PURE__ */
|
|
520
|
-
className: `${
|
|
520
|
+
return h(), u.map((e) => typeof e == "object" && e && "controls" in e ? e.block ? /* @__PURE__ */ p("div", {
|
|
521
|
+
className: `${A.rowControls} ${A.blockRow}`,
|
|
521
522
|
title: e.title,
|
|
522
523
|
children: e.controls
|
|
523
|
-
}, e.key) : /* @__PURE__ */
|
|
524
|
-
className:
|
|
525
|
-
children: [/* @__PURE__ */
|
|
526
|
-
className:
|
|
524
|
+
}, e.key) : /* @__PURE__ */ m("div", {
|
|
525
|
+
className: A.row,
|
|
526
|
+
children: [/* @__PURE__ */ p("span", {
|
|
527
|
+
className: A.rowLabel,
|
|
527
528
|
title: e.title,
|
|
528
529
|
children: e.label
|
|
529
|
-
}), /* @__PURE__ */
|
|
530
|
-
className:
|
|
530
|
+
}), /* @__PURE__ */ p("span", {
|
|
531
|
+
className: A.rowControls,
|
|
531
532
|
children: e.controls
|
|
532
533
|
})]
|
|
533
534
|
}, e.key) : e);
|
|
534
535
|
}, l = c(a.children, !s);
|
|
535
|
-
return l.length === 0 ? null : /* @__PURE__ */
|
|
536
|
-
className:
|
|
537
|
-
children: [!s && /* @__PURE__ */
|
|
538
|
-
className:
|
|
536
|
+
return l.length === 0 ? null : /* @__PURE__ */ m("div", {
|
|
537
|
+
className: A.objectLeaf,
|
|
538
|
+
children: [!s && /* @__PURE__ */ p("h4", {
|
|
539
|
+
className: A.sectionTitle,
|
|
539
540
|
children: a.name
|
|
540
541
|
}), l]
|
|
541
542
|
});
|
|
542
543
|
}
|
|
543
|
-
function
|
|
544
|
-
let [i, a] =
|
|
545
|
-
return /* @__PURE__ */
|
|
544
|
+
function z({ text: e, placeholder: t, ariaLabel: n, onCommit: r }) {
|
|
545
|
+
let [i, a] = y(null);
|
|
546
|
+
return /* @__PURE__ */ p(c, {
|
|
546
547
|
value: i ?? e ?? "",
|
|
547
548
|
placeholder: t,
|
|
548
549
|
"aria-label": n,
|
|
@@ -556,6 +557,6 @@ function R({ text: e, placeholder: t, ariaLabel: n, onCommit: r }) {
|
|
|
556
557
|
});
|
|
557
558
|
}
|
|
558
559
|
//#endregion
|
|
559
|
-
export {
|
|
560
|
+
export { T as a, D as c, x as i, h as n, k as o, O as r, E as s, M as t };
|
|
560
561
|
|
|
561
|
-
//# sourceMappingURL=SelectionPanel-
|
|
562
|
+
//# sourceMappingURL=SelectionPanel-BWXU8BqW.js.map
|