@astryx-vue/core 0.20.1 → 0.21.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 (299) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-DYYA2LOe.js → AlertDialog-0UUojm_Q.js} +6 -6
  3. package/dist/AppShell/index.d.ts +1 -1
  4. package/dist/AppShell/index.js +1 -1
  5. package/dist/{AppShell-zEXmJb1h.js → AppShell-6rvfUu8p.js} +5 -5
  6. package/dist/Avatar/index.js +1 -1
  7. package/dist/{Avatar-D85dSNpq.js → Avatar-CXpGcula.js} +1 -1
  8. package/dist/AvatarGroup/index.d.ts +1 -1
  9. package/dist/AvatarGroup/index.js +1 -1
  10. package/dist/{AvatarGroup-AIu60Urv.js → AvatarGroup-BUXjzekw.js} +2 -2
  11. package/dist/Banner/index.d.ts +1 -1
  12. package/dist/Banner/index.js +1 -1
  13. package/dist/{Banner-C4ZICVvW.js → Banner-fmkd6nXw.js} +1 -1
  14. package/dist/BottomSheet/index.d.ts +1 -1
  15. package/dist/BottomSheet/index.js +2 -2
  16. package/dist/{BottomSheet-DNuzJPfQ.js → BottomSheet-DqAuZBgA.js} +3 -3
  17. package/dist/{BottomSheet-DV7bboru.js → BottomSheet-DrKtyVVo.js} +4 -4
  18. package/dist/Breadcrumbs/index.js +2 -2
  19. package/dist/{Breadcrumbs-C8nA3Ft9.js → Breadcrumbs-uaApwhFB.js} +1 -1
  20. package/dist/Button/index.d.ts +1 -1
  21. package/dist/Button/index.js +1 -1
  22. package/dist/{Button-DOfigN38.js → Button-CQAjaQa0.js} +5 -5
  23. package/dist/ButtonGroup/index.d.ts +1 -1
  24. package/dist/ButtonGroup/index.js +1 -1
  25. package/dist/{ButtonGroup-BzrDhbMP.js → ButtonGroup-DNN4O9_-.js} +3 -3
  26. package/dist/Calendar/index.d.ts +1 -1
  27. package/dist/Card/index.d.ts +1 -1
  28. package/dist/Carousel/index.d.ts +1 -1
  29. package/dist/Carousel/index.js +1 -1
  30. package/dist/{Carousel-CRaHAUsZ.js → Carousel-C3O9Uavl.js} +1 -1
  31. package/dist/Center/index.d.ts +1 -1
  32. package/dist/Chat/index.d.ts +1 -1
  33. package/dist/Chat/index.js +1 -1
  34. package/dist/{Chat-DTs843Ta.js → Chat-CmjK6fBy.js} +5 -5
  35. package/dist/CheckboxInput/index.d.ts +1 -1
  36. package/dist/CheckboxInput/index.js +1 -1
  37. package/dist/{CheckboxInput-Ydl1GSBh.js → CheckboxInput-D6ow4VuS.js} +3 -3
  38. package/dist/CheckboxList/index.d.ts +1 -1
  39. package/dist/CheckboxList/index.js +1 -1
  40. package/dist/{CheckboxList-Sn_ph-Xz.js → CheckboxList-CPaRsgRQ.js} +5 -5
  41. package/dist/ClickableCard/index.d.ts +1 -1
  42. package/dist/ClickableCard/index.js +1 -1
  43. package/dist/{ClickableCard-DH-zpF7o.js → ClickableCard-DMX5z-QV.js} +1 -1
  44. package/dist/Code/index.js +1 -1
  45. package/dist/{CodeBlock-DXBJEZS6.js → CodeBlock-DMG9rLQN.js} +1 -1
  46. package/dist/Collapsible/index.d.ts +1 -1
  47. package/dist/Collapsible/index.js +1 -1
  48. package/dist/{Collapsible-BG-u5nEt.js → Collapsible-BVoNZijw.js} +3 -3
  49. package/dist/CommandPalette/index.d.ts +1 -1
  50. package/dist/CommandPalette/index.js +1 -1
  51. package/dist/{CommandPalette-CV7t0ouM.js → CommandPalette-CmOytlWq.js} +3 -3
  52. package/dist/ComplexSelector/index.d.ts +1 -1
  53. package/dist/ComplexSelector/index.js +1 -1
  54. package/dist/{ComplexSelector-BKjyFdHr.js → ComplexSelector-mfEoIHtI.js} +2 -2
  55. package/dist/ContextMenu/index.d.ts +1 -1
  56. package/dist/ContextMenu/index.js +2 -2
  57. package/dist/{ContextMenu-CwnY6hcJ.js → ContextMenu-DDvOR25x.js} +6 -7
  58. package/dist/DateInput/index.d.ts +1 -1
  59. package/dist/DateInput/index.js +1 -1
  60. package/dist/{DateInput-BaX40vSs.js → DateInput-pDh6H44y.js} +4 -4
  61. package/dist/DateRangeInput/index.d.ts +1 -1
  62. package/dist/DateRangeInput/index.js +1 -1
  63. package/dist/{DateRangeInput-DplhXZqK.js → DateRangeInput-CQDfoXX5.js} +3 -3
  64. package/dist/DateTimeInput/index.d.ts +1 -1
  65. package/dist/DateTimeInput/index.js +1 -1
  66. package/dist/{DateTimeInput-CrD1EEfs.js → DateTimeInput-CZjere9H.js} +5 -5
  67. package/dist/Dialog/index.d.ts +1 -1
  68. package/dist/Dialog/index.js +3 -3
  69. package/dist/{Dialog-CztWmbf8.js → Dialog-BRlZ7n83.js} +3 -3
  70. package/dist/{Dialog-B2pOTrnQ.js → Dialog-XIB0KZ-m.js} +1 -1
  71. package/dist/{DialogHeader-CjHTNccL.js → DialogHeader-DF6jFDq3.js} +2 -2
  72. package/dist/Divider/index.d.ts +1 -1
  73. package/dist/Drawer/index.d.ts +1 -1
  74. package/dist/Drawer/index.js +1 -1
  75. package/dist/{Drawer-DGIuMLms.js → Drawer-BYUELPLs.js} +2 -2
  76. package/dist/DropdownMenu/index.js +3 -3
  77. package/dist/{DropdownMenu-r93pI0mD.js → DropdownMenu-BBXFl5Mu.js} +9 -10
  78. package/dist/{DropdownMenu-l9c562oA.js → DropdownMenu-DY3yFENC.js} +7 -7
  79. package/dist/EmptyState/index.js +1 -1
  80. package/dist/{EmptyState-nyV5XxMA.js → EmptyState-cs-L9Ovg.js} +3 -3
  81. package/dist/Field/index.js +3 -3
  82. package/dist/{Field-CIZdFzXr.js → Field-BQ3q-K5D.js} +1 -1
  83. package/dist/{FieldInfoTip-eJSORVbp.js → FieldInfoTip-MgGzYEq0.js} +1 -1
  84. package/dist/{FieldLabel-BoMSIOLF.js → FieldLabel-yH6KAVyU.js} +1 -1
  85. package/dist/FileInput/index.d.ts +1 -1
  86. package/dist/FileInput/index.js +1 -1
  87. package/dist/{FileInput-DvGU92Sg.js → FileInput-R8CqJrA5.js} +2 -2
  88. package/dist/Heading/index.js +1 -1
  89. package/dist/{Heading-Bo6A69fA.js → Heading-DkCkHEG-.js} +1 -1
  90. package/dist/HoverCard/index.js +1 -1
  91. package/dist/{HoverCard-FHYH3VXg.js → HoverCard-D0KqUCXI.js} +4 -4
  92. package/dist/IconButton/index.js +1 -1
  93. package/dist/{IconButton-oKXLxgYb.js → IconButton-DR9_545-.js} +1 -1
  94. package/dist/InfoTip/index.d.ts +1 -1
  95. package/dist/InfoTip/index.js +1 -1
  96. package/dist/{InfoTip-DWC-vnT5.js → InfoTip-BfgtAgck.js} +2 -2
  97. package/dist/{InputClearButton-CAitWZTk.js → InputClearButton-DaFtlyKR.js} +1 -1
  98. package/dist/InputGroup/index.js +1 -1
  99. package/dist/{InputGroup-CeTKqJQn.js → InputGroup-1CLPKULR.js} +1 -1
  100. package/dist/{Item-BSHDEJyh.js → Item-CzKm9wxQ.js} +1 -1
  101. package/dist/{LayerContentBoundary-CpqXMTyU.js → LayerContentBoundary-lxUfJk2v.js} +1 -1
  102. package/dist/Lightbox/index.js +1 -1
  103. package/dist/{Lightbox-CesmEisI.js → Lightbox-DyaSfJix.js} +4 -4
  104. package/dist/Link/index.d.ts +1 -1
  105. package/dist/Link/index.js +1 -1
  106. package/dist/{Link-CQ-Ztuo_.js → Link-JVAfvoxT.js} +2 -2
  107. package/dist/List/index.d.ts +1 -1
  108. package/dist/List/index.js +2 -2
  109. package/dist/{ListItem-v1GFTbba.js → ListItem-Bc4snKv8.js} +1 -1
  110. package/dist/Markdown/index.js +1 -1
  111. package/dist/{Markdown-CIA5ejYp.js → Markdown-DtnPfhP0.js} +3 -3
  112. package/dist/MobileNav/index.js +1 -1
  113. package/dist/{MobileNavToggle-CKEOroi0.js → MobileNavToggle-CPNsCIFR.js} +3 -3
  114. package/dist/MoreMenu/index.d.ts +1 -1
  115. package/dist/MoreMenu/index.js +1 -1
  116. package/dist/{MoreMenu-DcImQxyp.js → MoreMenu-DQjrchg5.js} +5 -5
  117. package/dist/MultiSelector/index.d.ts +1 -1
  118. package/dist/MultiSelector/index.js +1 -1
  119. package/dist/{MultiSelector-DedRF-RL.js → MultiSelector-sJ-LUrze.js} +8 -8
  120. package/dist/{NavDisclosure-Dg6U7pc7.js → NavDisclosure-CE79mxpa.js} +1 -1
  121. package/dist/{NavHeadingSurface-DZPa2px5.js → NavHeadingSurface-EsNdvhx7.js} +1 -1
  122. package/dist/NavItem/index.d.ts +1 -1
  123. package/dist/NavItem/index.js +1 -1
  124. package/dist/{NavItem-CcbOJNnY.js → NavItem-CB3loauj.js} +1 -1
  125. package/dist/NavMenu/index.js +3 -3
  126. package/dist/{NavMenu-CTbvZnO2.js → NavMenu-_Mo1yWZC.js} +4 -4
  127. package/dist/{NavMenuItem-BS0oULrz.js → NavMenuItem-CDHKFOKi.js} +4 -4
  128. package/dist/NumberInput/index.d.ts +1 -1
  129. package/dist/NumberInput/index.js +1 -1
  130. package/dist/{NumberInput-q9HP5L_V.js → NumberInput-Bpc2c39W.js} +3 -3
  131. package/dist/Outline/index.js +1 -1
  132. package/dist/{Outline-eucTzyZu.js → Outline-NuPQMjxw.js} +2 -2
  133. package/dist/OverflowList/index.d.ts +1 -1
  134. package/dist/OverflowList/index.js +1 -1
  135. package/dist/{OverflowList-B6Alf6bi.js → OverflowList-Dx_Iw8xd.js} +2 -2
  136. package/dist/Overlay/index.d.ts +1 -1
  137. package/dist/Pagination/index.d.ts +1 -1
  138. package/dist/Pagination/index.js +1 -1
  139. package/dist/{Pagination-DfAHckUV.js → Pagination-D7sbjDKw.js} +2 -2
  140. package/dist/Popover/index.d.ts +1 -1
  141. package/dist/Popover/index.js +1 -1
  142. package/dist/{Popover-D0jAIXkw.js → Popover-Bhi0b1x0.js} +6 -6
  143. package/dist/PowerSearch/index.d.ts +1 -1
  144. package/dist/PowerSearch/index.js +1 -1
  145. package/dist/{PowerSearch-CU_MBQlC.js → PowerSearch-B13bgXSs.js} +17 -17
  146. package/dist/ProgressBar/index.js +1 -1
  147. package/dist/{ProgressBar-DgyPRxV0.js → ProgressBar-BtEaKOhz.js} +1 -1
  148. package/dist/Radio/index.d.ts +1 -1
  149. package/dist/Radio/index.js +1 -1
  150. package/dist/{RadioGroup-Cm2n6M5C.js → RadioGroup-CFqN0t92.js} +4 -4
  151. package/dist/RadioList/index.d.ts +1 -1
  152. package/dist/RadioList/index.js +1 -1
  153. package/dist/{RadioList-B5MaynOw.js → RadioList-DVNkGcpc.js} +1 -1
  154. package/dist/Resizable/index.d.ts +1 -1
  155. package/dist/ScrollableArea/index.d.ts +1 -1
  156. package/dist/SegmentedControl/index.js +1 -1
  157. package/dist/{SegmentedControl-D--5X0eZ.js → SegmentedControl-DFUYTOVH.js} +2 -2
  158. package/dist/SelectableCard/index.d.ts +1 -1
  159. package/dist/SelectableCard/index.js +1 -1
  160. package/dist/{SelectableCard-CLwYtbZl.js → SelectableCard-DUTtyApJ.js} +1 -1
  161. package/dist/Selector/index.d.ts +1 -1
  162. package/dist/Selector/index.js +1 -1
  163. package/dist/{Selector-wcbEB7BC.js → Selector-sGqS3qNy.js} +6 -6
  164. package/dist/SideNav/index.d.ts +1 -1
  165. package/dist/SideNav/index.js +2 -2
  166. package/dist/{SideNav-CYlAzvrT.js → SideNav-Dw9MydVe.js} +11 -11
  167. package/dist/Slider/index.js +1 -1
  168. package/dist/{Slider-jgmpvIDe.js → Slider-BkVTjzrx.js} +3 -3
  169. package/dist/StatusDot/index.js +1 -1
  170. package/dist/{StatusDot-Cxm-uhTD.js → StatusDot-D4S8b-FU.js} +1 -1
  171. package/dist/Stepper/index.d.ts +1 -1
  172. package/dist/Stepper/index.js +1 -1
  173. package/dist/{Stepper-CnNUZDMO.js → Stepper-CQd4YlPC.js} +1 -1
  174. package/dist/Switch/index.d.ts +1 -1
  175. package/dist/Switch/index.js +1 -1
  176. package/dist/{Switch-YNk17Lct.js → Switch-DU-MRs1W.js} +2 -2
  177. package/dist/TabList/index.d.ts +1 -1
  178. package/dist/TabList/index.js +1 -1
  179. package/dist/{TabList-D_OvLcD5.js → TabList-CmB55DUS.js} +4 -4
  180. package/dist/Table/index.d.ts +1 -1
  181. package/dist/Table/index.js +1 -1
  182. package/dist/{Table-DcFujAPW.js → Table-BUh0OjeU.js} +15 -15
  183. package/dist/Text/index.js +2 -2
  184. package/dist/{Text-Bv4urzOW.js → Text-BBQUFWb_.js} +1 -1
  185. package/dist/TextArea/index.d.ts +1 -1
  186. package/dist/TextArea/index.js +1 -1
  187. package/dist/{TextArea-CixgkV__.js → TextArea-BVppzw5n.js} +4 -4
  188. package/dist/TextInput/index.d.ts +1 -1
  189. package/dist/TextInput/index.js +1 -1
  190. package/dist/{TextInput-Bpiq3FcP.js → TextInput-CmxKsaUt.js} +4 -4
  191. package/dist/Thumbnail/index.js +1 -1
  192. package/dist/{Thumbnail-Bktyar_H.js → Thumbnail-_KR0IRj-.js} +3 -3
  193. package/dist/{TimeField-BtiLoHqW.js → TimeField-Dbr2MOqX.js} +4 -4
  194. package/dist/TimeInput/index.d.ts +1 -1
  195. package/dist/TimeInput/index.js +1 -1
  196. package/dist/{TimeInput-eyxw3KzD.js → TimeInput-hzZ3tuAw.js} +2 -2
  197. package/dist/Timer/index.js +1 -1
  198. package/dist/{Timer-C-N-sElU.js → Timer-UnFtEgGb.js} +1 -1
  199. package/dist/Timestamp/index.d.ts +1 -1
  200. package/dist/Timestamp/index.js +1 -1
  201. package/dist/{Timestamp-BTs10ZLD.js → Timestamp-DiPZTa4W.js} +3 -3
  202. package/dist/Toast/index.js +1 -1
  203. package/dist/{Toast-DpMqZ72F.js → Toast-kV5KuJdD.js} +1 -1
  204. package/dist/ToggleButton/index.d.ts +1 -1
  205. package/dist/ToggleButton/index.js +1 -1
  206. package/dist/{ToggleButton-W_tpgZ8k.js → ToggleButton-DZ3n-izd.js} +3 -3
  207. package/dist/Token/index.d.ts +1 -1
  208. package/dist/Token/index.js +1 -1
  209. package/dist/{Token-jBbgdevV.js → Token-CPNzkSj3.js} +1 -1
  210. package/dist/Tokenizer/index.d.ts +1 -1
  211. package/dist/Tokenizer/index.js +1 -1
  212. package/dist/{Tokenizer-Bs1VXinx.js → Tokenizer-e8BisAF8.js} +6 -6
  213. package/dist/Toolbar/index.d.ts +1 -1
  214. package/dist/Toolbar/index.js +1 -1
  215. package/dist/{Toolbar-BH_E0F0G.js → Toolbar-B4Vltu-j.js} +1 -1
  216. package/dist/Tooltip/index.js +2 -2
  217. package/dist/{Tooltip-DQipgW1R.js → Tooltip-CPyoc4cM.js} +1 -1
  218. package/dist/TopNav/index.d.ts +1 -1
  219. package/dist/TopNav/index.js +1 -1
  220. package/dist/{TopNav-CSFUTuyI.js → TopNav-OOGD2uOp.js} +6 -6
  221. package/dist/TreeList/index.d.ts +1 -1
  222. package/dist/TreeList/index.js +1 -1
  223. package/dist/{TreeList-B8p_lI7a.js → TreeList-DJQvL5tG.js} +3 -3
  224. package/dist/Typeahead/index.js +2 -2
  225. package/dist/{Typeahead-Bh0nap5Z.js → Typeahead--CFFYPMl.js} +6 -6
  226. package/dist/{assertOptions-CK_gJ0d3.js → assertOptions-DLEhkmM-.js} +1 -1
  227. package/dist/{batch-BJD6Bt-O.js → batch-oTkSbtVz.js} +3 -1
  228. package/dist/clickGuard-ChKuogmR.js +132 -0
  229. package/dist/composables/index.d.ts +2 -2
  230. package/dist/composables/index.js +14 -15
  231. package/dist/composables-DSx0MWv0.js +11917 -0
  232. package/dist/{context-Cj_zItu2.js → context-DQPBIsl5.js} +2 -2
  233. package/dist/{edge-DIlkB7vS.js → edge-3sC8-cbB.js} +1 -1
  234. package/dist/{edgeRide-D0oC2JEB.js → edgeRide-DOxmVxTM.js} +4 -3
  235. package/dist/{focusReturn-D7Y7Pwwb.js → focusReturn-CiSQAp52.js} +1 -1
  236. package/dist/handle-CSHfxBie.js +298 -0
  237. package/dist/{index-DBu-H-vB.d.ts → index-0pBqcQXV.d.ts} +164 -7
  238. package/dist/{index-Q1oG9yIT.d.ts → index-B-3EGjfQ.d.ts} +2 -2
  239. package/dist/{index-TXcNH86P.d.ts → index-B1eCxBCY.d.ts} +1 -1
  240. package/dist/{index-Qdbssopn.d.ts → index-B6svLvfZ.d.ts} +1 -1
  241. package/dist/{index-5Hrxeq2J.d.ts → index-B8K2sDmO.d.ts} +3 -3
  242. package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
  243. package/dist/{index-DtZUOyCy.d.ts → index-BJputYk6.d.ts} +3 -3
  244. package/dist/{index-DMN_JVEt.d.ts → index-BL4mH8aK.d.ts} +1 -1
  245. package/dist/{index-B63NOJRc.d.ts → index-BOzyKBg8.d.ts} +4 -4
  246. package/dist/{index-BNtSmuWg.d.ts → index-BZNoML0r.d.ts} +10 -10
  247. package/dist/{index-CTjkJP4x.d.ts → index-Bgk1Rj2A.d.ts} +1 -1
  248. package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
  249. package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
  250. package/dist/{index-LaQSu7ST.d.ts → index-CNzSg1OM.d.ts} +9 -9
  251. package/dist/{index-mK1ICsVg.d.ts → index-Cm36VS1A.d.ts} +2 -2
  252. package/dist/{index-DmAEpn5E.d.ts → index-DB1EP38S.d.ts} +2 -2
  253. package/dist/{index-QnlWyUxN.d.ts → index-DE1genab.d.ts} +2 -2
  254. package/dist/{index-BOCb89V9.d.ts → index-DFLPv9io.d.ts} +2 -2
  255. package/dist/{index-Y-AmNzkO.d.ts → index-DFTrqCmp.d.ts} +1 -1
  256. package/dist/{index-CaE2cqeG.d.ts → index-DSoQE84m.d.ts} +56 -56
  257. package/dist/{index-vCRf5fyK.d.ts → index-Dge6tyPE.d.ts} +1 -1
  258. package/dist/{index-CbA8rR_b.d.ts → index-FeZXsFO-.d.ts} +2 -2
  259. package/dist/{index-BP2SjZiM.d.ts → index-PffxihMx.d.ts} +1 -1
  260. package/dist/{index-BKnyTWPM.d.ts → index-ZbNwGVkS.d.ts} +1 -1
  261. package/dist/{index-D1JXm7Et.d.ts → index-fz8XqpNd.d.ts} +2 -2
  262. package/dist/{index-yQc-te9a.d.ts → index-ql9ApSTF.d.ts} +2 -2
  263. package/dist/index.d.ts +28 -28
  264. package/dist/index.js +106 -107
  265. package/dist/{interactionModality-B5dR7nnb.js → interactionModality-JFDvbtbb.js} +2 -1
  266. package/dist/{landing-C7nc9JHm.js → landing-DFC97kl9.js} +2 -2
  267. package/dist/{layerFocusReturn-B8Hp14ZG.js → layerFocusReturn-DJ5mlqYj.js} +1 -1
  268. package/dist/{pressFeedback-BajhWhi1.js → pressFeedback-CEUPQWIS.js} +297 -118
  269. package/dist/pressGesture-BzIBmKF2.js +615 -0
  270. package/dist/sharedRealm-H1OrlP0V.js +124 -0
  271. package/dist/{stillPointerGate-0vdn-hSa.js → stillPointerGate-BTISispN.js} +1 -1
  272. package/dist/{tooltipFocusRules-D4cJ08fk.js → tooltipFocusRules-DPsyi9L5.js} +2 -2
  273. package/dist/{tooltipTriggerRules-PBxqztvn.js → tooltipTriggerRules-Dazz57_v.js} +1 -1
  274. package/dist/{useActionGroupTracking-fwmxDcU3.js → useActionGroupTracking-PVBCtLUE.js} +5 -4
  275. package/dist/{useCombobox-DIR9yoEu.js → useCombobox-DTDT9dRx.js} +1 -1
  276. package/dist/{useDismiss-Dfb0Ky7T.js → useDismiss-N66C48zd.js} +1 -1
  277. package/dist/{useFocusTrap-DsYtRdmV.js → useFocusTrap-DzspshsM.js} +2 -2
  278. package/dist/{useInputStatusIcon-CVGsNTi_.js → useInputStatusIcon-D1WRYTOZ.js} +1 -1
  279. package/dist/{useListFocus-CbHkLT-X.js → useListFocus-CkHfsZp0.js} +23 -5
  280. package/dist/{useMenuDrillIn-DaH0nhPa.js → useMenuDrillIn-RZwY55RM.js} +1 -1
  281. package/dist/{useMenuHover-CQYo0XCC.js → useMenuHover-CfQtWMg-.js} +1 -1
  282. package/dist/{useMenuPress-9dOj2hvC.js → useMenuPress-Cm7LVmHJ.js} +63 -15
  283. package/dist/{usePressFeedback-2YAzGB6C.js → usePressFeedback-aufF1sCH.js} +1 -1
  284. package/dist/{useResizable-BMlG1oxA.js → useResizable-C9FtmPir.js} +1 -1
  285. package/dist/{useRestoreFocus-Cz_jM_nW.js → useRestoreFocus-CEbfcwWb.js} +2 -2
  286. package/dist/{useTooltip-C7gHRGEO.js → useTooltip-BfOruqIL.js} +5 -5
  287. package/dist/{useTouchHitArea-BKZL6tHX.js → useTouchHitArea-BMDBe36j.js} +3 -3
  288. package/dist/{useTouchTriggerInternal-Bs7obOrb.js → useTouchTriggerInternal-TQnpDkL0.js} +1 -1
  289. package/dist/{useTruncationTooltip-DeCGRmot.js → useTruncationTooltip-CbzoB-1m.js} +5 -5
  290. package/dist/{useTypeahead-BrWvmOu9.js → useTypeahead-BGmDZyPB.js} +1 -1
  291. package/dist/{useTypeaheadMenuConfig--4f7jR6G.js → useTypeaheadMenuConfig-BZaduAP4.js} +2 -2
  292. package/dist/utils/index.js +1 -1
  293. package/package.json +1 -1
  294. package/dist/composables-CDrwFX0l.js +0 -5420
  295. package/dist/handle-ChN2TMKH.js +0 -458
  296. package/dist/pressGesture-B3z3W3Za.js +0 -78
  297. package/dist/strayClick-_QKRT5aH.js +0 -99
  298. package/dist/{index-BJ9Wim6J.d.ts → index-5FGt4HsB.d.ts} +1 -1
  299. package/dist/{useTruncation-BxYAhQtF.js → useTruncation-D_T-ezdp.js} +1 -1
