@jimka/typescript-ui 0.7.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 (296) 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-iZhsvMlT.js → Anchor-DdYgyn2V.js} +2 -2
  6. package/dist/lib/{Anchor-iZhsvMlT.js.map → Anchor-DdYgyn2V.js.map} +1 -1
  7. package/dist/lib/{AnimatedDropdown-D0RhVgv3.js → AnimatedDropdown-_KhHzX5D.js} +2 -2
  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-C20k2YHU.js → Card-CAp7LcB5.js} +2 -2
  14. package/dist/lib/{Card-C20k2YHU.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-FWRjgF6T.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-DyPX8CFh.js → FieldDecorator-37IgKHHm.js} +2 -2
  34. package/dist/lib/{FieldDecorator-DyPX8CFh.js.map → FieldDecorator-37IgKHHm.js.map} +1 -1
  35. package/dist/lib/{Fit-CaPMj7Up.js → Fit-amTWlJM2.js} +2 -2
  36. package/dist/lib/{Fit-CaPMj7Up.js.map → Fit-amTWlJM2.js.map} +1 -1
  37. package/dist/lib/{FloatingPanel-Dsy_vJxi.js → FloatingPanel-CwsFPYbc.js} +2 -2
  38. package/dist/lib/{FloatingPanel-Dsy_vJxi.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-ft_UUpj8.js → Grid-BQZ4UIUH.js} +2 -2
  42. package/dist/lib/{Grid-ft_UUpj8.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-Osm3IjDw.js → Header-Cj33ABP1.js} +2 -2
  46. package/dist/lib/{Header-Osm3IjDw.js.map → Header-Cj33ABP1.js.map} +1 -1
  47. package/dist/lib/{IconText-BBaYJ2Fx.js → IconText-Dp64iq_q.js} +2 -2
  48. package/dist/lib/{IconText-BBaYJ2Fx.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-BqCT-1yv.js → MenuButton-BO4y3jf2.js} +2 -2
  64. package/dist/lib/{MenuButton-BqCT-1yv.js.map → MenuButton-BO4y3jf2.js.map} +1 -1
  65. package/dist/lib/{OverlayFade-CuEXgimf.js → OverlayFade-C1yQKffL.js} +2 -2
  66. package/dist/lib/{OverlayFade-CuEXgimf.js.map → OverlayFade-C1yQKffL.js.map} +1 -1
  67. package/dist/lib/{Panel-CtViePqY.js → Panel-DlsVVuvn.js} +2 -2
  68. package/dist/lib/{Panel-CtViePqY.js.map → Panel-DlsVVuvn.js.map} +1 -1
  69. package/dist/lib/{Position-BIEU1Eze.js → Position-DWR1nIpA.js} +2 -2
  70. package/dist/lib/{Position-BIEU1Eze.js.map → Position-DWR1nIpA.js.map} +1 -1
  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--w28AnXc.js → RovingTabIndex-BttlsARv.js} +2 -2
  78. package/dist/lib/{RovingTabIndex--w28AnXc.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-DVe4UXwX.js → VBox-hFIZAEpT.js} +2 -2
  102. package/dist/lib/{VBox-DVe4UXwX.js.map → VBox-hFIZAEpT.js.map} +1 -1
  103. package/dist/lib/{VirtualScroller-ggPTCQb0.js → VirtualScroller-Csa3GBSM.js} +2 -2
  104. package/dist/lib/{VirtualScroller-ggPTCQb0.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-C7MrKMQr.js.map → selectionsEqual-DWdW5pxP.js.map} +1 -1
  146. package/dist/lib/types/component/button/Button.d.ts +6 -14
  147. package/dist/lib/types/component/button/TabButton.d.ts +3 -5
  148. package/dist/lib/types/component/button/TabCloseButton.d.ts +3 -0
  149. package/dist/lib/types/component/button/ToggleButton.d.ts +2 -5
  150. package/dist/lib/types/component/chart/AbstractChart.d.ts +2 -2
  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/input/AbstractCalendarDropdown.d.ts +4 -4
  167. package/dist/lib/types/component/input/AbstractInput.d.ts +1 -0
  168. package/dist/lib/types/component/input/AbstractPickerField.d.ts +4 -2
  169. package/dist/lib/types/component/input/AutoCompleteDropdown.d.ts +2 -2
  170. package/dist/lib/types/component/input/AutoCompleteField.d.ts +1 -0
  171. package/dist/lib/types/component/input/ComboBox.d.ts +5 -2
  172. package/dist/lib/types/component/input/Link.d.ts +2 -2
  173. package/dist/lib/types/component/input/PasswordField.d.ts +2 -2
  174. package/dist/lib/types/component/input/PickerButton.d.ts +5 -2
  175. package/dist/lib/types/component/input/PickerInput.d.ts +2 -2
  176. package/dist/lib/types/component/input/SelectableText.d.ts +2 -2
  177. package/dist/lib/types/component/input/SpinButton.d.ts +3 -2
  178. package/dist/lib/types/component/input/Text.d.ts +3 -7
  179. package/dist/lib/types/component/input/TextArea.d.ts +2 -2
  180. package/dist/lib/types/component/input/TextField.d.ts +2 -2
  181. package/dist/lib/types/component/input/TextInput.d.ts +4 -2
  182. package/dist/lib/types/component/input/TimePickerDropdown.d.ts +2 -2
  183. package/dist/lib/types/component/input/UsernameField.d.ts +2 -2
  184. package/dist/lib/types/component/list/AbstractMarkerList.d.ts +2 -0
  185. package/dist/lib/types/component/list/AbstractSelectableList.d.ts +4 -2
  186. package/dist/lib/types/component/list/ListItem.d.ts +2 -1
  187. package/dist/lib/types/component/menubar/MenuBarButton.d.ts +3 -0
  188. package/dist/lib/types/component/menubar/ToolBar.d.ts +2 -0
  189. package/dist/lib/types/component/table/Body.d.ts +14 -6
  190. package/dist/lib/types/component/table/Column.d.ts +2 -0
  191. package/dist/lib/types/component/table/ColumnConfig.d.ts +1 -0
  192. package/dist/lib/types/component/table/Footer.d.ts +2 -0
  193. package/dist/lib/types/component/table/Header.d.ts +7 -0
  194. package/dist/lib/types/component/table/Row.d.ts +2 -0
  195. package/dist/lib/types/component/table/Table.d.ts +4 -1
  196. package/dist/lib/types/component/table/TablePanel.d.ts +5 -0
  197. package/dist/lib/types/component/table/TreeTablePanel.d.ts +5 -0
  198. package/dist/lib/types/component/table/cell/Cell.d.ts +3 -2
  199. package/dist/lib/types/component/table/cell/Header.d.ts +4 -3
  200. package/dist/lib/types/component/table/cell/ParentHeader.d.ts +4 -0
  201. package/dist/lib/types/component/tree/TreeRow.d.ts +2 -0
  202. package/dist/lib/types/core/AnimatedDropdown.d.ts +2 -2
  203. package/dist/lib/types/core/Binding.d.ts +1 -0
  204. package/dist/lib/types/core/ClassStyleRules.d.ts +44 -22
  205. package/dist/lib/types/core/Component.d.ts +55 -28
  206. package/dist/lib/types/core/DOM.d.ts +6 -0
  207. package/dist/lib/types/core/Diagnostics.d.ts +22 -0
  208. package/dist/lib/types/core/Event.d.ts +7 -0
  209. package/dist/lib/types/core/LayerManager.d.ts +2 -0
  210. package/dist/lib/types/core/ListenerBag.d.ts +1 -0
  211. package/dist/lib/types/core/StyleTarget.d.ts +12 -0
  212. package/dist/lib/types/core/StyleTraits.d.ts +4 -0
  213. package/dist/lib/types/core/Theme.d.ts +5 -2
  214. package/dist/lib/types/core/index.d.ts +5 -2
  215. package/dist/lib/types/diagnostics/DiagnosticsOverlay.d.ts +29 -0
  216. package/dist/lib/types/diagnostics/DiagnosticsSampler.d.ts +61 -0
  217. package/dist/lib/types/diagnostics/StyleAudit.d.ts +19 -0
  218. package/dist/lib/types/diagnostics/StyleAuditOverlay.d.ts +12 -0
  219. package/dist/lib/types/diagnostics/StyleAuditView.d.ts +13 -0
  220. package/dist/lib/types/diagnostics/index.d.ts +7 -0
  221. package/dist/lib/types/layout/LayoutManager.d.ts +3 -0
  222. package/dist/lib/types/layout/Table.d.ts +1 -0
  223. package/dist/lib/types/overlay/AbstractWindow.d.ts +35 -2
  224. package/dist/lib/types/overlay/ButtonGroup.d.ts +1 -0
  225. package/dist/lib/types/overlay/Dialog.d.ts +1 -0
  226. package/dist/lib/types/overlay/Menu.d.ts +2 -0
  227. package/dist/lib/types/overlay/Notification.d.ts +0 -1
  228. package/dist/lib/types/overlay/PopupPanel.d.ts +2 -2
  229. package/dist/lib/types/overlay/RailHandle.d.ts +4 -5
  230. package/dist/lib/types/overlay/TabWindow.d.ts +3 -0
  231. package/dist/lib/types/overlay/Tooltip.d.ts +1 -0
  232. package/dist/lib/types/overlay/Window.d.ts +4 -1
  233. package/dist/lib/validation.es.js +1 -1
  234. package/llms.txt +2 -0
  235. package/package.json +5 -1
  236. package/dist/lib/AbstractInput-W2PLJV5_.js +0 -2
  237. package/dist/lib/AbstractInput-W2PLJV5_.js.map +0 -1
  238. package/dist/lib/AnimatedDropdown-D0RhVgv3.js.map +0 -1
  239. package/dist/lib/Border-6GsTNV-2.js +0 -2
  240. package/dist/lib/Border-6GsTNV-2.js.map +0 -1
  241. package/dist/lib/Button-CnFAiQuV.js +0 -2
  242. package/dist/lib/Button-CnFAiQuV.js.map +0 -1
  243. package/dist/lib/Checkbox-CM1z8keM.js +0 -2
  244. package/dist/lib/Checkbox-CM1z8keM.js.map +0 -1
  245. package/dist/lib/CheckboxMenuRow-C1h4LPHR.js +0 -2
  246. package/dist/lib/CheckboxMenuRow-C1h4LPHR.js.map +0 -1
  247. package/dist/lib/CodeEditor-CTL2WjF8.js +0 -2
  248. package/dist/lib/CodeEditor-CTL2WjF8.js.map +0 -1
  249. package/dist/lib/ComboBox-PZ5YPL0X.js +0 -2
  250. package/dist/lib/ComboBox-PZ5YPL0X.js.map +0 -1
  251. package/dist/lib/Component-D99-15Zt.js +0 -2
  252. package/dist/lib/Component-D99-15Zt.js.map +0 -1
  253. package/dist/lib/Container-FWRjgF6T.js +0 -2
  254. package/dist/lib/DOM-Cjh7_7TF.js +0 -2
  255. package/dist/lib/DOM-Cjh7_7TF.js.map +0 -1
  256. package/dist/lib/Dialog-DN78RaVH.js +0 -2
  257. package/dist/lib/Dialog-DN78RaVH.js.map +0 -1
  258. package/dist/lib/Glyph-DiEpD3gy.js +0 -2
  259. package/dist/lib/Glyph-DiEpD3gy.js.map +0 -1
  260. package/dist/lib/GridConstraints-CvZ0Nzaw.js +0 -2
  261. package/dist/lib/GridConstraints-CvZ0Nzaw.js.map +0 -1
  262. package/dist/lib/LayoutSerialization-BC64__O7.js +0 -2
  263. package/dist/lib/LayoutSerialization-BC64__O7.js.map +0 -1
  264. package/dist/lib/List-CQbZK_pT.js +0 -2
  265. package/dist/lib/List-CQbZK_pT.js.map +0 -1
  266. package/dist/lib/ListenerBag-WPdKuuds.js +0 -2
  267. package/dist/lib/ListenerBag-WPdKuuds.js.map +0 -1
  268. package/dist/lib/Menu-CwHluLGT.js +0 -2
  269. package/dist/lib/Menu-CwHluLGT.js.map +0 -1
  270. package/dist/lib/ProgressSpinner-BuBvC1FY.js +0 -2
  271. package/dist/lib/ProgressSpinner-BuBvC1FY.js.map +0 -1
  272. package/dist/lib/RadioButton-Df5J-H6m.js +0 -2
  273. package/dist/lib/RadioButton-Df5J-H6m.js.map +0 -1
  274. package/dist/lib/RadioMenuRow-Cfv0x6Qj.js +0 -2
  275. package/dist/lib/RadioMenuRow-Cfv0x6Qj.js.map +0 -1
  276. package/dist/lib/Scrollbar-DcnueNJd.js +0 -2
  277. package/dist/lib/Scrollbar-DcnueNJd.js.map +0 -1
  278. package/dist/lib/SelectableText-DZNxjKXR.js +0 -2
  279. package/dist/lib/SelectableText-DZNxjKXR.js.map +0 -1
  280. package/dist/lib/Slider-DNfd8Lxz.js +0 -2
  281. package/dist/lib/Slider-DNfd8Lxz.js.map +0 -1
  282. package/dist/lib/Spacer-BznfGbwG.js +0 -2
  283. package/dist/lib/Spacer-BznfGbwG.js.map +0 -1
  284. package/dist/lib/TabButton-CAACsMov.js +0 -2
  285. package/dist/lib/TabButton-CAACsMov.js.map +0 -1
  286. package/dist/lib/TabCloseButton-CCiqsX3y.js +0 -2
  287. package/dist/lib/TabCloseButton-CCiqsX3y.js.map +0 -1
  288. package/dist/lib/Text-O-FWa5Cy.js +0 -2
  289. package/dist/lib/Text-O-FWa5Cy.js.map +0 -1
  290. package/dist/lib/Tooltip-CyICVu15.js +0 -3
  291. package/dist/lib/Tooltip-CyICVu15.js.map +0 -1
  292. package/dist/lib/Tree-CSEguhlk.js +0 -2
  293. package/dist/lib/Tree-CSEguhlk.js.map +0 -1
  294. package/dist/lib/core.es.js.map +0 -1
  295. package/dist/lib/primitive.es.js.map +0 -1
  296. package/dist/lib/selectionsEqual-C7MrKMQr.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{c as e}from"./Position-DWR1nIpA.js";var Point=class extends e{_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{Point as t};
2
+ //# sourceMappingURL=primitive-8YvORgGS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-8YvORgGS.js","names":[],"sources":["../../src/typescript/lib/primitive/Point.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { BaseObject } from \"~/core/BaseObject.js\";\n\n/**\n * Represents a two-dimensional point with x and y coordinates.\n *\n * @category Util\n */\nexport class Point extends BaseObject {\n private _x: number;\n private _y: number;\n\n /**\n * @param x - The x coordinate.\n * @param y - The y coordinate.\n */\n constructor(x: number, y: number) {\n super();\n\n this._x = x ?? 0;\n this._y = y ?? 0;\n\n }\n\n /**\n * Returns the x coordinate.\n *\n * @returns The x coordinate value, defaulting to `0` if unset.\n */\n getX() {\n return this._x ?? 0;\n }\n\n /**\n * Returns the y coordinate.\n *\n * @returns The y coordinate value, defaulting to `0` if unset.\n */\n getY() {\n return this._y ?? 0;\n }\n\n /**\n * Returns the point as a space-separated `\"x y\"` string.\n *\n * @returns A string of the form `\"<x> <y>\"`.\n */\n render() {\n return this.getX() + \" \" + this.getY();\n }\n}\n"],"mappings":"2CASA,IAAa,MAAb,cAA2B,CAAW,CAClC,GACA,GAMA,YAAY,EAAW,EAAW,CAC9B,MAAM,EAEN,KAAK,GAAK,GAAK,EACf,KAAK,GAAK,GAAK,CAEnB,CAOA,MAAO,CACH,OAAO,KAAK,IAAM,CACtB,CAOA,MAAO,CACH,OAAO,KAAK,IAAM,CACtB,CAOA,QAAS,CACL,OAAO,KAAK,KAAK,EAAI,IAAM,KAAK,KAAK,CACzC,CACJ"}
@@ -1,2 +1 @@
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-BIEU1Eze.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
- //# sourceMappingURL=primitive.es.js.map
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./Position-DWR1nIpA.js";import{t as s}from"./Placement-7kqdaK4Z.js";import{t as c}from"./primitive-8YvORgGS.js";export{n as Insets,s as Placement,c as Point,o as Position,e as UNBOUNDED,i as borderSideWidth,t as borderToStyle,r as isUnbounded,a as saturate};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./DOM-Cjh7_7TF.js";import{t}from"./ListenerBag-WPdKuuds.js";function normalizePath(e){return`/`+splitPath(splitQuery(e.startsWith(`#`)?e.slice(1):e).path).join(`/`)}function splitPath(e){return e.split(`/`).filter(e=>e.length>0)}function splitFragment(e){let t=e.indexOf(`#`);return t===-1?{path:e,fragment:``}:{path:e.slice(0,t),fragment:e.slice(t+1)}}function splitQuery(e){let t=e.indexOf(`?`);return t===-1?{path:e,query:``}:{path:e.slice(0,t),query:e.slice(t+1)}}function parseQuery(e){let t=e.startsWith(`?`)?e.slice(1):e,n={};for(let e of t.split(`&`)){if(e.length===0)continue;let t=e.indexOf(`=`),r=t===-1?e:e.slice(0,t),i=t===-1?``:e.slice(t+1),a=decodeSegment(r);a.length!==0&&(n[a]=decodeSegment(i))}return n}function formatQuery(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join(`&`)}function sameQuery(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function normalizeBase(e){let t=splitPath(e);return t.length===0?`/`:`/`+t.join(`/`)+`/`}function stripBase(e,t){let n=normalizeBase(e).slice(0,-1);return n!==``&&(t===n||t.startsWith(n+`/`))?normalizePath(t.slice(n.length)):normalizePath(t)}function joinBase(e,t){let n=normalizeBase(e),r=normalizePath(t);return r===`/`?n:n.slice(0,-1)+r}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;_mode;_base;_onHashChange=()=>this.handleHashChange();_onPopState=()=>this.handlePopState();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(),this._mode===`history`?e.sink.addListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.addListener(e.source.getWindow(),`hashchange`,this._onHashChange),this)}stop(){return this._started?(this._mode===`history`?e.sink.removeListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.removeListener(e.source.getWindow(),`hashchange`,this._onHashChange),this._started=!1,this):this}navigate(t,n){let r=splitFragment(t),i=splitQuery(r.path),a=n?.query??parseQuery(i.query);if(this._mode===`hash`){let r=this.getHref(t,a);return n?.replace===!0?e.sink.replaceLocationHash(r):e.sink.setLocationHash(r),this}let o=normalizePath(i.path),s=r.fragment;if(o===this.getPath()&&s===this.getFragment()&&sameQuery(a,this.getQuery()))return this;let c=this.getHref(s===``?o:`${o}#${s}`,a);return n?.replace===!0?e.sink.replaceHistoryPath(c):e.sink.pushHistoryPath(c),this.applyCurrentRoute(),this}getHref(e,t){let n=splitFragment(e),r=splitQuery(n.path),i=t??parseQuery(r.query),a=`/`+splitPath(normalizePath(r.path)).map(e=>encodeURIComponent(e)).join(`/`),o=formatQuery(i),s=o===``?``:`?`+o;if(this._mode===`hash`)return`#`+a+s;let c=joinBase(this._base,a)+s;return n.fragment===``?c:`${c}#${n.fragment}`}getPath(t){if(this._mode===`hash`){let n=t??e.source.getLocationHash();return this.decodePath(normalizePath(n))}let n=t??e.source.getLocationPathname();return this.decodePath(stripBase(this._base,splitFragment(n).path))}getFragment(t){if(this._mode===`hash`)return``;if(t!==void 0)return splitFragment(t).fragment;let n=e.source.getLocationHash();return n.startsWith(`#`)?n.slice(1):n}getQuery(t){return this._mode===`hash`?parseQuery(splitQuery(t??e.source.getLocationHash()).query):parseQuery(t===void 0?e.source.getLocationSearch():splitQuery(splitFragment(t).path).query)}decodePath(e){return`/`+splitPath(e).map(e=>{try{return decodeURIComponent(e)}catch{return e}}).join(`/`)}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=this.getFragment(),n=this.getQuery(),r=selectPattern(Array.from(this._routes.values()),e);if(r===null){this.emit(`nomatch`,e);return}let i={pattern:r.compiled.pattern,params:r.params,path:e,fragment:t,query:n};r.compiled.handler(r.params,e,t,n),this.emit(`navigate`,i)}applyOptions(e){if(this._mode=e.mode??`hash`,this._base=normalizeBase(e.base??`/`),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()}handlePopState(){this.applyCurrentRoute()}};export{Router};
1
+ import{t as e}from"./DOM-DDhDN8lQ.js";import{t}from"./ListenerBag-DYRl4TSb.js";function normalizePath(e){return`/`+splitPath(splitQuery(e.startsWith(`#`)?e.slice(1):e).path).join(`/`)}function splitPath(e){return e.split(`/`).filter(e=>e.length>0)}function splitFragment(e){let t=e.indexOf(`#`);return t===-1?{path:e,fragment:``}:{path:e.slice(0,t),fragment:e.slice(t+1)}}function splitQuery(e){let t=e.indexOf(`?`);return t===-1?{path:e,query:``}:{path:e.slice(0,t),query:e.slice(t+1)}}function parseQuery(e){let t=e.startsWith(`?`)?e.slice(1):e,n={};for(let e of t.split(`&`)){if(e.length===0)continue;let t=e.indexOf(`=`),r=t===-1?e:e.slice(0,t),i=t===-1?``:e.slice(t+1),a=decodeSegment(r);a.length!==0&&(n[a]=decodeSegment(i))}return n}function formatQuery(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join(`&`)}function sameQuery(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function normalizeBase(e){let t=splitPath(e);return t.length===0?`/`:`/`+t.join(`/`)+`/`}function stripBase(e,t){let n=normalizeBase(e).slice(0,-1);return n!==``&&(t===n||t.startsWith(n+`/`))?normalizePath(t.slice(n.length)):normalizePath(t)}function joinBase(e,t){let n=normalizeBase(e),r=normalizePath(t);return r===`/`?n:n.slice(0,-1)+r}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;_mode;_base;_onHashChange=()=>this.handleHashChange();_onPopState=()=>this.handlePopState();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(),this._mode===`history`?e.sink.addListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.addListener(e.source.getWindow(),`hashchange`,this._onHashChange),this)}stop(){return this._started?(this._mode===`history`?e.sink.removeListener(e.source.getWindow(),`popstate`,this._onPopState):e.sink.removeListener(e.source.getWindow(),`hashchange`,this._onHashChange),this._started=!1,this):this}navigate(t,n){let r=splitFragment(t),i=splitQuery(r.path),a=n?.query??parseQuery(i.query);if(this._mode===`hash`){let r=this.getHref(t,a);return n?.replace===!0?e.sink.replaceLocationHash(r):e.sink.setLocationHash(r),this}let o=normalizePath(i.path),s=r.fragment;if(o===this.getPath()&&s===this.getFragment()&&sameQuery(a,this.getQuery()))return this;let c=this.getHref(s===``?o:`${o}#${s}`,a);return n?.replace===!0?e.sink.replaceHistoryPath(c):e.sink.pushHistoryPath(c),this.applyCurrentRoute(),this}getHref(e,t){let n=splitFragment(e),r=splitQuery(n.path),i=t??parseQuery(r.query),a=`/`+splitPath(normalizePath(r.path)).map(e=>encodeURIComponent(e)).join(`/`),o=formatQuery(i),s=o===``?``:`?`+o;if(this._mode===`hash`)return`#`+a+s;let c=joinBase(this._base,a)+s;return n.fragment===``?c:`${c}#${n.fragment}`}getPath(t){if(this._mode===`hash`){let n=t??e.source.getLocationHash();return this.decodePath(normalizePath(n))}let n=t??e.source.getLocationPathname();return this.decodePath(stripBase(this._base,splitFragment(n).path))}getFragment(t){if(this._mode===`hash`)return``;if(t!==void 0)return splitFragment(t).fragment;let n=e.source.getLocationHash();return n.startsWith(`#`)?n.slice(1):n}getQuery(t){return this._mode===`hash`?parseQuery(splitQuery(t??e.source.getLocationHash()).query):parseQuery(t===void 0?e.source.getLocationSearch():splitQuery(splitFragment(t).path).query)}decodePath(e){return`/`+splitPath(e).map(e=>{try{return decodeURIComponent(e)}catch{return e}}).join(`/`)}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=this.getFragment(),n=this.getQuery(),r=selectPattern(Array.from(this._routes.values()),e);if(r===null){this.emit(`nomatch`,e);return}let i={pattern:r.compiled.pattern,params:r.params,path:e,fragment:t,query:n};r.compiled.handler(r.params,e,t,n),this.emit(`navigate`,i)}applyOptions(e){if(this._mode=e.mode??`hash`,this._base=normalizeBase(e.base??`/`),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()}handlePopState(){this.applyCurrentRoute()}};export{Router};
2
2
  //# sourceMappingURL=router.es.js.map
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./DOM-DDhDN8lQ.js";import{d as t,t as n}from"./Component-YrLXKJZS.js";import{t as r}from"./VirtualScroller-Csa3GBSM.js";var i=2;function rotateLeft(e,t){e.push(...e.splice(0,t))}var VirtualRowView=class extends n{_rowPool=[];_boundIndices=[];_rowGeom=[];_rowDisplayed=[];_scroller=null;_lastWindowStart=null;_renderDeferred=!1;_renderResumed=!1;_pendingScrollX=null;_pendingScrollY=null;_pendingScrollRow=null;initScroller(e){this._scroller=new r(this,e,()=>this.onScrollerTick());for(let e of this._scroller.ownedHandles())this.trackHandle(e)}onScrollerTick(){this.renderWindow()}destructor(){for(let e of this._rowPool)e.dispose();this._scroller?.dispose(),super.destructor()}setScrollX(e){return this._scroller?.resetWheelEase(),this.holdScrollWhileFirstLayoutHeld(`x`,e)||this._scroller?.setScrollX(e),this}setScrollY(e){return this._scroller?.resetWheelEase(),this.holdScrollWhileFirstLayoutHeld(`y`,e)||this._scroller?.setScrollY(e),this}holdScrollWhileFirstLayoutHeld(e,n){return t()?(e===`x`?this._pendingScrollX=n:(this._pendingScrollY=n,this._pendingScrollRow=null),!0):(e===`x`?this._pendingScrollX=null:(this._pendingScrollY=null,this._pendingScrollRow=null),!1)}applyPendingScroll(){let e=this._pendingScrollX,t=this._pendingScrollY,n=this._pendingScrollRow;this._pendingScrollX=null,this._pendingScrollY=null,this._pendingScrollRow=null,e!==null&&this.setScrollX(e),t!==null&&this.setScrollY(t),n!==null&&this.scrollRowIntoView(n)}computeVisibleWindow(e,t,n){let r=this.getRowHeight(),a=Math.max(0,Math.floor(e/r)-i),o=Math.min(n-1,Math.ceil((e+t)/r)+i);return{firstRow:a,lastRow:o,windowSize:o-a+1>0?o-a+1:0}}computePoolTarget(e,t,n){return Math.min(n,Math.max(e,Math.ceil(t/this.getRowHeight())+4+2))}computePageSize(){let e=this.getRowHeight();return Math.max(1,Math.floor((this.getHeight()||e)/e))}growRowPool(t){if(!this._scroller||this._rowPool.length>=t)return;let n=this._scroller.getRowsContainer(),r=e.sink.createDocumentFragment();for(;this._rowPool.length<t;){let t=this.createPoolRow(),n=t.getElement(!0);e.sink.appendChild(r,n),t.setY(0),t.setWillChange(`transform`),this._rowPool.push(t),this._boundIndices.push(-1),this._rowGeom.push(null),this._rowDisplayed.push(!1)}e.sink.appendChild(n,r),e.sink.release(r)}alignPoolWindow(e){let t=this._lastWindowStart===null?0:e-this._lastWindowStart;this._lastWindowStart=e;let n=this._rowPool.length;if(t===0||n===0)return;let r=(t%n+n)%n;rotateLeft(this._rowPool,r),rotateLeft(this._boundIndices,r),rotateLeft(this._rowGeom,r),rotateLeft(this._rowDisplayed,r)}positionRow(e,t,n){let r=this._rowPool[e],i=this.getRowHeight(),a=this._rowGeom[e],o=!a||a.ty!==t||a.w!==n||a.h!==i;return o&&(r.setAutoCommitStyle(!1),r.setX(0),r.setTranslate(0,t),r.setWidth(n),r.setHeight(i),r.setAutoCommitStyle(!0),this._rowGeom[e]={ty:t,w:n,h:i}),this._rowDisplayed[e]||(r.setDisplayed(!0),this._rowDisplayed[e]=!0),o}hideExcessPoolRows(e){for(let t=e;t<this._rowPool.length;t++)this._rowDisplayed[t]&&(this._rowPool[t].setDisplayed(!1),this._rowDisplayed[t]=!1),this._boundIndices[t]=-1,this._rowGeom[t]=null}invalidateGeom(){for(let e=0;e<this._rowGeom.length;e++)this._rowGeom[e]=null}deferRenderWhileFirstLayoutHeld(){return t()?(this._renderDeferred=!0,this.scheduleLayout(),!0):(this._renderResumed=this._renderDeferred,this._renderDeferred=!1,!1)}wasRenderDeferred(){return this._renderDeferred}finishResumedRender(){let e=this._renderResumed;return this._renderResumed=!1,this.applyPendingScroll(),e}renderWindowIfDeferred(){return!this._renderDeferred||this.isLayoutPaused()?!1:(this.renderWindow(),!0)}onThemeReflow(){this._boundIndices.fill(-1),this.invalidateGeom(),this.renderWindow()}scrollRowIntoView(e){if(e<0||!this._scroller)return;if(t()){this._pendingScrollRow=e;return}let n=this.getRowHeight(),r=e*n,i=r+n,a=this._scroller.getScrollY(),o=this.getHeight(),s=a+o,c=a;r<a?c=r:i>s&&(c=i-o),c!==a&&this.setScrollY(c)}};function selectionsEqual(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}export{VirtualRowView as n,selectionsEqual as t};
2
+ //# sourceMappingURL=selectionsEqual-DWdW5pxP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectionsEqual-C7MrKMQr.js","names":[],"sources":["../../src/typescript/lib/component/shared/VirtualRowView.ts","../../src/typescript/lib/component/shared/selectionsEqual.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { Component, ComponentOptions } from \"~/core/Component.js\";\nimport { DOM } from \"~/core/DOM.js\";\nimport type { Handle } from \"~/core/DOM.js\";\nimport { VirtualScroller } from \"~/component/container/VirtualScroller.js\";\nimport { isFirstLayoutHeld } from \"~/core/FirstLayoutGate.js\";\n\n/** Number of off-screen rows to render above and below the visible viewport. */\nconst SCROLL_BUFFER = 2;\n\n/** Rotates `arr` left by `shift` in place: `arr[i]` becomes what was at `arr[(i + shift) % arr.length]`. */\nfunction rotateLeft<T>(arr: T[], shift: number): void {\n arr.push(...arr.splice(0, shift));\n}\n\n/**\n * Shared transform-windowed virtual-scroll base for the data views —\n * `table/Body` and `tree/Tree` are its only two subclasses. It owns the\n * recycled row pool (`_rowPool` and the parallel `_boundIndices` / `_rowGeom` /\n * `_rowDisplayed` bookkeeping arrays), the {@link VirtualScroller} wiring, and\n * the window / pool-growth / geometry reconciliation primitives each subclass's\n * render pass composes.\n *\n * Only two things genuinely diverge between the two consumers, so only those\n * are hooks:\n *\n * - **Row height** — `Body` derives it live from the theme line box; `Tree`\n * uses a fixed constant. Read through {@link getRowHeight} on every call so a\n * live theme change is honoured.\n * - **Row construction** — the pool-row scaffolding (fragment batching, `setY(0)`\n * pin, `will-change` promotion, parallel-array bookkeeping) is identical; only\n * the row object each subclass builds differs. {@link createPoolRow} returns a\n * fully-constructed, un-appended row and the base owns the rest.\n *\n * The per-frame render pass itself ({@link renderWindow}) stays subclass-specific\n * because the content-width derivation genuinely diverges; the base exposes the\n * shared primitives it calls ({@link computeVisibleWindow},\n * {@link computePoolTarget}, {@link growRowPool}, {@link positionRow},\n * {@link hideExcessPoolRows}).\n *\n * @typeParam TRow - The concrete pooled row component type.\n * @typeParam TOptions - The subclass's options bag.\n *\n * @internal Not barrel-exported; the two subclasses are the only consumers.\n */\nabstract class VirtualRowView<\n TRow extends Component,\n TOptions extends ComponentOptions = ComponentOptions,\n> extends Component<TOptions> {\n\n protected _rowPool : TRow[] = [];\n protected _boundIndices : number[] = [];\n protected _rowGeom : Array<{ ty: number, w: number, h: number } | null> = [];\n protected _rowDisplayed : boolean[] = [];\n protected _scroller : VirtualScroller | null = null;\n\n /** The data index pool slot 0 was aligned to on the last render, for {@link alignPoolWindow} to derive the scroll delta. `null` before the first render. */\n private _lastWindowStart: number | null = null;\n\n /** Whether the startup font gate skipped a render pass that still owes a run. */\n private _renderDeferred: boolean = false;\n /** Whether the render now in flight is the one a skipped pass left pending. */\n private _renderResumed : boolean = false;\n /** Scroll offsets the gate held back, applied once a render pass has run. */\n private _pendingScrollX: number | null = null;\n private _pendingScrollY: number | null = null;\n /** A row reveal the gate held back, recomputed once a render pass has run. */\n private _pendingScrollRow: number | null = null;\n\n /**\n * Returns the height in pixels of a single row. Read on every window /\n * geometry calculation, so a subclass that recomputes it (e.g. on a theme\n * change) reflects the new value immediately.\n */\n protected abstract getRowHeight(): number;\n\n /**\n * Constructs one pool row, fully wired but not yet appended to the\n * rows container — the base's {@link growRowPool} owns the append, the\n * `setY(0)` pin, the `will-change` promotion, and the parallel-array\n * bookkeeping.\n */\n protected abstract createPoolRow(): TRow;\n\n /**\n * Recomputes and reconciles the visible row window against the current\n * scroll position and dataset. Subclass-specific because the content-width\n * derivation diverges; both implementations compose the shared primitives\n * on this base.\n */\n protected abstract renderWindow(): void;\n\n /**\n * Constructs the {@link VirtualScroller} for this view and tracks its\n * container handles so they are released with the component. The scroller's\n * onScroll hook is routed through {@link onScrollerTick}.\n *\n * @param element - This view's initialised element handle.\n */\n protected initScroller(element: Handle): void {\n this._scroller = new VirtualScroller(this, element, () => this.onScrollerTick());\n\n // Track the scroller's created container handles so they are released\n // with this view (on destructor or GC); the scroller is not a Component.\n for (const handle of this._scroller.ownedHandles()) {\n this.trackHandle(handle);\n }\n }\n\n /**\n * Invoked on every scroller tick. Default behaviour re-renders the window;\n * `Body` overrides it to additionally emit its scroll events.\n */\n protected onScrollerTick(): void {\n this.renderWindow();\n }\n\n /**\n * Destroys the pooled rows and the scroller's overlay scrollbars before the\n * inherited teardown runs.\n *\n * {@link growRowPool} appends each row's element straight to the rows\n * container and keeps the row only in `_rowPool`, so a pooled row is never\n * registered as a child component and the base destructor's recursion over\n * `_components` cannot reach it. Without this override neither the rows nor\n * their cells (which *are* registered on their row) release their\n * per-instance stylesheet rules, so the shared sheet grows by roughly the\n * view's whole cell count on every teardown. The scroller's two\n * `Scrollbar` overlays are raw-appended the same way, so they need the\n * same explicit disposal.\n */\n protected destructor(): void {\n for (const row of this._rowPool) {\n row.dispose();\n }\n\n this._scroller?.dispose();\n\n super.destructor();\n }\n\n /**\n * Sets the JS-controlled horizontal scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param x - The new scroll position in pixels.\n */\n setScrollX(x: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"x\", x)) {\n return this;\n }\n\n this._scroller?.setScrollX(x);\n\n return this;\n }\n\n /**\n * Sets the JS-controlled vertical scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param y - The new scroll position in pixels.\n */\n setScrollY(y: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"y\", y)) {\n return this;\n }\n\n this._scroller?.setScrollY(y);\n\n return this;\n }\n\n /**\n * Holds a scroll offset set while the startup font gate is holding this\n * view's render pass, for {@link applyPendingScroll} to apply once the pass\n * has run.\n *\n * @param axis - Which offset is being set.\n * @param offset - The requested offset in pixels.\n *\n * @returns `true` when the caller must return without scrolling.\n *\n * @remarks The scroller clamps every offset against a content extent that\n * only the render pass publishes, so an offset set while that pass is\n * deferred clamps to 0 and the request is lost — a row revealed during\n * startup would end up selected but off-screen. This guards the offsets\n * that are viewport-independent and so can be replayed verbatim: the\n * table's `scrollToRecord`, and a consumer restoring a saved offset.\n * `scrollRowIntoView` is held one level higher instead, by row index, since\n * its target depends on a height the gate is also holding. The table's\n * `scrollColumnIntoView` has that same width dependence but fires only from\n * a pooled cell's editor, which cannot exist while the pass is deferred.\n */\n private holdScrollWhileFirstLayoutHeld(axis: \"x\" | \"y\", offset: number): boolean {\n if (!isFirstLayoutHeld()) {\n // This offset is being applied for real, so it supersedes anything\n // held for the same axis — otherwise the held one would replay on\n // the next render and revert it. A held row reveal is a vertical\n // request too, so it goes with the Y offset.\n if (axis === \"x\") {\n this._pendingScrollX = null;\n } else {\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n }\n\n return false;\n }\n\n if (axis === \"x\") {\n this._pendingScrollX = offset;\n } else {\n this._pendingScrollY = offset;\n this._pendingScrollRow = null;\n }\n\n return true;\n }\n\n /**\n * Applies the scroll offsets {@link holdScrollWhileFirstLayoutHeld} held\n * back, now that a render pass has published the content extent they clamp\n * against. A no-op once they are applied.\n */\n private applyPendingScroll(): void {\n const x = this._pendingScrollX;\n const y = this._pendingScrollY;\n const row = this._pendingScrollRow;\n\n this._pendingScrollX = null;\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n\n if (x !== null) {\n this.setScrollX(x);\n }\n\n if (y !== null) {\n this.setScrollY(y);\n }\n\n // Applied after the offsets, which is what makes a reveal win over a\n // raw offset held before it. The reverse order is handled the other\n // way: a raw offset set later clears the reveal outright, so the two\n // vertical requests always resolve to whichever came last.\n if (row !== null) {\n this.scrollRowIntoView(row);\n }\n }\n\n /**\n * Computes the `[firstRow, lastRow]` data-index window visible in the\n * current viewport, padded by `SCROLL_BUFFER` on each side and clamped to\n * the dataset bounds.\n *\n * @param scrollY - The current scroll offset in pixels.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The `firstRow` / `lastRow` data indices and the number of rows in the window.\n */\n protected computeVisibleWindow(scrollY: number, visibleHeight: number, totalRows: number): { firstRow: number, lastRow: number, windowSize: number } {\n const rowHeight = this.getRowHeight();\n const firstRow = Math.max(0, Math.floor(scrollY / rowHeight) - SCROLL_BUFFER);\n const lastRow = Math.min(\n totalRows - 1,\n Math.ceil((scrollY + visibleHeight) / rowHeight) + SCROLL_BUFFER\n );\n const windowSize = lastRow - firstRow + 1 > 0 ? lastRow - firstRow + 1 : 0;\n\n return { firstRow, lastRow, windowSize };\n }\n\n /**\n * Computes the row-pool target size: the max possible window for the\n * current viewport, not just the current windowSize. windowSize shrinks\n * near the top/bottom edges of the dataset because firstRow clamps to 0\n * (and lastRow to totalRows-1); growing only to windowSize would force\n * regrowth mid-scroll once the user passes a viewport-edge boundary. Pre-\n * growing pays the per-row first-layout cost once.\n *\n * @param windowSize - The current visible-window size.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The pool target size.\n */\n protected computePoolTarget(windowSize: number, visibleHeight: number, totalRows: number): number {\n return Math.min(\n totalRows,\n Math.max(\n windowSize,\n Math.ceil(visibleHeight / this.getRowHeight()) + 2 * SCROLL_BUFFER + 2\n )\n );\n }\n\n /**\n * Computes the number of whole rows a page-nav keystroke should move by:\n * one viewport height, floored to at least one row.\n *\n * @returns The page size in rows.\n */\n protected computePageSize(): number {\n const rowHeight = this.getRowHeight();\n\n return Math.max(1, Math.floor((this.getHeight() || rowHeight) / rowHeight));\n }\n\n /**\n * Grows the row pool up to `poolTarget`, batching new row elements through\n * a {@link DocumentFragment} so the live rows container sees a single\n * append instead of N. Each new slot pins its static top to 0, promotes it\n * to its own compositor layer, and extends the parallel bookkeeping arrays\n * in lockstep.\n *\n * @param poolTarget - The target pool size.\n */\n protected growRowPool(poolTarget: number): void {\n if (!this._scroller || this._rowPool.length >= poolTarget) {\n return;\n }\n\n const rowsContainer = this._scroller.getRowsContainer();\n const growFragment = DOM.sink.createDocumentFragment();\n\n while (this._rowPool.length < poolTarget) {\n const row = this.createPoolRow();\n const rowEl = row.getElement(true)!;\n\n DOM.sink.appendChild(growFragment, rowEl);\n\n // Pin row's static top to 0 once. Per-frame Y offset comes from\n // translateY, which is composite-only (avoids layout/paint per\n // scroll tick).\n row.setY(0);\n\n // Pre-promote pooled rows to their own compositor layer so the first\n // scroll-driven translate doesn't pay a layer-creation cost.\n row.setWillChange(\"transform\");\n\n this._rowPool.push(row);\n this._boundIndices.push(-1);\n this._rowGeom.push(null);\n this._rowDisplayed.push(false);\n }\n\n DOM.sink.appendChild(rowsContainer, growFragment);\n DOM.sink.release(growFragment);\n }\n\n /**\n * Rotates the pool bookkeeping arrays so each slot keeps tracking the\n * same data index it held before the window moved, instead of being\n * rebound to whichever index now falls at that slot's window-relative\n * position.\n *\n * @param firstRow - The new window's first data index.\n *\n * @remarks Both subclasses key a pool slot by its offset within the\n * window (`firstRow + i`), so without this a one-row scroll shifts every\n * slot's data index by one and forces every pooled row — including the\n * off-screen `SCROLL_BUFFER` rows — through a full rebind and\n * reposition on every tick, instead of just the one row entering the\n * window. Call once per render, after {@link growRowPool} and before the\n * bind pass reads `_rowPool` / `_boundIndices` / `_rowGeom` /\n * `_rowDisplayed` by slot index.\n */\n protected alignPoolWindow(firstRow: number): void {\n const delta = this._lastWindowStart === null ? 0 : firstRow - this._lastWindowStart;\n\n this._lastWindowStart = firstRow;\n\n const n = this._rowPool.length;\n if (delta === 0 || n === 0) {\n return;\n }\n\n const shift = ((delta % n) + n) % n;\n\n rotateLeft(this._rowPool, shift);\n rotateLeft(this._boundIndices, shift);\n rotateLeft(this._rowGeom, shift);\n rotateLeft(this._rowDisplayed, shift);\n }\n\n /**\n * Positions the pool slot at `slot` to `targetY` and sizes it to `rowWidth`,\n * writing the translate/size only when the cached geometry differs from the\n * target, and toggling the row displayed on the false→true edge.\n *\n * @param slot - The pool-slot index.\n * @param targetY - The row's translate-Y offset in pixels.\n * @param rowWidth - The row's width in pixels.\n * @returns `true` when the geometry changed (the subclass may need to re-lay\n * out the row's children), `false` when it was already at the target.\n */\n protected positionRow(slot: number, targetY: number, rowWidth: number): boolean {\n const row = this._rowPool[slot];\n const rowHeight = this.getRowHeight();\n const prev = this._rowGeom[slot];\n const geomChanged = !prev || prev.ty !== targetY || prev.w !== rowWidth || prev.h !== rowHeight;\n\n if (geomChanged) {\n row.setAutoCommitStyle(false);\n row.setX(0);\n row.setTranslate(0, targetY);\n row.setWidth(rowWidth);\n row.setHeight(rowHeight);\n row.setAutoCommitStyle(true);\n this._rowGeom[slot] = { ty: targetY, w: rowWidth, h: rowHeight };\n }\n\n if (!this._rowDisplayed[slot]) {\n row.setDisplayed(true);\n this._rowDisplayed[slot] = true;\n }\n\n return geomChanged;\n }\n\n /**\n * Hides pool slots whose index falls outside the visible window and\n * clears their cached binding so the next bind triggers a full rebuild.\n *\n * @param windowSize - The number of pool slots currently in use.\n */\n protected hideExcessPoolRows(windowSize: number): void {\n for (let i = windowSize; i < this._rowPool.length; i++) {\n if (this._rowDisplayed[i]) {\n this._rowPool[i].setDisplayed(false);\n this._rowDisplayed[i] = false;\n }\n this._boundIndices[i] = -1;\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Clears the cached row geometry so the next render re-applies positions and\n * sizes for every slot.\n */\n protected invalidateGeom(): void {\n for (let i = 0; i < this._rowGeom.length; i++) {\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Skips a render pass while the startup font gate is held, arranging for it\n * to run once the gate opens.\n *\n * @returns `true` when the caller must return without rendering.\n *\n * @remarks Both subclasses call {@link renderWindow} from many synchronous\n * entry points — `init`, a data change, a selection move — so a row's\n * geometry is routinely committed outside the coalesced layout queue, and\n * `init` in particular commits it the moment the element exists. Holding the\n * queue therefore does not hold these views; they have to check the gate\n * themselves. Deferring at this one choke point covers every entry point at\n * once, rather than guarding each caller.\n */\n protected deferRenderWhileFirstLayoutHeld(): boolean {\n if (!isFirstLayoutHeld()) {\n // This render is going ahead, which satisfies anything a held pass\n // left pending — clearing it keeps a later layout from replaying a\n // startup-era pass over the fresher state this one just committed.\n // Note that it also took over that pass's unfinished business, so\n // flag it for `finishResumedRender` to pick up once it has rendered.\n this._renderResumed = this._renderDeferred;\n this._renderDeferred = false;\n\n return false;\n }\n\n this._renderDeferred = true;\n this.scheduleLayout();\n\n return true;\n }\n\n /**\n * Whether the last render pass on this view was skipped by the startup font\n * gate and is still waiting to run.\n *\n * @returns `true` while a pass is pending.\n */\n protected wasRenderDeferred(): boolean {\n return this._renderDeferred;\n }\n\n /**\n * Reports, once, that the render now finishing is the one a held pass left\n * pending — so the caller can redo the post-render work that pass skipped.\n *\n * @returns `true` exactly once per resumed pass, at the end of the render\n * that resumed it.\n *\n * @remarks Called at the tail of {@link renderWindow} rather than from a\n * layout hook because a render resumes from whichever entry point reaches\n * it first, and for the table body that is the parent table layout calling\n * `renderWindow` directly rather than anything going through `doLayout`.\n */\n protected finishResumedRender(): boolean {\n // Read and clear before applying the scroll: applying it re-enters\n // `renderWindow` through the scroller's onScroll hook, and that nested\n // pass resets this flag. Reading it afterwards would lose the caller's\n // post-render work on exactly the passes that carry both.\n const resumed = this._renderResumed;\n\n this._renderResumed = false;\n\n // This pass has published the content extent, so any held offset can be\n // applied now — whether or not the pass is itself the deferred one.\n this.applyPendingScroll();\n\n return resumed;\n }\n\n /**\n * Runs the render pass the startup font gate deferred, if one is pending.\n * Each subclass calls this from its own `doLayout`, which is what picks the\n * pass back up once the gate opens.\n *\n * @returns `true` when a deferred pass ran, so the caller can skip a render\n * of its own and refresh whatever it keeps in step with the rendered rows.\n *\n * @remarks A paused view keeps its pass pending rather than running it: a\n * parent's layout recursion reaches `Body.doLayout` regardless of the\n * child's pause state, so rendering here would defeat a `pauseLayout` the\n * caller asked for. (`Tree.doLayout` already returns early when paused, so\n * the guard only binds for the body.) `resumeLayout` runs a layout of its\n * own, which picks the pass up.\n */\n protected renderWindowIfDeferred(): boolean {\n if (!this._renderDeferred || this.isLayoutPaused()) {\n return false;\n }\n\n // The pending flag is left for `renderWindow`'s own gate check to\n // consume: that is what marks this render as the resumed one, which\n // `finishResumedRender` reads at the end of the pass.\n this.renderWindow();\n\n return true;\n }\n\n /**\n * Re-binds and re-renders every pooled row after a text-metrics reflow —\n * a theme change, or the web font swapping in over the fallback face.\n *\n * @remarks Pooled rows do not ride `ThemeManager`'s reflow for free. Both\n * subclasses render through renderers whose `Text` runs with\n * `setAutoMeasure(false)`, so a bound row only re-measures inside the\n * renderer's `update()` — which {@link renderWindow} skips for a slot that\n * is already bound to its data index. Without the `_boundIndices` reset a\n * visible row therefore keeps the width it measured against whichever font\n * was active when it was bound, clipping the wider glyphs of the real face\n * once it arrives. Subclasses that cache metrics-derived state of their own\n * (row height, content width) override this to refresh it, then chain up.\n */\n protected onThemeReflow(): void {\n this._boundIndices.fill(-1);\n this.invalidateGeom();\n this.renderWindow();\n }\n\n /**\n * Scrolls the view so the row at `index` is fully visible, without moving\n * the viewport unless necessary. Delegates through {@link VirtualScroller}\n * so the header translate + scrollbar thumb stay in sync.\n *\n * @param index - The data index of the row to reveal. A negative index is a\n * no-op (the row is not in the current view).\n */\n protected scrollRowIntoView(index: number): void {\n if (index < 0 || !this._scroller) {\n return;\n }\n\n // Hold the row, not a target. The target depends on this view's height,\n // and at startup that height arrives from the very layout the gate is\n // holding — so computing it now would either read an unset height and\n // reveal nothing, or read 0 and scroll the row just out of view.\n if (isFirstLayoutHeld()) {\n this._pendingScrollRow = index;\n\n return;\n }\n\n const rowHeight = this.getRowHeight();\n const top = index * rowHeight;\n const bottom = top + rowHeight;\n const scrollTop = this._scroller.getScrollY();\n const viewportHeight = this.getHeight();\n const visibleBottom = scrollTop + viewportHeight;\n\n let target = scrollTop;\n if (top < scrollTop) {\n target = top;\n } else if (bottom > visibleBottom) {\n target = bottom - viewportHeight;\n }\n if (target !== scrollTop) {\n this.setScrollY(target);\n }\n }\n}\n\nexport { VirtualRowView };\n","// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\n/**\n * Compares two selection sets by membership only — size and element\n * identity, regardless of insertion order.\n *\n * Pure; no DOM, no component state.\n *\n * @typeParam T - The selection identity type.\n * @param a - One selection set.\n * @param b - The other selection set.\n * @returns `true` when both sets have the same size and every member of\n * `a` is present in `b`.\n *\n * @internal Shared by `Tree` and `Body`; not barrel-exported.\n */\nexport function selectionsEqual<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): boolean {\n if (a.size !== b.size) {\n return false;\n }\n\n for (const item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":"sIASA,IAAM,EAAgB,EAGtB,SAAS,WAAc,EAAU,EAAqB,CAClD,EAAI,KAAK,GAAG,EAAI,OAAO,EAAG,CAAK,CAAC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,GAEhB,GAOf,CAQA,mBAAuC,CACnC,OAAO,KAAK,eAChB,CAcA,qBAAyC,CAKrC,IAAM,EAAU,KAAK,eAQrB,MANA,MAAK,eAAiB,GAItB,KAAK,mBAAmB,EAEjB,CACX,CAiBA,wBAA4C,CAUxC,MATI,CAAC,KAAK,iBAAmB,KAAK,eAAe,EACtC,IAMX,KAAK,aAAa,EAEX,GACX,CAgBA,eAAgC,CAC5B,KAAK,cAAc,KAAK,EAAE,EAC1B,KAAK,eAAe,EACpB,KAAK,aAAa,CACtB,CAUA,kBAA4B,EAAqB,CAC7C,GAAI,EAAQ,GAAK,CAAC,KAAK,UACnB,OAOJ,GAAI,EAAkB,EAAG,CACrB,KAAK,kBAAoB,EAEzB,MACJ,CAEA,IAAM,EAAiB,KAAK,aAAa,EACnC,EAAiB,EAAQ,EACzB,EAAiB,EAAM,EACvB,EAAiB,KAAK,UAAU,WAAW,EAC3C,EAAiB,KAAK,UAAU,EAChC,EAAiB,EAAY,EAE/B,EAAS,EACT,EAAM,EACN,EAAS,EACF,EAAS,IAChB,EAAS,EAAS,GAElB,IAAW,GACX,KAAK,WAAW,CAAM,CAE9B,CACJ,ECvlBA,SAAgB,gBAAmB,EAAmB,EAA4B,CAC9E,GAAI,EAAE,OAAS,EAAE,KACb,MAAO,GAGX,IAAK,IAAM,KAAQ,EACf,GAAI,CAAC,EAAE,IAAI,CAAI,EACX,MAAO,GAIf,MAAO,EACX"}
1
+ {"version":3,"file":"selectionsEqual-DWdW5pxP.js","names":[],"sources":["../../src/typescript/lib/component/shared/VirtualRowView.ts","../../src/typescript/lib/component/shared/selectionsEqual.ts"],"sourcesContent":["// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\nimport { Component, ComponentOptions } from \"~/core/Component.js\";\nimport { DOM } from \"~/core/DOM.js\";\nimport type { Handle } from \"~/core/DOM.js\";\nimport { VirtualScroller } from \"~/component/container/VirtualScroller.js\";\nimport { isFirstLayoutHeld } from \"~/core/FirstLayoutGate.js\";\n\n/** Number of off-screen rows to render above and below the visible viewport. */\nconst SCROLL_BUFFER = 2;\n\n/** Rotates `arr` left by `shift` in place: `arr[i]` becomes what was at `arr[(i + shift) % arr.length]`. */\nfunction rotateLeft<T>(arr: T[], shift: number): void {\n arr.push(...arr.splice(0, shift));\n}\n\n/**\n * Shared transform-windowed virtual-scroll base for the data views —\n * `table/Body` and `tree/Tree` are its only two subclasses. It owns the\n * recycled row pool (`_rowPool` and the parallel `_boundIndices` / `_rowGeom` /\n * `_rowDisplayed` bookkeeping arrays), the {@link VirtualScroller} wiring, and\n * the window / pool-growth / geometry reconciliation primitives each subclass's\n * render pass composes.\n *\n * Only two things genuinely diverge between the two consumers, so only those\n * are hooks:\n *\n * - **Row height** — `Body` derives it live from the theme line box; `Tree`\n * uses a fixed constant. Read through {@link getRowHeight} on every call so a\n * live theme change is honoured.\n * - **Row construction** — the pool-row scaffolding (fragment batching, `setY(0)`\n * pin, `will-change` promotion, parallel-array bookkeeping) is identical; only\n * the row object each subclass builds differs. {@link createPoolRow} returns a\n * fully-constructed, un-appended row and the base owns the rest.\n *\n * The per-frame render pass itself ({@link renderWindow}) stays subclass-specific\n * because the content-width derivation genuinely diverges; the base exposes the\n * shared primitives it calls ({@link computeVisibleWindow},\n * {@link computePoolTarget}, {@link growRowPool}, {@link positionRow},\n * {@link hideExcessPoolRows}).\n *\n * @typeParam TRow - The concrete pooled row component type.\n * @typeParam TOptions - The subclass's options bag.\n *\n * @internal Not barrel-exported; the two subclasses are the only consumers.\n */\nabstract class VirtualRowView<\n TRow extends Component,\n TOptions extends ComponentOptions = ComponentOptions,\n> extends Component<TOptions> {\n\n protected _rowPool : TRow[] = [];\n protected _boundIndices : number[] = [];\n protected _rowGeom : Array<{ ty: number, w: number, h: number } | null> = [];\n protected _rowDisplayed : boolean[] = [];\n protected _scroller : VirtualScroller | null = null;\n\n /** The data index pool slot 0 was aligned to on the last render, for {@link alignPoolWindow} to derive the scroll delta. `null` before the first render. */\n private _lastWindowStart: number | null = null;\n\n /** Whether the startup font gate skipped a render pass that still owes a run. */\n private _renderDeferred: boolean = false;\n /** Whether the render now in flight is the one a skipped pass left pending. */\n private _renderResumed : boolean = false;\n /** Scroll offsets the gate held back, applied once a render pass has run. */\n private _pendingScrollX: number | null = null;\n private _pendingScrollY: number | null = null;\n /** A row reveal the gate held back, recomputed once a render pass has run. */\n private _pendingScrollRow: number | null = null;\n\n /**\n * Returns the height in pixels of a single row. Read on every window /\n * geometry calculation, so a subclass that recomputes it (e.g. on a theme\n * change) reflects the new value immediately.\n */\n protected abstract getRowHeight(): number;\n\n /**\n * Constructs one pool row, fully wired but not yet appended to the\n * rows container — the base's {@link growRowPool} owns the append, the\n * `setY(0)` pin, the `will-change` promotion, and the parallel-array\n * bookkeeping.\n */\n protected abstract createPoolRow(): TRow;\n\n /**\n * Recomputes and reconciles the visible row window against the current\n * scroll position and dataset. Subclass-specific because the content-width\n * derivation diverges; both implementations compose the shared primitives\n * on this base.\n */\n protected abstract renderWindow(): void;\n\n /**\n * Constructs the {@link VirtualScroller} for this view and tracks its\n * container handles so they are released with the component. The scroller's\n * onScroll hook is routed through {@link onScrollerTick}.\n *\n * @param element - This view's initialised element handle.\n */\n protected initScroller(element: Handle): void {\n this._scroller = new VirtualScroller(this, element, () => this.onScrollerTick());\n\n // Track the scroller's created container handles so they are released\n // with this view (on destructor or GC); the scroller is not a Component.\n for (const handle of this._scroller.ownedHandles()) {\n this.trackHandle(handle);\n }\n }\n\n /**\n * Invoked on every scroller tick. Default behaviour re-renders the window;\n * `Body` overrides it to additionally emit its scroll events.\n */\n protected onScrollerTick(): void {\n this.renderWindow();\n }\n\n /**\n * Destroys the pooled rows and the scroller's overlay scrollbars before the\n * inherited teardown runs.\n *\n * {@link growRowPool} appends each row's element straight to the rows\n * container and keeps the row only in `_rowPool`, so a pooled row is never\n * registered as a child component and the base destructor's recursion over\n * `_components` cannot reach it. Without this override neither the rows nor\n * their cells (which *are* registered on their row) release their\n * per-instance stylesheet rules, so the shared sheet grows by roughly the\n * view's whole cell count on every teardown. The scroller's two\n * `Scrollbar` overlays are raw-appended the same way, so they need the\n * same explicit disposal.\n */\n protected destructor(): void {\n for (const row of this._rowPool) {\n row.dispose();\n }\n\n this._scroller?.dispose();\n\n super.destructor();\n }\n\n /**\n * Sets the JS-controlled horizontal scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param x - The new scroll position in pixels.\n */\n setScrollX(x: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"x\", x)) {\n return this;\n }\n\n this._scroller?.setScrollX(x);\n\n return this;\n }\n\n /**\n * Sets the JS-controlled vertical scroll position. Delegates to the\n * underlying {@link VirtualScroller}.\n *\n * @param y - The new scroll position in pixels.\n */\n setScrollY(y: number): this {\n // Ahead of the hold: a programmatic scroll cancels an in-flight wheel\n // ease whether or not the offset itself has to wait.\n this._scroller?.resetWheelEase();\n\n if (this.holdScrollWhileFirstLayoutHeld(\"y\", y)) {\n return this;\n }\n\n this._scroller?.setScrollY(y);\n\n return this;\n }\n\n /**\n * Holds a scroll offset set while the startup font gate is holding this\n * view's render pass, for {@link applyPendingScroll} to apply once the pass\n * has run.\n *\n * @param axis - Which offset is being set.\n * @param offset - The requested offset in pixels.\n *\n * @returns `true` when the caller must return without scrolling.\n *\n * @remarks The scroller clamps every offset against a content extent that\n * only the render pass publishes, so an offset set while that pass is\n * deferred clamps to 0 and the request is lost — a row revealed during\n * startup would end up selected but off-screen. This guards the offsets\n * that are viewport-independent and so can be replayed verbatim: the\n * table's `scrollToRecord`, and a consumer restoring a saved offset.\n * `scrollRowIntoView` is held one level higher instead, by row index, since\n * its target depends on a height the gate is also holding. The table's\n * `scrollColumnIntoView` has that same width dependence but fires only from\n * a pooled cell's editor, which cannot exist while the pass is deferred.\n */\n private holdScrollWhileFirstLayoutHeld(axis: \"x\" | \"y\", offset: number): boolean {\n if (!isFirstLayoutHeld()) {\n // This offset is being applied for real, so it supersedes anything\n // held for the same axis — otherwise the held one would replay on\n // the next render and revert it. A held row reveal is a vertical\n // request too, so it goes with the Y offset.\n if (axis === \"x\") {\n this._pendingScrollX = null;\n } else {\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n }\n\n return false;\n }\n\n if (axis === \"x\") {\n this._pendingScrollX = offset;\n } else {\n this._pendingScrollY = offset;\n this._pendingScrollRow = null;\n }\n\n return true;\n }\n\n /**\n * Applies the scroll offsets {@link holdScrollWhileFirstLayoutHeld} held\n * back, now that a render pass has published the content extent they clamp\n * against. A no-op once they are applied.\n */\n private applyPendingScroll(): void {\n const x = this._pendingScrollX;\n const y = this._pendingScrollY;\n const row = this._pendingScrollRow;\n\n this._pendingScrollX = null;\n this._pendingScrollY = null;\n this._pendingScrollRow = null;\n\n if (x !== null) {\n this.setScrollX(x);\n }\n\n if (y !== null) {\n this.setScrollY(y);\n }\n\n // Applied after the offsets, which is what makes a reveal win over a\n // raw offset held before it. The reverse order is handled the other\n // way: a raw offset set later clears the reveal outright, so the two\n // vertical requests always resolve to whichever came last.\n if (row !== null) {\n this.scrollRowIntoView(row);\n }\n }\n\n /**\n * Computes the `[firstRow, lastRow]` data-index window visible in the\n * current viewport, padded by `SCROLL_BUFFER` on each side and clamped to\n * the dataset bounds.\n *\n * @param scrollY - The current scroll offset in pixels.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The `firstRow` / `lastRow` data indices and the number of rows in the window.\n */\n protected computeVisibleWindow(scrollY: number, visibleHeight: number, totalRows: number): { firstRow: number, lastRow: number, windowSize: number } {\n const rowHeight = this.getRowHeight();\n const firstRow = Math.max(0, Math.floor(scrollY / rowHeight) - SCROLL_BUFFER);\n const lastRow = Math.min(\n totalRows - 1,\n Math.ceil((scrollY + visibleHeight) / rowHeight) + SCROLL_BUFFER\n );\n const windowSize = lastRow - firstRow + 1 > 0 ? lastRow - firstRow + 1 : 0;\n\n return { firstRow, lastRow, windowSize };\n }\n\n /**\n * Computes the row-pool target size: the max possible window for the\n * current viewport, not just the current windowSize. windowSize shrinks\n * near the top/bottom edges of the dataset because firstRow clamps to 0\n * (and lastRow to totalRows-1); growing only to windowSize would force\n * regrowth mid-scroll once the user passes a viewport-edge boundary. Pre-\n * growing pays the per-row first-layout cost once.\n *\n * @param windowSize - The current visible-window size.\n * @param visibleHeight - The viewport height in pixels.\n * @param totalRows - The total number of rows in the dataset.\n * @returns The pool target size.\n */\n protected computePoolTarget(windowSize: number, visibleHeight: number, totalRows: number): number {\n return Math.min(\n totalRows,\n Math.max(\n windowSize,\n Math.ceil(visibleHeight / this.getRowHeight()) + 2 * SCROLL_BUFFER + 2\n )\n );\n }\n\n /**\n * Computes the number of whole rows a page-nav keystroke should move by:\n * one viewport height, floored to at least one row.\n *\n * @returns The page size in rows.\n */\n protected computePageSize(): number {\n const rowHeight = this.getRowHeight();\n\n return Math.max(1, Math.floor((this.getHeight() || rowHeight) / rowHeight));\n }\n\n /**\n * Grows the row pool up to `poolTarget`, batching new row elements through\n * a {@link DocumentFragment} so the live rows container sees a single\n * append instead of N. Each new slot pins its static top to 0, promotes it\n * to its own compositor layer, and extends the parallel bookkeeping arrays\n * in lockstep.\n *\n * @param poolTarget - The target pool size.\n */\n protected growRowPool(poolTarget: number): void {\n if (!this._scroller || this._rowPool.length >= poolTarget) {\n return;\n }\n\n const rowsContainer = this._scroller.getRowsContainer();\n const growFragment = DOM.sink.createDocumentFragment();\n\n while (this._rowPool.length < poolTarget) {\n const row = this.createPoolRow();\n const rowEl = row.getElement(true)!;\n\n DOM.sink.appendChild(growFragment, rowEl);\n\n // Pin row's static top to 0 once. Per-frame Y offset comes from\n // translateY, which is composite-only (avoids layout/paint per\n // scroll tick).\n row.setY(0);\n\n // Pre-promote pooled rows to their own compositor layer so the first\n // scroll-driven translate doesn't pay a layer-creation cost.\n row.setWillChange(\"transform\");\n\n this._rowPool.push(row);\n this._boundIndices.push(-1);\n this._rowGeom.push(null);\n this._rowDisplayed.push(false);\n }\n\n DOM.sink.appendChild(rowsContainer, growFragment);\n DOM.sink.release(growFragment);\n }\n\n /**\n * Rotates the pool bookkeeping arrays so each slot keeps tracking the\n * same data index it held before the window moved, instead of being\n * rebound to whichever index now falls at that slot's window-relative\n * position.\n *\n * @param firstRow - The new window's first data index.\n *\n * @remarks Both subclasses key a pool slot by its offset within the\n * window (`firstRow + i`), so without this a one-row scroll shifts every\n * slot's data index by one and forces every pooled row — including the\n * off-screen `SCROLL_BUFFER` rows — through a full rebind and\n * reposition on every tick, instead of just the one row entering the\n * window. Call once per render, after {@link growRowPool} and before the\n * bind pass reads `_rowPool` / `_boundIndices` / `_rowGeom` /\n * `_rowDisplayed` by slot index.\n */\n protected alignPoolWindow(firstRow: number): void {\n const delta = this._lastWindowStart === null ? 0 : firstRow - this._lastWindowStart;\n\n this._lastWindowStart = firstRow;\n\n const n = this._rowPool.length;\n if (delta === 0 || n === 0) {\n return;\n }\n\n const shift = ((delta % n) + n) % n;\n\n rotateLeft(this._rowPool, shift);\n rotateLeft(this._boundIndices, shift);\n rotateLeft(this._rowGeom, shift);\n rotateLeft(this._rowDisplayed, shift);\n }\n\n /**\n * Positions the pool slot at `slot` to `targetY` and sizes it to `rowWidth`,\n * writing the translate/size only when the cached geometry differs from the\n * target, and toggling the row displayed on the false→true edge.\n *\n * @param slot - The pool-slot index.\n * @param targetY - The row's translate-Y offset in pixels.\n * @param rowWidth - The row's width in pixels.\n * @returns `true` when the geometry changed (the subclass may need to re-lay\n * out the row's children), `false` when it was already at the target.\n */\n protected positionRow(slot: number, targetY: number, rowWidth: number): boolean {\n const row = this._rowPool[slot];\n const rowHeight = this.getRowHeight();\n const prev = this._rowGeom[slot];\n const geomChanged = !prev || prev.ty !== targetY || prev.w !== rowWidth || prev.h !== rowHeight;\n\n if (geomChanged) {\n row.setAutoCommitStyle(false);\n row.setX(0);\n row.setTranslate(0, targetY);\n row.setWidth(rowWidth);\n row.setHeight(rowHeight);\n row.setAutoCommitStyle(true);\n this._rowGeom[slot] = { ty: targetY, w: rowWidth, h: rowHeight };\n }\n\n if (!this._rowDisplayed[slot]) {\n row.setDisplayed(true);\n this._rowDisplayed[slot] = true;\n }\n\n return geomChanged;\n }\n\n /**\n * Hides pool slots whose index falls outside the visible window and\n * clears their cached binding so the next bind triggers a full rebuild.\n *\n * @param windowSize - The number of pool slots currently in use.\n */\n protected hideExcessPoolRows(windowSize: number): void {\n for (let i = windowSize; i < this._rowPool.length; i++) {\n if (this._rowDisplayed[i]) {\n this._rowPool[i].setDisplayed(false);\n this._rowDisplayed[i] = false;\n }\n this._boundIndices[i] = -1;\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Clears the cached row geometry so the next render re-applies positions and\n * sizes for every slot.\n */\n protected invalidateGeom(): void {\n for (let i = 0; i < this._rowGeom.length; i++) {\n this._rowGeom[i] = null;\n }\n }\n\n /**\n * Skips a render pass while the startup font gate is held, arranging for it\n * to run once the gate opens.\n *\n * @returns `true` when the caller must return without rendering.\n *\n * @remarks Both subclasses call {@link renderWindow} from many synchronous\n * entry points — `init`, a data change, a selection move — so a row's\n * geometry is routinely committed outside the coalesced layout queue, and\n * `init` in particular commits it the moment the element exists. Holding the\n * queue therefore does not hold these views; they have to check the gate\n * themselves. Deferring at this one choke point covers every entry point at\n * once, rather than guarding each caller.\n */\n protected deferRenderWhileFirstLayoutHeld(): boolean {\n if (!isFirstLayoutHeld()) {\n // This render is going ahead, which satisfies anything a held pass\n // left pending — clearing it keeps a later layout from replaying a\n // startup-era pass over the fresher state this one just committed.\n // Note that it also took over that pass's unfinished business, so\n // flag it for `finishResumedRender` to pick up once it has rendered.\n this._renderResumed = this._renderDeferred;\n this._renderDeferred = false;\n\n return false;\n }\n\n this._renderDeferred = true;\n this.scheduleLayout();\n\n return true;\n }\n\n /**\n * Whether the last render pass on this view was skipped by the startup font\n * gate and is still waiting to run.\n *\n * @returns `true` while a pass is pending.\n */\n protected wasRenderDeferred(): boolean {\n return this._renderDeferred;\n }\n\n /**\n * Reports, once, that the render now finishing is the one a held pass left\n * pending — so the caller can redo the post-render work that pass skipped.\n *\n * @returns `true` exactly once per resumed pass, at the end of the render\n * that resumed it.\n *\n * @remarks Called at the tail of {@link renderWindow} rather than from a\n * layout hook because a render resumes from whichever entry point reaches\n * it first, and for the table body that is the parent table layout calling\n * `renderWindow` directly rather than anything going through `doLayout`.\n */\n protected finishResumedRender(): boolean {\n // Read and clear before applying the scroll: applying it re-enters\n // `renderWindow` through the scroller's onScroll hook, and that nested\n // pass resets this flag. Reading it afterwards would lose the caller's\n // post-render work on exactly the passes that carry both.\n const resumed = this._renderResumed;\n\n this._renderResumed = false;\n\n // This pass has published the content extent, so any held offset can be\n // applied now — whether or not the pass is itself the deferred one.\n this.applyPendingScroll();\n\n return resumed;\n }\n\n /**\n * Runs the render pass the startup font gate deferred, if one is pending.\n * Each subclass calls this from its own `doLayout`, which is what picks the\n * pass back up once the gate opens.\n *\n * @returns `true` when a deferred pass ran, so the caller can skip a render\n * of its own and refresh whatever it keeps in step with the rendered rows.\n *\n * @remarks A paused view keeps its pass pending rather than running it: a\n * parent's layout recursion reaches `Body.doLayout` regardless of the\n * child's pause state, so rendering here would defeat a `pauseLayout` the\n * caller asked for. (`Tree.doLayout` already returns early when paused, so\n * the guard only binds for the body.) `resumeLayout` runs a layout of its\n * own, which picks the pass up.\n */\n protected renderWindowIfDeferred(): boolean {\n if (!this._renderDeferred || this.isLayoutPaused()) {\n return false;\n }\n\n // The pending flag is left for `renderWindow`'s own gate check to\n // consume: that is what marks this render as the resumed one, which\n // `finishResumedRender` reads at the end of the pass.\n this.renderWindow();\n\n return true;\n }\n\n /**\n * Re-binds and re-renders every pooled row after a text-metrics reflow —\n * a theme change, or the web font swapping in over the fallback face.\n *\n * @remarks Pooled rows do not ride `ThemeManager`'s reflow for free. Both\n * subclasses render through renderers whose `Text` runs with\n * `setAutoMeasure(false)`, so a bound row only re-measures inside the\n * renderer's `update()` — which {@link renderWindow} skips for a slot that\n * is already bound to its data index. Without the `_boundIndices` reset a\n * visible row therefore keeps the width it measured against whichever font\n * was active when it was bound, clipping the wider glyphs of the real face\n * once it arrives. Subclasses that cache metrics-derived state of their own\n * (row height, content width) override this to refresh it, then chain up.\n */\n protected onThemeReflow(): void {\n this._boundIndices.fill(-1);\n this.invalidateGeom();\n this.renderWindow();\n }\n\n /**\n * Scrolls the view so the row at `index` is fully visible, without moving\n * the viewport unless necessary. Delegates through {@link VirtualScroller}\n * so the header translate + scrollbar thumb stay in sync.\n *\n * @param index - The data index of the row to reveal. A negative index is a\n * no-op (the row is not in the current view).\n */\n protected scrollRowIntoView(index: number): void {\n if (index < 0 || !this._scroller) {\n return;\n }\n\n // Hold the row, not a target. The target depends on this view's height,\n // and at startup that height arrives from the very layout the gate is\n // holding — so computing it now would either read an unset height and\n // reveal nothing, or read 0 and scroll the row just out of view.\n if (isFirstLayoutHeld()) {\n this._pendingScrollRow = index;\n\n return;\n }\n\n const rowHeight = this.getRowHeight();\n const top = index * rowHeight;\n const bottom = top + rowHeight;\n const scrollTop = this._scroller.getScrollY();\n const viewportHeight = this.getHeight();\n const visibleBottom = scrollTop + viewportHeight;\n\n let target = scrollTop;\n if (top < scrollTop) {\n target = top;\n } else if (bottom > visibleBottom) {\n target = bottom - viewportHeight;\n }\n if (target !== scrollTop) {\n this.setScrollY(target);\n }\n }\n}\n\nexport { VirtualRowView };\n","// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0\n\n/**\n * Compares two selection sets by membership only — size and element\n * identity, regardless of insertion order.\n *\n * Pure; no DOM, no component state.\n *\n * @typeParam T - The selection identity type.\n * @param a - One selection set.\n * @param b - The other selection set.\n * @returns `true` when both sets have the same size and every member of\n * `a` is present in `b`.\n *\n * @internal Shared by `Tree` and `Body`; not barrel-exported.\n */\nexport function selectionsEqual<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): boolean {\n if (a.size !== b.size) {\n return false;\n }\n\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,OAAQ,IACtC,KAAK,SAAS,GAAK,IAE3B,CAgBA,iCAAqD,CAgBjD,OAfK,EAAkB,GAYvB,KAAK,gBAAkB,GACvB,KAAK,eAAe,EAEb,KATH,KAAK,eAAkB,KAAK,gBAC5B,KAAK,gBAAkB,GAEhB,GAOf,CAQA,mBAAuC,CACnC,OAAO,KAAK,eAChB,CAcA,qBAAyC,CAKrC,IAAM,EAAU,KAAK,eAQrB,MANA,MAAK,eAAiB,GAItB,KAAK,mBAAmB,EAEjB,CACX,CAiBA,wBAA4C,CAUxC,MATI,CAAC,KAAK,iBAAmB,KAAK,eAAe,EACtC,IAMX,KAAK,aAAa,EAEX,GACX,CAgBA,eAAgC,CAC5B,KAAK,cAAc,KAAK,EAAE,EAC1B,KAAK,eAAe,EACpB,KAAK,aAAa,CACtB,CAUA,kBAA4B,EAAqB,CAC7C,GAAI,EAAQ,GAAK,CAAC,KAAK,UACnB,OAOJ,GAAI,EAAkB,EAAG,CACrB,KAAK,kBAAoB,EAEzB,MACJ,CAEA,IAAM,EAAiB,KAAK,aAAa,EACnC,EAAiB,EAAQ,EACzB,EAAiB,EAAM,EACvB,EAAiB,KAAK,UAAU,WAAW,EAC3C,EAAiB,KAAK,UAAU,EAChC,EAAiB,EAAY,EAE/B,EAAS,EACT,EAAM,EACN,EAAS,EACF,EAAS,IAChB,EAAS,EAAS,GAElB,IAAW,GACX,KAAK,WAAW,CAAM,CAE9B,CACJ,ECvlBA,SAAgB,gBAAmB,EAAmB,EAA4B,CAC9E,GAAI,EAAE,OAAS,EAAE,KACb,MAAO,GAGX,IAAK,IAAM,KAAQ,EACf,GAAI,CAAC,EAAE,IAAI,CAAI,EACX,MAAO,GAIf,MAAO,EACX"}
@@ -1,10 +1,11 @@
1
1
  import { Component, ComponentOptions } from "../../core/Component.js";
2
+ import { type Handle } from "../../core/DOM.js";
2
3
  import { Event } from "../../core/Event.js";
3
4
  import { Text } from "../../component/input/Text.js";
4
5
  import { Glyph } from "../../component/display/Glyph.js";
5
6
  import { FillType } from "../../layout/FillType.js";
6
7
  import { AnchorType } from "../../layout/AnchorType.js";
7
- import type { ClassStyleDefaults } from "../../core/ClassStyleRules.js";
8
+ import { type StyleBag, type StyleStateSpec } from "../../core/ClassStyleRules.js";
8
9
  import { BorderOptions } from "../../primitive/Border.js";
9
10
  import { Insets } from "../../primitive/Insets.js";
10
11
  import { Size } from "../../primitive/Size.js";
@@ -42,7 +43,8 @@ export interface ButtonOptions extends ComponentOptions {
42
43
  };
43
44
  }
