@astryx-vue/core 0.24.0 → 0.25.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 (266) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-DXOTr1D7.js → AlertDialog-Cub9_aPC.js} +6 -6
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-Cmu6bMY6.js → AppShell-D62A7lqZ.js} +5 -5
  5. package/dist/Avatar/index.js +1 -1
  6. package/dist/{Avatar-dMcn3j8Z.js → Avatar-BKoSK75s.js} +1 -1
  7. package/dist/AvatarGroup/index.d.ts +1 -1
  8. package/dist/AvatarGroup/index.js +1 -1
  9. package/dist/{AvatarGroup-BUXjzekw.js → AvatarGroup-DT5RbxDa.js} +1 -1
  10. package/dist/Banner/index.d.ts +1 -1
  11. package/dist/Banner/index.js +1 -1
  12. package/dist/{Banner-CTY9qV89.js → Banner-cg2nXT_4.js} +1 -1
  13. package/dist/BottomSheet/index.d.ts +1 -1
  14. package/dist/BottomSheet/index.js +2 -2
  15. package/dist/{BottomSheet-ZOjuZya0.js → BottomSheet-CpLYy3vb.js} +1 -1
  16. package/dist/{BottomSheet-DyJJtZZU.js → BottomSheet-DGhRZLw4.js} +108 -8
  17. package/dist/Breadcrumbs/index.js +2 -2
  18. package/dist/{Breadcrumbs-Nv-089W0.js → Breadcrumbs-D-nHDHV8.js} +1 -1
  19. package/dist/Button/index.js +1 -1
  20. package/dist/{Button-TiYG0btL.js → Button-D8AGK5oT.js} +3 -3
  21. package/dist/ButtonGroup/index.d.ts +1 -1
  22. package/dist/ButtonGroup/index.js +1 -1
  23. package/dist/{ButtonGroup-DNN4O9_-.js → ButtonGroup-CUN_rC57.js} +2 -2
  24. package/dist/Calendar/index.d.ts +1 -1
  25. package/dist/Carousel/index.d.ts +1 -1
  26. package/dist/Carousel/index.js +1 -1
  27. package/dist/{Carousel-DsXup1mZ.js → Carousel-DrCG9wbP.js} +1 -1
  28. package/dist/Chat/index.d.ts +1 -1
  29. package/dist/Chat/index.js +1 -1
  30. package/dist/{Chat-DqYT_S9M.js → Chat-U1qq8gkF.js} +3 -3
  31. package/dist/CheckboxInput/index.d.ts +1 -1
  32. package/dist/CheckboxInput/index.js +1 -1
  33. package/dist/{CheckboxInput-FKfsoLcl.js → CheckboxInput-qm6lkjAw.js} +3 -3
  34. package/dist/CheckboxList/index.d.ts +1 -1
  35. package/dist/CheckboxList/index.js +1 -1
  36. package/dist/{CheckboxList-DuSVBtMk.js → CheckboxList-DuCKhJHJ.js} +5 -5
  37. package/dist/ClickableCard/index.d.ts +1 -1
  38. package/dist/ClickableCard/index.js +1 -1
  39. package/dist/{ClickableCard-dNmSVHBu.js → ClickableCard-CwGxO0GU.js} +1 -1
  40. package/dist/Code/index.js +1 -1
  41. package/dist/{CodeBlock-5KoJDvWd.js → CodeBlock-PMZd9dQ9.js} +1 -1
  42. package/dist/Collapsible/index.js +1 -1
  43. package/dist/{Collapsible-B1qW6OuL.js → Collapsible-BmUloCSR.js} +3 -3
  44. package/dist/CommandPalette/index.js +1 -1
  45. package/dist/{CommandPalette-B2riNg_7.js → CommandPalette-Cy7trpD3.js} +2 -2
  46. package/dist/ComplexSelector/index.js +1 -1
  47. package/dist/{ComplexSelector-C4CO8Fd2.js → ComplexSelector-DMBiVQWp.js} +2 -2
  48. package/dist/ContextMenu/index.d.ts +1 -1
  49. package/dist/ContextMenu/index.js +2 -2
  50. package/dist/{ContextMenu-SzsWZf18.js → ContextMenu-63ay7EE-.js} +13 -26
  51. package/dist/DateInput/index.d.ts +1 -1
  52. package/dist/DateInput/index.js +1 -1
  53. package/dist/{DateInput-D9Jv70H7.js → DateInput-B3Q91FDT.js} +3 -3
  54. package/dist/DateRangeInput/index.d.ts +1 -1
  55. package/dist/DateRangeInput/index.js +1 -1
  56. package/dist/{DateRangeInput-BsB2kg_q.js → DateRangeInput-B6Z66OsH.js} +3 -3
  57. package/dist/DateTimeInput/index.d.ts +1 -1
  58. package/dist/DateTimeInput/index.js +1 -1
  59. package/dist/{DateTimeInput-BDyKPKGD.js → DateTimeInput-B_7cn7ze.js} +5 -5
  60. package/dist/Dialog/index.d.ts +1 -1
  61. package/dist/Dialog/index.js +3 -3
  62. package/dist/{Dialog-JCB5s-T-.js → Dialog-C4FZ7p7Q.js} +10 -0
  63. package/dist/{Dialog-DUlWQH8R.js → Dialog-CBPD5b-S.js} +1 -1
  64. package/dist/{DialogHeader-C6hZZxdv.js → DialogHeader-CQ3pnLYi.js} +2 -2
  65. package/dist/Drawer/index.d.ts +1 -1
  66. package/dist/Drawer/index.js +1 -1
  67. package/dist/{Drawer-BDuiw1-g.js → Drawer-BOwQLKm9.js} +2 -2
  68. package/dist/DropdownMenu/index.js +3 -3
  69. package/dist/{DropdownMenu-Der2x_k_.js → DropdownMenu-9CR9TiKG.js} +5 -5
  70. package/dist/{DropdownMenu-BhxKnh6D.js → DropdownMenu-DwIfoTnV.js} +18 -18
  71. package/dist/EmptyState/index.js +1 -1
  72. package/dist/{EmptyState-CnFkYtcS.js → EmptyState-BG5g2jwJ.js} +3 -3
  73. package/dist/Field/index.js +3 -3
  74. package/dist/{Field-D4UmRHlD.js → Field-eAowUUMX.js} +1 -1
  75. package/dist/{FieldInfoTip-BSqcEcUx.js → FieldInfoTip-Dwl9HNp1.js} +1 -1
  76. package/dist/{FieldLabel-CZbayYFD.js → FieldLabel-CgYk-ORu.js} +1 -1
  77. package/dist/FileInput/index.d.ts +1 -1
  78. package/dist/FileInput/index.js +1 -1
  79. package/dist/{FileInput-8oYiJsq_.js → FileInput-B7zeePbM.js} +2 -2
  80. package/dist/Heading/index.d.ts +1 -1
  81. package/dist/Heading/index.js +1 -1
  82. package/dist/{Heading-COtyAhtB.js → Heading-B1dNZQtu.js} +1 -1
  83. package/dist/HoverCard/index.js +1 -1
  84. package/dist/{HoverCard-DGlOpk4x.js → HoverCard-CZhfsvP4.js} +2 -2
  85. package/dist/IconButton/index.js +1 -1
  86. package/dist/{IconButton-CwjHTIBg.js → IconButton-D9ZRJ7vD.js} +1 -1
  87. package/dist/InfoTip/index.d.ts +1 -1
  88. package/dist/InfoTip/index.js +1 -1
  89. package/dist/{InfoTip-CNZateDb.js → InfoTip-LJi9llxi.js} +2 -2
  90. package/dist/{InputClearButton-CzCP41sx.js → InputClearButton-C-j9Nf1s.js} +1 -1
  91. package/dist/InputGroup/index.js +1 -1
  92. package/dist/{InputGroup-CfUGHDNz.js → InputGroup-B8PGJZKH.js} +1 -1
  93. package/dist/{Item-DyaYlbyE.js → Item-DUI1Qnnd.js} +1 -1
  94. package/dist/Lightbox/index.js +1 -1
  95. package/dist/{Lightbox-Dzzd2Vqe.js → Lightbox-BOWTHnTb.js} +1 -1
  96. package/dist/Link/index.d.ts +1 -1
  97. package/dist/Link/index.js +1 -1
  98. package/dist/{Link-B7OJQ0zl.js → Link-B75ygGzG.js} +2 -2
  99. package/dist/List/index.d.ts +1 -1
  100. package/dist/List/index.js +2 -2
  101. package/dist/{ListItem-gj_lOvEt.js → ListItem-C8SqSrU6.js} +1 -1
  102. package/dist/Markdown/index.d.ts +1 -1
  103. package/dist/Markdown/index.js +1 -1
  104. package/dist/{Markdown-Cbj-nqhN.js → Markdown-Cqrcj-ct.js} +3 -3
  105. package/dist/MobileNav/index.js +1 -1
  106. package/dist/{MobileNavToggle-BlcdCg8M.js → MobileNavToggle-DLpEONfs.js} +12 -0
  107. package/dist/MoreMenu/index.d.ts +1 -1
  108. package/dist/MoreMenu/index.js +1 -1
  109. package/dist/{MoreMenu-Dokwc4Mg.js → MoreMenu-aR88r9xp.js} +17 -31
  110. package/dist/MultiSelector/index.d.ts +1 -1
  111. package/dist/MultiSelector/index.js +1 -1
  112. package/dist/{MultiSelector-CId8-qAX.js → MultiSelector-UTaDe-YT.js} +22 -23
  113. package/dist/{NavDisclosure-CqAThYgR.js → NavDisclosure-B66SHKdd.js} +1 -1
  114. package/dist/{NavHeadingSurface-DJ4pWvEi.js → NavHeadingSurface-BZCzkCPJ.js} +1 -1
  115. package/dist/NavItem/index.js +1 -1
  116. package/dist/{NavItem-_eIEwV41.js → NavItem-c1ScHEJY.js} +1 -1
  117. package/dist/NavMenu/index.js +3 -3
  118. package/dist/{NavMenu-BtA_Xbmr.js → NavMenu-DS6y8ZAY.js} +2 -2
  119. package/dist/{NavMenuItem-BxfjAf1T.js → NavMenuItem-BqIi3o3D.js} +3 -3
  120. package/dist/NumberInput/index.d.ts +1 -1
  121. package/dist/NumberInput/index.js +1 -1
  122. package/dist/{NumberInput-Bl5TFhGD.js → NumberInput-ClkOGF5j.js} +3 -3
  123. package/dist/Outline/index.js +1 -1
  124. package/dist/{Outline-NuPQMjxw.js → Outline-DvQbXc_H.js} +1 -1
  125. package/dist/OverflowList/index.d.ts +1 -1
  126. package/dist/OverflowList/index.js +1 -1
  127. package/dist/{OverflowList-CumJl6X_.js → OverflowList-UnVXBDIW.js} +2 -2
  128. package/dist/Pagination/index.js +1 -1
  129. package/dist/{Pagination-C0Bx80Tu.js → Pagination-CTCLE02h.js} +1 -1
  130. package/dist/Popover/index.js +1 -1
  131. package/dist/{Popover-DpR4rwiW.js → Popover-CZvRSqqD.js} +3 -3
  132. package/dist/PowerSearch/index.d.ts +1 -1
  133. package/dist/PowerSearch/index.js +1 -1
  134. package/dist/{PowerSearch-Dq6Gi9z1.js → PowerSearch-BBOum0TP.js} +17 -17
  135. package/dist/ProgressBar/index.js +1 -1
  136. package/dist/{ProgressBar-Dp-0xquN.js → ProgressBar-Bgg6zsKR.js} +1 -1
  137. package/dist/Radio/index.d.ts +1 -1
  138. package/dist/Radio/index.js +1 -1
  139. package/dist/{RadioGroup-IKBXLzYU.js → RadioGroup-DPy5JQhm.js} +4 -4
  140. package/dist/RadioList/index.d.ts +1 -1
  141. package/dist/RadioList/index.js +1 -1
  142. package/dist/{RadioList-NW4fGKgm.js → RadioList-UN7IxQg8.js} +1 -1
  143. package/dist/ScrollableArea/index.d.ts +1 -1
  144. package/dist/SegmentedControl/index.js +1 -1
  145. package/dist/{SegmentedControl-DRxcUlVP.js → SegmentedControl-BkWz-I2J.js} +2 -2
  146. package/dist/SelectableCard/index.d.ts +1 -1
  147. package/dist/SelectableCard/index.js +1 -1
  148. package/dist/{SelectableCard-Dp-LsEcf.js → SelectableCard-GRWYx3iD.js} +1 -1
  149. package/dist/Selector/index.d.ts +1 -1
  150. package/dist/Selector/index.js +1 -1
  151. package/dist/{Selector-BW_oxWDM.js → Selector-CCtsUveZ.js} +27 -22
  152. package/dist/SideNav/index.d.ts +1 -1
  153. package/dist/SideNav/index.js +2 -2
  154. package/dist/{SideNav-B5mMRj98.js → SideNav-COl5ApOz.js} +9 -9
  155. package/dist/Slider/index.js +1 -1
  156. package/dist/{Slider-oD3AY4jh.js → Slider-CYie9hWm.js} +2 -2
  157. package/dist/StatusDot/index.js +1 -1
  158. package/dist/{StatusDot-B3oOyRF7.js → StatusDot-CHfgSYmv.js} +1 -1
  159. package/dist/Stepper/index.d.ts +1 -1
  160. package/dist/Stepper/index.js +1 -1
  161. package/dist/{Stepper-CgOdL36_.js → Stepper-CCuggsov.js} +1 -1
  162. package/dist/Switch/index.d.ts +1 -1
  163. package/dist/Switch/index.js +1 -1
  164. package/dist/{Switch-DG_A9cD0.js → Switch-D24CvhDS.js} +2 -2
  165. package/dist/TabList/index.js +1 -1
  166. package/dist/{TabList-FkoypUk0.js → TabList-DToCh5JW.js} +3 -3
  167. package/dist/Table/index.d.ts +1 -1
  168. package/dist/Table/index.js +1 -1
  169. package/dist/{Table-zNW23VwP.js → Table-D3mzxBr0.js} +13 -13
  170. package/dist/Text/index.d.ts +1 -1
  171. package/dist/Text/index.js +1 -1
  172. package/dist/{Text-v1ep26uD.js → Text-5p-eZodt.js} +1 -1
  173. package/dist/TextArea/index.d.ts +1 -1
  174. package/dist/TextArea/index.js +1 -1
  175. package/dist/{TextArea-BilHnmSs.js → TextArea-Bp6D-riO.js} +4 -4
  176. package/dist/TextInput/index.d.ts +1 -1
  177. package/dist/TextInput/index.js +1 -1
  178. package/dist/{TextInput-D6tHM2sA.js → TextInput-BYslwBDZ.js} +4 -4
  179. package/dist/Thumbnail/index.js +1 -1
  180. package/dist/{Thumbnail-llGdnQM8.js → Thumbnail-B_a8tOS7.js} +3 -3
  181. package/dist/{TimeField-C5rcoaVu.js → TimeField-MDSJny9m.js} +3 -3
  182. package/dist/TimeInput/index.d.ts +1 -1
  183. package/dist/TimeInput/index.js +1 -1
  184. package/dist/{TimeInput-D0N8nwrI.js → TimeInput-B19amuxi.js} +2 -2
  185. package/dist/Timer/index.d.ts +1 -1
  186. package/dist/Timer/index.js +1 -1
  187. package/dist/{Timer-65PfuoQ7.js → Timer-BD3tfzrF.js} +1 -1
  188. package/dist/Timestamp/index.d.ts +1 -1
  189. package/dist/Timestamp/index.js +1 -1
  190. package/dist/{Timestamp-rYC8mE3r.js → Timestamp-CqWoZUKM.js} +3 -3
  191. package/dist/Toast/index.js +1 -1
  192. package/dist/{Toast-BtQ-4Y6Z.js → Toast-BKPl8iIr.js} +1 -1
  193. package/dist/ToggleButton/index.d.ts +1 -1
  194. package/dist/ToggleButton/index.js +1 -1
  195. package/dist/{ToggleButton-Bnn_MiOn.js → ToggleButton-DfpsuhMa.js} +3 -3
  196. package/dist/Token/index.d.ts +1 -1
  197. package/dist/Token/index.js +1 -1
  198. package/dist/{Token-B-j3AKxB.js → Token-C7Dt5ygK.js} +1 -1
  199. package/dist/Tokenizer/index.js +1 -1
  200. package/dist/{Tokenizer-Cpdy_L00.js → Tokenizer-C-eorFsF.js} +5 -5
  201. package/dist/Toolbar/index.d.ts +1 -1
  202. package/dist/Tooltip/index.js +2 -2
  203. package/dist/{Tooltip-CByjfHBZ.js → Tooltip-88zhGfzF.js} +1 -1
  204. package/dist/TopNav/index.d.ts +1 -1
  205. package/dist/TopNav/index.js +1 -1
  206. package/dist/{TopNav-q8xDVlM_.js → TopNav-DMFIsFwy.js} +5 -5
  207. package/dist/TreeList/index.js +1 -1
  208. package/dist/{TreeList-CEGInQtF.js → TreeList-nU2gSmQm.js} +3 -3
  209. package/dist/Typeahead/index.js +2 -2
  210. package/dist/{Typeahead-C-PdRnRQ.js → Typeahead-DUQfmy_r.js} +5 -5
  211. package/dist/{assertOptions-og3t30Fh.js → assertOptions-DVRsfCk1.js} +22 -2
  212. package/dist/{batch-oTkSbtVz.js → batch-DR5SgbnX.js} +2 -2
  213. package/dist/{clickGuard-ChKuogmR.js → clickGuard-FrlnECMp.js} +1 -2
  214. package/dist/coarsePointer-BfMx3H23.js +86 -0
  215. package/dist/composables/index.js +6 -6
  216. package/dist/{composables-COCeg92e.js → composables-Do86VAmM.js} +7 -110
  217. package/dist/{context-DQPBIsl5.js → context-WY1ippwe.js} +2 -2
  218. package/dist/{edge-3sC8-cbB.js → edge-qfeek_VV.js} +1 -1
  219. package/dist/{edgeRide-DOxmVxTM.js → edgeRide-iWUNdlxe.js} +4 -4
  220. package/dist/{sharedRealm-H1OrlP0V.js → flatTree-BB4yPMNL.js} +1 -49
  221. package/dist/{handle-CSHfxBie.js → handle-ma1yF_B_.js} +2 -1
  222. package/dist/holdEntranceInput-DjEzfGRU.js +523 -0
  223. package/dist/{index-85RFPeV0.d.ts → index-B52PMrO7.d.ts} +5 -5
  224. package/dist/{index-CyMStZq4.d.ts → index-B63NOJRc.d.ts} +1 -1
  225. package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
  226. package/dist/{index-BWcZ-L80.d.ts → index-BhdxP-OG.d.ts} +1 -1
  227. package/dist/{index-DRDOArzq.d.ts → index-BjmMJ_4E.d.ts} +19 -19
  228. package/dist/{index-C2HVLdNb.d.ts → index-BtgkNd0Q.d.ts} +2 -2
  229. package/dist/{index-BOCb89V9.d.ts → index-BxWCX2pJ.d.ts} +1 -1
  230. package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
  231. package/dist/{index-Q1oG9yIT.d.ts → index-CO9GW-ik.d.ts} +1 -1
  232. package/dist/{index-CBOv5j3c.d.ts → index-CbA8rR_b.d.ts} +1 -1
  233. package/dist/{index-C9ZssPUV.d.ts → index-CiVrhGUJ.d.ts} +1 -1
  234. package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
  235. package/dist/{index-HULXozsK.d.ts → index-Dcxqzk_d.d.ts} +5 -5
  236. package/dist/index.d.ts +14 -14
  237. package/dist/index.js +95 -95
  238. package/dist/inputStream-LZdK8luP.js +239 -0
  239. package/dist/{landing-DFC97kl9.js → landing-qVsYAZ-v.js} +2 -2
  240. package/dist/{pressFeedback-CEUPQWIS.js → pressFeedback-DVR5V1b6.js} +3 -164
  241. package/dist/{stillPointerGate-1Tgkns0J.js → stillPointerGate-D3loXLh7.js} +1 -1
  242. package/dist/{tooltipFocusRules-vIH7PZh1.js → tooltipFocusRules-CFNKWzYn.js} +1 -1
  243. package/dist/{tooltipTriggerRules-DoBAbfGc.js → tooltipTriggerRules-DyPyWOdP.js} +1 -1
  244. package/dist/touchHold-CFJlSClt.js +30 -0
  245. package/dist/{useActionGroupTracking-PVBCtLUE.js → useActionGroupTracking-C6BzQzvp.js} +2 -2
  246. package/dist/{useDismiss-CMIsdIOQ.js → useDismiss-C7_S7qUA.js} +87 -5
  247. package/dist/useHeldPresentation-fQsuYFhz.js +126 -0
  248. package/dist/{useInputStatusIcon-CrgeMzrf.js → useInputStatusIcon-BFw-EXjJ.js} +1 -1
  249. package/dist/{useMenuDrillIn-CQrzwZvx.js → useMenuDrillIn-CDn2na4X.js} +9 -8
  250. package/dist/{useMenuPress-wqRDvUMW.js → useMenuPress-CxUqSUZ9.js} +2 -2
  251. package/dist/{usePressFeedback-aufF1sCH.js → usePressFeedback-BhNcuxQv.js} +1 -1
  252. package/dist/{useTooltip-BwqzEtoF.js → useTooltip-CJHbG8Pv.js} +2 -2
  253. package/dist/{useTouchHitArea-BMDBe36j.js → useTouchHitArea-CNZyA18Y.js} +2 -2
  254. package/dist/{useTruncationTooltip-CRhoPzeu.js → useTruncationTooltip-BTcr1LCR.js} +3 -3
  255. package/dist/{useTypeaheadMenuConfig-GvdIymRg.js → useTypeaheadMenuConfig-DeDGVR8S.js} +1 -1
  256. package/package.json +1 -1
  257. package/styles/context-menu.css +17 -73
  258. package/styles/dialog.css +18 -1
  259. package/styles/hover-card.css +13 -72
  260. package/styles/layer.css +68 -0
  261. package/styles/multi-selector.css +17 -30
  262. package/styles/popover.css +13 -72
  263. package/styles/selector.css +17 -30
  264. package/styles/tooltip.css +12 -71
  265. package/styles/typeahead.css +17 -30
  266. package/dist/{index-BqhgeAT4.d.ts → index-CHx33xGa.d.ts} +2 -2