@@ -1,29 +1,294 @@
1
- import { n as pressGestureStep, t as idlePressGesture } from "./pressGesture-B3z3W3Za.js";
1
+ import { f as isDocument, h as isNode, l as parentAcrossShadow, n as sharedKey, p as isElement, t as realmValue } from "./sharedRealm-H1OrlP0V.js";
2
+ import { a as idlePressGesture, l as UIKIT_PRESS, n as PRESS_ONSET_MS, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS, t as PRESS_FLASH_MS } from "./pressGesture-BzIBmKF2.js";
2
3
  import { n as hasInteractiveAncestor } from "./useClickableContainer-Dtjg-nkm.js";
3
- //#region src/composables/internal/inputAge.ts
4
- /** 盖下时间戳的窗口的时钟:事件的 `view`,或者落点节点所在窗口。同源 iframe 的时钟起点比主页面晚。 */
4
+ //#region src/utils/inputAge.ts
5
+ /**
6
+ * @file inputAge.ts
7
+ * @input An input's time stamp, and its event or the node it landed on
8
+ * @output clockOf, timeOn and msSinceInput: the clock of the window that
9
+ * stamped an input, its time on that clock, and how long ago it happened
10
+ * @position Internal utility. The content-touch delay (utils/pressFeedback.ts,
11
+ * gestures/PressTracker.ts) and the long-press hold
12
+ * (hooks/longPressDetector.ts) count from the touch with it.
13
+ */
14
+ /**
15
+ * The clock of the window that stamped an input: an event's `view`, or the
16
+ * window of the node it landed on. A same-origin iframe's clock or a popup's
17
+ * starts later than the page's. With neither, the clock is this window's.
18
+ */
5
19
  function clockOf(source) {
6
- let view;
7
- if (typeof Node !== "undefined" && source instanceof Node) view = (source.ownerDocument ?? source).defaultView;
8
- else view = source?.view;
9
- return view?.performance ?? (typeof performance === "undefined" ? null : performance);
20
+ return (isNode(source) ? (isDocument(source) ? source : source.ownerDocument)?.defaultView : source?.view)?.performance ?? (typeof performance === "undefined" ? null : performance);
10
21
  }
