@astryx-vue/core 0.48.0 → 0.48.2

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 (252) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-5jlvTD6d.js → AlertDialog-CZv_5cjZ.js} +4 -4
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-T02ZV-cq.js → AppShell-BdpXOpJ0.js} +2 -2
  5. package/dist/AvatarGroup/index.d.ts +1 -1
  6. package/dist/AvatarGroup/index.js +1 -1
  7. package/dist/{AvatarGroup-Dui84EMQ.js → AvatarGroup-DPdGsmCQ.js} +1 -1
  8. package/dist/Banner/index.d.ts +1 -1
  9. package/dist/Banner/index.js +1 -1
  10. package/dist/{Banner-BtD6bun6.js → Banner-rKRkWR6U.js} +1 -1
  11. package/dist/BottomSheet/index.js +2 -2
  12. package/dist/{BottomSheet-CRN7vHpj.js → BottomSheet-DZ6J7ky0.js} +8 -5
  13. package/dist/{BottomSheet-CH8G6HC4.js → BottomSheet-cYjgB_uE.js} +162 -18
  14. package/dist/Breadcrumbs/index.js +2 -2
  15. package/dist/{Breadcrumbs-D5Gv3vbc.js → Breadcrumbs-B1LVoSmF.js} +1 -1
  16. package/dist/Button/index.d.ts +1 -1
  17. package/dist/Button/index.js +1 -1
  18. package/dist/{Button-_Wy_YD0w.js → Button-ByMwpaTC.js} +1 -1
  19. package/dist/ButtonGroup/index.d.ts +1 -1
  20. package/dist/ButtonGroup/index.js +1 -1
  21. package/dist/{ButtonGroup-CQKamSTm.js → ButtonGroup-DlzYnaXk.js} +1 -1
  22. package/dist/Calendar/index.d.ts +1 -1
  23. package/dist/Carousel/index.d.ts +1 -1
  24. package/dist/Carousel/index.js +1 -1
  25. package/dist/{Carousel-CInT4bwV.js → Carousel-PAvDguJz.js} +1 -1
  26. package/dist/Center/index.d.ts +1 -1
  27. package/dist/Chat/index.d.ts +1 -1
  28. package/dist/Chat/index.js +1 -1
  29. package/dist/{Chat-TU_tpExs.js → Chat-CYljOQ16.js} +1 -1
  30. package/dist/CheckboxInput/index.d.ts +1 -1
  31. package/dist/CheckboxInput/index.js +1 -1
  32. package/dist/{CheckboxInput-BXp8vIjt.js → CheckboxInput-B7LhVr3T.js} +2 -2
  33. package/dist/CheckboxList/index.d.ts +1 -1
  34. package/dist/CheckboxList/index.js +1 -1
  35. package/dist/{CheckboxListItem-CevOAULo.js → CheckboxListItem-DV3Uh8dj.js} +3 -3
  36. package/dist/ClickableCard/index.d.ts +1 -1
  37. package/dist/ClickableCard/index.js +1 -1
  38. package/dist/{ClickableCard-VoDgBMvb.js → ClickableCard-BbvpZLNq.js} +1 -1
  39. package/dist/Code/index.js +2 -2
  40. package/dist/{Code-BFoxW_eI.js → Code-Aw-ZvPzl.js} +1 -1
  41. package/dist/{CodeBlock-CpcoW68P.js → CodeBlock-BZUBgEQK.js} +1 -1
  42. package/dist/Collapsible/index.d.ts +1 -1
  43. package/dist/Collapsible/index.js +1 -1
  44. package/dist/{Collapsible-glc_Y77Q.js → Collapsible-BOHljBHe.js} +1 -1
  45. package/dist/CommandPalette/index.d.ts +1 -1
  46. package/dist/CommandPalette/index.js +1 -1
  47. package/dist/{CommandPalette-CG0oKWu-.js → CommandPalette-B5TShtZd.js} +3 -3
  48. package/dist/ComplexSelector/index.js +1 -1
  49. package/dist/{ComplexSelector-Dp5rvaVu.js → ComplexSelector-BewrtpKV.js} +1 -1
  50. package/dist/ContextMenu/index.d.ts +1 -1
  51. package/dist/ContextMenu/index.js +2 -2
  52. package/dist/{ContextMenu-B5zHTw44.js → ContextMenu--QuYdWDQ.js} +3 -3
  53. package/dist/DateInput/index.d.ts +1 -1
  54. package/dist/DateInput/index.js +1 -1
  55. package/dist/{DateInput-BHaPRaUr.js → DateInput-D4o83xnR.js} +3 -3
  56. package/dist/DateRangeInput/index.d.ts +1 -1
  57. package/dist/DateRangeInput/index.js +1 -1
  58. package/dist/{DateRangeInput-Cacx_yw3.js → DateRangeInput-A-Hrvnmo.js} +2 -2
  59. package/dist/DateTimeInput/index.d.ts +1 -1
  60. package/dist/DateTimeInput/index.js +1 -1
  61. package/dist/{DateTimeInput-CmklDM3d.js → DateTimeInput-DWX1Z3S_.js} +4 -4
  62. package/dist/Dialog/index.d.ts +1 -1
  63. package/dist/Dialog/index.js +3 -3
  64. package/dist/{Dialog-BF8cQdBa.js → Dialog-CPW0FBYo.js} +2 -2
  65. package/dist/{Dialog-CZsoPMJP.js → Dialog-PyGSnp1J.js} +6 -3
  66. package/dist/{DialogHeader-D0KowSnq.js → DialogHeader-CT4gkqfm.js} +2 -2
  67. package/dist/Divider/index.d.ts +1 -1
  68. package/dist/Drawer/index.d.ts +1 -1
  69. package/dist/Drawer/index.js +1 -1
  70. package/dist/{Drawer-DjUz1JaP.js → Drawer-BkU8kiAU.js} +7 -4
  71. package/dist/DropdownMenu/index.js +2 -2
  72. package/dist/{DropdownMenu-D8IbPMPM.js → DropdownMenu-NqkHivVB.js} +6 -6
  73. package/dist/Field/index.js +1 -1
  74. package/dist/{FieldInfoTip-CxhS1Oei.js → FieldInfoTip-Dss2g3m-.js} +1 -1
  75. package/dist/FileInput/index.js +1 -1
  76. package/dist/{FileInput-DUuDBMrT.js → FileInput-B00g3NMy.js} +2 -2
  77. package/dist/{GestureHost-C0FstEs3.js → GestureHost-CnGqeHAJ.js} +1 -1
  78. package/dist/HoverCard/index.d.ts +1 -1
  79. package/dist/IconButton/index.js +1 -1
  80. package/dist/{IconButton-CXAXoL8g.js → IconButton-BilMzjDj.js} +1 -1
  81. package/dist/InfoTip/index.d.ts +1 -1
  82. package/dist/{InputClearButton-CRwLkUd4.js → InputClearButton-DEmIF1Dt.js} +1 -1
  83. package/dist/{Item-D4mWkTkn.js → Item-o9ot81Zr.js} +5 -5
  84. package/dist/Lightbox/index.js +1 -1
  85. package/dist/{Lightbox-0BL2xYy4.js → Lightbox-Di1n_Ghn.js} +7 -7
  86. package/dist/Link/index.d.ts +1 -1
  87. package/dist/Link/index.js +1 -1
  88. package/dist/{Link-DEVHdJ7S.js → Link-OTGW6ZdS.js} +1 -1
  89. package/dist/List/index.d.ts +1 -1
  90. package/dist/List/index.js +4 -4
  91. package/dist/{List-INZ3S-pZ.js → List-Da9fS7xP.js} +2 -2
  92. package/dist/{ListItem-Ds5nLB5D.js → ListItem-Cp65x47S.js} +2 -2
  93. package/dist/{LongPressGestureRecognizer-C_DTqk3V.js → LongPressGestureRecognizer-BA7RijIc.js} +2 -2
  94. package/dist/Markdown/index.d.ts +1 -1
  95. package/dist/Markdown/index.js +1 -1
  96. package/dist/{Markdown-CnyEpkWI.js → Markdown-DvBtpprk.js} +2 -2
  97. package/dist/MobileNav/index.js +2 -2
  98. package/dist/{MobileNav-B7dc-Afm.js → MobileNav-BFH7bZOn.js} +2 -2
  99. package/dist/{MobileNavDrawer-uW7GJVD-.js → MobileNavDrawer-BtktK3CL.js} +1 -1
  100. package/dist/{MobileNavToggle-B3iWj65f.js → MobileNavToggle-BpAWd0-p.js} +1 -1
  101. package/dist/MoreMenu/index.d.ts +1 -1
  102. package/dist/MoreMenu/index.js +1 -1
  103. package/dist/{MoreMenu-D7l8D7sU.js → MoreMenu-CiYBQ9pt.js} +4 -4
  104. package/dist/MultiSelector/index.d.ts +1 -1
  105. package/dist/MultiSelector/index.js +1 -1
  106. package/dist/{MultiSelector-CahK4rHm.js → MultiSelector-Cd0x_5Cz.js} +4 -4
  107. package/dist/NavItem/index.d.ts +1 -1
  108. package/dist/NavItem/index.js +1 -1
  109. package/dist/{NavItem-GFrkWRSJ.js → NavItem-BvO78bR8.js} +1 -1
  110. package/dist/NavMenu/index.js +2 -2
  111. package/dist/{NavMenu-B14_ovBG.js → NavMenu-DAukml6r.js} +1 -1
  112. package/dist/{NavMenuItem-DMXY_6AO.js → NavMenuItem-DVII3tzg.js} +2 -2
  113. package/dist/NumberInput/index.d.ts +1 -1
  114. package/dist/NumberInput/index.js +1 -1
  115. package/dist/{NumberInput-DNJqobg9.js → NumberInput-BBEONs4g.js} +2 -2
  116. package/dist/Outline/index.js +1 -1
  117. package/dist/{Outline-C4j3zWvV.js → Outline-ClmviJhz.js} +1 -1
  118. package/dist/OverflowList/index.d.ts +1 -1
  119. package/dist/OverflowList/index.js +1 -1
  120. package/dist/{OverflowList-wrh7FgSu.js → OverflowList-rE--IEGl.js} +1 -1
  121. package/dist/Pagination/index.d.ts +1 -1
  122. package/dist/Pagination/index.js +1 -1
  123. package/dist/{Pagination-wFi1cFxv.js → Pagination-Cu9RHoEu.js} +2 -2
  124. package/dist/{PanGestureRecognizer-WZ_rV6KY.js → PanGestureRecognizer-DZpS28MS.js} +1 -1
  125. package/dist/{PickerWheel-BN_Ad6FQ.js → PickerWheel-BWGMqoC0.js} +4 -4
  126. package/dist/Popover/index.js +1 -1
  127. package/dist/{Popover-B_8T3zYS.js → Popover-CgyIJd4u.js} +3 -3
  128. package/dist/PowerSearch/index.d.ts +1 -1
  129. package/dist/PowerSearch/index.js +1 -1
  130. package/dist/{PowerSearch-ZJbYzzne.js → PowerSearch-Cg0Fe7Ne.js} +18 -18
  131. package/dist/{PressTracker-CiaaoD3I.js → PressTracker-C7qJfE-H.js} +1 -1
  132. package/dist/ProgressBar/index.d.ts +1 -1
  133. package/dist/Radio/index.d.ts +1 -1
  134. package/dist/Radio/index.js +1 -1
  135. package/dist/{RadioGroup-BTKuboQj.js → RadioGroup-WoFdfefT.js} +2 -2
  136. package/dist/RadioList/index.d.ts +1 -1
  137. package/dist/RadioList/index.js +1 -1
  138. package/dist/{RadioListItem-BBen7qdK.js → RadioListItem-CULhpyUB.js} +1 -1
  139. package/dist/ScrollableArea/index.d.ts +1 -1
  140. package/dist/SegmentedControl/index.d.ts +1 -1
  141. package/dist/SegmentedControl/index.js +1 -1
  142. package/dist/{SegmentedControl-0jm3K1vo.js → SegmentedControl-BDD1z8ow.js} +4 -4
  143. package/dist/SelectableCard/index.d.ts +1 -1
  144. package/dist/SelectableCard/index.js +1 -1
  145. package/dist/{SelectableCard-CiGBc6LT.js → SelectableCard-CDu58-PT.js} +1 -1
  146. package/dist/Selector/index.d.ts +1 -1
  147. package/dist/Selector/index.js +1 -1
  148. package/dist/{Selector-BUUacb4g.js → Selector-V9YZ6h09.js} +2 -2
  149. package/dist/SideNav/index.d.ts +1 -1
  150. package/dist/SideNav/index.js +1 -1
  151. package/dist/{SideNav-BEhgJPPI.js → SideNav-BQbQ4vk6.js} +2 -2
  152. package/dist/Slider/index.js +1 -1
  153. package/dist/{Slider-DSJotaeW.js → Slider-IqPowFpR.js} +5 -5
  154. package/dist/Stepper/index.d.ts +1 -1
  155. package/dist/Stepper/index.js +1 -1
  156. package/dist/{Stepper-iDROGNwb.js → Stepper-B65oFMhT.js} +1 -1
  157. package/dist/Switch/index.d.ts +1 -1
  158. package/dist/Switch/index.js +1 -1
  159. package/dist/{Switch-DGS8pEOP.js → Switch-C3Z-eqrJ.js} +3 -3
  160. package/dist/TabList/index.d.ts +1 -1
  161. package/dist/TabList/index.js +1 -1
  162. package/dist/{TabList-BMlgDsmO.js → TabList-CQSr1JqR.js} +2 -2
  163. package/dist/Table/index.d.ts +1 -1
  164. package/dist/Table/index.js +1 -1
  165. package/dist/{Table-DHadAvm2.js → Table-D58FbmZl.js} +9 -9
  166. package/dist/{TapGestureRecognizer-LcbkQFq0.js → TapGestureRecognizer-DWgoCDMm.js} +2 -2
  167. package/dist/TextArea/index.d.ts +1 -1
  168. package/dist/TextArea/index.js +1 -1
  169. package/dist/{TextArea-DgwVNQv-.js → TextArea-vg40GTUn.js} +3 -3
  170. package/dist/TextInput/index.d.ts +1 -1
  171. package/dist/TextInput/index.js +1 -1
  172. package/dist/{TextInput-CYB4kvaK.js → TextInput-BT5SNPml.js} +3 -3
  173. package/dist/Thumbnail/index.js +1 -1
  174. package/dist/{Thumbnail-D_1X7wBJ.js → Thumbnail-DjTQfpBD.js} +2 -2
  175. package/dist/{TimeField-C1M2BFQL.js → TimeField-DzdNGtUE.js} +3 -3
  176. package/dist/TimeInput/index.d.ts +1 -1
  177. package/dist/TimeInput/index.js +1 -1
  178. package/dist/{TimeInput-L3MPak4g.js → TimeInput-CUM1fNsE.js} +1 -1
  179. package/dist/Timer/index.d.ts +1 -1
  180. package/dist/Timestamp/index.d.ts +1 -1
  181. package/dist/Timestamp/index.js +1 -1
  182. package/dist/{Timestamp-BdqvbKZ5.js → Timestamp-B0dj9IUl.js} +1 -1
  183. package/dist/Toast/index.js +1 -1
  184. package/dist/{Toast-DQrgFtDs.js → Toast-DDOAUhO2.js} +3 -3
  185. package/dist/ToggleButton/index.d.ts +1 -1
  186. package/dist/ToggleButton/index.js +1 -1
  187. package/dist/{ToggleButton-DdBYgIyN.js → ToggleButton-BQrwvaI1.js} +2 -2
  188. package/dist/Token/index.d.ts +1 -1
  189. package/dist/Token/index.js +1 -1
  190. package/dist/{Token-Dmz6vEMX.js → Token-CYpUplLh.js} +1 -1
  191. package/dist/Tokenizer/index.d.ts +1 -1
  192. package/dist/Tokenizer/index.js +1 -1
  193. package/dist/{Tokenizer-B75CAZaH.js → Tokenizer-CU2M1KhH.js} +6 -6
  194. package/dist/Toolbar/index.d.ts +1 -1
  195. package/dist/Tooltip/index.d.ts +1 -1
  196. package/dist/TopNav/index.d.ts +1 -1
  197. package/dist/TopNav/index.js +1 -1
  198. package/dist/{TopNav-tV1FsJ6_.js → TopNav-orrt1pgV.js} +4 -4
  199. package/dist/TreeList/index.d.ts +1 -1
  200. package/dist/TreeList/index.js +1 -1
  201. package/dist/{TreeList-Bj2qwKXr.js → TreeList-BNEnEOlP.js} +1 -1
  202. package/dist/Typeahead/index.js +1 -1
  203. package/dist/{Typeahead-CbZ3CWDI.js → Typeahead-_ijsXkA2.js} +2 -2
  204. package/dist/{accessibleName-Cr8Gc_jb.js → accessibleName-BSQ6PVw-.js} +1 -1
  205. package/dist/{assertOptions-B_PuRGYf.js → assertOptions-vMdbE0ED.js} +1 -1
  206. package/dist/{boxHold-JsQX9R5i.js → boxHold-DthWQaiw.js} +1 -1
  207. package/dist/composables/index.js +5 -5
  208. package/dist/{composables-C-syBXby.js → composables-G10dqPNt.js} +6 -6
  209. package/dist/{holdEntranceInput-Cs656CnM.js → holdEntranceInput-DK89Ky_U.js} +1 -1
  210. package/dist/{index-Bi1pouq-.d.ts → index--pZVy2s-.d.ts} +5 -5
  211. package/dist/{index-DSAtZP4A.d.ts → index-B8NGDyIe.d.ts} +1 -1
  212. package/dist/{index-ZbNwGVkS.d.ts → index-BKnyTWPM.d.ts} +1 -1
  213. package/dist/{index-BbHuan0g.d.ts → index-BZ_lQz43.d.ts} +1 -1
  214. package/dist/{index-CdvmnNMH.d.ts → index-BaFphczL.d.ts} +1 -1
  215. package/dist/{index-Cm36VS1A.d.ts → index-C3JmGujU.d.ts} +3 -3
  216. package/dist/{index-B_XTzQhm.d.ts → index-C5HUsKnf.d.ts} +2 -2
  217. package/dist/{index-C7uGs5Cl.d.ts → index-C8hyLvk2.d.ts} +2 -2
  218. package/dist/{index-CbA8rR_b.d.ts → index-CBOv5j3c.d.ts} +1 -1
  219. package/dist/{index-CmqD5Ya9.d.ts → index-CD1-Hqm0.d.ts} +2 -2
  220. package/dist/{index-DpqIbYtF.d.ts → index-COazJoIt.d.ts} +3 -3
  221. package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
  222. package/dist/{index-DofC9Rll.d.ts → index-D3UaSnbN.d.ts} +2 -2
  223. package/dist/{index-BaXcJ7eE.d.ts → index-DSsuY9v9.d.ts} +1 -1
  224. package/dist/{index-6Ni2na07.d.ts → index-Dqo0KSCZ.d.ts} +56 -56
  225. package/dist/{index-tdOyqA_U.d.ts → index-Pad9p8CU.d.ts} +2 -2
  226. package/dist/{index-DpyZvaKL.d.ts → index-SdevVVTE.d.ts} +3 -3
  227. package/dist/{index-BA8exXNP.d.ts → index-X4S7_dmq.d.ts} +1 -1
  228. package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
  229. package/dist/{index-DyvHDvtx.d.ts → index-anFpazJ1.d.ts} +2 -2
  230. package/dist/{index-D5oxLvaf.d.ts → index-ehT_1wO5.d.ts} +2 -2
  231. package/dist/index.d.ts +22 -22
  232. package/dist/index.js +80 -80
  233. package/dist/{inputAge-C-SoLwpD.js → inputAge-Bc4vvqmK.js} +1 -1
  234. package/dist/{inputHold-C1LkNE02.js → inputHold-DJrwmWbJ.js} +156 -10
  235. package/dist/internal/touch.js +6 -6
  236. package/dist/{itemSlots-DQS1Q4hS.js → itemSlots-DtrAXXlG.js} +2 -2
  237. package/dist/{lazyBottomSheet-1hbBBtDy.js → lazyBottomSheet-B5gCaBx3.js} +1 -1
  238. package/dist/{position--G96FPl4.js → position-BHOceBaS.js} +1 -37
  239. package/dist/{snapPagingCatcher-ivaaFuon.js → snapPagingCatcher-CJopa2KW.js} +1 -1
  240. package/dist/{useActionGroupTracking-CXIqZDh3.js → useActionGroupTracking-fTU4uvzA.js} +1 -1
  241. package/dist/useBackdropPress-DmQKlVSk.js +50 -0
  242. package/dist/{useFingerScroll-CAC6Pd3m.js → useFingerScroll-BOegur8G.js} +1 -1
  243. package/dist/{useGestureRecognizer-C7CXCbBp.js → useGestureRecognizer-BPFoGD43.js} +1 -1
  244. package/dist/{useInputStatusIcon-DBPW7-tw.js → useInputStatusIcon-DFx25PSi.js} +1 -1
  245. package/dist/{useMenuEntranceHold-Dkl03O-0.js → useMenuEntranceHold-Dewv7oTN.js} +1 -1
  246. package/dist/{useMenuPress-DKGeEWJw.js → useMenuPress-Cxn2iz5-.js} +1 -1
  247. package/dist/{usePressFeedback-X_9-5DMi.js → usePressFeedback-DjRpNo2t.js} +1 -1
  248. package/dist/utils/index.js +1 -1
  249. package/package.json +1 -1
  250. package/styles/bottom-sheet.css +10 -0
  251. package/styles/overlay.css +36 -11
  252. package/dist/{index-C1a8VQ2i.d.ts → index-7tsRPFfY.d.ts} +1 -1
