@weasel-js/ui 1.5.2 → 1.6.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-CYvfmEz0.js +57 -0
- package/dist/chunks/ActionBar-CYvfmEz0.js.map +1 -0
- package/dist/chunks/{Badge-CW9pBPFl.js → Badge-DZ0lFs14.js} +755 -738
- package/dist/chunks/Badge-DZ0lFs14.js.map +1 -0
- package/dist/chunks/{BandEditor-jY-PFKY6.js → BandEditor-D-nVrVO4.js} +34 -34
- package/dist/chunks/{BandEditor-jY-PFKY6.js.map → BandEditor-D-nVrVO4.js.map} +1 -1
- package/dist/chunks/Button-Dyp31jMt.js +111 -0
- package/dist/chunks/Button-Dyp31jMt.js.map +1 -0
- package/dist/chunks/ButtonBar-smZzFuEo.js +46 -0
- package/dist/chunks/ButtonBar-smZzFuEo.js.map +1 -0
- package/dist/chunks/Callout-xLjnx7Mp.js +119 -0
- package/dist/chunks/Callout-xLjnx7Mp.js.map +1 -0
- package/dist/chunks/{Checkbox-BOsDAY2F.js → Checkbox-ChZz30Ds.js} +1 -1
- package/dist/chunks/{Checkbox-BOsDAY2F.js.map → Checkbox-ChZz30Ds.js.map} +1 -1
- package/dist/chunks/Code-v4tDWuuN.js +24 -0
- package/dist/chunks/Code-v4tDWuuN.js.map +1 -0
- package/dist/chunks/{ColorField-BYzgZM9o.js → ColorField-DJSCuSJv.js} +15 -15
- package/dist/chunks/ColorField-DJSCuSJv.js.map +1 -0
- package/dist/chunks/ColorModeControl-JOEiqtE0.js +47 -0
- package/dist/chunks/ColorModeControl-JOEiqtE0.js.map +1 -0
- package/dist/chunks/{ComboBox-Cz3f0Y_8.js → ComboBox-C1JgIpML.js} +2 -2
- package/dist/chunks/{ComboBox-Cz3f0Y_8.js.map → ComboBox-C1JgIpML.js.map} +1 -1
- package/dist/chunks/{CurveEditor-DXwSP-iA.js → CurveEditor-f1R4kSbD.js} +2 -2
- package/dist/chunks/{CurveEditor-DXwSP-iA.js.map → CurveEditor-f1R4kSbD.js.map} +1 -1
- package/dist/chunks/DataGrid-CZPrB_3a.js +152 -0
- package/dist/chunks/DataGrid-CZPrB_3a.js.map +1 -0
- package/dist/chunks/DetailList-DHaXX4TG.js +43 -0
- package/dist/chunks/DetailList-DHaXX4TG.js.map +1 -0
- package/dist/chunks/{DetentSlider-CAubVX0J.js → DetentSlider-BYyaZha6.js} +2 -2
- package/dist/chunks/{DetentSlider-CAubVX0J.js.map → DetentSlider-BYyaZha6.js.map} +1 -1
- package/dist/chunks/Dialog-GIvjoDQj.js +66 -0
- package/dist/chunks/Dialog-GIvjoDQj.js.map +1 -0
- package/dist/chunks/Disclosure-D79jhmh2.js +58 -0
- package/dist/chunks/Disclosure-D79jhmh2.js.map +1 -0
- package/dist/chunks/DragGhost-DcU7cOwy.js +30 -0
- package/dist/chunks/DragGhost-DcU7cOwy.js.map +1 -0
- package/dist/chunks/{DragHandleGlyph-CppAz4_8.js → DragHandleGlyph-BtBxHjZS.js} +1 -1
- package/dist/chunks/{DragHandleGlyph-CppAz4_8.js.map → DragHandleGlyph-BtBxHjZS.js.map} +1 -1
- package/dist/chunks/{Field-DWnV8WZY.js → Field-xbqRmjsI.js} +1 -1
- package/dist/chunks/{Field-DWnV8WZY.js.map → Field-xbqRmjsI.js.map} +1 -1
- package/dist/chunks/FillStrokeSwatch-BViKXIPx.js +111 -0
- package/dist/chunks/FillStrokeSwatch-BViKXIPx.js.map +1 -0
- package/dist/chunks/{FontFamilySelect-DxfgTC3G.js → FontFamilySelect-r9TV_xIH.js} +2 -2
- package/dist/chunks/{FontFamilySelect-DxfgTC3G.js.map → FontFamilySelect-r9TV_xIH.js.map} +1 -1
- package/dist/chunks/GradientEditor-BRTxHG-W.js +333 -0
- package/dist/chunks/{GradientEditor-rRBmf3G0.js.map → GradientEditor-BRTxHG-W.js.map} +1 -1
- package/dist/chunks/{Icon-DT0x6HaQ.js → Icon-BW0qv_U7.js} +28 -20
- package/dist/chunks/Icon-BW0qv_U7.js.map +1 -0
- package/dist/chunks/InlineRange-BwGFDhpT.js +29 -0
- package/dist/chunks/InlineRange-BwGFDhpT.js.map +1 -0
- package/dist/chunks/{Input-DbMKpkXy.js → Input-Bx2cuUbS.js} +24 -19
- package/dist/chunks/Input-Bx2cuUbS.js.map +1 -0
- package/dist/chunks/ItemList-DzJ2lK0R.js +175 -0
- package/dist/chunks/ItemList-DzJ2lK0R.js.map +1 -0
- package/dist/chunks/ItemList.module-DDUXfuZL.js +14 -0
- package/dist/chunks/ItemList.module-DDUXfuZL.js.map +1 -0
- package/dist/chunks/{Jog-DkkTlL3_.js → Jog-LPoac9s4.js} +6 -6
- package/dist/chunks/{Jog-DkkTlL3_.js.map → Jog-LPoac9s4.js.map} +1 -1
- package/dist/chunks/{Keycaps-DunVpejA.js → Keycaps-CKiKOJnJ.js} +71 -65
- package/dist/chunks/Keycaps-CKiKOJnJ.js.map +1 -0
- package/dist/chunks/LayerList-BeGrkLb9.js +427 -0
- package/dist/chunks/LayerList-BeGrkLb9.js.map +1 -0
- package/dist/chunks/ListEditor-C6zLzCsJ.js +74 -0
- package/dist/chunks/ListEditor-C6zLzCsJ.js.map +1 -0
- package/dist/chunks/MenuButton-BcdhrNGh.js +70 -0
- package/dist/chunks/MenuButton-BcdhrNGh.js.map +1 -0
- package/dist/chunks/MeshEditor-BOOIFWnz.js +87 -0
- package/dist/chunks/MeshEditor-BOOIFWnz.js.map +1 -0
- package/dist/chunks/{NumberField-CCjEDZCg.js → NumberField-C1Y7zP-a.js} +27 -22
- package/dist/chunks/NumberField-C1Y7zP-a.js.map +1 -0
- package/dist/chunks/{OptionsBar-DeQ-vUeZ.js → OptionsBar-DlcagPYK.js} +3 -3
- package/dist/chunks/{OptionsBar-DeQ-vUeZ.js.map → OptionsBar-DlcagPYK.js.map} +1 -1
- package/dist/chunks/{PaintField-jBOJ32rL.js → PaintField-B2mLRZa4.js} +20 -20
- package/dist/chunks/PaintField-B2mLRZa4.js.map +1 -0
- package/dist/chunks/{PaintInput-Qs7Rul5R.js → PaintInput-BFKhd83I.js} +24 -24
- package/dist/chunks/{PaintInput-Qs7Rul5R.js.map → PaintInput-BFKhd83I.js.map} +1 -1
- package/dist/chunks/{PatternPicker-BMpXWboq.js → PatternPicker-DdfpxoQy.js} +2 -2
- package/dist/chunks/{PatternPicker-BMpXWboq.js.map → PatternPicker-DdfpxoQy.js.map} +1 -1
- package/dist/chunks/{Plot2D-CXf_f7QD.js → Plot2D-lyO7waPQ.js} +1 -1
- package/dist/chunks/{Plot2D-CXf_f7QD.js.map → Plot2D-lyO7waPQ.js.map} +1 -1
- package/dist/chunks/{PointPlotter-S_gz7VYt.js → PointPlotter-DGs9i5P-.js} +2 -2
- package/dist/chunks/{PointPlotter-S_gz7VYt.js.map → PointPlotter-DGs9i5P-.js.map} +1 -1
- package/dist/chunks/{Powerline-Ak5AWUlK.js → Powerline-DBEPceLE.js} +4 -2
- package/dist/chunks/Powerline-DBEPceLE.js.map +1 -0
- package/dist/chunks/Prefs-Ctu0H4-b.js +475 -0
- package/dist/chunks/Prefs-Ctu0H4-b.js.map +1 -0
- package/dist/chunks/Properties-Bbneh1ws.js +281 -0
- package/dist/chunks/Properties-Bbneh1ws.js.map +1 -0
- package/dist/chunks/PropertyField-CDb19d3F.js +756 -0
- package/dist/chunks/PropertyField-CDb19d3F.js.map +1 -0
- package/dist/chunks/{RadioGroup-CsVp3SEu.js → RadioGroup-BK2mD6Q0.js} +2 -2
- package/dist/chunks/{RadioGroup-CsVp3SEu.js.map → RadioGroup-BK2mD6Q0.js.map} +1 -1
- package/dist/chunks/{RangeSlider-DNr-pJpZ.js → RangeSlider-BiRAOsTh.js} +1 -1
- package/dist/chunks/{RangeSlider-DNr-pJpZ.js.map → RangeSlider-BiRAOsTh.js.map} +1 -1
- package/dist/chunks/{ResizeHandle-RXFf5fXr.js → ResizeHandle-Cc6EOehs.js} +9 -9
- package/dist/chunks/{ResizeHandle-RXFf5fXr.js.map → ResizeHandle-Cc6EOehs.js.map} +1 -1
- package/dist/chunks/Select-DVValBe1.js +225 -0
- package/dist/chunks/Select-DVValBe1.js.map +1 -0
- package/dist/chunks/{SelectionPanel-CEbLS-0D.js → SelectionPanel-C5LmZA7b.js} +21 -20
- package/dist/chunks/{SelectionPanel-CEbLS-0D.js.map → SelectionPanel-C5LmZA7b.js.map} +1 -1
- package/dist/chunks/{Sidebar-qn_oSCNX.js → Sidebar-DKKd4R-x.js} +1 -1
- package/dist/chunks/{Sidebar-qn_oSCNX.js.map → Sidebar-DKKd4R-x.js.map} +1 -1
- package/dist/chunks/{SidebarPanel-Bs6V21hg.js → SidebarPanel-u5NsuAZY.js} +15 -19
- package/dist/chunks/SidebarPanel-u5NsuAZY.js.map +1 -0
- package/dist/chunks/{Slider-CIIrqiFS.js → Slider-BwRrWHFW.js} +42 -42
- package/dist/chunks/{Slider-CIIrqiFS.js.map → Slider-BwRrWHFW.js.map} +1 -1
- package/dist/chunks/{StatusBar-B4L15DSm.js → StatusBar-CdPdmmda.js} +1 -1
- package/dist/chunks/{StatusBar-B4L15DSm.js.map → StatusBar-CdPdmmda.js.map} +1 -1
- package/dist/chunks/SwatchGrid-C-Zx2Exd.js +73 -0
- package/dist/chunks/SwatchGrid-C-Zx2Exd.js.map +1 -0
- package/dist/chunks/{Switch-DH5POG0T.js → Switch-DxF7TsEu.js} +1 -1
- package/dist/chunks/{Switch-DH5POG0T.js.map → Switch-DxF7TsEu.js.map} +1 -1
- package/dist/chunks/{Tabs-BFHikpml.js → Tabs-GXEfoe3o.js} +1 -1
- package/dist/chunks/{Tabs-BFHikpml.js.map → Tabs-GXEfoe3o.js.map} +1 -1
- package/dist/chunks/{Timeline-DNKY_yiK.js → Timeline-SgmpQtUV.js} +128 -132
- package/dist/chunks/Timeline-SgmpQtUV.js.map +1 -0
- package/dist/chunks/{Toast-CI1UDuK6.js → Toast-BfcljZz6.js} +1 -1
- package/dist/chunks/{Toast-CI1UDuK6.js.map → Toast-BfcljZz6.js.map} +1 -1
- package/dist/chunks/ToggleBar-Btnl5r7F.js +80 -0
- package/dist/chunks/{ToggleBar-CClus5Cd.js.map → ToggleBar-Btnl5r7F.js.map} +1 -1
- package/dist/chunks/{TokenPanel-BPHq24dc.js → TokenPanel-5ajHEHha.js} +40 -40
- package/dist/chunks/{TokenPanel-BPHq24dc.js.map → TokenPanel-5ajHEHha.js.map} +1 -1
- package/dist/chunks/{ToolButton-9QzJCmuM.js → ToolButton-rzqlFlAc.js} +4 -4
- package/dist/chunks/{ToolButton-9QzJCmuM.js.map → ToolButton-rzqlFlAc.js.map} +1 -1
- package/dist/chunks/{ToolGroup-BJiDrH_i.js → ToolGroup-4bUBV5k6.js} +1 -1
- package/dist/chunks/{ToolGroup-BJiDrH_i.js.map → ToolGroup-4bUBV5k6.js.map} +1 -1
- package/dist/chunks/{ToolOptionsBar-CAM6RcUH.js → ToolOptionsBar-BF3TNXA3.js} +2 -2
- package/dist/chunks/{ToolOptionsBar-CAM6RcUH.js.map → ToolOptionsBar-BF3TNXA3.js.map} +1 -1
- package/dist/chunks/ToolPalette-Uw4PvWwa.js +83 -0
- package/dist/chunks/ToolPalette-Uw4PvWwa.js.map +1 -0
- package/dist/chunks/{Tooltip-C4YBczLq.js → Tooltip-9XiJF937.js} +13 -13
- package/dist/chunks/Tooltip-9XiJF937.js.map +1 -0
- package/dist/chunks/Tree-BGt6P8tI.js +203 -0
- package/dist/chunks/Tree-BGt6P8tI.js.map +1 -0
- package/dist/chunks/{createKeyframeLayer-DKtO0Sw_.js → createKeyframeLayer-BzDRCrrh.js} +71 -71
- package/dist/chunks/{createKeyframeLayer-DKtO0Sw_.js.map → createKeyframeLayer-BzDRCrrh.js.map} +1 -1
- package/dist/chunks/formatShortcut-BoGqUoWi.js +15 -0
- package/dist/chunks/formatShortcut-BoGqUoWi.js.map +1 -0
- package/dist/chunks/icons-DbScMMqX.js +179 -0
- package/dist/chunks/icons-DbScMMqX.js.map +1 -0
- package/dist/chunks/interactiveTarget-C7QUBaJN.js +24 -0
- package/dist/chunks/interactiveTarget-C7QUBaJN.js.map +1 -0
- package/dist/chunks/{keyGlyph-Bp0wnLHn.js → keyGlyph-CLvUHU8c.js} +1 -1
- package/dist/chunks/{keyGlyph-Bp0wnLHn.js.map → keyGlyph-CLvUHU8c.js.map} +1 -1
- package/dist/chunks/model-BQMvTLnW.js +360 -0
- package/dist/chunks/model-BQMvTLnW.js.map +1 -0
- package/dist/chunks/{number-BHz66zQO.js → number-6S8IzXVt.js} +3 -3
- package/dist/chunks/number-6S8IzXVt.js.map +1 -0
- package/dist/chunks/paintPreview-DPtZS4yU.js +42 -0
- package/dist/chunks/paintPreview-DPtZS4yU.js.map +1 -0
- package/dist/chunks/paintValue-Bz6AVuh3.js +18 -0
- package/dist/chunks/paintValue-Bz6AVuh3.js.map +1 -0
- package/dist/chunks/prefField-CLkhrvYl.js +197 -0
- package/dist/chunks/prefField-CLkhrvYl.js.map +1 -0
- package/dist/chunks/segmentTooltip-CAkZlW-t.js +29 -0
- package/dist/chunks/segmentTooltip-CAkZlW-t.js.map +1 -0
- package/dist/chunks/segmentedControl.module-D2nw68Yo.js +11 -0
- package/dist/chunks/segmentedControl.module-D2nw68Yo.js.map +1 -0
- package/dist/chunks/{snap-CEjuWOhN.js → snap-DC4Km8xG.js} +1 -1
- package/dist/chunks/{snap-CEjuWOhN.js.map → snap-DC4Km8xG.js.map} +1 -1
- package/dist/chunks/stance-CarrcbbP.js +17 -0
- package/dist/chunks/stance-CarrcbbP.js.map +1 -0
- package/dist/chunks/useReorderDragList-Dcezzgix.js +131 -0
- package/dist/chunks/useReorderDragList-Dcezzgix.js.map +1 -0
- package/dist/chunks/{useRovingTabIndex-Dkpf_KhN.js → useRovingTabIndex-B4uJqiKP.js} +1 -1
- package/dist/chunks/useRovingTabIndex-B4uJqiKP.js.map +1 -0
- package/dist/color/ramp.d.ts +38 -0
- package/dist/color/ramp.d.ts.map +1 -0
- package/dist/components/ActionBar/ActionBar.d.ts +6 -4
- package/dist/components/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/components/ActionBar/index.js +1 -1
- package/dist/components/Badge/Badge.d.ts +21 -7
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/effects/Aqua.d.ts +1 -1
- package/dist/components/Badge/effects/Aqua.d.ts.map +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Badge/types.d.ts +6 -5
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/BandEditor/index.js +1 -1
- package/dist/components/Button/Button.d.ts +17 -3
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonBar/ButtonBar.d.ts +36 -0
- package/dist/components/ButtonBar/ButtonBar.d.ts.map +1 -0
- package/dist/components/ButtonBar/index.d.ts +3 -0
- package/dist/components/ButtonBar/index.d.ts.map +1 -0
- package/dist/components/ButtonBar/index.js +2 -0
- package/dist/components/Callout/Callout.d.ts +2 -5
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Callout/index.d.ts +1 -1
- package/dist/components/Callout/index.d.ts.map +1 -1
- package/dist/components/Callout/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Code/Code.d.ts +28 -0
- package/dist/components/Code/Code.d.ts.map +1 -0
- package/dist/components/Code/index.d.ts +3 -0
- package/dist/components/Code/index.d.ts.map +1 -0
- package/dist/components/Code/index.js +2 -0
- package/dist/components/ColorField/index.js +1 -1
- package/dist/components/ColorModeControl/ColorModeControl.d.ts +21 -0
- package/dist/components/ColorModeControl/ColorModeControl.d.ts.map +1 -0
- package/dist/components/ColorModeControl/index.d.ts +3 -0
- package/dist/components/ColorModeControl/index.d.ts.map +1 -0
- package/dist/components/ColorModeControl/index.js +2 -0
- package/dist/components/ComboBox/index.js +1 -1
- package/dist/components/CurveEditor/index.js +3 -3
- package/dist/components/DataGrid/DataGrid.d.ts +22 -0
- package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +1 -1
- package/dist/components/DetailList/DetailList.d.ts +36 -0
- package/dist/components/DetailList/DetailList.d.ts.map +1 -0
- package/dist/components/DetailList/index.d.ts +3 -0
- package/dist/components/DetailList/index.d.ts.map +1 -0
- package/dist/components/DetailList/index.js +2 -0
- package/dist/components/DetentSlider/index.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +8 -2
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Disclosure/Disclosure.d.ts +25 -17
- package/dist/components/Disclosure/Disclosure.d.ts.map +1 -1
- package/dist/components/Disclosure/index.d.ts +2 -2
- package/dist/components/Disclosure/index.d.ts.map +1 -1
- package/dist/components/Disclosure/index.js +2 -2
- package/dist/components/DragGhost/DragGhost.d.ts +21 -0
- package/dist/components/DragGhost/DragGhost.d.ts.map +1 -0
- package/dist/components/DragGhost/index.d.ts +3 -0
- package/dist/components/DragGhost/index.d.ts.map +1 -0
- package/dist/components/DragGhost/index.js +2 -0
- package/dist/components/DragHandleGlyph/index.js +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts +45 -0
- package/dist/components/FillStrokeSwatch/FillStrokeSwatch.d.ts.map +1 -0
- package/dist/components/FillStrokeSwatch/index.d.ts +3 -0
- package/dist/components/FillStrokeSwatch/index.d.ts.map +1 -0
- package/dist/components/FillStrokeSwatch/index.js +2 -0
- package/dist/components/FontFamilySelect/index.js +1 -1
- package/dist/components/GradientEditor/SceneGradientHandles.d.ts.map +1 -1
- package/dist/components/GradientEditor/index.js +1 -1
- package/dist/components/InlineRange/InlineRange.d.ts +6 -2
- package/dist/components/InlineRange/InlineRange.d.ts.map +1 -1
- package/dist/components/InlineRange/index.js +1 -1
- package/dist/components/Input/Input.d.ts +13 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/ItemList/ItemList.d.ts +70 -10
- package/dist/components/ItemList/ItemList.d.ts.map +1 -1
- package/dist/components/ItemList/index.js +1 -1
- package/dist/components/Jog/index.js +1 -1
- package/dist/components/Keycaps/index.d.ts +1 -0
- package/dist/components/Keycaps/index.d.ts.map +1 -1
- package/dist/components/Keycaps/index.js +3 -3
- package/dist/components/Keycaps/keySpecsFromMods.d.ts +2 -0
- package/dist/components/Keycaps/keySpecsFromMods.d.ts.map +1 -1
- package/dist/components/Keycaps/keySpecsFromShortcut.d.ts +16 -0
- package/dist/components/Keycaps/keySpecsFromShortcut.d.ts.map +1 -0
- package/dist/components/LayerList/LayerList.d.ts +79 -0
- package/dist/components/LayerList/LayerList.d.ts.map +1 -0
- package/dist/components/LayerList/index.d.ts +3 -0
- package/dist/components/LayerList/index.d.ts.map +1 -0
- package/dist/components/LayerList/index.js +2 -0
- package/dist/components/LayerList/useSceneLayerList.d.ts +20 -0
- package/dist/components/LayerList/useSceneLayerList.d.ts.map +1 -0
- package/dist/components/ListEditor/ListEditor.d.ts +23 -0
- package/dist/components/ListEditor/ListEditor.d.ts.map +1 -0
- package/dist/components/ListEditor/index.d.ts +3 -0
- package/dist/components/ListEditor/index.d.ts.map +1 -0
- package/dist/components/ListEditor/index.js +2 -0
- package/dist/components/MenuButton/MenuButton.d.ts +6 -2
- package/dist/components/MenuButton/MenuButton.d.ts.map +1 -1
- package/dist/components/MenuButton/index.js +1 -1
- package/dist/components/MeshEditor/index.js +1 -1
- package/dist/components/NumberField/NumberField.d.ts +13 -0
- package/dist/components/NumberField/NumberField.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/Powerline.d.ts +4 -3
- package/dist/components/Powerline/Powerline.d.ts.map +1 -1
- package/dist/components/Powerline/index.js +2 -2
- package/dist/components/Prefs/PrefsDialog.d.ts +10 -2
- package/dist/components/Prefs/PrefsDialog.d.ts.map +1 -1
- package/dist/components/Prefs/PrefsForm.d.ts +26 -25
- package/dist/components/Prefs/PrefsForm.d.ts.map +1 -1
- package/dist/components/Prefs/PrefsPane.d.ts +24 -0
- package/dist/components/Prefs/PrefsPane.d.ts.map +1 -0
- package/dist/components/Prefs/PrefsRail.d.ts +32 -0
- package/dist/components/Prefs/PrefsRail.d.ts.map +1 -0
- package/dist/components/Prefs/PrefsRow.d.ts +32 -0
- package/dist/components/Prefs/PrefsRow.d.ts.map +1 -0
- package/dist/components/Prefs/index.d.ts +5 -2
- package/dist/components/Prefs/index.d.ts.map +1 -1
- package/dist/components/Prefs/index.js +3 -3
- package/dist/components/Prefs/prefField.d.ts +36 -0
- package/dist/components/Prefs/prefField.d.ts.map +1 -0
- package/dist/components/Prefs/schema.d.ts +30 -0
- package/dist/components/Prefs/schema.d.ts.map +1 -1
- package/dist/components/Properties/DialogRow.d.ts +33 -0
- package/dist/components/Properties/DialogRow.d.ts.map +1 -0
- package/dist/components/Properties/PropertyField.d.ts +238 -0
- package/dist/components/Properties/PropertyField.d.ts.map +1 -0
- package/dist/components/Properties/PropertyGroup.d.ts +12 -3
- package/dist/components/Properties/PropertyGroup.d.ts.map +1 -1
- package/dist/components/Properties/PropertyPanel.d.ts +32 -236
- package/dist/components/Properties/PropertyPanel.d.ts.map +1 -1
- package/dist/components/Properties/Subpanel.d.ts +14 -0
- package/dist/components/Properties/Subpanel.d.ts.map +1 -0
- package/dist/components/Properties/index.d.ts +8 -4
- package/dist/components/Properties/index.d.ts.map +1 -1
- package/dist/components/Properties/index.js +3 -2
- package/dist/components/Properties/storyLayouts.d.ts.map +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 +38 -5
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +2 -2
- package/dist/components/SelectionPanel/index.js +2 -2
- package/dist/components/SelectionPanel/renderLeaf.d.ts +14 -8
- package/dist/components/SelectionPanel/renderLeaf.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/SidebarPanel/SidebarPanel.d.ts +2 -2
- package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +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/SwatchGrid/SwatchGrid.d.ts +34 -0
- package/dist/components/SwatchGrid/SwatchGrid.d.ts.map +1 -0
- package/dist/components/SwatchGrid/index.d.ts +3 -0
- package/dist/components/SwatchGrid/index.d.ts.map +1 -0
- package/dist/components/SwatchGrid/index.js +2 -0
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Lane.d.ts.map +1 -1
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleBar/ToggleBar.d.ts +2 -1
- package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -1
- package/dist/components/ToggleBar/index.js +1 -1
- package/dist/components/TokenPanel/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.d.ts +1 -0
- package/dist/components/ToolPalette/index.d.ts.map +1 -1
- package/dist/components/ToolPalette/index.js +3 -2
- package/dist/components/Tooltip/Tooltip.d.ts +6 -2
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/Tree/Tree.d.ts +84 -0
- package/dist/components/Tree/Tree.d.ts.map +1 -0
- package/dist/components/Tree/index.d.ts +3 -0
- package/dist/components/Tree/index.d.ts.map +1 -0
- package/dist/components/Tree/index.js +2 -0
- package/dist/components/segmentTooltip.d.ts +30 -0
- package/dist/components/segmentTooltip.d.ts.map +1 -0
- package/dist/components/stance.d.ts +30 -0
- package/dist/components/stance.d.ts.map +1 -0
- package/dist/components/stanceCss.d.ts +31 -0
- package/dist/components/stanceCss.d.ts.map +1 -0
- package/dist/components/stanceSurfaces.d.ts +4 -0
- package/dist/components/stanceSurfaces.d.ts.map +1 -0
- package/dist/format/number.d.ts +3 -2
- package/dist/format/number.d.ts.map +1 -1
- package/dist/icons/Icon.d.ts.map +1 -1
- package/dist/icons/ShapeKindIcon.d.ts +10 -0
- package/dist/icons/ShapeKindIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +5 -3
- 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 +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -78
- package/dist/index.js.map +1 -1
- package/dist/interactiveTarget.d.ts +9 -0
- package/dist/interactiveTarget.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/useReorderDragList.d.ts +36 -7
- package/dist/useReorderDragList.d.ts.map +1 -1
- package/dist/useRovingTabIndex.d.ts +1 -1
- package/dist/useScrollSpy.d.ts +48 -0
- package/dist/useScrollSpy.d.ts.map +1 -0
- package/package.json +8 -8
- package/dist/chunks/ActionBar-CLwiY3Jg.js +0 -62
- package/dist/chunks/ActionBar-CLwiY3Jg.js.map +0 -1
- package/dist/chunks/ActionsBar-D84a4eGy.js +0 -41
- package/dist/chunks/ActionsBar-D84a4eGy.js.map +0 -1
- package/dist/chunks/Badge-CW9pBPFl.js.map +0 -1
- package/dist/chunks/Button-DRSApvnK.js +0 -90
- package/dist/chunks/Button-DRSApvnK.js.map +0 -1
- package/dist/chunks/Callout-DrNu-9Qr.js +0 -122
- package/dist/chunks/Callout-DrNu-9Qr.js.map +0 -1
- package/dist/chunks/ColorField-BYzgZM9o.js.map +0 -1
- package/dist/chunks/DataGrid-C8KrYtw7.js +0 -104
- package/dist/chunks/DataGrid-C8KrYtw7.js.map +0 -1
- package/dist/chunks/Dialog-fGqqQ6o_.js +0 -61
- package/dist/chunks/Dialog-fGqqQ6o_.js.map +0 -1
- package/dist/chunks/Disclosure-CILDfWsU.js +0 -47
- package/dist/chunks/Disclosure-CILDfWsU.js.map +0 -1
- package/dist/chunks/GradientEditor-rRBmf3G0.js +0 -333
- package/dist/chunks/Icon-DT0x6HaQ.js.map +0 -1
- package/dist/chunks/InlineRange-DdIlfGqG.js +0 -29
- package/dist/chunks/InlineRange-DdIlfGqG.js.map +0 -1
- package/dist/chunks/Input-DbMKpkXy.js.map +0 -1
- package/dist/chunks/ItemList-B9zYb0GE.js +0 -42
- package/dist/chunks/ItemList-B9zYb0GE.js.map +0 -1
- package/dist/chunks/Keycaps-DunVpejA.js.map +0 -1
- package/dist/chunks/LayerStack-CfQ6GsRz.js +0 -142
- package/dist/chunks/LayerStack-CfQ6GsRz.js.map +0 -1
- package/dist/chunks/MenuButton-C_4nox39.js +0 -60
- package/dist/chunks/MenuButton-C_4nox39.js.map +0 -1
- package/dist/chunks/MeshEditor-Bipz-Ocl.js +0 -123
- package/dist/chunks/MeshEditor-Bipz-Ocl.js.map +0 -1
- package/dist/chunks/NumberField-CCjEDZCg.js.map +0 -1
- package/dist/chunks/PaintField-jBOJ32rL.js.map +0 -1
- package/dist/chunks/Powerline-Ak5AWUlK.js.map +0 -1
- package/dist/chunks/Prefs-CNC8tzyN.js +0 -308
- package/dist/chunks/Prefs-CNC8tzyN.js.map +0 -1
- package/dist/chunks/Properties-Rnb6TAbN.js +0 -891
- package/dist/chunks/Properties-Rnb6TAbN.js.map +0 -1
- package/dist/chunks/Select-BEope086.js +0 -190
- package/dist/chunks/Select-BEope086.js.map +0 -1
- package/dist/chunks/SidebarPanel-Bs6V21hg.js.map +0 -1
- package/dist/chunks/Timeline-DNKY_yiK.js.map +0 -1
- package/dist/chunks/ToggleBar-CClus5Cd.js +0 -75
- package/dist/chunks/ToolPalette-DGkKwE7D.js +0 -97
- package/dist/chunks/ToolPalette-DGkKwE7D.js.map +0 -1
- package/dist/chunks/Tooltip-C4YBczLq.js.map +0 -1
- package/dist/chunks/icons-DFLytcui.js +0 -165
- package/dist/chunks/icons-DFLytcui.js.map +0 -1
- package/dist/chunks/model-13kZ_-mE.js +0 -483
- package/dist/chunks/model-13kZ_-mE.js.map +0 -1
- package/dist/chunks/number-BHz66zQO.js.map +0 -1
- package/dist/chunks/range.module-DSsOIq1R.js +0 -8
- package/dist/chunks/range.module-DSsOIq1R.js.map +0 -1
- package/dist/chunks/schema-Dft4Cu2p.js +0 -47
- package/dist/chunks/schema-Dft4Cu2p.js.map +0 -1
- package/dist/chunks/segmentedControl.module-DS72X1ns.js +0 -11
- package/dist/chunks/segmentedControl.module-DS72X1ns.js.map +0 -1
- package/dist/chunks/useReorderDragList-CSQGd7zQ.js +0 -102
- package/dist/chunks/useReorderDragList-CSQGd7zQ.js.map +0 -1
- package/dist/chunks/useRovingTabIndex-Dkpf_KhN.js.map +0 -1
- package/dist/components/ActionsBar/ActionsBar.d.ts +0 -35
- package/dist/components/ActionsBar/ActionsBar.d.ts.map +0 -1
- package/dist/components/ActionsBar/index.d.ts +0 -3
- package/dist/components/ActionsBar/index.d.ts.map +0 -1
- package/dist/components/ActionsBar/index.js +0 -2
- package/dist/components/LayerStack/LayerStack.d.ts +0 -62
- package/dist/components/LayerStack/LayerStack.d.ts.map +0 -1
- package/dist/components/LayerStack/index.d.ts +0 -2
- package/dist/components/LayerStack/index.d.ts.map +0 -1
- package/dist/components/LayerStack/index.js +0 -2
- package/dist/components/Properties/EffectCard.d.ts +0 -69
- package/dist/components/Properties/EffectCard.d.ts.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { r as e } from "./portalHost-CjpCnuGU.js";
|
|
2
|
+
import { t } from "./stance-CarrcbbP.js";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { Dialog as a, Heading as o, Modal as s, ModalOverlay as c } from "react-aria-components";
|
|
5
|
+
var l = {
|
|
6
|
+
overlay: "_overlay_122x3_1",
|
|
7
|
+
modal: "_modal_122x3_29",
|
|
8
|
+
dialog: "_dialog_122x3_223",
|
|
9
|
+
header: "_header_122x3_231",
|
|
10
|
+
title: "_title_122x3_240",
|
|
11
|
+
close: "_close_122x3_251",
|
|
12
|
+
body: "_body_122x3_273",
|
|
13
|
+
footer: "_footer_122x3_288"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/Dialog/Dialog.tsx
|
|
17
|
+
function u(u) {
|
|
18
|
+
let { title: d, showCloseButton: f, children: p, footer: m, role: h = "dialog", className: g, bodyClassName: _, isOpen: v, onOpenChange: y, portalContainer: b, stance: x, tone: S, ...C } = u, w = t({
|
|
19
|
+
stance: x,
|
|
20
|
+
tone: S
|
|
21
|
+
}), T = f ?? !!y, { anchor: E, portalProps: D } = e(b);
|
|
22
|
+
return /* @__PURE__ */ i(n, { children: [E, /* @__PURE__ */ r(c, {
|
|
23
|
+
...C,
|
|
24
|
+
isOpen: v,
|
|
25
|
+
onOpenChange: y,
|
|
26
|
+
className: l.overlay,
|
|
27
|
+
"data-weasel-overlay": "",
|
|
28
|
+
...D,
|
|
29
|
+
children: /* @__PURE__ */ r(s, {
|
|
30
|
+
className: [l.modal, g].filter(Boolean).join(" "),
|
|
31
|
+
...w,
|
|
32
|
+
children: /* @__PURE__ */ r(a, {
|
|
33
|
+
role: h,
|
|
34
|
+
className: l.dialog,
|
|
35
|
+
children: ({ close: e }) => /* @__PURE__ */ i(n, { children: [
|
|
36
|
+
(d !== void 0 || T) && /* @__PURE__ */ i("header", {
|
|
37
|
+
className: l.header,
|
|
38
|
+
children: [d !== void 0 && /* @__PURE__ */ r(o, {
|
|
39
|
+
slot: "title",
|
|
40
|
+
className: l.title,
|
|
41
|
+
children: d
|
|
42
|
+
}), T && /* @__PURE__ */ r("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
className: l.close,
|
|
45
|
+
onClick: e,
|
|
46
|
+
"aria-label": "Close dialog",
|
|
47
|
+
children: "×"
|
|
48
|
+
})]
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ r("div", {
|
|
51
|
+
className: [l.body, _].filter(Boolean).join(" "),
|
|
52
|
+
children: p
|
|
53
|
+
}),
|
|
54
|
+
m !== void 0 && /* @__PURE__ */ r("footer", {
|
|
55
|
+
className: l.footer,
|
|
56
|
+
children: m
|
|
57
|
+
})
|
|
58
|
+
] })
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})] });
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { u as t };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=Dialog-GIvjoDQj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog-GIvjoDQj.js","names":[],"sources":["../../src/components/Dialog/Dialog.module.css","../../src/components/Dialog/Dialog.tsx"],"sourcesContent":[".overlay {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n opacity: 0;\n transition: opacity var(--wzl-motion-fast);\n}\n\n.overlay[data-entering] {\n opacity: 0;\n}\n\n.overlay[data-entering][data-rac] {\n opacity: 1;\n}\n\n.overlay[data-exiting] {\n opacity: 0;\n}\n\n.overlay[data-rac]:not([data-entering]):not([data-exiting]) {\n opacity: 1;\n}\n\n.modal {\n background: var(--_s-fill);\n border: var(--_s-border-width) var(--_s-border-style) var(--_s-border-color);\n border-radius: var(--_s-radius);\n box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);\n color: var(--wzl-fg);\n font-family: var(--wzl-font-ui);\n max-width: min(900px, calc(100vw - 32px));\n max-height: calc(100vh - 32px);\n display: flex;\n flex-direction: column;\n outline: none;\n}\n\n/* BEGIN GENERATED stance rules: dialog — `npm run gen:stances`, do not edit. */\n\n.modal {\n --wzl-tone: initial;\n}\n\n.modal {\n --_s-surface: var(--wzl-surface);\n --_s-border-color: var(--wzl-border);\n --_s-border-style: solid;\n --_s-border-width: 1px;\n --_s-radius: var(--wzl-radius-md);\n --_s-tone-mix: var(--wzl-panel-tone-mix);\n --_s-tone: var(--wzl-tone, var(--_s-surface));\n --_s-accent: var(--wzl-tone);\n --_s-title-font: var(--wzl-font-ui);\n --_s-title-weight: var(--wzl-font-weight-bold);\n --_s-title-size: var(--wzl-font-size);\n --_s-title-case: none;\n --_s-title-tracking: normal;\n --_s-title-color: var(--wzl-fg);\n}\n\n.modal[data-stance='scope'] {\n --_s-surface: var(--wzl-stance-scope-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-scope-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-scope-border-style, solid);\n --_s-border-width: var(--wzl-stance-scope-border-width, 1px);\n --_s-radius: var(--wzl-stance-scope-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-scope-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-scope-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-scope-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-scope-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-scope-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-scope-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-scope-title-case, none);\n --_s-title-tracking: var(--wzl-stance-scope-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-scope-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='aside'] {\n --_s-surface: var(--wzl-stance-aside-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-aside-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-aside-border-style, solid);\n --_s-border-width: var(--wzl-stance-aside-border-width, 1px);\n --_s-radius: var(--wzl-stance-aside-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-aside-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-aside-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-aside-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-aside-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-aside-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-aside-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-aside-title-case, none);\n --_s-title-tracking: var(--wzl-stance-aside-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-aside-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='advanced'] {\n --_s-surface: var(--wzl-stance-advanced-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-advanced-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-advanced-border-style, solid);\n --_s-border-width: var(--wzl-stance-advanced-border-width, 1px);\n --_s-radius: var(--wzl-stance-advanced-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-advanced-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-advanced-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-advanced-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-advanced-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-advanced-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-advanced-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-advanced-title-case, none);\n --_s-title-tracking: var(--wzl-stance-advanced-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-advanced-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='debug'] {\n --_s-surface: var(--wzl-stance-debug-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-debug-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-debug-border-style, solid);\n --_s-border-width: var(--wzl-stance-debug-border-width, 1px);\n --_s-radius: var(--wzl-stance-debug-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-debug-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-debug-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-debug-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-debug-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-debug-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-debug-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-debug-title-case, none);\n --_s-title-tracking: var(--wzl-stance-debug-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-debug-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='danger'] {\n --_s-surface: var(--wzl-stance-danger-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-danger-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-danger-border-style, solid);\n --_s-border-width: var(--wzl-stance-danger-border-width, 1px);\n --_s-radius: var(--wzl-stance-danger-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-danger-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-danger-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-danger-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-danger-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-danger-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-danger-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-danger-title-case, none);\n --_s-title-tracking: var(--wzl-stance-danger-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-danger-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='notice'] {\n --_s-surface: var(--wzl-stance-notice-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-notice-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-notice-border-style, solid);\n --_s-border-width: var(--wzl-stance-notice-border-width, 1px);\n --_s-radius: var(--wzl-stance-notice-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-notice-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-notice-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-notice-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-notice-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-notice-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-notice-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-notice-title-case, none);\n --_s-title-tracking: var(--wzl-stance-notice-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-notice-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='important'] {\n --_s-surface: var(--wzl-stance-important-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-important-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-important-border-style, solid);\n --_s-border-width: var(--wzl-stance-important-border-width, 1px);\n --_s-radius: var(--wzl-stance-important-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-important-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-important-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-important-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-important-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-important-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-important-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-important-title-case, none);\n --_s-title-tracking: var(--wzl-stance-important-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-important-title-color, var(--wzl-fg));\n}\n\n.modal[data-stance='preview'] {\n --_s-surface: var(--wzl-stance-preview-surface, var(--wzl-surface));\n --_s-border-color: var(--wzl-stance-preview-border-color, var(--wzl-border));\n --_s-border-style: var(--wzl-stance-preview-border-style, solid);\n --_s-border-width: var(--wzl-stance-preview-border-width, 1px);\n --_s-radius: var(--wzl-stance-preview-radius, var(--wzl-radius-md));\n --_s-tone-mix: var(--wzl-stance-preview-tone-mix, var(--wzl-panel-tone-mix));\n --_s-tone: var(--wzl-tone, var(--wzl-stance-preview-tone, var(--_s-surface)));\n --_s-accent: var(--wzl-stance-preview-accent, var(--wzl-tone));\n --_s-title-font: var(--wzl-stance-preview-title-font, var(--wzl-font-ui));\n --_s-title-weight: var(--wzl-stance-preview-title-weight, var(--wzl-font-weight-bold));\n --_s-title-size: var(--wzl-stance-preview-title-size, var(--wzl-font-size));\n --_s-title-case: var(--wzl-stance-preview-title-case, none);\n --_s-title-tracking: var(--wzl-stance-preview-title-tracking, normal);\n --_s-title-color: var(--wzl-stance-preview-title-color, var(--wzl-fg));\n}\n\n.modal {\n --_s-fill: var(--_s-surface);\n}\n\n.modal[data-tone],\n.modal[data-stance] {\n --_s-fill: color-mix(in oklab, var(--_s-tone) var(--_s-tone-mix), var(--_s-surface));\n}\n\n.modal[data-tone] {\n --wzl-accent: var(--_s-accent);\n --wzl-accent-base: var(--_s-accent);\n --wzl-accent-strong: color-mix(in oklab, var(--_s-accent) 70%, var(--wzl-fg));\n --wzl-accent-soft: color-mix(in oklab, var(--_s-accent) 45%, var(--wzl-surface));\n --wzl-accent-hover: var(--wzl-accent-strong);\n --wzl-accent-fg: var(--wzl-accent-strong);\n --wzl-focus-ring: var(--wzl-accent-strong);\n}\n\n/* END GENERATED stance rules: dialog */\n\n.dialog {\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1;\n outline: none;\n}\n\n.header {\n display: flex;\n align-items: center;\n gap: var(--wzl-space-6);\n padding: var(--wzl-space-7) var(--wzl-space-8);\n border-bottom: 1px solid var(--wzl-border);\n flex: 0 0 auto;\n}\n\n.title {\n flex: 1;\n margin: 0;\n font-family: var(--_s-title-font);\n font-size: var(--_s-title-size);\n font-weight: var(--_s-title-weight);\n text-transform: var(--_s-title-case);\n letter-spacing: var(--_s-title-tracking);\n color: var(--_s-title-color);\n}\n\n.close {\n flex: 0 0 auto;\n width: var(--wzl-icon-button-size);\n height: var(--wzl-icon-button-size);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: 1px solid transparent;\n border-radius: var(--wzl-radius-sm);\n color: var(--wzl-fg-muted);\n cursor: pointer;\n padding: 0;\n font-size: var(--wzl-font-size-lg);\n line-height: 1;\n}\n\n.close:hover {\n background: var(--wzl-surface-hover);\n color: var(--wzl-fg);\n}\n\n.body {\n flex: 1;\n}\n\n/* Defaults, not rules: `bodyClassName` exists to turn these off for content\n that scrolls itself, and a plain class would tie with it on specificity and\n be decided by stylesheet order. `min-height` is here for the same reason —\n left in the rule above it silently beat a consumer class asking the body to\n hold a height, and the dialog resized itself around every pane. */\n:where(.body) {\n min-height: 0;\n overflow: auto;\n padding: var(--wzl-space-8);\n}\n\n.footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--wzl-space-4);\n padding: var(--wzl-space-6) var(--wzl-space-8);\n border-top: 1px solid var(--wzl-border);\n flex: 0 0 auto;\n}\n","import type { ReactNode } from 'react';\nimport {\n Modal as RACModal,\n ModalOverlay,\n Dialog as RACDialog,\n Heading,\n type ModalOverlayProps,\n type DialogProps as RACDialogProps,\n} from 'react-aria-components';\nimport { useOverlayPortal, type OverlayPortalProps, type WithoutPortalTarget } from '../../overlays/portalHost';\nimport { type StanceProps, useStance } from '../stance';\nimport s from './Dialog.module.css';\n\n/** Props for {@link Dialog}, on top of React Aria's `ModalOverlay` props. */\nexport type DialogProps = Omit<\n WithoutPortalTarget<ModalOverlayProps>,\n 'children' | 'className'\n> &\n OverlayPortalProps &\n StanceProps & {\n /** Heading rendered in the dialog's default header. Omit when supplying\n * a custom `header` slot via children. */\n title?: ReactNode;\n /** Show the built-in close button. Defaults to true when `onOpenChange`\n * is wired so the user has an escape hatch. */\n showCloseButton?: boolean;\n /** Body content. */\n children?: ReactNode;\n /** Footer slot — typically action buttons. */\n footer?: ReactNode;\n /** ARIA role. Defaults to `dialog`. Use `alertdialog` for confirms. */\n role?: RACDialogProps['role'];\n /** Class applied to the modal box (inside the overlay). */\n className?: string;\n /** Class applied to the scrolling body. For content that owns its own\n * scrolling — a form with a fixed navigation rail beside a scrolling\n * pane — this is where the body's padding and overflow come off. */\n bodyClassName?: string;\n };\n\n/**\n * Modal dialog wrapping React Aria. Supplies a default header (title +\n * close), scrollable body, and footer slot. Pass `isOpen` + `onOpenChange`\n * for controlled visibility, or omit both and use a `<DialogTrigger>` from\n * `react-aria-components` upstream of this component.\n *\n * Escape, click-outside, focus trap, and scroll lock all come from the\n * underlying primitives. `stance` and `tone` work as on `<PropertyPanel>` —\n * a destructive confirm is `stance=\"danger\"`.\n */\nexport function Dialog(props: DialogProps) {\n const {\n title,\n showCloseButton,\n children,\n footer,\n role = 'dialog',\n className,\n bodyClassName,\n isOpen,\n onOpenChange,\n portalContainer,\n stance,\n tone,\n ...rest\n } = props;\n const stanced = useStance({ stance, tone });\n\n const showClose = showCloseButton ?? Boolean(onOpenChange);\n const { anchor, portalProps } = useOverlayPortal(portalContainer);\n\n return (\n <>\n {anchor}\n <ModalOverlay\n {...rest}\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n className={s.overlay}\n data-weasel-overlay=\"\"\n {...portalProps}\n >\n <RACModal className={[s.modal, className].filter(Boolean).join(' ')} {...stanced}>\n <RACDialog role={role} className={s.dialog}>\n {({ close }) => (\n <>\n {(title !== undefined || showClose) && (\n <header className={s.header}>\n {title !== undefined && (\n <Heading slot=\"title\" className={s.title}>{title}</Heading>\n )}\n {showClose && (\n <button\n type=\"button\"\n className={s.close}\n onClick={close}\n aria-label=\"Close dialog\"\n >\n ×\n </button>\n )}\n </header>\n )}\n <div className={[s.body, bodyClassName].filter(Boolean).join(' ')}>{children}</div>\n {footer !== undefined && <footer className={s.footer}>{footer}</footer>}\n </>\n )}\n </RACDialog>\n </RACModal>\n </ModalOverlay>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;ACkDA,SAAgB,EAAO,GAAoB;CACzC,IAAM,EACJ,UACA,oBACA,aACA,WACA,UAAO,UACP,cACA,kBACA,WACA,iBACA,oBACA,WACA,SACA,GAAG,MACD,GACE,IAAU,EAAU;EAAE;EAAQ;EAAM,CAAC,EAErC,IAAY,KAAmB,EAAQ,GACvC,EAAE,WAAQ,mBAAgB,EAAiB,EAAgB;AAEjE,QACE,kBAAA,GAAA,EAAA,UAAA,CACG,GACD,kBAAC,GAAD;EACE,GAAI;EACI;EACM;EACd,WAAW,EAAE;EACb,uBAAoB;EACpB,GAAI;YAEJ,kBAAC,GAAD;GAAU,WAAW,CAAC,EAAE,OAAO,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;GAAE,GAAI;aACvE,kBAAC,GAAD;IAAiB;IAAM,WAAW,EAAE;eAChC,EAAE,eACF,kBAAA,GAAA,EAAA,UAAA;MACI,MAAU,KAAA,KAAa,MACvB,kBAAC,UAAD;MAAQ,WAAW,EAAE;gBAArB,CACG,MAAU,KAAA,KACT,kBAAC,GAAD;OAAS,MAAK;OAAQ,WAAW,EAAE;iBAAQ;OAAgB,CAAA,EAE5D,KACC,kBAAC,UAAD;OACE,MAAK;OACL,WAAW,EAAE;OACb,SAAS;OACT,cAAW;iBACZ;OAEQ,CAAA,CAEJ;;KAEX,kBAAC,OAAD;MAAK,WAAW,CAAC,EAAE,MAAM,EAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;MAAG;MAAe,CAAA;KAClF,MAAW,KAAA,KAAa,kBAAC,UAAD;MAAQ,WAAW,EAAE;gBAAS;MAAgB,CAAA;KACtE,EAAA,CAAA;IAEK,CAAA;GACH,CAAA;EACE,CAAA,CACd,EAAA,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
var n = {
|
|
3
|
+
twisty: "_twisty_1ywy2_5",
|
|
4
|
+
mark: "_mark_1ywy2_35",
|
|
5
|
+
lozenge: "_lozenge_1ywy2_40",
|
|
6
|
+
sign: "_sign_1ywy2_53",
|
|
7
|
+
row: "_row_1ywy2_65",
|
|
8
|
+
rowBody: "_rowBody_1ywy2_73"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/components/Disclosure/Disclosure.tsx
|
|
12
|
+
function r({ open: r, size: i = 13, className: a }) {
|
|
13
|
+
return /* @__PURE__ */ t("svg", {
|
|
14
|
+
className: a ? `${n.mark} ${a}` : n.mark,
|
|
15
|
+
viewBox: "0 0 13 13",
|
|
16
|
+
width: i,
|
|
17
|
+
height: i,
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
focusable: "false",
|
|
20
|
+
children: [/* @__PURE__ */ e("rect", {
|
|
21
|
+
className: n.lozenge,
|
|
22
|
+
width: "13",
|
|
23
|
+
height: "13",
|
|
24
|
+
rx: "3"
|
|
25
|
+
}), /* @__PURE__ */ e("path", {
|
|
26
|
+
className: n.sign,
|
|
27
|
+
d: r ? "M3 6.5 H10" : "M3 6.5 H10 M6.5 3 V10"
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function i({ open: t, onToggle: i, label: a, controls: o, size: s = 13, disabled: c, className: l }) {
|
|
32
|
+
return /* @__PURE__ */ e("button", {
|
|
33
|
+
type: "button",
|
|
34
|
+
className: l ? `${n.twisty} ${l}` : n.twisty,
|
|
35
|
+
"aria-expanded": t,
|
|
36
|
+
"aria-controls": o,
|
|
37
|
+
"aria-label": a,
|
|
38
|
+
disabled: c,
|
|
39
|
+
onClick: i,
|
|
40
|
+
children: /* @__PURE__ */ e(r, {
|
|
41
|
+
open: t,
|
|
42
|
+
size: s
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function a({ children: r, className: a, ...o }) {
|
|
47
|
+
return /* @__PURE__ */ t("div", {
|
|
48
|
+
className: a ? `${n.row} ${a}` : n.row,
|
|
49
|
+
children: [/* @__PURE__ */ e(i, { ...o }), /* @__PURE__ */ e("div", {
|
|
50
|
+
className: n.rowBody,
|
|
51
|
+
children: r
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { r as n, a as r, i as t };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=Disclosure-D79jhmh2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Disclosure-D79jhmh2.js","names":[],"sources":["../../src/components/Disclosure/Disclosure.module.css","../../src/components/Disclosure/Disclosure.tsx"],"sourcesContent":["/* Every dimension is stated because a host app's bare-element defaults can be\n authored at zero specificity — labkit's `:where(.lk-root) :where(button)`\n sets `height: var(--wzl-control-h)` and horizontal padding, which would\n otherwise stretch a 12px mark into a full-height control. */\n.twisty {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* A floor, not a size: a control sized to a 12px glyph is a 12px target,\n which is under every pointer-size guideline there is. Stated as a minimum\n so a larger mark grows the target with it rather than being shrunk to fit\n — a flex item's default `flex-shrink: 1` would otherwise crush it. */\n min-width: var(--wzl-disclosure-target, var(--wzl-control-h-sm));\n min-height: var(--wzl-disclosure-target, var(--wzl-control-h-sm));\n padding: 0;\n border: 0;\n border-radius: var(--wzl-radius-sm);\n background: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n line-height: 1;\n cursor: pointer;\n}\n\n.twisty:focus-visible {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: -2px;\n}\n\n.twisty:disabled {\n cursor: not-allowed;\n}\n\n.mark {\n display: block;\n flex: none;\n}\n\n.lozenge {\n fill: var(--wzl-disclosure-fill, var(--wzl-accent-fg));\n transition: fill var(--wzl-motion-fast, 90ms) var(--wzl-ease-out-cubic);\n}\n\n.twisty:hover:not(:disabled) .lozenge {\n fill: color-mix(in oklab, var(--wzl-disclosure-fill, var(--wzl-accent-fg)), white 15%);\n}\n\n.twisty:disabled .lozenge {\n fill: var(--wzl-fg-subtle);\n}\n\n.sign {\n fill: none;\n stroke: var(--wzl-fg-on-accent);\n stroke-width: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .lozenge {\n transition: none;\n }\n}\n\n.row {\n display: flex;\n align-items: center;\n gap: var(--wzl-disclosure-gap, 4px);\n}\n\n/* The row's content takes the rest and is allowed to shrink; the twisty is\n not, so a long label truncates rather than crushing the control. */\n.rowBody {\n flex: 1 1 auto;\n min-width: 0;\n}\n","import type { ReactNode } from 'react';\nimport s from './Disclosure.module.css';\n\n/** Props for `<DisclosureMark>`. */\nexport interface DisclosureMarkProps {\n /** Whether the section it stands for is open: `−` when open, `+` when shut. */\n open: boolean;\n /** Mark size in px, square. Default 13. */\n size?: number;\n className?: string;\n}\n\n/**\n * The fold mark alone: a dark violet rounded square holding a `+` while its section is\n * shut and a `−` while it is open. Decorative — it carries no role or label —\n * for a row that is itself the control, such as a tree item or a header\n * button. Anywhere the mark has to be the control, use `<Disclosure>`.\n *\n * Deliberately not part of the icon register, on the same grounds as\n * `DragHandleGlyph`: that register is outline strokes at a fixed weight, and\n * this mark is filled.\n */\nexport function DisclosureMark({ open, size = 13, className }: DisclosureMarkProps) {\n return (\n <svg\n className={className ? `${s.mark} ${className}` : s.mark}\n viewBox=\"0 0 13 13\"\n width={size}\n height={size}\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <rect className={s.lozenge} width=\"13\" height=\"13\" rx=\"3\" />\n {/* One-unit bars centered on 6.5 in an odd box, so at the default size\n both edges land on the pixel grid rather than blurring across it. */}\n <path className={s.sign} d={open ? 'M3 6.5 H10' : 'M3 6.5 H10 M6.5 3 V10'} />\n </svg>\n );\n}\n\n/** Props for `<Disclosure>`. */\nexport interface DisclosureProps {\n /** Whether the section it controls is open. The consumer owns this. */\n open: boolean;\n onToggle: () => void;\n /**\n * Names the section, for a screen reader. The control has no text of its\n * own, so without this it announces as an unlabeled button.\n */\n label: string;\n /**\n * `id` of the element this expands. Sets `aria-controls`, which lets a\n * screen reader move to the revealed content.\n */\n controls?: string;\n /** Mark size in px. The hit target is at least 20px and grows with it.\n * Default 13. */\n size?: number;\n disabled?: boolean;\n className?: string;\n}\n\n/**\n * The twisty on a collapsible section: a `<DisclosureMark>` in a button.\n *\n * Presentational — it holds no open/closed state and renders no children.\n * The consumer owns the state and the panel; this is the control that toggles\n * it, and `aria-expanded` is what ties the two together.\n *\n * Three things it settles that a hand-rolled twisty keeps getting wrong. The\n * mark is drawn rather than typed, because `--wzl-font-ui` carries no ▸/▾ and\n * a text glyph falls back to whatever the system offers at whatever size that\n * font renders it. The hit target is larger than the mark. And it is a sibling\n * of the row's label rather than a child, so clicking to expand does not\n * actuate the label's own control.\n */\nexport function Disclosure({ open, onToggle, label, controls, size = 13, disabled, className }: DisclosureProps) {\n return (\n <button\n type=\"button\"\n className={className ? `${s.twisty} ${className}` : s.twisty}\n aria-expanded={open}\n aria-controls={controls}\n aria-label={label}\n disabled={disabled}\n onClick={onToggle}\n >\n <DisclosureMark open={open} size={size} />\n </button>\n );\n}\n\n/** Props for `<DisclosureRow>`. */\nexport interface DisclosureRowProps extends Omit<DisclosureProps, 'className'> {\n /** The row's own content — a label, a checkbox, a count. */\n children: ReactNode;\n className?: string;\n}\n\n/**\n * A `<Disclosure>` and a row of content beside it, laid out so the twisty\n * leads and the content takes the rest.\n *\n * The layout is the point: the twisty sits *outside* whatever the row puts in\n * it, so a row whose content is a `<label>` wrapping a checkbox stays\n * clickable as a label without the twisty actuating it.\n */\nexport function DisclosureRow({ children, className, ...twisty }: DisclosureRowProps) {\n return (\n <div className={className ? `${s.row} ${className}` : s.row}>\n <Disclosure {...twisty} />\n <div className={s.rowBody}>{children}</div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;ACsBA,SAAgB,EAAe,EAAE,SAAM,UAAO,IAAI,gBAAkC;AAClF,QACE,kBAAC,OAAD;EACE,WAAW,IAAY,GAAG,EAAE,KAAK,GAAG,MAAc,EAAE;EACpD,SAAQ;EACR,OAAO;EACP,QAAQ;EACR,eAAY;EACZ,WAAU;YANZ,CAQE,kBAAC,QAAD;GAAM,WAAW,EAAE;GAAS,OAAM;GAAK,QAAO;GAAK,IAAG;GAAM,CAAA,EAG5D,kBAAC,QAAD;GAAM,WAAW,EAAE;GAAM,GAAG,IAAO,eAAe;GAA2B,CAAA,CACzE;;;AAwCV,SAAgB,EAAW,EAAE,SAAM,aAAU,UAAO,aAAU,UAAO,IAAI,aAAU,gBAA8B;AAC/G,QACE,kBAAC,UAAD;EACE,MAAK;EACL,WAAW,IAAY,GAAG,EAAE,OAAO,GAAG,MAAc,EAAE;EACtD,iBAAe;EACf,iBAAe;EACf,cAAY;EACF;EACV,SAAS;YAET,kBAAC,GAAD;GAAsB;GAAY;GAAQ,CAAA;EACnC,CAAA;;AAmBb,SAAgB,EAAc,EAAE,aAAU,cAAW,GAAG,KAA8B;AACpF,QACE,kBAAC,OAAD;EAAK,WAAW,IAAY,GAAG,EAAE,IAAI,GAAG,MAAc,EAAE;YAAxD,CACE,kBAAC,GAAD,EAAY,GAAI,GAAU,CAAA,EAC1B,kBAAC,OAAD;GAAK,WAAW,EAAE;GAAU;GAAe,CAAA,CACvC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { n as e } from "./portalHost-CjpCnuGU.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { createPortal as n } from "react-dom";
|
|
4
|
+
var r = { ghost: "_ghost_gsqub_1" };
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/DragGhost/DragGhost.tsx
|
|
7
|
+
function i(e) {
|
|
8
|
+
let t = getComputedStyle(e);
|
|
9
|
+
return t.transform !== "none" || t.filter !== "none" || t.backdropFilter !== "none" || t.perspective !== "none" || /paint|layout|strict|content/.test(t.contain);
|
|
10
|
+
}
|
|
11
|
+
function a({ at: a, from: o, children: s }) {
|
|
12
|
+
let c = e(o) ?? document.body, l = c !== document.body && i(c) ? c.getBoundingClientRect() : {
|
|
13
|
+
left: 0,
|
|
14
|
+
top: 0
|
|
15
|
+
}, u = {
|
|
16
|
+
left: a.left - l.left,
|
|
17
|
+
top: a.top - l.top,
|
|
18
|
+
width: a.width
|
|
19
|
+
};
|
|
20
|
+
return n(/* @__PURE__ */ t("div", {
|
|
21
|
+
className: r.ghost,
|
|
22
|
+
style: u,
|
|
23
|
+
"aria-hidden": "true",
|
|
24
|
+
children: s
|
|
25
|
+
}), c);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { a as t };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=DragGhost-DcU7cOwy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragGhost-DcU7cOwy.js","names":[],"sources":["../../src/components/DragGhost/DragGhost.module.css","../../src/components/DragGhost/DragGhost.tsx"],"sourcesContent":[".ghost {\n position: fixed;\n z-index: var(--wzl-z-overlay);\n display: flex;\n flex-direction: column;\n gap: 1px;\n padding: 1px;\n border-radius: var(--wzl-radius-sm);\n background: var(--wzl-surface-raised);\n box-shadow: 0 4px 12px var(--wzl-shadow);\n opacity: 0.85;\n pointer-events: none;\n}\n","import type { CSSProperties, ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport { nearestPortalHost } from '../../overlays/portalHost';\nimport s from './DragGhost.module.css';\n\n/** Props for `<DragGhost>`. */\nexport interface DragGhostProps {\n /** The ghost's top-left in client space, and its width — `useReorderDragList`'s `state.ghost` is one. */\n at: { left: number; top: number; width: number };\n /** An element inside the list being dragged from. The ghost portals to its nearest themed ancestor, so it resolves\n * the list's tokens without being clipped by the list's panel. */\n from: Element;\n /** What to draw: copies of the dragged items, or any stand-in for them. */\n children: ReactNode;\n}\n\n/** Whether `el` is the containing block of its fixed-position descendants rather than the viewport. */\nfunction containsFixed(el: Element): boolean {\n const cs = getComputedStyle(el);\n return (\n cs.transform !== 'none' ||\n cs.filter !== 'none' ||\n cs.backdropFilter !== 'none' ||\n cs.perspective !== 'none' ||\n /paint|layout|strict|content/.test(cs.contain)\n );\n}\n\n/**\n * What follows the pointer during a drag while the dragged items hold their place: `children` on a raised surface at\n * a client-space point. Hidden from assistive tech and from the pointer, so it never becomes the drop target.\n */\nexport function DragGhost({ at, from, children }: DragGhostProps) {\n const host = nearestPortalHost(from) ?? document.body;\n const origin = host !== document.body && containsFixed(host) ? host.getBoundingClientRect() : { left: 0, top: 0 };\n // Pixel positioning: the point is the pointer's, known only at runtime.\n const style: CSSProperties = { left: at.left - origin.left, top: at.top - origin.top, width: at.width };\n return createPortal(\n <div className={s.ghost} style={style} aria-hidden=\"true\">\n {children}\n </div>,\n host,\n );\n}\n"],"mappings":";;;;;;ACiBA,SAAS,EAAc,GAAsB;CAC3C,IAAM,IAAK,iBAAiB,EAAG;AAC/B,QACE,EAAG,cAAc,UACjB,EAAG,WAAW,UACd,EAAG,mBAAmB,UACtB,EAAG,gBAAgB,UACnB,8BAA8B,KAAK,EAAG,QAAQ;;AAQlD,SAAgB,EAAU,EAAE,OAAI,SAAM,eAA4B;CAChE,IAAM,IAAO,EAAkB,EAAK,IAAI,SAAS,MAC3C,IAAS,MAAS,SAAS,QAAQ,EAAc,EAAK,GAAG,EAAK,uBAAuB,GAAG;EAAE,MAAM;EAAG,KAAK;EAAG,EAE3G,IAAuB;EAAE,MAAM,EAAG,OAAO,EAAO;EAAM,KAAK,EAAG,MAAM,EAAO;EAAK,OAAO,EAAG;EAAO;AACvG,QAAO,EACL,kBAAC,OAAD;EAAK,WAAW,EAAE;EAAc;EAAO,eAAY;EAChD;EACG,CAAA,EACN,EACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragHandleGlyph-
|
|
1
|
+
{"version":3,"file":"DragHandleGlyph-BtBxHjZS.js","names":[],"sources":["../../src/components/DragHandleGlyph/DragHandleGlyph.tsx"],"sourcesContent":["/** Props for `<DragHandleGlyph>`. */\nexport interface DragHandleGlyphProps {\n /** Height in px; width scales with it. Default 16. */\n size?: number;\n}\n\n/** The two-column dot grip used on anything draggable by a handle.\n *\n * Deliberately not part of the icon register: that register is outline strokes\n * at a fixed weight, and a grip is filled dots. Forcing it in would either\n * break the register's rule or produce a worse glyph. */\nexport function DragHandleGlyph({ size = 16 }: DragHandleGlyphProps) {\n return (\n <svg\n width={(size * 8) / 16}\n height={size}\n viewBox=\"0 0 8 16\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <circle cx=\"2\" cy=\"3\" r=\"1.1\" />\n <circle cx=\"6\" cy=\"3\" r=\"1.1\" />\n <circle cx=\"2\" cy=\"8\" r=\"1.1\" />\n <circle cx=\"6\" cy=\"8\" r=\"1.1\" />\n <circle cx=\"2\" cy=\"13\" r=\"1.1\" />\n <circle cx=\"6\" cy=\"13\" r=\"1.1\" />\n </svg>\n );\n}\n"],"mappings":";;AAWA,SAAgB,EAAgB,EAAE,UAAO,MAA4B;AACnE,QACE,kBAAC,OAAD;EACE,OAAQ,IAAO,IAAK;EACpB,QAAQ;EACR,SAAQ;EACR,MAAK;EACL,eAAY;YALd;GAOE,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAI,GAAE;IAAQ,CAAA;GAChC,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAI,GAAE;IAAQ,CAAA;GAChC,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAI,GAAE;IAAQ,CAAA;GAChC,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAI,GAAE;IAAQ,CAAA;GAChC,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAK,GAAE;IAAQ,CAAA;GACjC,kBAAC,UAAD;IAAQ,IAAG;IAAI,IAAG;IAAK,GAAE;IAAQ,CAAA;GAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field-
|
|
1
|
+
{"version":3,"file":"Field-xbqRmjsI.js","names":[],"sources":["../../src/components/Field/Field.module.css","../../src/components/Field/Field.tsx"],"sourcesContent":[".field {\n display: flex;\n flex-direction: column;\n gap: var(--wzl-space-2);\n font-family: var(--wzl-font-ui);\n color: var(--wzl-fg);\n}\n\n.label {\n font-size: var(--wzl-font-size-sm);\n font-weight: var(--wzl-font-weight-medium);\n color: var(--wzl-fg);\n cursor: default;\n}\n\n.hint {\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-fg-subtle);\n line-height: 1.4;\n}\n\n.error {\n font-size: var(--wzl-font-size-sm);\n color: var(--wzl-danger);\n line-height: 1.4;\n}\n\n.row {\n flex-direction: row;\n align-items: center;\n gap: var(--wzl-space-4);\n}\n\n.row .label {\n flex: 1;\n min-width: 0;\n}\n","import type { ReactNode } from 'react';\nimport s from './Field.module.css';\n\n/**\n * Whether a {@link Field} stacks its label above the control or sits them\n * side by side.\n */\nexport type FieldOrientation = 'stacked' | 'row';\n\n/** Props for {@link Field}. */\nexport type FieldProps = {\n orientation?: FieldOrientation;\n className?: string;\n children?: ReactNode;\n};\n\n/**\n * Layout primitive that arranges a label, control, hint, and error in the\n * canonical weasel-ui form-row shape. The control itself owns its semantics\n * (RAC `TextField`, `Checkbox`, etc.); this just paints the layout.\n *\n * Most users will instead reach for `Input` / `Checkbox` / `Switch`, which\n * compose Field internally. Use Field directly when you need a custom\n * control to sit in the same visual rhythm.\n */\nexport function Field({ orientation = 'stacked', className, children }: FieldProps) {\n const cls = [s.field, orientation === 'row' && s.row, className].filter(Boolean).join(' ');\n return <div className={cls}>{children}</div>;\n}\n\n/**\n * The class names {@link Field} paints its slots with, so a control composing\n * its own layout can match the same form-row rhythm.\n */\nexport const fieldClasses = {\n root: s.field,\n row: s.row,\n label: s.label,\n hint: s.hint,\n error: s.error,\n};\n"],"mappings":";;;;;;;;;;ACyBA,SAAgB,EAAM,EAAE,iBAAc,WAAW,cAAW,eAAwB;AAElF,QAAO,kBAAC,OAAD;EAAK,WADA;GAAC,EAAE;GAAO,MAAgB,SAAS,EAAE;GAAK;GAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAC/D;EAAM;EAAe,CAAA;;AAO9C,IAAa,IAAe;CAC1B,MAAM,EAAE;CACR,KAAK,EAAE;CACP,OAAO,EAAE;CACT,MAAM,EAAE;CACR,OAAO,EAAE;CACV"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { n as e } from "./paintValue-Bz6AVuh3.js";
|
|
2
|
+
import { t } from "./Button-Dyp31jMt.js";
|
|
3
|
+
import { t as n } from "./paintPreview-DPtZS4yU.js";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { useState as a } from "react";
|
|
6
|
+
var o = {
|
|
7
|
+
root: "_root_1br5r_1",
|
|
8
|
+
pair: "_pair_1br5r_10",
|
|
9
|
+
chip: "_chip_1br5r_19",
|
|
10
|
+
input: "_input_1br5r_43",
|
|
11
|
+
well: "_well_1br5r_49",
|
|
12
|
+
paint: "_paint_1br5r_82",
|
|
13
|
+
buttons: "_buttons_1br5r_114"
|
|
14
|
+
}, s = {
|
|
15
|
+
fill: "Fill",
|
|
16
|
+
stroke: "Stroke"
|
|
17
|
+
}, c = {
|
|
18
|
+
fill: "#ffffff",
|
|
19
|
+
stroke: "#000000"
|
|
20
|
+
};
|
|
21
|
+
function l(t) {
|
|
22
|
+
let { slot: l, paint: u, focused: d } = t, [f, p] = a(null), m = u === null, h = n(u), g = (e(u) ?? c[l]).slice(0, 7);
|
|
23
|
+
return /* @__PURE__ */ i("span", {
|
|
24
|
+
className: o.chip,
|
|
25
|
+
"data-slot": l,
|
|
26
|
+
...d ? { "data-focused": "" } : {},
|
|
27
|
+
...m ? { "data-none": "" } : {},
|
|
28
|
+
children: [/* @__PURE__ */ r("span", {
|
|
29
|
+
className: o.well,
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
children: h && /* @__PURE__ */ r("span", {
|
|
32
|
+
className: o.paint,
|
|
33
|
+
style: { background: h }
|
|
34
|
+
})
|
|
35
|
+
}), /* @__PURE__ */ r("input", {
|
|
36
|
+
type: "color",
|
|
37
|
+
className: o.input,
|
|
38
|
+
value: f ?? g,
|
|
39
|
+
"aria-label": s[l],
|
|
40
|
+
"aria-current": d ? "true" : void 0,
|
|
41
|
+
onFocus: () => t.onFocusChange(l),
|
|
42
|
+
onClick: (e) => {
|
|
43
|
+
t.onFocusChange(l), e.shiftKey && t.onToggleNone && (e.preventDefault(), t.onToggleNone(l));
|
|
44
|
+
},
|
|
45
|
+
onInput: (e) => {
|
|
46
|
+
let n = e.target.value;
|
|
47
|
+
p(n), t.onInput?.(l, n);
|
|
48
|
+
},
|
|
49
|
+
onBlur: () => {
|
|
50
|
+
f !== null && (p(null), t.onChange(l, f));
|
|
51
|
+
}
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function u(e) {
|
|
56
|
+
let { fill: n, stroke: a, focused: s, onFocusChange: c, onInput: u, onChange: d, onToggleNone: f, onSwap: p, onReset: m, shortcuts: h, className: g } = e, _ = s === "fill" ? n : a, v = {
|
|
57
|
+
onFocusChange: c,
|
|
58
|
+
onInput: u,
|
|
59
|
+
onChange: d,
|
|
60
|
+
onToggleNone: f
|
|
61
|
+
}, y = f || p || m;
|
|
62
|
+
return /* @__PURE__ */ i("div", {
|
|
63
|
+
className: [o.root, g].filter(Boolean).join(" "),
|
|
64
|
+
role: "group",
|
|
65
|
+
"aria-label": e["aria-label"] ?? "Fill and stroke",
|
|
66
|
+
children: [/* @__PURE__ */ i("div", {
|
|
67
|
+
className: o.pair,
|
|
68
|
+
children: [/* @__PURE__ */ r(l, {
|
|
69
|
+
slot: "fill",
|
|
70
|
+
paint: n,
|
|
71
|
+
focused: s === "fill",
|
|
72
|
+
...v
|
|
73
|
+
}), /* @__PURE__ */ r(l, {
|
|
74
|
+
slot: "stroke",
|
|
75
|
+
paint: a,
|
|
76
|
+
focused: s === "stroke",
|
|
77
|
+
...v
|
|
78
|
+
})]
|
|
79
|
+
}), y && /* @__PURE__ */ i("div", {
|
|
80
|
+
className: o.buttons,
|
|
81
|
+
children: [
|
|
82
|
+
f && /* @__PURE__ */ r(t, {
|
|
83
|
+
variant: "ghost",
|
|
84
|
+
size: "sm",
|
|
85
|
+
pressed: _ === null,
|
|
86
|
+
onClick: () => f(s),
|
|
87
|
+
shortcut: h?.none,
|
|
88
|
+
children: "None"
|
|
89
|
+
}),
|
|
90
|
+
p && /* @__PURE__ */ r(t, {
|
|
91
|
+
variant: "ghost",
|
|
92
|
+
size: "sm",
|
|
93
|
+
onClick: p,
|
|
94
|
+
shortcut: h?.swap,
|
|
95
|
+
children: "Swap"
|
|
96
|
+
}),
|
|
97
|
+
m && /* @__PURE__ */ r(t, {
|
|
98
|
+
variant: "ghost",
|
|
99
|
+
size: "sm",
|
|
100
|
+
onClick: m,
|
|
101
|
+
shortcut: h?.reset,
|
|
102
|
+
children: "Default"
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { u as t };
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=FillStrokeSwatch-BViKXIPx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FillStrokeSwatch-BViKXIPx.js","names":[],"sources":["../../src/components/FillStrokeSwatch/FillStrokeSwatch.module.css","../../src/components/FillStrokeSwatch/FillStrokeSwatch.tsx"],"sourcesContent":[".root {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n gap: var(--wzl-space-2);\n}\n\n/* The two chips overlap on a diagonal: fill up-left, behind; stroke\n down-right, in front, so the fill shows through the stroke's hole. */\n.pair {\n --chip: 32px;\n --offset: 12px;\n --ring: 8px;\n position: relative;\n inline-size: calc(var(--chip) + var(--offset));\n block-size: calc(var(--chip) + var(--offset));\n}\n\n.chip {\n position: absolute;\n inline-size: var(--chip);\n block-size: var(--chip);\n box-sizing: border-box;\n border: 1px solid var(--wzl-border);\n border-radius: var(--wzl-radius-sm);\n}\n\n.chip[data-slot='fill'] {\n inset-block-start: 0;\n inset-inline-start: 0;\n}\n\n.chip[data-slot='stroke'] {\n inset-block-end: 0;\n inset-inline-end: 0;\n}\n\n.chip[data-focused] {\n border-color: var(--wzl-fg);\n box-shadow: 0 0 0 1px var(--wzl-fg);\n}\n\n.chip:has(.input:focus-visible) {\n outline: 2px solid var(--wzl-focus-ring);\n outline-offset: 1px;\n}\n\n/* The paint sits over the checker, so a translucent one reads as such. */\n.well {\n position: absolute;\n inset: 0;\n overflow: hidden;\n border-radius: calc(var(--wzl-radius-sm) - var(--wzl-border-w));\n background: repeating-conic-gradient(\n var(--wzl-checker-a) 0% 25%,\n var(--wzl-checker-b) 0% 50%\n )\n 50% / var(--wzl-checker-size) var(--wzl-checker-size);\n}\n\n/* The stroke well is a ring: the mask subtracts the content box from the\n padding box, so whatever is behind the chip shows through its hole. */\n.chip[data-slot='stroke'] .well {\n box-sizing: border-box;\n padding: var(--ring);\n mask:\n linear-gradient(#000, #000) padding-box,\n linear-gradient(#000, #000) content-box;\n mask-composite: exclude;\n}\n\n/* The hole's edge, so a focused stroke reads as focused on both sides. */\n.chip[data-slot='stroke'][data-focused]::before {\n content: '';\n position: absolute;\n inset: calc(var(--ring) - var(--wzl-border-w));\n border: 1px solid var(--wzl-fg);\n border-radius: 1px;\n pointer-events: none;\n}\n\n.paint {\n position: absolute;\n inset: 0;\n}\n\n/* No paint: the surface crossed by the danger diagonal. */\n.chip[data-none] .well {\n background:\n linear-gradient(\n 45deg,\n transparent calc(50% - 1px),\n var(--wzl-danger) calc(50% - 1px),\n var(--wzl-danger) calc(50% + 1px),\n transparent calc(50% + 1px)\n ),\n var(--wzl-surface);\n}\n\n/* The native picker covers its chip, invisible: it takes the click and the\n keyboard focus, and the well draws the paint. */\n.input {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.buttons {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--wzl-space-1);\n}\n","import { useState, type ReactElement } from 'react';\nimport type { FillStyle } from '@weasel-js/core';\nimport { paintPreviewCss } from '../../paintPreview';\nimport { solidColorOf } from '../paintValue';\nimport { Button } from '../Button';\nimport type { PaintSlot } from '../GradientEditor';\nimport s from './FillStrokeSwatch.module.css';\n\n/** Props for {@link FillStrokeSwatch}. */\nexport interface FillStrokeSwatchProps {\n /** `null` is an explicit \"no paint\". */\n fill: FillStyle | null | undefined;\n stroke: FillStyle | null | undefined;\n /** The slot that edits aimed at \"the current paint\" land on — the None\n * button, a palette click, a keyboard shortcut the app binds. */\n focused: PaintSlot;\n onFocusChange: (slot: PaintSlot) => void;\n /** Every tick of the color picker, as `#rrggbb`. */\n onInput?: (slot: PaintSlot, color: string) => void;\n /** Once when the picker closes, with its last color, if it moved. */\n onChange: (slot: PaintSlot, color: string) => void;\n /** Toggle a slot between no paint and a paint. Given, it adds the None\n * button (acting on `focused`) and shift-click on a chip. */\n onToggleNone?: (slot: PaintSlot) => void;\n /** Given, adds a Swap button that exchanges the two paints. */\n onSwap?: () => void;\n /** Given, adds a Default button that restores the app's default pair. */\n onReset?: () => void;\n /** Key hints for the buttons' tooltips. The app binds the keys itself. */\n shortcuts?: { none?: string; swap?: string; reset?: string };\n 'aria-label'?: string;\n className?: string;\n}\n\nconst SLOT_LABEL: Record<PaintSlot, string> = { fill: 'Fill', stroke: 'Stroke' };\nconst PICKER_FALLBACK: Record<PaintSlot, string> = { fill: '#ffffff', stroke: '#000000' };\n\nfunction Chip(props: {\n slot: PaintSlot;\n paint: FillStyle | null | undefined;\n focused: boolean;\n onFocusChange: (slot: PaintSlot) => void;\n onInput?: (slot: PaintSlot, color: string) => void;\n onChange: (slot: PaintSlot, color: string) => void;\n onToggleNone?: (slot: PaintSlot) => void;\n}): ReactElement {\n const { slot, paint, focused } = props;\n // Tracks the picker through a pick; the prop only catches up on commit.\n const [draft, setDraft] = useState<string | null>(null);\n const none = paint === null;\n const preview = paintPreviewCss(paint);\n const pickerValue = (solidColorOf(paint) ?? PICKER_FALLBACK[slot]).slice(0, 7);\n\n return (\n <span\n className={s.chip}\n data-slot={slot}\n {...(focused ? { 'data-focused': '' } : {})}\n {...(none ? { 'data-none': '' } : {})}\n >\n <span className={s.well} aria-hidden=\"true\">\n {preview && <span className={s.paint} style={{ background: preview }} />}\n </span>\n <input\n type=\"color\"\n className={s.input}\n value={draft ?? pickerValue}\n aria-label={SLOT_LABEL[slot]}\n aria-current={focused ? 'true' : undefined}\n onFocus={() => props.onFocusChange(slot)}\n onClick={(e) => {\n props.onFocusChange(slot);\n // Shift-click is the none toggle; preventing it keeps the OS picker shut.\n if (e.shiftKey && props.onToggleNone) {\n e.preventDefault();\n props.onToggleNone(slot);\n }\n }}\n onInput={(e) => {\n const color = (e.target as HTMLInputElement).value;\n setDraft(color);\n props.onInput?.(slot, color);\n }}\n onBlur={() => {\n if (draft === null) return;\n setDraft(null);\n props.onChange(slot, draft);\n }}\n />\n </span>\n );\n}\n\n/**\n * The active fill and stroke as one overlapping pair, the way drawing apps\n * show the paint the next shape gets: fill a solid square behind, stroke a\n * frame in front of it. Each chip is a native color picker; the focused one\n * is what the None button — and whatever the app binds — acts on.\n *\n * Holds no state of its own: the paints and the focused slot are props, and\n * the chips report picks through `onInput`/`onChange` for the app to route —\n * into its own active-paint state, into the selection through\n * `useOngoingAction`, or both.\n */\nexport function FillStrokeSwatch(props: FillStrokeSwatchProps): ReactElement {\n const {\n fill, stroke, focused, onFocusChange, onInput, onChange,\n onToggleNone, onSwap, onReset, shortcuts, className,\n } = props;\n const focusedPaint = focused === 'fill' ? fill : stroke;\n const chip = { onFocusChange, onInput, onChange, onToggleNone };\n const anyButton = onToggleNone || onSwap || onReset;\n\n return (\n <div\n className={[s.root, className].filter(Boolean).join(' ')}\n role=\"group\"\n aria-label={props['aria-label'] ?? 'Fill and stroke'}\n >\n <div className={s.pair}>\n <Chip slot=\"fill\" paint={fill} focused={focused === 'fill'} {...chip} />\n <Chip slot=\"stroke\" paint={stroke} focused={focused === 'stroke'} {...chip} />\n </div>\n {anyButton && (\n <div className={s.buttons}>\n {onToggleNone && (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n pressed={focusedPaint === null}\n onClick={() => onToggleNone(focused)}\n shortcut={shortcuts?.none}\n >\n None\n </Button>\n )}\n {onSwap && (\n <Button variant=\"ghost\" size=\"sm\" onClick={onSwap} shortcut={shortcuts?.swap}>\n Swap\n </Button>\n )}\n {onReset && (\n <Button variant=\"ghost\" size=\"sm\" onClick={onReset} shortcut={shortcuts?.reset}>\n Default\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;GCkCM,IAAwC;CAAE,MAAM;CAAQ,QAAQ;CAAU,EAC1E,IAA6C;CAAE,MAAM;CAAW,QAAQ;CAAW;AAEzF,SAAS,EAAK,GAQG;CACf,IAAM,EAAE,SAAM,UAAO,eAAY,GAE3B,CAAC,GAAO,KAAY,EAAwB,KAAK,EACjD,IAAO,MAAU,MACjB,IAAU,EAAgB,EAAM,EAChC,KAAe,EAAa,EAAM,IAAI,EAAgB,IAAO,MAAM,GAAG,EAAE;AAE9E,QACE,kBAAC,QAAD;EACE,WAAW,EAAE;EACb,aAAW;EACX,GAAK,IAAU,EAAE,gBAAgB,IAAI,GAAG,EAAE;EAC1C,GAAK,IAAO,EAAE,aAAa,IAAI,GAAG,EAAE;YAJtC,CAME,kBAAC,QAAD;GAAM,WAAW,EAAE;GAAM,eAAY;aAClC,KAAW,kBAAC,QAAD;IAAM,WAAW,EAAE;IAAO,OAAO,EAAE,YAAY,GAAS;IAAI,CAAA;GACnE,CAAA,EACP,kBAAC,SAAD;GACE,MAAK;GACL,WAAW,EAAE;GACb,OAAO,KAAS;GAChB,cAAY,EAAW;GACvB,gBAAc,IAAU,SAAS,KAAA;GACjC,eAAe,EAAM,cAAc,EAAK;GACxC,UAAU,MAAM;AAGd,IAFA,EAAM,cAAc,EAAK,EAErB,EAAE,YAAY,EAAM,iBACtB,EAAE,gBAAgB,EAClB,EAAM,aAAa,EAAK;;GAG5B,UAAU,MAAM;IACd,IAAM,IAAS,EAAE,OAA4B;AAE7C,IADA,EAAS,EAAM,EACf,EAAM,UAAU,GAAM,EAAM;;GAE9B,cAAc;AACR,UAAU,SACd,EAAS,KAAK,EACd,EAAM,SAAS,GAAM,EAAM;;GAE7B,CAAA,CACG;;;AAeX,SAAgB,EAAiB,GAA4C;CAC3E,IAAM,EACJ,SAAM,WAAQ,YAAS,kBAAe,YAAS,aAC/C,iBAAc,WAAQ,YAAS,cAAW,iBACxC,GACE,IAAe,MAAY,SAAS,IAAO,GAC3C,IAAO;EAAE;EAAe;EAAS;EAAU;EAAc,EACzD,IAAY,KAAgB,KAAU;AAE5C,QACE,kBAAC,OAAD;EACE,WAAW,CAAC,EAAE,MAAM,EAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,IAAI;EACxD,MAAK;EACL,cAAY,EAAM,iBAAiB;YAHrC,CAKE,kBAAC,OAAD;GAAK,WAAW,EAAE;aAAlB,CACE,kBAAC,GAAD;IAAM,MAAK;IAAO,OAAO;IAAM,SAAS,MAAY;IAAQ,GAAI;IAAQ,CAAA,EACxE,kBAAC,GAAD;IAAM,MAAK;IAAS,OAAO;IAAQ,SAAS,MAAY;IAAU,GAAI;IAAQ,CAAA,CAC1E;MACL,KACC,kBAAC,OAAD;GAAK,WAAW,EAAE;aAAlB;IACG,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,MAAK;KACL,SAAS,MAAiB;KAC1B,eAAe,EAAa,EAAQ;KACpC,UAAU,GAAW;eACtB;KAEQ,CAAA;IAEV,KACC,kBAAC,GAAD;KAAQ,SAAQ;KAAQ,MAAK;KAAK,SAAS;KAAQ,UAAU,GAAW;eAAM;KAErE,CAAA;IAEV,KACC,kBAAC,GAAD;KAAQ,SAAQ;KAAQ,MAAK;KAAK,SAAS;KAAS,UAAU,GAAW;eAAO;KAEvE,CAAA;IAEP;KAEJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./Select-
|
|
1
|
+
import { t as e } from "./Select-DVValBe1.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { listCanvasFonts as n, listFonts as r, resolveFontVariant as i } from "@weasel-js/font";
|
|
4
4
|
//#region src/components/FontFamilySelect/FontFamilySelect.tsx
|
|
@@ -26,4 +26,4 @@ function o(i) {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { o as t };
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=FontFamilySelect-
|
|
29
|
+
//# sourceMappingURL=FontFamilySelect-r9TV_xIH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontFamilySelect-
|
|
1
|
+
{"version":3,"file":"FontFamilySelect-r9TV_xIH.js","names":[],"sources":["../../src/components/FontFamilySelect/FontFamilySelect.tsx"],"sourcesContent":["/**\n * Font-family picker driven by the live font registry.\n *\n * **What it offers.** Both tiers that can actually paint: `listFonts()` for\n * families with a baked atlas, and `listCanvasFonts()` for families the\n * dynamic canvas-SDF tier will serve. Offer what will render, invent\n * nothing — and `listCanvasFonts` reports service rather than membership,\n * so a family auto-enrolled under a policy that is no longer in force\n * doesn't appear.\n *\n * **What it does with a value it can't offer.** Nothing about the model\n * stops a node from naming a family that was never registered — a pasted\n * node, an imported SVG, a document from a session that loaded more fonts.\n * The control keeps that value visible as its own entry and names what is\n * actually painting instead, read structurally off\n * `resolveFontVariant().substituted`. Dropping the value would silently\n * rewrite the document on the next edit; showing it bare would claim a font\n * is in use that isn't.\n */\nimport { listCanvasFonts, listFonts, resolveFontVariant } from '@weasel-js/font';\nimport { Select } from '../Select';\n\nexport interface FontFamilySelectProps {\n /** Current family, or `undefined` when the sources disagree (`mixed`). */\n value?: string;\n /** Indeterminate presentation — the aggregated sources name different families. */\n mixed?: boolean;\n onChange: (family: string) => void;\n /** The weight / style the text actually renders at, so the substitution\n * probe reports the variant that paints rather than a nominal 400/normal. */\n weight?: number;\n fontStyle?: 'normal' | 'italic';\n 'aria-label'?: string;\n className?: string;\n}\n\n/** Label for a value that isn't in the registry: name the substitute when the\n * fallback chain found one, otherwise say only what is known. */\nfunction unregisteredLabel(family: string, weight: number, style: 'normal' | 'italic'): string {\n const { substituted } = resolveFontVariant(family, weight, style);\n return substituted\n ? `${family} — not loaded, showing ${substituted.resolved}`\n : `${family} — not loaded`;\n}\n\nexport function FontFamilySelect(props: FontFamilySelectProps) {\n const { value, mixed = false, onChange, weight = 400, fontStyle = 'normal', className } = props;\n // Both tiers that actually render: families with a baked atlas, and\n // families the dynamic canvas-SDF tier will serve. Neither list is a guess\n // — `listCanvasFonts` reports what the registry will really route, so a\n // family reaches this menu only if it can paint.\n const baked = listFonts();\n const canvas = listCanvasFonts().filter((c) => !baked.some((f) => f.family === c.family));\n const available = [...baked.map((f) => f.family), ...canvas.map((c) => c.family)];\n const options = available.map((family) => ({ value: family, label: family }));\n if (value !== undefined && !available.includes(value)) {\n options.push({ value, label: unregisteredLabel(value, weight, fontStyle) });\n }\n return (\n <Select<string>\n className={className}\n options={options}\n selectedKey={mixed ? null : (value ?? null)}\n placeholder={mixed ? 'Mixed' : undefined}\n onSelectionChange={onChange}\n aria-label={props['aria-label'] ?? 'Font'}\n />\n );\n}\n"],"mappings":";;;;AAsCA,SAAS,EAAkB,GAAgB,GAAgB,GAAoC;CAC7F,IAAM,EAAE,mBAAgB,EAAmB,GAAQ,GAAQ,EAAM;AACjE,QAAO,IACH,GAAG,EAAO,yBAAyB,EAAY,aAC/C,GAAG,EAAO;;AAGhB,SAAgB,EAAiB,GAA8B;CAC7D,IAAM,EAAE,UAAO,WAAQ,IAAO,aAAU,YAAS,KAAK,eAAY,UAAU,iBAAc,GAKpF,IAAQ,GAAW,EACnB,IAAS,GAAiB,CAAC,QAAQ,MAAM,CAAC,EAAM,MAAM,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EACnF,IAAY,CAAC,GAAG,EAAM,KAAK,MAAM,EAAE,OAAO,EAAE,GAAG,EAAO,KAAK,MAAM,EAAE,OAAO,CAAC,EAC3E,IAAU,EAAU,KAAK,OAAY;EAAE,OAAO;EAAQ,OAAO;EAAQ,EAAE;AAI7E,QAHI,MAAU,KAAA,KAAa,CAAC,EAAU,SAAS,EAAM,IACnD,EAAQ,KAAK;EAAE;EAAO,OAAO,EAAkB,GAAO,GAAQ,EAAU;EAAE,CAAC,EAG3E,kBAAC,GAAD;EACa;EACF;EACT,aAAa,IAAQ,OAAQ,KAAS;EACtC,aAAa,IAAQ,UAAU,KAAA;EAC/B,mBAAmB;EACnB,cAAY,EAAM,iBAAiB;EACnC,CAAA"}
|