11
22
  /**
12
- * 时间戳换算到窗口时钟上。jsdom 用 `Date.now()` 盖时间戳:离 `Date.now()` 比离窗口时钟更近的,
13
- * 就按它离 `Date.now()` 的距离算年龄,这样冻结的系统时间不会改变延时的长度。
23
+ * An event's time on its window's clock. jsdom stamps events with
24
+ * `Date.now()`. Such a stamp keeps its age on that clock, so a frozen system
25
+ * time keeps a delay's length. A stamp nearer `Date.now()` than the window's
26
+ * clock is that kind of stamp.
14
27
  */
15
28
  function timeOn(clock, timeStamp) {
16
- if (timeStamp == null || !Number.isFinite(timeStamp) || timeStamp <= 0) return void 0;
29
+ if (timeStamp == null || !Number.isFinite(timeStamp) || timeStamp <= 0) return;
17
30
  if (clock != null && Math.abs(Date.now() - timeStamp) < Math.abs(clock.now() - timeStamp)) return clock.now() - (Date.now() - timeStamp);
18
31
  return timeStamp;
19
32
  }
20
- /** 盖着 `time` 的那次输入过去了多少毫秒。没有时间、或者时间在未来,都按刚刚发生算。 */
33
+ /**
34
+ * How long ago the input stamped `time` happened, on the clock of the window
35
+ * that stamped it (`clockOf(source)`). A busy main thread runs a listener
36
+ * late. An input with no time, or a time ahead of now, counts as now.
37
+ */
21
38
  function msSinceInput(time, source) {
22
39
  const clock = clockOf(source);
23
40
  const at = timeOn(clock, time);
24
41
  return clock == null || at == null ? 0 : Math.max(0, clock.now() - at);
25
42
  }
