@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
package/dist/index.d.ts
CHANGED
|
@@ -4,24 +4,32 @@ export { solidColorOf, strokeColorOf } from './components/paintValue';
|
|
|
4
4
|
export * from './components/ActionBar';
|
|
5
5
|
export * from './components/Badge';
|
|
6
6
|
export * from './components/Button';
|
|
7
|
+
export * from './components/Code';
|
|
7
8
|
export * from './components/DataGrid';
|
|
9
|
+
export * from './components/DetailList';
|
|
8
10
|
export * from './components/Disclosure';
|
|
11
|
+
export * from './components/DragGhost';
|
|
9
12
|
export * from './components/DragHandleGlyph';
|
|
10
13
|
export * from './components/Keycaps';
|
|
11
|
-
export * from './components/
|
|
14
|
+
export * from './components/LayerList';
|
|
12
15
|
export * from './components/Slider';
|
|
13
16
|
export * from './components/ItemList';
|
|
17
|
+
export * from './components/ListEditor';
|
|
14
18
|
export * from './components/ToggleBar';
|
|
19
|
+
export * from './components/ColorModeControl';
|
|
15
20
|
export * from './components/OptionsBar';
|
|
16
|
-
export * from './components/
|
|
21
|
+
export * from './components/ButtonBar';
|
|
17
22
|
export * from './components/ToolOptionsBar';
|
|
18
23
|
export * from './components/PaintInput';
|
|
19
24
|
export * from './components/PaintField';
|
|
25
|
+
export * from './components/FillStrokeSwatch';
|
|
26
|
+
export * from './components/SwatchGrid';
|
|
20
27
|
export * from './components/MeshEditor';
|
|
21
28
|
export * from './components/PatternPicker';
|
|
22
29
|
export * from './components/Powerline';
|
|
23
30
|
export * from './components/Prefs';
|
|
24
31
|
export * from './components/Properties';
|
|
32
|
+
export { type Stance, type StanceAttrs, type StanceProps, useStance } from './components/stance';
|
|
25
33
|
export * from './components/SelectionPanel';
|
|
26
34
|
export * from './components/ResizeHandle';
|
|
27
35
|
export * from './components/Sidebar';
|
|
@@ -36,6 +44,7 @@ export * from './components/Input';
|
|
|
36
44
|
export * from './components/Checkbox';
|
|
37
45
|
export * from './components/Switch';
|
|
38
46
|
export * from './components/Tabs';
|
|
47
|
+
export * from './components/Tree';
|
|
39
48
|
export * from './components/RadioGroup';
|
|
40
49
|
export * from './components/NumberField';
|
|
41
50
|
export * from './components/Select';
|
|
@@ -63,13 +72,17 @@ export type { GradientTrackOpts } from './paintGradientTrack';
|
|
|
63
72
|
export { paintPreviewCss } from './paintPreview';
|
|
64
73
|
export { oklchToHex, chromaAt } from './color/oklch';
|
|
65
74
|
export type { ChromaCurve, ChromaCurvePoint } from './color/oklch';
|
|
75
|
+
export { rampColor, colorRamp } from './color/ramp';
|
|
76
|
+
export type { ColorRampOptions } from './color/ramp';
|
|
66
77
|
export { useAsyncOptions } from './useAsyncOptions';
|
|
67
78
|
export type { AsyncOption, AsyncOptionsResult, UseAsyncOptionsProps } from './useAsyncOptions';
|
|
68
79
|
export { useReorderDragList } from './useReorderDragList';
|
|
80
|
+
export { pickActiveSection, useScrollSpy } from './useScrollSpy';
|
|
81
|
+
export type { ScrollSpy, SectionOffset, UseScrollSpyOptions } from './useScrollSpy';
|
|
69
82
|
export { useRovingTabIndex } from './useRovingTabIndex';
|
|
70
83
|
export type { RovingItem, RovingTabIndex, UseRovingTabIndexOptions } from './useRovingTabIndex';
|
|
71
84
|
export { formatCompact, formatNumber, formatZoom, MINUS_SIGN, parseNumber, parseSignedNumber, } from './format/number';
|
|
72
|
-
export type {
|
|
85
|
+
export type { ReorderItem, UseReorderDragListOptions, ReorderDragState, ReorderGhost, ReorderDragHandlers, PressModifiers, } from './useReorderDragList';
|
|
73
86
|
export { HANDLE_SIZE_TOKENS, handleHalf, handleSize } from './handles';
|
|
74
87
|
export type { HandleSizeToken } from './handles';
|
|
75
88
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -1,88 +1,120 @@
|
|
|
1
1
|
import { n as e, t } from "./chunks/dlog-CMYiRF3Q.js";
|
|
2
|
-
import { a as n, i as r, n as i, r as a, t as o } from "./chunks/Icon-
|
|
3
|
-
import { $ as s, A as c,
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
2
|
+
import { a as n, i as r, n as i, r as a, t as o } from "./chunks/Icon-BW0qv_U7.js";
|
|
3
|
+
import { $ as s, A as c, At as l, B as u, C as d, Ct as f, D as p, Dt as m, E as ee, Et as te, F as ne, Ft as re, G as ie, H as ae, I as oe, It as se, J as ce, K as le, L as ue, Lt as de, M as h, Mt as g, N as _, Nt as v, O as y, Ot as b, P as x, Pt as S, Q as C, R as w, S as T, St as E, T as D, Tt as O, U as k, V as A, W as j, X as M, Y as N, Z as P, _ as F, _t as I, a as L, at as R, b as z, bt as B, c as V, ct as H, d as fe, dt as pe, et as me, f as he, ft as ge, g as _e, gt as ve, h as ye, ht as be, i as xe, it as Se, j as Ce, jt as we, k as Te, kt as Ee, l as De, lt as Oe, m as ke, mt as Ae, n as je, nt as Me, o as Ne, ot as Pe, p as Fe, pt as Ie, q as Le, r as Re, rt as ze, s as Be, st as Ve, t as He, tt as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et } from "./chunks/icons-DbScMMqX.js";
|
|
4
|
+
import { n as tt, r as nt } from "./chunks/paintValue-Bz6AVuh3.js";
|
|
5
|
+
import { n as rt, r as it, t as at } from "./chunks/portalHost-CjpCnuGU.js";
|
|
6
|
+
import { n as ot, r as st, t as ct } from "./chunks/Tooltip-9XiJF937.js";
|
|
7
|
+
import { t as lt } from "./chunks/keyGlyph-CLvUHU8c.js";
|
|
8
|
+
import { n as ut, t as dt } from "./chunks/formatShortcut-BoGqUoWi.js";
|
|
9
|
+
import { t as ft } from "./chunks/ActionBar-CYvfmEz0.js";
|
|
10
|
+
import { n as pt, t as mt } from "./chunks/Badge-DZ0lFs14.js";
|
|
11
|
+
import { t as ht } from "./chunks/stance-CarrcbbP.js";
|
|
9
12
|
import "./components/Badge/index.js";
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { n as
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { a as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { a as
|
|
26
|
-
import { t as
|
|
27
|
-
import { t as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { t as
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { t as
|
|
35
|
-
import { t as
|
|
36
|
-
import {
|
|
37
|
-
import { t as
|
|
38
|
-
import {
|
|
39
|
-
import { t as
|
|
40
|
-
import { t as
|
|
41
|
-
import { t as
|
|
42
|
-
import { t as
|
|
43
|
-
import {
|
|
44
|
-
import { t as
|
|
45
|
-
import { t as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import { t as
|
|
50
|
-
import {
|
|
51
|
-
import { t as
|
|
52
|
-
import { t as
|
|
53
|
-
import { t as
|
|
54
|
-
import { t as
|
|
55
|
-
import {
|
|
56
|
-
import { t as
|
|
57
|
-
import { t as
|
|
58
|
-
import { n as
|
|
13
|
+
import { t as gt } from "./chunks/Button-Dyp31jMt.js";
|
|
14
|
+
import { t as _t } from "./chunks/Code-v4tDWuuN.js";
|
|
15
|
+
import { t as vt } from "./chunks/useReorderDragList-Dcezzgix.js";
|
|
16
|
+
import { n as yt, r as bt, t as xt } from "./chunks/Disclosure-D79jhmh2.js";
|
|
17
|
+
import { t as St } from "./chunks/DataGrid-CZPrB_3a.js";
|
|
18
|
+
import { n as Ct, t as wt } from "./chunks/DetailList-DHaXX4TG.js";
|
|
19
|
+
import { t as Tt } from "./chunks/DragGhost-DcU7cOwy.js";
|
|
20
|
+
import { t as Et } from "./chunks/DragHandleGlyph-BtBxHjZS.js";
|
|
21
|
+
import { a as Dt, i as Ot, n as kt, o as At, r as jt, s as Mt, t as Nt } from "./chunks/Keycaps-CKiKOJnJ.js";
|
|
22
|
+
import { a as Pt, c as Ft, i as It, n as Lt, o as Rt, r as zt, s as Bt, t as Vt } from "./chunks/Plot2D-lyO7waPQ.js";
|
|
23
|
+
import { a as Ht, i as Ut, n as Wt, r as Gt, t as Kt } from "./chunks/CurveEditor-f1R4kSbD.js";
|
|
24
|
+
import { c as qt, i as Jt, n as Yt, o as Xt, r as Zt, s as Qt, t as $t } from "./chunks/createKeyframeLayer-BzDRCrrh.js";
|
|
25
|
+
import { t as en } from "./chunks/snap-DC4Km8xG.js";
|
|
26
|
+
import { i as tn, n as nn, r as rn, t as an } from "./chunks/Properties-Bbneh1ws.js";
|
|
27
|
+
import { t as on } from "./chunks/Dialog-GIvjoDQj.js";
|
|
28
|
+
import { a as sn, i as cn, n as ln, o as U, r as un, s as dn, t as fn } from "./chunks/PropertyField-CDb19d3F.js";
|
|
29
|
+
import { a as pn, i as mn, n as hn, o as gn, r as _n, t as vn } from "./chunks/number-6S8IzXVt.js";
|
|
30
|
+
import { t as yn } from "./chunks/Checkbox-ChZz30Ds.js";
|
|
31
|
+
import { t as bn } from "./chunks/InlineRange-BwGFDhpT.js";
|
|
32
|
+
import { t as xn } from "./chunks/ColorField-DJSCuSJv.js";
|
|
33
|
+
import { n as Sn, t as Cn } from "./chunks/Field-xbqRmjsI.js";
|
|
34
|
+
import { n as wn, r as Tn, t as En } from "./chunks/Select-DVValBe1.js";
|
|
35
|
+
import { t as Dn } from "./chunks/FontFamilySelect-r9TV_xIH.js";
|
|
36
|
+
import { t as On } from "./chunks/Input-Bx2cuUbS.js";
|
|
37
|
+
import { n as kn, t as An } from "./chunks/NumberField-C1Y7zP-a.js";
|
|
38
|
+
import { t as jn } from "./chunks/paintPreview-DPtZS4yU.js";
|
|
39
|
+
import { t as Mn } from "./chunks/Slider-BwRrWHFW.js";
|
|
40
|
+
import { t as Nn } from "./chunks/ToggleBar-Btnl5r7F.js";
|
|
41
|
+
import { t as Pn } from "./chunks/useRovingTabIndex-B4uJqiKP.js";
|
|
42
|
+
import { i as Fn, n as In, r as Ln, t as Rn } from "./chunks/GradientEditor-BRTxHG-W.js";
|
|
43
|
+
import { n as zn, t as Bn } from "./chunks/MeshEditor-BOOIFWnz.js";
|
|
44
|
+
import { n as Vn, t as Hn } from "./chunks/PatternPicker-DdfpxoQy.js";
|
|
45
|
+
import { t as Un } from "./chunks/PaintInput-BFKhd83I.js";
|
|
46
|
+
import { t as Wn } from "./chunks/PaintField-B2mLRZa4.js";
|
|
47
|
+
import { n as Gn, t as Kn } from "./chunks/RadioGroup-BK2mD6Q0.js";
|
|
48
|
+
import { t as qn } from "./chunks/Switch-DxF7TsEu.js";
|
|
49
|
+
import { n as Jn, r as Yn, t as Xn } from "./chunks/LayerList-BeGrkLb9.js";
|
|
50
|
+
import { t as Zn } from "./chunks/ItemList-DzJ2lK0R.js";
|
|
51
|
+
import { t as Qn } from "./chunks/ListEditor-C6zLzCsJ.js";
|
|
52
|
+
import { t as $n } from "./chunks/ColorModeControl-JOEiqtE0.js";
|
|
53
|
+
import { t as er } from "./chunks/OptionsBar-DlcagPYK.js";
|
|
54
|
+
import { t as tr } from "./chunks/ButtonBar-smZzFuEo.js";
|
|
55
|
+
import { a as nr, i as rr, n as ir, o as ar, r as or, s as sr, t as cr } from "./chunks/prefField-CLkhrvYl.js";
|
|
56
|
+
import { i as lr, l as ur, n as dr, o as fr, r as pr, s as mr, t as hr } from "./chunks/model-BQMvTLnW.js";
|
|
57
|
+
import { t as gr } from "./chunks/ToolOptionsBar-BF3TNXA3.js";
|
|
58
|
+
import { t as _r } from "./chunks/FillStrokeSwatch-BViKXIPx.js";
|
|
59
|
+
import { t as vr } from "./chunks/SwatchGrid-C-Zx2Exd.js";
|
|
60
|
+
import { t as yr } from "./chunks/Powerline-DBEPceLE.js";
|
|
61
|
+
import { a as br, i as xr, n as Sr, o as Cr, r as wr, t as Tr } from "./chunks/Prefs-Ctu0H4-b.js";
|
|
62
|
+
import { t as Er } from "./chunks/SelectionPanel-C5LmZA7b.js";
|
|
63
|
+
import { t as Dr } from "./chunks/ResizeHandle-Cc6EOehs.js";
|
|
64
|
+
import { t as Or } from "./chunks/Sidebar-DKKd4R-x.js";
|
|
65
|
+
import { t as kr } from "./chunks/SidebarPanel-u5NsuAZY.js";
|
|
66
|
+
import { n as Ar, r as jr, t as Mr } from "./chunks/StatusBar-CdPdmmda.js";
|
|
67
|
+
import { t as Nr } from "./chunks/ToolButton-rzqlFlAc.js";
|
|
68
|
+
import { t as Pr } from "./chunks/ToolGroup-4bUBV5k6.js";
|
|
69
|
+
import { t as Fr } from "./chunks/ToolPalette-Uw4PvWwa.js";
|
|
59
70
|
import "./components/Field/index.js";
|
|
60
|
-
import { i as
|
|
61
|
-
import { t as
|
|
62
|
-
import {
|
|
63
|
-
import { t as
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import { t as
|
|
67
|
-
import { a as
|
|
68
|
-
import {
|
|
69
|
-
import { t as
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
71
|
+
import { i as Ir, n as Lr, r as Rr, t as zr } from "./chunks/Tabs-GXEfoe3o.js";
|
|
72
|
+
import { n as Br, r as Vr, t as Hr } from "./chunks/Tree-BGt6P8tI.js";
|
|
73
|
+
import { t as Ur } from "./chunks/MenuButton-BcdhrNGh.js";
|
|
74
|
+
import { n as Wr, t as Gr } from "./chunks/ComboBox-C1JgIpML.js";
|
|
75
|
+
import { t as Kr } from "./chunks/RangeSlider-BiRAOsTh.js";
|
|
76
|
+
import { t as qr } from "./chunks/DetentSlider-BYyaZha6.js";
|
|
77
|
+
import { n as Jr, t as Yr } from "./chunks/Callout-xLjnx7Mp.js";
|
|
78
|
+
import { a as Xr, i as Zr, n as Qr, r as $r, t as ei } from "./chunks/Toast-BfcljZz6.js";
|
|
79
|
+
import { t as ti } from "./chunks/PointPlotter-DGs9i5P-.js";
|
|
80
|
+
import { a as ni, i as ri, n as ii, r as ai, t as oi } from "./chunks/TokenPanel-5ajHEHha.js";
|
|
81
|
+
import { n as si, r as ci, t as li } from "./chunks/BandEditor-D-nVrVO4.js";
|
|
82
|
+
import { t as ui } from "./chunks/Jog-LPoac9s4.js";
|
|
83
|
+
import { a as di, c as fi, i as pi, l as mi, n as hi, o as gi, r as _i, s as vi, t as yi } from "./chunks/Timeline-SgmpQtUV.js";
|
|
84
|
+
import { hexToOklchDeg as W, hexToRgba as bi, interpolateSrgb as G, oklchDegToHex as xi, rgbaToHex as K } from "@weasel-js/core";
|
|
85
|
+
import { useCallback as Si, useEffect as q, useRef as J, useState as Y } from "react";
|
|
73
86
|
//#region src/color/oklch.ts
|
|
74
|
-
var
|
|
75
|
-
function
|
|
87
|
+
var X = xi;
|
|
88
|
+
function Z(e, t) {
|
|
76
89
|
let [n, r] = t.lRange;
|
|
77
90
|
return e <= n ? t.cBot : e >= r ? t.cTop : e <= t.midL ? t.cBot + (t.cPeak - t.cBot) * ((e - n) / (t.midL - n)) : t.cPeak + (t.cTop - t.cPeak) * ((e - t.midL) / (r - t.midL));
|
|
78
91
|
}
|
|
79
92
|
//#endregion
|
|
93
|
+
//#region src/color/ramp.ts
|
|
94
|
+
var Q = (e) => {
|
|
95
|
+
let [t, n, r] = bi(e);
|
|
96
|
+
return [
|
|
97
|
+
t,
|
|
98
|
+
n,
|
|
99
|
+
r
|
|
100
|
+
];
|
|
101
|
+
};
|
|
102
|
+
function $(e, t, n, r = {}) {
|
|
103
|
+
let { space: i = "oklch", hue: a = "shorter", chroma: o } = r, s = Q(e), c = Q(t), l = K(G(s, c, n, i, a));
|
|
104
|
+
if (!o) return l;
|
|
105
|
+
let u = W(l), d = u.C > 1e-4 ? u.H : W(K(G(s, c, n, "oklch", a))).H;
|
|
106
|
+
return X(u.L, Z(u.L, o), d);
|
|
107
|
+
}
|
|
108
|
+
function Ci(e, t, n, r = {}) {
|
|
109
|
+
return n <= 1 ? n === 1 ? [$(e, t, 0, r)] : [] : Array.from({ length: n }, (i, a) => $(e, t, a / (n - 1), r));
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
80
112
|
//#region src/useAsyncOptions.ts
|
|
81
|
-
function
|
|
82
|
-
let [r, i] =
|
|
113
|
+
function wi({ load: e, debounceMs: t = 150, minLength: n = 0 }) {
|
|
114
|
+
let [r, i] = Y(""), [a, o] = Y([]), [s, c] = Y(!1), [l, u] = Y(null), d = J(e);
|
|
83
115
|
d.current = e;
|
|
84
|
-
let f =
|
|
85
|
-
return
|
|
116
|
+
let f = J(0), p = J(0), m = J(null);
|
|
117
|
+
return q(() => {
|
|
86
118
|
if (r.length < n) {
|
|
87
119
|
m.current?.abort(), m.current = null, p.current = f.current, o([]), c(!1), u(null);
|
|
88
120
|
return;
|
|
@@ -100,15 +132,15 @@ function Ar({ load: e, debounceMs: t = 150, minLength: n = 0 }) {
|
|
|
100
132
|
r,
|
|
101
133
|
t,
|
|
102
134
|
n
|
|
103
|
-
]),
|
|
135
|
+
]), q(() => () => m.current?.abort(), []), {
|
|
104
136
|
options: a,
|
|
105
137
|
isLoading: s,
|
|
106
138
|
loadError: l,
|
|
107
139
|
inputValue: r,
|
|
108
|
-
onInputChange:
|
|
140
|
+
onInputChange: Si((e) => i(e), [])
|
|
109
141
|
};
|
|
110
142
|
}
|
|
111
143
|
//#endregion
|
|
112
|
-
export {
|
|
144
|
+
export { ft as ActionBar, He as AddIcon, je as AlignBottomIcon, Re as AlignCenterXIcon, xe as AlignCenterYIcon, L as AlignLeftIcon, Ne as AlignRightIcon, Be as AlignTopIcon, yi as AnimatedTimeline, V as ArrowIcon, mt as Badge, li as BandEditor, De as BringForwardIcon, We as BringToFrontIcon, fe as BusyIcon, gt as Button, tr as ButtonBar, Yr as Callout, Jr as CalloutTrigger, he as CheckIcon, yn as Checkbox, Fe as ChevronIcon, ke as CloneIcon, ye as CloseIcon, _t as Code, _e as CollapseIcon, xn as ColorField, $n as ColorModeControl, Gr as ComboBox, Wr as ComboBoxItem, F as CompareIcon, Ke as CopyIcon, Qe as CrosshairIcon, Wt as CurveEditor, tn as CurveField, z as CutIcon, St as DataGrid, Xe as DeleteIcon, wt as DetailList, Ct as DetailRow, qr as DetentSlider, on as Dialog, rn as DialogRow, xt as Disclosure, yt as DisclosureMark, bt as DisclosureRow, T as DistributeHorizontalIcon, d as DistributeVerticalIcon, Tt as DragGhost, Et as DragHandleGlyph, Je as DuplicateIcon, gi as EASING_NAMES, pt as EDGE_PROFILES, di as EasingPicker, D as EllipseIcon, ee as ErrorIcon, p as ExpandIcon, y as ExportIcon, Te as EyedropperIcon, Cn as Field, _r as FillStrokeSwatch, c as FilterIcon, Ce as FitIcon, h as FlipXIcon, _ as FlipYIcon, ct as Focusable, Dn as FontFamilySelect, x as FullscreenIcon, Ln as GradientEditor, In as GradientHandles, ne as GridIcon, oe as GroupIcon, Xt as HANDLE_SIZE_TOKENS, ue as HandIcon, w as HiddenIcon, a as ICON_FILLS, r as ICON_GROUPS, n as ICON_PATHS, o as Icon, et as ImageIcon, u as InfoIcon, bn as InlineRange, On as Input, Zn as ItemList, ui as Jog, jt as KeyCap, kt as KeySequence, A as LassoIcon, Jn as LayerList, Jt as LayeredCurveEditor, ae as LayersIcon, k as LayoutColumnsIcon, j as LayoutGridIcon, ie as LayoutRowsIcon, le as LineIcon, Le as LinkIcon, Qn as ListEditor, ce as LockIcon, N as LoupeIcon, vn as MINUS_SIGN, hr as MIXED, M as MeasureIcon, Ur as MenuButton, Bn as MeshEditor, P as ModeAutoIcon, C as ModeDarkIcon, s as ModeLightIcon, kn as NumberField, er as OptionsBar, at as OverlayPortalProvider, me as PageIcon, Wn as PaintField, Un as PaintInput, Ue as PanIcon, Me as PasteIcon, Hn as PatternPicker, ze as PauseIcon, Se as PenIcon, R as PencilIcon, Pe as PinIcon, Ve as PlayIcon, Vt as Plot2D, ti as PointPlotter, H as PolygonIcon, yr as Powerline, Tr as PrefsDialog, Sr as PrefsForm, xr as PrefsPane, wr as PrefsRail, fn as PropertyControl, ln as PropertyField, nn as PropertyGroup, un as PropertyList, cn as PropertyNote, sn as PropertyPanel, U as PropertyRow, dn as PropertySpan, Kn as Radio, Gn as RadioGroup, Oe as RandomizeIcon, Kr as RangeSlider, Ge as RectIcon, pe as RedoIcon, ge as RefreshIcon, Ie as RemoveIcon, Ae as ResetIcon, Dr as ResizeHandle, Rn as SceneGradientHandles, be as SearchIcon, En as Select, ve as SelectIcon, wn as SelectItem, Tn as SelectSection, Er as SelectionPanel, I as SendBackwardIcon, qe as SendToBackIcon, de as ShapeKindIcon, Or as Sidebar, kr as SidebarPanel, Mn as Slider, $e as SnapIcon, B as SnapshotIcon, Ze as SortIcon, E as StarIcon, Mr as StatusBar, Ar as StatusBarItem, jr as StatusBarSpacer, f as StepBackIcon, Ye as StepForwardIcon, O as StepIcon, te as StopIcon, an as Subpanel, vr as SwatchGrid, qn as Switch, ii as TOKEN_CATEGORIES, zr as Tab, Lr as TabList, Rr as TabPanel, Ir as Tabs, m as TextIcon, hi as Timeline, Qr as ToastQueue, ei as ToastRegion, Nn as ToggleBar, oi as TokenPanel, Nr as ToolButton, Pr as ToolGroup, gr as ToolOptionsBar, Fr as ToolPalette, ot as Tooltip, st as TooltipTrigger, pi as Transport, Hr as Tree, b as TuneIcon, Ee as UndoIcon, l as UngroupIcon, An as UnitField, we as UnknownIcon, g as UnlockIcon, v as VisibleIcon, S as WarningIcon, re as ZoomInIcon, se as ZoomOutIcon, dr as aggregateValue, $t as applyKeyframeDrag, Z as chromaAt, pr as classifyKind, Ci as colorRamp, Gt as createFunctionLayer, Yt as createKeyframeLayer, Kt as createSetCurveOp, $r as createToastQueue, Zr as defaultToastQueue, Dt as detectPlatform, t as dlog, vi as easingBezier, fi as easingLabel, lr as effectiveSections, Sn as fieldClasses, ir as filterPrefSubtree, Br as filterTree, hn as formatCompact, _n as formatNumber, dt as formatShortcut, ut as formatShortcutParts, Lt as formatTick, mn as formatZoom, Ut as functionLayerState, Qt as handleHalf, qt as handleSize, Ot as inferKeycapKind, ai as inferTokenType, e as isDebugEnabled, i as isFillable, zn as isMeshPaint, or as isPrefLeaf, lt as keyGlyph, At as keySpecFromKey, Mt as keySpecsFromMods, Nt as keySpecsFromShortcut, Zt as keyframeLayerState, fr as kindBreakdown, si as linearScale, ci as logScale, Bt as modelToPlot, Yn as moveLayers, rt as nearestPortalHost, zt as niceStep, It as niceTicks, mr as nodeValueAt, X as oklchToHex, Fn as paintGradientTrack, jn as paintPreviewCss, pn as parseNumber, gn as parseSignedNumber, br as pickActiveSection, Ft as plotToModel, rr as prefDisplayBounds, cr as prefFieldProps, nr as prefRailItems, ar as prefValueAtPath, $ as rampColor, ri as refitScale, _i as samePath, Ht as sampleByInterpolation, mi as sampleEasing, Vn as seedPattern, ur as setAtPath, en as snapToNearest, tt as solidColorOf, Pt as stepDecimals, nt as strokeColorOf, Rt as tickDecimals, Xr as toast, ni as tokenCategory, Vr as treeBranchIds, wi as useAsyncOptions, it as useOverlayPortal, vt as useReorderDragList, Pn as useRovingTabIndex, Xn as useSceneLayerList, Cr as useScrollSpy, ht as useStance, sr as visiblePrefSubtree };
|
|
113
145
|
|
|
114
146
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/color/oklch.ts","../src/useAsyncOptions.ts"],"sourcesContent":["// OKLCH math from Björn Ottosson: https://bottosson.github.io/posts/oklab/\nimport { oklchDegToHex } from '@weasel-js/core';\n\n/**\n * A chroma envelope over lightness, as three linear segments: flat at `cBot`\n * below `lRange[0]`, rising to `cPeak` at `midL`, falling to `cTop` at\n * `lRange[1]`, flat beyond. Keeps a color ramp inside gamut at the light and\n * dark ends while staying saturated through the middle.\n */\nexport type ChromaCurve = {\n lRange: [number, number];\n midL: number;\n cBot: number;\n cPeak: number;\n cTop: number;\n};\n\n/** A single lightness/chroma sample. */\nexport type ChromaCurvePoint = { L: number; C: number };\n\n/**\n * Converts an OKLCH color to a gamut-clipped `#rrggbb` string. Hue is in\n * degrees, unlike the kit's OKLab helpers which take radians.\n */\nexport const oklchToHex = oklchDegToHex;\n\n/** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */\nexport function chromaAt(L: number, curve: ChromaCurve): number {\n const [lo, hi] = curve.lRange;\n if (L <= lo) return curve.cBot;\n if (L >= hi) return curve.cTop;\n if (L <= curve.midL) return curve.cBot + (curve.cPeak - curve.cBot) * ((L - lo) / (curve.midL - lo));\n return curve.cPeak + (curve.cTop - curve.cPeak) * ((L - curve.midL) / (hi - curve.midL));\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { ComboBoxOption } from './components/ComboBox/ComboBox';\n\ntype Key = string | number;\n\n/** An option list keyed to the value type its combo box commits. */\nexport type AsyncOption<T extends Key> = ComboBoxOption & { value: T };\n\n/** Options for {@link useAsyncOptions}. */\nexport type UseAsyncOptionsProps<T extends Key> = {\n /**\n * Fetches the options for a query. The signal aborts when a later keystroke\n * supersedes this call, so a `fetch` should forward it.\n */\n load: (query: string, signal: AbortSignal) => Promise<ReadonlyArray<AsyncOption<T>>>;\n /** Quiet period before a query is sent. */\n debounceMs?: number;\n /** Shorter queries are not sent, and empty the options. */\n minLength?: number;\n};\n\n/** What {@link useAsyncOptions} returns, shaped to spread into a `ComboBox`. */\nexport type AsyncOptionsResult<T extends Key> = {\n options: ReadonlyArray<AsyncOption<T>>;\n isLoading: boolean;\n loadError: unknown | null;\n inputValue: string;\n onInputChange: (next: string) => void;\n};\n\n/**\n * Drives a combo box whose options come from a server: debounces the query,\n * discards responses overtaken by a later one, and reports a failed load\n * separately from an empty result.\n *\n * `options` holds the last *resolved* list and is never emptied to mean\n * \"working\", so the previous results stay on screen — and stay arrowable —\n * while the next request is in flight.\n */\nexport function useAsyncOptions<T extends Key = string>({\n load,\n debounceMs = 150,\n minLength = 0,\n}: UseAsyncOptionsProps<T>): AsyncOptionsResult<T> {\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<ReadonlyArray<AsyncOption<T>>>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [loadError, setLoadError] = useState<unknown | null>(null);\n\n // Read through a ref: a consumer passing an inline arrow re-creates `load`\n // every render, and depending on it directly would refire the request.\n const loadRef = useRef(load);\n loadRef.current = load;\n\n // A monotonic id per request, and the highest one whose result has been\n // applied. A liveness flag cannot do this job: two requests from adjacent\n // keystrokes are both live, so the slower one overwrites the newer result\n // if it lands second.\n const issued = useRef(0);\n const applied = useRef(0);\n const inFlight = useRef<AbortController | null>(null);\n\n useEffect(() => {\n if (inputValue.length < minLength) {\n inFlight.current?.abort();\n inFlight.current = null;\n applied.current = issued.current;\n setOptions([]);\n setIsLoading(false);\n setLoadError(null);\n return;\n }\n\n const timer = setTimeout(() => {\n const mine = ++issued.current;\n const controller = new AbortController();\n inFlight.current?.abort();\n inFlight.current = controller;\n setIsLoading(true);\n\n loadRef.current(inputValue, controller.signal).then(\n (next) => {\n if (mine <= applied.current) return;\n applied.current = mine;\n setOptions(next);\n setLoadError(null);\n setIsLoading(false);\n },\n (error: unknown) => {\n if (controller.signal.aborted || mine <= applied.current) return;\n applied.current = mine;\n setLoadError(error);\n setIsLoading(false);\n },\n );\n }, debounceMs);\n\n return () => clearTimeout(timer);\n }, [inputValue, debounceMs, minLength]);\n\n useEffect(() => () => inFlight.current?.abort(), []);\n\n const onInputChange = useCallback((next: string) => setInputValue(next), []);\n\n return { options, isLoading, loadError, inputValue, onInputChange };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAa,KAAa;AAG1B,SAAgB,GAAS,GAAW,GAA4B;CAC9D,IAAM,CAAC,GAAI,KAAM,EAAM;AAIvB,QAHI,KAAK,IAAW,EAAM,OACtB,KAAK,IAAW,EAAM,OACtB,KAAK,EAAM,OAAa,EAAM,QAAQ,EAAM,QAAQ,EAAM,UAAU,IAAI,MAAO,EAAM,OAAO,MACzF,EAAM,SAAS,EAAM,OAAO,EAAM,WAAW,IAAI,EAAM,SAAS,IAAK,EAAM;;;;ACOpF,SAAgB,GAAwC,EACtD,SACA,gBAAa,KACb,eAAY,KACqC;CACjD,IAAM,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAS,KAAc,EAAwC,EAAE,CAAC,EACnE,CAAC,GAAW,KAAgB,EAAS,GAAM,EAC3C,CAAC,GAAW,KAAgB,EAAyB,KAAK,EAI1D,IAAU,EAAO,EAAK;AAC5B,GAAQ,UAAU;CAMlB,IAAM,IAAS,EAAO,EAAE,EAClB,IAAU,EAAO,EAAE,EACnB,IAAW,EAA+B,KAAK;AA4CrD,QA1CA,QAAgB;AACd,MAAI,EAAW,SAAS,GAAW;AAMjC,GALA,EAAS,SAAS,OAAO,EACzB,EAAS,UAAU,MACnB,EAAQ,UAAU,EAAO,SACzB,EAAW,EAAE,CAAC,EACd,EAAa,GAAM,EACnB,EAAa,KAAK;AAClB;;EAGF,IAAM,IAAQ,iBAAiB;GAC7B,IAAM,IAAO,EAAE,EAAO,SAChB,IAAa,IAAI,iBAAiB;AAKxC,GAJA,EAAS,SAAS,OAAO,EACzB,EAAS,UAAU,GACnB,EAAa,GAAK,EAElB,EAAQ,QAAQ,GAAY,EAAW,OAAO,CAAC,MAC5C,MAAS;AACJ,SAAQ,EAAQ,YACpB,EAAQ,UAAU,GAClB,EAAW,EAAK,EAChB,EAAa,KAAK,EAClB,EAAa,GAAM;OAEpB,MAAmB;AACd,MAAW,OAAO,WAAW,KAAQ,EAAQ,YACjD,EAAQ,UAAU,GAClB,EAAa,EAAM,EACnB,EAAa,GAAM;KAEtB;KACA,EAAW;AAEd,eAAa,aAAa,EAAM;IAC/B;EAAC;EAAY;EAAY;EAAU,CAAC,EAEvC,cAAsB,EAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAI7C;EAAE;EAAS;EAAW;EAAW;EAAY,eAF9B,IAAa,MAAiB,EAAc,EAAK,EAAE,EAAE,CAEvB;EAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/color/oklch.ts","../src/color/ramp.ts","../src/useAsyncOptions.ts"],"sourcesContent":["// OKLCH math from Björn Ottosson: https://bottosson.github.io/posts/oklab/\nimport { oklchDegToHex } from '@weasel-js/core';\n\n/**\n * A chroma envelope over lightness, as three linear segments: flat at `cBot`\n * below `lRange[0]`, rising to `cPeak` at `midL`, falling to `cTop` at\n * `lRange[1]`, flat beyond. Keeps a color ramp inside gamut at the light and\n * dark ends while staying saturated through the middle.\n */\nexport type ChromaCurve = {\n lRange: [number, number];\n midL: number;\n cBot: number;\n cPeak: number;\n cTop: number;\n};\n\n/** A single lightness/chroma sample. */\nexport type ChromaCurvePoint = { L: number; C: number };\n\n/**\n * Converts an OKLCH color to a gamut-clipped `#rrggbb` string. Hue is in\n * degrees, unlike the kit's OKLab helpers which take radians.\n */\nexport const oklchToHex = oklchDegToHex;\n\n/** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */\nexport function chromaAt(L: number, curve: ChromaCurve): number {\n const [lo, hi] = curve.lRange;\n if (L <= lo) return curve.cBot;\n if (L >= hi) return curve.cTop;\n if (L <= curve.midL) return curve.cBot + (curve.cPeak - curve.cBot) * ((L - lo) / (curve.midL - lo));\n return curve.cPeak + (curve.cTop - curve.cPeak) * ((L - curve.midL) / (hi - curve.midL));\n}\n","import {\n hexToOklchDeg,\n hexToRgba,\n interpolateSrgb,\n rgbaToHex,\n type ColorInterpolationSpace,\n type HueInterpolation,\n} from '@weasel-js/core';\nimport { chromaAt, oklchToHex, type ChromaCurve } from './oklch';\n\n/**\n * How {@link rampColor} and {@link colorRamp} travel between two endpoints.\n *\n * What each space interpolates:\n *\n * | `space` | components lerped | hue |\n * | --------------- | ---------------------------- | -------------------- |\n * | `'oklch'` | L, C, H | around the wheel |\n * | `'hsl'` | H, S, L | around the wheel |\n * | `'oklab'` | L, a, b | through the wheel |\n * | `'srgb'` | gamma-encoded R, G, B | through the wheel |\n * | `'srgb-linear'` | linear-light R, G, B | through the wheel |\n *\n * A lightness ramp is two endpoints that differ in lightness, and a hue ramp\n * two that differ in hue: the polar spaces keep chroma or saturation fixed\n * while they move, and the others cut a straight line between the two colors,\n * which for a hue ramp passes through gray.\n *\n * `chroma` is an OKLCH envelope in every space, since {@link ChromaCurve}'s\n * numbers are OKLCH chroma over OKLCH lightness. It runs after the\n * interpolation: each sample keeps its lightness and hue, and its chroma is\n * replaced with the curve's value at that lightness. A sample left with no\n * hue (a gray midpoint) takes the hue an OKLCH ramp would have had there.\n */\nexport interface ColorRampOptions {\n /** Default `'oklch'`. */\n space?: ColorInterpolationSpace;\n /** Polar spaces only. Default `'shorter'`. */\n hue?: HueInterpolation;\n chroma?: ChromaCurve;\n}\n\nconst rgb = (hex: string): [number, number, number] => {\n const [r, g, b] = hexToRgba(hex);\n return [r, g, b];\n};\n\n/** One sample of a ramp from `from` to `to` (`#rrggbb`), `t` in 0..1. */\nexport function rampColor(from: string, to: string, t: number, options: ColorRampOptions = {}): string {\n const { space = 'oklch', hue = 'shorter', chroma } = options;\n const a = rgb(from);\n const b = rgb(to);\n const hex = rgbaToHex(interpolateSrgb(a, b, t, space, hue));\n if (!chroma) return hex;\n const s = hexToOklchDeg(hex);\n const H = s.C > 1e-4 ? s.H : hexToOklchDeg(rgbaToHex(interpolateSrgb(a, b, t, 'oklch', hue))).H;\n return oklchToHex(s.L, chromaAt(s.L, chroma), H);\n}\n\n/** `steps` evenly spaced samples from `from` to `to`, both ends included. */\nexport function colorRamp(from: string, to: string, steps: number, options: ColorRampOptions = {}): string[] {\n if (steps <= 1) return steps === 1 ? [rampColor(from, to, 0, options)] : [];\n return Array.from({ length: steps }, (_, i) => rampColor(from, to, i / (steps - 1), options));\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport type { ComboBoxOption } from './components/ComboBox/ComboBox';\n\ntype Key = string | number;\n\n/** An option list keyed to the value type its combo box commits. */\nexport type AsyncOption<T extends Key> = ComboBoxOption & { value: T };\n\n/** Options for {@link useAsyncOptions}. */\nexport type UseAsyncOptionsProps<T extends Key> = {\n /**\n * Fetches the options for a query. The signal aborts when a later keystroke\n * supersedes this call, so a `fetch` should forward it.\n */\n load: (query: string, signal: AbortSignal) => Promise<ReadonlyArray<AsyncOption<T>>>;\n /** Quiet period before a query is sent. */\n debounceMs?: number;\n /** Shorter queries are not sent, and empty the options. */\n minLength?: number;\n};\n\n/** What {@link useAsyncOptions} returns, shaped to spread into a `ComboBox`. */\nexport type AsyncOptionsResult<T extends Key> = {\n options: ReadonlyArray<AsyncOption<T>>;\n isLoading: boolean;\n loadError: unknown | null;\n inputValue: string;\n onInputChange: (next: string) => void;\n};\n\n/**\n * Drives a combo box whose options come from a server: debounces the query,\n * discards responses overtaken by a later one, and reports a failed load\n * separately from an empty result.\n *\n * `options` holds the last *resolved* list and is never emptied to mean\n * \"working\", so the previous results stay on screen — and stay arrowable —\n * while the next request is in flight.\n */\nexport function useAsyncOptions<T extends Key = string>({\n load,\n debounceMs = 150,\n minLength = 0,\n}: UseAsyncOptionsProps<T>): AsyncOptionsResult<T> {\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<ReadonlyArray<AsyncOption<T>>>([]);\n const [isLoading, setIsLoading] = useState(false);\n const [loadError, setLoadError] = useState<unknown | null>(null);\n\n // Read through a ref: a consumer passing an inline arrow re-creates `load`\n // every render, and depending on it directly would refire the request.\n const loadRef = useRef(load);\n loadRef.current = load;\n\n // A monotonic id per request, and the highest one whose result has been\n // applied. A liveness flag cannot do this job: two requests from adjacent\n // keystrokes are both live, so the slower one overwrites the newer result\n // if it lands second.\n const issued = useRef(0);\n const applied = useRef(0);\n const inFlight = useRef<AbortController | null>(null);\n\n useEffect(() => {\n if (inputValue.length < minLength) {\n inFlight.current?.abort();\n inFlight.current = null;\n applied.current = issued.current;\n setOptions([]);\n setIsLoading(false);\n setLoadError(null);\n return;\n }\n\n const timer = setTimeout(() => {\n const mine = ++issued.current;\n const controller = new AbortController();\n inFlight.current?.abort();\n inFlight.current = controller;\n setIsLoading(true);\n\n loadRef.current(inputValue, controller.signal).then(\n (next) => {\n if (mine <= applied.current) return;\n applied.current = mine;\n setOptions(next);\n setLoadError(null);\n setIsLoading(false);\n },\n (error: unknown) => {\n if (controller.signal.aborted || mine <= applied.current) return;\n applied.current = mine;\n setLoadError(error);\n setIsLoading(false);\n },\n );\n }, debounceMs);\n\n return () => clearTimeout(timer);\n }, [inputValue, debounceMs, minLength]);\n\n useEffect(() => () => inFlight.current?.abort(), []);\n\n const onInputChange = useCallback((next: string) => setInputValue(next), []);\n\n return { options, isLoading, loadError, inputValue, onInputChange };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAa,IAAa;AAG1B,SAAgB,EAAS,GAAW,GAA4B;CAC9D,IAAM,CAAC,GAAI,KAAM,EAAM;AAIvB,QAHI,KAAK,IAAW,EAAM,OACtB,KAAK,IAAW,EAAM,OACtB,KAAK,EAAM,OAAa,EAAM,QAAQ,EAAM,QAAQ,EAAM,UAAU,IAAI,MAAO,EAAM,OAAO,MACzF,EAAM,SAAS,EAAM,OAAO,EAAM,WAAW,IAAI,EAAM,SAAS,IAAK,EAAM;;;;ACUpF,IAAM,KAAO,MAA0C;CACrD,IAAM,CAAC,GAAG,GAAG,KAAK,GAAU,EAAI;AAChC,QAAO;EAAC;EAAG;EAAG;EAAE;;AAIlB,SAAgB,EAAU,GAAc,GAAY,GAAW,IAA4B,EAAE,EAAU;CACrG,IAAM,EAAE,WAAQ,SAAS,SAAM,WAAW,cAAW,GAC/C,IAAI,EAAI,EAAK,EACb,IAAI,EAAI,EAAG,EACX,IAAM,EAAU,EAAgB,GAAG,GAAG,GAAG,GAAO,EAAI,CAAC;AAC3D,KAAI,CAAC,EAAQ,QAAO;CACpB,IAAM,IAAI,EAAc,EAAI,EACtB,IAAI,EAAE,IAAI,OAAO,EAAE,IAAI,EAAc,EAAU,EAAgB,GAAG,GAAG,GAAG,SAAS,EAAI,CAAC,CAAC,CAAC;AAC9F,QAAO,EAAW,EAAE,GAAG,EAAS,EAAE,GAAG,EAAO,EAAE,EAAE;;AAIlD,SAAgB,GAAU,GAAc,GAAY,GAAe,IAA4B,EAAE,EAAY;AAE3G,QADI,KAAS,IAAU,MAAU,IAAI,CAAC,EAAU,GAAM,GAAI,GAAG,EAAQ,CAAC,GAAG,EAAE,GACpE,MAAM,KAAK,EAAE,QAAQ,GAAO,GAAG,GAAG,MAAM,EAAU,GAAM,GAAI,KAAK,IAAQ,IAAI,EAAQ,CAAC;;;;ACvB/F,SAAgB,GAAwC,EACtD,SACA,gBAAa,KACb,eAAY,KACqC;CACjD,IAAM,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAS,KAAc,EAAwC,EAAE,CAAC,EACnE,CAAC,GAAW,KAAgB,EAAS,GAAM,EAC3C,CAAC,GAAW,KAAgB,EAAyB,KAAK,EAI1D,IAAU,EAAO,EAAK;AAC5B,GAAQ,UAAU;CAMlB,IAAM,IAAS,EAAO,EAAE,EAClB,IAAU,EAAO,EAAE,EACnB,IAAW,EAA+B,KAAK;AA4CrD,QA1CA,QAAgB;AACd,MAAI,EAAW,SAAS,GAAW;AAMjC,GALA,EAAS,SAAS,OAAO,EACzB,EAAS,UAAU,MACnB,EAAQ,UAAU,EAAO,SACzB,EAAW,EAAE,CAAC,EACd,EAAa,GAAM,EACnB,EAAa,KAAK;AAClB;;EAGF,IAAM,IAAQ,iBAAiB;GAC7B,IAAM,IAAO,EAAE,EAAO,SAChB,IAAa,IAAI,iBAAiB;AAKxC,GAJA,EAAS,SAAS,OAAO,EACzB,EAAS,UAAU,GACnB,EAAa,GAAK,EAElB,EAAQ,QAAQ,GAAY,EAAW,OAAO,CAAC,MAC5C,MAAS;AACJ,SAAQ,EAAQ,YACpB,EAAQ,UAAU,GAClB,EAAW,EAAK,EAChB,EAAa,KAAK,EAClB,EAAa,GAAM;OAEpB,MAAmB;AACd,MAAW,OAAO,WAAW,KAAQ,EAAQ,YACjD,EAAQ,UAAU,GAClB,EAAa,EAAM,EACnB,EAAa,GAAM;KAEtB;KACA,EAAW;AAEd,eAAa,aAAa,EAAM;IAC/B;EAAC;EAAY;EAAY;EAAU,CAAC,EAEvC,cAAsB,EAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAI7C;EAAE;EAAS;EAAW;EAAW;EAAY,eAF9B,IAAa,MAAiB,EAAc,EAAK,EAAE,EAAE,CAEvB;EAAe"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Elements that handle their own press and keys. */
|
|
2
|
+
export declare const CONTROL_SELECTOR: string;
|
|
3
|
+
/**
|
|
4
|
+
* Whether `target` sits in a control of its own somewhere inside `host` — a
|
|
5
|
+
* toggle in a list row. The host's handlers leave such an event to the
|
|
6
|
+
* control, so a row's press, click and keys never swallow its controls'.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isInControlWithin(target: EventTarget | null, host: Element): boolean;
|
|
9
|
+
//# sourceMappingURL=interactiveTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactiveTarget.d.ts","sourceRoot":"","sources":["../src/interactiveTarget.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,eAAO,MAAM,gBAAgB,QAGlB,CAAC;AAEZ;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAIpF"}
|