@jimka/typescript-ui 0.1.1 → 0.2.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/lib/{AbstractBooleanInput-C3rj7sje.js → AbstractBooleanInput-BGesvIZy.js} +2 -2
- package/dist/lib/{AbstractBooleanInput-C3rj7sje.js.map → AbstractBooleanInput-BGesvIZy.js.map} +1 -1
- package/dist/lib/{AbstractInput-CfjW_HM2.js → AbstractInput-BxOtFrER.js} +2 -2
- package/dist/lib/{AbstractInput-CfjW_HM2.js.map → AbstractInput-BxOtFrER.js.map} +1 -1
- package/dist/lib/AnimatedDropdown-CZQEqQi-.js +2 -0
- package/dist/lib/AnimatedDropdown-CZQEqQi-.js.map +1 -0
- package/dist/lib/Border-BgaZkc1R.js +2 -0
- package/dist/lib/Border-BgaZkc1R.js.map +1 -0
- package/dist/lib/{BoxLayout-8ryMD4j5.js → BoxLayout-DrKGfsup.js} +2 -2
- package/dist/lib/{BoxLayout-8ryMD4j5.js.map → BoxLayout-DrKGfsup.js.map} +1 -1
- package/dist/lib/Button-U1rsP4v8.js +2 -0
- package/dist/lib/Button-U1rsP4v8.js.map +1 -0
- package/dist/lib/{Card-AKIUAWYS.js → Card-BVwOS8AG.js} +2 -2
- package/dist/lib/{Card-AKIUAWYS.js.map → Card-BVwOS8AG.js.map} +1 -1
- package/dist/lib/ComboBox-B9EDPu6T.js +2 -0
- package/dist/lib/ComboBox-B9EDPu6T.js.map +1 -0
- package/dist/lib/Component-DXf5a3g0.js +2 -0
- package/dist/lib/Component-DXf5a3g0.js.map +1 -0
- package/dist/lib/Container-D5H8VxJK.js +2 -0
- package/dist/lib/{Container-3KsvsJ6S.js.map → Container-D5H8VxJK.js.map} +1 -1
- package/dist/lib/DOM-CGn7xyTw.js +2 -0
- package/dist/lib/DOM-CGn7xyTw.js.map +1 -0
- package/dist/lib/{DragManager-c6M_mE3e.js → DragManager-CI4mZQFy.js} +2 -2
- package/dist/lib/{DragManager-tPMnbjeO.js.map → DragManager-CI4mZQFy.js.map} +1 -1
- package/dist/lib/FieldDecorator-CJs9gwqH.js +2 -0
- package/dist/lib/{FieldDecorator-Bl0h9UEF.js.map → FieldDecorator-CJs9gwqH.js.map} +1 -1
- package/dist/lib/{Fit-CFIr4P9R.js → Fit-DjRsiwlg.js} +2 -2
- package/dist/lib/{Fit-CUS1JXy3.js.map → Fit-DjRsiwlg.js.map} +1 -1
- package/dist/lib/Glyph-KEf4nIv2.js +2 -0
- package/dist/lib/Glyph-KEf4nIv2.js.map +1 -0
- package/dist/lib/{Grid-Czux--Mr.js → Grid-DdL9TVeJ.js} +2 -2
- package/dist/lib/{Grid-D8luwRPI.js.map → Grid-DdL9TVeJ.js.map} +1 -1
- package/dist/lib/GridConstraints-DkLueyrf.js +2 -0
- package/dist/lib/GridConstraints-DkLueyrf.js.map +1 -0
- package/dist/lib/{HBox-BWMf9h6r.js → HBox-Ce0GTCJP.js} +2 -2
- package/dist/lib/{HBox-BWMf9h6r.js.map → HBox-Ce0GTCJP.js.map} +1 -1
- package/dist/lib/{Header-CQjomjo0.js → Header-BQIVpBte.js} +2 -2
- package/dist/lib/{Header-CQjomjo0.js.map → Header-BQIVpBte.js.map} +1 -1
- package/dist/lib/{IconText-BXJK0MOq.js → IconText-Bo4Qcnot.js} +2 -2
- package/dist/lib/{IconText-BXJK0MOq.js.map → IconText-Bo4Qcnot.js.map} +1 -1
- package/dist/lib/LayoutConstraints-DkctJZXB.js +2 -0
- package/dist/lib/LayoutConstraints-DkctJZXB.js.map +1 -0
- package/dist/lib/LayoutSerialization-BT66TY83.js +2 -0
- package/dist/lib/LayoutSerialization-BT66TY83.js.map +1 -0
- package/dist/lib/LayoutSizes-DU3qSq0w.js +2 -0
- package/dist/lib/LayoutSizes-DU3qSq0w.js.map +1 -0
- package/dist/lib/List-DtTVTyWW.js +2 -0
- package/dist/lib/List-DtTVTyWW.js.map +1 -0
- package/dist/lib/Menu-Dz4L7EKJ.js +2 -0
- package/dist/lib/Menu-Dz4L7EKJ.js.map +1 -0
- package/dist/lib/{MenuButton-D15cSbMf.js → MenuButton-VJ5uC3c1.js} +2 -2
- package/dist/lib/{MenuButton-D15cSbMf.js.map → MenuButton-VJ5uC3c1.js.map} +1 -1
- package/dist/lib/Panel-DzWdYwq1.js +2 -0
- package/dist/lib/Panel-DzWdYwq1.js.map +1 -0
- package/dist/lib/{Position-DJKB0N3l.js → Position-A39T7-_1.js} +2 -2
- package/dist/lib/{Position-DJKB0N3l.js.map → Position-A39T7-_1.js.map} +1 -1
- package/dist/lib/ProgressSpinner-zJKtGyNJ.js +2 -0
- package/dist/lib/ProgressSpinner-zJKtGyNJ.js.map +1 -0
- package/dist/lib/RadioButton-CYSSv4nV.js +2 -0
- package/dist/lib/RadioButton-CYSSv4nV.js.map +1 -0
- package/dist/lib/{RovingTabIndex-CFIzIjjU.js → RovingTabIndex-BSZ31Vp5.js} +2 -2
- package/dist/lib/{RovingTabIndex-D-zOuptw.js.map → RovingTabIndex-BSZ31Vp5.js.map} +1 -1
- package/dist/lib/Scrollbar-BhtOjqkG.js +2 -0
- package/dist/lib/Scrollbar-BhtOjqkG.js.map +1 -0
- package/dist/lib/Slider-CdXm7E64.js +2 -0
- package/dist/lib/Slider-CdXm7E64.js.map +1 -0
- package/dist/lib/{Spacer-BVQncB5B.js → Spacer-D9NGW4QG.js} +2 -2
- package/dist/lib/{Spacer-BVQncB5B.js.map → Spacer-D9NGW4QG.js.map} +1 -1
- package/dist/lib/{TabButton-DqYDfN7P.js → TabButton-CThevdY_.js} +2 -2
- package/dist/lib/{TabButton-DqYDfN7P.js.map → TabButton-CThevdY_.js.map} +1 -1
- package/dist/lib/Text-gz6qjFfP.js +2 -0
- package/dist/lib/Text-gz6qjFfP.js.map +1 -0
- package/dist/lib/Tooltip-tkXDk5Bo.js +3 -0
- package/dist/lib/Tooltip-tkXDk5Bo.js.map +1 -0
- package/dist/lib/{VBox-CdV9VGxR.js → VBox-EIqw85Rh.js} +2 -2
- package/dist/lib/{VBox-CdV9VGxR.js.map → VBox-EIqw85Rh.js.map} +1 -1
- package/dist/lib/{VirtualRowView-C18j90n5.js → VirtualRowView-BxpHQ_u8.js} +2 -2
- package/dist/lib/{VirtualRowView-C18j90n5.js.map → VirtualRowView-BxpHQ_u8.js.map} +1 -1
- package/dist/lib/{VirtualScroller-BKMvTisA.js → VirtualScroller-DwEEJE1_.js} +2 -2
- package/dist/lib/{VirtualScroller-BKMvTisA.js.map → VirtualScroller-DwEEJE1_.js.map} +1 -1
- package/dist/lib/component/button.es.js +1 -1
- package/dist/lib/component/button.es.js.map +1 -1
- package/dist/lib/component/chart.es.js +1 -1
- package/dist/lib/component/chart.es.js.map +1 -1
- package/dist/lib/component/container.es.js +1 -1
- package/dist/lib/component/container.es.js.map +1 -1
- package/dist/lib/component/diagram.es.js +1 -1
- package/dist/lib/component/diagram.es.js.map +1 -1
- package/dist/lib/component/display.es.js +1 -1
- package/dist/lib/component/display.es.js.map +1 -1
- package/dist/lib/component/editor.es.js +2 -2
- package/dist/lib/component/editor.es.js.map +1 -1
- package/dist/lib/component/input.es.js +1 -1
- package/dist/lib/component/input.es.js.map +1 -1
- package/dist/lib/component/list.es.js +1 -1
- package/dist/lib/component/menubar.es.js +1 -1
- package/dist/lib/component/menubar.es.js.map +1 -1
- package/dist/lib/component/table.es.js +2 -2
- package/dist/lib/component/table.es.js.map +1 -1
- package/dist/lib/component/tree.es.js +1 -1
- package/dist/lib/component/tree.es.js.map +1 -1
- package/dist/lib/core.es.js +1 -1
- package/dist/lib/core.es.js.map +1 -1
- package/dist/lib/layout.es.js +1 -1
- package/dist/lib/overlay.es.js +1 -1
- package/dist/lib/overlay.es.js.map +1 -1
- package/dist/lib/primitive.es.js +1 -1
- package/dist/lib/router.es.js +1 -1
- package/dist/lib/types/component/button/Button.d.ts +4 -3
- package/dist/lib/types/component/chart/AbstractChart.d.ts +1 -1
- package/dist/lib/types/component/chart/ChartLegend.d.ts +1 -1
- package/dist/lib/types/component/container/DialogBackdrop.d.ts +2 -1
- package/dist/lib/types/component/container/MenuItem.d.ts +1 -1
- package/dist/lib/types/component/container/ScrollStrip.d.ts +1 -0
- package/dist/lib/types/component/container/SplitGutter.d.ts +3 -2
- package/dist/lib/types/component/container/TabBar.d.ts +1 -2
- package/dist/lib/types/component/container/TabPanel.d.ts +6 -3
- package/dist/lib/types/component/container/WindowBorder.d.ts +2 -1
- package/dist/lib/types/component/container/WindowHeader.d.ts +2 -1
- package/dist/lib/types/component/display/Glyph.d.ts +2 -1
- package/dist/lib/types/component/display/Markdown.d.ts +1 -1
- package/dist/lib/types/component/display/PaginationBar.d.ts +1 -1
- package/dist/lib/types/component/display/SpinnerWrap.d.ts +2 -0
- package/dist/lib/types/component/display/Video.d.ts +1 -1
- package/dist/lib/types/component/display/VideoPlayer.d.ts +1 -1
- package/dist/lib/types/component/editor/CodeEditor.d.ts +2 -1
- package/dist/lib/types/component/editor/MarkdownEditor.d.ts +1 -1
- package/dist/lib/types/component/input/Checkbox.d.ts +2 -1
- package/dist/lib/types/component/input/Link.d.ts +1 -1
- package/dist/lib/types/component/input/RadioButton.d.ts +2 -1
- package/dist/lib/types/component/input/Slider.d.ts +2 -1
- package/dist/lib/types/component/input/Text.d.ts +1 -3
- package/dist/lib/types/component/input/TextInput.d.ts +3 -2
- package/dist/lib/types/component/list/AbstractSelectableList.d.ts +2 -1
- package/dist/lib/types/component/menubar/MenuBarButton.d.ts +1 -1
- package/dist/lib/types/core/AnimatedDropdown.d.ts +6 -2
- package/dist/lib/types/core/Animation.d.ts +9 -6
- package/dist/lib/types/core/Component.d.ts +16 -11
- package/dist/lib/types/core/DOM.d.ts +8 -0
- package/dist/lib/types/core/Event.d.ts +12 -6
- package/dist/lib/types/core/index.d.ts +2 -2
- package/dist/lib/types/layout/Accordion.d.ts +2 -0
- package/dist/lib/types/layout/Border.d.ts +1 -0
- package/dist/lib/types/layout/CollapseSupport.d.ts +5 -1
- package/dist/lib/types/layout/LayoutConstraints.d.ts +1 -0
- package/dist/lib/types/layout/LayoutManager.d.ts +2 -0
- package/dist/lib/types/layout/Split.d.ts +1 -0
- package/dist/lib/types/layout/Tab.d.ts +10 -3
- package/dist/lib/types/overlay/AbstractWindow.d.ts +9 -2
- package/dist/lib/types/overlay/Dialog.d.ts +6 -0
- package/dist/lib/types/overlay/Dock.d.ts +12 -2
- package/dist/lib/types/overlay/Drawer.d.ts +5 -0
- package/dist/lib/types/overlay/Menu.d.ts +3 -1
- package/dist/lib/types/overlay/Notification.d.ts +3 -0
- package/dist/lib/types/overlay/Popover.d.ts +3 -1
- package/dist/lib/types/overlay/Rail.d.ts +7 -0
- package/dist/lib/types/overlay/Tooltip.d.ts +3 -0
- package/dist/lib/types/overlay/index.d.ts +1 -1
- package/dist/lib/validation.es.js +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/lib/AbstractBooleanInput-C6CidMMX.js +0 -2
- package/dist/lib/AbstractBooleanInput-C6CidMMX.js.map +0 -1
- package/dist/lib/AbstractInput-DD-NpicS.js +0 -2
- package/dist/lib/AbstractInput-DD-NpicS.js.map +0 -1
- package/dist/lib/AnimatedDropdown-BFz-DO7R.js +0 -2
- package/dist/lib/AnimatedDropdown-BFz-DO7R.js.map +0 -1
- package/dist/lib/AnimatedDropdown-BbGCs70E.js +0 -2
- package/dist/lib/AnimatedDropdown-BbGCs70E.js.map +0 -1
- package/dist/lib/Border-5Ki2DCWz.js +0 -2
- package/dist/lib/Border-5Ki2DCWz.js.map +0 -1
- package/dist/lib/Border-oZC_SDy8.js +0 -2
- package/dist/lib/Border-oZC_SDy8.js.map +0 -1
- package/dist/lib/BoxLayout-DgZukB5_.js +0 -2
- package/dist/lib/BoxLayout-DgZukB5_.js.map +0 -1
- package/dist/lib/Button-Cdq2ySPL.js +0 -2
- package/dist/lib/Button-Cdq2ySPL.js.map +0 -1
- package/dist/lib/Button-DEUtBqK4.js +0 -2
- package/dist/lib/Button-DEUtBqK4.js.map +0 -1
- package/dist/lib/Card-UF0fq8cQ.js +0 -2
- package/dist/lib/Card-UF0fq8cQ.js.map +0 -1
- package/dist/lib/ComboBox-GOBOAJ1N.js +0 -2
- package/dist/lib/ComboBox-GOBOAJ1N.js.map +0 -1
- package/dist/lib/ComboBox-e_YVsWBr.js +0 -2
- package/dist/lib/ComboBox-e_YVsWBr.js.map +0 -1
- package/dist/lib/Component-BR2f0Itb.js +0 -2
- package/dist/lib/Component-BR2f0Itb.js.map +0 -1
- package/dist/lib/Component-Bs6TvaGZ.js +0 -2
- package/dist/lib/Component-Bs6TvaGZ.js.map +0 -1
- package/dist/lib/Container-3KsvsJ6S.js +0 -2
- package/dist/lib/Container-CzyZeMyZ.js +0 -2
- package/dist/lib/Container-CzyZeMyZ.js.map +0 -1
- package/dist/lib/DOM-DeF_dWe2.js +0 -2
- package/dist/lib/DOM-DeF_dWe2.js.map +0 -1
- package/dist/lib/DragManager-c6M_mE3e.js.map +0 -1
- package/dist/lib/DragManager-tPMnbjeO.js +0 -2
- package/dist/lib/FieldDecorator-Bl0h9UEF.js +0 -2
- package/dist/lib/FieldDecorator-E7WzutjO.js +0 -2
- package/dist/lib/FieldDecorator-E7WzutjO.js.map +0 -1
- package/dist/lib/Fit-CFIr4P9R.js.map +0 -1
- package/dist/lib/Fit-CUS1JXy3.js +0 -2
- package/dist/lib/Glyph-6Ki3A1_a.js +0 -2
- package/dist/lib/Glyph-6Ki3A1_a.js.map +0 -1
- package/dist/lib/Glyph-WUqTF_Z9.js +0 -2
- package/dist/lib/Glyph-WUqTF_Z9.js.map +0 -1
- package/dist/lib/Grid-Czux--Mr.js.map +0 -1
- package/dist/lib/Grid-D8luwRPI.js +0 -2
- package/dist/lib/GridConstraints-CzC0w4i-.js +0 -2
- package/dist/lib/GridConstraints-CzC0w4i-.js.map +0 -1
- package/dist/lib/GridConstraints-Q3wvuovN.js +0 -2
- package/dist/lib/GridConstraints-Q3wvuovN.js.map +0 -1
- package/dist/lib/HBox-Q8y1PHlk.js +0 -2
- package/dist/lib/HBox-Q8y1PHlk.js.map +0 -1
- package/dist/lib/Header-zPdvC2AX.js +0 -2
- package/dist/lib/Header-zPdvC2AX.js.map +0 -1
- package/dist/lib/IconText-BvGfu7eq.js +0 -2
- package/dist/lib/IconText-BvGfu7eq.js.map +0 -1
- package/dist/lib/LayoutConstraints-CHI2lhPd.js +0 -2
- package/dist/lib/LayoutConstraints-CHI2lhPd.js.map +0 -1
- package/dist/lib/LayoutSerialization-CWU0iEuV.js +0 -2
- package/dist/lib/LayoutSerialization-CWU0iEuV.js.map +0 -1
- package/dist/lib/LayoutSerialization-C_zcwaN3.js +0 -2
- package/dist/lib/LayoutSerialization-C_zcwaN3.js.map +0 -1
- package/dist/lib/LayoutSizes-BW4wyGDI.js +0 -2
- package/dist/lib/LayoutSizes-BW4wyGDI.js.map +0 -1
- package/dist/lib/LayoutSizes-XdhpAOmc.js +0 -2
- package/dist/lib/LayoutSizes-XdhpAOmc.js.map +0 -1
- package/dist/lib/List-BgxnLWnl.js +0 -2
- package/dist/lib/List-BgxnLWnl.js.map +0 -1
- package/dist/lib/List-D-GhoVgB.js +0 -2
- package/dist/lib/List-D-GhoVgB.js.map +0 -1
- package/dist/lib/Menu-BdnwRY0M.js +0 -2
- package/dist/lib/Menu-BdnwRY0M.js.map +0 -1
- package/dist/lib/Menu-Wz4MK6sA.js +0 -2
- package/dist/lib/Menu-Wz4MK6sA.js.map +0 -1
- package/dist/lib/MenuButton-JQQaKThJ.js +0 -2
- package/dist/lib/MenuButton-JQQaKThJ.js.map +0 -1
- package/dist/lib/Panel-DApa7vA6.js +0 -2
- package/dist/lib/Panel-DApa7vA6.js.map +0 -1
- package/dist/lib/Panel-DIsdaqc2.js +0 -2
- package/dist/lib/Panel-DIsdaqc2.js.map +0 -1
- package/dist/lib/Position-B-WfZYAJ.js +0 -2
- package/dist/lib/Position-B-WfZYAJ.js.map +0 -1
- package/dist/lib/ProgressSpinner-CNYcsBhw.js +0 -2
- package/dist/lib/ProgressSpinner-CNYcsBhw.js.map +0 -1
- package/dist/lib/ProgressSpinner-Dzaka7_c.js +0 -2
- package/dist/lib/ProgressSpinner-Dzaka7_c.js.map +0 -1
- package/dist/lib/RadioButton-CepkneSA.js +0 -2
- package/dist/lib/RadioButton-CepkneSA.js.map +0 -1
- package/dist/lib/RadioButton-eI3-vXn3.js +0 -2
- package/dist/lib/RadioButton-eI3-vXn3.js.map +0 -1
- package/dist/lib/RovingTabIndex-CFIzIjjU.js.map +0 -1
- package/dist/lib/RovingTabIndex-D-zOuptw.js +0 -2
- package/dist/lib/Scrollbar-DQdCdj94.js +0 -2
- package/dist/lib/Scrollbar-DQdCdj94.js.map +0 -1
- package/dist/lib/Scrollbar-DchfiFKC.js +0 -2
- package/dist/lib/Scrollbar-DchfiFKC.js.map +0 -1
- package/dist/lib/Slider-DvDdVvRm.js +0 -2
- package/dist/lib/Slider-DvDdVvRm.js.map +0 -1
- package/dist/lib/Slider-xRxNSjFN.js +0 -2
- package/dist/lib/Slider-xRxNSjFN.js.map +0 -1
- package/dist/lib/Spacer-BqiPiCqz.js +0 -2
- package/dist/lib/Spacer-BqiPiCqz.js.map +0 -1
- package/dist/lib/TabButton-pZKFYg7b.js +0 -2
- package/dist/lib/TabButton-pZKFYg7b.js.map +0 -1
- package/dist/lib/Text-D1RrBY52.js +0 -2
- package/dist/lib/Text-D1RrBY52.js.map +0 -1
- package/dist/lib/Text-DJoUHukb.js +0 -2
- package/dist/lib/Text-DJoUHukb.js.map +0 -1
- package/dist/lib/Tooltip-4lU_tf6r.js +0 -3
- package/dist/lib/Tooltip-4lU_tf6r.js.map +0 -1
- package/dist/lib/Tooltip-5BR7yYEX.js +0 -3
- package/dist/lib/Tooltip-5BR7yYEX.js.map +0 -1
- package/dist/lib/VBox-D5B9ecw0.js +0 -2
- package/dist/lib/VBox-D5B9ecw0.js.map +0 -1
- package/dist/lib/VirtualRowView-Con9SWiU.js +0 -2
- package/dist/lib/VirtualRowView-Con9SWiU.js.map +0 -1
- package/dist/lib/VirtualScroller-BPDmO1ir.js +0 -2
- package/dist/lib/VirtualScroller-BPDmO1ir.js.map +0 -1
package/dist/lib/primitive.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./Position-
|
|
1
|
+
import{a as e,c as t,i as n,n as r,o as i,r as a,s as o,t as s}from"./Position-A39T7-_1.js";import{t as c}from"./Placement-7kqdaK4Z.js";var Point=class extends t{_x;_y;constructor(e,t){super(),this._x=e??0,this._y=t??0}getX(){return this._x??0}getY(){return this._y??0}render(){return this.getX()+` `+this.getY()}};export{r as Insets,c as Placement,Point,s as Position,e as UNBOUNDED,a as borderSideWidth,n as borderToStyle,i as isUnbounded,o as saturate};
|
|
2
2
|
//# sourceMappingURL=primitive.es.js.map
|
package/dist/lib/router.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./DOM-
|
|
1
|
+
import{t as e}from"./DOM-CGn7xyTw.js";import{t}from"./ListenerBag-WPdKuuds.js";function normalizePath(e){let t=e.startsWith(`#`)?e.slice(1):e,n=t.indexOf(`?`);return n>=0&&(t=t.slice(0,n)),`/`+splitPath(t).join(`/`)}function splitPath(e){return e.split(`/`).filter(e=>e.length>0)}function compilePattern(e){let t=normalizePath(e),n=splitPath(t),r=n.map((t,r)=>{if(t===`*`){if(r!==n.length-1)throw Error(`RoutePattern: "*" is only valid as the final segment of "${e}"`);return{kind:`catchAll`,value:``}}return t.startsWith(`:`)?{kind:`param`,value:t.slice(1)}:{kind:`static`,value:t}});return{pattern:t,key:r.map(e=>e.kind===`static`?e.value:e.kind===`param`?`:`:`*`).join(`/`),segments:r}}function matchPattern(e,t){let n=e.segments,r=n.length>0&&n.at(-1).kind===`catchAll`,i=r?n.length-1:n.length;if(r?t.length<i:t.length!==i)return null;let a={};for(let e=0;e<i;e+=1){let r=n[e],i=t[e];if(r.kind===`static`){if(r.value!==i)return null}else r.kind===`param`&&(a[r.value]=decodeSegment(i))}return a}function decodeSegment(e){try{return decodeURIComponent(e)}catch{return e}}var n={static:2,param:1,catchAll:0};function rankAt(e,t){return t>=e.length?3:n[e[t].kind]}function selectPattern(e,t){let n=splitPath(t),r=null,i=null;for(let t of e){let e=matchPattern(t,n);e!==null&&(r===null||isMoreSpecific(t.segments,r.segments))&&(r=t,i=e)}return r===null?null:{compiled:r,params:i}}function isMoreSpecific(e,t){let n=Math.max(e.length,t.length);for(let r=0;r<n;r+=1){let n=rankAt(e,r),i=rankAt(t,r);if(n!==i)return n>i}return!1}var Router=class{_routes=new Map;_listeners=new t;_started=!1;_onHashChange=()=>this.handleHashChange();constructor(e){this.applyOptions(e??{})}register(e,t){let n=compilePattern(e),r=this._routes.get(n.key);return r!==void 0&&r.pattern!==n.pattern&&console.warn(`Router: "${r.pattern}" and "${n.pattern}" have the same specificity; "${n.pattern}" replaces it.`),this._routes.set(n.key,{...n,handler:t}),this}start(){return this._started?(console.warn(`Router: start() called on an already-started router; ignoring.`),this):(this._started=!0,this.applyCurrentRoute(),e.sink.addListener(e.source.getWindow(),`hashchange`,this._onHashChange),this)}stop(){return this._started?(e.sink.removeListener(e.source.getWindow(),`hashchange`,this._onHashChange),this._started=!1,this):this}navigate(t,n){let r=`#/`+splitPath(normalizePath(t)).map(e=>encodeURIComponent(e)).join(`/`);return n?.replace===!0?e.sink.replaceLocationHash(r):e.sink.setLocationHash(r),this}getPath(){return normalizePath(e.source.getLocationHash())}on(e,t){return this._listeners.add(e,t),this}off(e,t){return this._listeners.remove(e,t),this}emit(e,t){this._listeners.fire(e,t)}applyCurrentRoute(){let e=this.getPath(),t=selectPattern(Array.from(this._routes.values()),e);if(t===null){this.emit(`nomatch`,e);return}let n={pattern:t.compiled.pattern,params:t.params,path:e};t.compiled.handler(t.params,e),this.emit(`navigate`,n)}applyOptions(e){if(e.routes!==void 0)for(let t of Object.keys(e.routes))this.register(t,e.routes[t]);if(e.listeners!==void 0)for(let t of Object.keys(e.listeners)){let n=e.listeners[t];n!==void 0&&this._listeners.add(t,n)}}handleHashChange(){this.applyCurrentRoute()}};export{Router};
|
|
2
2
|
//# sourceMappingURL=router.es.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
|
+
import { Event } from "../../core/Event.js";
|
|
2
3
|
import { Text } from "../../component/input/Text.js";
|
|
3
4
|
import { Glyph } from "../../component/display/Glyph.js";
|
|
4
5
|
import { FillType } from "../../layout/FillType.js";
|
|
@@ -7,7 +8,7 @@ import { BorderOptions } from "../../primitive/Border.js";
|
|
|
7
8
|
import { Insets } from "../../primitive/Insets.js";
|
|
8
9
|
import { Size } from "../../primitive/Size.js";
|
|
9
10
|
export type ButtonEvent = "action";
|
|
10
|
-
export type ClickListener = (event: MouseEvent) =>
|
|
11
|
+
export type ClickListener = (event: MouseEvent) => Event.ListenerResult;
|
|
11
12
|
export interface ButtonOptions extends ComponentOptions {
|
|
12
13
|
text?: string;
|
|
13
14
|
description?: string;
|
|
@@ -98,7 +99,7 @@ declare class Button<TOptions extends ButtonOptions = ButtonOptions> extends Com
|
|
|
98
99
|
on(event: "action", listener: ClickListener): this;
|
|
99
100
|
off(event: "action", listener: ClickListener): this;
|
|
100
101
|
click(): this;
|
|
101
|
-
addPointerDownListener(listener:
|
|
102
|
+
addPointerDownListener(listener: Event.Listener): this;
|
|
102
103
|
isChromeless(): boolean;
|
|
103
104
|
setChromeless(value: boolean): this;
|
|
104
105
|
private _clearChrome;
|
|
@@ -110,7 +111,7 @@ declare class Button<TOptions extends ButtonOptions = ButtonOptions> extends Com
|
|
|
110
111
|
private _applyFlatChrome;
|
|
111
112
|
private _resolveInsets;
|
|
112
113
|
setInsets(insets: Insets): this;
|
|
113
|
-
setPreferredSize(
|
|
114
|
+
setPreferredSize(size: Size): this;
|
|
114
115
|
getPreferredSize(): Size | null;
|
|
115
116
|
protected recomputePreferredSize(): void;
|
|
116
117
|
protected computePreferredSize(): {
|
|
@@ -31,7 +31,7 @@ declare class ChartLegend extends Panel<ChartLegendOptions> {
|
|
|
31
31
|
on(event: "toggle", listener: (seriesIndex: number) => void): this;
|
|
32
32
|
off(event: "toggle", listener: (seriesIndex: number) => void): this;
|
|
33
33
|
protected emit(event: ChartLegendEvent, seriesIndex: number): void;
|
|
34
|
-
|
|
34
|
+
protected destructor(): void;
|
|
35
35
|
}
|
|
36
36
|
declare const ChartLegendCallable: import("../../core/Callable.js").Callable<typeof ChartLegend>;
|
|
37
37
|
type ChartLegendCallable = ChartLegend;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
|
+
import { Event } from "../../core/Event.js";
|
|
2
3
|
interface DialogBackdropOptions extends ComponentOptions {
|
|
3
4
|
}
|
|
4
5
|
declare class DialogBackdrop extends Component<DialogBackdropOptions> {
|
|
5
6
|
constructor(options?: DialogBackdropOptions);
|
|
6
|
-
addClickListener(listener:
|
|
7
|
+
addClickListener(listener: Event.Listener): this;
|
|
7
8
|
resize(): void;
|
|
8
9
|
destroy(): void;
|
|
9
10
|
}
|
|
@@ -52,6 +52,7 @@ declare class ScrollStrip extends Panel<ScrollStripOptions> {
|
|
|
52
52
|
private trailClicked;
|
|
53
53
|
revealItem(itemElement: Handle): void;
|
|
54
54
|
containsArrow(target: EventTarget | null): boolean;
|
|
55
|
+
protected destructor(): void;
|
|
55
56
|
}
|
|
56
57
|
declare const ScrollStripCallable: import("../../core/Callable.js").Callable<typeof ScrollStrip>;
|
|
57
58
|
type ScrollStripCallable = ScrollStrip;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
3
|
import { CollapseDirection } from "../../component/container/CollapseButton.js";
|
|
4
|
+
import { Event } from "../../core/Event.js";
|
|
4
5
|
export type SplitGutterEvent = "dragstart" | "drag" | "dragend" | "collapse";
|
|
5
6
|
export interface SplitGutterOptions extends ComponentOptions {
|
|
6
7
|
orientation?: string;
|
|
@@ -52,8 +53,8 @@ declare class SplitGutter extends Component<SplitGutterOptions> {
|
|
|
52
53
|
destroy(): void;
|
|
53
54
|
private _dispatchDrag;
|
|
54
55
|
onDragStart(evnt: MouseEvent): void;
|
|
55
|
-
onDragStop(
|
|
56
|
-
onDrag(evnt: MouseEvent):
|
|
56
|
+
onDragStop(): Event.ListenerResult;
|
|
57
|
+
onDrag(evnt: MouseEvent): Event.ListenerResult;
|
|
57
58
|
private dragCursor;
|
|
58
59
|
private applyCursor;
|
|
59
60
|
render(): Handle;
|
|
@@ -46,7 +46,6 @@ declare class TabBar extends Container<TabBarOptions> {
|
|
|
46
46
|
private _fixedWidth;
|
|
47
47
|
private _underBorderFullWidth;
|
|
48
48
|
private _underBorderFromTheme;
|
|
49
|
-
private _themeCleanup;
|
|
50
49
|
private _indicator;
|
|
51
50
|
private _side;
|
|
52
51
|
private _align;
|
|
@@ -74,7 +73,7 @@ declare class TabBar extends Container<TabBarOptions> {
|
|
|
74
73
|
private dispatchBarOptions;
|
|
75
74
|
setBarSurfaceColor(color: string): this;
|
|
76
75
|
protected init(element?: Handle): this;
|
|
77
|
-
|
|
76
|
+
protected destructor(): void;
|
|
78
77
|
private applyUnderBorder;
|
|
79
78
|
setWidthMode(mode: TabWidthMode): this;
|
|
80
79
|
getWidthMode(): TabWidthMode;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Container, ContainerOptions } from "../../core/Container.js";
|
|
2
2
|
import { Component } from "../../core/Component.js";
|
|
3
|
+
import type { ComponentFactory } from "../../core/Component.js";
|
|
3
4
|
import { Tab, TabOptions } from "../../layout/Tab.js";
|
|
4
5
|
export interface TabEntryConfig {
|
|
5
6
|
label: string;
|
|
6
|
-
component: Component;
|
|
7
|
+
component: Component | ComponentFactory;
|
|
7
8
|
closeable?: boolean;
|
|
8
9
|
glyph?: string;
|
|
10
|
+
lazy?: boolean;
|
|
9
11
|
}
|
|
10
12
|
export interface TabPanelOptions extends ContainerOptions {
|
|
11
13
|
tabs?: TabEntryConfig[];
|
|
@@ -14,11 +16,12 @@ export interface TabPanelOptions extends ContainerOptions {
|
|
|
14
16
|
}
|
|
15
17
|
declare class TabPanel<TOptions extends TabPanelOptions = TabPanelOptions> extends Container<TOptions> {
|
|
16
18
|
constructor(options?: TOptions);
|
|
17
|
-
addTab(component: Component, label: string, options?: {
|
|
19
|
+
addTab(component: Component | ComponentFactory, label: string, options?: {
|
|
18
20
|
closeable?: boolean;
|
|
19
21
|
glyph?: string;
|
|
22
|
+
lazy?: boolean;
|
|
20
23
|
}): this;
|
|
21
|
-
addLazyTab(factory:
|
|
24
|
+
addLazyTab(factory: ComponentFactory, label: string, options?: {
|
|
22
25
|
closeable?: boolean;
|
|
23
26
|
glyph?: string;
|
|
24
27
|
}): this;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
|
+
import { Event } from "../../core/Event.js";
|
|
2
3
|
export type WindowBorderEvent = "drag";
|
|
3
4
|
export declare enum Direction {
|
|
4
5
|
NORTH = 0,
|
|
@@ -34,7 +35,7 @@ declare class WindowBorder extends Component<WindowBorderOptions> {
|
|
|
34
35
|
isSnapTarget(): boolean;
|
|
35
36
|
setSnapTarget(value: boolean): this;
|
|
36
37
|
onDragStart(): void;
|
|
37
|
-
onDragStop(
|
|
38
|
+
onDragStop(): Event.ListenerResult;
|
|
38
39
|
private dragCursor;
|
|
39
40
|
render(): import("../../core/DOM.js").Handle;
|
|
40
41
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Header, HeaderOptions } from "../../component/display/Header.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
|
+
import { Event } from "../../core/Event.js";
|
|
3
4
|
import { Glyph } from "../../component/display/Glyph.js";
|
|
4
5
|
export interface WindowHeaderOptions extends HeaderOptions {
|
|
5
6
|
closeable?: boolean;
|
|
@@ -37,7 +38,7 @@ declare class WindowHeader extends Header {
|
|
|
37
38
|
addExitButtonListener(listener: Function): this;
|
|
38
39
|
addMinimizeButtonListener(listener: Function): this;
|
|
39
40
|
addMaximizeButtonListener(listener: Function): this;
|
|
40
|
-
addHeaderDoubleClickListener(listener:
|
|
41
|
+
addHeaderDoubleClickListener(listener: Event.Listener): this;
|
|
41
42
|
getMinContentWidth(textBudget?: number): number;
|
|
42
43
|
getMinimizeButtonElement(): Handle | undefined;
|
|
43
44
|
getMaximizeButtonElement(): Handle | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../../core/Component.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
|
+
import { Size } from "../../primitive/Size.js";
|
|
3
4
|
import { NamedGlyphDef } from "../../component/display/Glyphs.js";
|
|
4
5
|
export type GlyphAnimation = "spin" | "pulse" | "beat";
|
|
5
6
|
export interface GlyphOptions extends ComponentOptions {
|
|
@@ -18,7 +19,7 @@ declare class Glyph extends Component<GlyphOptions> {
|
|
|
18
19
|
static register(...defs: NamedGlyphDef[]): void;
|
|
19
20
|
static unregister(name: string): void;
|
|
20
21
|
constructor(name: string, options?: GlyphOptions);
|
|
21
|
-
setPreferredSize(
|
|
22
|
+
setPreferredSize(size: Size): this;
|
|
22
23
|
getBaseline(): number | null;
|
|
23
24
|
getGlyphName(): string;
|
|
24
25
|
getFontSize(): number | null;
|
|
@@ -23,7 +23,7 @@ declare class Markdown extends Component<MarkdownOptions> {
|
|
|
23
23
|
getMinSize(): Size | null;
|
|
24
24
|
getPreferredSize(): Size | null;
|
|
25
25
|
setWidth(width: number): this;
|
|
26
|
-
|
|
26
|
+
protected destructor(): void;
|
|
27
27
|
private measureContentHeight;
|
|
28
28
|
protected render(): Handle;
|
|
29
29
|
private create;
|
|
@@ -15,7 +15,7 @@ declare class PaginationBar extends Component<PaginationBarOptions> {
|
|
|
15
15
|
private readonly _onStoreUpdate;
|
|
16
16
|
constructor(store: AbstractStore, options?: PaginationBarOptions);
|
|
17
17
|
protected applyOptions(options: PaginationBarOptions): this;
|
|
18
|
-
|
|
18
|
+
protected destructor(): void;
|
|
19
19
|
private refresh;
|
|
20
20
|
}
|
|
21
21
|
declare const PaginationBarCallable: import("../../core/Callable.js").Callable<typeof PaginationBar>;
|
|
@@ -50,7 +50,7 @@ declare class Video extends Component<VideoOptions> {
|
|
|
50
50
|
off(event: VideoMediaEvent, listener: () => void): this;
|
|
51
51
|
protected emit(event: VideoMediaEvent): void;
|
|
52
52
|
protected init(element?: Handle): this;
|
|
53
|
-
|
|
53
|
+
protected destructor(): void;
|
|
54
54
|
private buildMediaHandlers;
|
|
55
55
|
private replayMediaOptions;
|
|
56
56
|
private attachMediaListeners;
|
|
@@ -73,7 +73,7 @@ declare class VideoPlayer extends Component<VideoPlayerOptions> {
|
|
|
73
73
|
off(event: VideoPlayerEvent, listener: () => void): this;
|
|
74
74
|
protected emit(event: VideoPlayerEvent): void;
|
|
75
75
|
protected init(element?: Handle): this;
|
|
76
|
-
|
|
76
|
+
protected destructor(): void;
|
|
77
77
|
private syncFromState;
|
|
78
78
|
private syncFromVideo;
|
|
79
79
|
private buildControlBar;
|
|
@@ -14,6 +14,7 @@ export interface CodeEditorOptions extends ComponentOptions {
|
|
|
14
14
|
declare class CodeEditor extends Component<CodeEditorOptions> {
|
|
15
15
|
private _view;
|
|
16
16
|
private _flashOverlay;
|
|
17
|
+
private _flashAnimation;
|
|
17
18
|
private readonly _langCompartment;
|
|
18
19
|
private readonly _readOnlyCompartment;
|
|
19
20
|
private readonly _themeCompartment;
|
|
@@ -38,7 +39,7 @@ declare class CodeEditor extends Component<CodeEditorOptions> {
|
|
|
38
39
|
off(event: "readonlyedit", listener: () => void): this;
|
|
39
40
|
protected emit(event: "change", payload: CodeEditorChange): void;
|
|
40
41
|
protected emit(event: "readonlyedit"): void;
|
|
41
|
-
|
|
42
|
+
protected destructor(): void;
|
|
42
43
|
private claimScrollableWheel;
|
|
43
44
|
private mount;
|
|
44
45
|
private mountFlashOverlay;
|
|
@@ -47,7 +47,7 @@ declare class MarkdownEditor extends Component<MarkdownEditorOptions> {
|
|
|
47
47
|
protected emit(event: MarkdownEditorEvent, payload: MarkdownEditorChange): void;
|
|
48
48
|
setContentEditable(contentEditable: boolean): this;
|
|
49
49
|
getContentEditable(): boolean;
|
|
50
|
-
|
|
50
|
+
protected destructor(): void;
|
|
51
51
|
private ensureEditor;
|
|
52
52
|
private mountWysiwyg;
|
|
53
53
|
private handleChange;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractBooleanInput, AbstractBooleanInputOptions } from "../../component/input/AbstractBooleanInput.js";
|
|
2
2
|
import { Component } from "../../core/Component.js";
|
|
3
|
+
import { Event } from "../../core/Event.js";
|
|
3
4
|
export interface CheckboxOptions extends AbstractBooleanInputOptions {
|
|
4
5
|
selected?: boolean;
|
|
5
6
|
value?: boolean;
|
|
@@ -25,7 +26,7 @@ declare class Checkbox<TOptions extends CheckboxOptions = CheckboxOptions> exten
|
|
|
25
26
|
isIndeterminate(): boolean;
|
|
26
27
|
setIndeterminate(value: boolean): this;
|
|
27
28
|
setAnimated(value: boolean): this;
|
|
28
|
-
on(event: "action", listener:
|
|
29
|
+
on(event: "action", listener: Event.Listener): this;
|
|
29
30
|
on(event: "change", listener: (value: boolean) => void): this;
|
|
30
31
|
on(event: "binding", listener: () => void): this;
|
|
31
32
|
off(event: "action" | "change" | "binding", listener: Function): this;
|
|
@@ -15,7 +15,7 @@ declare class Link extends Text<LinkOptions> {
|
|
|
15
15
|
on(event: "action", listener: ClickListener): this;
|
|
16
16
|
off(event: "action", listener: ClickListener): this;
|
|
17
17
|
click(): this;
|
|
18
|
-
|
|
18
|
+
protected destructor(): void;
|
|
19
19
|
private handleKeyDown;
|
|
20
20
|
}
|
|
21
21
|
declare const LinkCallable: import("../../core/Callable.js").Callable<typeof Link>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractBooleanInput, AbstractBooleanInputOptions } from "../../component/input/AbstractBooleanInput.js";
|
|
2
2
|
import { Component } from "../../core/Component.js";
|
|
3
|
+
import { Event } from "../../core/Event.js";
|
|
3
4
|
export interface RadioButtonOptions extends AbstractBooleanInputOptions {
|
|
4
5
|
selected?: boolean;
|
|
5
6
|
value?: boolean;
|
|
@@ -25,7 +26,7 @@ declare class RadioButton<TOptions extends RadioButtonOptions = RadioButtonOptio
|
|
|
25
26
|
setRadioName(name: string): this;
|
|
26
27
|
clearRadioName(): this;
|
|
27
28
|
getRadioName(): string | null;
|
|
28
|
-
on(event: "action", listener:
|
|
29
|
+
on(event: "action", listener: Event.Listener): this;
|
|
29
30
|
on(event: "change", listener: (value: boolean) => void): this;
|
|
30
31
|
on(event: "binding", listener: () => void): this;
|
|
31
32
|
off(event: "action" | "change" | "binding", listener: Function): this;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AbstractInput, AbstractInputOptions } from "../../component/input/AbstractInput.js";
|
|
2
|
+
import { Event } from "../../core/Event.js";
|
|
2
3
|
import type { AxisOrientation } from "../../primitive/Axis.js";
|
|
3
4
|
export interface SliderOptions extends AbstractInputOptions {
|
|
4
5
|
value?: number;
|
|
@@ -41,7 +42,7 @@ declare class Slider<TOptions extends SliderOptions = SliderOptions> extends Abs
|
|
|
41
42
|
setOrientation(orientation: AxisOrientation): this;
|
|
42
43
|
isShowTicks(): boolean;
|
|
43
44
|
setShowTicks(value: boolean): this;
|
|
44
|
-
on(event: "action", listener:
|
|
45
|
+
on(event: "action", listener: Event.Listener): this;
|
|
45
46
|
on(event: "change", listener: (value: number) => void): this;
|
|
46
47
|
on(event: "binding", listener: () => void): this;
|
|
47
48
|
off(event: "action" | "change" | "binding", listener: Function): this;
|
|
@@ -23,7 +23,6 @@ declare class Text<TOptions extends TextOptions = TextOptions> extends Component
|
|
|
23
23
|
private _hasExplicitPreferredSize;
|
|
24
24
|
private _fontSizeCSSVar;
|
|
25
25
|
private _fontSizeCSSRule;
|
|
26
|
-
private readonly _unsubscribeTheme;
|
|
27
26
|
private _lineHeightCSSVar;
|
|
28
27
|
private _lineHeightCSSRule;
|
|
29
28
|
private _measuredBaseline;
|
|
@@ -39,7 +38,7 @@ declare class Text<TOptions extends TextOptions = TextOptions> extends Component
|
|
|
39
38
|
private readThemeLineHeightPx;
|
|
40
39
|
getElement(createIfMissing?: boolean): Handle | undefined;
|
|
41
40
|
private resolveBoundFontSizePx;
|
|
42
|
-
setPreferredSize(
|
|
41
|
+
setPreferredSize(size: Size): this;
|
|
43
42
|
private setCalculatedSize;
|
|
44
43
|
private calculateSize;
|
|
45
44
|
measure(): void;
|
|
@@ -89,7 +88,6 @@ declare class Text<TOptions extends TextOptions = TextOptions> extends Component
|
|
|
89
88
|
setLineClamp(lines: number): this;
|
|
90
89
|
clearLineClamp(): this;
|
|
91
90
|
applyStyle(element: Handle): this;
|
|
92
|
-
dispose(): void;
|
|
93
91
|
protected render(): Handle;
|
|
94
92
|
}
|
|
95
93
|
declare const TextCallable: import("../../core/Callable.js").Callable<typeof Text>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractInput, AbstractInputOptions } from "../../component/input/AbstractInput.js";
|
|
2
2
|
import type { Handle } from "../../core/DOM.js";
|
|
3
|
+
import { Event } from "../../core/Event.js";
|
|
3
4
|
export interface TextInputOptions extends AbstractInputOptions {
|
|
4
5
|
type?: string;
|
|
5
6
|
text?: string;
|
|
@@ -18,8 +19,8 @@ declare class TextInput<TOptions extends TextInputOptions = TextInputOptions> ex
|
|
|
18
19
|
constructor(options?: TOptions, subclassDefaults?: Partial<TOptions>);
|
|
19
20
|
protected onInput(): void;
|
|
20
21
|
protected applyOptions(options: TOptions): this;
|
|
21
|
-
on(event: "action", listener:
|
|
22
|
-
on(event: "keydown", listener: (e: KeyboardEvent) =>
|
|
22
|
+
on(event: "action", listener: Event.Listener): this;
|
|
23
|
+
on(event: "keydown", listener: (e: KeyboardEvent) => Event.ListenerResult): this;
|
|
23
24
|
on(event: "change", listener: (value: string) => void): this;
|
|
24
25
|
on(event: "binding", listener: () => void): this;
|
|
25
26
|
off(event: "action" | "keydown" | "change" | "binding", listener: Function): this;
|
|
@@ -2,6 +2,7 @@ import { AbstractInput, AbstractInputOptions } from "../../component/input/Abstr
|
|
|
2
2
|
import { Component } from "../../core/Component.js";
|
|
3
3
|
import type { Handle } from "../../core/DOM.js";
|
|
4
4
|
import { Panel } from "../../core/Panel.js";
|
|
5
|
+
import { Event } from "../../core/Event.js";
|
|
5
6
|
import { AbstractStore } from "../../data/AbstractStore.js";
|
|
6
7
|
import { ModelRecord } from "../../data/ModelRecord.js";
|
|
7
8
|
import { ListItemRenderer } from "../../component/list/ListItemRenderer.js";
|
|
@@ -103,7 +104,7 @@ declare abstract class AbstractSelectableList<TValue, TOptions extends AbstractS
|
|
|
103
104
|
getSelectedRecord(): ModelRecord | undefined;
|
|
104
105
|
getSelectedIndex(): number;
|
|
105
106
|
setSelectedIndex(idx: number, fireEvent?: boolean): this;
|
|
106
|
-
on(event: "action", listener:
|
|
107
|
+
on(event: "action", listener: Event.Listener): this;
|
|
107
108
|
on(event: "change", listener: (value: TValue) => void): this;
|
|
108
109
|
on(event: "binding", listener: () => void): this;
|
|
109
110
|
on(event: "contextmenu", listener: (index: number, event: MouseEvent) => void): this;
|
|
@@ -11,7 +11,7 @@ declare class MenuBarButton extends Button<MenuBarButtonOptions> {
|
|
|
11
11
|
height: number;
|
|
12
12
|
};
|
|
13
13
|
setActive(active: boolean): this;
|
|
14
|
-
|
|
14
|
+
protected destructor(): void;
|
|
15
15
|
}
|
|
16
16
|
declare const MenuBarButtonCallable: import("../../core/Callable.js").Callable<typeof MenuBarButton>;
|
|
17
17
|
type MenuBarButtonCallable = MenuBarButton;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ComponentOptions } from "../core/Component.js";
|
|
2
|
+
import { Animation } from "../core/Animation.js";
|
|
2
3
|
import { DismissableLayer, LayerDismissMode } from "../core/LayerManager.js";
|
|
3
4
|
import { type Rect, type Handle } from "../core/DOM.js";
|
|
4
5
|
export interface AnimatedDropdownOptions extends ComponentOptions {
|
|
@@ -17,6 +18,8 @@ declare class AnimatedDropdown<TOptions extends AnimatedDropdownOptions = Animat
|
|
|
17
18
|
private _open;
|
|
18
19
|
private _closeHandler;
|
|
19
20
|
private _anchorElement;
|
|
21
|
+
private _showAnimation;
|
|
22
|
+
private _hideAnimation;
|
|
20
23
|
constructor(options?: AnimatedDropdownOptions, subclassDefaults?: Partial<AnimatedDropdownOptions>);
|
|
21
24
|
protected applyOptions(options: TOptions): this;
|
|
22
25
|
setAnimated(value: boolean): this;
|
|
@@ -33,6 +36,7 @@ declare class AnimatedDropdown<TOptions extends AnimatedDropdownOptions = Animat
|
|
|
33
36
|
placeAnchored(rect: Rect): this;
|
|
34
37
|
protected onShowComplete(): void;
|
|
35
38
|
protected onHideComplete(): void;
|
|
39
|
+
protected destructor(): void;
|
|
36
40
|
getLayerElement(): Handle | null;
|
|
37
41
|
getDismissMode(): LayerDismissMode;
|
|
38
42
|
requestClose(): void;
|
|
@@ -41,8 +45,8 @@ declare class AnimatedDropdown<TOptions extends AnimatedDropdownOptions = Animat
|
|
|
41
45
|
setCloseHandler(handler: (() => void) | null): this;
|
|
42
46
|
setAnchorElement(el: Handle | null): this;
|
|
43
47
|
}
|
|
44
|
-
export declare function fadeShow(component: Component, options?: FadeOptions):
|
|
45
|
-
export declare function fadeHideAndDetach(component: Component, options?: FadeOptions):
|
|
48
|
+
export declare function fadeShow(component: Component, options?: FadeOptions): Animation.CancelHandle;
|
|
49
|
+
export declare function fadeHideAndDetach(component: Component, options?: FadeOptions): Animation.CancelHandle;
|
|
46
50
|
declare const AnimatedDropdownCallable: import("../core/Callable.js").Callable<typeof AnimatedDropdown>;
|
|
47
51
|
type AnimatedDropdownCallable<TOptions extends AnimatedDropdownOptions = AnimatedDropdownOptions> = AnimatedDropdown<TOptions>;
|
|
48
52
|
export { AnimatedDropdown as _AnimatedDropdown, AnimatedDropdownCallable as AnimatedDropdown };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from "../core/Component.js";
|
|
2
|
+
import type { ComponentFactory } from "../core/Component.js";
|
|
2
3
|
import type { Handle } from "../core/DOM.js";
|
|
3
4
|
export declare namespace Animation {
|
|
4
5
|
interface PlayConfig {
|
|
@@ -11,7 +12,7 @@ export declare namespace Animation {
|
|
|
11
12
|
fallbackBufferMs?: number;
|
|
12
13
|
}
|
|
13
14
|
function isReducedMotion(): boolean;
|
|
14
|
-
function play(el: Handle, config: PlayConfig):
|
|
15
|
+
function play(el: Handle, config: PlayConfig): CancelHandle;
|
|
15
16
|
interface AfterTransitionConfig {
|
|
16
17
|
component: Component;
|
|
17
18
|
property?: string;
|
|
@@ -19,7 +20,7 @@ export declare namespace Animation {
|
|
|
19
20
|
fallbackBufferMs?: number;
|
|
20
21
|
onComplete: () => void;
|
|
21
22
|
}
|
|
22
|
-
function afterTransition(config: AfterTransitionConfig):
|
|
23
|
+
function afterTransition(config: AfterTransitionConfig): CancelHandle;
|
|
23
24
|
interface TweenConfig<T extends {
|
|
24
25
|
[K in keyof T]: number;
|
|
25
26
|
}> {
|
|
@@ -30,18 +31,20 @@ export declare namespace Animation {
|
|
|
30
31
|
onStep: (values: T) => void;
|
|
31
32
|
onComplete?: () => void;
|
|
32
33
|
}
|
|
33
|
-
interface
|
|
34
|
+
interface CancelHandle {
|
|
34
35
|
cancel(): void;
|
|
35
36
|
}
|
|
36
37
|
function tween<T extends {
|
|
37
38
|
[K in keyof T]: number;
|
|
38
|
-
}>(config: TweenConfig<T>):
|
|
39
|
+
}>(config: TweenConfig<T>): CancelHandle;
|
|
39
40
|
interface MaterializeConfig {
|
|
40
41
|
host: Component;
|
|
41
|
-
factory:
|
|
42
|
+
factory: ComponentFactory;
|
|
42
43
|
spinnerComponent: Component;
|
|
43
44
|
fadeMs?: number;
|
|
44
45
|
onReady?: (component: Component) => void;
|
|
46
|
+
onError?: (error: unknown) => void;
|
|
47
|
+
isStale?: () => boolean;
|
|
45
48
|
}
|
|
46
|
-
function materialize(config: MaterializeConfig):
|
|
49
|
+
function materialize(config: MaterializeConfig): CancelHandle;
|
|
47
50
|
}
|
|
@@ -7,6 +7,7 @@ import { BaseObject } from "../core/BaseObject.js";
|
|
|
7
7
|
import { LayoutConstraints } from "../layout/LayoutConstraints.js";
|
|
8
8
|
import { Position } from "../primitive/Position.js";
|
|
9
9
|
import { Aria } from "../core/Aria.js";
|
|
10
|
+
import { Event } from "../core/Event.js";
|
|
10
11
|
import { StyleRule } from "../core/StyleTarget.js";
|
|
11
12
|
export interface Comparator<V, U> {
|
|
12
13
|
(a: V, b: U): number;
|
|
@@ -20,8 +21,9 @@ export interface PerimeterSize {
|
|
|
20
21
|
bottom: number;
|
|
21
22
|
left: number;
|
|
22
23
|
}
|
|
24
|
+
export type ComponentFactory = () => Component | Promise<Component>;
|
|
23
25
|
export interface ConstrainedComponent {
|
|
24
|
-
component: Component;
|
|
26
|
+
component: Component | ComponentFactory;
|
|
25
27
|
constraints?: LayoutConstraints;
|
|
26
28
|
}
|
|
27
29
|
export interface ComponentStyleRuleSpec {
|
|
@@ -61,7 +63,7 @@ export interface ComponentOptions {
|
|
|
61
63
|
id?: string;
|
|
62
64
|
name?: string | null;
|
|
63
65
|
attributes?: Record<string, string>;
|
|
64
|
-
components?: Array<Component | ConstrainedComponent>;
|
|
66
|
+
components?: Array<Component | ComponentFactory | ConstrainedComponent>;
|
|
65
67
|
styleRules?: ComponentStyleRuleSpec[];
|
|
66
68
|
}
|
|
67
69
|
declare class Component<TOptions extends ComponentOptions = ComponentOptions> extends BaseObject {
|
|
@@ -73,6 +75,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
73
75
|
private readonly _themeCleanups;
|
|
74
76
|
private _tag;
|
|
75
77
|
private _attributes;
|
|
78
|
+
private _elementAttributes;
|
|
76
79
|
private _boxSizing;
|
|
77
80
|
private _left;
|
|
78
81
|
private _top;
|
|
@@ -125,6 +128,7 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
125
128
|
protected applyChromeOptions(options: TOptions): void;
|
|
126
129
|
protected applyListeners(listeners: Record<string, ((...args: any[]) => void) | undefined> | undefined): void;
|
|
127
130
|
protected subscribeTheme(listener: () => void): void;
|
|
131
|
+
dispose(): void;
|
|
128
132
|
protected destructor(): void;
|
|
129
133
|
protected trackHandle(handle: Handle): Handle;
|
|
130
134
|
private trackSelector;
|
|
@@ -231,14 +235,15 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
231
235
|
getPreferredSizeConstraint(): Size | null;
|
|
232
236
|
getPreferredSize(): Size | null;
|
|
233
237
|
private clampPreferredToConstraints;
|
|
234
|
-
setPreferredSize(
|
|
238
|
+
setPreferredSize(size: Size): this;
|
|
239
|
+
clearPreferredSize(): this;
|
|
235
240
|
getMinSizeConstraint(): Size | null;
|
|
236
241
|
getMaxSizeConstraint(): Size | null;
|
|
237
242
|
private mergeConstraintSize;
|
|
238
243
|
getMinSize(): Size | null;
|
|
239
|
-
setMinSize(
|
|
244
|
+
setMinSize(size: Size): this;
|
|
240
245
|
getMaxSize(): Size | null;
|
|
241
|
-
setMaxSize(
|
|
246
|
+
setMaxSize(size: Size): this;
|
|
242
247
|
getInnerSize(): Size | null;
|
|
243
248
|
getBorderSize(): PerimeterSize;
|
|
244
249
|
private estimateBorderSideWidth;
|
|
@@ -331,10 +336,10 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
331
336
|
private materialiseDeferredRules;
|
|
332
337
|
sync(): void;
|
|
333
338
|
getParentComponent(): Component | null;
|
|
334
|
-
addComponents(...specs: Array<Component | ConstrainedComponent | Array<Component | ConstrainedComponent>>): this;
|
|
339
|
+
addComponents(...specs: Array<Component | ComponentFactory | ConstrainedComponent | Array<Component | ComponentFactory | ConstrainedComponent>>): this;
|
|
335
340
|
private wireChild;
|
|
336
341
|
private unwireChild;
|
|
337
|
-
addComponent(component: Component, constraints?: LayoutConstraints): this;
|
|
342
|
+
addComponent(component: Component | ComponentFactory, constraints?: LayoutConstraints): this;
|
|
338
343
|
insertComponent(component: Component, index: number, constraints?: LayoutConstraints): this;
|
|
339
344
|
moveComponent(child: Component, index?: number, constraints?: LayoutConstraints): this;
|
|
340
345
|
removeComponent(component: Component): LayoutConstraints | undefined;
|
|
@@ -359,10 +364,10 @@ declare class Component<TOptions extends ComponentOptions = ComponentOptions> ex
|
|
|
359
364
|
static afterNextLayout(callback: () => void): void;
|
|
360
365
|
flushLayout(): this;
|
|
361
366
|
static flushEffectiveVisibility(): void;
|
|
362
|
-
addMouseDownListener(listener:
|
|
363
|
-
removeMouseDownListener(listener:
|
|
364
|
-
addMouseDownSubtreeListener(listener:
|
|
365
|
-
removeMouseDownSubtreeListener(listener:
|
|
367
|
+
addMouseDownListener(listener: Event.Listener): this;
|
|
368
|
+
removeMouseDownListener(listener: Event.Listener): this;
|
|
369
|
+
addMouseDownSubtreeListener(listener: Event.Listener): this;
|
|
370
|
+
removeMouseDownSubtreeListener(listener: Event.Listener): this;
|
|
366
371
|
protected init(element?: Handle): this;
|
|
367
372
|
protected createRootElement(): Handle;
|
|
368
373
|
protected render(): Handle;
|