26
43
  //#endregion
44
+ //#region src/utils/scrollView.ts
45
+ /**
46
+ * @file scrollView.ts
47
+ * @input An element and its computed styles
48
+ * @output Exports parseTouchAction, touchActionAllowsPan, rootOverflow,
49
+ * SCROLLABLE_OVERFLOW and isInsideScrollView: whether a touch on the
50
+ * element lands inside a box the browser can scroll
51
+ * @position The one definition of "inside a scroll view", shared by the
52
+ * press feedback controller (utils/pressFeedback.ts), the gesture core's
53
+ * native-scroll probe (gestures/nativeScroll.ts) and Layer's outside-press
54
+ * watch, so Core's main entry can ask it without the gesture core
55
+ */
56
+ /** Overflow values that let a box scroll. */
57
+ const SCROLLABLE_OVERFLOW = /* @__PURE__ */ new Set([
58
+ "auto",
59
+ "scroll",
60
+ "overlay"
61
+ ]);
62
+ /** How far a box must overflow, in px, before it counts as scrolling. */
63
+ const OVERFLOW_TOLERANCE_PX = 1;
64
+ /** Which pans a `touch-action` value lets the browser perform. */
65
+ function parseTouchAction(value) {
66
+ const tokens = value.trim().split(/\s+/);
67
+ if (tokens.includes("auto") || tokens.includes("manipulation")) return {
68
+ x: true,
69
+ y: true
70
+ };
71
+ if (tokens.includes("none")) return {
72
+ x: false,
73
+ y: false
74
+ };
75
+ return {
76
+ x: tokens.some((token) => token === "pan-x" || token === "pan-left" || token === "pan-right"),
77
+ y: tokens.some((token) => token === "pan-y" || token === "pan-up" || token === "pan-down")
78
+ };
79
+ }
80
+ /**
81
+ * The viewport's overflow on an axis. It scrolls unless the root or the body
82
+ * clips it, as a scroll lock does with `overflow: hidden`.
83
+ */
84
+ function rootOverflow(doc, axis) {
85
+ const view = doc.defaultView;
86
+ if (view == null) return "hidden";
87
+ for (const element of [doc.documentElement, doc.body]) {
88
+ if (element == null) continue;
89
+ const style = view.getComputedStyle(element);
90
+ const value = axis === "x" ? style.overflowX : style.overflowY;
91
+ if (value === "hidden" || value === "clip") return "hidden";
92
+ }
93
+ return "auto";
94
+ }
95
+ function overflows(element, axis) {
96
+ return axis === "y" ? element.scrollHeight - element.clientHeight > OVERFLOW_TOLERANCE_PX : element.scrollWidth - element.clientWidth > OVERFLOW_TOLERANCE_PX;
97
+ }
98
+ /**
99
+ * Whether a touch on `element` lands inside a scroll view, UIKit's question
100
+ * for a touch: a box above it, the page included, overflows on an axis it
101
+ * scrolls, and `touch-action` on the way up leaves that axis to the browser.
102
+ * A `position: fixed` box ends the walk, because it does not move with any
103
+ * scroller above it. A wheel scrolls whatever `touch-action` says, so a
104
+ * wheel's question passes `readsTouchAction: false`.
105
+ */
106
+ function isInsideScrollView(element, { readsTouchAction = true } = {}) {
107
+ const doc = element.ownerDocument;
108
+ const view = doc.defaultView;
109
+ if (view == null) return false;
110
+ const root = doc.scrollingElement ?? doc.documentElement;
111
+ let panX = true;
112
+ let panY = true;
113
+ for (let node = element; node != null;) {
114
+ if (isElement(node)) {
115
+ const style = view.getComputedStyle(node);
116
+ if (readsTouchAction) {
117
+ const pans = parseTouchAction(style.touchAction || "auto");
118
+ panX &&= pans.x;
119
+ panY &&= pans.y;
120
+ }
121
+ if (node === root || node === doc.documentElement) break;
122
+ if (panY && SCROLLABLE_OVERFLOW.has(style.overflowY) && overflows(node, "y") || panX && SCROLLABLE_OVERFLOW.has(style.overflowX) && overflows(node, "x")) return true;
123
+ if (style.position === "fixed") return false;
124
+ }
125
+ node = parentAcrossShadow(node);
126
+ }
127
+ return panY && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "y")) && overflows(root, "y") || panX && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "x")) && overflows(root, "x");
128
+ }
129
+ //#endregion
130
+ //#region src/utils/inputStream.ts
131
+ /**
132
+ * @file inputStream.ts
133
+ * @input A window, and subscribers to its input events (the press feedback
134
+ * controller, the gesture host, the keyboard module)
135
+ * @output subscribeInput. Its readers: getLastPointerType, the latest
136
+ * pointer's type; getLastMousePoint, the latest mouse point; getDownPresses,
137
+ * each finger and pen press that is down; getTouches, the fingers on the
138
+ * screen and how many touches started.
139
+ * @position The one entry for document-wide input listeners in core: one
140
+ * native listener per event type on the window's capture phase, shared by
141
+ * every subscriber
142
+ *
143
+ * SYNC: When modified, update inputStream.test.ts.
144
+ */
145
+ const { streams, lastPointerTypes, lastMousePoints, downPresses } = realmValue(sharedKey("input-stream", 1), () => ({
146
+ streams: /* @__PURE__ */ new WeakMap(),
147
+ /** The type of the latest pointer event each window's stream delivered. */
148
+ lastPointerTypes: /* @__PURE__ */ new WeakMap(),
149
+ /** Where the latest mouse pointer event each window's stream delivered was. */
150
+ lastMousePoints: /* @__PURE__ */ new WeakMap(),
151
+ /** Each window's finger and pen presses that are down, by pointer id. */
152
+ downPresses: /* @__PURE__ */ new WeakMap()
153
+ }));
154
+ /**
155
+ * How many fingers are on each window's screen, and how many touches have
156
+ * started, from its touch events. Its own key keeps the stream's first state
157
+ * readable by copies built before it.
158
+ */
159
+ const touchRecords = realmValue(sharedKey("input-stream/touches", 1), () => /* @__PURE__ */ new WeakMap());
160
+ /**
161
+ * Listen to `type` on `view`'s capture phase through its shared native
162
+ * listener. Returns the unsubscribe; calling it again does nothing.
163
+ */
164
+ function subscribeInput(view, type, listener, { cancels = false, first = false } = {}) {
165
+ let channels = streams.get(view);
166
+ if (channels == null) {
167
+ channels = /* @__PURE__ */ new Map();
168
+ streams.set(view, channels);
169
+ }
170
+ let channel = channels.get(type);
171
+ if (channel == null) {
172
+ channel = {
173
+ subscribers: [],
174
+ native: null
175
+ };
176
+ channels.set(type, channel);
177
+ }
178
+ const subscriber = {
179
+ listener,
180
+ cancels,
181
+ isFirst: first
182
+ };
183
+ const firstLater = first ? channel.subscribers.findIndex((other) => !other.isFirst) : -1;
184
+ if (firstLater === -1) channel.subscribers.push(subscriber);
185
+ else channel.subscribers.splice(firstLater, 0, subscriber);
186
+ register(view, type, channel);
187
+ let isSubscribed = true;
188
+ return () => {
189
+ if (!isSubscribed) return;
190
+ isSubscribed = false;
191
+ const current = streams.get(view)?.get(type);
192
+ if (current == null) return;
193
+ const index = current.subscribers.indexOf(subscriber);
194
+ if (index !== -1) current.subscribers.splice(index, 1);
195
+ register(view, type, current);
196
+ if (current.subscribers.length === 0) {
197
+ streams.get(view)?.delete(type);
198
+ if (type === "pointerup" || type === "pointercancel") downPresses.delete(view);
199
+ if (type === "touchend" || type === "touchcancel") forgetFingers(view);
200
+ }
201
+ };
202
+ }
203
+ /**
204
+ * Bring the channel's native listener in line with its subscribers: none
205
+ * without subscribers, non-passive while one of them cancels.
206
+ */
207
+ function register(view, type, channel) {
208
+ const wanted = channel.subscribers.length === 0 ? null : channel.subscribers.some((subscriber) => subscriber.cancels);
209
+ const native = channel.native;
210
+ if (native != null && native.cancels === wanted) return;
211
+ if (native != null) {
212
+ view.removeEventListener(type, native.listener, { capture: true });
213
+ channel.native = null;
214
+ }
215
+ if (wanted == null) return;
216
+ const listener = (event) => dispatch(view, channel, event);
217
+ view.addEventListener(type, listener, {
218
+ capture: true,
219
+ passive: !wanted
220
+ });
221
+ channel.native = {
222
+ listener,
223
+ cancels: wanted
224
+ };
225
+ }
226
+ function dispatch(view, channel, event) {
227
+ const { pointerType, clientX, clientY } = event;
228
+ if (typeof pointerType === "string" && pointerType !== "") lastPointerTypes.set(view, pointerType);
229
+ if (pointerType === "mouse" && typeof clientX === "number" && typeof clientY === "number") lastMousePoints.set(view, {
230
+ x: clientX,
231
+ y: clientY
232
+ });
233
+ if (pointerType === "touch" || pointerType === "pen") recordPress(view, event);
234
+ if (event.type === "touchstart" || event.type === "touchend" || event.type === "touchcancel") recordTouches(view, event);
235
+ for (const subscriber of [...channel.subscribers]) {
236
+ if (!channel.subscribers.includes(subscriber)) continue;
237
+ try {
238
+ if (subscriber.listener(event) === true && subscriber.isFirst) return;
239
+ } catch (error) {
240
+ report(error);
241
+ }
242
+ }
243
+ }
244
+ function recordTouches(view, event) {
245
+ const channels = streams.get(view);
246
+ if (channels?.has("touchend") !== true || !channels.has("touchcancel")) {
247
+ forgetFingers(view);
248
+ return;
249
+ }
250
+ const { touches } = event;
251
+ const starts = touchRecords.get(view)?.starts ?? 0;
252
+ touchRecords.set(view, {
253
+ fingers: touches?.length ?? 0,
254
+ starts: event.type === "touchstart" ? starts + 1 : starts
255
+ });
256
+ }
257
+ function forgetFingers(view) {
258
+ const record = touchRecords.get(view);
259
+ if (record != null) touchRecords.set(view, {
260
+ fingers: 0,
261
+ starts: record.starts
262
+ });
263
+ }
264
+ function recordPress(view, event) {
265
+ const { pointerId, clientX, clientY } = event;
266
+ if (typeof pointerId !== "number") return;
267
+ let presses = downPresses.get(view);
268
+ if (event.type === "pointerup" || event.type === "pointercancel") {
269
+ presses?.delete(pointerId);
270
+ return;
271
+ }
272
+ if (event.type !== "pointerdown" && !(event.type === "pointermove" && presses?.has(pointerId) === true) || typeof clientX !== "number" || typeof clientY !== "number") return;
273
+ if (presses == null) {
274
+ presses = /* @__PURE__ */ new Map();
275
+ downPresses.set(view, presses);
276
+ }
277
+ presses.set(pointerId, {
278
+ x: clientX,
279
+ y: clientY
280
+ });
281
+ }
282
+ function report(error) {
283
+ if (typeof globalThis.reportError === "function") {
284
+ globalThis.reportError(error);
285
+ return;
286
+ }
287
+ queueMicrotask(() => {
288
+ throw error;
289
+ });
290
+ }
291
+ //#endregion
27
292
  //#region src/composables/internal/pressSurface.ts
