@weasel-js/ui 1.5.1 → 1.5.2
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-GZdcfdQL.js → ActionBar-CLwiY3Jg.js} +5 -5
- package/dist/chunks/ActionBar-CLwiY3Jg.js.map +1 -0
- package/dist/chunks/{ActionsBar-Fhx_40iP.js → ActionsBar-D84a4eGy.js} +2 -2
- package/dist/chunks/{ActionsBar-Fhx_40iP.js.map → ActionsBar-D84a4eGy.js.map} +1 -1
- package/dist/chunks/{Badge-Bf8Rd1R6.js → Badge-CW9pBPFl.js} +5 -5
- package/dist/chunks/Badge-CW9pBPFl.js.map +1 -0
- package/dist/chunks/{BandEditor-D8I5Uun-.js → BandEditor-jY-PFKY6.js} +12 -12
- package/dist/chunks/BandEditor-jY-PFKY6.js.map +1 -0
- package/dist/chunks/{Button-CExdkQcU.js → Button-DRSApvnK.js} +15 -15
- package/dist/chunks/Button-DRSApvnK.js.map +1 -0
- package/dist/chunks/{Callout-cx5_CWcW.js → Callout-DrNu-9Qr.js} +12 -12
- package/dist/chunks/Callout-DrNu-9Qr.js.map +1 -0
- package/dist/chunks/{Checkbox-BZZsPaVF.js → Checkbox-BOsDAY2F.js} +5 -5
- package/dist/chunks/Checkbox-BOsDAY2F.js.map +1 -0
- package/dist/chunks/{ColorField-YVf8irfr.js → ColorField-BYzgZM9o.js} +6 -6
- package/dist/chunks/ColorField-BYzgZM9o.js.map +1 -0
- package/dist/chunks/{ComboBox-D57tNYDD.js → ComboBox-Cz3f0Y_8.js} +13 -13
- package/dist/chunks/ComboBox-Cz3f0Y_8.js.map +1 -0
- package/dist/chunks/{CurveEditor-BXiMoN9d.js → CurveEditor-DXwSP-iA.js} +2 -2
- package/dist/chunks/{CurveEditor-BXiMoN9d.js.map → CurveEditor-DXwSP-iA.js.map} +1 -1
- package/dist/chunks/{DataGrid-BVdDMZkQ.js → DataGrid-C8KrYtw7.js} +11 -11
- package/dist/chunks/DataGrid-C8KrYtw7.js.map +1 -0
- package/dist/chunks/{DetentSlider-BWNSv07Z.js → DetentSlider-CAubVX0J.js} +2 -2
- package/dist/chunks/{DetentSlider-BWNSv07Z.js.map → DetentSlider-CAubVX0J.js.map} +1 -1
- package/dist/chunks/{Dialog-DuOzsR2g.js → Dialog-fGqqQ6o_.js} +9 -9
- package/dist/chunks/Dialog-fGqqQ6o_.js.map +1 -0
- package/dist/chunks/{Disclosure-9UgDzc7Z.js → Disclosure-CILDfWsU.js} +6 -6
- package/dist/chunks/Disclosure-CILDfWsU.js.map +1 -0
- package/dist/chunks/{Field-BNqvUJfg.js → Field-DWnV8WZY.js} +6 -6
- package/dist/chunks/Field-DWnV8WZY.js.map +1 -0
- package/dist/chunks/{FontFamilySelect-CO19kyOO.js → FontFamilySelect-DxfgTC3G.js} +2 -2
- package/dist/chunks/{FontFamilySelect-CO19kyOO.js.map → FontFamilySelect-DxfgTC3G.js.map} +1 -1
- package/dist/chunks/{GradientEditor-B_ymIr4Q.js → GradientEditor-rRBmf3G0.js} +7 -7
- package/dist/chunks/GradientEditor-rRBmf3G0.js.map +1 -0
- package/dist/chunks/{Icon-QhLhaGFe.js → Icon-DT0x6HaQ.js} +23 -2
- package/dist/chunks/Icon-DT0x6HaQ.js.map +1 -0
- package/dist/chunks/{Input-B9Vh7ASP.js → Input-DbMKpkXy.js} +5 -5
- package/dist/chunks/Input-DbMKpkXy.js.map +1 -0
- package/dist/chunks/{ItemList-BZJQReXD.js → ItemList-B9zYb0GE.js} +7 -7
- package/dist/chunks/ItemList-B9zYb0GE.js.map +1 -0
- package/dist/chunks/{Jog-BYrxbAQU.js → Jog-DkkTlL3_.js} +8 -8
- package/dist/chunks/Jog-DkkTlL3_.js.map +1 -0
- package/dist/chunks/{Keycaps-CGNQV2Pz.js → Keycaps-DunVpejA.js} +5 -5
- package/dist/chunks/{Keycaps-CGNQV2Pz.js.map → Keycaps-DunVpejA.js.map} +1 -1
- package/dist/chunks/{LayerStack-DOylrQcm.js → LayerStack-CfQ6GsRz.js} +18 -18
- package/dist/chunks/LayerStack-CfQ6GsRz.js.map +1 -0
- package/dist/chunks/{MenuButton-DGE-0DP0.js → MenuButton-C_4nox39.js} +7 -7
- package/dist/chunks/MenuButton-C_4nox39.js.map +1 -0
- package/dist/chunks/{MeshEditor-CHoGQ9K8.js → MeshEditor-Bipz-Ocl.js} +8 -8
- package/dist/chunks/MeshEditor-Bipz-Ocl.js.map +1 -0
- package/dist/chunks/{NumberField-CQzS6TjF.js → NumberField-CCjEDZCg.js} +9 -9
- package/dist/chunks/NumberField-CCjEDZCg.js.map +1 -0
- package/dist/chunks/{OptionsBar-BWaYG_OH.js → OptionsBar-DeQ-vUeZ.js} +2 -2
- package/dist/chunks/{OptionsBar-BWaYG_OH.js.map → OptionsBar-DeQ-vUeZ.js.map} +1 -1
- package/dist/chunks/{PaintField-BVYMu3OI.js → PaintField-jBOJ32rL.js} +8 -8
- package/dist/chunks/PaintField-jBOJ32rL.js.map +1 -0
- package/dist/chunks/{PaintInput-BzAHCKro.js → PaintInput-Qs7Rul5R.js} +10 -10
- package/dist/chunks/PaintInput-Qs7Rul5R.js.map +1 -0
- package/dist/chunks/{PatternPicker-C4OryrYi.js → PatternPicker-BMpXWboq.js} +6 -6
- package/dist/chunks/PatternPicker-BMpXWboq.js.map +1 -0
- package/dist/chunks/{Plot2D-Czvyt_vG.js → Plot2D-CXf_f7QD.js} +1 -1
- package/dist/chunks/{Plot2D-Czvyt_vG.js.map → Plot2D-CXf_f7QD.js.map} +1 -1
- package/dist/chunks/{PointPlotter-Xvb98GwB.js → PointPlotter-S_gz7VYt.js} +2 -2
- package/dist/chunks/{PointPlotter-Xvb98GwB.js.map → PointPlotter-S_gz7VYt.js.map} +1 -1
- package/dist/chunks/{Powerline-B_EH-7Z-.js → Powerline-Ak5AWUlK.js} +5 -5
- package/dist/chunks/Powerline-Ak5AWUlK.js.map +1 -0
- package/dist/chunks/Prefs-CNC8tzyN.js +308 -0
- package/dist/chunks/Prefs-CNC8tzyN.js.map +1 -0
- package/dist/chunks/{Properties-B3KU69NI.js → Properties-Rnb6TAbN.js} +230 -213
- package/dist/chunks/Properties-Rnb6TAbN.js.map +1 -0
- package/dist/chunks/{RadioGroup-C6xpdQNg.js → RadioGroup-CsVp3SEu.js} +6 -6
- package/dist/chunks/RadioGroup-CsVp3SEu.js.map +1 -0
- package/dist/chunks/{RangeSlider-CzgeGLVS.js → RangeSlider-DNr-pJpZ.js} +8 -8
- package/dist/chunks/RangeSlider-DNr-pJpZ.js.map +1 -0
- package/dist/chunks/{ResizeHandle-1Ey8AOij.js → ResizeHandle-RXFf5fXr.js} +1 -1
- package/dist/chunks/{ResizeHandle-1Ey8AOij.js.map → ResizeHandle-RXFf5fXr.js.map} +1 -1
- package/dist/chunks/Select-BEope086.js +190 -0
- package/dist/chunks/Select-BEope086.js.map +1 -0
- package/dist/chunks/SelectionPanel-CEbLS-0D.js +102 -0
- package/dist/chunks/SelectionPanel-CEbLS-0D.js.map +1 -0
- package/dist/chunks/{Sidebar-BlUjn8lD.js → Sidebar-qn_oSCNX.js} +4 -4
- package/dist/chunks/Sidebar-qn_oSCNX.js.map +1 -0
- package/dist/chunks/{SidebarPanel-BqHfz6VK.js → SidebarPanel-Bs6V21hg.js} +12 -12
- package/dist/chunks/SidebarPanel-Bs6V21hg.js.map +1 -0
- package/dist/chunks/{Slider-B2ywUZH6.js → Slider-CIIrqiFS.js} +18 -18
- package/dist/chunks/Slider-CIIrqiFS.js.map +1 -0
- package/dist/chunks/{StatusBar-BFt7Yw5O.js → StatusBar-B4L15DSm.js} +6 -6
- package/dist/chunks/StatusBar-B4L15DSm.js.map +1 -0
- package/dist/chunks/{Switch-Om3t3ASc.js → Switch-DH5POG0T.js} +5 -5
- package/dist/chunks/Switch-DH5POG0T.js.map +1 -0
- package/dist/chunks/{Tabs-EAvYywil.js → Tabs-BFHikpml.js} +5 -5
- package/dist/chunks/Tabs-BFHikpml.js.map +1 -0
- package/dist/chunks/{Timeline-BEyKaBXl.js → Timeline-DNKY_yiK.js} +40 -40
- package/dist/chunks/Timeline-DNKY_yiK.js.map +1 -0
- package/dist/chunks/{Toast-iqLDD_XZ.js → Toast-CI1UDuK6.js} +15 -15
- package/dist/chunks/Toast-CI1UDuK6.js.map +1 -0
- package/dist/chunks/{ToggleBar--9As2PWG.js → ToggleBar-CClus5Cd.js} +8 -8
- package/dist/chunks/ToggleBar-CClus5Cd.js.map +1 -0
- package/dist/chunks/TokenPanel-BPHq24dc.js +634 -0
- package/dist/chunks/TokenPanel-BPHq24dc.js.map +1 -0
- package/dist/chunks/{ToolButton-Dd-1T5aX.js → ToolButton-9QzJCmuM.js} +7 -7
- package/dist/chunks/ToolButton-9QzJCmuM.js.map +1 -0
- package/dist/chunks/{ToolGroup-BBI-W-Gm.js → ToolGroup-BJiDrH_i.js} +3 -3
- package/dist/chunks/ToolGroup-BJiDrH_i.js.map +1 -0
- package/dist/chunks/ToolOptionsBar-CAM6RcUH.js +85 -0
- package/dist/chunks/ToolOptionsBar-CAM6RcUH.js.map +1 -0
- package/dist/chunks/{ToolPalette-BmTDDpmz.js → ToolPalette-DGkKwE7D.js} +8 -8
- package/dist/chunks/ToolPalette-DGkKwE7D.js.map +1 -0
- package/dist/chunks/{Tooltip-BHre_vbI.js → Tooltip-C4YBczLq.js} +3 -3
- package/dist/chunks/Tooltip-C4YBczLq.js.map +1 -0
- package/dist/chunks/{createKeyframeLayer-7j7ukrSx.js → createKeyframeLayer-DKtO0Sw_.js} +3 -3
- package/dist/chunks/{createKeyframeLayer-7j7ukrSx.js.map → createKeyframeLayer-DKtO0Sw_.js.map} +1 -1
- package/dist/chunks/{icons-Btrs-JD7.js → icons-DFLytcui.js} +2 -2
- package/dist/chunks/{icons-Btrs-JD7.js.map → icons-DFLytcui.js.map} +1 -1
- package/dist/chunks/model-13kZ_-mE.js +483 -0
- package/dist/chunks/model-13kZ_-mE.js.map +1 -0
- package/dist/chunks/number-BHz66zQO.js +89 -0
- package/dist/chunks/number-BHz66zQO.js.map +1 -0
- package/dist/chunks/{schema-MCVT1MLv.js → schema-Dft4Cu2p.js} +1 -1
- package/dist/chunks/schema-Dft4Cu2p.js.map +1 -0
- package/dist/chunks/segmentedControl.module-DS72X1ns.js +11 -0
- package/dist/chunks/segmentedControl.module-DS72X1ns.js.map +1 -0
- package/dist/chunks/{snap-B0WQwetQ.js → snap-CEjuWOhN.js} +1 -1
- package/dist/chunks/{snap-B0WQwetQ.js.map → snap-CEjuWOhN.js.map} +1 -1
- package/dist/chunks/useRovingTabIndex-Dkpf_KhN.js.map +1 -1
- package/dist/color/oklch.d.ts +2 -1
- package/dist/color/oklch.d.ts.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/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 +3 -3
- package/dist/components/DataGrid/index.js +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/index.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/ItemList/index.js +1 -1
- package/dist/components/Jog/index.js +1 -1
- package/dist/components/Keycaps/index.js +1 -1
- package/dist/components/LayerStack/index.js +1 -1
- package/dist/components/MenuButton/index.js +1 -1
- package/dist/components/MeshEditor/index.js +1 -1
- package/dist/components/NumberField/UnitField.d.ts +2 -1
- package/dist/components/NumberField/UnitField.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OptionsBar/index.js +1 -1
- package/dist/components/PaintField/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 +2 -2
- package/dist/components/Prefs/schema.d.ts +2 -1
- package/dist/components/Prefs/schema.d.ts.map +1 -1
- package/dist/components/Properties/PropertyGroup.d.ts +7 -1
- package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
- package/dist/components/Properties/PropertyPanel.d.ts +36 -38
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
- package/dist/components/Properties/index.d.ts +2 -4
- package/dist/components/Properties/index.d.ts.map +1 -1
- package/dist/components/Properties/index.js +2 -2
- 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 +18 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +3 -50
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
- package/dist/components/SelectionPanel/index.js +3 -2
- package/dist/components/SelectionPanel/model.d.ts +4 -1
- package/dist/components/SelectionPanel/model.d.ts.map +1 -1
- package/dist/components/SelectionPanel/renderLeaf.d.ts +106 -0
- package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -0
- 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/TokenPanel/TokenPanel.d.ts +10 -4
- package/dist/components/TokenPanel/TokenPanel.d.ts.map +1 -1
- package/dist/components/TokenPanel/index.d.ts +2 -2
- package/dist/components/TokenPanel/index.d.ts.map +1 -1
- package/dist/components/TokenPanel/index.js +2 -2
- package/dist/components/TokenPanel/tokenTypes.d.ts +24 -0
- package/dist/components/TokenPanel/tokenTypes.d.ts.map +1 -1
- package/dist/components/ToolButton/index.js +1 -1
- package/dist/components/ToolGroup/index.js +1 -1
- package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts +29 -18
- package/dist/components/ToolOptionsBar/ToolOptionsBar.d.ts.map +1 -1
- package/dist/components/ToolOptionsBar/index.js +1 -1
- package/dist/components/ToolPalette/ToolPalette.d.ts +5 -4
- package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -1
- package/dist/components/ToolPalette/index.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/format/number.d.ts +10 -1
- package/dist/format/number.d.ts.map +1 -1
- package/dist/icons/paths.d.ts +9 -1
- package/dist/icons/paths.d.ts.map +1 -1
- package/dist/index.js +69 -75
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/useRovingTabIndex.d.ts +7 -5
- package/dist/useRovingTabIndex.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunks/ActionBar-GZdcfdQL.js.map +0 -1
- package/dist/chunks/Badge-Bf8Rd1R6.js.map +0 -1
- package/dist/chunks/BandEditor-D8I5Uun-.js.map +0 -1
- package/dist/chunks/Button-CExdkQcU.js.map +0 -1
- package/dist/chunks/Callout-cx5_CWcW.js.map +0 -1
- package/dist/chunks/Checkbox-BZZsPaVF.js.map +0 -1
- package/dist/chunks/ColorField-YVf8irfr.js.map +0 -1
- package/dist/chunks/ComboBox-D57tNYDD.js.map +0 -1
- package/dist/chunks/DataGrid-BVdDMZkQ.js.map +0 -1
- package/dist/chunks/Dialog-DuOzsR2g.js.map +0 -1
- package/dist/chunks/Disclosure-9UgDzc7Z.js.map +0 -1
- package/dist/chunks/Field-BNqvUJfg.js.map +0 -1
- package/dist/chunks/GradientEditor-B_ymIr4Q.js.map +0 -1
- package/dist/chunks/Icon-QhLhaGFe.js.map +0 -1
- package/dist/chunks/Input-B9Vh7ASP.js.map +0 -1
- package/dist/chunks/ItemList-BZJQReXD.js.map +0 -1
- package/dist/chunks/Jog-BYrxbAQU.js.map +0 -1
- package/dist/chunks/LayerStack-DOylrQcm.js.map +0 -1
- package/dist/chunks/MenuButton-DGE-0DP0.js.map +0 -1
- package/dist/chunks/MeshEditor-CHoGQ9K8.js.map +0 -1
- package/dist/chunks/NumberField-CQzS6TjF.js.map +0 -1
- package/dist/chunks/PaintField-BVYMu3OI.js.map +0 -1
- package/dist/chunks/PaintInput-BzAHCKro.js.map +0 -1
- package/dist/chunks/PatternPicker-C4OryrYi.js.map +0 -1
- package/dist/chunks/Powerline-B_EH-7Z-.js.map +0 -1
- package/dist/chunks/Prefs-FuaJBs3t.js +0 -308
- package/dist/chunks/Prefs-FuaJBs3t.js.map +0 -1
- package/dist/chunks/Properties-B3KU69NI.js.map +0 -1
- package/dist/chunks/RadioGroup-C6xpdQNg.js.map +0 -1
- package/dist/chunks/RangeSlider-CzgeGLVS.js.map +0 -1
- package/dist/chunks/Select-BMYVh10x.js +0 -127
- package/dist/chunks/Select-BMYVh10x.js.map +0 -1
- package/dist/chunks/SelectionPanel-DTpcQidl.js +0 -572
- package/dist/chunks/SelectionPanel-DTpcQidl.js.map +0 -1
- package/dist/chunks/Sidebar-BlUjn8lD.js.map +0 -1
- package/dist/chunks/SidebarPanel-BqHfz6VK.js.map +0 -1
- package/dist/chunks/Slider-B2ywUZH6.js.map +0 -1
- package/dist/chunks/StatusBar-BFt7Yw5O.js.map +0 -1
- package/dist/chunks/Switch-Om3t3ASc.js.map +0 -1
- package/dist/chunks/Tabs-EAvYywil.js.map +0 -1
- package/dist/chunks/Timeline-BEyKaBXl.js.map +0 -1
- package/dist/chunks/Toast-iqLDD_XZ.js.map +0 -1
- package/dist/chunks/ToggleBar--9As2PWG.js.map +0 -1
- package/dist/chunks/TokenPanel-BL9hlq7x.js +0 -374
- package/dist/chunks/TokenPanel-BL9hlq7x.js.map +0 -1
- package/dist/chunks/ToolButton-Dd-1T5aX.js.map +0 -1
- package/dist/chunks/ToolGroup-BBI-W-Gm.js.map +0 -1
- package/dist/chunks/ToolOptionsBar-B2xPWzJf.js +0 -27
- package/dist/chunks/ToolOptionsBar-B2xPWzJf.js.map +0 -1
- package/dist/chunks/ToolPalette-BmTDDpmz.js.map +0 -1
- package/dist/chunks/Tooltip-BHre_vbI.js.map +0 -1
- package/dist/chunks/number-f6PydOZK.js +0 -52
- package/dist/chunks/number-f6PydOZK.js.map +0 -1
- package/dist/chunks/schema-MCVT1MLv.js.map +0 -1
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js +0 -11
- package/dist/chunks/segmentedControl.module-DmeUMYe3.js.map +0 -1
- package/dist/components/Properties/PinDot.d.ts +0 -18
- package/dist/components/Properties/PinDot.d.ts.map +0 -1
|
@@ -1,572 +0,0 @@
|
|
|
1
|
-
import { a as e, t } from "./Icon-QhLhaGFe.js";
|
|
2
|
-
import { t as n } from "./ToggleBar--9As2PWG.js";
|
|
3
|
-
import { t as r } from "./InlineRange-DdIlfGqG.js";
|
|
4
|
-
import { t as i } from "./ColorField-YVf8irfr.js";
|
|
5
|
-
import { t as a } from "./PaintInput-BzAHCKro.js";
|
|
6
|
-
import { t as o } from "./Select-BMYVh10x.js";
|
|
7
|
-
import { t as s } from "./FontFamilySelect-CO19kyOO.js";
|
|
8
|
-
import { t as c } from "./Input-B9Vh7ASP.js";
|
|
9
|
-
import { n as l, t as u } from "./NumberField-CQzS6TjF.js";
|
|
10
|
-
import { t as d } from "./Switch-Om3t3ASc.js";
|
|
11
|
-
import { n as f, r as p } from "./schema-MCVT1MLv.js";
|
|
12
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
-
import { MIXED as _, asNodeId as v, isBuiltinToolPref as y } from "@weasel-js/core";
|
|
14
|
-
import { Fragment as b, useState as x, useSyncExternalStore as S } from "react";
|
|
15
|
-
//#region src/components/SelectionPanel/model.ts
|
|
16
|
-
function C(e, t) {
|
|
17
|
-
if (e.kind === "container") return "group";
|
|
18
|
-
for (let n of t) if (n.matches(e.data)) return n.name;
|
|
19
|
-
return "unknown";
|
|
20
|
-
}
|
|
21
|
-
function w(e) {
|
|
22
|
-
return !("kind" in e);
|
|
23
|
-
}
|
|
24
|
-
function T(e) {
|
|
25
|
-
let t = [], n = [], r = (e, t) => {
|
|
26
|
-
for (let [n, i] of Object.entries(e.children)) w(i) ? r(i, t) : t.push({
|
|
27
|
-
path: n,
|
|
28
|
-
leaf: i
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
for (let [i, a] of Object.entries(e.children)) if (w(a)) {
|
|
32
|
-
let e = [];
|
|
33
|
-
r(a, e), t.push({
|
|
34
|
-
key: i,
|
|
35
|
-
name: a.name,
|
|
36
|
-
rows: E(e)
|
|
37
|
-
});
|
|
38
|
-
} else n.push({
|
|
39
|
-
path: i,
|
|
40
|
-
leaf: a
|
|
41
|
-
});
|
|
42
|
-
return n.length > 0 && t.unshift({
|
|
43
|
-
key: "",
|
|
44
|
-
name: "",
|
|
45
|
-
rows: E(n)
|
|
46
|
-
}), t;
|
|
47
|
-
}
|
|
48
|
-
function E(e) {
|
|
49
|
-
let t = [];
|
|
50
|
-
for (let n of e) {
|
|
51
|
-
let e = n.leaf.pair, r = t[t.length - 1];
|
|
52
|
-
e !== void 0 && r !== void 0 && r.label === e ? r.leaves.push(n) : t.push({
|
|
53
|
-
label: e ?? n.leaf.name,
|
|
54
|
-
leaves: [n]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
function D(e, t) {
|
|
60
|
-
let n = [...new Set(e)];
|
|
61
|
-
if (n.length === 0) return [];
|
|
62
|
-
let r = new Map(t.map((e) => [e.name, e])), i = n.map((e) => r.get(e)?.schema);
|
|
63
|
-
if (i.some((e) => e === void 0)) return [];
|
|
64
|
-
let [a, ...o] = i, s = T(a);
|
|
65
|
-
if (o.length === 0) return s;
|
|
66
|
-
let c = (e) => `${e.path}\0${e.leaf.kind}`, l = o.map((e) => new Set(T(e).flatMap((e) => e.rows).flatMap((e) => e.leaves).map(c))), u = (e) => l.every((t) => t.has(c(e)));
|
|
67
|
-
return s.map((e) => ({
|
|
68
|
-
...e,
|
|
69
|
-
rows: e.rows.map((e) => ({
|
|
70
|
-
...e,
|
|
71
|
-
leaves: e.leaves.filter(u)
|
|
72
|
-
})).filter((e) => e.leaves.length > 0)
|
|
73
|
-
})).filter((e) => e.rows.length > 0);
|
|
74
|
-
}
|
|
75
|
-
function O(e, t) {
|
|
76
|
-
let n = t.split(".");
|
|
77
|
-
if (n.length < 2) return;
|
|
78
|
-
let r = n[0], i = r === "pose" ? e.pose : r === "data" ? e.data : void 0;
|
|
79
|
-
for (let e = 1; e < n.length; e++) {
|
|
80
|
-
if (typeof i != "object" || !i) return;
|
|
81
|
-
i = i[n[e]];
|
|
82
|
-
}
|
|
83
|
-
return i;
|
|
84
|
-
}
|
|
85
|
-
function k(e, t, n) {
|
|
86
|
-
let [r, ...i] = t;
|
|
87
|
-
if (i.length === 0) return Array.isArray(e) ? Object.assign([...e], { [r]: n }) : {
|
|
88
|
-
...e,
|
|
89
|
-
[r]: n
|
|
90
|
-
};
|
|
91
|
-
let a = e[r], o = k(Array.isArray(a) ? [...a] : typeof a == "object" && a ? { ...a } : {}, i, n);
|
|
92
|
-
return Array.isArray(e) ? Object.assign([...e], { [r]: o }) : {
|
|
93
|
-
...e,
|
|
94
|
-
[r]: o
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function A(e, t) {
|
|
98
|
-
let n, r = !0;
|
|
99
|
-
for (let i of e) {
|
|
100
|
-
let e = O(i, t);
|
|
101
|
-
if (r) n = e, r = !1;
|
|
102
|
-
else if (!Object.is(e, n)) return _;
|
|
103
|
-
}
|
|
104
|
-
return n;
|
|
105
|
-
}
|
|
106
|
-
function j(e) {
|
|
107
|
-
let t = /* @__PURE__ */ new Map();
|
|
108
|
-
for (let n of e) t.set(n, (t.get(n) ?? 0) + 1);
|
|
109
|
-
return [...t.entries()].map(([e, t]) => t > 1 ? `${e} ×${t}` : e).join(" · ");
|
|
110
|
-
}
|
|
111
|
-
var M = {
|
|
112
|
-
root: "_root_q9h3j_1",
|
|
113
|
-
header: "_header_q9h3j_8",
|
|
114
|
-
kind: "_kind_q9h3j_16",
|
|
115
|
-
breakdown: "_breakdown_q9h3j_21",
|
|
116
|
-
section: "_section_q9h3j_26",
|
|
117
|
-
sectionTitle: "_sectionTitle_q9h3j_35",
|
|
118
|
-
row: "_row_q9h3j_44",
|
|
119
|
-
rowLabel: "_rowLabel_q9h3j_52",
|
|
120
|
-
rowControls: "_rowControls_q9h3j_56",
|
|
121
|
-
namedField: "_namedField_q9h3j_66",
|
|
122
|
-
blockRow: "_blockRow_q9h3j_78",
|
|
123
|
-
toggle: "_toggle_q9h3j_89",
|
|
124
|
-
flagToggle: "_flagToggle_q9h3j_111",
|
|
125
|
-
number: "_number_q9h3j_115",
|
|
126
|
-
select: "_select_q9h3j_116",
|
|
127
|
-
unitSuffix: "_unitSuffix_q9h3j_120",
|
|
128
|
-
mixedSwitch: "_mixedSwitch_q9h3j_126",
|
|
129
|
-
unrenderable: "_unrenderable_q9h3j_130",
|
|
130
|
-
objectLeaf: "_objectLeaf_q9h3j_137",
|
|
131
|
-
objectGroup: "_objectGroup_q9h3j_146",
|
|
132
|
-
slider: "_slider_q9h3j_153",
|
|
133
|
-
sliderReadout: "_sliderReadout_q9h3j_157"
|
|
134
|
-
}, N = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1);
|
|
135
|
-
function P(e) {
|
|
136
|
-
let { scene: t, selection: n, properties: r, routing: i, renderers: a, kindLabel: o = N, emptyState: s = null, className: c } = e;
|
|
137
|
-
S(t.subscribe, t.getVersion, t.getVersion);
|
|
138
|
-
let l = n.current.map((e) => t.get(v(e))).filter((e) => e != null), u = l.map((e) => C(e, i)), d = l.map((e) => e.id).join(","), f = D(u, r);
|
|
139
|
-
if (l.length === 0) return /* @__PURE__ */ h("div", {
|
|
140
|
-
className: [M.root, c].filter(Boolean).join(" "),
|
|
141
|
-
children: s
|
|
142
|
-
});
|
|
143
|
-
let p = (e, r) => {
|
|
144
|
-
let [i, ...a] = e.path.split(".");
|
|
145
|
-
if (a.length === 0) return;
|
|
146
|
-
let o = n.current.map(v);
|
|
147
|
-
t.batch(`Edit ${e.leaf.name}`, () => {
|
|
148
|
-
for (let e of o) {
|
|
149
|
-
let n = t.get(e);
|
|
150
|
-
n && (i === "pose" ? t.setPose(e, k(n.pose, a, r)) : i === "data" && t.update(e, { data: k(n.data, a, r) }));
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
return /* @__PURE__ */ g("div", {
|
|
155
|
-
className: [M.root, c].filter(Boolean).join(" "),
|
|
156
|
-
children: [/* @__PURE__ */ h("header", {
|
|
157
|
-
className: M.header,
|
|
158
|
-
children: l.length === 1 ? /* @__PURE__ */ h("span", {
|
|
159
|
-
className: M.kind,
|
|
160
|
-
children: o(u[0])
|
|
161
|
-
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("span", {
|
|
162
|
-
className: M.kind,
|
|
163
|
-
children: [l.length, " selected"]
|
|
164
|
-
}), /* @__PURE__ */ h("span", {
|
|
165
|
-
className: M.breakdown,
|
|
166
|
-
children: j(u)
|
|
167
|
-
})] })
|
|
168
|
-
}), f.map((e) => {
|
|
169
|
-
let t = e.rows.map((e) => ({
|
|
170
|
-
row: e,
|
|
171
|
-
controls: L(e.leaves.map((t) => F(t, e.leaves.length > 1 ? `${e.label} ${t.leaf.name}` : t.leaf.name, l, a, p, d)), a)
|
|
172
|
-
})).filter(({ controls: e }) => e.length > 0);
|
|
173
|
-
return t.length === 0 ? null : /* @__PURE__ */ g("section", {
|
|
174
|
-
className: M.section,
|
|
175
|
-
children: [e.name !== "" && /* @__PURE__ */ h("h3", {
|
|
176
|
-
className: M.sectionTitle,
|
|
177
|
-
children: e.name
|
|
178
|
-
}), t.map(({ row: t, controls: n }) => t.leaves.length === 1 && t.leaves[0].leaf.block ? /* @__PURE__ */ g("div", { children: [e.name === "" && t.leaves[0].leaf.kind !== "object" && /* @__PURE__ */ h("h4", {
|
|
179
|
-
className: M.sectionTitle,
|
|
180
|
-
title: t.leaves[0].leaf.description,
|
|
181
|
-
children: t.leaves[0].leaf.name
|
|
182
|
-
}), n[0].content] }, t.leaves[0].path) : /* @__PURE__ */ g("div", {
|
|
183
|
-
className: M.row,
|
|
184
|
-
children: [/* @__PURE__ */ h("span", {
|
|
185
|
-
className: M.rowLabel,
|
|
186
|
-
title: t.leaves[0].leaf.description,
|
|
187
|
-
children: t.label
|
|
188
|
-
}), /* @__PURE__ */ h("span", {
|
|
189
|
-
className: M.rowControls,
|
|
190
|
-
children: n.map(({ key: e, content: t }) => /* @__PURE__ */ h(b, { children: t }, e))
|
|
191
|
-
})]
|
|
192
|
-
}, t.leaves[0].path))]
|
|
193
|
-
}, e.key);
|
|
194
|
-
})]
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
function F(e, t, n, r, i, a) {
|
|
198
|
-
let { path: o, leaf: s } = e, c = A(n, o), l = c === _, u = {
|
|
199
|
-
path: o,
|
|
200
|
-
pref: s,
|
|
201
|
-
value: l ? void 0 : c,
|
|
202
|
-
mixed: l,
|
|
203
|
-
unset: !l && c === void 0,
|
|
204
|
-
setValue: (t) => i(e, t),
|
|
205
|
-
valueAt: (e) => {
|
|
206
|
-
let t = A(n, e);
|
|
207
|
-
return t === _ ? {
|
|
208
|
-
value: void 0,
|
|
209
|
-
mixed: !0
|
|
210
|
-
} : {
|
|
211
|
-
value: t,
|
|
212
|
-
mixed: !1
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
return {
|
|
217
|
-
key: o,
|
|
218
|
-
leaf: s,
|
|
219
|
-
ctx: u,
|
|
220
|
-
ariaLabel: t,
|
|
221
|
-
render: () => {
|
|
222
|
-
let e = r?.[o] ?? r?.[s.kind];
|
|
223
|
-
return e ? e(u) : z(u, t, r, a);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
function I(e, t) {
|
|
228
|
-
let { leaf: n } = e;
|
|
229
|
-
return n.kind === "boolean" && n.control === "toggle" && n.pair !== void 0 && t?.[e.ctx.path] === void 0 && t?.[n.kind] === void 0;
|
|
230
|
-
}
|
|
231
|
-
function L(e, t) {
|
|
232
|
-
let n = [];
|
|
233
|
-
for (let r = 0; r < e.length;) {
|
|
234
|
-
let i = e[r];
|
|
235
|
-
if (!I(i, t)) {
|
|
236
|
-
let e = i.render();
|
|
237
|
-
e != null && n.push({
|
|
238
|
-
key: i.key,
|
|
239
|
-
leaf: i.leaf,
|
|
240
|
-
block: i.leaf.block === !0,
|
|
241
|
-
content: e
|
|
242
|
-
}), r += 1;
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
245
|
-
let a = r + 1;
|
|
246
|
-
for (; a < e.length && I(e[a], t) && e[a].leaf.pair === i.leaf.pair;) a += 1;
|
|
247
|
-
let o = e.slice(r, a);
|
|
248
|
-
n.push({
|
|
249
|
-
key: i.key,
|
|
250
|
-
leaf: i.leaf,
|
|
251
|
-
block: o.every((e) => e.leaf.block === !0),
|
|
252
|
-
content: /* @__PURE__ */ h(R, {
|
|
253
|
-
run: o,
|
|
254
|
-
ariaLabel: i.leaf.pair
|
|
255
|
-
})
|
|
256
|
-
}), r = a;
|
|
257
|
-
}
|
|
258
|
-
return n;
|
|
259
|
-
}
|
|
260
|
-
function R({ run: r, ariaLabel: i }) {
|
|
261
|
-
let a = r.filter((e) => e.ctx.value === !0).map((e) => e.key);
|
|
262
|
-
return /* @__PURE__ */ h(n, {
|
|
263
|
-
mode: "multiple",
|
|
264
|
-
size: "sm",
|
|
265
|
-
variant: "flat",
|
|
266
|
-
className: M.flagToggle,
|
|
267
|
-
ariaLabel: i,
|
|
268
|
-
items: r.map((n) => {
|
|
269
|
-
let r = n.leaf;
|
|
270
|
-
return {
|
|
271
|
-
value: n.key,
|
|
272
|
-
label: r.icon && r.icon in e ? /* @__PURE__ */ h(t, {
|
|
273
|
-
name: r.icon,
|
|
274
|
-
size: 14
|
|
275
|
-
}) : r.short ?? r.name.slice(0, 1),
|
|
276
|
-
ariaLabel: n.ariaLabel
|
|
277
|
-
};
|
|
278
|
-
}),
|
|
279
|
-
value: a,
|
|
280
|
-
mixedValues: r.filter((e) => e.ctx.mixed).map((e) => e.key),
|
|
281
|
-
onChange: (e) => {
|
|
282
|
-
for (let t of r) {
|
|
283
|
-
let n = e.includes(t.key);
|
|
284
|
-
n !== a.includes(t.key) && t.ctx.setValue(n);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function z(c, _, v, b = "", x = !1) {
|
|
290
|
-
let { pref: S, value: C, mixed: w, unset: T, setValue: E } = c;
|
|
291
|
-
if (S.kind === "font-family") {
|
|
292
|
-
let e = c.valueAt("data.style.fontWeight"), t = c.valueAt("data.style.fontStyle");
|
|
293
|
-
return /* @__PURE__ */ h(s, {
|
|
294
|
-
className: M.select,
|
|
295
|
-
value: w || typeof C != "string" ? void 0 : C,
|
|
296
|
-
mixed: w,
|
|
297
|
-
onChange: E,
|
|
298
|
-
weight: typeof e.value == "number" ? e.value : void 0,
|
|
299
|
-
fontStyle: t.value === "italic" ? "italic" : void 0,
|
|
300
|
-
"aria-label": _
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
if (!y(S)) return /* @__PURE__ */ g("span", {
|
|
304
|
-
className: M.unrenderable,
|
|
305
|
-
children: [
|
|
306
|
-
"(",
|
|
307
|
-
S.kind,
|
|
308
|
-
": no renderer)"
|
|
309
|
-
]
|
|
310
|
-
});
|
|
311
|
-
switch (S.kind) {
|
|
312
|
-
case "number": {
|
|
313
|
-
let e = S, t = typeof C == "number" && Number.isFinite(C) ? C : void 0, n = t === void 0 ? NaN : e.unit ? e.unit.toDisplay(t) : t, i = f(e);
|
|
314
|
-
if (e.control === "slider") {
|
|
315
|
-
let a = i.min ?? 0, o = i.max ?? 100, s = !w && t !== void 0;
|
|
316
|
-
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, {
|
|
317
|
-
min: a,
|
|
318
|
-
max: o,
|
|
319
|
-
step: i.step,
|
|
320
|
-
value: s ? Math.min(Math.max(n, a), o) : a,
|
|
321
|
-
disabled: w,
|
|
322
|
-
className: M.slider,
|
|
323
|
-
"aria-label": _,
|
|
324
|
-
onChange: (t) => {
|
|
325
|
-
let n = Number(t.target.value);
|
|
326
|
-
E(e.unit ? e.unit.fromDisplay(n) : n);
|
|
327
|
-
}
|
|
328
|
-
}), /* @__PURE__ */ h("span", {
|
|
329
|
-
className: M.sliderReadout,
|
|
330
|
-
"aria-hidden": "true",
|
|
331
|
-
children: s ? `${n}${e.unit?.suffix ?? ""}` : "—"
|
|
332
|
-
})] });
|
|
333
|
-
}
|
|
334
|
-
let a = e.unit, o = a ? /* @__PURE__ */ h(u, {
|
|
335
|
-
className: M.number,
|
|
336
|
-
value: w || t === void 0 ? NaN : n,
|
|
337
|
-
placeholder: w ? "Mixed" : void 0,
|
|
338
|
-
minValue: i.min,
|
|
339
|
-
maxValue: i.max,
|
|
340
|
-
step: i.step,
|
|
341
|
-
accepts: p(a),
|
|
342
|
-
"aria-label": _,
|
|
343
|
-
onChange: (e) => E(a.fromDisplay(e))
|
|
344
|
-
}) : /* @__PURE__ */ h(l, {
|
|
345
|
-
className: M.number,
|
|
346
|
-
value: w || t === void 0 ? NaN : n,
|
|
347
|
-
placeholder: w ? "Mixed" : void 0,
|
|
348
|
-
minValue: i.min,
|
|
349
|
-
maxValue: i.max,
|
|
350
|
-
step: i.step,
|
|
351
|
-
hideSteppers: !0,
|
|
352
|
-
"aria-label": _,
|
|
353
|
-
onChange: (e) => {
|
|
354
|
-
Number.isNaN(e) || E(e);
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
return a?.suffix === void 0 ? o : /* @__PURE__ */ g(m, { children: [o, /* @__PURE__ */ h("span", {
|
|
358
|
-
className: M.unitSuffix,
|
|
359
|
-
"aria-hidden": "true",
|
|
360
|
-
children: a.suffix
|
|
361
|
-
})] });
|
|
362
|
-
}
|
|
363
|
-
case "string": return /* @__PURE__ */ h(V, {
|
|
364
|
-
text: w ? void 0 : typeof C == "string" ? C : "",
|
|
365
|
-
placeholder: w ? "Mixed" : void 0,
|
|
366
|
-
ariaLabel: _,
|
|
367
|
-
onCommit: E
|
|
368
|
-
});
|
|
369
|
-
case "boolean": {
|
|
370
|
-
let r = S;
|
|
371
|
-
if (r.control === "toggle") return /* @__PURE__ */ h(n, {
|
|
372
|
-
mode: "multiple",
|
|
373
|
-
size: "sm",
|
|
374
|
-
variant: "flat",
|
|
375
|
-
className: M.flagToggle,
|
|
376
|
-
ariaLabel: _,
|
|
377
|
-
items: [{
|
|
378
|
-
value: c.path,
|
|
379
|
-
label: r.icon && r.icon in e ? /* @__PURE__ */ h(t, {
|
|
380
|
-
name: r.icon,
|
|
381
|
-
size: 14
|
|
382
|
-
}) : r.short ?? r.name.slice(0, 1),
|
|
383
|
-
ariaLabel: _
|
|
384
|
-
}],
|
|
385
|
-
value: C === !0 ? [c.path] : [],
|
|
386
|
-
mixedValues: w ? [c.path] : [],
|
|
387
|
-
onChange: (e) => E(e.includes(c.path))
|
|
388
|
-
});
|
|
389
|
-
let i = /* @__PURE__ */ h(d, {
|
|
390
|
-
isSelected: !!C,
|
|
391
|
-
onChange: E,
|
|
392
|
-
"aria-label": _
|
|
393
|
-
});
|
|
394
|
-
return !w && !T ? i : /* @__PURE__ */ h("span", {
|
|
395
|
-
className: M.mixedSwitch,
|
|
396
|
-
title: w ? "Mixed" : "Not set",
|
|
397
|
-
children: i
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
case "enum": {
|
|
401
|
-
let r = S, i = r.encoding ? w ? void 0 : r.encoding.read(C, c.siblings) : w || T ? void 0 : typeof C == "string" ? C : r.default, a = (e) => E(r.encoding ? r.encoding.write(e, c.siblings) : e);
|
|
402
|
-
return r.control === "toggle" ? /* @__PURE__ */ h(n, {
|
|
403
|
-
size: "sm",
|
|
404
|
-
variant: "flat",
|
|
405
|
-
className: M.toggle,
|
|
406
|
-
ariaLabel: _,
|
|
407
|
-
items: r.options.map((n) => ({
|
|
408
|
-
value: n.value,
|
|
409
|
-
label: n.icon && n.icon in e ? /* @__PURE__ */ h(t, {
|
|
410
|
-
name: n.icon,
|
|
411
|
-
size: 14
|
|
412
|
-
}) : n.short ?? n.label,
|
|
413
|
-
ariaLabel: n.label,
|
|
414
|
-
disabled: n.disabled
|
|
415
|
-
})),
|
|
416
|
-
value: i ?? null,
|
|
417
|
-
onChange: (e) => {
|
|
418
|
-
e !== null && a(e);
|
|
419
|
-
}
|
|
420
|
-
}) : /* @__PURE__ */ h(o, {
|
|
421
|
-
className: M.select,
|
|
422
|
-
options: r.options.map((e) => ({
|
|
423
|
-
value: e.value,
|
|
424
|
-
label: e.label,
|
|
425
|
-
isDisabled: e.disabled
|
|
426
|
-
})),
|
|
427
|
-
selectedKey: i ?? null,
|
|
428
|
-
placeholder: w ? "Mixed" : T ? "—" : void 0,
|
|
429
|
-
onSelectionChange: a,
|
|
430
|
-
"aria-label": _
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
case "color": {
|
|
434
|
-
let e = S;
|
|
435
|
-
return /* @__PURE__ */ h(i, {
|
|
436
|
-
value: w ? void 0 : typeof C == "string" ? C : e.default,
|
|
437
|
-
mixed: w,
|
|
438
|
-
alpha: e.alpha,
|
|
439
|
-
onChange: E,
|
|
440
|
-
"aria-label": _
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
case "paint": return /* @__PURE__ */ h(a, {
|
|
444
|
-
value: C === null ? null : C ?? (w ? void 0 : S.default),
|
|
445
|
-
mixed: w,
|
|
446
|
-
unset: T,
|
|
447
|
-
allowNone: !x,
|
|
448
|
-
onChange: E,
|
|
449
|
-
"aria-label": _
|
|
450
|
-
}, b);
|
|
451
|
-
case "object": return /* @__PURE__ */ h(B, {
|
|
452
|
-
ctx: c,
|
|
453
|
-
renderers: v,
|
|
454
|
-
selectionKey: b
|
|
455
|
-
});
|
|
456
|
-
default: throw Error(`SelectionPanel: no control for built-in pref kind "${S.kind}"`);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
function B({ ctx: n, renderers: r, selectionKey: i = "" }) {
|
|
460
|
-
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) => {
|
|
461
|
-
let u = [], d = (e) => typeof e == "object" && !!e && "controls" in e, f = [], p = () => {
|
|
462
|
-
for (let { key: e, leaf: t, block: n, content: i } of L(f, r)) {
|
|
463
|
-
let r = u[u.length - 1];
|
|
464
|
-
if (t.pair !== void 0 && d(r) && r.pair === t.pair) {
|
|
465
|
-
r.controls.push(/* @__PURE__ */ h(b, { children: i }, e)), r.block &&= n;
|
|
466
|
-
continue;
|
|
467
|
-
}
|
|
468
|
-
u.push({
|
|
469
|
-
key: e,
|
|
470
|
-
pair: t.pair,
|
|
471
|
-
label: t.pair ?? t.name,
|
|
472
|
-
title: t.description,
|
|
473
|
-
block: n,
|
|
474
|
-
controls: [/* @__PURE__ */ h(b, { children: i }, e)]
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
f = [];
|
|
478
|
-
};
|
|
479
|
-
for (let [d, m] of Object.entries(s)) {
|
|
480
|
-
if (!("kind" in m)) {
|
|
481
|
-
let e = m.name !== "", t = c(m.children, e);
|
|
482
|
-
if (t.length === 0) continue;
|
|
483
|
-
p(), u.push(/* @__PURE__ */ g("div", {
|
|
484
|
-
className: e && l ? M.objectGroup : void 0,
|
|
485
|
-
children: [e && /* @__PURE__ */ h("h5", {
|
|
486
|
-
className: M.sectionTitle,
|
|
487
|
-
children: m.name
|
|
488
|
-
}), t]
|
|
489
|
-
}, `group:${d}`));
|
|
490
|
-
continue;
|
|
491
|
-
}
|
|
492
|
-
let s = `${n.path}.${d}`, _ = {
|
|
493
|
-
path: s,
|
|
494
|
-
pref: m,
|
|
495
|
-
value: o?.[d],
|
|
496
|
-
mixed: n.mixed,
|
|
497
|
-
unset: !n.mixed && o?.[d] === void 0,
|
|
498
|
-
siblings: o,
|
|
499
|
-
valueAt: n.valueAt,
|
|
500
|
-
setValue: (e) => {
|
|
501
|
-
let t = o ?? a.fromScalar?.(n.value) ?? (typeof a.default == "object" && a.default !== null ? { ...a.default } : {});
|
|
502
|
-
if (e === void 0) {
|
|
503
|
-
let { [d]: e, ...r } = t;
|
|
504
|
-
n.setValue(r);
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
n.setValue({
|
|
508
|
-
...t,
|
|
509
|
-
[d]: e
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
f.push({
|
|
514
|
-
key: s,
|
|
515
|
-
leaf: m,
|
|
516
|
-
ctx: _,
|
|
517
|
-
ariaLabel: m.name,
|
|
518
|
-
render: () => {
|
|
519
|
-
let n = r?.[s] ?? r?.[m.kind], a = n ? n(_) : z(_, m.name, r, i, !0);
|
|
520
|
-
return a == null ? null : (m.pair !== void 0 || m.block === !0) && m.icon && m.icon in e ? /* @__PURE__ */ g("span", {
|
|
521
|
-
className: M.namedField,
|
|
522
|
-
children: [/* @__PURE__ */ h(t, {
|
|
523
|
-
name: m.icon,
|
|
524
|
-
size: 14
|
|
525
|
-
}), a]
|
|
526
|
-
}) : a;
|
|
527
|
-
}
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
return p(), u.map((e) => typeof e == "object" && e && "controls" in e ? e.block ? /* @__PURE__ */ h("div", {
|
|
531
|
-
className: `${M.rowControls} ${M.blockRow}`,
|
|
532
|
-
title: e.title,
|
|
533
|
-
children: e.controls
|
|
534
|
-
}, e.key) : /* @__PURE__ */ g("div", {
|
|
535
|
-
className: M.row,
|
|
536
|
-
children: [/* @__PURE__ */ h("span", {
|
|
537
|
-
className: M.rowLabel,
|
|
538
|
-
title: e.title,
|
|
539
|
-
children: e.label
|
|
540
|
-
}), /* @__PURE__ */ h("span", {
|
|
541
|
-
className: M.rowControls,
|
|
542
|
-
children: e.controls
|
|
543
|
-
})]
|
|
544
|
-
}, e.key) : e);
|
|
545
|
-
}, l = c(a.children, !s);
|
|
546
|
-
return l.length === 0 ? null : /* @__PURE__ */ g("div", {
|
|
547
|
-
className: M.objectLeaf,
|
|
548
|
-
children: [!s && /* @__PURE__ */ h("h4", {
|
|
549
|
-
className: M.sectionTitle,
|
|
550
|
-
children: a.name
|
|
551
|
-
}), l]
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
function V({ text: e, placeholder: t, ariaLabel: n, onCommit: r }) {
|
|
555
|
-
let [i, a] = x(null);
|
|
556
|
-
return /* @__PURE__ */ h(c, {
|
|
557
|
-
value: i ?? e ?? "",
|
|
558
|
-
placeholder: t,
|
|
559
|
-
"aria-label": n,
|
|
560
|
-
onChange: a,
|
|
561
|
-
onBlur: () => {
|
|
562
|
-
i !== null && i !== e && r(i), a(null);
|
|
563
|
-
},
|
|
564
|
-
onKeyDown: (e) => {
|
|
565
|
-
e.key === "Enter" && e.target.blur();
|
|
566
|
-
}
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
//#endregion
|
|
570
|
-
export { D as a, k as c, C as i, _ as n, j as o, A as r, O as s, P as t };
|
|
571
|
-
|
|
572
|
-
//# sourceMappingURL=SelectionPanel-DTpcQidl.js.map
|