@@ -1,4 +1,5 @@
1
- import { f as isDocument, h as isNode, l as parentAcrossShadow, n as sharedKey, p as isElement, t as realmValue } from "./sharedRealm-H1OrlP0V.js";
1
+ import { l as isNode, o as isDocument, r as parentAcrossShadow, s as isElement } from "./flatTree-BB4yPMNL.js";
2
+ import { i as subscribeInput } from "./inputStream-LZdK8luP.js";
2
3
  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";
3
4
  import { n as hasInteractiveAncestor } from "./useClickableContainer-Dtjg-nkm.js";
4
5
  //#region src/utils/inputAge.ts
@@ -127,168 +128,6 @@ function isInsideScrollView(element, { readsTouchAction = true } = {}) {
127
128
  return panY && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "y")) && overflows(root, "y") || panX && SCROLLABLE_OVERFLOW.has(rootOverflow(doc, "x")) && overflows(root, "x");
128
129
  }
129
130
  //#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
292
131
  //#region src/composables/internal/pressSurface.ts
293
132
  /**
294
133
  * 触屏按压模型里「这一下按的是谁」的判断:从手指落点往上找最里层的可按元素。
@@ -587,4 +426,4 @@ function installPressFeedback() {
587
426
  };
588
427
  }
589
428
  //#endregion
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 };
429
+ export { PRESS_ACTION_ATTRIBUTE as a, isTrackedByGroup as c, parseTouchAction as d, rootOverflow as f, PRESSABLE_ATTRIBUTE as i, SCROLLABLE_OVERFLOW as l, msSinceInput as m, installPressFeedback as n, PRESS_CONTAINER_ATTRIBUTE as o, clockOf as p, pressFadeMs as r, PRESS_GROUP_ITEM_ATTRIBUTE as s, PRESSED_ATTRIBUTE as t, isInsideScrollView as u };
@@ -1,4 +1,4 @@
1
- import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-CMIsdIOQ.js";
1
+ import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-C7_S7qUA.js";
2
2
  import { n as clampInlineSize } from "./inlineSize-BNe8wggI.js";
3
3
  import { computed, onMounted, ref, toValue, watch } from "vue";
4
4
  //#region src/Typeahead/useAnchoredListbox.ts
@@ -1,5 +1,5 @@
1
1
  import { i as isTopLayer, n as useLayerDepth, o as pushLayer } from "./layerDepth-D3Rh8T5C.js";
2
- import { t as matchesFocusVisible } from "./tooltipTriggerRules-DoBAbfGc.js";
2
+ import { t as matchesFocusVisible } from "./tooltipTriggerRules-DyPyWOdP.js";
3
3
  import { s as isTextEntryControl, t as getInteractionModality } from "./interactionModality-CedLz5PC.js";
4
4
  import { i as isFocusable } from "./focus-x7mxEqjR.js";
5
5
  import { onScopeDispose } from "vue";
@@ -1,4 +1,4 @@
1
- import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-CMIsdIOQ.js";
1
+ import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-C7_S7qUA.js";
2
2
  import { computed, shallowRef, toValue, useId } from "vue";
3
3
  //#region src/composables/useLayer.ts
4
4
  /**
@@ -0,0 +1,30 @@
1
+ import { c as sharedState } from "./inputStream-LZdK8luP.js";
2
+ //#region src/gestures/touchHold.ts
3
+ /**
4
+ * @file touchHold.ts
5
+ * @input The holds a layer places on input while it animates or shields
6
+ * what is beneath it
7
+ * @output registerTouchHold, which adds a hold's read, and holdsTouch, the
8
+ * gesture host's one question: whether a touch on a target is held
9
+ * @position The seam between the gesture host and a layer's input hold
10
+ * (upstream Layer/inputHold `holdsTouch`): a layer registers its read, and
11
+ * the host asks before it gives a touch to any recognizer
12
+ *
13
+ * A held touch reaches no recognizer: the host drops it as it lands. With
14
+ * no hold registered, every touch passes, at once.
15
+ */
16
+ const holds = sharedState("gestures/touch-hold", 1, () => /* @__PURE__ */ new Set());
17
+ /** Add a hold's read; returns the removal. */
18
+ function registerTouchHold(query) {
19
+ holds.add(query);
20
+ return () => {
21
+ holds.delete(query);
22
+ };
23
+ }
24
+ /** Whether any registered hold takes a touch on `target`. */
25
+ function holdsTouch(target) {
26
+ for (const query of holds) if (query(target)) return true;
27
+ return false;
28
+ }
29
+ //#endregion
30
+ export { registerTouchHold as n, holdsTouch as t };
@@ -1,5 +1,5 @@
1
- import { c as isTrackedByGroup, d as isInsideScrollView, h as msSinceInput, s as PRESS_GROUP_ITEM_ATTRIBUTE } from "./pressFeedback-CEUPQWIS.js";
2
- import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-BMDBe36j.js";
1
+ import { c as isTrackedByGroup, m as msSinceInput, s as PRESS_GROUP_ITEM_ATTRIBUTE, u as isInsideScrollView } from "./pressFeedback-DVR5V1b6.js";
2
+ import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-CNZyA18Y.js";
3
3
  import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-BzIBmKF2.js";