28
293
  /**
29
294
  * 触屏按压模型里「这一下按的是谁」的判断:从手指落点往上找最里层的可按元素。
@@ -73,90 +338,6 @@ function pressSurfaceAt(target) {
73
338
  return found;
74
339
  }
75
340
  //#endregion
76
- //#region src/composables/internal/scrollView.ts
77
- /**
78
- * 「这个元素在不在滚动视图里」的唯一定义,和 UIKit 判断一次触摸时问的是同一个问题。
79
- *
80
- * 触屏按压模型靠它决定要不要等:滚动视图里的一次触摸可能变成滚动,所以先等 150ms 再亮;
81
- * 滚动视图外没有东西能把触摸变成滚动,手指落下的那一帧就亮,和原生控件一样。
82
- */
83
- /** 能滚动的 overflow 取值。 */
84
- const SCROLLABLE_OVERFLOW = /* @__PURE__ */ new Set([
85
- "auto",
86
- "scroll",
87
- "overlay"
88
- ]);
89
- /** 内容至少要溢出这么多像素才算能滚。 */
90
- const OVERFLOW_TOLERANCE_PX = 1;
91
- /** 一个 `touch-action` 值允许浏览器在哪些方向上平移。 */
92
- function parseTouchAction(value) {
93
- const tokens = value.trim().split(/\s+/);
94
- if (tokens.includes("auto") || tokens.includes("manipulation")) return {
95
- x: true,
96
- y: true
97
- };
98
- if (tokens.includes("none")) return {
99
- x: false,
100
- y: false
101
- };
102
- return {
103
- x: tokens.some((token) => token === "pan-x" || token === "pan-left" || token === "pan-right"),
104
- y: tokens.some((token) => token === "pan-y" || token === "pan-up" || token === "pan-down")
105
- };
106
- }
107
- /** 视口在某个方向上的 overflow:根元素或 body 被裁剪(比如滚动锁写了 `overflow: hidden`)就不滚。 */
108
- function rootOverflow(doc, axis) {
109
- const view = doc.defaultView;
110
- if (view == null) return "hidden";
111
- for (const element of [doc.documentElement, doc.body]) {
112
- if (element == null) continue;
113
- const style = view.getComputedStyle(element);
114
- const value = axis === "x" ? style.overflowX : style.overflowY;
115
- if (value === "hidden" || value === "clip") return "hidden";
116
- }
117
- return "auto";
118
- }
119
- function overflows(element, axis) {
120
- return axis === "y" ? element.scrollHeight - element.clientHeight > OVERFLOW_TOLERANCE_PX : element.scrollWidth - element.clientWidth > OVERFLOW_TOLERANCE_PX;
121
- }
122
- function scrollsOn(style, element, pans) {
123
- return pans.y && SCROLLABLE_OVERFLOW.has(style.overflowY) && overflows(element, "y") || pans.x && SCROLLABLE_OVERFLOW.has(style.overflowX) && overflows(element, "x");
124
- }
125
- /** 父节点,穿过 shadow root 到它的宿主。 */
126
- function parentAcrossShadow(node) {
127
- const parent = node.parentNode;
128
- if (parent != null && typeof ShadowRoot !== "undefined" && parent instanceof ShadowRoot) return parent.host;
129
- return parent;
130
- }
131
- /**
132
- * 在 `element` 上的一次触摸是不是落在滚动视图里:它上面某个盒子(包括页面本身)在某个方向上溢出、
133
- * 能滚,而且一路上的 `touch-action` 把那个方向留给了浏览器。
134
- * `position: fixed` 的盒子不跟着上面的滚动容器动,遇到它就停。
135
- */
136
- function isInsideScrollView(element) {
137
- const doc = element.ownerDocument;
138
- const view = doc.defaultView;
139
- if (view == null) return false;
140
- const root = doc.scrollingElement ?? doc.documentElement;
141
- let pans = {
142
- x: true,
143
- y: true
144
- };
145
- for (let node = element; node != null; node = parentAcrossShadow(node)) {
146
- if (!(node instanceof Element)) continue;
147
- const style = view.getComputedStyle(node);
148
- const allowed = parseTouchAction(style.touchAction || "auto");
149
- pans = {
150
- x: pans.x && allowed.x,
151
- y: pans.y && allowed.y
152
- };
153
- if (node === root || node === doc.documentElement) break;
154
- if (scrollsOn(style, node, pans)) return true;
155
- if (style.position === "fixed") return false;
156
- }
157
- return pans.y && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "y")) && overflows(root, "y") || pans.x && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "x")) && overflows(root, "x");
158
- }
159
- //#endregion
160
341
  //#region src/composables/internal/pressFeedback.ts