44
45
  declare class Button<TOptions extends ButtonOptions = ButtonOptions> extends Component<TOptions> {
45
- protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
46
+ protected static readonly ownClassStyleDefaults: StyleBag;
47
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
46
48
  private _text;
47
49
  protected _content: Component;
48
50
  private _titleColumn;
@@ -68,23 +70,12 @@ declare class Button<TOptions extends ButtonOptions = ButtonOptions> extends Com
68
70
  private readonly _onSpaceDown;
69
71
  private readonly _onSpaceUp;
70
72
  private readonly _onBlur;
71
- private _pressedStyleRule?;
72
- private get pressedStyleRule();
73
- private _pressedBorder;
74
- private _hoverStyleRule?;
75
- private get hoverStyleRule();
76
- private _hoverBorder;
77
- protected getRestingExclusionSuffixes(): readonly string[];
78
- protected setElementCSSRule(key: string, value: Object | null): this;
79
- protected static extractPressedClassDeclarations(defaults: Partial<ButtonOptions>): Record<string, string | null>;
80
- protected getPressedClassDeclarations(): Record<string, string | null>;
81
- protected static extractHoverClassDeclarations(_defaults: Partial<ButtonOptions>): Record<string, string | null>;
82
- protected getHoverClassDeclarations(): Record<string, string | null>;
83
73
  private _flat?;
84
74
  private _compact?;
85
75
  private _enabledCursor;
86
76
  constructor(text?: string, options?: ButtonOptions, subclassDefaults?: Partial<ButtonOptions>);
87
77
  constructor(options: ButtonOptions);
78
+ protected destructor(): void;
88
79
  getAnchor(): AnchorType;
89
80
  getFill(): FillType;
90
81
  protected applyOptions(options: TOptions): this;
@@ -184,6 +175,7 @@ declare class Button<TOptions extends ButtonOptions = ButtonOptions> extends Com
184
175
  isShowDescription(): boolean;
185
176
  setShowText(value: boolean): this;
186
177
  isShowText(): boolean;
178
+ protected render(): Handle;
187
179
  }
