@jimka/typescript-ui 0.6.0 → 0.8.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.
Files changed (306) hide show
  1. package/dist/lib/AbstractInput-Dt9ooHjo.js +2 -0
  2. package/dist/lib/AbstractInput-Dt9ooHjo.js.map +1 -0
  3. package/dist/lib/AccordionConstraints-DahZEfEp.js +2 -0
  4. package/dist/lib/AccordionConstraints-DahZEfEp.js.map +1 -0
  5. package/dist/lib/{Anchor-CwRhdP2J.js → Anchor-DdYgyn2V.js} +2 -2
  6. package/dist/lib/{Anchor-CwRhdP2J.js.map → Anchor-DdYgyn2V.js.map} +1 -1
  7. package/dist/lib/AnimatedDropdown-_KhHzX5D.js +2 -0
  8. package/dist/lib/AnimatedDropdown-_KhHzX5D.js.map +1 -0
  9. package/dist/lib/Border-BELbqMDJ.js +2 -0
  10. package/dist/lib/Border-BELbqMDJ.js.map +1 -0
  11. package/dist/lib/Button-CKzjQyqA.js +2 -0
  12. package/dist/lib/Button-CKzjQyqA.js.map +1 -0
  13. package/dist/lib/{Card-QYo27r5b.js → Card-CAp7LcB5.js} +2 -2
  14. package/dist/lib/{Card-QYo27r5b.js.map → Card-CAp7LcB5.js.map} +1 -1
  15. package/dist/lib/Checkbox-CvAZJ4_T.js +2 -0
  16. package/dist/lib/Checkbox-CvAZJ4_T.js.map +1 -0
  17. package/dist/lib/CodeEditor-DoGGdL1Y.js +2 -0
  18. package/dist/lib/CodeEditor-DoGGdL1Y.js.map +1 -0
  19. package/dist/lib/ComboBox-DgjMnpdh.js +2 -0
  20. package/dist/lib/ComboBox-DgjMnpdh.js.map +1 -0
  21. package/dist/lib/Component-YrLXKJZS.js +2 -0
  22. package/dist/lib/Component-YrLXKJZS.js.map +1 -0
  23. package/dist/lib/Container-C5cxnioS.js +2 -0
  24. package/dist/lib/{Container-abY5Ww3W.js.map → Container-C5cxnioS.js.map} +1 -1
  25. package/dist/lib/DOM-DDhDN8lQ.js +2 -0
  26. package/dist/lib/DOM-DDhDN8lQ.js.map +1 -0
  27. package/dist/lib/Diagnostics-MI6Yw-3E.js +2 -0
  28. package/dist/lib/Diagnostics-MI6Yw-3E.js.map +1 -0
  29. package/dist/lib/Dialog-CXQXRQQK.js +2 -0
  30. package/dist/lib/Dialog-CXQXRQQK.js.map +1 -0
  31. package/dist/lib/DragManager-D5pBaPPg.js +2 -0
  32. package/dist/lib/DragManager-D5pBaPPg.js.map +1 -0
  33. package/dist/lib/{FieldDecorator-BlYMfZ9L.js → FieldDecorator-37IgKHHm.js} +2 -2
  34. package/dist/lib/{FieldDecorator-BlYMfZ9L.js.map → FieldDecorator-37IgKHHm.js.map} +1 -1
  35. package/dist/lib/{Fit-BhlB-HAo.js → Fit-amTWlJM2.js} +2 -2
  36. package/dist/lib/{Fit-BhlB-HAo.js.map → Fit-amTWlJM2.js.map} +1 -1
  37. package/dist/lib/{FloatingPanel-DkJXsZ2D.js → FloatingPanel-CwsFPYbc.js} +2 -2
  38. package/dist/lib/{FloatingPanel-DkJXsZ2D.js.map → FloatingPanel-CwsFPYbc.js.map} +1 -1
  39. package/dist/lib/Glyph-Cof7BxfJ.js +2 -0
  40. package/dist/lib/Glyph-Cof7BxfJ.js.map +1 -0
  41. package/dist/lib/{Grid-Daiz7F5d.js → Grid-BQZ4UIUH.js} +2 -2
  42. package/dist/lib/{Grid-Daiz7F5d.js.map → Grid-BQZ4UIUH.js.map} +1 -1
  43. package/dist/lib/GridConstraints-BkXa62z0.js +2 -0
  44. package/dist/lib/GridConstraints-BkXa62z0.js.map +1 -0
  45. package/dist/lib/{Header-Dql3Zxc6.js → Header-Cj33ABP1.js} +2 -2
  46. package/dist/lib/{Header-Dql3Zxc6.js.map → Header-Cj33ABP1.js.map} +1 -1
  47. package/dist/lib/{IconText-PUjhTLlp.js → IconText-Dp64iq_q.js} +2 -2
  48. package/dist/lib/{IconText-PUjhTLlp.js.map → IconText-Dp64iq_q.js.map} +1 -1
  49. package/dist/lib/LabeledGrid-Dpelrc1k.js +2 -0
  50. package/dist/lib/LabeledGrid-Dpelrc1k.js.map +1 -0
  51. package/dist/lib/LayoutSerialization-DgLJSuew.js +2 -0
  52. package/dist/lib/LayoutSerialization-DgLJSuew.js.map +1 -0
  53. package/dist/lib/Link-DE8tE3u3.js +2 -0
  54. package/dist/lib/Link-DE8tE3u3.js.map +1 -0
  55. package/dist/lib/List-TfgHScl3.js +2 -0
  56. package/dist/lib/List-TfgHScl3.js.map +1 -0
  57. package/dist/lib/ListenerBag-DYRl4TSb.js +2 -0
  58. package/dist/lib/ListenerBag-DYRl4TSb.js.map +1 -0
  59. package/dist/lib/{MemoryStore-DhPoU-7X.js → MemoryStore-ByGDEKYI.js} +2 -2
  60. package/dist/lib/{MemoryStore-DhPoU-7X.js.map → MemoryStore-ByGDEKYI.js.map} +1 -1
  61. package/dist/lib/Menu-BCQISKiQ.js +2 -0
  62. package/dist/lib/Menu-BCQISKiQ.js.map +1 -0
  63. package/dist/lib/{MenuButton-DCXi0tsP.js → MenuButton-BO4y3jf2.js} +2 -2
  64. package/dist/lib/{MenuButton-DCXi0tsP.js.map → MenuButton-BO4y3jf2.js.map} +1 -1
  65. package/dist/lib/{OverlayFade-3pof2AJH.js → OverlayFade-C1yQKffL.js} +2 -2
  66. package/dist/lib/{OverlayFade-3pof2AJH.js.map → OverlayFade-C1yQKffL.js.map} +1 -1
  67. package/dist/lib/{Panel-Cy1pdlWO.js → Panel-DlsVVuvn.js} +2 -2
  68. package/dist/lib/{Panel-Cy1pdlWO.js.map → Panel-DlsVVuvn.js.map} +1 -1
  69. package/dist/lib/{Position-BwtxouxK.js → Position-DWR1nIpA.js} +2 -2
  70. package/dist/lib/Position-DWR1nIpA.js.map +1 -0
  71. package/dist/lib/ProgressSpinner-BI9tFIVm.js +2 -0
  72. package/dist/lib/ProgressSpinner-BI9tFIVm.js.map +1 -0
  73. package/dist/lib/RadioButton-BxcuFChp.js +2 -0
  74. package/dist/lib/RadioButton-BxcuFChp.js.map +1 -0
  75. package/dist/lib/RadioMenuRow-B2bthoxj.js +2 -0
  76. package/dist/lib/RadioMenuRow-B2bthoxj.js.map +1 -0
  77. package/dist/lib/{RovingTabIndex-pHEv5oLD.js → RovingTabIndex-BttlsARv.js} +2 -2
  78. package/dist/lib/{RovingTabIndex-pHEv5oLD.js.map → RovingTabIndex-BttlsARv.js.map} +1 -1
  79. package/dist/lib/Scrollbar-orAWHWap.js +2 -0
  80. package/dist/lib/Scrollbar-orAWHWap.js.map +1 -0
  81. package/dist/lib/SelectableText-BbS_lRzY.js +2 -0
  82. package/dist/lib/SelectableText-BbS_lRzY.js.map +1 -0
  83. package/dist/lib/Slider-BvXc-cx5.js +2 -0
  84. package/dist/lib/Slider-BvXc-cx5.js.map +1 -0
  85. package/dist/lib/Spacer-C6faKe1V.js +2 -0
  86. package/dist/lib/Spacer-C6faKe1V.js.map +1 -0
  87. package/dist/lib/StyleTraits-CAtzeyRR.js +2 -0
  88. package/dist/lib/StyleTraits-CAtzeyRR.js.map +1 -0
  89. package/dist/lib/TabButton-BQDaBszs.js +2 -0
  90. package/dist/lib/TabButton-BQDaBszs.js.map +1 -0
  91. package/dist/lib/TabCloseButton-B-iLVPGZ.js +2 -0
  92. package/dist/lib/TabCloseButton-B-iLVPGZ.js.map +1 -0
  93. package/dist/lib/Table-3McEw5gr.js +7 -0
  94. package/dist/lib/Table-3McEw5gr.js.map +1 -0
  95. package/dist/lib/Text-CGFXPhHD.js +2 -0
  96. package/dist/lib/Text-CGFXPhHD.js.map +1 -0
  97. package/dist/lib/Tooltip-DgRHQZhL.js +3 -0
  98. package/dist/lib/Tooltip-DgRHQZhL.js.map +1 -0
  99. package/dist/lib/Tree-Bq2pjjAz.js +2 -0
  100. package/dist/lib/Tree-Bq2pjjAz.js.map +1 -0
  101. package/dist/lib/{VBox-DfJPWXqc.js → VBox-hFIZAEpT.js} +2 -2
  102. package/dist/lib/{VBox-DfJPWXqc.js.map → VBox-hFIZAEpT.js.map} +1 -1
  103. package/dist/lib/{VirtualScroller-DTIn19o1.js → VirtualScroller-Csa3GBSM.js} +2 -2
  104. package/dist/lib/{VirtualScroller-DTIn19o1.js.map → VirtualScroller-Csa3GBSM.js.map} +1 -1
  105. package/dist/lib/Window-CQ14_65z.js +2 -0
  106. package/dist/lib/Window-CQ14_65z.js.map +1 -0
  107. package/dist/lib/component/button.es.js +1 -1
  108. package/dist/lib/component/button.es.js.map +1 -1
  109. package/dist/lib/component/chart.es.js +1 -1
  110. package/dist/lib/component/chart.es.js.map +1 -1
  111. package/dist/lib/component/container.es.js +1 -1
  112. package/dist/lib/component/container.es.js.map +1 -1
  113. package/dist/lib/component/diagram.es.js +1 -1
  114. package/dist/lib/component/diagram.es.js.map +1 -1
  115. package/dist/lib/component/display.es.js +1 -1
  116. package/dist/lib/component/display.es.js.map +1 -1
  117. package/dist/lib/component/editor.es.js +2 -2
  118. package/dist/lib/component/editor.es.js.map +1 -1
  119. package/dist/lib/component/input.es.js +1 -1
  120. package/dist/lib/component/input.es.js.map +1 -1
  121. package/dist/lib/component/list.es.js +1 -1
  122. package/dist/lib/component/list.es.js.map +1 -1
  123. package/dist/lib/component/menubar.es.js +1 -1
  124. package/dist/lib/component/menubar.es.js.map +1 -1
  125. package/dist/lib/component/table.es.js +1 -6
  126. package/dist/lib/component/table.es.js.map +1 -1
  127. package/dist/lib/component/tree.es.js +1 -1
  128. package/dist/lib/component/tree.es.js.map +1 -1
  129. package/dist/lib/core-DpzpKLWE.js +2 -0
  130. package/dist/lib/core-DpzpKLWE.js.map +1 -0
  131. package/dist/lib/core.es.js +1 -2
  132. package/dist/lib/data.es.js +1 -1
  133. package/dist/lib/diagnostics.es.js +24 -0
  134. package/dist/lib/diagnostics.es.js.map +1 -0
  135. package/dist/lib/glyphs/solid/index.es.js +1 -1
  136. package/dist/lib/layout.es.js +1 -1
  137. package/dist/lib/layout.es.js.map +1 -1
  138. package/dist/lib/overlay.es.js +1 -1
  139. package/dist/lib/overlay.es.js.map +1 -1
  140. package/dist/lib/primitive-8YvORgGS.js +2 -0
  141. package/dist/lib/primitive-8YvORgGS.js.map +1 -0
  142. package/dist/lib/primitive.es.js +1 -2
  143. package/dist/lib/router.es.js +1 -1
  144. package/dist/lib/selectionsEqual-DWdW5pxP.js +2 -0
  145. package/dist/lib/{selectionsEqual-gMG7gCVI.js.map → selectionsEqual-DWdW5pxP.js.map} +1 -1
  146. package/dist/lib/types/component/button/Button.d.ts +7 -6
  147. package/dist/lib/types/component/button/TabButton.d.ts +3 -0
  148. package/dist/lib/types/component/button/TabCloseButton.d.ts +3 -0
  149. package/dist/lib/types/component/button/ToggleButton.d.ts +2 -2
  150. package/dist/lib/types/component/chart/AbstractChart.d.ts +2 -0
  151. package/dist/lib/types/component/container/AccordionHeader.d.ts +6 -1
  152. package/dist/lib/types/component/container/AccordionIndicator.d.ts +2 -0
  153. package/dist/lib/types/component/container/FieldSet.d.ts +2 -0
  154. package/dist/lib/types/component/container/LabeledFieldSet.d.ts +1 -1
  155. package/dist/lib/types/component/container/LabeledGrid.d.ts +4 -1
  156. package/dist/lib/types/component/container/Legend.d.ts +2 -2
  157. package/dist/lib/types/component/container/MenuItem.d.ts +1 -0
  158. package/dist/lib/types/component/container/WindowBorder.d.ts +2 -2
  159. package/dist/lib/types/component/container/WindowHeader.d.ts +6 -0
  160. package/dist/lib/types/component/diagram/DiagramEdgeLayer.d.ts +10 -0
  161. package/dist/lib/types/component/diagram/DiagramGroupNode.d.ts +2 -0
  162. package/dist/lib/types/component/diagram/DiagramNode.d.ts +6 -2
  163. package/dist/lib/types/component/diagram/DiagramNodeLayer.d.ts +25 -0
  164. package/dist/lib/types/component/diagram/DiagramResidency.d.ts +11 -0
  165. package/dist/lib/types/component/diagram/DiagramView.d.ts +22 -0
  166. package/dist/lib/types/component/display/Markdown.d.ts +2 -1
  167. package/dist/lib/types/component/input/AbstractCalendarDropdown.d.ts +4 -2
  168. package/dist/lib/types/component/input/AbstractInput.d.ts +1 -0
  169. package/dist/lib/types/component/input/AbstractPickerField.d.ts +4 -0
  170. package/dist/lib/types/component/input/AutoCompleteDropdown.d.ts +2 -0
  171. package/dist/lib/types/component/input/AutoCompleteField.d.ts +1 -0
  172. package/dist/lib/types/component/input/ComboBox.d.ts +6 -1
  173. package/dist/lib/types/component/input/Link.d.ts +2 -0
  174. package/dist/lib/types/component/input/PasswordField.d.ts +2 -0
  175. package/dist/lib/types/component/input/PickerButton.d.ts +5 -2
  176. package/dist/lib/types/component/input/PickerInput.d.ts +2 -0
  177. package/dist/lib/types/component/input/SelectableText.d.ts +11 -0
  178. package/dist/lib/types/component/input/SpinButton.d.ts +3 -0
  179. package/dist/lib/types/component/input/Text.d.ts +12 -2
  180. package/dist/lib/types/component/input/TextArea.d.ts +2 -0
  181. package/dist/lib/types/component/input/TextField.d.ts +2 -0
  182. package/dist/lib/types/component/input/TextInput.d.ts +4 -0
  183. package/dist/lib/types/component/input/TimePickerDropdown.d.ts +3 -1
  184. package/dist/lib/types/component/input/UsernameField.d.ts +2 -0
  185. package/dist/lib/types/component/input/index.d.ts +2 -0
  186. package/dist/lib/types/component/list/AbstractMarkerList.d.ts +2 -0
  187. package/dist/lib/types/component/list/AbstractSelectableList.d.ts +6 -2
  188. package/dist/lib/types/component/list/ListItem.d.ts +2 -1
  189. package/dist/lib/types/component/menubar/MenuBarButton.d.ts +3 -0
  190. package/dist/lib/types/component/menubar/ToolBar.d.ts +2 -0
  191. package/dist/lib/types/component/table/Body.d.ts +54 -20
  192. package/dist/lib/types/component/table/Column.d.ts +2 -0
  193. package/dist/lib/types/component/table/ColumnConfig.d.ts +1 -0
  194. package/dist/lib/types/component/table/Footer.d.ts +2 -0
  195. package/dist/lib/types/component/table/Header.d.ts +8 -1
  196. package/dist/lib/types/component/table/Row.d.ts +22 -2
  197. package/dist/lib/types/component/table/Table.d.ts +6 -1
  198. package/dist/lib/types/component/table/TableExporter.d.ts +3 -0
  199. package/dist/lib/types/component/table/TablePanel.d.ts +6 -0
  200. package/dist/lib/types/component/table/TreeTablePanel.d.ts +6 -0
  201. package/dist/lib/types/component/table/cell/Cell.d.ts +8 -2
  202. package/dist/lib/types/component/table/cell/Default.d.ts +1 -1
  203. package/dist/lib/types/component/table/cell/Header.d.ts +4 -0
  204. package/dist/lib/types/component/table/cell/ParentHeader.d.ts +4 -0
  205. package/dist/lib/types/component/table/cell/ResizeHandle.d.ts +1 -1
  206. package/dist/lib/types/component/table/cell/renderer/CellRenderer.d.ts +2 -2
  207. package/dist/lib/types/component/table/cell/renderer/String.d.ts +3 -1
  208. package/dist/lib/types/component/table/index.d.ts +1 -1
  209. package/dist/lib/types/component/tree/TreeRow.d.ts +2 -0
  210. package/dist/lib/types/core/AnimatedDropdown.d.ts +2 -0
  211. package/dist/lib/types/core/Binding.d.ts +1 -0
  212. package/dist/lib/types/core/ClassStyleRules.d.ts +69 -4
  213. package/dist/lib/types/core/Component.d.ts +69 -14
  214. package/dist/lib/types/core/DOM.d.ts +11 -1
  215. package/dist/lib/types/core/Diagnostics.d.ts +22 -0
  216. package/dist/lib/types/core/Event.d.ts +7 -0
  217. package/dist/lib/types/core/LayerManager.d.ts +3 -0
  218. package/dist/lib/types/core/ListenerBag.d.ts +1 -0
  219. package/dist/lib/types/core/StyleTarget.d.ts +14 -0
  220. package/dist/lib/types/core/StyleTraits.d.ts +4 -0
  221. package/dist/lib/types/core/Theme.d.ts +6 -2
  222. package/dist/lib/types/core/Util.d.ts +4 -0
  223. package/dist/lib/types/core/index.d.ts +6 -3
  224. package/dist/lib/types/diagnostics/DiagnosticsOverlay.d.ts +29 -0
  225. package/dist/lib/types/diagnostics/DiagnosticsSampler.d.ts +61 -0
  226. package/dist/lib/types/diagnostics/StyleAudit.d.ts +19 -0
  227. package/dist/lib/types/diagnostics/StyleAuditOverlay.d.ts +12 -0
  228. package/dist/lib/types/diagnostics/StyleAuditView.d.ts +13 -0
  229. package/dist/lib/types/diagnostics/index.d.ts +7 -0
  230. package/dist/lib/types/layout/LayoutManager.d.ts +3 -0
  231. package/dist/lib/types/layout/Table.d.ts +3 -0
  232. package/dist/lib/types/overlay/AbstractWindow.d.ts +36 -0
  233. package/dist/lib/types/overlay/ButtonGroup.d.ts +1 -0
  234. package/dist/lib/types/overlay/Dialog.d.ts +1 -0
  235. package/dist/lib/types/overlay/Menu.d.ts +2 -0
  236. package/dist/lib/types/overlay/Notification.d.ts +0 -1
  237. package/dist/lib/types/overlay/PopupPanel.d.ts +2 -0
  238. package/dist/lib/types/overlay/RailHandle.d.ts +4 -5
  239. package/dist/lib/types/overlay/TabWindow.d.ts +3 -0
  240. package/dist/lib/types/overlay/Tooltip.d.ts +1 -0
  241. package/dist/lib/types/overlay/Window.d.ts +4 -1
  242. package/dist/lib/validation.es.js +1 -1
  243. package/llms.txt +2 -0
  244. package/package.json +5 -1
  245. package/dist/lib/AbstractInput-sRNPzWel.js +0 -2
  246. package/dist/lib/AbstractInput-sRNPzWel.js.map +0 -1
  247. package/dist/lib/AnimatedDropdown-H3Rh-YMZ.js +0 -2
  248. package/dist/lib/AnimatedDropdown-H3Rh-YMZ.js.map +0 -1
  249. package/dist/lib/Border-0DJFDiij.js +0 -2
  250. package/dist/lib/Border-0DJFDiij.js.map +0 -1
  251. package/dist/lib/Button-MpMIYBYJ.js +0 -2
  252. package/dist/lib/Button-MpMIYBYJ.js.map +0 -1
  253. package/dist/lib/Checkbox-D0JYK-wc.js +0 -2
  254. package/dist/lib/Checkbox-D0JYK-wc.js.map +0 -1
  255. package/dist/lib/CheckboxMenuRow-CesLhSnp.js +0 -2
  256. package/dist/lib/CheckboxMenuRow-CesLhSnp.js.map +0 -1
  257. package/dist/lib/CodeEditor-N1FQodcF.js +0 -2
  258. package/dist/lib/CodeEditor-N1FQodcF.js.map +0 -1
  259. package/dist/lib/ComboBox-Dx8Tk9yg.js +0 -2
  260. package/dist/lib/ComboBox-Dx8Tk9yg.js.map +0 -1
  261. package/dist/lib/Component-B0ShfPVi.js +0 -2
  262. package/dist/lib/Component-B0ShfPVi.js.map +0 -1
  263. package/dist/lib/Container-abY5Ww3W.js +0 -2
  264. package/dist/lib/DOM-C-Edb3tA.js +0 -2
  265. package/dist/lib/DOM-C-Edb3tA.js.map +0 -1
  266. package/dist/lib/Dialog-cbA9V17e.js +0 -2
  267. package/dist/lib/Dialog-cbA9V17e.js.map +0 -1
  268. package/dist/lib/Glyph-_VeBacS2.js +0 -2
  269. package/dist/lib/Glyph-_VeBacS2.js.map +0 -1
  270. package/dist/lib/GridConstraints-C58LuTqM.js +0 -2
  271. package/dist/lib/GridConstraints-C58LuTqM.js.map +0 -1
  272. package/dist/lib/LayoutSerialization-CMxunLfV.js +0 -2
  273. package/dist/lib/LayoutSerialization-CMxunLfV.js.map +0 -1
  274. package/dist/lib/List-nx8220Fi.js +0 -2
  275. package/dist/lib/List-nx8220Fi.js.map +0 -1
  276. package/dist/lib/ListenerBag-WPdKuuds.js +0 -2
  277. package/dist/lib/ListenerBag-WPdKuuds.js.map +0 -1
  278. package/dist/lib/Menu-Q0bpXXze.js +0 -2
  279. package/dist/lib/Menu-Q0bpXXze.js.map +0 -1
  280. package/dist/lib/Position-BwtxouxK.js.map +0 -1
  281. package/dist/lib/ProgressSpinner-DK8xEQ9y.js +0 -2
  282. package/dist/lib/ProgressSpinner-DK8xEQ9y.js.map +0 -1
  283. package/dist/lib/RadioButton-BEwpqg1k.js +0 -2
  284. package/dist/lib/RadioButton-BEwpqg1k.js.map +0 -1
  285. package/dist/lib/RadioMenuRow-DP5qPyFR.js +0 -2
  286. package/dist/lib/RadioMenuRow-DP5qPyFR.js.map +0 -1
  287. package/dist/lib/Scrollbar-t8fFrUVQ.js +0 -2
  288. package/dist/lib/Scrollbar-t8fFrUVQ.js.map +0 -1
  289. package/dist/lib/Slider-CTbwR6HR.js +0 -2
  290. package/dist/lib/Slider-CTbwR6HR.js.map +0 -1
  291. package/dist/lib/Spacer-srdN2d2b.js +0 -2
  292. package/dist/lib/Spacer-srdN2d2b.js.map +0 -1
  293. package/dist/lib/TabButton-DLoMQzky.js +0 -2
  294. package/dist/lib/TabButton-DLoMQzky.js.map +0 -1
  295. package/dist/lib/TabCloseButton-CY7BGitY.js +0 -2
  296. package/dist/lib/TabCloseButton-CY7BGitY.js.map +0 -1
  297. package/dist/lib/Text-CMKnK9uB.js +0 -2
  298. package/dist/lib/Text-CMKnK9uB.js.map +0 -1
  299. package/dist/lib/Tooltip-CUOJOqQi.js +0 -3
  300. package/dist/lib/Tooltip-CUOJOqQi.js.map +0 -1
  301. package/dist/lib/Tree-C64JNPWJ.js +0 -2
  302. package/dist/lib/Tree-C64JNPWJ.js.map +0 -1
  303. package/dist/lib/core.es.js.map +0 -1
  304. package/dist/lib/primitive.es.js.map +0 -1
  305. package/dist/lib/selectionsEqual-gMG7gCVI.js +0 -2
  306. package/dist/lib/types/component/table/CellGeometry.d.ts +0 -6