161
342
  /**
162
343
  * 触屏按压模型的 DOM 那一半:整个文档只有一个委托控制器,
@@ -175,6 +356,8 @@ function isInsideScrollView(element) {
175
356
  */
176
357
  /** 按压成立且手指还在时为 `on`,抬手淡出时为 `fading`,其余时候不存在。 */
177
358
  const PRESSED_ATTRIBUTE = "data-astryx-press";
359
+ /** 手指离开后多久内的滚动还可能是那根手指甩出去的惯性。iOS 的惯性滚动会持续一两秒。 */
360
+ const PRESS_GESTURE_MEMORY_MS = UIKIT_PRESS.momentumMemory.value;
178
361
  let live = null;
179
362
  /** 有几个调用方装着控制器。大于 0 时监听才在。 */
180
363
  let holders = 0;
@@ -186,8 +369,8 @@ let lastTouchAt = 0;
186
369
  let lastTouchTarget = null;
187
370
  const TIMER_MS = {
188
371
  fade: 175,
189
- flash: 100,
190
- onset: 150
372
+ flash: PRESS_FLASH_MS,
373
+ onset: PRESS_ONSET_MS
191
374
  };
192
375
  const TIMER_EVENT = {
193
376
  fade: "fadeEnd",
@@ -278,7 +461,7 @@ function apply(step, sinceEventMs = 0) {
278
461
  * 两个条件都要满足:滚动容器包着这个元素,而且那次滚动是手指在这个容器里带起来的。
279
462
  */
280
463
  function scrollerIsBraking(element) {
281
- if (Date.now() - lastScrollAt >= 150) return false;
464
+ if (Date.now() - lastScrollAt >= PRESS_SCROLL_BRAKE_MS) return false;
282
465
  return lastScroller instanceof Node && lastScroller.contains(element);
283
466
  }
284
467
  /** 手势一死就让出唯一的跟踪槽位。变成滚动的手势以 pointercancel 结束,没有 pointerup。 */
@@ -348,7 +531,7 @@ function onCancel() {
348
531
  /** 文档里任何一处滚动。scroll 不冒泡,只能在捕获阶段听。 */
349
532
  function onScroll(event) {
350
533
  const scroller = event.target instanceof Node ? event.target : document;
351
- if (Date.now() - lastTouchAt < 3e3 && lastTouchTarget != null && scroller.contains(lastTouchTarget)) {
534
+ if (Date.now() - lastTouchAt < PRESS_GESTURE_MEMORY_MS && lastTouchTarget != null && scroller.contains(lastTouchTarget)) {
352
535
  lastScrollAt = Date.now();
353
536
  lastScroller = scroller;
354
537
  }
@@ -359,27 +542,23 @@ function onScroll(event) {
359
542
  function onVisibilityChange() {
360
543
  if (document.visibilityState === "hidden") finish();
361
544
  }
362
- const PASSIVE_CAPTURE = {
363
- capture: true,
364
- passive: true
365
- };
366
- const WINDOW_LISTENERS = [
367
- ["pointerdown", onPointerDown],
368
- ["pointermove", onPointerMove],
369
- ["pointerup", onPointerUp],
370
- ["pointercancel", onCancel],
371
- ["touchcancel", onCancel],
372
- ["dragstart", onCancel]
373
- ];
545
+ /** 控制器在共用输入流(utils/inputStream.ts)上的订阅,全都被动,只在有人持有时存在。 */
546
+ let unsubscribers = [];
374
547
  function addListeners() {
375
- for (const [type, listener] of WINDOW_LISTENERS) window.addEventListener(type, listener, PASSIVE_CAPTURE);
376
- document.addEventListener("scroll", onScroll, PASSIVE_CAPTURE);
377
- document.addEventListener("visibilitychange", onVisibilityChange);
548
+ unsubscribers = [
549
+ subscribeInput(window, "pointerdown", onPointerDown),
550
+ subscribeInput(window, "pointermove", onPointerMove),
551
+ subscribeInput(window, "pointerup", onPointerUp),
552
+ subscribeInput(window, "pointercancel", onCancel),
553
+ subscribeInput(window, "touchcancel", onCancel),
554
+ subscribeInput(window, "dragstart", onCancel),
555
+ subscribeInput(window, "scroll", onScroll),
556
+ subscribeInput(window, "visibilitychange", onVisibilityChange)
557
+ ];
378
558
  }
379
559
  function removeListeners() {
380
- for (const [type, listener] of WINDOW_LISTENERS) window.removeEventListener(type, listener, PASSIVE_CAPTURE);
381
- document.removeEventListener("scroll", onScroll, PASSIVE_CAPTURE);
382
- document.removeEventListener("visibilitychange", onVisibilityChange);
560
+ for (const unsubscribe of unsubscribers) unsubscribe();
561
+ unsubscribers = [];
383
562
  }
384
563
  function resetClocks() {
385
564
  lastScrollAt = 0;
@@ -408,4 +587,4 @@ function installPressFeedback() {
408
587
  };
409
588
  }
410
589
  //#endregion
411
- export { PRESSABLE_ATTRIBUTE as a, PRESS_GROUP_ITEM_ATTRIBUTE as c, isInsideScrollView as i, isTrackedByGroup as l, installPressFeedback as n, PRESS_ACTION_ATTRIBUTE as o, pressFadeMs as r, PRESS_CONTAINER_ATTRIBUTE as s, PRESSED_ATTRIBUTE as t, msSinceInput as u };
590
+ export { PRESS_ACTION_ATTRIBUTE as a, isTrackedByGroup as c, isInsideScrollView as d, parseTouchAction as f, msSinceInput as h, PRESSABLE_ATTRIBUTE as i, subscribeInput as l, clockOf as m, installPressFeedback as n, PRESS_CONTAINER_ATTRIBUTE as o, rootOverflow as p, pressFadeMs as r, PRESS_GROUP_ITEM_ATTRIBUTE as s, PRESSED_ATTRIBUTE as t, SCROLLABLE_OVERFLOW as u };