@@ -1,5 +1,6 @@
1
1
  import { n as getLastMousePoint, s as subscribeInput, t as getDownPresses } from "./inputStream-CFvjNDgT.js";
2
2
  import { c as isHTMLElement, l as isNode, n as deepActiveElement, o as isDocument, r as parentAcrossShadow, s as isElement, t as containsAlongFlatTree } from "./flatTree-BB4yPMNL.js";
3
+ import { r as timeOn } from "./inputAge-Bc4vvqmK.js";
3
4
  import { n as registerTouchHold } from "./touchHold-CciGr8hU.js";
4
5
  import { t as FOCUSABLE_SELECTOR } from "./focus-DxAD3umZ.js";
5
6
  import { a as liveLayers, i as isMouseLast, n as heldDocuments, o as liveShields, r as isInputShield, s as pressHolds, t as held } from "./inputHoldState-B4uHEjk5.js";
@@ -57,6 +58,64 @@ function makeContentInert(layer, shield) {
57
58
  function restoreContent(content) {
58
59
  for (const [element, wasInert] of content) if (!wasInert) element.removeAttribute("inert");
59
60
  }
61
+ /** 暂挡看到的帧不到两帧时用的帧间隔。 */
62
+ const DEFAULT_FRAME_MS = 1e3 / 60;
63
+ /**
64
+ * @param view - 暂挡所在的窗口。
65
+ * @param isHolding - 还在挡吗;离开文档的浮层在这里结束记帧。
66
+ */
67
+ function createHoldFrames(view, isHolding) {
68
+ const now = () => view.performance.now();
69
+ /** 挡着期间最后一帧开始的时刻,或者暂挡开始的时刻。 */
70
+ let lastFrameAt = now();
71
+ /** 倒数第二帧开始的时刻。 */
72
+ let frameBeforeAt = null;
73
+ /** 最近几帧之间的间隔,最多八个。 */
74
+ const gaps = [];
75
+ let request = null;
76
+ function watch() {
77
+ if (request != null || typeof view.requestAnimationFrame !== "function") return;
78
+ request = view.requestAnimationFrame((frameTime) => {
79
+ request = null;
80
+ if (!isHolding()) return;
81
+ const at = Math.min(frameTime, now());
82
+ if (frameBeforeAt != null) {
83
+ gaps.push(at - lastFrameAt);
84
+ if (gaps.length > 8) gaps.shift();
85
+ }
86
+ frameBeforeAt = lastFrameAt;
87
+ lastFrameAt = at;
88
+ watch();
89
+ });
90
+ }
91
+ function interval() {
92
+ const sorted = [...gaps].sort((a, b) => a - b);
93
+ return sorted.length > 0 ? sorted[Math.floor(sorted.length / 2)] : DEFAULT_FRAME_MS;
94
+ }
95
+ return {
96
+ start(isNewHold) {
97
+ if (isNewHold) {
98
+ lastFrameAt = now();
99
+ frameBeforeAt = null;
100
+ }
101
+ watch();
102
+ },
103
+ stop() {
104
+ if (request != null) {
105
+ view.cancelAnimationFrame?.(request);
106
+ request = null;
107
+ }
108
+ },
109
+ interval,
110
+ isAfterLongTask() {
111
+ const frame = interval();
112
+ const longest = 2 * frame;
113
+ const sinceFrame = now() - lastFrameAt;
114
+ const endsLongGap = frameBeforeAt != null && sinceFrame <= frame && lastFrameAt - frameBeforeAt > longest;
115
+ return sinceFrame > longest || endsLongGap;
116
+ }
117
+ };
118
+ }
60
119
  //#endregion
61
120
  //#region src/layer/inputHoldShield.ts
62
121
  const SWALLOWED = [
@@ -197,6 +256,15 @@ function openToEarlierPresses(state, doc) {
197
256
  const HELD_POINTERS = /* @__PURE__ */ new Set(["touch", "pen"]);
198
257
  /** 被挡的一下在暂挡结束后最多再跟多久。 */
199
258
  const STRAY_PRESS_MS = 1e4;
259
+ /**
260
+ * `scope` 范围、挡着 `layer` 的暂挡挡不挡落在 `target` 上的新按压。盖满视口时按在哪都挡;
261
+ * 退场时也是,退场浮层里面的另一个浮层除外;只挡自己那块(`'surface'`)时,只挡按在浮层上的。
262
+ */
263
+ function isPressHeldBy(scope, layer, target) {
264
+ if (scope === "viewport") return true;
265
+ if (scope === "layer") return !(isNode(target) && isInNestedLayer(target, layer));
266
+ return isNode(target) && containsAlongFlatTree(layer, target);
267
+ }
200
268
  const POINTER_EVENTS = [
201
269
  "pointerdown",
202
270
  "pointermove",
@@ -228,9 +296,13 @@ function pressHoldFor(doc) {
228
296
  }
229
297
  /**
230
298
  * 有浮层被挡期间,拦下落进 `doc` 窗口的每一下手指或笔的按压,每一下都跟到它
231
- * 自己结束,哪怕暂挡已经放开。移动的鼠标从挡板穿过去。它通过共享输入流最先
232
- * 听到事件,被挡的事件在那里就停下:文档、元素上的监听都听不到,按压反馈和
233
- * 手势宿主也听不到。每个文档一份;不再挡、被挡的按压和它们的 click 都结束后退订。
299
+ * 自己结束,哪怕暂挡已经放开。按压按它事件带的时间(手指落下的时刻)判断,所以
300
+ * 暂挡期间落下、引擎在暂挡结束后才派发的一下照样挡:按时的放开之后等
301
+ * `LATE_RELEASE_FRAMES` 个帧间隔,长任务里的放开之后等 `LATE_PRESS_MS`。手指或笔的
302
+ * 一下有 pointerdown 和 touchstart 两个起点,时间和目标相同,第二个跟第一个的判决走。
303
+ * 移动的鼠标从挡板穿过去。它通过共享输入流最先听到事件,被挡的事件在那里就停下:
304
+ * 文档、元素上的监听都听不到,按压反馈和手势宿主也听不到。每个文档一份;不再挡、
305
+ * 被挡的按压和它们的 click 都结束、也没有迟到的按压还能来之后退订。
234
306
  */
235
307
  function createPressHold(doc) {
236
308
  const view = doc.defaultView;
@@ -245,6 +317,11 @@ function createPressHold(doc) {
245
317
  let lastPress = null;
246
318
  /** 没写指针类型的 click 在这个时刻之前都算被挡那一下的。 */
247
319
  let clickUntil = -Infinity;
320
+ /** 被挡的手指或笔起点里,另一个起点还没来的。 */
321
+ const heldPointerStarts = [];
322
+ const heldTouchStarts = [];
323
+ /** 结束了的暂挡,它们期间按下的按压还可能迟到。 */
324
+ const endedHolds = [];
248
325
  let timer;
249
326
  const unsubscribers = [];
250
327
  const now = () => view.performance.now();
@@ -261,7 +338,8 @@ function createPressHold(doc) {
261
338
  timer = setTimeout(stop, STRAY_PRESS_MS);
262
339
  return;
263
340
  }
264
- const wait = clickUntil - now();
341
+ const lateUntil = Math.max(-Infinity, ...endedHolds.map((hold) => hold.until));
342
+ const wait = Math.max(clickUntil, lateUntil) - now();
265
343
  if (wait > 0) timer = setTimeout(stop, wait);
266
344
  else stop();
267
345
  };
@@ -270,6 +348,31 @@ function createPressHold(doc) {
270
348
  if (isHolding) liveLayers(doc);
271
349
  return isHolding;
272
350
  };
351
+ const frames = createHoldFrames(view, () => isListening && holdsNewPress());
352
+ /** 取走时间和目标都对得上、正在等的那个起点。 */
353
+ const takeHeldStart = (starts, time, target) => {
354
+ const index = starts.findIndex((start) => start.time === time && start.target === target);
355
+ if (index === -1) return false;
356
+ starts.splice(index, 1);
357
+ return true;
358
+ };
359
+ /** 输入发生的时刻,页面时钟上。没带时间、或者时间比现在还晚的算现在。 */
360
+ const timeOfInput = (event) => Math.min(timeOn(view.performance, event.timeStamp) ?? now(), now());
361
+ /** 忘掉 `isDone` 说完了的、过了等待期的、浮层已离开文档的结束暂挡。返回有没有忘掉。 */
362
+ const forgetEndedHolds = (isDone) => {
363
+ const count = endedHolds.length;
364
+ for (let index = count - 1; index >= 0; index--) {
365
+ const hold = endedHolds[index];
366
+ if (isDone(hold) || now() > hold.until || !hold.layer.isConnected) endedHolds.splice(index, 1);
367
+ }
368
+ return endedHolds.length < count;
369
+ };
370
+ /** 时间不早于某次暂挡结束的输入,排在那次暂挡期间按下的每一下之后:那次不会再有迟到的了。 */
371
+ const noteInputAt = (time) => {
372
+ if (forgetEndedHolds((hold) => time >= hold.to)) settle();
373
+ };
374
+ /** 在 `time` 落在 `target` 上的一下,是不是落在一次已结束、当时挡这一下的暂挡期间,而且还在等待期内。 */
375
+ const wasHeldAt = (target, time) => endedHolds.some((hold) => hold.from <= time && time < hold.to && now() <= hold.until && isPressHeldBy(hold.scope, hold.layer, target));
273
376
  /**
274
377
  * 落在 `target` 上的新按压要不要挡。有浮层盖满视口时,按在哪都挡,退场浮层
275
378
  * 里面的另一个浮层除外;只挡自己那块(`'surface'`)时,只挡按在浮层上的,周围页面照常。
@@ -279,8 +382,7 @@ function createPressHold(doc) {
279
382
  for (const layer of liveLayers(doc)) {
280
383
  const state = held.get(layer);
281
384
  if (state == null) continue;
282
- if (state.viewport > 0 || state.layer > 0 && !(isNode(target) && isInNestedLayer(target, layer))) return true;
283
- if (state.surface > 0 && isNode(target) && containsAlongFlatTree(layer, target)) return true;
385
+ if (state.viewport > 0 && isPressHeldBy("viewport", layer, target) || state.layer > 0 && isPressHeldBy("layer", layer, target) || state.surface > 0 && isPressHeldBy("surface", layer, target)) return true;
284
386
  }
285
387
  return false;
286
388
  };
@@ -323,10 +425,14 @@ function createPressHold(doc) {
323
425
  };
324
426
  const onPointer = (event) => {
325
427
  const { pointerId, pointerType, type } = event;
428
+ const time = timeOfInput(event);
429
+ noteInputAt(time);
326
430
  if (HELD_POINTERS.has(pointerType) && type !== "pointerdown" && !pointers.has(pointerId)) followEarlierPress(event);
327
431
  if ((HELD_POINTERS.has(pointerType) ? type === "pointerdown" || type === "pointermove" : pointerType === "mouse" && type === "pointermove" && event.buttons === 0) && holdsNewPress()) followPointer(pointerType);
328
432
  if (type === "pointerdown") {
329
- if (!HELD_POINTERS.has(pointerType) || !holdsPressAt(event.target)) {
433
+ const isFingerOrPen = HELD_POINTERS.has(pointerType);
434
+ const followsHeldTouch = isFingerOrPen && takeHeldStart(heldTouchStarts, time, event.target);
435
+ if (!(followsHeldTouch || isFingerOrPen && (holdsPressAt(event.target) || wasHeldAt(event.target, time)))) {
330
436
  pointers.delete(pointerId);
331
437
  lastPress = "free";
332
438
  clickUntil = -Infinity;
@@ -334,7 +440,12 @@ function createPressHold(doc) {
334
440
  return false;
335
441
  }
336
442
  pointers.add(pointerId);
443
+ if (!followsHeldTouch) heldPointerStarts.push({
444
+ time,
445
+ target: event.target
446
+ });
337
447
  lastPress = "held";
448
+ settle();
338
449
  captureToShield(event);
339
450
  } else if (!pointers.has(pointerId)) return false;
340
451
  swallow(event);
@@ -346,11 +457,14 @@ function createPressHold(doc) {
346
457
  };
347
458
  const onTouch = (event) => {
348
459
  const { changedTouches, touches: down, type } = event;
460
+ const time = timeOfInput(event);
461
+ noteInputAt(time);
349
462
  const changed = Array.from(changedTouches);
350
463
  if (type === "touchstart") {
351
464
  const live = new Set(Array.from(down, (touch) => touch.identifier));
352
465
  for (const identifier of touches) if (!live.has(identifier)) touches.delete(identifier);
353
- const heldTouches = changed.filter((touch) => holdsPressAt(touch.target));
466
+ const followers = changed.filter((touch) => takeHeldStart(heldPointerStarts, time, touch.target));
467
+ const heldTouches = changed.filter((touch) => followers.includes(touch) || holdsPressAt(touch.target) || wasHeldAt(touch.target, time));
354
468
  if (heldTouches.length === 0) {
355
469
  for (const touch of changed) touches.delete(touch.identifier);
356
470
  lastPress = "free";
@@ -358,8 +472,15 @@ function createPressHold(doc) {
358
472
  settle();
359
473
  return false;
360
474
  }
361
- for (const touch of heldTouches) touches.add(touch.identifier);
475
+ for (const touch of heldTouches) {
476
+ touches.add(touch.identifier);
477
+ if (!followers.includes(touch)) heldTouchStarts.push({
478
+ time,
479
+ target: touch.target
480
+ });
481
+ }
362
482
  lastPress = "held";
483
+ settle();
363
484
  event.stopImmediatePropagation();
364
485
  return true;
365
486
  }
@@ -375,6 +496,7 @@ function createPressHold(doc) {
375
496
  return true;
376
497
  };
377
498
  const onPress = (event) => {
499
+ noteInputAt(timeOfInput(event));
378
500
  if (event.detail === 0) return false;
379
501
  const { pointerType } = event;
380
502
  if (lastPress === "held" && (pointerType == null || pointerType === "" || HELD_POINTERS.has(pointerType)) && (isPressDown() || now() <= clickUntil)) {
@@ -385,6 +507,7 @@ function createPressHold(doc) {
385
507
  };
386
508
  const pressHold = {
387
509
  hold() {
510
+ frames.start(!isHolding);
388
511
  isHolding = true;
389
512
  if (timer !== void 0) {
390
513
  clearTimeout(timer);
@@ -394,15 +517,29 @@ function createPressHold(doc) {
394
517
  release() {
395
518
  if (!isHolding) return;
396
519
  isHolding = false;
520
+ frames.stop();
397
521
  settle();
398
522
  },
399
- holds: (pointerId) => pointers.has(pointerId)
523
+ holds: (pointerId) => pointers.has(pointerId),
524
+ ended(hold) {
525
+ forgetEndedHolds(() => false);
526
+ if (!hold.layer.isConnected) return;
527
+ const wait = frames.isAfterLongTask() ? 500 : 2 * frames.interval();
528
+ endedHolds.push({
529
+ ...hold,
530
+ until: hold.to + wait
531
+ });
532
+ }
400
533
  };
401
534
  function stop() {
402
535
  if (!isListening) return;
403
536
  isListening = false;
404
537
  if (pressHolds.get(doc) === pressHold) pressHolds.delete(doc);
405
538
  if (timer !== void 0) clearTimeout(timer);
539
+ frames.stop();
540
+ endedHolds.length = 0;
541
+ heldPointerStarts.length = 0;
542
+ heldTouchStarts.length = 0;
406
543
  for (const unsubscribe of unsubscribers.splice(0)) unsubscribe();
407
544
  }
408
545
  unsubscribers.push(...POINTER_EVENTS.map((type) => subscribeInput(view, type, onPointer, {
@@ -415,6 +552,7 @@ function createPressHold(doc) {
415
552
  cancels: true,
416
553
  first: true
417
554
  })));
555
+ frames.start(false);
418
556
  return pressHold;
419
557
  }
420
558
  //#endregion
@@ -498,12 +636,20 @@ function holdInput(layer, { until, scope }) {
498
636
  }
499
637
  if (raisesFullShield) openToEarlierPresses(state, layer.ownerDocument);
500
638
  openToMouse(state, layer.ownerDocument);
639
+ const clock = layer.ownerDocument.defaultView?.performance;
640
+ const from = clock?.now() ?? 0;
501
641
  let isReleased = false;
502
642
  const release = () => {
503
643
  if (isReleased) return;
504
644
  isReleased = true;
505
645
  const current = held.get(layer);
506
646
  if (current == null) return;
647
+ pressHolds.get(layer.ownerDocument)?.ended({
648
+ layer,
649
+ scope,
650
+ from,
651
+ to: clock?.now() ?? from
652
+ });
507
653
  if (scope === "viewport") current.viewport -= 1;
508
654
  else if (scope === "layer") current.layer -= 1;
509
655
  else current.surface -= 1;
@@ -6,13 +6,13 @@ import { n as createMotionEngine, t as animatorFor } from "../animator-ChW9baIw.
6
6
  import { t as cubicBezier } from "../bezier-Dko5MnTp.js";
7
7
  import { t as resolveMotion } from "../resolveMotion-BHR1cz0Q.js";
8
8
  import { a as NAVIGATION_PUSH_SPRING, i as NAVIGATION_POP_SPRING, n as NAVIGATION_BAR_ELEMENTS_SPRING, r as NAVIGATION_INTERACTIVE_POP_FINISH_SPRING } from "../springs-BqW2WrS-.js";
9
- import { i as ALL_NATIVE_TOUCH, t as getGestureHost } from "../GestureHost-C0FstEs3.js";
10
- import { t as PanGestureRecognizer } from "../PanGestureRecognizer-WZ_rV6KY.js";
9
+ import { i as ALL_NATIVE_TOUCH, t as getGestureHost } from "../GestureHost-CnGqeHAJ.js";
10
+ import { t as PanGestureRecognizer } from "../PanGestureRecognizer-DZpS28MS.js";
11
11
  import { t as TOUCH_QUERY } from "../touchQueries-xy5IeZfe.js";
12
12
  import { t as isCoarsePointer } from "../coarsePointer-BWNSUIY8.js";
13
13
  import { t as isRtlElement } from "../isRtlElement-NHuH48AA.js";
14
14
  import { n as reducedMotionFade } from "../reducedMotion-CgciA13L.js";
15
- import { t as LongPressGestureRecognizer } from "../LongPressGestureRecognizer-C_DTqk3V.js";
15
+ import { t as LongPressGestureRecognizer } from "../LongPressGestureRecognizer-BA7RijIc.js";
16
16
  import { t as focusForLastInput } from "../focusReturn-CXHM5lOY.js";
17
17
  import { i as rubberBandSlope, r as rubberBandInverse, t as rubberBand } from "../rubberBand-CE3LYEUx.js";
18
18
  import { c as measureLogicalScrollAxis } from "../scrollGeometry-ajfQQRJt.js";
@@ -20,9 +20,9 @@ import { n as observeResize } from "../sharedResizeObserver-BnRTJaNh.js";
20
20
  import { t as mapProgress } from "../progress-FQfSgLZC.js";
21
21
  import { t as isFocusLost } from "../focusLeaving-mWmyOnpz.js";
22
22
  import { t as useFocusAcrossSwap } from "../focusAcrossSwap-DYmqoqKg.js";
23
- import { t as TapGestureRecognizer } from "../TapGestureRecognizer-LcbkQFq0.js";
24
- import { t as useGestureRecognizer } from "../useGestureRecognizer-C7CXCbBp.js";
25
- import { t as useFingerScroll } from "../useFingerScroll-CAC6Pd3m.js";
23
+ import { t as TapGestureRecognizer } from "../TapGestureRecognizer-DWgoCDMm.js";
24
+ import { t as useGestureRecognizer } from "../useGestureRecognizer-BPFoGD43.js";
25
+ import { t as useFingerScroll } from "../useFingerScroll-BOegur8G.js";
26
26
  //#region src/gestures/ScreenEdgePanGestureRecognizer.ts
27
27
  /**
28
28
  * How far past `edgeRegion` a view still counts as the edge zone, px: layout
@@ -6,8 +6,8 @@ import { n as createMotionEngine, r as SETTLE_THRESHOLD } from "./animator-ChW9b
6
6
  import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
7
7
  import { t as resolveMotion } from "./resolveMotion-BHR1cz0Q.js";
8
8
  import { d as springs, u as registerSpringsTable } from "./springs-BqW2WrS-.js";
9
- import { t as getGestureHost } from "./GestureHost-C0FstEs3.js";
10
- import { t as PanGestureRecognizer } from "./PanGestureRecognizer-WZ_rV6KY.js";
9
+ import { t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
10
+ import { t as PanGestureRecognizer } from "./PanGestureRecognizer-DZpS28MS.js";
11
11
  import { t as resolveSnapPoint } from "./resolveSnapPoint-Cm2KePTm.js";
12
12
  import { computed, inject, provide } from "vue";
13
13
  //#region src/gestures/createPanGesture.ts
@@ -1,7 +1,7 @@
1
1
  import { defineAsyncComponent } from "vue";
2
2
  //#region src/BottomSheet/lazyBottomSheet.ts
3
3
  function loadBottomSheet() {
4
- return import("./BottomSheet-CH8G6HC4.js").then((n) => n.t);
4
+ return import("./BottomSheet-cYjgB_uE.js").then((n) => n.t);
5
5
  }
6
6
  /**
7
7
  * 按需加载的 BottomSheet:只在底部弹层真正进入组件树时请求,只用锚定浮层的页面
@@ -1,39 +1,3 @@
1
- import { r as didOutsideDismissInGesture, s as currentGesture } from "./layerDepth-DxI-GE81.js";
2
- //#region src/layer/useBackdropPress.ts
3
- /**
4
- * 模态框「点遮罩关闭」的共用判断。Dialog(含 Drawer、CommandPalette)都走这里。
5
- *
6
- * 原生 `<dialog>` 的遮罩没有自己的元素,点在遮罩上的 click 目标就是 dialog 本身。
7
- * 只看 click 不够,两种情况要排除:
8
- *
9
- * - 按下在框里、松手在遮罩上(拖选文字、拖滑块拖出了边)。浏览器把这次 click
10
- * 发给两者共同的祖先,也就是 dialog,看起来像点了遮罩。只有按下和松手都在
11
- * 遮罩上才算。
12
- * - 这一下按压已经把框里打开的弹出框当作「点外面」关掉了。这一下是弹出框的,
13
- * 模态框留着;再点一次遮罩才关它,和连按两次 Escape 一样。
14
- */
15
- function useBackdropPress(getHost, onDismiss) {
16
- let downOnBackdrop = false;
17
- let downGesture = null;
18
- function onPointerDown(event) {
19
- downOnBackdrop = event.target === getHost();
20
- downGesture = currentGesture();
21
- }
22
- function onClick(event) {
23
- const startedOnBackdrop = downOnBackdrop;
24
- const gesture = downGesture;
25
- downOnBackdrop = false;
26
- downGesture = null;
27
- if (event.target !== getHost() || !startedOnBackdrop) return;
28
- if (gesture != null && didOutsideDismissInGesture(gesture)) return;
29
- onDismiss();
30
- }
31
- return {
32
- onPointerDown,
33
- onClick
34
- };
35
- }
36
- //#endregion
37
1
  //#region src/Dialog/context.ts
38
2
  const DIALOG_CONTEXT_KEY = Symbol("astryx-dialog");
39
3
  //#endregion
@@ -76,4 +40,4 @@ function formatDialogSize(value) {
76
40
  return typeof value === "number" ? `${value}px` : value;
77
41
  }
78
42
  //#endregion
79
- export { useBackdropPress as a, DIALOG_CONTEXT_KEY as i, resolveDialogPositionOffsets as n, findInitialFocusTarget as r, formatDialogSize as t };
43
+ export { DIALOG_CONTEXT_KEY as i, resolveDialogPositionOffsets as n, findInitialFocusTarget as r, formatDialogSize as t };
@@ -4,7 +4,7 @@ import { d as registerScrollTable, f as scroll } from "./gestures-BpGkqgpV.js";
4
4
  import { r as SETTLE_THRESHOLD } from "./animator-ChW9baIw.js";
5
5
  import { t as resolveMotion } from "./resolveMotion-BHR1cz0Q.js";
6
6
  import { n as solveDecay } from "./decay-ClFADeqT.js";
7
- import { t as LongPressGestureRecognizer } from "./LongPressGestureRecognizer-C_DTqk3V.js";
7
+ import { t as LongPressGestureRecognizer } from "./LongPressGestureRecognizer-BA7RijIc.js";
8
8
  //#region src/motion/coast.ts
9
9
  /** A curve that holds `end` from `duration` on. */
10
10
  function settling(duration, end, at, velocity) {
@@ -1,6 +1,6 @@
1
1
  import { f as isTrackedByGroup, v as GROUP_PRESS_POINTERS, y as PRESS_GROUP_ITEM_ATTRIBUTE } from "./pressSlot-WuaTVSU4.js";
2
2
  import { a as resolveGroupTouch, i as createActionGroupTracker } from "./useTouchHitArea-Cs4K31MA.js";
3
- import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
3
+ import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
4
4
  import { n as isInsideScrollView } from "./scrollView-D2GwmeFx.js";
5
5
  import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-VrM5-7aV.js";
6
6
  import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
@@ -0,0 +1,50 @@
1
+ import { r as didOutsideDismissInGesture, s as currentGesture } from "./layerDepth-DxI-GE81.js";
2
+ //#region src/layer/useBackdropPress.ts
3
+ /**
4
+ * 模态框「点遮罩关闭」的共用判断。Dialog(含 Drawer、CommandPalette)都走这里。
5
+ *
6
+ * 原生 `<dialog>` 的遮罩没有自己的元素,点在遮罩上的 click 目标就是 dialog 本身。
7
+ * 只看 click 不够,两种情况要排除:
8
+ *
9
+ * - 按下在框里、松手在遮罩上(拖选文字、拖滑块拖出了边),或者反过来。浏览器把
10
+ * 这次 click 发给两者共同的祖先,也就是 dialog,看起来像点了遮罩。只有按下和
11
+ * 松手都在遮罩上才算;被取消的按压不算。
12
+ * - 这一下按压已经把框里打开的弹出框当作「点外面」关掉了。这一下是弹出框的,
13
+ * 模态框留着;再点一次遮罩才关它,和连按两次 Escape 一样。
14
+ */
15
+ function useBackdropPress(getHost, onDismiss) {
16
+ let downOnBackdrop = false;
17
+ let upOnBackdrop = false;
18
+ let downGesture = null;
19
+ function onPointerDown(event) {
20
+ downOnBackdrop = event.target === getHost();
21
+ upOnBackdrop = false;
22
+ downGesture = currentGesture();
23
+ }
24
+ function onPointerUp(event) {
25
+ upOnBackdrop = downOnBackdrop && event.target === getHost();
26
+ downOnBackdrop = false;
27
+ }
28
+ function onPointerCancel() {
29
+ downOnBackdrop = false;
30
+ upOnBackdrop = false;
31
+ }
32
+ function onClick(event) {
33
+ const pressedOnBackdrop = upOnBackdrop;
34
+ const gesture = downGesture;
35
+ downOnBackdrop = false;
36
+ upOnBackdrop = false;
37
+ downGesture = null;
38
+ if (event.target !== getHost() || !pressedOnBackdrop) return;
39
+ if (gesture != null && didOutsideDismissInGesture(gesture)) return;
40
+ onDismiss();
41
+ }
42
+ return {
43
+ onPointerDown,
44
+ onPointerUp,
45
+ onPointerCancel,
46
+ onClick
47
+ };
48
+ }
49
+ //#endregion
50
+ export { useBackdropPress as t };
@@ -1,6 +1,6 @@
1
1
  import { s as subscribeInput } from "./inputStream-CFvjNDgT.js";
2
2
  import { l as isNode, o as isDocument } from "./flatTree-BB4yPMNL.js";
3
- import { t as getGestureHost } from "./GestureHost-C0FstEs3.js";
3
+ import { t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
4
4
  import { r as watchCoarsePointer, t as isCoarsePointer } from "./coarsePointer-BWNSUIY8.js";
5
5
  import { t as useAttachment } from "./useAttachment-CGiD9rt6.js";
6
6
  //#region src/gestures/fingerScroll.ts
@@ -1,5 +1,5 @@
1
1
  import { a as sharedState } from "./sharedRealm-BYHklCVM.js";
2
- import { l as internals, t as getGestureHost } from "./GestureHost-C0FstEs3.js";
2
+ import { l as internals, t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
3
3
  import { t as useAttachment } from "./useAttachment-CGiD9rt6.js";
4
4
  import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
5
5
  //#region src/gestures/gestureSync.ts
@@ -1,5 +1,5 @@
1
1
  import { t as _sfc_main } from "./FieldIcon-COfz-h_b.js";
2
- import { t as _sfc_main$1 } from "./FieldInfoTip-CxhS1Oei.js";
2
+ import { t as _sfc_main$1 } from "./FieldInfoTip-Dss2g3m-.js";
3
3
  import { computed, toValue } from "vue";
4
4
  //#region src/composables/useInputStatusIcon.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { t as holdEntranceInput } from "./holdEntranceInput-Cs656CnM.js";
1
+ import { t as holdEntranceInput } from "./holdEntranceInput-DK89Ky_U.js";
2
2
  import { nextTick, onBeforeUnmount, watch } from "vue";
3
3
  //#region src/layer/useMenuEntranceHold.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { a as withoutClickGuard, i as endsTouch, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-DOe-7mpi.js";
2
- import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
2
+ import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
3
3
  import { s as currentGesture } from "./layerDepth-DxI-GE81.js";
4
4
  import { t as focusForLastInput } from "./focusReturn-CXHM5lOY.js";
5
5
  import { t as claimPress } from "./pressClaim-DvdlIn4w.js";
@@ -1,7 +1,7 @@
1
1
  import { a as finish, d as PRESS_CONTAINER_ATTRIBUTE, f as isTrackedByGroup, i as finger, l as PRESSABLE_ATTRIBUTE, n as apply, o as releaseIfDead, p as pressSurfaceAt, r as button, s as takeOver, u as PRESS_ACTION_ATTRIBUTE } from "./pressSlot-WuaTVSU4.js";
2
2
  import { s as subscribeInput } from "./inputStream-CFvjNDgT.js";
3
3
  import { s as UIKIT_PRESS } from "./gestures-BpGkqgpV.js";
4
- import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
4
+ import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
5
5
  import { n as isInsideScrollView } from "./scrollView-D2GwmeFx.js";
6
6
  import { a as idlePressGesture, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS } from "./pressGesture-VrM5-7aV.js";
7
7
  import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
@@ -5,6 +5,6 @@ import { a as unobserveResize, n as observeResize } from "../sharedResizeObserve
5
5
  import { a as formatDisplayTime12h, i as createISOTimeString, n as clampTime, o as formatDisplayTime24h, r as compareTime, t as adjustTime, u as parseTimeInput } from "../timeParser-nVL5sIwT.js";
6
6
  import { A as plainDateSetFirstOfMonth, C as plainDateIsAfter, D as plainDateMax, E as plainDateIsInRange, F as plainDateToday, I as plainDateWeekFieldName, M as plainDateToDate, N as plainDateToISO, O as plainDateMin, P as plainDateToInstant, S as plainDateGetWeekNumber, T as plainDateIsEqual, _ as plainDateDiffDays, a as DATE_FORMAT_SHORT_WITH_WEEKDAY, b as plainDateFromISO, c as DATE_FORMAT_WITH_WEEKDAY, d as getDaysInMonth, f as getTimeZoneParts, g as plainDateDayOfWeek, h as plainDateCreate, i as DATE_FORMAT_SHORT, j as plainDateSetStartOfWeek, k as plainDateSetEndOfWeekExclusive, l as SHARED_DATE_FORMAT_OPTIONS, m as plainDateAddMonths, n as DATE_FORMAT_MONTH_ONLY, o as DATE_FORMAT_SHORT_WITH_YEAR, p as plainDateAddDays, r as DATE_FORMAT_MONTH_YEAR, s as DATE_FORMAT_WEEKDAY_ONLY, t as DATE_FORMAT_LONG, u as formatSharedDate, v as plainDateFormat, w as plainDateIsBefore, x as plainDateFromInstant, y as plainDateFromDate } from "../plainDate-By2VjeSI.js";
7
7
  import { a as pickerPresentationFromNativePicker, c as resolvePickerPresentation, i as effectivePickerPresentation, l as isLocaleDayFirst, o as presentationFromNativePicker, r as effectiveInputPresentation, s as resolveInputPresentation, t as DEFAULT_INPUT_PRESENTATION, u as parseDateInput } from "../inputPresentation-Br70N2eS.js";
8
- import { t as useFingerScroll } from "../useFingerScroll-CAC6Pd3m.js";
8
+ import { t as useFingerScroll } from "../useFingerScroll-BOegur8G.js";
9
9
  import { a as groupItems, i as getItemGroup, n as getInputARIA, o as normalizeDayOfWeek, r as joinAriaIDs, s as chainEventHandlers, t as parseStyleKey } from "../utils-BW62BpDR.js";
10
10
  export { DATE_FORMAT_LONG, DATE_FORMAT_MONTH_ONLY, DATE_FORMAT_MONTH_YEAR, DATE_FORMAT_SHORT, DATE_FORMAT_SHORT_WITH_WEEKDAY, DATE_FORMAT_SHORT_WITH_YEAR, DATE_FORMAT_WEEKDAY_ONLY, DATE_FORMAT_WITH_WEEKDAY, DEFAULT_INPUT_PRESENTATION, SHARED_DATE_FORMAT_OPTIONS, adjustTime, chainEventHandlers, characterCount, clampTime, compareTime, createISOTimeString, plainDateToISO as dateToISO, plainDateToISO, effectiveInputPresentation, effectivePickerPresentation, firstCharacter, formatDisplayTime12h, formatDisplayTime24h, formatSharedDate, getDaysInMonth, getInputARIA, getItemGroup, getTimeZoneParts, groupItems, isLocaleDayFirst, isSafeDestination, isSafeUrl, joinAriaIDs, normalizeDayOfWeek, observeResize, parseDateInput, plainDateFromISO as parseISO, plainDateFromISO, parseStyleKey, parseTimeInput, pickerPresentationFromNativePicker, plainDateAddDays, plainDateAddMonths, plainDateCreate, plainDateDayOfWeek, plainDateDiffDays, plainDateFormat, plainDateFromDate, plainDateFromInstant, plainDateGetWeekNumber, plainDateIsAfter, plainDateIsBefore, plainDateIsEqual, plainDateIsInRange, plainDateMax, plainDateMin, plainDateSetEndOfWeekExclusive, plainDateSetFirstOfMonth, plainDateSetStartOfWeek, plainDateToDate, plainDateToInstant, plainDateToday, plainDateWeekFieldName, presentationFromNativePicker, resolveInputPresentation, resolvePickerPresentation, sanitizeUrl, truncateCharacters, unobserveResize, scrollEventTarget as unstable_scrollEventTarget, scrollportTop as unstable_scrollportTop, scrollsPage as unstable_scrollsPage, setScrollAnchoringOff as unstable_setScrollAnchoringOff, useFingerScroll as unstable_useFingerScroll };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/core",
3
3
  "type": "module",
4
- "version": "0.48.0",
4
+ "version": "0.48.2",
5
5
  "description": "Vue 3 components for the unofficial astryx-vue port of Astryx. Not affiliated with Meta.",
6
6
  "author": "ShenQingchuan",
7
7
  "license": "MIT",
@@ -471,4 +471,14 @@
471
471
  transition-duration: var(--_sheet-scrim-duration, 0.01s);
472
472
  }
473
473
  }
474
+
475
+ /* 主题对所有人减少动效时一样:抽屉和叠放的位移几乎瞬间落定,过渡照样会结束。 */
476
+ :where([data-astryx-reduced-motion]) .astryx-bottom-sheet,
477
+ :where([data-astryx-reduced-motion]) .astryx-bottom-sheet-stack-motion {
478
+ transition-duration: 0.01s;
479
+ }
480
+
481
+ :where([data-astryx-reduced-motion]) .astryx-bottom-sheet-dialog--scrim::backdrop {
482
+ transition-duration: var(--_sheet-scrim-duration, 0.01s);
483
+ }
474
484
  }
@@ -21,8 +21,12 @@
21
21
  gap: var(--astryx-spacing-2, 8px);
22
22
  padding: var(--astryx-spacing-3, 12px);
23
23
  pointer-events: none;
24
- transition-property: opacity, visibility, transform;
25
- transition-duration: var(--astryx-duration-fast-max, 165ms);
24
+ /* The clip path is discrete: its delay times it against the fade. */
25
+ transition-property: opacity, visibility, transform, clip-path;
26
+ transition-duration:
27
+ var(--astryx-duration-fast-max, 165ms), var(--astryx-duration-fast-max, 165ms),
28
+ var(--astryx-duration-fast-max, 165ms), 0s;
29
+ transition-behavior: allow-discrete;
26
30
  transition-timing-function: var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
27
31
  }
28
32
 
@@ -105,12 +109,18 @@
105
109
 
106
110
  /*
107
111
  * Hidden, driven by CSS: the reveal is selected on the container, so the
108
- * scrim itself only carries the resting state here.
112
+ * scrim itself only carries the resting state here. It hides with opacity,
113
+ * not visibility, so its content stays in the tab order: Tab reaches an
114
+ * action and focus within reveals it. At rest a clip path keeps the content
115
+ * out of hit-testing, content that sets its own pointer-events and a touch
116
+ * tap that comes before the hover state included. On hide the clip applies
117
+ * once the fade ends.
109
118
  */
110
119
  .astryx-overlay-scrim[data-visibility='hover'],
111
120
  .astryx-overlay-scrim[data-visibility='focus'] {
112
121
  opacity: 0;
113
- visibility: hidden;
122
+ clip-path: inset(50%);
123
+ transition-delay: 0s, 0s, 0s, var(--astryx-duration-fast-max, 165ms);
114
124
  }
115
125
 
116
126
  .astryx-overlay-scrim[data-position='bottom'][data-visibility='hidden'],
@@ -125,26 +135,32 @@
125
135
  transform: translateY(-100%);
126
136
  }
127
137
 
128
- /* Hover needs a pointer that can hover; a touch device toggles by tap. */
138
+ /*
139
+ * Hover needs a pointer that can hover; a touch device toggles by tap. On a
140
+ * hover reveal the clip lifts one frame after the fade starts, so the first
141
+ * paint and the first click land on the same frame.
142
+ */
129
143
  @media (hover: hover) {
130
144
  .astryx-overlay-scope:hover .astryx-overlay-scrim[data-visibility='hover'] {
131
145
  opacity: 1;
132
- visibility: visible;
133
146
  pointer-events: auto;
134
147
  transform: translateY(0);
148
+ clip-path: none;
149
+ transition-delay: 0s, 0s, 0s, 1ms;
135
150
  }
136
151
  }
137
152
 
138
153
  /*
139
- * Focus reveals the overlay for keyboard users, and keeps it on screen while
140
- * the content inside holds focus.
154
+ * Focus reveals the overlay for keyboard users at once, and keeps it on
155
+ * screen while the content inside holds focus.
141
156
  */
142
157
  .astryx-overlay-scope:focus-within .astryx-overlay-scrim[data-visibility='hover'],
143
158
  .astryx-overlay-scope:focus-within .astryx-overlay-scrim[data-visibility='focus'] {
144
159
  opacity: 1;
145
- visibility: visible;
146
160
  pointer-events: auto;
147
161
  transform: translateY(0);
162
+ clip-path: none;
163
+ transition-delay: 0s;
148
164
  }
149
165
 
150
166
  @starting-style {
@@ -163,9 +179,18 @@
163
179
  }
164
180
  }
165
181
 
182
+ /* Under reduced motion, from the setting or a theme, the scrim shows and hides at once. */
166
183
  @media (prefers-reduced-motion: reduce) {
167
- .astryx-overlay-scrim {
168
- transition-duration: 0.01ms;
184
+ .astryx-overlay-scrim,
185
+ .astryx-overlay-scope:is(:hover, :focus-within, *) .astryx-overlay-scrim[data-visibility] {
186
+ transition-duration: 0s;
187
+ transition-delay: 0s;
169
188
  }
170
189
  }
190
+
191
+ :where([data-astryx-reduced-motion]) .astryx-overlay-scrim,
192
+ :where([data-astryx-reduced-motion]) .astryx-overlay-scope:is(:hover, :focus-within, *) .astryx-overlay-scrim[data-visibility] {
193
+ transition-duration: 0s;
194
+ transition-delay: 0s;
195
+ }
171
196
  }