@@ -5,6 +5,7 @@ import { Size } from "../primitive/Size.js";
5
5
  import { Component } from "../core/Component.js";
6
6
  import type { ComponentFactory } from "../core/Component.js";
7
7
  import { BaseObject } from "../core/BaseObject.js";
8
+ import { ListenerBag } from "../core/ListenerBag.js";
8
9
  export interface LayoutManagerOptions {
9
10
  }
10
11
  export interface ResolvedPlacement {
@@ -21,11 +22,13 @@ export declare abstract class LayoutManager extends BaseObject {
21
22
  private _defaultMinSize;
22
23
  private _defaultMaxSize;
23
24
  private _overflowing;
25
+ private readonly _detachCleanups;
24
26
  constructor();
25
27
  protected applyOptions(_options: LayoutManagerOptions): void;
26
28
  addDeferredComponent(_factory: ComponentFactory, _constraints?: LayoutConstraints): boolean;
27
29
  attach(container: Component): this;
28
30
  detach(): this;
31
+ protected registerListenerBag<T extends string>(bag: ListenerBag<T>): ListenerBag<T>;
29
32
  getContainer(): Component | null;
30
33
  getPreferredSize(): Size | null;
31
34
  getMinSize(): Size | null;
@@ -6,9 +6,12 @@ declare class Table extends LayoutManager {
6
6
  constructor(options?: TableLayoutOptions);
7
7
  attach(container: Component): this;
8
8
  doLayout(): void;
9
+ private calculate;
10
+ private commit;
9
11
  private initializeWidths;
10
12
  private rescaleWidths;
11
13
  private absorbSlackIntoGreedy;
14
+ private isFixedColumn;
12
15
  private clamp;
13
16
  }
14
17
  declare const TableCallable: import("../core/Callable.js").Callable<typeof Table>;
@@ -4,6 +4,7 @@ import { WindowBorder } from "../component/container/WindowBorder.js";
4
4
  import { Event } from "../core/Event.js";
5
5
  import { DismissableLayer, LayerDismissMode } from "../core/LayerManager.js";
6
6
  import { Container, ContainerOptions } from "../core/Container.js";
7
+ import type { StyleBag } from "../core/ClassStyleRules.js";
7
8
  import { Size } from "../primitive/Size.js";
8
9
  import type { Rail } from "../overlay/Rail.js";
9
10
  export type WindowState = "normal" | "minimized" | "maximized";
@@ -28,6 +29,9 @@ export interface WindowOptions extends ContainerOptions {
28
29
  closeable?: boolean;
29
30
  minimizable?: boolean;
30
31
  maximizable?: boolean;
32
+ resizable?: boolean;
33
+ alwaysOnTop?: boolean;
34
+ locked?: boolean;
31
35
  maximizeBounds?: WindowMaximizeBounds;
32
36
  windowState?: WindowState;
33
37
  snapResizeEnabled?: boolean;
@@ -36,6 +40,7 @@ export interface WindowOptions extends ContainerOptions {
36
40
  constrainToViewport?: boolean;
37
41
  }
38
42
  export declare abstract class AbstractWindow extends Container<WindowOptions> implements DismissableLayer {
43
+ protected static readonly ownClassStyleDefaults: StyleBag;
39
44
  private static openWindows;
40
45
  private _borderComponents;
41
46
  private _animationFrameId;
@@ -65,8 +70,11 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
65
70
  private _contentReadyCallback;
66
71
  protected _preMinimizeState: "normal" | "maximized";
67
72
  private _restoreRect;
73
+ private _normalMinSize;
68
74
  private _bodyHost;
75
+ private _bodyFadeActive;
69
76
  private _rail;
77
+ private _windowMenu;
70
78
  private _windowListeners;
71
79
  private _stateAnimHandle;
72
80
  private _showAnimation;
@@ -90,6 +98,9 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
90
98
  private readonly _boundOnSnapBlur;
91
99
  private readonly _boundOnBorderResize;
92
100
  private readonly _boundOnBringToFront;
101
+ private readonly _boundToggleMinimize;
102
+ private readonly _boundToggleMaximize;
103
+ private readonly _boundRequestClose;
93
104
  private readonly _boundOnThemeReflow;
94
105
  constructor(options?: WindowOptions, subclassDefaults?: Partial<WindowOptions>);
95
106
  protected initChrome(options?: WindowOptions): void;
@@ -98,6 +109,7 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
98
109
  protected abstract reflectCloseable(value: boolean): void;
99
110
  protected abstract reflectMinimizable(value: boolean): void;
100
111
  protected abstract reflectMaximizable(value: boolean): void;
112
+ protected abstract reflectMaximizeAvailability(value: boolean): void;
101
113
  protected abstract reflectMaximizeState(state: WindowState): void;
102
114
  protected abstract paintActive(active: boolean): void;
103
115
  abstract getTitle(): string;
@@ -127,6 +139,7 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
127
139
  applyRect(rect: WindowRect): this;
128
140
  getRestoreRect(): WindowRect | null;
129
141
  setWindowState(state: WindowState): this;
142
+ private restoreNormalMinSize;
130
143
  isMaximized(): boolean;
131
144
  isMinimized(): boolean;
132
145
  toggleMinimize(): void;
@@ -145,6 +158,19 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
145
158
  isMinimizable(): boolean;
146
159
  setMaximizable(value: boolean): this;
147
160
  isMaximizable(): boolean;
161
+ private canResize;
162
+ private applyResizeBorderVisibility;
163
+ protected canMaximize(): boolean;
164
+ private applyMaximizeAvailability;
165
+ private refreshWindowMenuMaximizeAvailability;
166
+ setResizable(value: boolean): this;
167
+ isResizable(): boolean;
168
+ setLocked(value: boolean): this;
169
+ isLocked(): boolean;
170
+ setAlwaysOnTop(value: boolean): this;
171
+ isAlwaysOnTop(): boolean;
172
+ private buildWindowMenuItems;
173
+ protected openWindowMenu(opener: Component): void;
148
174
  setMaximizeBounds(value: WindowMaximizeBounds): this;
149
175
  getMaximizeBounds(): WindowMaximizeBounds;
150
176
  setSnapResizeEnabled(value: boolean): this;
@@ -171,6 +197,7 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
171
197
  render(): Handle;
172
198
  private currentRect;
173
199
  protected findBodyHost(): Component | null;
200
+ private resolveBodyHost;
174
201
  private setBodyHostDisplayed;
175
202
  private computeMaximizeRect;
176
203
  private computeDockRect;
@@ -181,9 +208,18 @@ export declare abstract class AbstractWindow extends Container<WindowOptions> im
181
208
  private computeDockSlotIndex;
182
209
  private static relayoutMinimizedStack;
183
210
  private animateRect;
211
+ private isLargeRectChange;
212
+ private fadeRectSwap;
213
+ private startFadeIn;
214
+ private beginStateAnimation;
215
+ private endBodyFade;
216
+ private commitRect;
217
+ private tweenRect;
184
218
  private attachViewportResizeListener;
185
219
  private detachViewportResizeListener;
186
220
  private onViewportResize;
221
+ private fitNormalWindowToViewport;
222
+ private clampRectToViewport;
187
223
  private attachSnapKeyboardListeners;
188
224
  private detachSnapKeyboardListeners;
189
225
  private attachSnapMouseListeners;
@@ -18,6 +18,7 @@ declare class ButtonGroup {
18
18
  constructor(options?: ButtonGroupOptions);
19
19
  private updateButtonStates;
20
20
  setAllowDeselect(value: boolean): this;
21
+ dispose(): void;
21
22
  on(event: "selection", listener: (button: RadioButton | ToggleButton) => void): this;
22
23
  off(event: ButtonGroupEvent, listener: Function): this;
23
24
  protected emit(event: "selection", button: RadioButton | ToggleButton): void;
@@ -11,6 +11,7 @@ export interface DialogButtonConfig {
11
11
  primary?: boolean;
12
12
  glyph?: string;
13
13
  tint?: string;
14
+ onClick?: () => boolean | Promise<boolean>;
14
15
  }
15
16
  export type DialogSeverity = 'info' | 'success' | 'warning' | 'error';
16
17
  export interface DialogConfig {
@@ -17,6 +17,7 @@ declare class Menu extends Component implements DismissableLayer {
17
17
  private _rebuildOnClose;
18
18
  private _currentOpener;
19
19
  private _scrollToBottomOnShow;
20
+ private _disposeOnClose;
20
21
  constructor(items?: MenuItemConfig[] | (() => MenuItemConfig[]), onClose?: () => void);
21
22
  private layOutColumns;
22
23
  show(x: number, y: number, configs: MenuItemConfig[], onClose?: () => void, excludeEl?: Handle | null): this;
@@ -25,6 +26,7 @@ declare class Menu extends Component implements DismissableLayer {
25
26
  hide(): this;
26
27
  getMenuWidth(): number;
27
28
  setMenuWidth(width: number): this;
29
+ setItemEnabled(index: number, enabled: boolean): this;
28
30
  setScrollToBottomOnShow(value: boolean): this;
29
31
  open(anchorEl: Handle, parentPanel?: Menu): this;
30
32
  close(): this;
@@ -15,7 +15,6 @@ export declare class Notification extends Component {
15
15
  private static readonly H_PADDING;
16
16
  private static readonly V_PADDING;
17
17
  private static readonly CLOSE_SIZE;
18
- private static readonly BADGE_SIZE;
19
18
  private static readonly BADGE_TEXT_GAP;
20
19
  private static readonly Z_INDEX;
21
20
  private static activeNotifications;
@@ -2,9 +2,11 @@ import { AnimatedDropdown, AnimatedDropdownOptions } from "../core/AnimatedDropd
2
2
  import type { Handle, Rect } from "../core/DOM.js";
3
3
  import { AnchoredFlexiblePlacement } from "../core/OverlayPosition.js";
4
4
  import type { Size } from "../primitive/Size.js";
5
+ import type { StyleBag } from "../core/ClassStyleRules.js";
5
6
  export interface PopupPanelOptions extends AnimatedDropdownOptions {
6
7
  }
7
8
  declare class PopupPanel<TOptions extends PopupPanelOptions = PopupPanelOptions> extends AnimatedDropdown<TOptions> {
9
+ protected static readonly ownClassStyleDefaults: StyleBag;
8
10
  private _currentOpener;
9
11
  constructor(options?: PopupPanelOptions, subclassDefaults?: Partial<PopupPanelOptions>);
10
12
  showAt(anchorRect: Rect): this;
@@ -1,13 +1,12 @@
1
+ import type { StyleBag, StyleStateSpec } from "../core/ClassStyleRules.js";
1
2
  import { Button, ButtonOptions } from "../component/button/Button.js";
2
3
  export interface RailHandleOptions extends ButtonOptions {
3
4
  selected?: boolean;
4
5
  }
5
6
  declare class RailHandle extends Button<RailHandleOptions> {
6
- private _selectedRule?;
7
- private get selectedRule();
8
- private _railHoverRule?;
9
- private get railHoverRule();
10
- constructor(options?: RailHandleOptions);
7
+ protected static readonly ownClassStyleDefaults: StyleBag;
8
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
9
+ constructor(options?: RailHandleOptions, subclassDefaults?: Partial<ButtonOptions>);
11
10
  protected applyOptions(options: RailHandleOptions): this;
12
11
  isSelected(): boolean;
13
12
  setSelected(value: boolean): this;
@@ -6,14 +6,17 @@ declare class TabWindow extends AbstractWindow {
6
6
  private _minTool;
7
7
  private _maxTool;
8
8
  private _leadGlyphBtn;
9
+ private readonly _boundOnLeadGlyphAction;
9
10
  constructor(options?: WindowOptions);
10
11
  createTab(content: Component): this;
11
12
  setGlyph(glyph: string): this;
12
13
  protected wireMoveTrigger(): void;
13
14
  private onBarDoubleClick;
15
+ private onLeadGlyphAction;
14
16
  protected reflectCloseable(value: boolean): void;
15
17
  protected reflectMinimizable(value: boolean): void;
16
18
  protected reflectMaximizable(value: boolean): void;
19
+ protected reflectMaximizeAvailability(value: boolean): void;
17
20
  protected reflectMaximizeState(_state: WindowState): void;
18
21
  protected paintActive(active: boolean): void;
19
22
  private setControlsActive;
@@ -13,6 +13,7 @@ export declare class Tooltip extends Component {
13
13
  private static attachments;
14
14
  private static elementAttachments;
15
15
  private static activeElement;
16
+ private static teardownWired;
16
17
  private static watching;
17
18
  private static readonly _onAnchorWatch;
18
19
  private static dismissing;
@@ -8,6 +8,7 @@ declare class Window extends AbstractWindow {
8
8
  private _headerDragComponentId;
9
9
  private readonly _boundCaptureHeaderShift;
10
10
  private readonly _boundOnHeaderMouseDown;
11
+ private readonly _boundOnTitleGlyphClick;
11
12
  constructor(headerText: string, options?: WindowOptions);
12
13
  getHeader(): WindowHeader;
13
14
  setHeaderText(text: string): this;
@@ -16,6 +17,7 @@ declare class Window extends AbstractWindow {
16
17
  protected reflectCloseable(value: boolean): void;
17
18
  protected reflectMinimizable(value: boolean): void;
18
19
  protected reflectMaximizable(value: boolean): void;
20
+ protected reflectMaximizeAvailability(value: boolean): void;
19
21
  protected reflectMaximizeState(state: WindowState): void;
20
22
  protected paintActive(active: boolean): void;
21
23
  getTitle(): string;
@@ -25,7 +27,8 @@ declare class Window extends AbstractWindow {
25
27
  isChromeComponent(child: Component): boolean;
26
28
  private onHeaderMouseDown;
27
29
  private onHeaderDoubleClick;
28
- private targetIsInTrailingButton;
30
+ private targetIsInHeaderControl;
31
+ private onTitleGlyphClick;
29
32
  private captureHeaderShift;
30
33
  private buildHeaderDragData;
31
34
  private onHeaderDragStart;
@@ -1 +1 @@
1
- import{t as e}from"./FieldDecorator-BlYMfZ9L.js";export{e as FieldDecorator};
1
+ import{t as e}from"./FieldDecorator-37IgKHHm.js";export{e as FieldDecorator};
package/llms.txt CHANGED
@@ -94,6 +94,8 @@ Organized by task. Columns: task → symbol · import subpath · summary · docs
94
94
  - Hover tooltip → **Tooltip** · `@jimka/typescript-ui/overlay` · A singleton floating tooltip that appears near the cursor after a short delay. · docs/components/Tooltip.md
95
95
  - Transient toast notification → **Notification** · `@jimka/typescript-ui/overlay` · A lightweight toast-style notification that appears in the bottom-right corner of the viewport and auto-dismisses after a configurable dura… · docs/components/Notification.md
96
96
  - Browse / re-open past notifications → **NotificationHistoryButton** · `@jimka/typescript-ui/overlay` · A trigger button that opens a menu of recent notifications. The menu lists the in-session Notification history in chronological order (late… · docs/components/NotificationHistoryButton.md
97
+ - Live runtime diagnostics window (FPS, heap, components, layout, listeners, CSS rules) → **DiagnosticsOverlay** · `@jimka/typescript-ui/diagnostics` · A floating window showing live runtime diagnostics: browser-level numbers (FPS, JS heap, DOM node count, long tasks) beside framework-inter… · docs/components/DiagnosticsOverlay.md
98
+ - Stylesheet duplicate-rule audit window (per-instance rule dedup by wasted bytes) → **StyleAuditOverlay** · `@jimka/typescript-ui/diagnostics` · A floating window showing the stylesheet-dedup audit — the same view embedded in the demo app's own "Style Audit" tab, opened alongside Dia… · docs/components/StyleAuditOverlay.md
97
99
 
98
100
  ### Data layer
99
101
  - In-memory record collection backing a table/list → **Store** · `@jimka/typescript-ui/data` · A general-purpose concrete store that pairs a Model with an optional Proxy. Use this class when you do not need a dedicated store subclass. · docs/data/store.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimka/typescript-ui",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "A web-based layout manager and UI component framework written in TypeScript.",
5
5
  "keywords": ["ui", "ui-components", "typescript", "layout", "layout-manager", "widgets", "framework", "dock", "data-table", "retained-mode"],
6
6
  "author": "Jimmy Karlsson",
@@ -45,6 +45,10 @@
45
45
  "import": "./dist/lib/router.es.js",
46
46
  "types": "./dist/lib/types/router/index.d.ts"
47
47
  },
48
+ "./diagnostics": {
49
+ "import": "./dist/lib/diagnostics.es.js",
50
+ "types": "./dist/lib/types/diagnostics/index.d.ts"
51
+ },
48
52
  "./component/input": {
49
53
  "import": "./dist/lib/component/input.es.js",
50
54
  "types": "./dist/lib/types/component/input/index.d.ts"
@@ -1,2 +0,0 @@
1
- import{t as e}from"./Component-B0ShfPVi.js";import{t}from"./ListenerBag-WPdKuuds.js";var AbstractInput=class extends e{_listeners=new t;constructor(e,t){super(e,t),this.applyListeners(e?.listeners)}isEnabled(){return this._options.enabled??!0}setEnabled(e){return this._options.enabled=!!e,this.applyEnabled(this._options.enabled),this}isReadOnly(){return this._options.readOnly??!1}setReadOnly(e){return this._options.readOnly=!!e,this.applyReadOnly(this._options.readOnly),this}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)}notifyChange(e){this.emit(`change`,e),this.emit(`binding`)}applyOptions(e){return super.applyOptions(e),e.enabled!==void 0&&(this._options.enabled=e.enabled),e.readOnly!==void 0&&(this._options.readOnly=e.readOnly),this}};export{AbstractInput as t};
2
- //# sourceMappingURL=AbstractInput-sRNPzWel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AbstractInput-sRNPzWel.js","names":[],"sources":["../../src/typescript/lib/component/input/AbstractInput.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { Component, ComponentOptions } from \"~/core/Component.js\";\nimport { Bindable } from \"~/core/Bindable.js\";\nimport { ListenerBag } from \"~/core/ListenerBag.js\";\n\n/**\n * String-literal union of the events emitted by every {@link AbstractInput}\n * subclass.\n *\n * @category Components\n */\nexport type AbstractInputEvent = \"change\" | \"binding\";\n\n/**\n * Construction-time options for {@link AbstractInput}. Extended by every\n * value-bearing input control so the `enabled` / `readOnly` flags share a\n * single options surface.\n *\n * @category Components\n */\nexport interface AbstractInputOptions extends ComponentOptions {\n enabled?: boolean;\n readOnly?: boolean;\n /**\n * Construction-time listener bag — the declarative form of `on()`. Each\n * entry is wired as if `on(event, fn)` had been called. Concrete subclasses\n * that expose `on(\"action\", …)` widen this with their own `action?` key.\n */\n listeners?: {\n change?: (value: any) => void;\n binding?: () => void;\n };\n}\n\n/**\n * Abstract base for every value-bearing input control in the framework.\n *\n * Owns the [`Bindable`](/api/core/interfaces/Bindable) value contract, the\n * change/binding listener bookkeeping, and the cached `_options.enabled` /\n * `_options.readOnly` state. Concrete subclasses own their value storage\n * and implement the `applyEnabled` / `applyReadOnly` hooks for their own\n * visual + ARIA wiring.\n *\n * Not wrapped with `callable()` — abstract classes are never instantiated;\n * the [ARCHITECTURE.md](/ARCHITECTURE.md) rule about callable-wrapping\n * applies only to concrete component subclasses.\n *\n * @category Components\n */\nabstract class AbstractInput<\n TValue,\n TOptions extends AbstractInputOptions = AbstractInputOptions\n>\n extends Component<TOptions>\n implements Bindable<TValue>\n{\n private _listeners: ListenerBag<AbstractInputEvent> = new ListenerBag<AbstractInputEvent>();\n\n /**\n * @param options - Caller-supplied options bag.\n * @param subclassDefaults - Per-subclass default bag layered over this\n * class's defaults; forwarded to `Component` so the cascade can merge\n * it before dispatching setters.\n */\n constructor(options?: TOptions, subclassDefaults?: Partial<TOptions>) {\n super(options, subclassDefaults);\n\n // Listener wiring runs here — NOT inside `applyOptions` — because\n // Component's constructor calls `applyOptions` from inside super(),\n // before the class-field `_listeners` initializer has run. Wiring\n // after super() guarantees `_listeners` exists. A subclass that adds\n // `action` to its bag is wired by this same call (it iterates every\n // key), so leaves must not call `applyListeners` again.\n this.applyListeners(options?.listeners);\n }\n\n /**\n * Returns the current value. Concrete subclasses define the storage —\n * `Checkbox` aliases `isSelected`, `Slider` reads `_options.value`,\n * picker fields keep a private `_value` outside the options bag.\n *\n * @returns The current value.\n */\n abstract getValue(): TValue;\n\n /**\n * Sets the current value. Concrete subclasses implement the storage\n * write, normalisation, and any listener-firing for user-driven\n * commits.\n *\n * @param value - The new value.\n *\n * @returns This component, for method chaining.\n */\n abstract setValue(value: TValue): this;\n\n /**\n * Returns whether the control is enabled.\n *\n * @returns `true` when enabled (defaults to `true` when unset).\n */\n isEnabled(): boolean {\n return this._options.enabled ?? true;\n }\n\n /**\n * Enables or disables the control. Dispatches `applyEnabled` so the\n * subclass can reflect the state in its visuals + ARIA tree.\n *\n * @param value - `true` to enable, `false` to disable.\n *\n * @returns This component, for method chaining.\n */\n setEnabled(value: boolean): this {\n this._options.enabled = !!value;\n this.applyEnabled(this._options.enabled);\n\n return this;\n }\n\n /**\n * Returns whether the control is read-only.\n *\n * @returns `true` when read-only (defaults to `false` when unset).\n */\n isReadOnly(): boolean {\n return this._options.readOnly ?? false;\n }\n\n /**\n * Marks the control as read-only. Dispatches `applyReadOnly` so the\n * subclass can reflect the state in its visuals + ARIA tree.\n *\n * @param value - `true` to mark read-only.\n *\n * @returns This component, for method chaining.\n */\n setReadOnly(value: boolean): this {\n this._options.readOnly = !!value;\n this.applyReadOnly(this._options.readOnly);\n\n return this;\n }\n\n /**\n * Registers a listener for one of this input's events.\n *\n * @param event - `\"change\"` fires on every committed value change with\n * the new value; `\"binding\"` fires on every user-driven change with\n * no arguments (consumed by [`Binding`](/api/core/classes/Binding)).\n * @param listener - The callback to invoke when the event fires.\n *\n * @returns This component, for method chaining.\n */\n on(event: \"change\", listener: (value: TValue) => void): this;\n on(event: \"binding\", listener: () => void): this;\n on(event: AbstractInputEvent, listener: Function): this {\n this._listeners.add(event, listener);\n\n return this;\n }\n\n /**\n * Removes a previously registered listener. The exact callback\n * reference must match.\n *\n * @param event - The event the listener was registered for.\n * @param listener - The callback to remove.\n *\n * @returns This component, for method chaining.\n */\n off(event: AbstractInputEvent, listener: Function): this {\n this._listeners.remove(event, listener);\n\n return this;\n }\n\n /**\n * Fires every registered listener for `event` with `payload`, in\n * registration order. Subclasses call this after committing a\n * user-driven value change.\n *\n * @param event - The event to emit.\n * @param payload - Forwarded to each listener.\n */\n protected emit(event: \"change\", value: TValue): void;\n protected emit(event: \"binding\"): void;\n protected emit(event: AbstractInputEvent, ...payload: unknown[]): void {\n this._listeners.fire(event, ...payload);\n }\n\n /**\n * Fires `\"change\"` listeners with `value` and `\"binding\"` listeners\n * with no arguments. Subclasses call this after committing a\n * user-driven value change.\n *\n * @param value - The newly committed value.\n */\n protected notifyChange(value: TValue): void {\n this.emit(\"change\", value);\n this.emit(\"binding\");\n }\n\n /**\n * Subclass hook: reflect the enabled state in visuals + ARIA. Called\n * from {@link setEnabled} after the cached state is updated.\n *\n * @param value - The new enabled state.\n */\n protected abstract applyEnabled(value: boolean): void;\n\n /**\n * Subclass hook: reflect the read-only state in visuals + ARIA. Called\n * from {@link setReadOnly} after the cached state is updated.\n *\n * @param value - The new read-only state.\n */\n protected abstract applyReadOnly(value: boolean): void;\n\n /**\n * Applies an {@link AbstractInputOptions} bag, caching the `enabled` /\n * `readOnly` flags on `_options`. The setters are intentionally NOT\n * dispatched here: subclasses build their children after `super()`\n * returns and dispatch `applyEnabled` / `applyReadOnly` themselves from\n * the constructor tail once those children exist (otherwise the abstract\n * `applyX` hooks would fire against half-built state).\n *\n * @param options - The options bag carrying the values to apply.\n *\n * @returns This component, for method chaining.\n */\n protected applyOptions(options: TOptions): this {\n super.applyOptions(options);\n\n if (options.enabled !== undefined) this._options.enabled = options.enabled;\n if (options.readOnly !== undefined) this._options.readOnly = options.readOnly;\n\n return this;\n }\n}\n\nexport { AbstractInput };\n"],"mappings":"qFAkDA,IAAe,cAAf,cAIY,CAEZ,CACI,WAAsD,IAAI,EAQ1D,YAAY,EAAoB,EAAsC,CAClE,MAAM,EAAS,CAAgB,EAQ/B,KAAK,eAAe,GAAS,SAAS,CAC1C,CA2BA,WAAqB,CACjB,OAAO,KAAK,SAAS,SAAW,EACpC,CAUA,WAAW,EAAsB,CAI7B,MAHA,MAAK,SAAS,QAAU,CAAC,CAAC,EAC1B,KAAK,aAAa,KAAK,SAAS,OAAO,EAEhC,IACX,CAOA,YAAsB,CAClB,OAAO,KAAK,SAAS,UAAY,EACrC,CAUA,YAAY,EAAsB,CAI9B,MAHA,MAAK,SAAS,SAAW,CAAC,CAAC,EAC3B,KAAK,cAAc,KAAK,SAAS,QAAQ,EAElC,IACX,CAcA,GAAG,EAA2B,EAA0B,CAGpD,OAFA,KAAK,WAAW,IAAI,EAAO,CAAQ,EAE5B,IACX,CAWA,IAAI,EAA2B,EAA0B,CAGrD,OAFA,KAAK,WAAW,OAAO,EAAO,CAAQ,EAE/B,IACX,CAYA,KAAe,EAA2B,GAAG,EAA0B,CACnE,KAAK,WAAW,KAAK,EAAO,GAAG,CAAO,CAC1C,CASA,aAAuB,EAAqB,CACxC,KAAK,KAAK,SAAU,CAAK,EACzB,KAAK,KAAK,SAAS,CACvB,CA8BA,aAAuB,EAAyB,CAM5C,OALA,MAAM,aAAa,CAAO,EAEtB,EAAQ,UAAa,IAAA,KAAW,KAAK,SAAS,QAAW,EAAQ,SACjE,EAAQ,WAAa,IAAA,KAAW,KAAK,SAAS,SAAW,EAAQ,UAE9D,IACX,CACJ"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./DOM-C-Edb3tA.js";import{t}from"./Position-BwtxouxK.js";import{h as n,t as r,v as i}from"./Component-B0ShfPVi.js";import{a,n as o}from"./Tooltip-CUOJOqQi.js";var s={visible:!1,animated:!0,durationMs:120,translatePx:4},AnimatedDropdown=class extends r{_dismissing=!1;_open=!1;_closeHandler=null;_anchorElement=null;_showAnimation=null;_hideAnimation=null;constructor(e,n){super(e,{...s,...n??{}}),this.setPosition(t.FIXED)}applyOptions(e){return super.applyOptions(e),this.setAnimated(e.animated??this.isAnimated()),this.setDurationMs(e.durationMs??this.getDurationMs()),this.setTranslatePx(e.translatePx??this.getTranslatePx()),this}setAnimated(e){return this._options.animated=e,this}isAnimated(){return this._options.animated??this._defaultOptions.animated}setDurationMs(e){return this._options.durationMs=e,this}getDurationMs(){return this._options.durationMs??this._defaultOptions.durationMs}setTranslatePx(e){return this._options.translatePx=e,this}getTranslatePx(){return this._options.translatePx??this._defaultOptions.translatePx}showAnimated(){a.register(this),this.setZIndex(a.getZIndex(this)),this._dismissing=!1,this._open=!0;let e=this.getElement(!0);return a.mount(e),this.setVisible(!0),this.isAnimated()?(this.setWillChange(`opacity, transform`),this._showAnimation?.cancel(),this._showAnimation=i.play(e,{from:{opacity:`0`,transform:`translateY(-${this.getTranslatePx()}px)`},to:{opacity:`1`,transform:`translateY(0)`},durationMs:this.getDurationMs(),properties:[`opacity`,`transform`],onComplete:()=>{this.setWillChange(null),this.onShowComplete()}}),this):(this.onShowComplete(),this)}hideAnimated(){this._open=!1;let e=this.getElement(),finalize=()=>{this.setVisible(!1),this.removeElement(),a.unregister(this),this.onHideComplete()};return!e||!this.isAnimated()?(finalize(),this):(this._dismissing=!0,this.setWillChange(`opacity, transform`),this._hideAnimation?.cancel(),this._hideAnimation=i.play(e,{to:{opacity:`0`,transform:`translateY(-${this.getTranslatePx()}px)`},durationMs:this.getDurationMs(),properties:[`opacity`,`transform`],onComplete:()=>{if(!this._dismissing){this.setWillChange(null);return}this._dismissing=!1,this.setWillChange(null),finalize()}}),this)}onZIndexChanged(e){this.setZIndex(e)}isOpen(){return this._open}handleKey(e){return!1}placeAnchored(t){let n={width:this.getWidth(),height:this.getHeight()},r=e.source.getViewportSize(),{x:i,y:a}=o(t,n,r,{axis:`vertical`});return this.setX(i),this.setY(a),this}onShowComplete(){}onHideComplete(){}destructor(){this._showAnimation?.cancel(),this._showAnimation=null,this._hideAnimation?.cancel(),this._hideAnimation=null,a.unregister(this),super.destructor()}getLayerElement(){return this.getElement()??null}getDismissMode(){return`click-outside`}requestClose(){if(this._closeHandler){this._closeHandler();return}this.hideAnimated()}getAnchorElement(){return this._anchorElement}getBand(){return a.Band.Dropdown}setCloseHandler(e){return this._closeHandler=e,this}setAnchorElement(e){return this._anchorElement=e,this}},c=n(AnimatedDropdown);export{c as t};
2
- //# sourceMappingURL=AnimatedDropdown-H3Rh-YMZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnimatedDropdown-H3Rh-YMZ.js","names":[],"sources":["../../src/typescript/lib/core/AnimatedDropdown.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { Component, ComponentOptions } from \"~/core/Component.js\";\nimport { Animation } from \"~/core/Animation.js\";\nimport { Position } from \"~/primitive/Position.js\";\nimport { LayerManager, DismissableLayer, LayerDismissMode } from \"~/core/LayerManager.js\";\nimport { positionAnchored } from \"~/core/OverlayPosition.js\";\nimport { DEFAULT_DURATION_MS, DEFAULT_TRANSLATE_PX } from \"~/core/OverlayFade.js\";\nimport { callable } from \"~/core/Callable.js\";\nimport { DOM, type Rect, type Handle } from \"~/core/DOM.js\";\n\n/**\n * Construction-time options for {@link AnimatedDropdown}.\n *\n * @category Core\n */\nexport interface AnimatedDropdownOptions extends ComponentOptions {\n /** When false, `showAnimated` / `hideAnimated` skip the transition. Default: true. */\n animated?: boolean;\n /** Fade duration in milliseconds. Default: 120. */\n durationMs?: number;\n /** Vertical translation distance in pixels for the entrance. Default: 4. */\n translatePx?: number;\n}\n\n/**\n * User-overridable visual defaults forwarded to `super` via the options bag.\n * These are a pure fallback: a caller value wins, otherwise the getters\n * (`isVisible`, `isAnimated`, `getDurationMs`, `getTranslatePx`) resolve the\n * default — `visible: false` is folded by `Component.isVisible`, the rest are\n * dispatched from `applyOptions` as `options.X ?? this.getX()`.\n */\nconst _defaultAnimatedDropdownOptions: Partial<AnimatedDropdownOptions> = {\n visible: false,\n animated: true,\n durationMs: DEFAULT_DURATION_MS,\n translatePx: DEFAULT_TRANSLATE_PX,\n};\n\n/**\n * Floating panel that fades in on `showAnimated` and fades out + detaches on\n * `hideAnimated`. Subclasses (e.g. picker dropdowns for `ComboBox`, `DateField`,\n * `TimeField`, `DateTimeField`) own the panel's interactive content; this base\n * class owns only the open/close lifecycle, the `opacity + translateY`\n * transition, the dismissing-flag re-entrancy guard, and the `will-change`\n * pre-promotion.\n *\n * Positioning math (anchor rect, viewport clamping, flip-above-anchor) lives\n * in the host component or in a subclass — `AnimatedDropdown` does not\n * presume anything about where it should appear.\n *\n * ## Pointer-down contract for hosts mounted under a re-used input element\n *\n * Hosts that compose this dropdown alongside a focusable element whose `blur`\n * commits state (e.g. [`CellEditorPool`](/api/component/table/classes/CellEditorPool)'s pooled editors) must call\n * `event.preventDefault()` on **`pointerdown`** inside the dropdown so the\n * host element keeps focus while the dropdown's selection callback runs. The\n * callback then explicitly drives commit. If the dropdown does not suppress\n * the blur, the editor's blur listener fires first, commits the stale value,\n * and the dropdown's later write goes to a no-longer-active editor.\n *\n * @category Core\n */\nclass AnimatedDropdown<TOptions extends AnimatedDropdownOptions = AnimatedDropdownOptions> extends Component<TOptions> implements DismissableLayer {\n\n // Set true while a fade-out is in flight; reset to false either when the\n // fade completes (so the deferred detach runs) or when a fresh `showAnimated`\n // re-displays the dropdown mid-fade (the deferred detach skips because the\n // dropdown is back on screen).\n private _dismissing: boolean = false;\n private _open: boolean = false;\n\n // Host-supplied close thunk invoked from `requestClose` instead of the\n // bare `hideAnimated`, so the host (a picker field, a ComboBox) can run\n // its own teardown (caret rotation, aria-expanded, commit) when the\n // manager dismisses the layer on an outside click. Null until a host\n // opts into the `\"click-outside\"` dismiss path.\n private _closeHandler: (() => void) | null = null;\n\n // Anchor element (the trigger) excluded from the manager's outside-click\n // test so the click that toggles the dropdown does not immediately\n // re-close it. Null for dropdowns whose host owns the toggle gating.\n private _anchorElement: Handle | null = null;\n\n // In-flight entrance / exit fades, cancelled on teardown so their fallback\n // timers cannot fire against this dropdown's released element handle.\n private _showAnimation: Animation.CancelHandle | null = null;\n private _hideAnimation: Animation.CancelHandle | null = null;\n\n /**\n * @param options - Optional construction-time options.\n * @param subclassDefaults - Per-subclass default bag layered over this\n * class's defaults. Subclasses-of-subclasses forward their own defaults\n * here so the deepest class's values win.\n */\n constructor(options?: AnimatedDropdownOptions, subclassDefaults?: Partial<AnimatedDropdownOptions>) {\n super(\n options as TOptions,\n { ..._defaultAnimatedDropdownOptions, ...(subclassDefaults ?? {}) } as Partial<TOptions>,\n );\n\n // Floating overlays anchor to the viewport, not to a layout-managed\n // ancestor — `Position.FIXED` is the documented exception to the\n // framework's \"every component is absolute\" rule. See\n // ARCHITECTURE.md §Positioning.\n this.setPosition(Position.FIXED);\n }\n\n /**\n * Applies an {@link AnimatedDropdownOptions} bag, dispatching dropdown-specific\n * fields after inherited Component fields.\n *\n * @param options - The options bag carrying the values to apply.\n */\n protected applyOptions(options: TOptions): this {\n super.applyOptions(options);\n\n // These carry a class default and seed construction-time state, so\n // always dispatch the caller value or the class default.\n this.setAnimated(options.animated ?? this.isAnimated());\n this.setDurationMs(options.durationMs ?? this.getDurationMs());\n this.setTranslatePx(options.translatePx ?? this.getTranslatePx());\n\n return this;\n }\n\n /**\n * Enables or disables the fade transition. When false, `showAnimated` /\n * `hideAnimated` apply visibility synchronously.\n *\n * @param value - true to enable the fade; false for instant show/hide.\n */\n setAnimated(value: boolean): this {\n this._options.animated = value;\n\n return this;\n }\n\n /**\n * Returns whether the fade transition is enabled.\n *\n * @returns true when the fade transition runs on show/hide.\n */\n isAnimated(): boolean {\n return this._options.animated ?? this._defaultOptions.animated!;\n }\n\n /**\n * Sets the fade duration in milliseconds.\n *\n * @param ms - Duration in milliseconds.\n */\n setDurationMs(ms: number): this {\n this._options.durationMs = ms;\n\n return this;\n }\n\n /**\n * Returns the configured fade duration in milliseconds.\n *\n * @returns The duration in milliseconds.\n */\n getDurationMs(): number {\n return this._options.durationMs ?? this._defaultOptions.durationMs!;\n }\n\n /**\n * Sets the entrance vertical-offset distance in pixels.\n *\n * @param px - Translation distance in pixels.\n */\n setTranslatePx(px: number): this {\n this._options.translatePx = px;\n\n return this;\n }\n\n /**\n * Returns the configured entrance vertical-offset distance.\n *\n * @returns The translation distance in pixels.\n */\n getTranslatePx(): number {\n return this._options.translatePx ?? this._defaultOptions.translatePx!;\n }\n\n /**\n * Mounts the dropdown on `document.documentElement` (if not already mounted)\n * and plays the entrance fade. Cancels any in-flight fade-out so a fresh\n * show mid-dismiss keeps the panel on screen.\n */\n showAnimated(): this {\n // Register on the central layer tree. `LayerManager.register` is a\n // no-op when this layer is already registered (a `_dismissing`-\n // cancelled mid-fade re-show), so the tree never double-pushes.\n LayerManager.register(this);\n\n // Mirror the manager's band-based z-stamp onto the element so the\n // dropdown lands above its opener (which registered earlier).\n this.setZIndex(LayerManager.getZIndex(this));\n\n this._dismissing = false;\n this._open = true;\n\n const el = this.getElement(true)!;\n\n LayerManager.mount(el);\n\n this.setVisible(true);\n\n if (!this.isAnimated()) {\n this.onShowComplete();\n return this;\n }\n\n this.setWillChange(\"opacity, transform\");\n\n this._showAnimation?.cancel();\n this._showAnimation = Animation.play(el, {\n from: { opacity: \"0\", transform: `translateY(-${this.getTranslatePx()}px)` },\n to: { opacity: \"1\", transform: \"translateY(0)\" },\n durationMs: this.getDurationMs(),\n properties: [\"opacity\", \"transform\"],\n onComplete: () => {\n this.setWillChange(null);\n this.onShowComplete();\n },\n });\n\n return this;\n }\n\n /**\n * Plays the exit fade, then hides and detaches the dropdown when the\n * transition completes. A fresh `showAnimated` during the fade cancels the\n * deferred detach by flipping the `_dismissing` flag, so the panel stays\n * mounted.\n */\n hideAnimated(): this {\n this._open = false;\n\n const el = this.getElement();\n const finalize = (): void => {\n this.setVisible(false);\n this.removeElement();\n\n // Pop from the central layer tree. `onHideComplete` runs after\n // this so a subclass override sees the layer as already-closed.\n LayerManager.unregister(this);\n\n this.onHideComplete();\n };\n\n if (!el || !this.isAnimated()) {\n finalize();\n return this;\n }\n\n this._dismissing = true;\n this.setWillChange(\"opacity, transform\");\n\n this._hideAnimation?.cancel();\n this._hideAnimation = Animation.play(el, {\n to: { opacity: \"0\", transform: `translateY(-${this.getTranslatePx()}px)` },\n durationMs: this.getDurationMs(),\n properties: [\"opacity\", \"transform\"],\n onComplete: () => {\n if (!this._dismissing) {\n this.setWillChange(null);\n return;\n }\n this._dismissing = false;\n this.setWillChange(null);\n finalize();\n },\n });\n\n return this;\n }\n\n /**\n * Mirrors a manager-allocated z-index onto the element when the dropdown —\n * or the window / surface it was opened inside — is raised via\n * {@link LayerManager.bringToFront}. Without this, the dropdown reads its\n * z once in {@link showAnimated} and never updates; raising its host window\n * (a `mousedown` brings the window to front) would then re-stamp the host\n * above the dropdown's stale z, hiding the open panel — and its fade-out —\n * behind the window.\n *\n * @param zIndex - The fresh z-index assigned by the manager.\n */\n onZIndexChanged(zIndex: number): void {\n this.setZIndex(zIndex);\n }\n\n /**\n * Returns whether the dropdown is currently open (showing or fading in).\n *\n * @returns true when the dropdown is open.\n */\n isOpen(): boolean {\n return this._open;\n }\n\n /**\n * Subclass hook: handle a keystroke arriving via the host input's `keydown`\n * listener while the dropdown is open. Subclasses with a navigation surface\n * (e.g. [`DatePickerDropdown`](/api/component/input/classes/DatePickerDropdown))\n * override to consume arrows / Page / Home / End / type-ahead. The base\n * implementation returns `false` so plain dropdowns without keyboard\n * semantics let the host input's contract run.\n *\n * @param _e - The keyboard event forwarded from the host input.\n * @returns True when the dropdown consumed the keystroke (caller should `preventDefault`).\n */\n handleKey(_e: KeyboardEvent): boolean {\n return false;\n }\n\n /**\n * Places the dropdown relative to an anchor rect at its current\n * width/height. Picks the better of \"below\" or \"above\" the anchor\n * vertically (more available space wins when neither side fully fits).\n * Horizontally the panel left-aligns to the anchor, flipping to\n * right-align with the anchor's right edge when the left alignment\n * would overflow the viewport, and clamping only when neither alignment\n * fits.\n *\n * Callers set `setWidth`/`setHeight` first, then invoke this helper.\n *\n * @param rect - The anchor element's bounding rect (typically from\n * `DOM.source.getElementRect(anchorEl)`).\n */\n placeAnchored(rect: Rect): this {\n const size = { width: this.getWidth(), height: this.getHeight() };\n const vp = DOM.source.getViewportSize();\n\n // Vertical growth: prefer below, flip above when below overflows and\n // above has room. Horizontally: align to the anchor's left, flip to\n // its right when that overflows, clamp only as a last resort. The\n // flip/align/clamp geometry lives in the shared pure primitive.\n const { x, y } = positionAnchored(rect, size, vp, { axis: \"vertical\" });\n\n this.setX(x);\n this.setY(y);\n\n return this;\n }\n\n /**\n * Hook invoked after the entrance fade completes (or immediately when\n * animation is disabled). Override to wire post-show state.\n */\n protected onShowComplete(): void {\n // default: no-op\n }\n\n /**\n * Hook invoked after the exit fade completes (or immediately when\n * animation is disabled). Override to wire post-hide cleanup.\n */\n protected onHideComplete(): void {\n // default: no-op\n }\n\n /**\n * Cancels any in-flight entrance / exit fade, then defers to the base\n * class. Cancelling first keeps the fade's fallback timer from firing after\n * `super.destructor()` has released this dropdown's element handle.\n */\n protected destructor(): void {\n this._showAnimation?.cancel();\n this._showAnimation = null;\n this._hideAnimation?.cancel();\n this._hideAnimation = null;\n\n // `hideAnimated`'s completion callback is the only place the dropdown\n // leaves the layer tree, and cancelling above suppressed it. A layer\n // left registered is walked on the next document pointerdown, where the\n // containment test resolves the element handle released below — the\n // very use-after-free this cancellation exists to prevent. Idempotent,\n // so the already-unregistered cases cost nothing.\n LayerManager.unregister(this);\n\n super.destructor();\n }\n\n // ----- DismissableLayer -----\n\n /**\n * Returns the dropdown's root element for the central layer tree.\n *\n * @returns The dropdown's element, or null when not yet rendered.\n */\n getLayerElement(): Handle | null {\n return this.getElement() ?? null;\n }\n\n /**\n * Returns the dismiss mode the document-level handlers consult. The\n * dropdown is `\"click-outside\"`: the manager closes it when a\n * `pointerdown` lands outside both the dropdown's layer subtree and its\n * anchor. A click inside a descendant layer counts as inside, so a nested\n * dropdown keeps its opener open.\n *\n * @returns The layer dismiss mode.\n */\n getDismissMode(): LayerDismissMode {\n return \"click-outside\";\n }\n\n /**\n * Advisory close request from the manager. Runs the host-supplied close\n * thunk when one is set (so the host can rotate a caret, clear\n * aria-expanded, or commit), otherwise the standard exit fade + detach.\n */\n requestClose(): void {\n if (this._closeHandler) {\n this._closeHandler();\n\n return;\n }\n\n this.hideAnimated();\n }\n\n /**\n * Returns the anchor element excluded from the manager's outside-click\n * test, or null when the host gates the toggle itself.\n *\n * @returns The anchor element, or null.\n */\n getAnchorElement(): Handle | null {\n return this._anchorElement;\n }\n\n /**\n * Returns the dropdown's z-index band so an unrelated top-level dropdown\n * stacks in the dropdown family.\n *\n * @returns The dropdown band base.\n */\n getBand(): number {\n return LayerManager.Band.Dropdown;\n }\n\n /**\n * Installs the close thunk the manager calls from {@link requestClose}\n * when this dropdown is dismissed by an outside click. The host passes its\n * own close routine so the dropdown's teardown and the host's UI state\n * (caret, aria-expanded, commit) stay in lockstep.\n *\n * @param handler - The host's close routine, or null to fall back to\n * {@link hideAnimated}.\n * @returns This dropdown, for method chaining.\n */\n setCloseHandler(handler: (() => void) | null): this {\n this._closeHandler = handler;\n\n return this;\n }\n\n /**\n * Records the anchor (trigger) element excluded from the manager's\n * outside-click test, so the gesture that opened the dropdown does not\n * immediately re-close it.\n *\n * @param el - The anchor element, or null to clear it.\n * @returns This dropdown, for method chaining.\n */\n setAnchorElement(el: Handle | null): this {\n this._anchorElement = el;\n\n return this;\n }\n\n}\n\nconst AnimatedDropdownCallable = callable(AnimatedDropdown);\ntype AnimatedDropdownCallable<TOptions extends AnimatedDropdownOptions = AnimatedDropdownOptions> = AnimatedDropdown<TOptions>;\nexport {\n AnimatedDropdown as _AnimatedDropdown,\n AnimatedDropdownCallable as AnimatedDropdown\n};\n"],"mappings":"kLAgCA,IAAM,EAAoE,CACtE,QAAa,GACb,SAAa,GACb,WAAA,IACA,YAAA,CACJ,EA0BM,iBAAN,cAAmG,CAAgD,CAM/I,YAAgC,GAChC,MAAgC,GAOhC,cAA6C,KAK7C,eAAwC,KAIxC,eAAwD,KACxD,eAAwD,KAQxD,YAAY,EAAmC,EAAqD,CAChG,MACI,EACA,CAAE,GAAG,EAAiC,GAAI,GAAoB,CAAC,CAAG,CACtE,EAMA,KAAK,YAAY,EAAS,KAAK,CACnC,CAQA,aAAuB,EAAyB,CAS5C,OARA,MAAM,aAAa,CAAO,EAI1B,KAAK,YAAY,EAAQ,UAAY,KAAK,WAAW,CAAC,EACtD,KAAK,cAAc,EAAQ,YAAc,KAAK,cAAc,CAAC,EAC7D,KAAK,eAAe,EAAQ,aAAe,KAAK,eAAe,CAAC,EAEzD,IACX,CAQA,YAAY,EAAsB,CAG9B,MAFA,MAAK,SAAS,SAAW,EAElB,IACX,CAOA,YAAsB,CAClB,OAAO,KAAK,SAAS,UAAY,KAAK,gBAAgB,QAC1D,CAOA,cAAc,EAAkB,CAG5B,MAFA,MAAK,SAAS,WAAa,EAEpB,IACX,CAOA,eAAwB,CACpB,OAAO,KAAK,SAAS,YAAc,KAAK,gBAAgB,UAC5D,CAOA,eAAe,EAAkB,CAG7B,MAFA,MAAK,SAAS,YAAc,EAErB,IACX,CAOA,gBAAyB,CACrB,OAAO,KAAK,SAAS,aAAe,KAAK,gBAAgB,WAC7D,CAOA,cAAqB,CAIjB,EAAa,SAAS,IAAI,EAI1B,KAAK,UAAU,EAAa,UAAU,IAAI,CAAC,EAE3C,KAAK,YAAc,GACnB,KAAK,MAAc,GAEnB,IAAM,EAAK,KAAK,WAAW,EAAI,EAyB/B,OAvBA,EAAa,MAAM,CAAE,EAErB,KAAK,WAAW,EAAI,EAEf,KAAK,WAAW,GAKrB,KAAK,cAAc,oBAAoB,EAEvC,KAAK,gBAAgB,OAAO,EAC5B,KAAK,eAAiB,EAAU,KAAK,EAAI,CACrC,KAAY,CAAE,QAAS,IAAK,UAAW,eAAe,KAAK,eAAe,EAAE,IAAK,EACjF,GAAY,CAAE,QAAS,IAAK,UAAW,eAAgB,EACvD,WAAY,KAAK,cAAc,EAC/B,WAAY,CAAC,UAAW,WAAW,EACnC,eAAkB,CACd,KAAK,cAAc,IAAI,EACvB,KAAK,eAAe,CACxB,CACJ,CAAC,EAEM,OAlBH,KAAK,eAAe,EACb,KAkBf,CAQA,cAAqB,CACjB,KAAK,MAAQ,GAEb,IAAM,EAAK,KAAK,WAAW,EACrB,aAAuB,CACzB,KAAK,WAAW,EAAK,EACrB,KAAK,cAAc,EAInB,EAAa,WAAW,IAAI,EAE5B,KAAK,eAAe,CACxB,EA0BA,MAxBI,CAAC,GAAM,CAAC,KAAK,WAAW,GACxB,SAAS,EACF,OAGX,KAAK,YAAc,GACnB,KAAK,cAAc,oBAAoB,EAEvC,KAAK,gBAAgB,OAAO,EAC5B,KAAK,eAAiB,EAAU,KAAK,EAAI,CACrC,GAAY,CAAE,QAAS,IAAK,UAAW,eAAe,KAAK,eAAe,EAAE,IAAK,EACjF,WAAY,KAAK,cAAc,EAC/B,WAAY,CAAC,UAAW,WAAW,EACnC,eAAkB,CACd,GAAI,CAAC,KAAK,YAAa,CACnB,KAAK,cAAc,IAAI,EACvB,MACJ,CACA,KAAK,YAAc,GACnB,KAAK,cAAc,IAAI,EACvB,SAAS,CACb,CACJ,CAAC,EAEM,KACX,CAaA,gBAAgB,EAAsB,CAClC,KAAK,UAAU,CAAM,CACzB,CAOA,QAAkB,CACd,OAAO,KAAK,KAChB,CAaA,UAAU,EAA4B,CAClC,MAAO,EACX,CAgBA,cAAc,EAAkB,CAC5B,IAAM,EAAO,CAAE,MAAO,KAAK,SAAS,EAAG,OAAQ,KAAK,UAAU,CAAE,EAC1D,EAAO,EAAI,OAAO,gBAAgB,EAMlC,CAAE,IAAG,KAAM,EAAiB,EAAM,EAAM,EAAI,CAAE,KAAM,UAAW,CAAC,EAKtE,OAHA,KAAK,KAAK,CAAC,EACX,KAAK,KAAK,CAAC,EAEJ,IACX,CAMA,gBAAiC,CAEjC,CAMA,gBAAiC,CAEjC,CAOA,YAA6B,CACzB,KAAK,gBAAgB,OAAO,EAC5B,KAAK,eAAiB,KACtB,KAAK,gBAAgB,OAAO,EAC5B,KAAK,eAAiB,KAQtB,EAAa,WAAW,IAAI,EAE5B,MAAM,WAAW,CACrB,CASA,iBAAiC,CAC7B,OAAO,KAAK,WAAW,GAAK,IAChC,CAWA,gBAAmC,CAC/B,MAAO,eACX,CAOA,cAAqB,CACjB,GAAI,KAAK,cAAe,CACpB,KAAK,cAAc,EAEnB,MACJ,CAEA,KAAK,aAAa,CACtB,CAQA,kBAAkC,CAC9B,OAAO,KAAK,cAChB,CAQA,SAAkB,CACd,OAAO,EAAa,KAAK,QAC7B,CAYA,gBAAgB,EAAoC,CAGhD,MAFA,MAAK,cAAgB,EAEd,IACX,CAUA,iBAAiB,EAAyB,CAGtC,MAFA,MAAK,eAAiB,EAEf,IACX,CAEJ,EAEM,EAA2B,EAAS,gBAAgB"}
@@ -1,2 +0,0 @@
1
- import{t as e}from"./DOM-C-Edb3tA.js";import{a as t,s as n}from"./Position-BwtxouxK.js";import{S as r,b as i,f as a,h as o,m as s,t as c,v as l}from"./Component-B0ShfPVi.js";import{t as u}from"./ListenerBag-WPdKuuds.js";import{i as d,r as f}from"./Scrollbar-t8fFrUVQ.js";import{t as p}from"./Tooltip-CUOJOqQi.js";import{t as m}from"./Placement-7kqdaK4Z.js";import{t as h}from"./LayoutConstraints-LIHYYd2F.js";var g=200,_=`cubic-bezier(0.4, 0, 0.6, 1)`,v={cancel:()=>{}};function track(e,t){let n=null,r=!1,prune=()=>{r=!0;let t=n===null?-1:e.indexOf(n);t>=0&&e.splice(t,1)},{handle:i,cleanup:a}=t(prune);r||(n={cancel:()=>i.cancel(),settle:()=>{i.cancel(),a()}},e.push(n))}function primeCollapse(e,t,n,r,i){let cleanup=()=>{for(let e of n)e.setTransition(null);e.setWillChange(null)};if(l.isReducedMotion())return r(),{handle:v,cleanup};let a=t.map(e=>`${e} ${g}ms ${_}`).join(`, `);for(let e of n)e.setTransition(a);return e.setWillChange(t.join(`, `)),{handle:l.afterTransition({component:e,property:i??t[0],durationMs:g,fallbackBufferMs:40,onComplete:()=>{cleanup(),r()}}),cleanup}}function captureRect(e){return{x:e.getX(),y:e.getY(),width:e.getWidth(),height:e.getHeight()}}function parseCubicBezier(e){let t=e.match(/cubic-bezier\(([^)]+)\)/);if(!t)return e=>e;let[n,r,i,a]=t[1].split(`,`).map(e=>parseFloat(e)),o=3*n,s=3*(i-n)-o,c=1-o-s,l=3*r,u=3*(a-r)-l,d=1-l-u,sampleX=e=>((c*e+s)*e+o)*e,sampleY=e=>((d*e+u)*e+l)*e,sampleDX=e=>(3*c*e+2*s)*e+o;return e=>{let t=e;for(let n=0;n<8;n+=1){let n=sampleX(t)-e;if(Math.abs(n)<1e-6)return sampleY(t);let r=sampleDX(t);if(Math.abs(r)<1e-6)break;t-=n/r}let n=0,r=1;for(t=e;n<r;){let i=sampleX(t);if(Math.abs(i-e)<1e-6)break;i<e?n=t:r=t,t=(n+r)/2}return sampleY(t)}}var y=parseCubicBezier(_),lerp=(e,t,n)=>e+(t-e)*n,lerpRect=(e,t,n)=>({x:lerp(e.x,t.x,n),y:lerp(e.y,t.y,n),width:lerp(e.width,t.width,n),height:lerp(e.height,t.height,n)});function commitRect(e,t,n){e.setAutoCommitStyle(!1),e.setX(t.x),e.setY(t.y),e.setWidth(t.width),e.setHeight(t.height),n&&e.doLayout(),e.setAutoCommitStyle(!0)}function animateLayout(t,n){if(l.isReducedMotion()){for(let e of t)commitRect(e.component,e.end,e.relayout);return n?.(),()=>{}}let r=!1,i=0;for(let e of t)commitRect(e.component,e.start,e.relayout);let a=performance.now(),frame=o=>{if(r)return;let s=Math.min(1,(o-a)/g),c=y(s);for(let e of t)commitRect(e.component,s>=1?e.end:lerpRect(e.start,e.end,c),e.relayout);s<1?i=e.sink.requestAnimationFrame(frame):n?.()};return i=e.sink.requestAnimationFrame(frame),()=>{r=!0,i&&e.sink.cancelAnimationFrame(i)}}function runCollapse(e,t,n,r,i,a){r?.(),track(i,e=>primeCollapse(t,[`clip-path`],[t],e,`clip-path`));let o=n.filter(e=>!e.relayout).map(e=>e.component);o.length>0&&track(i,e=>primeCollapse(o[0],[`background-color`],o,e,`background-color`));let s=n.map(e=>captureRect(e.component));return e.doLayout(),animateLayout(n.map((e,t)=>({component:e.component,relayout:e.relayout,start:s[t],end:captureRect(e.component)})),a)}var b=10,x=40,S={east:0,south:90,west:180,north:-90},C=null;function ensureCollapseButtonClassRule(){C||=new i({scope:`class`,name:`CollapseButton`,styles:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,boxSizing:`border-box`,width:`${b}px`,height:`${x}px`,borderRadius:`2px`,background:`var(--ts-ui-button-bg, #e8e8e8)`,border:`1px solid var(--ts-ui-button-border, #c8c8c8)`,boxShadow:`var(--ts-ui-button-shadow, 0 1px 2px rgba(0, 0, 0, 0.2))`,textAlign:`center`,fontSize:`9px`,lineHeight:`38px`,color:`var(--ts-ui-collapse-button-color, rgb(100,100,100))`,pointerEvents:`auto`,userSelect:`none`}})}var CollapseButton=class extends c{_trigger=`dblclick`;_listeners=new u;constructor(e){ensureCollapseButtonClassRule(),super({tag:`span`,cursor:`pointer`,...e??{}}),this._direction??=`east`,this._trigger=e?.trigger??`dblclick`,this.applyRotation(),this.applyListeners(e?.listeners),r.addListener(this,this._trigger===`click`?`click`:`dblclick`,this.onActivate),r.addListener(this,`mousedown`,{button:`any`,handler:this.onMouseDown}),r.addListener(this,`contextmenu`,this.onContextMenu)}applyOptions(e){return super.applyOptions(e),e.direction!==void 0&&this.setDirection(e.direction),this}render(){let t=super.render();return e.sink.apply(t,{text:`▶`}),t}applyRotation(){let e=S[this._direction];this.createStyleRule(``).set(`transform`,`translate(-50%, -50%) rotate(${e}deg)`)}setStripMode(e){return this.createStyleRule(``).set(`width`,`${e?18:b}px`),this}getDirection(){return this._direction}getTrigger(){return this._trigger}setDirection(e){return this._direction=e,this.applyRotation(),this}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)}onActivate(e){return this.emit(`collapse`),!0}onMouseDown(e){return!0}onContextMenu(e){return this.emit(`contextmenu`,e.clientX,e.clientY),{stop:!0,prevent:!0}}},w=o(CollapseButton),T={west:`east`,east:`west`,north:`south`,south:`north`},E={orientation:`horizontal`,collapsible:!0,movable:!0},SplitGutter=class extends c{_opaque=!1;_collapseDirection=`west`;_collapseTrigger=`dblclick`;_expandedBackground=`var(--ts-ui-gutter-bg, #AAAAAA)`;_tooltipText=``;_listeners=new u;constructor(e,t,n){super(t,{...E,...n??{}}),e&&t?.orientation===void 0&&(this._direction=e),this._expandedBackground=t?.expandedBackground??`var(--ts-ui-gutter-bg, #AAAAAA)`,this.setBackgroundColor(this._expandedBackground),this._collapseDirection=t?.collapseDirection??(this._direction===`horizontal`?`west`:`north`),this._collapseTrigger=t?.collapseTrigger??`dblclick`,this._collapseButton=new w({direction:this._collapseDirection,trigger:this._collapseTrigger,listeners:{collapse:()=>this.emit(`collapse`),contextmenu:(e,t)=>this.emit(`contextmenu`,e,t)}}),this._collapseButton.setVisible(this._collapsible),t?.opaque&&this.setOpaque(!0),this._movable||this.setPointerEvents(`none`),r.addListener(this,`mousedown`,this.onDragStart),this.applyListeners(t?.listeners),this.updateTooltip()}init(t){super.init(t);let n=t||this.getElement();return n&&e.sink.appendChild(n,this._collapseButton.getElement(!0)),this}isCollapsible(){return this._collapsible??this._defaultOptions.collapsible}setCollapsible(e){return this._collapsible=e,this._collapseButton?.setVisible(e),this._collapseButton&&this.updateTooltip(),this}applyOptions(e){return super.applyOptions(e),this.setDirection(e.orientation??this.getDirection()),this.setCollapsible(e.collapsible??this.isCollapsible()),this.setMovable(e.movable??this.isMovable()),this}isMovable(){return this._movable??this._defaultOptions.movable}setMovable(e){return this._movable=e,this.applyCursor(),this}isOpaque(){return this._opaque}setOpaque(e){return this._opaque=e,e?(this.setBackgroundColor(`var(--ts-ui-button-bg, #e8e8e8)`),this.setBackgroundImage(`var(--ts-ui-button-bg, linear-gradient(rgb(241, 241, 241), rgb(200, 200, 200)))`),this.setBorder(`1px solid var(--ts-ui-button-border, #c8c8c8)`),this._collapseButton?.setDirection(T[this._collapseDirection])):(this.clearBackgroundImage(),this.clearBorder(),this.setBackgroundColor(this._expandedBackground),this._collapseButton?.setDirection(this._collapseDirection)),this._collapseButton?.setStripMode(e),this.applyCursor(),this.updateTooltip(),this}getCollapseDirection(){return this._collapseDirection}setCollapseDirection(e){return this._collapseDirection=e,this._collapseButton?.setDirection(this._opaque?T[e]:e),this.updateTooltip(),this}updateTooltip(){if(!this._collapsible){this._tooltipText!==``&&(p.detach(this),this._collapseButton&&p.detach(this._collapseButton),this._tooltipText=``);return}let e=`${this._collapseTrigger===`click`?`Click`:`Double-click`} to ${this._opaque?`expand`:`collapse`} ${this._opaque?T[this._collapseDirection]:this._collapseDirection}ward`;e!==this._tooltipText&&(this._tooltipText=e,p.attach(this,e),this._collapseButton&&p.attach(this._collapseButton,e))}getDirection(){return this._direction??this._defaultOptions.orientation}setDirection(e){return e||=`horizontal`,this._direction=e,this}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)}destructor(){this._collapseButton?.dispose(),super.destructor()}_dispatchDrag(e){this.emit(`drag`,e)}onDragStart(e){if(!this._movable||this._opaque||!r.isPrimaryButton(e))return;let t=this._direction===`horizontal`?e.clientX:e.clientY;this.emit(`dragstart`,t),r.addViewportListener(this,`mouseup`,this.onDragStop),r.addViewportListener(this,`touchend`,this.onDragStop),r.addViewportListener(this,`touchcancel`,this.onDragStop),r.addViewportListener(this,`mousemove`,this.onDrag),r.addViewportListener(this,`touchmove`,this.onDrag),f(this.dragCursor())}onDragStop(){return r.removeViewportListener(this,`mouseup`,this.onDragStop),r.removeViewportListener(this,`touchend`,this.onDragStop),r.removeViewportListener(this,`touchcancel`,this.onDragStop),r.removeViewportListener(this,`mousemove`,this.onDrag),r.removeViewportListener(this,`touchmove`,this.onDrag),d(),this.emit(`dragend`),!0}onDrag(e){let t;return t=this._direction===`horizontal`?e.clientX:e.clientY,this._dispatchDrag(t),!0}dragCursor(){return this._direction==`horizontal`?`ew-resize`:`ns-resize`}applyCursor(){this._movable&&!this._opaque?this.setCursor(this.dragCursor()):this.setCursor(`default`)}render(){let e=super.render();return this.applyCursor(),e}},D=o(SplitGutter),O=4,k={[m.NORTH]:`north`,[m.SOUTH]:`south`,[m.WEST]:`west`,[m.EAST]:`east`},Border=class extends a{_northComponent=null;_southComponent=null;_westComponent=null;_eastComponent=null;_centerComponent=null;_spacing=5;_collapsed=new Map;_collapsible=new Map;_gutters=new Map;_collapseAnimation=null;_pendingCollapseTransitions=[];_collapsing=!1;constructor(e){super(),e&&this.applyOptions(e)}applyOptions(e){super.applyOptions(e),e.spacing!==void 0&&this.setComponentSpacing(e.spacing)}setLayoutConstraints(e,t){switch(t||(t=new h,t.placement=m.CENTER),t.placement||(t.placement=m.CENTER),t.placement){case m.NORTH:this._northComponent=e;break;case m.SOUTH:this._southComponent=e;break;case m.WEST:this._westComponent=e;break;case m.EAST:this._eastComponent=e;break;case m.CENTER:this._centerComponent=e}return t.placement===m.CENTER?this._collapsible.set(m.CENTER,!1):this._collapsible.set(t.placement,t.collapsible??!1),super.setLayoutConstraints(e,t)}delLayoutConstraints(e){return this._northComponent===e?this._northComponent=null:this._southComponent===e?this._southComponent=null:this._westComponent===e?this._westComponent=null:this._eastComponent===e?this._eastComponent=null:this._centerComponent===e&&(this._centerComponent=null),super.delLayoutConstraints(e)}getComponentSpacing(){return this._spacing}setComponentSpacing(e){return this._spacing=e,this}getRegionComponent(e){switch(e){case m.NORTH:return this._northComponent;case m.SOUTH:return this._southComponent;case m.WEST:return this._westComponent;case m.EAST:return this._eastComponent;case m.CENTER:return this._centerComponent}}isRegionCollapsed(e){return this._collapsed.get(e)??!1}setRegionCollapsed(e,t){if(e===m.CENTER||!this.isRegionCollapsible(e))return this;let n=this.getRegionComponent(e);if(!n||(this._collapsed.get(e)??!1)===t)return this;let r=this.getContainer();if(!r)return this;let i=this._collapsing;this._collapsing=!0,i||r.doLayout(),this._collapsed.set(e,t),this.ensureGutter(e);let a=[...[this._northComponent,this._southComponent,this._westComponent,this._eastComponent,this._centerComponent].filter(e=>e!=null).map(e=>({component:e,relayout:!0})),...[...this._gutters.values()].map(e=>({component:e,relayout:!1}))];return this._collapseAnimation=runCollapse(r,n,a,this._collapseAnimation,this._pendingCollapseTransitions,()=>{this._collapseAnimation=null,this._collapsing=!1,r.doLayout()}),this}isRegionCollapsible(e){return e===m.CENTER?!1:this._collapsible.get(e)??!1}setRegionCollapsible(e,t){return e===m.CENTER?this:(this._collapsible.set(e,t),this.getContainer()?.scheduleLayout(),this)}ensureGutter(t){let n=this._gutters.get(t);if(n)return n;let r=this.getContainer();return n=new D(t===m.NORTH||t===m.SOUTH?`vertical`:`horizontal`,{movable:!1,opaque:!1,collapseDirection:k[t],expandedBackground:`transparent`,listeners:{collapse:()=>this.setRegionCollapsed(t,!this.isRegionCollapsed(t))}}),n.setVisible(!1),e.sink.appendChild(r.getElement(),n.getElement(!0)),this._gutters.set(t,n),n}regionExtent(e,t){return this.isRegionCollapsed(e)?18:t}flooredMainExtent(e,t,n){let r=t?n?t.height:t.width:0;return Math.max(e,r)}applyRegionClip(e,t){if(this.isRegionCollapsible(t)){if(!this.isRegionCollapsed(t)){e.setClipPath(`inset(0 0 0 0)`);return}switch(t){case m.WEST:e.setClipPath(`inset(0 100% 0 0)`);break;case m.EAST:e.setClipPath(`inset(0 0 0 100%)`);break;case m.NORTH:e.setClipPath(`inset(0 0 100% 0)`);break;case m.SOUTH:e.setClipPath(`inset(100% 0 0 0)`)}}}updateRegionGutter(e,t,n,r,i){let a=this.getRegionComponent(e);if(!a)return;if(!this.isRegionCollapsible(e)){a.setVisible(!0),this._gutters.get(e)?.setVisible(!1);return}let o=this.isRegionCollapsed(e),s=this.ensureGutter(e);a.setVisible(!0),s.setOpaque(o),s.setVisible(!0);let c=o?{x:t,y:n,width:r,height:i}:this.innerEdgeTrack(e,t,n,r,i);s.setX(c.x),s.setY(c.y),s.setWidth(c.width),s.setHeight(c.height)}innerEdgeTrack(e,t,n,r,i){switch(e){case m.NORTH:return{x:t,y:n+i,width:r,height:O};case m.SOUTH:return{x:t,y:n-O,width:r,height:O};case m.WEST:return{x:t+r,y:n,width:O,height:i};case m.EAST:return{x:t-O,y:n,width:O,height:i};default:return{x:t,y:n,width:r,height:i}}}laidOut(e){return e&&e.isDisplayed()?e:null}getPreferredSize(){let e=this.getContainer();if(!e)return null;let t=e.getPerimeterSize(),n=t.left+t.right,r=t.top+t.bottom,i=0,a=0,o=0,s=0,c=this.laidOut(this._northComponent),l=this.laidOut(this._southComponent),u=this.laidOut(this._westComponent),d=this.laidOut(this._centerComponent),f=this.laidOut(this._eastComponent);if(c){let e=c.getPreferredSize();if(e){let t=this.flooredMainExtent(e.height,c.getMinSize(),!0);i=Math.max(i,e.width),a+=this.isRegionCollapsed(m.NORTH)?18:t}}if(l){let e=l.getPreferredSize();if(e){let t=this.flooredMainExtent(e.height,l.getMinSize(),!0);i=Math.max(i,e.width),a+=this.isRegionCollapsed(m.SOUTH)?18:t}}if(u){let e=u.getPreferredSize();if(e){let t=this.flooredMainExtent(e.width,u.getMinSize(),!1);o+=this.isRegionCollapsed(m.WEST)?18:t,s=Math.max(s,e.height)}}if(d){let e=d.getPreferredSize();e&&(o+=e.width,s=Math.max(s,e.height))}if(f){let e=f.getPreferredSize();if(e){let t=this.flooredMainExtent(e.width,f.getMinSize(),!1);o+=this.isRegionCollapsed(m.EAST)?18:t,s=Math.max(s,e.height)}}return i=Math.max(i,o),a+=s,{width:i+n,height:a+r}}getMinSize(){let e=this.getContainer();if(!e)return null;let t=e.getPerimeterSize(),n=t.left+t.right,r=t.top+t.bottom,i=0,a=0,o=0,s=0,c=this.laidOut(this._northComponent),l=this.laidOut(this._southComponent),u=this.laidOut(this._westComponent),d=this.laidOut(this._centerComponent),f=this.laidOut(this._eastComponent);if(c){let e=c.getMinSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(m.NORTH)?18:e.height)}if(l){let e=l.getMinSize();e&&(i=Math.max(i,e.width),a+=this.isRegionCollapsed(m.SOUTH)?18:e.height)}if(u){let e=u.getMinSize();e&&(o+=this.isRegionCollapsed(m.WEST)?18:e.width,s=Math.max(s,e.height))}if(d){let e=d.getMinSize();e&&(o+=e.width,s=Math.max(s,e.height))}if(f){let e=f.getMinSize();e&&(o+=this.isRegionCollapsed(m.EAST)?18:e.width,s=Math.max(s,e.height))}return i=Math.max(i,o),a+=s,{width:i+n,height:a+r}}getMaxSize(){let e=this.getContainer();if(!e)return null;let r=e.getPerimeterSize(),i=r.left+r.right,a=r.top+r.bottom,maxOf=e=>this.laidOut(e)?e.getMaxSize()??{width:t,height:t}:null,o=maxOf(this._northComponent),s=maxOf(this._southComponent),c=maxOf(this._westComponent),l=maxOf(this._centerComponent),u=maxOf(this._eastComponent),d=0,f=0,p=!1;for(let e of[c,l,u])e&&(p=!0,d+=e.width,f=Math.max(f,e.height));let m=t;o&&(m=Math.min(m,o.width)),s&&(m=Math.min(m,s.width)),p&&(m=Math.min(m,d));let h=0;return o&&(h+=o.height),p&&(h+=f),s&&(h+=s.height),{width:n(m+i),height:n(h+a)}}computeTotalMinSize(){if(!this.getContainer())return{width:0,height:0};let e=this.laidOut(this._westComponent)?.getMinSize(),t=this.laidOut(this._centerComponent)?.getMinSize(),n=this.laidOut(this._eastComponent)?.getMinSize(),r=this.laidOut(this._northComponent)?.getMinSize(),i=this.laidOut(this._southComponent)?.getMinSize(),a=[];e&&a.push(this.isRegionCollapsed(m.WEST)?18:e.width),t&&a.push(t.width),n&&a.push(this.isRegionCollapsed(m.EAST)?18:n.width);let o=[];r&&o.push(this.isRegionCollapsed(m.NORTH)?18:r.height),t&&o.push(t.height),i&&o.push(this.isRegionCollapsed(m.SOUTH)?18:i.height);let s=0,c=0;for(let e of a)s+=e;s+=Math.max(0,a.length-1)*this._spacing,r&&(s=Math.max(s,r.width)),i&&(s=Math.max(s,i.width));for(let e of o)c+=e;return c+=Math.max(0,o.length-1)*this._spacing,{width:s,height:c}}clearSkippedRegionFrames(...e){[this._northComponent,this._southComponent,this._westComponent,this._centerComponent,this._eastComponent].forEach((t,n)=>{t&&!e[n]&&t.clearClipFrame()})}doLayout(){let e=this.getContainer();if(!e)return;let t=e.getInnerSize();if(!t)return;let n=e.getContentInsets();t=this.inflateForOverflow(t);let r=this.laidOut(this._northComponent),i=this.laidOut(this._southComponent),a=this.laidOut(this._westComponent),o=this.laidOut(this._centerComponent),c=this.laidOut(this._eastComponent);this.clearSkippedRegionFrames(r,i,a,o,c);let l=t.width,u=t.height,d,f,p,h;if(r){let e=this.getLayoutConstraints(r);if(!e)throw Error(`Unable to determine layout constraints for north component.`);let t=r.getPreferredSize();if(!t)throw Error(`Unable to determine preferred size for north component.`);let u=this.flooredMainExtent(t.height,r.getMinSize(),!0),d=this.regionExtent(m.NORTH,u),p=e.ignoreParentInsets?0:n.getLeft(),h=e.ignoreParentInsets?0:n.getTop(),g=l+(e.ignoreParentInsets?n.getLeft()+n.getRight():0),_=e.ignoreParentInsets?n.getTop():0;f=d+_,this.isRegionCollapsible(m.NORTH)||this._collapsing?(this.placeComponent(r,p,h,g,u+_,s.BOTH),r.clearClipFrame(),this.applyRegionClip(r,m.NORTH)):(r.setClipPath(null),r.setClipFrame(p,h,g,u+_),this.commitBounds(r,0,0,g,u+_)),this.updateRegionGutter(m.NORTH,p,h,g,f),(a||o||c||i)&&(f+=this._spacing)}else f=0;if(h=u-f,i){let e=i.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for south component.`);let t=this.flooredMainExtent(e.height,i.getMinSize(),!0),r=this.regionExtent(m.SOUTH,t),a=n.getLeft(),o=n.getTop()+u-r;h-=this._spacing,h-=r;let c=n.getTop()+u-t;this.isRegionCollapsible(m.SOUTH)||this._collapsing?(this.placeComponent(i,a,c,l,t,s.BOTH),i.clearClipFrame(),this.applyRegionClip(i,m.SOUTH)):(i.setClipPath(null),i.setClipFrame(a,c,l,t),this.commitBounds(i,0,0,l,t)),this.updateRegionGutter(m.SOUTH,a,o,l,r)}let g=0,_=0;if(c){let e=c.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for east component.`);let t=this.flooredMainExtent(e.width,c.getMinSize(),!1);_=t,g=this.regionExtent(m.EAST,t)}if(a){let e=a.getPreferredSize();if(!e)throw Error(`Unable to determine preferred size for west component.`);let t=this.flooredMainExtent(e.width,a.getMinSize(),!1),r=Math.max(0,Math.min(this.regionExtent(m.WEST,t),l-g)),i=n.getLeft(),c=n.getTop()+f;d=r;let u=Math.max(0,Math.min(t,l-g));this.isRegionCollapsible(m.WEST)||this._collapsing?(this.placeComponent(a,i,c,u,h,s.BOTH),a.clearClipFrame(),this.applyRegionClip(a,m.WEST)):(a.setClipPath(null),a.setClipFrame(i,c,u,h),this.commitBounds(a,0,0,u,h)),this.updateRegionGutter(m.WEST,i,c,r,h),o&&(d+=this._spacing)}else d=0;if(p=l-d,c){p-=this._spacing,p-=g;let e=n.getLeft()+l-g,t=n.getTop()+f,r=n.getLeft()+l-_;this.isRegionCollapsible(m.EAST)||this._collapsing?(this.placeComponent(c,r,t,_,h,s.BOTH),c.clearClipFrame(),this.applyRegionClip(c,m.EAST)):(c.setClipPath(null),c.setClipFrame(r,t,_,h),this.commitBounds(c,0,0,_,h)),this.updateRegionGutter(m.EAST,e,t,g,h)}if(o){let e=n.getLeft()+d,t=n.getTop()+f;this._collapsing?(this.placeComponent(o,e,t,p,h,s.BOTH),o.clearClipFrame()):(o.setClipFrame(e,t,p,h),this.commitBounds(o,0,0,p,h))}}detach(){this._collapseAnimation?.(),this._collapseAnimation=null,this._collapsing=!1;let t=(this.getContainer()?.getComponents().length??0)>0;for(let e of this._pendingCollapseTransitions)t?e.settle():e.cancel();this._pendingCollapseTransitions.length=0,super.detach();for(let t of this._gutters.values()){let n=t.getElement(),r=n?e.source.getParentNode(n):null;n&&r&&e.sink.removeChild(r,n),t.dispose()}this._gutters.clear();for(let e of[m.NORTH,m.SOUTH,m.WEST,m.EAST,m.CENTER])this.getRegionComponent(e)?.clearClipFrame();return this}},A=o(Border);export{runCollapse as i,D as n,w as r,A as t};
2
- //# sourceMappingURL=Border-0DJFDiij.js.map