@weasel-js/ui 0.5.0 → 0.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-CiKvEvXi.js +63 -0
- package/dist/chunks/ActionBar-CiKvEvXi.js.map +1 -0
- package/dist/chunks/ActionsBar-CzU6Of3B.js +94 -0
- package/dist/chunks/ActionsBar-CzU6Of3B.js.map +1 -0
- package/dist/chunks/Badge-DU8ihE7Z.js +2942 -0
- package/dist/chunks/Badge-DU8ihE7Z.js.map +1 -0
- package/dist/chunks/Button-9QNIYugK.js +87 -0
- package/dist/chunks/Button-9QNIYugK.js.map +1 -0
- package/dist/chunks/Callout-CvTKW1sd.js +114 -0
- package/dist/chunks/Callout-CvTKW1sd.js.map +1 -0
- package/dist/chunks/Checkbox-BeWFZr1M.js +47 -0
- package/dist/chunks/Checkbox-BeWFZr1M.js.map +1 -0
- package/dist/chunks/ColorField-B7vHaU5G.js +60 -0
- package/dist/chunks/ColorField-B7vHaU5G.js.map +1 -0
- package/dist/chunks/ComboBox-yfrxG0_I.js +88 -0
- package/dist/chunks/ComboBox-yfrxG0_I.js.map +1 -0
- package/dist/chunks/CurveEditor-BEQtef4P.js +786 -0
- package/dist/chunks/CurveEditor-BEQtef4P.js.map +1 -0
- package/dist/chunks/DataGrid-mUq38k0Q.js +186 -0
- package/dist/chunks/DataGrid-mUq38k0Q.js.map +1 -0
- package/dist/chunks/Dialog-tAi14bY3.js +58 -0
- package/dist/chunks/Dialog-tAi14bY3.js.map +1 -0
- package/dist/chunks/Field-4cagmYlT.js +31 -0
- package/dist/chunks/Field-4cagmYlT.js.map +1 -0
- package/dist/chunks/Input-DRei6KJr.js +55 -0
- package/dist/chunks/Input-DRei6KJr.js.map +1 -0
- package/dist/chunks/Keycaps-B9dJMYx_.js +397 -0
- package/dist/chunks/Keycaps-B9dJMYx_.js.map +1 -0
- package/dist/chunks/NumberField-BAmJwxw0.js +59 -0
- package/dist/chunks/NumberField-BAmJwxw0.js.map +1 -0
- package/dist/chunks/OptionsBar-CHOP_CiW.js +98 -0
- package/dist/chunks/OptionsBar-CHOP_CiW.js.map +1 -0
- package/dist/chunks/Plot2D-CEnhzodm.js +168 -0
- package/dist/chunks/Plot2D-CEnhzodm.js.map +1 -0
- package/dist/chunks/PointPlotter-Dvh5cyOC.js +16 -0
- package/dist/chunks/PointPlotter-Dvh5cyOC.js.map +1 -0
- package/dist/chunks/Powerline-W_yqAVMc.js +36 -0
- package/dist/chunks/Powerline-W_yqAVMc.js.map +1 -0
- package/dist/chunks/Prefs-NOoGuUHy.js +238 -0
- package/dist/chunks/Prefs-NOoGuUHy.js.map +1 -0
- package/dist/chunks/RadioGroup-DUlTy95a.js +49 -0
- package/dist/chunks/RadioGroup-DUlTy95a.js.map +1 -0
- package/dist/chunks/RangeSlider-Bks9GQuO.js +52 -0
- package/dist/chunks/RangeSlider-Bks9GQuO.js.map +1 -0
- package/dist/chunks/Select-BV70VU5O.js +97 -0
- package/dist/chunks/Select-BV70VU5O.js.map +1 -0
- package/dist/chunks/SelectionPanel-D_U7GKup.js +283 -0
- package/dist/chunks/SelectionPanel-D_U7GKup.js.map +1 -0
- package/dist/chunks/Sidebar-Bk9_TPhX.js +26 -0
- package/dist/chunks/Sidebar-Bk9_TPhX.js.map +1 -0
- package/dist/chunks/SidebarPanel-Nd9Od5WD.js +59 -0
- package/dist/chunks/SidebarPanel-Nd9Od5WD.js.map +1 -0
- package/dist/chunks/Slider-sUJGgmKR.js +221 -0
- package/dist/chunks/Slider-sUJGgmKR.js.map +1 -0
- package/dist/chunks/Switch-iUmlnP_b.js +27 -0
- package/dist/chunks/Switch-iUmlnP_b.js.map +1 -0
- package/dist/chunks/Tabs-DCs-Ww2f.js +41 -0
- package/dist/chunks/Tabs-DCs-Ww2f.js.map +1 -0
- package/dist/chunks/Toast-NdSJo2vj.js +128 -0
- package/dist/chunks/Toast-NdSJo2vj.js.map +1 -0
- package/dist/chunks/ToggleBar-BfcvLaOr.js +120 -0
- package/dist/chunks/ToggleBar-BfcvLaOr.js.map +1 -0
- package/dist/chunks/ToolButton-GAzBOvcR.js +53 -0
- package/dist/chunks/ToolButton-GAzBOvcR.js.map +1 -0
- package/dist/chunks/ToolGroup-Btg47vJF.js +25 -0
- package/dist/chunks/ToolGroup-Btg47vJF.js.map +1 -0
- package/dist/chunks/ToolPalette-C8V-I-uX.js +117 -0
- package/dist/chunks/ToolPalette-C8V-I-uX.js.map +1 -0
- package/dist/chunks/Tooltip-Clgn4trm.js +39 -0
- package/dist/chunks/Tooltip-Clgn4trm.js.map +1 -0
- package/dist/chunks/keyGlyph-BDH5fqkO.js +22 -0
- package/dist/chunks/keyGlyph-BDH5fqkO.js.map +1 -0
- package/dist/color/oklch.d.ts +14 -0
- package/dist/color/oklch.d.ts.map +1 -0
- package/dist/components/ActionBar/ActionBar.d.ts +36 -0
- package/dist/components/ActionBar/ActionBar.d.ts.map +1 -0
- package/dist/components/ActionBar/index.d.ts +3 -0
- package/dist/components/ActionBar/index.d.ts.map +1 -0
- package/dist/components/ActionBar/index.js +2 -0
- package/dist/components/ActionsBar/ActionsBar.d.ts +20 -0
- package/dist/components/ActionsBar/ActionsBar.d.ts.map +1 -0
- package/dist/components/ActionsBar/index.d.ts +3 -0
- package/dist/components/ActionsBar/index.d.ts.map +1 -0
- package/dist/components/ActionsBar/index.js +2 -0
- package/dist/components/Badge/Badge.d.ts +50 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/bases/ChamferedRect.d.ts +8 -0
- package/dist/components/Badge/bases/ChamferedRect.d.ts.map +1 -0
- package/dist/components/Badge/bases/OctantBSpline.d.ts +71 -0
- package/dist/components/Badge/bases/OctantBSpline.d.ts.map +1 -0
- package/dist/components/Badge/bases/OctantSpline.d.ts +79 -0
- package/dist/components/Badge/bases/OctantSpline.d.ts.map +1 -0
- package/dist/components/Badge/bases/Polygon.d.ts +8 -0
- package/dist/components/Badge/bases/Polygon.d.ts.map +1 -0
- package/dist/components/Badge/bases/Powerline.d.ts +13 -0
- package/dist/components/Badge/bases/Powerline.d.ts.map +1 -0
- package/dist/components/Badge/bases/Puzzle.d.ts +15 -0
- package/dist/components/Badge/bases/Puzzle.d.ts.map +1 -0
- package/dist/components/Badge/bases/Quatrefoil.d.ts +46 -0
- package/dist/components/Badge/bases/Quatrefoil.d.ts.map +1 -0
- package/dist/components/Badge/bases/Ribbon.d.ts +12 -0
- package/dist/components/Badge/bases/Ribbon.d.ts.map +1 -0
- package/dist/components/Badge/bases/RoundedRect.d.ts +14 -0
- package/dist/components/Badge/bases/RoundedRect.d.ts.map +1 -0
- package/dist/components/Badge/bases/edgeProfiles.d.ts +6 -0
- package/dist/components/Badge/bases/edgeProfiles.d.ts.map +1 -0
- package/dist/components/Badge/bases/index.d.ts +24 -0
- package/dist/components/Badge/bases/index.d.ts.map +1 -0
- package/dist/components/Badge/bases/polygonSampler.d.ts +4 -0
- package/dist/components/Badge/bases/polygonSampler.d.ts.map +1 -0
- package/dist/components/Badge/bases/types.d.ts +69 -0
- package/dist/components/Badge/bases/types.d.ts.map +1 -0
- package/dist/components/Badge/effects/Aqua.d.ts +49 -0
- package/dist/components/Badge/effects/Aqua.d.ts.map +1 -0
- package/dist/components/Badge/effects/Bevel.d.ts +11 -0
- package/dist/components/Badge/effects/Bevel.d.ts.map +1 -0
- package/dist/components/Badge/effects/Bevel2.d.ts +11 -0
- package/dist/components/Badge/effects/Bevel2.d.ts.map +1 -0
- package/dist/components/Badge/effects/Bites.d.ts +10 -0
- package/dist/components/Badge/effects/Bites.d.ts.map +1 -0
- package/dist/components/Badge/effects/Metal.d.ts +41 -0
- package/dist/components/Badge/effects/Metal.d.ts.map +1 -0
- package/dist/components/Badge/effects/Outline.d.ts +17 -0
- package/dist/components/Badge/effects/Outline.d.ts.map +1 -0
- package/dist/components/Badge/effects/Perforations.d.ts +11 -0
- package/dist/components/Badge/effects/Perforations.d.ts.map +1 -0
- package/dist/components/Badge/effects/Puffs.d.ts +10 -0
- package/dist/components/Badge/effects/Puffs.d.ts.map +1 -0
- package/dist/components/Badge/effects/Rivets.d.ts +13 -0
- package/dist/components/Badge/effects/Rivets.d.ts.map +1 -0
- package/dist/components/Badge/effects/Scallops.d.ts +10 -0
- package/dist/components/Badge/effects/Scallops.d.ts.map +1 -0
- package/dist/components/Badge/effects/Shadow.d.ts +11 -0
- package/dist/components/Badge/effects/Shadow.d.ts.map +1 -0
- package/dist/components/Badge/effects/Sheen.d.ts +10 -0
- package/dist/components/Badge/effects/Sheen.d.ts.map +1 -0
- package/dist/components/Badge/effects/Spikes.d.ts +20 -0
- package/dist/components/Badge/effects/Spikes.d.ts.map +1 -0
- package/dist/components/Badge/effects/Sunbeams.d.ts +29 -0
- package/dist/components/Badge/effects/Sunbeams.d.ts.map +1 -0
- package/dist/components/Badge/effects/Woodgrain.d.ts +12 -0
- package/dist/components/Badge/effects/Woodgrain.d.ts.map +1 -0
- package/dist/components/Badge/effects/index.d.ts +40 -0
- package/dist/components/Badge/effects/index.d.ts.map +1 -0
- package/dist/components/Badge/effects/rangeMask.d.ts +13 -0
- package/dist/components/Badge/effects/rangeMask.d.ts.map +1 -0
- package/dist/components/Badge/index.d.ts +4 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/Badge/shapeControls.d.ts +29 -0
- package/dist/components/Badge/shapeControls.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Beavis.d.ts +11 -0
- package/dist/components/Badge/shapes/Beavis.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Cloud.d.ts +11 -0
- package/dist/components/Badge/shapes/Cloud.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Coffin.d.ts +12 -0
- package/dist/components/Badge/shapes/Coffin.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Crest.d.ts +8 -0
- package/dist/components/Badge/shapes/Crest.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Hexagon.d.ts +10 -0
- package/dist/components/Badge/shapes/Hexagon.d.ts.map +1 -0
- package/dist/components/Badge/shapes/House.d.ts +9 -0
- package/dist/components/Badge/shapes/House.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Notched.d.ts +10 -0
- package/dist/components/Badge/shapes/Notched.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Perforated.d.ts +8 -0
- package/dist/components/Badge/shapes/Perforated.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Pill.d.ts +4 -0
- package/dist/components/Badge/shapes/Pill.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Plain.d.ts +4 -0
- package/dist/components/Badge/shapes/Plain.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Plaque.d.ts +12 -0
- package/dist/components/Badge/shapes/Plaque.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Postage.d.ts +9 -0
- package/dist/components/Badge/shapes/Postage.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Quatrefoil.d.ts +19 -0
- package/dist/components/Badge/shapes/Quatrefoil.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Receipt.d.ts +9 -0
- package/dist/components/Badge/shapes/Receipt.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Ribbon.d.ts +13 -0
- package/dist/components/Badge/shapes/Ribbon.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Scalloped.d.ts +9 -0
- package/dist/components/Badge/shapes/Scalloped.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Shield.d.ts +11 -0
- package/dist/components/Badge/shapes/Shield.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Sparkler.d.ts +10 -0
- package/dist/components/Badge/shapes/Sparkler.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Square.d.ts +8 -0
- package/dist/components/Badge/shapes/Square.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Starburst.d.ts +11 -0
- package/dist/components/Badge/shapes/Starburst.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Urn.d.ts +4 -0
- package/dist/components/Badge/shapes/Urn.d.ts.map +1 -0
- package/dist/components/Badge/shapes/Wood.d.ts +4 -0
- package/dist/components/Badge/shapes/Wood.d.ts.map +1 -0
- package/dist/components/Badge/shapes/index.d.ts +46 -0
- package/dist/components/Badge/shapes/index.d.ts.map +1 -0
- package/dist/components/Badge/types.d.ts +39 -0
- package/dist/components/Badge/types.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +29 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Callout/Callout.d.ts +67 -0
- package/dist/components/Callout/Callout.d.ts.map +1 -0
- package/dist/components/Callout/index.d.ts +3 -0
- package/dist/components/Callout/index.d.ts.map +1 -0
- package/dist/components/Callout/index.js +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/ColorField/ColorField.d.ts +28 -0
- package/dist/components/ColorField/ColorField.d.ts.map +1 -0
- package/dist/components/ColorField/index.d.ts +2 -0
- package/dist/components/ColorField/index.d.ts.map +1 -0
- package/dist/components/ColorField/index.js +2 -0
- package/dist/components/ComboBox/ComboBox.d.ts +36 -0
- package/dist/components/ComboBox/ComboBox.d.ts.map +1 -0
- package/dist/components/ComboBox/index.d.ts +3 -0
- package/dist/components/ComboBox/index.d.ts.map +1 -0
- package/dist/components/ComboBox/index.js +2 -0
- package/dist/components/CurveEditor/CurveEditor.d.ts +41 -0
- package/dist/components/CurveEditor/CurveEditor.d.ts.map +1 -0
- package/dist/components/CurveEditor/LayeredCurveEditor.d.ts +40 -0
- package/dist/components/CurveEditor/LayeredCurveEditor.d.ts.map +1 -0
- package/dist/components/CurveEditor/catmullRom.d.ts +35 -0
- package/dist/components/CurveEditor/catmullRom.d.ts.map +1 -0
- package/dist/components/CurveEditor/createFunctionLayer.d.ts +72 -0
- package/dist/components/CurveEditor/createFunctionLayer.d.ts.map +1 -0
- package/dist/components/CurveEditor/hitTest.d.ts +29 -0
- package/dist/components/CurveEditor/hitTest.d.ts.map +1 -0
- package/dist/components/CurveEditor/index.d.ts +7 -0
- package/dist/components/CurveEditor/index.d.ts.map +1 -0
- package/dist/components/CurveEditor/index.js +2 -0
- package/dist/components/CurveEditor/interpolation.d.ts +15 -0
- package/dist/components/CurveEditor/interpolation.d.ts.map +1 -0
- package/dist/components/CurveEditor/layerTypes.d.ts +103 -0
- package/dist/components/CurveEditor/layerTypes.d.ts.map +1 -0
- package/dist/components/CurveEditor/monotone.d.ts +25 -0
- package/dist/components/CurveEditor/monotone.d.ts.map +1 -0
- package/dist/components/CurveEditor/setCurveOp.d.ts +35 -0
- package/dist/components/CurveEditor/setCurveOp.d.ts.map +1 -0
- package/dist/components/DataGrid/DataGrid.d.ts +34 -0
- package/dist/components/DataGrid/DataGrid.d.ts.map +1 -0
- package/dist/components/DataGrid/index.d.ts +3 -0
- package/dist/components/DataGrid/index.d.ts.map +1 -0
- package/dist/components/DataGrid/index.js +2 -0
- package/dist/components/Dialog/Dialog.d.ts +29 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/index.d.ts +3 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +2 -0
- package/dist/components/Field/Field.d.ts +25 -0
- package/dist/components/Field/Field.d.ts.map +1 -0
- package/dist/components/Field/index.d.ts +3 -0
- package/dist/components/Field/index.d.ts.map +1 -0
- package/dist/components/Field/index.js +2 -0
- package/dist/components/Input/Input.d.ts +28 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +2 -0
- package/dist/components/Keycaps/Keycap.d.ts +34 -0
- package/dist/components/Keycaps/Keycap.d.ts.map +1 -0
- package/dist/components/Keycaps/Keycaps.d.ts +29 -0
- package/dist/components/Keycaps/Keycaps.d.ts.map +1 -0
- package/dist/components/Keycaps/index.d.ts +8 -0
- package/dist/components/Keycaps/index.d.ts.map +1 -0
- package/dist/components/Keycaps/index.js +3 -0
- package/dist/components/Keycaps/keyGlyph.d.ts +7 -0
- package/dist/components/Keycaps/keyGlyph.d.ts.map +1 -0
- package/dist/components/Keycaps/keySpecsFromMods.d.ts +81 -0
- package/dist/components/Keycaps/keySpecsFromMods.d.ts.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +25 -0
- package/dist/components/NumberField/NumberField.d.ts.map +1 -0
- package/dist/components/NumberField/index.d.ts +3 -0
- package/dist/components/NumberField/index.d.ts.map +1 -0
- package/dist/components/NumberField/index.js +2 -0
- package/dist/components/OptionsBar/OptionsBar.d.ts +25 -0
- package/dist/components/OptionsBar/OptionsBar.d.ts.map +1 -0
- package/dist/components/OptionsBar/index.d.ts +3 -0
- package/dist/components/OptionsBar/index.d.ts.map +1 -0
- package/dist/components/OptionsBar/index.js +2 -0
- package/dist/components/Plot2D/Plot2D.d.ts +60 -0
- package/dist/components/Plot2D/Plot2D.d.ts.map +1 -0
- package/dist/components/Plot2D/geometry.d.ts +24 -0
- package/dist/components/Plot2D/geometry.d.ts.map +1 -0
- package/dist/components/Plot2D/index.d.ts +3 -0
- package/dist/components/Plot2D/index.d.ts.map +1 -0
- package/dist/components/Plot2D/index.js +2 -0
- package/dist/components/PointPlotter/PointPlotter.d.ts +51 -0
- package/dist/components/PointPlotter/PointPlotter.d.ts.map +1 -0
- package/dist/components/PointPlotter/index.d.ts +2 -0
- package/dist/components/PointPlotter/index.d.ts.map +1 -0
- package/dist/components/PointPlotter/index.js +2 -0
- package/dist/components/Powerline/Powerline.d.ts +32 -0
- package/dist/components/Powerline/Powerline.d.ts.map +1 -0
- package/dist/components/Powerline/index.d.ts +5 -0
- package/dist/components/Powerline/index.d.ts.map +1 -0
- package/dist/components/Powerline/index.js +3 -0
- package/dist/components/Prefs/PrefsDialog.d.ts +21 -0
- package/dist/components/Prefs/PrefsDialog.d.ts.map +1 -0
- package/dist/components/Prefs/PrefsForm.d.ts +42 -0
- package/dist/components/Prefs/PrefsForm.d.ts.map +1 -0
- package/dist/components/Prefs/index.d.ts +4 -0
- package/dist/components/Prefs/index.d.ts.map +1 -0
- package/dist/components/Prefs/index.js +2 -0
- package/dist/components/Prefs/schema.d.ts +85 -0
- package/dist/components/Prefs/schema.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.d.ts +3 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.js +2 -0
- package/dist/components/RangeSlider/RangeSlider.d.ts +18 -0
- package/dist/components/RangeSlider/RangeSlider.d.ts.map +1 -0
- package/dist/components/RangeSlider/index.d.ts +3 -0
- package/dist/components/RangeSlider/index.d.ts.map +1 -0
- package/dist/components/RangeSlider/index.js +2 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +46 -0
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
- package/dist/components/SelectionPanel/index.d.ts +3 -0
- package/dist/components/SelectionPanel/index.d.ts.map +1 -0
- package/dist/components/SelectionPanel/index.js +2 -0
- package/dist/components/SelectionPanel/model.d.ts +43 -0
- package/dist/components/SelectionPanel/model.d.ts.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +31 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/components/Sidebar/index.d.ts +3 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/SidebarPanel/SidebarPanel.d.ts +35 -0
- package/dist/components/SidebarPanel/SidebarPanel.d.ts.map +1 -0
- package/dist/components/SidebarPanel/index.d.ts +3 -0
- package/dist/components/SidebarPanel/index.d.ts.map +1 -0
- package/dist/components/SidebarPanel/index.js +2 -0
- package/dist/components/Slider/Slider.d.ts +43 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/Switch/Switch.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/index.d.ts +3 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +2 -0
- package/dist/components/Tabs/Tabs.d.ts +22 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/queue.d.ts +56 -0
- package/dist/components/Toast/queue.d.ts.map +1 -0
- package/dist/components/ToggleBar/ToggleBar.d.ts +35 -0
- package/dist/components/ToggleBar/ToggleBar.d.ts.map +1 -0
- package/dist/components/ToggleBar/index.d.ts +3 -0
- package/dist/components/ToggleBar/index.d.ts.map +1 -0
- package/dist/components/ToggleBar/index.js +2 -0
- package/dist/components/ToolButton/ToolButton.d.ts +41 -0
- package/dist/components/ToolButton/ToolButton.d.ts.map +1 -0
- package/dist/components/ToolButton/index.d.ts +3 -0
- package/dist/components/ToolButton/index.d.ts.map +1 -0
- package/dist/components/ToolButton/index.js +2 -0
- package/dist/components/ToolGroup/ToolGroup.d.ts +25 -0
- package/dist/components/ToolGroup/ToolGroup.d.ts.map +1 -0
- package/dist/components/ToolGroup/index.d.ts +3 -0
- package/dist/components/ToolGroup/index.d.ts.map +1 -0
- package/dist/components/ToolGroup/index.js +2 -0
- package/dist/components/ToolPalette/ToolPalette.d.ts +27 -0
- package/dist/components/ToolPalette/ToolPalette.d.ts.map +1 -0
- package/dist/components/ToolPalette/formatShortcut.d.ts +17 -0
- package/dist/components/ToolPalette/formatShortcut.d.ts.map +1 -0
- package/dist/components/ToolPalette/index.d.ts +4 -0
- package/dist/components/ToolPalette/index.d.ts.map +1 -0
- package/dist/components/ToolPalette/index.js +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +24 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/dlog.d.ts +33 -0
- package/dist/dlog.d.ts.map +1 -0
- package/dist/format/number.d.ts +13 -0
- package/dist/format/number.d.ts.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -6749
- package/dist/index.js.map +1 -1
- package/dist/paintGradientTrack.d.ts +15 -0
- package/dist/paintGradientTrack.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/useReorderDragList.d.ts +35 -0
- package/dist/useReorderDragList.d.ts.map +1 -0
- package/package.json +8 -4
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layered curve editor contract.
|
|
3
|
+
*
|
|
4
|
+
* A `CurveLayer` is a pure-value description of one composable layer
|
|
5
|
+
* inside `LayeredCurveEditor`. State lives outside the layer (held by
|
|
6
|
+
* the consumer); the layer only provides render + hit-test + gesture
|
|
7
|
+
* starters. This lets the editor coordinate cross-layer reactivity —
|
|
8
|
+
* when one layer's gesture updates its state, the consumer can update
|
|
9
|
+
* other layers' states in the same render, and the in-flight gesture
|
|
10
|
+
* keeps reading the latest state.
|
|
11
|
+
*/
|
|
12
|
+
import type { ReactNode } from 'react';
|
|
13
|
+
import type { Point as PlotPoint, ModelRange } from '../Plot2D/geometry';
|
|
14
|
+
/** Convenience aliases — both are `{ x, y }` but with different units. */
|
|
15
|
+
export type ModelPoint = PlotPoint;
|
|
16
|
+
export type { PlotPoint };
|
|
17
|
+
export interface LayerModifiers {
|
|
18
|
+
shift: boolean;
|
|
19
|
+
alt: boolean;
|
|
20
|
+
meta: boolean;
|
|
21
|
+
ctrl: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Read-only context passed to every layer hook. Layers use this to
|
|
24
|
+
* convert between plot (SVG-pixel) and model (data) coordinates. */
|
|
25
|
+
export interface LayerCtx {
|
|
26
|
+
readonly modelRange: ModelRange;
|
|
27
|
+
readonly plotSize: {
|
|
28
|
+
readonly width: number;
|
|
29
|
+
readonly height: number;
|
|
30
|
+
};
|
|
31
|
+
toPlot(p: ModelPoint): PlotPoint;
|
|
32
|
+
toModel(p: PlotPoint): ModelPoint;
|
|
33
|
+
readonly modifiers: LayerModifiers;
|
|
34
|
+
}
|
|
35
|
+
export interface LayerRenderCtx extends LayerCtx {
|
|
36
|
+
/** True when this layer owns the currently-active gesture. Useful for
|
|
37
|
+
* surfacing "active anchor" visuals without threading the index. */
|
|
38
|
+
readonly isActive: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** Layer-private payload returned from `hitTest`. The editor doesn't
|
|
41
|
+
* read it — it just round-trips it back into `onPointerDown`. */
|
|
42
|
+
export interface LayerHit {
|
|
43
|
+
/** Layer-local discriminator (e.g. `'anchor'`, `'curve'`). */
|
|
44
|
+
kind: string;
|
|
45
|
+
payload?: unknown;
|
|
46
|
+
}
|
|
47
|
+
/** A live gesture installed by a successful `onPointerDown`. The editor
|
|
48
|
+
* routes window-level pointermove/up/cancel into these callbacks until
|
|
49
|
+
* the gesture ends.
|
|
50
|
+
*
|
|
51
|
+
* `onMove` is pure: it takes the layer's *current* state (which may
|
|
52
|
+
* have been updated by upstream re-renders since the gesture started)
|
|
53
|
+
* and returns the next state. The editor publishes that next state via
|
|
54
|
+
* `onLayerChange`. */
|
|
55
|
+
export interface LayerGesture<S> {
|
|
56
|
+
onMove(state: S, model: ModelPoint, e: PointerEvent, ctx: LayerCtx): S;
|
|
57
|
+
/** Pointerup. Return the final state. The editor uses this as the
|
|
58
|
+
* `next` value passed to `onLayerCommit`. Default: return state
|
|
59
|
+
* unchanged. */
|
|
60
|
+
onCommit?(state: S, ctx: LayerCtx): S;
|
|
61
|
+
/** Pointercancel. Return the state to restore (usually the
|
|
62
|
+
* pre-gesture snapshot). Default: return state unchanged. */
|
|
63
|
+
onCancel?(state: S, ctx: LayerCtx): S;
|
|
64
|
+
}
|
|
65
|
+
/** Pure-value layer description. Multiple instances of the same factory
|
|
66
|
+
* output (e.g. two `createFunctionLayer` results) coexist by `id`. */
|
|
67
|
+
export interface CurveLayer<S> {
|
|
68
|
+
/** Stable identifier — used as the key when the editor calls back
|
|
69
|
+
* with state updates. Must be unique within an editor instance. */
|
|
70
|
+
readonly id: string;
|
|
71
|
+
/** Render the layer's visuals as SVG children inside the editor's
|
|
72
|
+
* Plot2D. Coordinates the layer renders into are plot-space. */
|
|
73
|
+
render(state: S, ctx: LayerRenderCtx): ReactNode;
|
|
74
|
+
/** Plot-space hit test. Return null to pass the point to the next
|
|
75
|
+
* layer (top-to-bottom). Topmost-claimed wins. */
|
|
76
|
+
hitTest?(state: S, plot: PlotPoint, ctx: LayerCtx): LayerHit | null;
|
|
77
|
+
/** A positive hit-test starts a gesture, absorbs the click with no
|
|
78
|
+
* gesture by returning void, or publishes a one-shot edit via
|
|
79
|
+
* `extra.commit(next)` and returns void (e.g. shift-click delete). */
|
|
80
|
+
onPointerDown?(state: S, hit: LayerHit, e: PointerEvent, ctx: LayerCtx, extra: EmptyDownArgs<S>): LayerGesture<S> | void;
|
|
81
|
+
/** Pointerdown landed where no layer claimed a hit. Layers get a
|
|
82
|
+
* turn top-to-bottom; first non-void return wins. Either start a
|
|
83
|
+
* gesture or commit a one-shot edit (return void after publishing
|
|
84
|
+
* state via the editor — see `EmptyDownArgs.commit`). */
|
|
85
|
+
onEmptyPointerDown?(state: S, model: ModelPoint, e: PointerEvent, ctx: LayerCtx, extra: EmptyDownArgs<S>): LayerGesture<S> | void;
|
|
86
|
+
/** Keyboard while the editor has focus. Top-to-bottom; call
|
|
87
|
+
* `e.preventDefault()` to stop propagation. */
|
|
88
|
+
onKeyDown?(state: S, e: KeyboardEvent, ctx: LayerCtx): void;
|
|
89
|
+
}
|
|
90
|
+
/** Helpers handed to `onPointerDown` and `onEmptyPointerDown` so a
|
|
91
|
+
* layer can publish a one-shot edit (shift-click delete, empty-click
|
|
92
|
+
* insert) without a drag gesture, and read the click's plot+model
|
|
93
|
+
* coords without re-deriving them from the DOM event. */
|
|
94
|
+
export interface EmptyDownArgs<S> {
|
|
95
|
+
/** Pointer in plot space. */
|
|
96
|
+
readonly plot: PlotPoint;
|
|
97
|
+
/** Pointer in model space. */
|
|
98
|
+
readonly model: ModelPoint;
|
|
99
|
+
/** Publish a state update *and* mark the action as committed. Use
|
|
100
|
+
* this when the click results in an immediate, undoable edit. */
|
|
101
|
+
commit(next: S): void;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=layerTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerTypes.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/layerTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,IAAI,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC;AACnC,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED;qEACqE;AACrE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,MAAM,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;CACpC;AAED,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C;yEACqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;kEACkE;AAClE,MAAM,WAAW,QAAQ;IACvB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;uBAOuB;AACvB,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;IACvE;;qBAEiB;IACjB,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;IACtC;kEAC8D;IAC9D,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,GAAG,CAAC,CAAC;CACvC;AAED;uEACuE;AACvE,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B;wEACoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;qEACiE;IACjE,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,cAAc,GAAG,SAAS,CAAC;IAEjD;uDACmD;IACnD,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC;IAEpE;;2EAEuE;IACvE,aAAa,CAAC,CACZ,KAAK,EAAE,CAAC,EACR,GAAG,EAAE,QAAQ,EACb,CAAC,EAAE,YAAY,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAE1B;;;8DAG0D;IAC1D,kBAAkB,CAAC,CACjB,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,UAAU,EACjB,CAAC,EAAE,YAAY,EACf,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAE1B;oDACgD;IAChD,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC7D;AAED;;;0DAG0D;AAC1D,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B;sEACkE;IAClE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;CACvB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Monotone cubic interpolation (Fritsch-Carlson / Steffen variant).
|
|
3
|
+
*
|
|
4
|
+
* Passes through every anchor and guarantees the curve never
|
|
5
|
+
* overshoots `min(neighbors)` / `max(neighbors)` along either axis.
|
|
6
|
+
* The right choice for animation timing curves (no anticipation) or
|
|
7
|
+
* audio envelopes (no out-of-range values).
|
|
8
|
+
*
|
|
9
|
+
* Parameterized by index — works for both 1D (function-shaped) and
|
|
10
|
+
* 2D (parametric) anchor sequences. The x and y coordinates are
|
|
11
|
+
* interpolated independently as functions of the anchor index.
|
|
12
|
+
*
|
|
13
|
+
* Reference: Fritsch & Carlson 1980, "Monotone piecewise cubic
|
|
14
|
+
* interpolation." Steffen's 1990 refinement is conceptually the same;
|
|
15
|
+
* we use a min-clamp variant that's monotonicity-preserving by
|
|
16
|
+
* construction.
|
|
17
|
+
*/
|
|
18
|
+
import type { Point } from './catmullRom';
|
|
19
|
+
/**
|
|
20
|
+
* Sample the monotone-cubic curve through `anchors`. Returns
|
|
21
|
+
* `(n-1) * samplesPerSegment + 1` points (same shape as
|
|
22
|
+
* `sampleCatmullRom`). `[]` for fewer than 2 anchors.
|
|
23
|
+
*/
|
|
24
|
+
export declare function sampleMonotone(anchors: readonly Point[], samplesPerSegment: number): Point[];
|
|
25
|
+
//# sourceMappingURL=monotone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monotone.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/monotone.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAkD1C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,iBAAiB,EAAE,MAAM,GACxB,KAAK,EAAE,CAwBT"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Op } from '@weasel-js/core';
|
|
2
|
+
import type { ControlPoint } from './CurveEditor';
|
|
3
|
+
/**
|
|
4
|
+
* The adapter contract for {@link createSetCurveOp}. Consumers wire
|
|
5
|
+
* this to whatever state container holds the curve's value — typically
|
|
6
|
+
* a small callback that calls a React state setter or dispatches a
|
|
7
|
+
* Redux/Zustand action.
|
|
8
|
+
*/
|
|
9
|
+
export interface SetCurveAdapter {
|
|
10
|
+
setValue(id: string, next: readonly ControlPoint[]): void;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateSetCurveOpArgs {
|
|
13
|
+
/** Stable id the consumer uses for this curve. Used so a single
|
|
14
|
+
* adapter can handle multiple curves; the op's apply routes by id. */
|
|
15
|
+
id: string;
|
|
16
|
+
from: readonly ControlPoint[];
|
|
17
|
+
to: readonly ControlPoint[];
|
|
18
|
+
label?: string;
|
|
19
|
+
coalesceKey?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Op factory for editing a CurveEditor's value through weasel-history.
|
|
23
|
+
*
|
|
24
|
+
* history.applyOps(
|
|
25
|
+
* [createSetCurveOp({ id: 'easing', from, to, label: 'Edit easing' })],
|
|
26
|
+
* 'Edit easing',
|
|
27
|
+
* );
|
|
28
|
+
*
|
|
29
|
+
* The op's `apply(adapter)` calls `adapter.setValue(id, to)`. `invert()`
|
|
30
|
+
* returns a mirror op with `from`/`to` swapped. When `from` and `to`
|
|
31
|
+
* are structurally equal, `apply` returns `false` so history can skip
|
|
32
|
+
* the entry — same convention as `createSetPathOp`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createSetCurveOp(args: CreateSetCurveOpArgs): Op;
|
|
35
|
+
//# sourceMappingURL=setCurveOp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setCurveOp.d.ts","sourceRoot":"","sources":["../../../src/components/CurveEditor/setCurveOp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,GAAG,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,oBAAoB;IACnC;2EACuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IAC9B,EAAE,EAAE,SAAS,YAAY,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,EAAE,CAgB/D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface DataGridColumn<Row> {
|
|
3
|
+
id: string;
|
|
4
|
+
header: ReactNode;
|
|
5
|
+
/** Pull a sortable value from the row. Defaults to `(row as any)[column.id]`. */
|
|
6
|
+
accessor?: (row: Row) => string | number | null | undefined;
|
|
7
|
+
/** Render the cell. Defaults to `String(accessor(row) ?? '')`. */
|
|
8
|
+
render?: (row: Row) => ReactNode;
|
|
9
|
+
/** Default true. Set false to suppress the sort affordance on this column. */
|
|
10
|
+
sortable?: boolean;
|
|
11
|
+
/** Optional CSS class on every <td> in this column. */
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DataGridProps<Row extends {
|
|
15
|
+
id: string;
|
|
16
|
+
}> {
|
|
17
|
+
rows: readonly Row[];
|
|
18
|
+
columns: readonly DataGridColumn<Row>[];
|
|
19
|
+
/** Initial sort. Omit for unsorted (rows render in input order). */
|
|
20
|
+
defaultSort?: {
|
|
21
|
+
columnId: string;
|
|
22
|
+
direction: 'asc' | 'desc';
|
|
23
|
+
};
|
|
24
|
+
/** Enable drag handles in a leading column. Receives the reorder spec
|
|
25
|
+
* (the existing `useReorderDragList` semantics — see weasel-ui). */
|
|
26
|
+
onReorder?: (ids: string[], targetIndex: number) => void;
|
|
27
|
+
/** Empty-state row text. Default `'—'`. */
|
|
28
|
+
empty?: ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function DataGrid<Row extends {
|
|
32
|
+
id: string;
|
|
33
|
+
}>(props: DataGridProps<Row>): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=DataGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,cAAc,CAAC,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5D,kEAAkE;IAClE,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS,CAAC;IACjC,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa,CAAC,GAAG,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IACvD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,SAAS,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IACxC,oEAAoE;IACpE,WAAW,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,CAAC;IAC9D;yEACqE;IACrE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,2CAA2C;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,wBAAgB,QAAQ,CAAC,GAAG,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,2CAmH7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type ModalOverlayProps, type DialogProps as RACDialogProps } from 'react-aria-components';
|
|
3
|
+
export type DialogProps = Omit<ModalOverlayProps, 'children' | 'className'> & {
|
|
4
|
+
/** Heading rendered in the dialog's default header. Omit when supplying
|
|
5
|
+
* a custom `header` slot via children. */
|
|
6
|
+
title?: ReactNode;
|
|
7
|
+
/** Show the built-in close button. Defaults to true when `onOpenChange`
|
|
8
|
+
* is wired so the user has an escape hatch. */
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
/** Body content. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** Footer slot — typically action buttons. */
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
/** ARIA role. Defaults to `dialog`. Use `alertdialog` for confirms. */
|
|
15
|
+
role?: RACDialogProps['role'];
|
|
16
|
+
/** Class applied to the modal box (inside the overlay). */
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Modal dialog wrapping React Aria. Supplies a default header (title +
|
|
21
|
+
* close), scrollable body, and footer slot. Pass `isOpen` + `onOpenChange`
|
|
22
|
+
* for controlled visibility, or omit both and use a `<DialogTrigger>` from
|
|
23
|
+
* `react-aria-components` upstream of this component.
|
|
24
|
+
*
|
|
25
|
+
* Escape, click-outside, focus trap, and scroll lock all come from the
|
|
26
|
+
* underlying primitives.
|
|
27
|
+
*/
|
|
28
|
+
export declare function Dialog(props: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC5E;+CAC2C;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;oDACgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,uEAAuE;IACvE,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CA8CxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type FieldOrientation = 'stacked' | 'row';
|
|
3
|
+
export type FieldProps = {
|
|
4
|
+
orientation?: FieldOrientation;
|
|
5
|
+
className?: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Layout primitive that arranges a label, control, hint, and error in the
|
|
10
|
+
* canonical weasel-ui form-row shape. The control itself owns its semantics
|
|
11
|
+
* (RAC `TextField`, `Checkbox`, etc.); this just paints the layout.
|
|
12
|
+
*
|
|
13
|
+
* Most users will instead reach for `Input` / `Checkbox` / `Switch`, which
|
|
14
|
+
* compose Field internally. Use Field directly when you need a custom
|
|
15
|
+
* control to sit in the same visual rhythm.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Field({ orientation, className, children }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const fieldClasses: {
|
|
19
|
+
root: string;
|
|
20
|
+
row: string;
|
|
21
|
+
label: string;
|
|
22
|
+
hint: string;
|
|
23
|
+
error: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,KAAK,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,EAAE,WAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,UAAU,2CAGjF;AAED,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TextFieldProps as RACTextFieldProps, type ValidationResult } from 'react-aria-components';
|
|
3
|
+
export type InputProps = Omit<RACTextFieldProps, 'children' | 'className'> & {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
leadingAdornment?: ReactNode;
|
|
9
|
+
trailingAdornment?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Single-line text input wrapping React Aria's TextField. Supplies a
|
|
14
|
+
* default skin against the `--wzl-*` token system, and exposes the
|
|
15
|
+
* familiar label / description / errorMessage / adornment slot shape.
|
|
16
|
+
*
|
|
17
|
+
* `ref` forwards to the underlying `<input>`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<RACTextFieldProps, "children" | "className"> & {
|
|
20
|
+
label?: ReactNode;
|
|
21
|
+
description?: ReactNode;
|
|
22
|
+
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
leadingAdornment?: ReactNode;
|
|
25
|
+
trailingAdornment?: ReactNode;
|
|
26
|
+
className?: string;
|
|
27
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
28
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7D,OAAO,EAML,KAAK,cAAc,IAAI,iBAAiB,EACxC,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;YAhBR,SAAS;kBACH,SAAS;mBACR,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC;kBACjD,MAAM;uBACD,SAAS;wBACR,SAAS;gBACjB,MAAM;oDAyClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export type KeycapKind = 'modifier' | 'wide' | 'square';
|
|
3
|
+
export declare function inferKeycapKind(label: string): KeycapKind;
|
|
4
|
+
export type KeyCapVariant = 'default' | 'minimal';
|
|
5
|
+
export interface KeyCapProps {
|
|
6
|
+
/** Glyph rendered in the chip (modifier or key). */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Marks the chip as not required to trigger the action. In the default
|
|
9
|
+
* variant the chip face inverts (dark face / light glyph) for
|
|
10
|
+
* emphasis. In the `'minimal'` variant the chip's border becomes
|
|
11
|
+
* dotted to read as "may be held, but isn't required." */
|
|
12
|
+
inverted?: boolean;
|
|
13
|
+
/** Visual style. `'default'` (default) renders a filled chip; `'minimal'`
|
|
14
|
+
* renders an unfilled chip whose border and legend are `currentColor`
|
|
15
|
+
* — useful inline in colored prose / next to colored badges where the
|
|
16
|
+
* chip should take the surrounding text color. */
|
|
17
|
+
variant?: KeyCapVariant;
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Optional inline style. Useful for one-off width overrides (e.g.
|
|
20
|
+
* building a keyboard-layout where the space bar spans several
|
|
21
|
+
* standard-key widths). The component sets no inline styles of its
|
|
22
|
+
* own — everything else comes from the CSS module. */
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
/** Override the chip's font-family. Accepts any CSS font-family
|
|
25
|
+
* string. When omitted, the chip inherits from the design-system
|
|
26
|
+
* UI font token (`--wzl-font-ui`). Useful for one-off cases where
|
|
27
|
+
* a different face is desired — though the canonical move is to
|
|
28
|
+
* override the CSS variable at the consumer's scope, not the prop. */
|
|
29
|
+
font?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Single bordered keycap chip for one glyph (modifier or key). Use
|
|
32
|
+
* `KeySequence` to render a full shortcut. */
|
|
33
|
+
export declare function KeyCap({ label, inverted, variant, className, style, font }: KeyCapProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=Keycap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Keycap.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/Keycap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAKzD;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;;;+DAG2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;uDAGmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;2DAGuD;IACvD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;2EAIuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;+CAC+C;AAC/C,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,QAAgB,EAAE,OAAmB,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,WAAW,2CAa3G"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type KeyCapVariant } from './Keycap';
|
|
2
|
+
export interface KeySpec {
|
|
3
|
+
/** Glyph rendered in the chip (modifier or key). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** When true, the chip renders inverted to mark it as not required to
|
|
6
|
+
* trigger the action (e.g. an optional modifier). Defaults to false. */
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface KeySequenceProps {
|
|
10
|
+
/** Keys to render. `undefined` or empty renders a muted em-dash.
|
|
11
|
+
* Modifiers are always rendered first regardless of input order; relative
|
|
12
|
+
* order within each group is preserved. */
|
|
13
|
+
keys: readonly KeySpec[] | undefined;
|
|
14
|
+
/** Character inserted between the trailing modifier chip and the first
|
|
15
|
+
* non-modifier chip (e.g. `'+'` renders `⌘ + K`). `null` or `''`
|
|
16
|
+
* suppresses it. Defaults to `'+'`. */
|
|
17
|
+
separator?: string | null;
|
|
18
|
+
/** Forwarded to every `KeyCap` in the sequence. `'minimal'` renders
|
|
19
|
+
* unfilled chips whose border + legend are `currentColor`. */
|
|
20
|
+
variant?: KeyCapVariant;
|
|
21
|
+
/** Forwarded to every `KeyCap` in the sequence. Overrides the design-
|
|
22
|
+
* system UI font for that chip only. */
|
|
23
|
+
font?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Renders a shortcut as a row of `KeyCap` chips, one per key. Optional
|
|
27
|
+
* keys render inverted to distinguish them from required ones. */
|
|
28
|
+
export declare function KeySequence({ keys, separator, variant, font, className }: KeySequenceProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=Keycaps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Keycaps.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/Keycaps.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvE,MAAM,WAAW,OAAO;IACtB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd;6EACyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;gDAE4C;IAC5C,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IACrC;;4CAEwC;IACxC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;mEAC+D;IAC/D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;6CACyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;mEACmE;AACnE,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,SAAe,EAAE,OAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAwB5G"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { KeyCap, inferKeycapKind } from './Keycap';
|
|
2
|
+
export type { KeyCapProps, KeyCapVariant, KeycapKind } from './Keycap';
|
|
3
|
+
export { KeySequence } from './Keycaps';
|
|
4
|
+
export type { KeySequenceProps, KeySpec } from './Keycaps';
|
|
5
|
+
export { keyGlyph } from './keyGlyph';
|
|
6
|
+
export { keySpecsFromMods, keySpecFromKey, detectPlatform } from './keySpecsFromMods';
|
|
7
|
+
export type { LogicalMod, LogicalModSpec, Platform, LegendStyle, KeySpecsFromModsOptions, } from './keySpecsFromMods';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACtF,YAAY,EACV,UAAU,EACV,cAAc,EACd,QAAQ,EACR,WAAW,EACX,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../chunks/Keycaps-B9dJMYx_.js";
|
|
2
|
+
import { t as o } from "../../chunks/keyGlyph-BDH5fqkO.js";
|
|
3
|
+
export { e as KeyCap, t as KeySequence, a as detectPlatform, r as inferKeycapKind, o as keyGlyph, n as keySpecFromKey, i as keySpecsFromMods };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Apple-style glyph for a DOM `KeyboardEvent.key` value. Covers escape,
|
|
2
|
+
* delete/backspace, arrows, enter/return, tab, space. Unknown keys are
|
|
3
|
+
* upper-cased (so `'a'` reads as `A` on a keycap) and returned unchanged
|
|
4
|
+
* otherwise — making this safe to apply uniformly without a `has-glyph`
|
|
5
|
+
* check at the call site. */
|
|
6
|
+
export declare function keyGlyph(rawKey: string): string;
|
|
7
|
+
//# sourceMappingURL=keyGlyph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyGlyph.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/keyGlyph.ts"],"names":[],"mappings":"AAAA;;;;8BAI8B;AAC9B,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB/C"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { KeySpec } from './Keycaps';
|
|
2
|
+
/** Logical modifier name. Matches the kit's `ModifierKey` in shape — kept as a
|
|
3
|
+
* local type so `weasel-ui` stays independent of `@weasel-js/core`. */
|
|
4
|
+
export type LogicalMod = 'mod' | 'shift' | 'alt' | 'ctrl' | 'meta';
|
|
5
|
+
/** Detected (or overridden) platform. `'mod'` resolves to ⌘ on macOS,
|
|
6
|
+
* Ctrl on Windows / Linux. */
|
|
7
|
+
export type Platform = 'macos' | 'windows' | 'linux';
|
|
8
|
+
/** Visual form of a modifier or named-key label.
|
|
9
|
+
*
|
|
10
|
+
* - `'auto'` (default): the per-entry, per-platform default — whatever
|
|
11
|
+
* label is actually printed on the physical key. macOS keys show the
|
|
12
|
+
* Apple glyphs (⌘ ⌥ ⌃ ⇧ ⎋ ↵ ⇥). Windows keys mostly show text
|
|
13
|
+
* (Ctrl, Alt, Shift) BUT the Win key shows its logo (⊞) and the
|
|
14
|
+
* context-menu key shows ▤. Linux mirrors Windows with Super (⊞).
|
|
15
|
+
* - `'symbol'` forces the Apple-style glyph everywhere a symbolic form
|
|
16
|
+
* exists. Entries without a widely-recognized symbol still fall
|
|
17
|
+
* back to text.
|
|
18
|
+
* - `'text'` always spells the label out (Cmd / Option / Esc / Enter). */
|
|
19
|
+
export type LegendStyle = 'auto' | 'symbol' | 'text';
|
|
20
|
+
export interface LogicalModSpec {
|
|
21
|
+
name: LogicalMod;
|
|
22
|
+
/** Marks this modifier as optional (may be held but isn't required).
|
|
23
|
+
* Forwarded as the resulting `KeySpec.optional`. */
|
|
24
|
+
optional?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface KeySpecsFromModsOptions {
|
|
27
|
+
/** Override OS detection. Defaults to the detected platform, or
|
|
28
|
+
* `'macos'` when detection is unavailable (e.g. in tests, or when
|
|
29
|
+
* `navigator` is missing). */
|
|
30
|
+
platform?: Platform;
|
|
31
|
+
/** Defaults to `'auto'` (symbol on macOS, text everywhere else). Pass
|
|
32
|
+
* `'symbol'` or `'text'` to force a specific style regardless of
|
|
33
|
+
* platform. */
|
|
34
|
+
legend?: LegendStyle;
|
|
35
|
+
}
|
|
36
|
+
/** Detect the user's OS from the browser environment. UA sniffing — not
|
|
37
|
+
* 100% reliable, but adequate for picking a modifier-glyph convention.
|
|
38
|
+
* Falls back to `'macos'` (matches the kit's docs convention) when
|
|
39
|
+
* `navigator` is unavailable. */
|
|
40
|
+
export declare function detectPlatform(): Platform;
|
|
41
|
+
/**
|
|
42
|
+
* Map a list of **logical** modifiers (`'mod'`, `'shift'`, …) to **visual**
|
|
43
|
+
* `KeySpec`s appropriate for the current platform.
|
|
44
|
+
*
|
|
45
|
+
* The kit-side gesture grammar uses logical names so the same route reads
|
|
46
|
+
* correctly on every OS — `'mod'` means "Cmd on Mac, Ctrl on Win/Linux".
|
|
47
|
+
* `KeySequence` is purely visual and renders the labels you give it; this
|
|
48
|
+
* helper is the bridge.
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* <KeySequence
|
|
52
|
+
* keys={keySpecsFromMods([{ name: 'mod' }, { name: 'shift', optional: true }])}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* On a Mac: renders `⌘ ⇧`. On Windows: renders `Ctrl Shift`. Pass an
|
|
57
|
+
* explicit `platform` to override detection (e.g. for docs that always
|
|
58
|
+
* show the macOS form). Pass `legend: 'text'` to force "Cmd" over "⌘"
|
|
59
|
+
* even on macOS.
|
|
60
|
+
*/
|
|
61
|
+
export declare function keySpecsFromMods(mods: readonly LogicalModSpec[], opts?: KeySpecsFromModsOptions): readonly KeySpec[];
|
|
62
|
+
/**
|
|
63
|
+
* Render a raw `KeyboardEvent.key` value as a platform-appropriate
|
|
64
|
+
* `KeySpec`. Named non-modifier keys (Esc, Enter, Tab, Space, Backspace,
|
|
65
|
+
* Delete, arrows) get the platform's conventional form. Letter / digit /
|
|
66
|
+
* other keys pass through upper-cased.
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* keySpecFromKey('Escape', { platform: 'macos' }) // { label: '⎋' }
|
|
70
|
+
* keySpecFromKey('Escape', { platform: 'windows' }) // { label: 'Esc' }
|
|
71
|
+
* keySpecFromKey('p') // { label: 'P' }
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* Symbol mode is only meaningful on macOS — Windows / Linux keyboards
|
|
75
|
+
* print the text form on the physical key, so symbol mode there falls
|
|
76
|
+
* back to text.
|
|
77
|
+
*/
|
|
78
|
+
export declare function keySpecFromKey(raw: string, opts?: KeySpecsFromModsOptions & {
|
|
79
|
+
optional?: boolean;
|
|
80
|
+
}): KeySpec;
|
|
81
|
+
//# sourceMappingURL=keySpecsFromMods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keySpecsFromMods.d.ts","sourceRoot":"","sources":["../../../src/components/Keycaps/keySpecsFromMods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;wEACwE;AACxE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE;+BAC+B;AAC/B,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD;;;;;;;;;;2EAU2E;AAC3E,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB;yDACqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC;;mCAE+B;IAC/B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;oBAEgB;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAgCD;;;kCAGkC;AAClC,wBAAgB,cAAc,IAAI,QAAQ,CASzC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,cAAc,EAAE,EAC/B,IAAI,GAAE,uBAA4B,GACjC,SAAS,OAAO,EAAE,CAOpB;AAuBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,uBAAuB,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1D,OAAO,CAMT"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type NumberFieldProps as RACNumberFieldProps, type ValidationResult } from 'react-aria-components';
|
|
3
|
+
export type NumberFieldProps = Omit<RACNumberFieldProps, 'children' | 'className'> & {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
7
|
+
/** Hide the up/down stepper buttons. Defaults to false. */
|
|
8
|
+
hideSteppers?: boolean;
|
|
9
|
+
/** Native input placeholder — e.g. `'Mixed'` for a multi-selection
|
|
10
|
+
* editor with no shared value. */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const NumberField: import("react").ForwardRefExoticComponent<Omit<RACNumberFieldProps, "children" | "className"> & {
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
18
|
+
/** Hide the up/down stepper buttons. Defaults to false. */
|
|
19
|
+
hideSteppers?: boolean;
|
|
20
|
+
/** Native input placeholder — e.g. `'Mixed'` for a multi-selection
|
|
21
|
+
* editor with no shared value. */
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
25
|
+
//# sourceMappingURL=NumberField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7D,OAAO,EAQL,KAAK,gBAAgB,IAAI,mBAAmB,EAC5C,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IACnF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC,CAAC;IAChE,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;uCACmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW;YAXd,SAAS;kBACH,SAAS;mBACR,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,KAAK,SAAS,CAAC;IAC/D,2DAA2D;mBAC5C,OAAO;IACtB;uCACmC;kBACrB,MAAM;gBACR,MAAM;oDA+BlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NumberField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|