188
180
  declare const ButtonCallable: import("../../core/Callable.js").Callable<typeof Button>;
189
181
  type ButtonCallable<TOptions extends ButtonOptions = ButtonOptions> = Button<TOptions>;
@@ -1,12 +1,12 @@
1
1
  import { ToggleButton, ToggleButtonOptions } from "../../component/button/ToggleButton.js";
2
- import type { ButtonOptions } from "../../component/button/Button.js";
3
2
  import { TabCloseButton } from "../../component/button/TabCloseButton.js";
4
- import type { ClassStyleDefaults } from "../../core/ClassStyleRules.js";
3
+ import type { StyleBag, StyleStateSpec } from "../../core/ClassStyleRules.js";
5
4
  export interface TabButtonOptions extends ToggleButtonOptions {
6
5
  closeable?: boolean;
7
6
  }
8
7
  declare class TabButton extends ToggleButton {
9
- protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
8
+ protected static readonly ownClassStyleDefaults: StyleBag;
9
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
10
10
  private _closeable;
11
11
  private _closeButton;
12
12
  private _busy;
@@ -14,8 +14,6 @@ declare class TabButton extends ToggleButton {
14
14
  constructor(text: string, options?: TabButtonOptions, subclassDefaults?: Partial<TabButtonOptions>);
15
15
  protected destructor(): void;
16
16
  private applyTabStyling;
17
- protected static extractSelectedClassDeclarations(_defaults: Partial<ButtonOptions>): Record<string, string | null>;
18
- protected getSelectedClassDeclarations(): Record<string, string | null>;
19
17
  private buildCloseButton;
20
18
  getCloseButton(): TabCloseButton | null;
21
19
  isCloseable(): boolean;
@@ -1,7 +1,10 @@
1
1
  import { Button, ButtonOptions } from "../../component/button/Button.js";
2
+ import type { StyleBag, StyleStateSpec } from "../../core/ClassStyleRules.js";
2
3
  export interface TabCloseButtonOptions extends ButtonOptions {
3
4
  }
4
5
  declare class TabCloseButton extends Button<TabCloseButtonOptions> {
6
+ protected static readonly ownClassStyleDefaults: StyleBag;
7
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
5
8
  constructor(options?: TabCloseButtonOptions, subclassDefaults?: Partial<TabCloseButtonOptions>);
6
9
  }
7
10
  declare const TabCloseButtonCallable: import("../../core/Callable.js").Callable<typeof TabCloseButton>;
@@ -1,14 +1,11 @@
1
+ import { type StyleStateSpec } from "../../core/ClassStyleRules.js";
1
2
  import { BorderOptions } from "../../primitive/Border.js";
2
3
  import { Button, ButtonOptions, ClickListener } from "../../component/button/Button.js";
3
4
  export interface ToggleButtonOptions extends ButtonOptions {
4
5
  selected?: boolean;
5
6
  }
6
7
  declare class ToggleButton extends Button<ToggleButtonOptions> {
7
- private _selectedStyleRule?;
8
- private get selectedStyleRule();
9
- protected static extractSelectedClassDeclarations(defaults: Partial<ButtonOptions>): Record<string, string | null>;
10
- protected getSelectedClassDeclarations(): Record<string, string | null>;
11
- protected getRestingExclusionSuffixes(): readonly string[];
8
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
12
9
  constructor(text: string, options?: ToggleButtonOptions, subclassDefaults?: Partial<ToggleButtonOptions>);
13
10
  protected applyOptions(options: ToggleButtonOptions): this;
14
11
  on(event: "action", listener: ClickListener): this;
@@ -1,5 +1,5 @@
1
1
  import { Panel, PanelOptions } from "../../core/Panel.js";
2
- import type { ClassStyleDefaults } from "../../core/ClassStyleRules.js";
2
+ import type { StyleBag } from "../../core/ClassStyleRules.js";
3
3
  import type { Handle, ElementPatch } from "../../core/DOM.js";
4
4
  import { AbstractStore } from "../../data/AbstractStore.js";
5
5
  import type { ChartScale } from "../../component/chart/Scale.js";
@@ -22,7 +22,7 @@ export interface AbstractChartOptions extends PanelOptions {
22
22
  listeners?: ChartListeners;
23
23
  }
24
24
  export declare abstract class AbstractChart<O extends AbstractChartOptions = AbstractChartOptions> extends Panel<O> {
25
- protected static readonly ownClassStyleDefaults: ClassStyleDefaults;
25
+ protected static readonly ownClassStyleDefaults: StyleBag;
26
26
  private _listeners;
27
27
  protected _series: ChartSeriesModel[];
28
28
  protected _selectedPoint: {
@@ -1,6 +1,10 @@
1
1
  import { Component, ComponentOptions } from "../../core/Component.js";
2
2
  import { Button } from "../../component/button/Button.js";
3
3
  import type { AxisEnd } from "../../primitive/Axis.js";
4
+ import type { StyleBag } from "../../core/ClassStyleRules.js";
5
+ export declare const THEMED_HEADER_BG: string;
6
+ export declare const THEMED_HEADER_BORDER: string;
7
+ export declare const THEMED_HEADER_COLOR: string;
4
8
  export interface AccordionHeaderOptions extends ComponentOptions {
5
9
  expanded?: boolean;
6
10
  chevronSide?: AxisEnd;
@@ -9,12 +13,13 @@ export interface AccordionHeaderOptions extends ComponentOptions {
9
13
  chevronGlyph?: string;
10
14
  }
11
15
  declare class AccordionHeader extends Component<AccordionHeaderOptions> {
16
+ protected static readonly ownClassStyleDefaults: StyleBag;
12
17
  private _indicator;
13
18
  private _title;
14
19
  private _toolGroup;
15
20
  private _tools;
16
21
  private _chevronSide;
17
- constructor(label: string, options?: AccordionHeaderOptions);
22
+ constructor(label: string, options?: AccordionHeaderOptions, subclassDefaults?: Partial<AccordionHeaderOptions>);
18
23
  setCompact(value: boolean): this;
19
24
  private placeIndicator;
20
25
  getTitleButton(): Button;
@@ -1,10 +1,12 @@
1
1
  import { Component, ComponentOptions } from "../../core/Component.js";
2
2
  import type { Handle } from "../../core/DOM.js";
3
+ import type { StyleStateSpec } from "../../core/ClassStyleRules.js";
3
4
  export interface AccordionIndicatorOptions extends ComponentOptions {
4
5
  expanded?: boolean;
5
6
  character?: string;
6
7
  }
7
8
  declare class AccordionIndicator extends Component<AccordionIndicatorOptions> {
9
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
8
10
  private _expanded;
9
11
  private _character;
10
12
  private _lineHeight;
@@ -1,9 +1,11 @@
1
1
  import { Component, ComponentOptions } from "../../core/Component.js";
2
2
  import { Size } from "../../primitive/Size.js";
3
+ import type { StyleTrait } from "../../core/ClassStyleRules.js";
3
4
  export interface FieldSetOptions extends ComponentOptions {
4
5
  legend?: string;
5
6
  }
6
7
  declare class FieldSet extends Component {
8
+ protected static readonly ownStyleTraits: readonly StyleTrait[];
7
9
  private static readonly LEGEND_CLEARANCE_FALLBACK;
8
10
  private _legend;
9
11
  private _legendClearance;
@@ -6,7 +6,7 @@ export interface LabeledFieldSetOptions extends FieldSetOptions, LabeledGridOpti
6
6
  declare class LabeledFieldSet extends _FieldSet {
7
7
  private _labeledGrid;
8
8
  constructor(title?: string, options?: LabeledFieldSetOptions, subclassDefaults?: Partial<LabeledFieldSetOptions>);
9
- addField(title: string, component: Component): this;
9
+ addField(title: string, component: Component, description?: string): this;
10
10
  addRow(fields: LabeledFieldDescriptor[]): this;
11
11
  addFullWidthRow(component: Component): this;
12
12
  getColumns(): number;
@@ -3,6 +3,7 @@ import { Container, ContainerOptions } from "../../core/Container.js";
3
3
  export interface LabeledFieldDescriptor {
4
4
  title: string;
5
5
  component: Component;
6
+ description?: string;
6
7
  }
7
8
  export type LabeledRowDescriptor = LabeledFieldDescriptor[] | {
8
9
  component: Component;
@@ -18,8 +19,9 @@ declare class LabeledGrid extends Container<LabeledGridOptions> {
18
19
  private _grid;
19
20
  private _flowCol;
20
21
  private _rowCount;
22
+ private _tooltipTargets;
21
23
  constructor(options?: LabeledGridOptions);
22
- addField(title: string, component: Component): this;
24
+ addField(title: string, component: Component, description?: string): this;
23
25
  addRow(fields: LabeledFieldDescriptor[]): this;
24
26
  addFullWidthRow(component: Component): this;
25
27
  getColumns(): number;
@@ -28,6 +30,7 @@ declare class LabeledGrid extends Container<LabeledGridOptions> {
28
30
  private openRow;
29
31
  private finishRow;
30
32
  private growRows;
33
+ protected destructor(): void;
31
34
  }
32
35
  declare const LabeledGridCallable: import("../../core/Callable.js").Callable<typeof LabeledGrid>;
33
36
  type LabeledGridCallable = LabeledGrid;
@@ -1,11 +1,11 @@
1
1
  import { Text, TextOptions } from "../../component/input/Text.js";
2
- import type { Handle } from "../../core/DOM.js";
2
+ import type { StyleBag } from "../../core/ClassStyleRules.js";
3
3
  export interface LegendOptions extends TextOptions {
4
4
  }
5
5
  declare class Legend extends Text<LegendOptions> {
6
6
  private static readonly LEFT_MARGIN;
7
+ protected static readonly ownClassStyleDefaults: StyleBag;
7
8
  constructor(options?: LegendOptions);
8
- applyStyle(element: Handle): this;
9
9
  }
10
10
  declare const LegendCallable: import("../../core/Callable.js").Callable<typeof Legend>;
11
11
  type LegendCallable = Legend;
@@ -65,6 +65,7 @@ declare class MenuItem extends MenuRow {
65
65
  isSeparator(): boolean;
66
66
  isNavigable(): boolean;
67
67
  isEnabled(): boolean;
68
+ setEnabled(value: boolean): this;
68
69
  private activateLeaf;
69
70
  activate(): void;
70
71
  protected destructor(): void;
@@ -1,4 +1,5 @@
1
1
  import { Component, ComponentOptions } from "../../core/Component.js";
2
+ import type { StyleStateSpec } from "../../core/ClassStyleRules.js";
2
3
  import { Event } from "../../core/Event.js";
3
4
  export type WindowBorderEvent = "drag";
4
5
  export declare enum Direction {
@@ -17,14 +18,13 @@ export interface WindowBorderOptions extends ComponentOptions {
17
18
  };
18
19
  }
19
20
  declare class WindowBorder extends Component<WindowBorderOptions> {
21
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
20
22
  private _direction;
21
23
  private _listeners;
22
24
  private _dragStartListener;
23
25
  private _dragStopListener;
24
26
  private _fireDragListener;
25
27
  private _snapTarget;
26
- private _snapTargetStyleRule?;
27
- private get snapTargetStyleRule();
28
28
  constructor(direction: Direction, options?: WindowBorderOptions, subclassDefaults?: Partial<WindowBorderOptions>);
29
29
  getDirection(): Direction;
30
30
  setDirection(direction: Direction): this;
@@ -19,6 +19,8 @@ declare class WindowHeader extends Header {
19
19
  private _closeable;
20
20
  private _minimizable;
21
21
  private _maximizable;
22
+ private _titleGlyphClickListener;
23
+ private readonly _boundOnHeaderClick;
22
24
  constructor(text: string, options?: WindowHeaderOptions);
23
25
  protected updatePreferredSize(): void;
24
26
  private resolveTitleGlyphInk;
@@ -33,12 +35,16 @@ declare class WindowHeader extends Header {
33
35
  isMinimizable(): boolean;
34
36
  setMaximizable(value: boolean): this;
35
37
  isMaximizable(): boolean;
38
+ setMaximizeButtonEnabled(value: boolean): this;
39
+ isMaximizeButtonEnabled(): boolean;
36
40
  setMaximizeButtonGlyph(name: "window-maximize" | "window-restore"): this;
37
41
  setMinimizeButtonGlyph(name: "window-minimize" | "window-restore"): this;
38
42
  addExitButtonListener(listener: Function): this;
39
43
  addMinimizeButtonListener(listener: Function): this;
40
44
  addMaximizeButtonListener(listener: Function): this;
41
45
  addHeaderDoubleClickListener(listener: Event.Listener): this;
46
+ addTitleGlyphClickListener(listener: () => void): this;
47
+ private onHeaderClick;
42
48
  getMinContentWidth(textBudget?: number): number;
43
49
  getMinimizeButtonElement(): Handle | undefined;
44
50
  getMaximizeButtonElement(): Handle | undefined;
@@ -2,15 +2,20 @@ import { Component, ComponentOptions } from "../../core/Component.js";
2
2
  import type { Handle } from "../../core/DOM.js";
3
3
  import type { ElkEdgeSection } from "../../component/diagram/ElkLayoutEngine.js";
4
4
  import type { DiagramEdgeStyle } from "../../component/diagram/DiagramModel.js";
5
+ import type { DiagramRect } from "../../component/diagram/DiagramResidency.js";
5
6
  export declare const EDGE_MARKER_EXTENT: number;
6
7
  export interface DiagramEdgeRoute {
7
8
  id: string;
8
9
  sections: ElkEdgeSection[];
9
10
  style?: DiagramEdgeStyle;
10
11
  }
12
+ export declare function routeBounds(sections: ElkEdgeSection[]): DiagramRect | null;
11
13
  declare class DiagramEdgeLayer extends Component<ComponentOptions> {
12
14
  private _edges;
13
15
  private _drawn;
16
+ private _edgeRects;
17
+ private _residency;
18
+ private _residentIds;
14
19
  private _edgeEmphasis;
15
20
  private _dimLayer;
16
21
  private _normalLayer;
@@ -30,6 +35,11 @@ declare class DiagramEdgeLayer extends Component<ComponentOptions> {
30
35
  private createCrowsFootMarker;
31
36
  protected render(): Handle;
32
37
  private rebuildPaths;
38
+ private drawEdge;
39
+ private recomputeResidentEdges;
40
+ private isResident;
41
+ private updateDrawnEdges;
42
+ setResidency(rect: DiagramRect | null): this;
33
43
  private drawHitPath;
34
44
  private drawVisiblePath;
35
45
  private releaseDrawnEdge;
@@ -3,6 +3,8 @@ export interface DiagramGroupNodeOptions extends PanelOptions {
3
3
  label?: string;
4
4
  glyph?: string;
5
5
  }
6
+ export declare const DIAGRAM_GROUP_BACKGROUND_COLOR = "var(--ts-ui-diagram-group-bg, rgba(120, 120, 120, 0.08))";
7
+ export declare const DIAGRAM_GROUP_BORDER_COLOR = "var(--ts-ui-diagram-group-border, var(--ts-ui-border-color, rgb(180, 180, 180)))";
6
8
  declare class DiagramGroupNode extends Panel<DiagramGroupNodeOptions> {
7
9
  private _header;
8
10
  constructor(options?: DiagramGroupNodeOptions, subclassDefaults?: Partial<DiagramGroupNodeOptions>);
@@ -1,4 +1,5 @@
1
1
  import { Panel, PanelOptions } from "../../core/Panel.js";
2
+ import type { StyleStateSpec } from "../../core/ClassStyleRules.js";
2
3
  import type { Handle } from "../../core/DOM.js";
3
4
  export interface DiagramNodeOptions extends PanelOptions {
4
5
  label?: string;
@@ -6,12 +7,15 @@ export interface DiagramNodeOptions extends PanelOptions {
6
7
  badge?: string;
7
8
  selected?: boolean;
8
9
  }
10
+ export declare const DIAGRAM_NODE_BACKGROUND_COLOR = "var(--ts-ui-diagram-node-bg, var(--ts-ui-button-bg, rgb(245, 245, 245)))";
11
+ export declare const DIAGRAM_NODE_BORDER_COLOR = "var(--ts-ui-border-color, rgb(180, 180, 180))";
12
+ export declare const DIAGRAM_NODE_SELECTED_BACKGROUND_COLOR = "var(--ts-ui-diagram-node-selected-bg, var(--ts-ui-table-row-selected, rgba(30, 100, 200, 0.15)))";
13
+ export declare const DIAGRAM_NODE_SELECTED_BORDER_COLOR = "var(--ts-ui-accent-color, rgb(30, 100, 200))";
9
14
  declare class DiagramNode extends Panel<DiagramNodeOptions> {
15
+ protected static readonly ownStyleStates: readonly StyleStateSpec[];
10
16
  private _label;
11
17
  private _content;
12
18
  private _badge?;
13
- private _selectedStyleRule?;
14
- private get selectedStyleRule();
15
19
  constructor(options?: DiagramNodeOptions, subclassDefaults?: Partial<DiagramNodeOptions>);
16
20
  protected applyOptions(options: DiagramNodeOptions): this;
17
21
  private buildContent;
@@ -0,0 +1,25 @@
1
+ import { Component, ComponentOptions } from "../../core/Component.js";
2
+ import type { Handle } from "../../core/DOM.js";
3
+ import type { DiagramRect } from "../../component/diagram/DiagramResidency.js";
4
+ export declare const DIMMED_NODE_OPACITY = 0.35;
5
+ declare class DiagramNodeLayer extends Component<ComponentOptions> {
6
+ private _rects;
7
+ private _containerIds;
8
+ private _drawn;
9
+ private _selected;
10
+ private _emphasis;
11
+ constructor(options?: ComponentOptions);
12
+ protected createRootElement(): Handle;
13
+ protected render(): Handle;
14
+ setNodes(rects: Map<string, DiagramRect>, containerIds: ReadonlySet<string>): this;
15
+ setSelected(id: string | null): this;
16
+ setEmphasis(ids: ReadonlySet<string>): this;
17
+ private redraw;
18
+ private drawRect;
19
+ private releaseDrawnRect;
20
+ private repaint;
21
+ private rectAttrs;
22
+ }
23
+ declare const DiagramNodeLayerCallable: import("../../core/Callable.js").Callable<typeof DiagramNodeLayer>;
24
+ type DiagramNodeLayerCallable = DiagramNodeLayer;
25
+ export { DiagramNodeLayer as _DiagramNodeLayer, DiagramNodeLayerCallable as DiagramNodeLayer, };
@@ -0,0 +1,11 @@
1
+ export interface DiagramRect {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export declare function inflateRect(rect: DiagramRect, fraction: number): DiagramRect;
8
+ export declare function residencyNeedsRefresh(committed: DiagramRect | null, live: DiagramRect, margin: number): boolean;
9
+ export declare function rectsIntersect(a: DiagramRect, b: DiagramRect): boolean;
10
+ export declare function computeResidentIds(ids: Iterable<string>, rects: Map<string, DiagramRect>, residency: DiagramRect): Set<string>;
11
+ export declare function anyRectIntersects(rects: Iterable<DiagramRect>, area: DiagramRect): boolean;