4
4
  import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
5
5
  //#region src/composables/internal/useActionGroupTracking.ts
@@ -6,7 +6,7 @@ import { nextTick, onScopeDispose, ref, toValue, watch } from "vue";
6
6
  function overlapsAnchor(anchor, top, left, layer) {
7
7
  return left < anchor.right && left + layer.width > anchor.left && top < anchor.bottom && top + layer.height > anchor.top;
8
8
  }
9
- function clamp$1(value, min, max) {
9
+ function clamp$2(value, min, max) {
10
10
  return Math.max(min, Math.min(value, max));
11
11
  }
12
12
  /**
@@ -21,7 +21,7 @@ function keepClearOfAnchor(placed, anchor, layer, viewport, gap, gutter) {
21
21
  if (!overlapsAnchor(anchor, placed.top, placed.left, layer)) return placed;
22
22
  const minTop = gutter.blockStart;
23
23
  const maxTop = Math.max(minTop, viewport.height - layer.height - gutter.blockEnd);
24
- const sideTop = clamp$1(anchor.top + (anchor.height - layer.height) / 2, minTop, maxTop);
24
+ const sideTop = clamp$2(anchor.top + (anchor.height - layer.height) / 2, minTop, maxTop);
25
25
  const rightLeft = anchor.right + gap;
26
26
  const leftLeft = anchor.left - gap - layer.width;
27
27
  const canBeSide = layer.height <= viewport.height - gutter.blockStart - gutter.blockEnd;
@@ -40,7 +40,7 @@ function keepClearOfAnchor(placed, anchor, layer, viewport, gap, gutter) {
40
40
  const above = roomAbove >= roomBelow;
41
41
  const room = Math.max(0, above ? roomAbove : roomBelow);
42
42
  const height = Math.min(layer.height, room);
43
- const left = clamp$1(placed.left, gutter.inlineStart, Math.max(gutter.inlineStart, viewport.width - layer.width - gutter.inlineEnd));
43
+ const left = clamp$2(placed.left, gutter.inlineStart, Math.max(gutter.inlineStart, viewport.width - layer.width - gutter.inlineEnd));
44
44
  return {
45
45
  top: above ? anchor.top - gap - height : anchor.bottom + gap,
46
46
  left,
@@ -49,6 +49,80 @@ function keepClearOfAnchor(placed, anchor, layer, viewport, gap, gutter) {
49
49
  };
50
50
  }
51
51
  //#endregion
52
+ //#region src/layer/layerEntranceSide.ts
53
+ /**
54
+ * 浮层进场从它落在的那一侧滑进来(上游 Layer/layerEntranceSide.ts)。
55
+ *
56
+ * 浮层摆好之后(翻到另一侧也算),按浮层和锚点两个盒子算出:往锚点方向退一步
57
+ * 的方向、缩放的原点(浮层朝锚点那条边上、正对锚点中心的点)、两者之间的空隙。
58
+ * 结果写成四个 CSS 自定义属性,各浮层样式表里的进场关键帧读它们;没写时关键帧
59
+ * 退回按 placement 的方向。退的那一步不超过空隙,所以进场的任何一帧都不会盖到
60
+ * 锚点;贴着或盖住锚点的浮层不移动,只缩放。
61
+ */
62
+ /** 横向往锚点退一步:-1 向左、0、1 向右。 */
63
+ const LAYER_ENTER_X_PROPERTY = "--_astryx-layer-enter-x";
64
+ /** 纵向往锚点退一步:-1 向上、0、1 向下。 */
65
+ const LAYER_ENTER_Y_PROPERTY = "--_astryx-layer-enter-y";
66
+ /** 缩放原点,从浮层左上角量起的 px。 */
67
+ const LAYER_ENTER_ORIGIN_PROPERTY = "--_astryx-layer-enter-origin";
68
+ /** 浮层和锚点之间的空隙:退的那一步最多这么长。 */
69
+ const LAYER_ENTER_GAP_PROPERTY = "--_astryx-layer-enter-gap";
70
+ const clamp$1 = (value, max) => Math.min(max, Math.max(0, value));
71
+ /**
72
+ * `layer` 相对 `anchor` 落在哪一侧。两个中心在哪个轴上按各自半尺寸之和归一后
73
+ * 离得更远,就算哪一侧,所以和锚点重叠几个像素的子菜单仍有一侧;盖住锚点中心的
74
+ * 浮层(选中项对齐触发器的列表)没有侧,原地以锚点中心缩放。没有尺寸时返回 `null`。
75
+ */
76
+ function layerEntranceSide(layer, anchor) {
77
+ if (layer.width <= 0 || layer.height <= 0) return null;
78
+ const anchorX = anchor.left + anchor.width / 2;
79
+ const anchorY = anchor.top + anchor.height / 2;
80
+ const originX = clamp$1(anchorX - layer.left, layer.width);
81
+ const originY = clamp$1(anchorY - layer.top, layer.height);
82
+ const isPoint = anchor.width <= 1 && anchor.height <= 1;
83
+ if (originX > 0 && originX < layer.width && originY > 0 && originY < layer.height) return {
84
+ x: 0,
85
+ y: 0,
86
+ originX,
87
+ originY,
88
+ gap: 0
89
+ };
90
+ const apartX = (layer.left + layer.width / 2 - anchorX) / ((layer.width + anchor.width) / 2);
91
+ const apartY = (layer.top + layer.height / 2 - anchorY) / ((layer.height + anchor.height) / 2);
92
+ if (Math.abs(apartY) >= Math.abs(apartX)) {
93
+ const below = apartY > 0;
94
+ const room = below ? layer.top - (anchor.top + anchor.height) : anchor.top - (layer.top + layer.height);
95
+ return {
96
+ x: 0,
97
+ y: below ? -1 : 1,
98
+ originX,
99
+ originY: below ? 0 : layer.height,
100
+ gap: isPoint ? null : Math.max(0, room)
101
+ };
102
+ }
103
+ const right = apartX > 0;
104
+ const room = right ? layer.left - (anchor.left + anchor.width) : anchor.left - (layer.left + layer.width);
105
+ return {
106
+ x: right ? -1 : 1,
107
+ y: 0,
108
+ originX: right ? 0 : layer.width,
109
+ originY,
110
+ gap: isPoint ? null : Math.max(0, room)
111
+ };
112
+ }
113
+ const px = (value) => `${Math.round(value * 1e3) / 1e3}px`;
114
+ /**
115
+ * 把浮层落在的一侧交给它的进场。`null` 把四个属性都设成 `initial`:进场退回
116
+ * placement 的方向,里面嵌套的浮层也不会继承到外层的值。
117
+ */
118
+ function writeLayerEntranceSide(layer, side) {
119
+ layer.style.setProperty(LAYER_ENTER_X_PROPERTY, side == null ? "initial" : String(side.x));
120
+ layer.style.setProperty(LAYER_ENTER_Y_PROPERTY, side == null ? "initial" : String(side.y));
121
+ layer.style.setProperty(LAYER_ENTER_ORIGIN_PROPERTY, side == null ? "initial" : `${px(side.originX)} ${px(side.originY)}`);
122
+ const gap = side?.gap == null ? null : Math.floor(side.gap * 1e3) / 1e3;
123
+ layer.style.setProperty(LAYER_ENTER_GAP_PROPERTY, gap == null ? "initial" : `${gap}px`);
124
+ }
125
+ //#endregion
52
126
  //#region src/layer/position.ts
53
127
  function alignOnAxis(start, size, own, alignment) {
54
128
  if (alignment === "start") return start;
@@ -147,7 +221,15 @@ function usePositionedLayer(options) {
147
221
  height: options.keepAnchorClear === true ? Math.max(layerEl.offsetHeight, layerEl.scrollHeight) : layerEl.offsetHeight
148
222
  };
149
223
  const placed = computeLayerPosition(anchorRect, box, viewport, placement.value, alignment.value, gap, gutter.value);
150
- position.value = options.keepAnchorClear === true ? keepClearOfAnchor(placed, anchorRect, box, viewport, gap, gutter.value) : placed;
224
+ const next = options.keepAnchorClear === true ? keepClearOfAnchor(placed, anchorRect, box, viewport, gap, gutter.value) : placed;
225
+ position.value = next;
226
+ const height = next.maxHeight == null ? box.height : Math.min(box.height, next.maxHeight);
227
+ writeLayerEntranceSide(layerEl, layerEntranceSide({
228
+ left: next.left,
229
+ top: next.top,
230
+ width: box.width,
231
+ height
232
+ }, anchorRect));
151
233
  }
152
234
  let pollId;
153
235
  function geometryKey() {
@@ -257,4 +339,4 @@ function useDismiss(options) {
257
339
  onScopeDispose(teardown);
258
340
  }
259
341
  //#endregion
260
- export { usePositionedLayer as n, useDismiss as t };
342
+ export { writeLayerEntranceSide as i, usePositionedLayer as n, layerEntranceSide as r, useDismiss as t };
@@ -0,0 +1,126 @@
1
+ import { n as themeContextKey } from "./context-Cws_tXTr.js";
2
+ import { i as watchMediaQuery, n as matchesMediaQuery } from "./coarsePointer-BfMx3H23.js";
3
+ import { t as DEFAULT_WIDTH_BREAKPOINTS } from "./adaptationTypes-Beao49TN.js";
4
+ import { computed, getCurrentInstance, inject, onMounted, onScopeDispose, shallowRef, toValue, watch } from "vue";
5
+ //#region src/Theme/compactDefinition.ts
6
+ /** 高度低于它算紧凑:横过来的手机。 */
7
+ const COMPACT_HEIGHT_BELOW = 500;
8
+ /** 按主题的宽度点算出紧凑定义;不传就用标准宽度点。 */
9
+ function compactDefinition(points = DEFAULT_WIDTH_BREAKPOINTS) {
10
+ const width = `(width < ${points.md}px)`;
11
+ const height = `(height < ${COMPACT_HEIGHT_BELOW}px)`;
12
+ return Object.freeze({
13
+ widthBelow: points.md,
14
+ heightBelow: COMPACT_HEIGHT_BELOW,
15
+ query: `${width}, ${height}`,
16
+ coarsePointerQuery: `${width} and (pointer: coarse), ${height} and (pointer: coarse)`
17
+ });
18
+ }
19
+ /** 标准宽度点下的紧凑定义。 */
20
+ const DEFAULT_COMPACT_DEFINITION = compactDefinition();
21
+ /** 最近一层主题的紧凑定义。主题没改宽度点时就是标准定义。 */
22
+ function useCompactDefinition() {
23
+ const theme = inject(themeContextKey, null);
24
+ return computed(() => {
25
+ const points = theme?.value.theme.adaptations?.widthBreakpoints;
26
+ return points == null || points.md === DEFAULT_WIDTH_BREAKPOINTS.md ? DEFAULT_COMPACT_DEFINITION : compactDefinition(points);
27
+ });
28
+ }
29
+ //#endregion
30
+ //#region src/composables/internal/presentation.ts
31
+ /**
32
+ * 一条媒体查询是否匹配,只在 `query` 不为空时订阅。服务端和接管服务端 HTML
33
+ * 时先答 false,挂载后再读真实窗口。
34
+ */
35
+ function useMatchWhileRead(query) {
36
+ const isHydrating = getCurrentInstance()?.vnode.el != null;
37
+ const initial = query();
38
+ const matches = shallowRef(!isHydrating && initial != null && typeof window !== "undefined" && matchesMediaQuery(window, initial));
39
+ let stopQuery = null;
40
+ let stopWatch = null;
41
+ onMounted(() => {
42
+ stopWatch = watch(query, (next) => {
43
+ stopQuery?.();
44
+ stopQuery = null;
45
+ if (next == null) {
46
+ matches.value = false;
47
+ return;
48
+ }
49
+ matches.value = matchesMediaQuery(window, next);
50
+ stopQuery = watchMediaQuery(window, next, (value) => {
51
+ matches.value = value;
52
+ });
53
+ }, { immediate: true });
54
+ });
55
+ onScopeDispose(() => {
56
+ stopWatch?.();
57
+ stopQuery?.();
58
+ });
59
+ return matches;
60
+ }
61
+ /**
62
+ * 只解析浮层还是底部弹层。只有 `'adaptive'` 订阅媒体查询,读的是当前主题的
63
+ * 「紧凑并且粗指针」查询。
64
+ */
65
+ function useAdaptivePresentation(presentation) {
66
+ const compact = useCompactDefinition();
67
+ const isCompactTouch = useMatchWhileRead(() => toValue(presentation) === "adaptive" ? compact.value.coarsePointerQuery : null);
68
+ return computed(() => {
69
+ const request = toValue(presentation);
70
+ if (request !== "adaptive") return request;
71
+ return isCompactTouch.value ? "bottom-sheet" : "popover";
72
+ });
73
+ }
74
+ /** 菜单打开那一刻是否是紧凑触屏(下级菜单是否改为原地进入),读当前主题的定义。 */
75
+ function readCompactTouch(compact, view) {
76
+ return matchesMediaQuery(view === void 0 ? typeof window === "undefined" ? null : window : view, compact.coarsePointerQuery);
77
+ }
78
+ //#endregion
79
+ //#region src/layer/presentationHold.ts
80
+ /**
81
+ * 响应式的呈现保持:`isOpen` 变成 true 的那一刻记下当时的 `presentation`,
82
+ * 之后无论 `presentation` 变成什么都保持不变,直到 `release()`。
83
+ */
84
+ function usePresentationHold(options) {
85
+ const held = shallowRef(null);
86
+ function takeIfOpening() {
87
+ if (toValue(options.isOpen) && held.value == null) held.value = { value: toValue(options.presentation) };
88
+ }
89
+ watch(() => toValue(options.isOpen), takeIfOpening, { immediate: true });
90
+ const current = computed(() => {
91
+ if (held.value != null) return held.value;
92
+ return toValue(options.isOpen) ? { value: toValue(options.presentation) } : null;
93
+ });
94
+ function release() {
95
+ held.value = null;
96
+ takeIfOpening();
97
+ }
98
+ return {
99
+ presentation: computed(() => current.value?.value ?? null),
100
+ isHeld: computed(() => current.value != null),
101
+ release
102
+ };
103
+ }
104
+ //#endregion
105
+ //#region src/layer/useHeldPresentation.ts
106
+ function useHeldPresentation(presentation, isOpen) {
107
+ const live = useAdaptivePresentation(presentation);
108
+ const hold = usePresentationHold({
109
+ isOpen,
110
+ presentation: live
111
+ });
112
+ const surface = computed(() => hold.presentation.value ?? live.value);
113
+ watch(() => toValue(isOpen), (open) => {
114
+ if (!open && hold.presentation.value === "popover") hold.release();
115
+ });
116
+ function settle() {
117
+ if (!toValue(isOpen)) hold.release();
118
+ }
119
+ return {
120
+ surface,
121
+ isSheet: computed(() => surface.value === "bottom-sheet"),
122
+ settle
123
+ };
124
+ }
125
+ //#endregion
126
+ export { readCompactTouch as n, useCompactDefinition as r, useHeldPresentation as t };
@@ -1,5 +1,5 @@
1
1
  import { t as _sfc_main } from "./FieldIcon-BU1ZWAuo.js";
2
- import { t as _sfc_main$1 } from "./FieldInfoTip-BSqcEcUx.js";
2
+ import { t as _sfc_main$1 } from "./FieldInfoTip-Dwl9HNp1.js";
3
3
  import { computed, toValue } from "vue";
4
4
  //#region src/composables/useInputStatusIcon.ts
5
5
  /**
@@ -1,8 +1,9 @@
1
1
  import { n as readLayerScoped, t as defineLayerScopedKey } from "./scopedProvide-C-Df7c15.js";
2
2
  import { t as _sfc_main$4 } from "./Icon-Dk0jccgU.js";
3
3
  import { o as useComponentMessages } from "./context-B8IEFCDR.js";
4
- import { t as _sfc_main$5 } from "./Item-DyaYlbyE.js";
4
+ import { t as _sfc_main$5 } from "./Item-DUI1Qnnd.js";
5
5
  import { t as _sfc_main$6 } from "./CheckboxIndicator-fH4d-JE1.js";
6
+ import { n as readCompactTouch, r as useCompactDefinition } from "./useHeldPresentation-fQsuYFhz.js";
6
7
  import { t as dropdownMenuMessages } from "./dropdown-menu-BDu4gWwQ.js";
7
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useAttrs, useModel, useSlots, watch, withCtx } from "vue";
8
9
  import "../styles/dropdown-menu.css";
@@ -486,22 +487,22 @@ function useDropdownMenuMessages() {
486
487
  //#endregion
487
488
  //#region src/DropdownMenu/useMenuDrillIn.ts
488
489
  const EMPTY_HOST = null;
489
- function matchesQuery(query) {
490
- return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(query).matches;
491
- }
492
490
  /**
493
491
  * Drill-in state for one menu root.
494
492
  *
495
- * `query` is the same media query the root uses to choose a bottom sheet, so
496
- * a submenu and its menu agree on what "a phone" means.
493
+ * It reads the same compact-touch condition the root's `adaptive` presentation
494
+ * uses (the active theme's compact definition: a coarse pointer, and a viewport
495
+ * narrower than the theme's `md` point or shorter than 500px), so a submenu and
496
+ * its menu agree on what "a phone" means.
497
497
  */
498
- function useMenuDrillIn(isOpen, query) {
498
+ function useMenuDrillIn(isOpen) {
499
+ const compact = useCompactDefinition();
499
500
  const isCompactTouch = ref(false);
500
501
  const viewStack = ref([]);
501
502
  const host = ref(EMPTY_HOST);
502
503
  watch(isOpen, (open) => {
503
504
  if (open) {
504
- isCompactTouch.value = matchesQuery(query);
505
+ isCompactTouch.value = readCompactTouch(compact.value);
505
506
  return;
506
507
  }
507
508
  if (viewStack.value.length > 0) viewStack.value = [];
@@ -1,5 +1,5 @@
1
- import { h as msSinceInput } from "./pressFeedback-CEUPQWIS.js";
2
- import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-ChKuogmR.js";
1
+ import { m as msSinceInput } from "./pressFeedback-DVR5V1b6.js";
2
+ import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-FrlnECMp.js";
3
3
  import { c as currentGesture } from "./layerDepth-D3Rh8T5C.js";
4
4
  import { t as focusForLastInput } from "./focusReturn-C1cFL3WM.js";
5
5
  import { getCurrentScope, onScopeDispose, toValue } from "vue";
@@ -1,4 +1,4 @@
1
- import { a as PRESS_ACTION_ATTRIBUTE, i as PRESSABLE_ATTRIBUTE, n as installPressFeedback, o as PRESS_CONTAINER_ATTRIBUTE } from "./pressFeedback-CEUPQWIS.js";
1
+ import { a as PRESS_ACTION_ATTRIBUTE, i as PRESSABLE_ATTRIBUTE, n as installPressFeedback, o as PRESS_CONTAINER_ATTRIBUTE } from "./pressFeedback-DVR5V1b6.js";
2
2
  import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
3
3
  import "../styles/pressable.css";
4
4
  //#region src/composables/usePressFeedback.ts
@@ -1,11 +1,11 @@
1
1
  import { s as registerLayerSurface } from "./useClickableContainer-Dtjg-nkm.js";
2
2
  import { r as useResolvedLayerTeleport } from "./useLayerMountTarget-BmZyeKWE.js";
3
- import { n as useLayer } from "./tooltipTriggerRules-DoBAbfGc.js";
3
+ import { n as useLayer } from "./tooltipTriggerRules-DyPyWOdP.js";
4
4
  import { t as _sfc_main$1 } from "./LayerContentBoundary-LCQLyxBT.js";
5
5
  import { a as trackInteractionModality } from "./interactionModality-CedLz5PC.js";
6
6
  import { t as useAnnounce } from "./announce-GU01Oix2.js";
7
7
  import { t as useTouchTriggerInternal } from "./useTouchTriggerInternal-Bdm_M4aa.js";
8
- import { n as opensOnFocus, r as useHoverLayerDismiss, t as createFocusGate } from "./tooltipFocusRules-vIH7PZh1.js";
8
+ import { n as opensOnFocus, r as useHoverLayerDismiss, t as createFocusGate } from "./tooltipFocusRules-CFNKWzYn.js";
9
9
  import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeProps, onMounted, onScopeDispose, openBlock, renderSlot, shallowRef, toDisplayString, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
10
10
  import "../styles/tooltip.css";
11
11
  //#region src/Tooltip/TooltipSurface.vue
@@ -1,5 +1,5 @@
1
- import { c as isTrackedByGroup, r as pressFadeMs, s as PRESS_GROUP_ITEM_ATTRIBUTE, t as PRESSED_ATTRIBUTE } from "./pressFeedback-CEUPQWIS.js";
2
- import { t as armClickGuard } from "./clickGuard-ChKuogmR.js";
1
+ import { c as isTrackedByGroup, r as pressFadeMs, s as PRESS_GROUP_ITEM_ATTRIBUTE, t as PRESSED_ATTRIBUTE } from "./pressFeedback-DVR5V1b6.js";
2
+ import { t as armClickGuard } from "./clickGuard-FrlnECMp.js";
3
3
  import { toValue, watch } from "vue";
4
4
  import "../styles/touch-hit-area.css";
5
5
  /** 不长:热区就是目标本身。 */
@@ -1,7 +1,7 @@
1
- import { t as matchesFocusVisible } from "./tooltipTriggerRules-DoBAbfGc.js";
1
+ import { t as matchesFocusVisible } from "./tooltipTriggerRules-DyPyWOdP.js";
2
2
  import { a as trackInteractionModality, t as getInteractionModality } from "./interactionModality-CedLz5PC.js";
3
- import { n as tooltipPresentInterestKey } from "./useTooltip-BwqzEtoF.js";
4
- import { t as _sfc_main$1 } from "./Tooltip-CByjfHBZ.js";
3
+ import { n as tooltipPresentInterestKey } from "./useTooltip-CJHbG8Pv.js";
4
+ import { t as _sfc_main$1 } from "./Tooltip-88zhGfzF.js";
5
5
  import { n as useTruncation, t as truncatePlacement } from "./useTruncation-D_T-ezdp.js";
6
6
  import { computed, createBlock, createCommentVNode, defineComponent, openBlock, provide, shallowRef } from "vue";
7
7
  //#region src/Text/TruncationTooltip.vue
@@ -5,7 +5,7 @@ import { t as useAnnounce } from "./announce-GU01Oix2.js";
5
5
  import { n as useAsyncSource } from "./useAsyncSource-7GTcK8ep.js";
6
6
  import { t as useCombobox } from "./useCombobox-BqkTY3bw.js";
7
7
  import { t as _sfc_main$3 } from "./Spinner-DEVPDsD0.js";
8
- import { t as createStillPointerGate } from "./stillPointerGate-1Tgkns0J.js";
8
+ import { t as createStillPointerGate } from "./stillPointerGate-D3loXLh7.js";
9
9
  import { i as isOptionAction, n as searchResultMessage, r as OptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-C7ibYM_A.js";
10
10
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
11
11
  import "../styles/layer.css";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@astryx-vue/core",
3
3
  "type": "module",
4
- "version": "0.24.0",
4
+ "version": "0.25.0",
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",