@astryx-vue/core 0.30.0 → 0.30.1

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 (239) hide show
  1. package/dist/AlertDialog/index.js +1 -1
  2. package/dist/{AlertDialog-D_lrpZz_.js → AlertDialog-B_p1yL3k.js} +7 -7
  3. package/dist/AppShell/index.js +1 -1
  4. package/dist/{AppShell-CxUmt6hX.js → AppShell-D3KZSLvb.js} +5 -5
  5. package/dist/AvatarGroup/index.d.ts +1 -1
  6. package/dist/AvatarGroup/index.js +1 -1
  7. package/dist/{AvatarGroup-DT5RbxDa.js → AvatarGroup-Dd-yDDNz.js} +2 -2
  8. package/dist/Banner/index.d.ts +1 -1
  9. package/dist/Banner/index.js +1 -1
  10. package/dist/{Banner-Ctg1puM6.js → Banner-DKmvoMxD.js} +1 -1
  11. package/dist/BottomSheet/index.d.ts +1 -1
  12. package/dist/BottomSheet/index.js +2 -2
  13. package/dist/{BottomSheet-CmNOXlZO.js → BottomSheet-Btf8Yn8k.js} +845 -276
  14. package/dist/{BottomSheet-_K41Oliv.js → BottomSheet-CQGtoh2x.js} +1 -1
  15. package/dist/Breadcrumbs/index.js +2 -2
  16. package/dist/{Breadcrumbs-CdGqhFKU.js → Breadcrumbs-D6825HQI.js} +1 -1
  17. package/dist/Button/index.js +1 -1
  18. package/dist/{Button-CvHeZGf1.js → Button-DdPty46q.js} +2 -2
  19. package/dist/ButtonGroup/index.d.ts +1 -1
  20. package/dist/ButtonGroup/index.js +1 -1
  21. package/dist/{ButtonGroup-CUN_rC57.js → ButtonGroup-oI99JAyN.js} +3 -3
  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-CbdHb8MD.js → Carousel-BNr79JpP.js} +1 -1
  26. package/dist/Chat/index.d.ts +1 -1
  27. package/dist/Chat/index.js +1 -1
  28. package/dist/{Chat-B7ccEmTR.js → Chat-BadS0fEx.js} +2 -2
  29. package/dist/CheckboxInput/index.d.ts +1 -1
  30. package/dist/CheckboxInput/index.js +1 -1
  31. package/dist/{CheckboxInput-5r6VWqId.js → CheckboxInput-CzP8gP3v.js} +3 -3
  32. package/dist/CheckboxList/index.d.ts +1 -1
  33. package/dist/CheckboxList/index.js +1 -1
  34. package/dist/{CheckboxListItem-CKeQzQ0W.js → CheckboxListItem-CxBjpX3d.js} +4 -4
  35. package/dist/ClickableCard/index.d.ts +1 -1
  36. package/dist/ClickableCard/index.js +1 -1
  37. package/dist/{ClickableCard-ChmOwgYq.js → ClickableCard-B86P2aiM.js} +1 -1
  38. package/dist/Code/index.js +1 -1
  39. package/dist/{CodeBlock-4i1vvmOc.js → CodeBlock-Cgm4uOhG.js} +1 -1
  40. package/dist/Collapsible/index.js +1 -1
  41. package/dist/{Collapsible-B2vrr_YP.js → Collapsible-CfTN722D.js} +3 -3
  42. package/dist/CommandPalette/index.d.ts +1 -1
  43. package/dist/CommandPalette/index.js +1 -1
  44. package/dist/{CommandPalette-BMwvTjff.js → CommandPalette-BgVwGtdA.js} +2 -2
  45. package/dist/ComplexSelector/index.js +1 -1
  46. package/dist/{ComplexSelector-B4iFyilD.js → ComplexSelector-DqWJVx7H.js} +2 -2
  47. package/dist/ContextMenu/index.d.ts +1 -1
  48. package/dist/ContextMenu/index.js +2 -2
  49. package/dist/{ContextMenu-DquYeIEF.js → ContextMenu-C9dJGu3M.js} +3 -3
  50. package/dist/DateInput/index.d.ts +1 -1
  51. package/dist/DateInput/index.js +1 -1
  52. package/dist/{DateInput-MNNyi4XK.js → DateInput-CGKaozkw.js} +3 -3
  53. package/dist/DateRangeInput/index.d.ts +1 -1
  54. package/dist/DateRangeInput/index.js +1 -1
  55. package/dist/{DateRangeInput-DOHntScL.js → DateRangeInput-BVHXgzXz.js} +3 -3
  56. package/dist/DateTimeInput/index.d.ts +1 -1
  57. package/dist/DateTimeInput/index.js +1 -1
  58. package/dist/{DateTimeInput-BaghFHW6.js → DateTimeInput-DRm3lekJ.js} +5 -5
  59. package/dist/Dialog/index.js +3 -3
  60. package/dist/{Dialog-Ctha_b_L.js → Dialog-BN-NycQr.js} +1 -1
  61. package/dist/{Dialog-CGf64DqF.js → Dialog-Dt0gNuMT.js} +1 -1
  62. package/dist/{DialogHeader-BxTV37GT.js → DialogHeader-CSH2_5v-.js} +2 -2
  63. package/dist/Drawer/index.d.ts +1 -1
  64. package/dist/Drawer/index.js +1 -1
  65. package/dist/{Drawer-DAnc2ut9.js → Drawer-PeMgE4iA.js} +2 -2
  66. package/dist/DropdownMenu/index.js +3 -3
  67. package/dist/{DropdownMenu-BPi0pm0w.js → DropdownMenu-C9bvYZPt.js} +5 -5
  68. package/dist/{DropdownMenu-DuSVFQoS.js → DropdownMenu-_lQQyQCn.js} +6 -6
  69. package/dist/Field/index.js +3 -3
  70. package/dist/{Field-d5R_kRMv.js → Field-D-fRqyso.js} +1 -1
  71. package/dist/{FieldInfoTip-BhKtjq3g.js → FieldInfoTip-Bstp5Lvd.js} +1 -1
  72. package/dist/{FieldLabel-BHNpYFx7.js → FieldLabel-lV_qLaGp.js} +1 -1
  73. package/dist/FileInput/index.js +1 -1
  74. package/dist/{FileInput-BCg4HROm.js → FileInput-CTNnDIkm.js} +3 -3
  75. package/dist/IconButton/index.js +1 -1
  76. package/dist/{IconButton-BZgU_THt.js → IconButton-DPezhVBA.js} +1 -1
  77. package/dist/InfoTip/index.d.ts +1 -1
  78. package/dist/InfoTip/index.js +1 -1
  79. package/dist/{InfoTip-E2-OzKti.js → InfoTip-B4BFfLtT.js} +1 -1
  80. package/dist/{InputClearButton-B62_uexC.js → InputClearButton-CxU3iv-5.js} +1 -1
  81. package/dist/InputGroup/index.js +1 -1
  82. package/dist/{InputGroup-DKBqRYFf.js → InputGroup-CraWGK6Y.js} +1 -1
  83. package/dist/{Item-C8UAQwFQ.js → Item-C9u_kQUO.js} +15 -14
  84. package/dist/Lightbox/index.js +1 -1
  85. package/dist/{Lightbox-Bou1gTfv.js → Lightbox-BNUG9CQ1.js} +1 -1
  86. package/dist/Link/index.d.ts +1 -1
  87. package/dist/Link/index.js +1 -1
  88. package/dist/{Link-CaJ5lmKk.js → Link-Bwgpn-di.js} +1 -1
  89. package/dist/List/index.js +2 -2
  90. package/dist/{ListItem-BlrEngDO.js → ListItem-_lOmngHp.js} +2 -2
  91. package/dist/Markdown/index.js +1 -1
  92. package/dist/{Markdown-BE6vdvPG.js → Markdown-BlEi5UGN.js} +2 -2
  93. package/dist/MobileNav/index.js +1 -1
  94. package/dist/{MobileNavToggle-D5yGMHU4.js → MobileNavToggle-wVa9dzH1.js} +1 -1
  95. package/dist/MoreMenu/index.d.ts +1 -1
  96. package/dist/MoreMenu/index.js +1 -1
  97. package/dist/{MoreMenu-CNzTagqr.js → MoreMenu-MmvMRWv5.js} +3 -3
  98. package/dist/MultiSelector/index.d.ts +1 -1
  99. package/dist/MultiSelector/index.js +1 -1
  100. package/dist/{MultiSelector-MGEiRi1W.js → MultiSelector-DXrKQLmq.js} +4 -4
  101. package/dist/NavItem/index.js +1 -1
  102. package/dist/{NavItem-kj9FbbFS.js → NavItem-D4xHjSTo.js} +1 -1
  103. package/dist/NavMenu/index.js +2 -2
  104. package/dist/{NavMenu-ZN5cqCxO.js → NavMenu-NCg3VjAQ.js} +2 -2
  105. package/dist/{NavMenuItem-xm3e0V8q.js → NavMenuItem-Bla6fYVl.js} +3 -3
  106. package/dist/NumberInput/index.d.ts +1 -1
  107. package/dist/NumberInput/index.js +1 -1
  108. package/dist/{NumberInput-D4ECOHh_.js → NumberInput-DicgvFte.js} +3 -3
  109. package/dist/Outline/index.js +1 -1
  110. package/dist/{Outline-DI9MZnuQ.js → Outline-DlO_97b4.js} +3 -3
  111. package/dist/OverflowList/index.d.ts +1 -1
  112. package/dist/OverflowList/index.js +1 -1
  113. package/dist/{OverflowList-m1tf_fR1.js → OverflowList-BYYz3ePw.js} +1 -1
  114. package/dist/Overlay/index.d.ts +1 -1
  115. package/dist/Pagination/index.js +1 -1
  116. package/dist/{Pagination-BdjxuxM3.js → Pagination-DM_W9Ue-.js} +3 -3
  117. package/dist/Popover/index.js +1 -1
  118. package/dist/{Popover-DEj8xWN-.js → Popover-CxReY-4u.js} +5 -5
  119. package/dist/PowerSearch/index.d.ts +1 -1
  120. package/dist/PowerSearch/index.js +1 -1
  121. package/dist/{PowerSearch-BJDFietK.js → PowerSearch-BwUWZG3p.js} +19 -19
  122. package/dist/Radio/index.d.ts +1 -1
  123. package/dist/Radio/index.js +1 -1
  124. package/dist/{RadioGroup-B3UoJrOA.js → RadioGroup-CsJYGjyx.js} +3 -3
  125. package/dist/RadioList/index.d.ts +1 -1
  126. package/dist/RadioList/index.js +1 -1
  127. package/dist/{RadioListItem-CD7kUGlN.js → RadioListItem-Yc3K82YE.js} +1 -1
  128. package/dist/ScrollableArea/index.d.ts +1 -1
  129. package/dist/SegmentedControl/index.js +1 -1
  130. package/dist/{SegmentedControl-DGd6JlaD.js → SegmentedControl-C-F5dkcG.js} +2 -2
  131. package/dist/SelectableCard/index.d.ts +1 -1
  132. package/dist/SelectableCard/index.js +1 -1
  133. package/dist/{SelectableCard-GRWYx3iD.js → SelectableCard-CwfpgsS8.js} +1 -1
  134. package/dist/Selector/index.d.ts +1 -1
  135. package/dist/Selector/index.js +1 -1
  136. package/dist/{Selector-BD0u-5Fy.js → Selector-bH99g1vj.js} +2 -2
  137. package/dist/SideNav/index.d.ts +1 -1
  138. package/dist/SideNav/index.js +2 -2
  139. package/dist/{SideNav-DoqCLRiX.js → SideNav-C1ZxusAB.js} +6 -6
  140. package/dist/Slider/index.js +1 -1
  141. package/dist/{Slider-DHR7HZ7N.js → Slider-Bq_7Nskr.js} +2 -2
  142. package/dist/Stepper/index.d.ts +1 -1
  143. package/dist/Stepper/index.js +1 -1
  144. package/dist/{Stepper-CCuggsov.js → Stepper-CWluGqBs.js} +1 -1
  145. package/dist/Switch/index.d.ts +1 -1
  146. package/dist/Switch/index.js +1 -1
  147. package/dist/{Switch-CnFC7jGw.js → Switch-DTPvMAxd.js} +2 -2
  148. package/dist/TabList/index.js +1 -1
  149. package/dist/{TabList-fMlX8m6n.js → TabList-C4i7UZkp.js} +3 -3
  150. package/dist/Table/index.d.ts +1 -1
  151. package/dist/Table/index.js +1 -1
  152. package/dist/{Table-DoKmVdhZ.js → Table-ClHIgsKO.js} +13 -13
  153. package/dist/TextArea/index.d.ts +1 -1
  154. package/dist/TextArea/index.js +1 -1
  155. package/dist/{TextArea-y9mmYAIy.js → TextArea-J2_wct0p.js} +4 -4
  156. package/dist/TextInput/index.d.ts +1 -1
  157. package/dist/TextInput/index.js +1 -1
  158. package/dist/{TextInput-BLGEh7vE.js → TextInput-Da1TYd57.js} +4 -4
  159. package/dist/Thumbnail/index.js +1 -1
  160. package/dist/{Thumbnail-Dm8krgGF.js → Thumbnail-1LsaJ4_m.js} +2 -2
  161. package/dist/{TimeField-DS30hnty.js → TimeField-i5ESA500.js} +2 -2
  162. package/dist/TimeInput/index.d.ts +1 -1
  163. package/dist/TimeInput/index.js +1 -1
  164. package/dist/{TimeInput-DcY4b3dg.js → TimeInput-frnKZo1M.js} +2 -2
  165. package/dist/Timestamp/index.d.ts +1 -1
  166. package/dist/Timestamp/index.js +1 -1
  167. package/dist/{Timestamp-BhBuBHu8.js → Timestamp-SseS_qtf.js} +1 -1
  168. package/dist/Toast/index.js +1 -1
  169. package/dist/{Toast-CnLk7LzS.js → Toast-tAq4S96S.js} +149 -20
  170. package/dist/ToggleButton/index.d.ts +1 -1
  171. package/dist/ToggleButton/index.js +1 -1
  172. package/dist/{ToggleButton-B9IJcpdJ.js → ToggleButton-B6hBzeVl.js} +3 -3
  173. package/dist/Token/index.d.ts +1 -1
  174. package/dist/Token/index.js +1 -1
  175. package/dist/{Token-C7Dt5ygK.js → Token-DTGUCgpn.js} +1 -1
  176. package/dist/Tokenizer/index.d.ts +1 -1
  177. package/dist/Tokenizer/index.js +1 -1
  178. package/dist/{Tokenizer-D7ZCTbnf.js → Tokenizer-iFZAuIwu.js} +7 -7
  179. package/dist/Toolbar/index.d.ts +1 -1
  180. package/dist/Toolbar/index.js +1 -1
  181. package/dist/{Toolbar-DSWH8ll4.js → Toolbar-BHkPxDxA.js} +1 -1
  182. package/dist/TopNav/index.d.ts +1 -1
  183. package/dist/TopNav/index.js +1 -1
  184. package/dist/{TopNav-CK_F6Ud5.js → TopNav-CcIayfsW.js} +4 -4
  185. package/dist/TreeList/index.js +1 -1
  186. package/dist/{TreeList-Dh0uAj2B.js → TreeList-Da_OKrv_.js} +4 -4
  187. package/dist/Typeahead/index.js +1 -1
  188. package/dist/{Typeahead-Cs-46obm.js → Typeahead-BD6xXNKh.js} +3 -3
  189. package/dist/VelocityTracker-DgjmootV.js +165 -0
  190. package/dist/{animator-BGq5a6vT.js → animator-CEHDYTfQ.js} +29 -173
  191. package/dist/{batch-BhaAWUIt.js → batch-D2a2MsSW.js} +4 -19
  192. package/dist/bezier-Dko5MnTp.js +37 -0
  193. package/dist/{clickGuard-FrlnECMp.js → clickGuard-C3VmOLhI.js} +2 -1
  194. package/dist/composables/index.js +7 -7
  195. package/dist/composables-Bs0O_SRd.js +2548 -0
  196. package/dist/{context-jtpQfR6F.js → context-NKb_prrS.js} +2 -2
  197. package/dist/{edge-CJIswPTX.js → edge-tj-cLZYh.js} +1 -1
  198. package/dist/{edgeRide-Drk4V-MC.js → edgeRide-DcUqLXE2.js} +4 -4
  199. package/dist/{handle-BazRxHwq.js → handle-CwxCHapJ.js} +1 -1
  200. package/dist/{holdEntranceInput-DMCOeRqu.js → holdEntranceInput-DgimbgGm.js} +1 -1
  201. package/dist/{index-BVeTS-R5.d.ts → index-3qz8Qztx.d.ts} +4 -4
  202. package/dist/{index-Q1oG9yIT.d.ts → index-B-3EGjfQ.d.ts} +2 -2
  203. package/dist/{index-C1e8LNx2.d.ts → index-BjqoHLMq.d.ts} +1 -1
  204. package/dist/{index-DQ3akoRZ.d.ts → index-Bu4R0WZA.d.ts} +3 -3
  205. package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
  206. package/dist/{index-BL9fE6gs.d.ts → index-Cw4CUe06.d.ts} +5 -5
  207. package/dist/{index-CUuUoX3h.d.ts → index-JE1HrzdJ.d.ts} +3 -3
  208. package/dist/{index-hUa5oQ5O.d.ts → index-m3DOxOw6.d.ts} +42 -42
  209. package/dist/index.d.ts +9 -9
  210. package/dist/index.js +85 -85
  211. package/dist/{inputHold-BmChuR9x.js → inputHold-DW2LYHb5.js} +4 -4
  212. package/dist/{inputHoldState-pblUT4oh.js → inputHoldState-xntIqr5W.js} +2 -1
  213. package/dist/{inputStream-LZdK8luP.js → inputStream-bPd9eB2b.js} +2 -49
  214. package/dist/isRtlElement-NHuH48AA.js +23 -0
  215. package/dist/{landing-CBaXCGEg.js → landing-Bi7X7w_7.js} +3 -3
  216. package/dist/{lazyBottomSheet-Cmd-WMEE.js → lazyBottomSheet-BVZ1yH8g.js} +1 -1
  217. package/dist/{timing-CSHWQbTJ.js → linearEasing-ScK9LqAY.js} +30 -1
  218. package/dist/{bezier-Df-yGuNZ.js → presentation-Cy_yf56y.js} +2 -39
  219. package/dist/{pressFeedback-DVR5V1b6.js → pressFeedback-9dqGYjxv.js} +2 -2
  220. package/dist/{resolveMotion-CurhYTVC.js → resolveMotion-1cwESYvK.js} +202 -1
  221. package/dist/resolveSnapPoint-DdZyBkT4.js +717 -0
  222. package/dist/{flatTree-BB4yPMNL.js → sharedRealm-H1OrlP0V.js} +49 -1
  223. package/dist/{themeTiming-BFDOPRjK.js → themeTiming-NUkH9HsU.js} +1 -1
  224. package/dist/{touchHold-CFJlSClt.js → touchHold-DXtx7npm.js} +1 -1
  225. package/dist/{useActionGroupTracking-C6BzQzvp.js → useActionGroupTracking-CLFF7FI2.js} +2 -2
  226. package/dist/{useAnimatedLayout-DC2l3WrE.js → useAnimatedLayout-DWWc31RR.js} +1 -1
  227. package/dist/{composables-BTRbNgmR.js → useAttachment-BuNyeUXy.js} +44 -3464
  228. package/dist/{useChatStreamScroll-Cv51kRT0.js → useChatStreamScroll-CuMzkXgD.js} +1 -1
  229. package/dist/{useInputStatusIcon-BngSzjVd.js → useInputStatusIcon-BqV6YzTV.js} +1 -1
  230. package/dist/{useListFocus-CkHfsZp0.js → useListFocus-Ccd_HU9T.js} +2 -23
  231. package/dist/{useMenuDrillIn-BQx6lQMz.js → useMenuDrillIn-Cj6MM77J.js} +1 -1
  232. package/dist/{useMenuEntranceHold-buV5S9yk.js → useMenuEntranceHold-HznOwIry.js} +1 -1
  233. package/dist/{useMenuHover-CfQtWMg-.js → useMenuHover-DoBatZeD.js} +1 -1
  234. package/dist/{useMenuPress-DU6pAIHy.js → useMenuPress-DcwVUsQO.js} +3 -3
  235. package/dist/{usePressFeedback-BhNcuxQv.js → usePressFeedback-DHdmAsMp.js} +1 -1
  236. package/dist/{useTouchHitArea-CNZyA18Y.js → useTouchHitArea-SY1ITxSJ.js} +2 -2
  237. package/package.json +1 -1
  238. package/styles/bottom-sheet.css +28 -8
  239. package/dist/{index-D8lv2BiD.d.ts → index-BqhgeAT4.d.ts} +1 -1
@@ -1,6 +1,6 @@
1
- import { n as batchPresented } from "./bezier-Df-yGuNZ.js";
2
- import { D as glides, S as originOf, T as visibleRect, a as flush, b as transitionSettles, c as onGlideClock, d as layoutMotion, h as beginChange, l as rectOf, n as batches, o as bandFor, s as collectCandidates, t as batchFor, y as settleTransition } from "./batch-BhaAWUIt.js";
3
- import { t as areaOf } from "./handle-BazRxHwq.js";
1
+ import { t as batchPresented } from "./presentation-Cy_yf56y.js";
2
+ import { D as glides, S as originOf, T as visibleRect, a as flush, b as transitionSettles, c as onGlideClock, d as layoutMotion, h as beginChange, l as rectOf, n as batches, o as bandFor, s as collectCandidates, t as batchFor, y as settleTransition } from "./batch-D2a2MsSW.js";
3
+ import { t as areaOf } from "./handle-CwxCHapJ.js";
4
4
  //#region src/motion/layout/reportChange.ts
5
5
  function resolve(target) {
6
6
  return typeof target === "function" ? target() : target.current;
@@ -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-CmNOXlZO.js").then((n) => n.t);
4
+ return import("./BottomSheet-Btf8Yn8k.js").then((n) => n.t);
5
5
  }
6
6
  /**
7
7
  * 按需加载的 BottomSheet:只在底部弹层真正进入组件树时请求,只用锚定浮层的页面
@@ -87,4 +87,33 @@ function registerReducedMotionCrossFade() {
87
87
  registerMotionTable("timing", reducedMotionCrossFadeRoles, { roles: ["curves.move"] });
88
88
  }
89
89
  //#endregion
90
- export { registerReducedMotionCrossFade as n, themeReducesMotion as r, reducedMotionCrossFade as t };
90
+ //#region src/motion/linearEasing.ts
91
+ /**
92
+ * @file linearEasing.ts
93
+ * @input A duration and the fraction of a move done at each time
94
+ * @output Exports `linearEasing`, that curve as CSS `linear()` easing text,
95
+ * and `sampleCount`, how many samples cover a duration at 60 per second
96
+ * @position Pure math under the motion helpers; no DOM, no React
97
+ */
98
+ /** Samples per second of a sampled curve: one per frame at 60 Hz. */
99
+ const SAMPLES_PER_SECOND = 60;
100
+ /** How many samples cover `durationMs`, both ends included: at least 2. */
101
+ function sampleCount(durationMs) {
102
+ return Math.max(2, Math.ceil(durationMs / 1e3 * SAMPLES_PER_SECOND) + 1);
103
+ }
104
+ /**
105
+ * The curve `done` traces over `durationMs` as CSS `linear()` easing text,
106
+ * one stop per frame. `done(t)` is the fraction of the move done `t` ms in.
107
+ * A CSS transition with this easing and duration follows the curve.
108
+ */
109
+ function linearEasing(durationMs, done) {
110
+ const count = sampleCount(durationMs);
111
+ const stops = [];
112
+ for (let i = 0; i < count; i++) {
113
+ const value = done(i / (count - 1) * durationMs);
114
+ stops.push(String(Math.round(value * 1e4) / 1e4));
115
+ }
116
+ return `linear(${stops.join(", ")})`;
117
+ }
118
+ //#endregion
119
+ export { themeReducesMotion as a, registerReducedMotionCrossFade as i, sampleCount as n, reducedMotionCrossFade as r, linearEasing as t };
@@ -1,5 +1,4 @@
1
- import { r as parentAcrossShadow, s as isElement } from "./flatTree-BB4yPMNL.js";
2
- import { a as realmValue, o as sharedKey } from "./inputStream-LZdK8luP.js";
1
+ import { l as parentAcrossShadow, n as sharedKey, p as isElement, t as realmValue } from "./sharedRealm-H1OrlP0V.js";
3
2
  //#region src/motion/presentation.ts
4
3
  /**
5
4
  * @file presentation.ts
@@ -151,40 +150,4 @@ function resolvePresented(elements) {
151
150
  for (const element of elements) sources.get(element)?.resolve();
152
151
  }
153
152
  //#endregion
154
- //#region src/motion/bezier.ts
155
- /** The timing function for `points`: maps time progress to eased progress. */
156
- function cubicBezier([x1, y1, x2, y2]) {
157
- const cx = 3 * x1;
158
- const bx = 3 * (x2 - x1) - cx;
159
- const ax = 1 - cx - bx;
160
- const cy = 3 * y1;
161
- const by = 3 * (y2 - y1) - cy;
162
- const ay = 1 - cy - by;
163
- const sampleX = (t) => ((ax * t + bx) * t + cx) * t;
164
- const sampleY = (t) => ((ay * t + by) * t + cy) * t;
165
- const slopeX = (t) => (3 * ax * t + 2 * bx) * t + cx;
166
- const solveT = (x) => {
167
- let t = x;
168
- for (let i = 0; i < 8; i++) {
169
- const error = sampleX(t) - x;
170
- if (Math.abs(error) < 1e-7) return t;
171
- const slope = slopeX(t);
172
- if (Math.abs(slope) < 1e-6) break;
173
- t -= error / slope;
174
- }
175
- let lo = 0;
176
- let hi = 1;
177
- t = x;
178
- for (let i = 0; i < 60; i++) {
179
- const value = sampleX(t);
180
- if (Math.abs(value - x) < 1e-7) break;
181
- if (value < x) lo = t;
182
- else hi = t;
183
- t = (lo + hi) / 2;
184
- }
185
- return t;
186
- };
187
- return (x) => x <= 0 ? 0 : x >= 1 ? 1 : sampleY(solveT(x));
188
- }
189
- //#endregion
190
- export { presentedOffsetOf as a, watchPresentedElements as c, presentedElements as i, writePresentedResolve as l, batchPresented as n, registerPresentedOffset as o, clearPresentedResolve as r, resolvePresented as s, cubicBezier as t };
153
+ export { registerPresentedOffset as a, writePresentedResolve as c, presentedOffsetOf as i, clearPresentedResolve as n, resolvePresented as o, presentedElements as r, watchPresentedElements as s, batchPresented as t };
@@ -1,5 +1,5 @@
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";
1
+ import { f as isDocument, h as isNode, l as parentAcrossShadow, p as isElement } from "./sharedRealm-H1OrlP0V.js";
2
+ import { i as subscribeInput } from "./inputStream-bPd9eB2b.js";
3
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";
4
4
  import { n as hasInteractiveAncestor } from "./useClickableContainer-Dtjg-nkm.js";
5
5
  //#region src/utils/inputAge.ts
@@ -1,4 +1,174 @@
1
1
  import { b as isSpring, h as motionRoleOf, m as motionRoleIn } from "./pressGesture-BzIBmKF2.js";
2
+ import { t as linearEasing } from "./linearEasing-ScK9LqAY.js";
3
+ //#region src/motion/springParameters.ts
4
+ /**
5
+ * @file springParameters.ts
6
+ * @output The `Spring` model and the conversions between Apple's spring
7
+ * vocabularies (duration and bounce, response and damping ratio, mass,
8
+ * stiffness and damping), and UIKit's relative velocity
9
+ * @position Pure math under spring.ts, which re-exports all of it. See
10
+ * spring.ts for the sources of each conversion.
11
+ */
12
+ const TAU = 2 * Math.PI;
13
+ function assertPositiveFinite(name, value) {
14
+ if (!(Number.isFinite(value) && value > 0)) throw new RangeError(`spring: ${name} must be a positive number, got ${value}`);
15
+ }
16
+ /**
17
+ * SwiftUI's `Spring(duration:bounce:)` and UIKit's
18
+ * `UIView.animate(springDuration:bounce:…)`: the WWDC23 equations. Bounce is
19
+ * clamped to SwiftUI's documented range (−1, 1].
20
+ *
21
+ * @example
22
+ * ```
23
+ * springFromDurationBounce({duration: 0.5, bounce: 0}); // SwiftUI .smooth
24
+ * ```
25
+ */
26
+ function springFromDurationBounce({ duration, bounce }) {
27
+ assertPositiveFinite("duration", duration);
28
+ if (!Number.isFinite(bounce)) throw new RangeError(`spring: bounce must be finite, got ${bounce}`);
29
+ const b = Math.min(1, Math.max(-.999999, bounce));
30
+ return {
31
+ mass: 1,
32
+ stiffness: (TAU / duration) ** 2,
33
+ damping: b >= 0 ? (1 - b) * 2 * TAU / duration : 2 * TAU / (duration * (1 + b))
34
+ };
35
+ }
36
+ /**
37
+ * SwiftUI's `Spring(response:dampingRatio:)` and
38
+ * `Animation.spring(response:dampingFraction:)`. Overdamping (ratio > 1) is
39
+ * kept, as SwiftUI keeps it for this initializer.
40
+ */
41
+ function springFromResponse({ response, dampingRatio }) {
42
+ assertPositiveFinite("response", response);
43
+ if (!(Number.isFinite(dampingRatio) && dampingRatio >= 0)) throw new RangeError(`spring: dampingRatio must be ≥ 0, got ${dampingRatio}`);
44
+ const omega = TAU / response;
45
+ return {
46
+ mass: 1,
47
+ stiffness: omega * omega,
48
+ damping: 2 * dampingRatio * omega
49
+ };
50
+ }
51
+ /**
52
+ * `CASpringAnimation` / `UISpringTimingParameters(mass:stiffness:damping:)`
53
+ * / SwiftUI `Spring(mass:stiffness:damping:allowOverDamping:)`. Like SwiftUI,
54
+ * an overdamped spring is treated as critically damped unless
55
+ * `allowOverdamping` is set: "a value of false specifies that such cases
56
+ * should instead be treated as critically damped".
57
+ */
58
+ function springFromPhysics({ mass = 1, stiffness, damping, allowOverdamping = false }) {
59
+ assertPositiveFinite("mass", mass);
60
+ assertPositiveFinite("stiffness", stiffness);
61
+ if (!(Number.isFinite(damping) && damping >= 0)) throw new RangeError(`spring: damping must be ≥ 0, got ${damping}`);
62
+ const critical = 2 * Math.sqrt(stiffness * mass);
63
+ return {
64
+ mass,
65
+ stiffness,
66
+ damping: allowOverdamping ? damping : Math.min(damping, critical)
67
+ };
68
+ }
69
+ /** Undamped angular frequency ω₀ = √(k/m), rad/s. */
70
+ function naturalFrequency(spring) {
71
+ return Math.sqrt(spring.stiffness / spring.mass);
72
+ }
73
+ /** Damping ratio ζ = c / (2·√(k·m)). */
74
+ function dampingRatioOf(spring) {
75
+ return spring.damping / (2 * Math.sqrt(spring.stiffness * spring.mass));
76
+ }
77
+ /**
78
+ * Normalizes a description to the physical `Spring`. A physical description
79
+ * gets `springFromPhysics`' treatment: overdamping is clamped to critical, as
80
+ * SwiftUI and Core Animation do by default.
81
+ */
82
+ function toSpring(description) {
83
+ if ("stiffness" in description) return springFromPhysics(description);
84
+ if ("bounce" in description) return springFromDurationBounce(description);
85
+ return springFromResponse(description);
86
+ }
87
+ //#endregion
88
+ //#region src/motion/spring.ts
89
+ /**
90
+ * Closed-form solution of the spring released at `from` with
91
+ * `initialVelocity` (units/s), heading for `to`.
92
+ *
93
+ * @example
94
+ * ```
95
+ * const curve = solveSpring(springFromDurationBounce({duration: 0.5, bounce: 0}), {from: 0, to: 300});
96
+ * curve.value(0.1); // px after 100 ms
97
+ * ```
98
+ */
99
+ function solveSpring(spring, { from, to, velocity: initialVelocity = 0 }) {
100
+ const omega0 = naturalFrequency(spring);
101
+ const zeta = dampingRatioOf(spring);
102
+ const x0 = from - to;
103
+ const v0 = initialVelocity;
104
+ let displacement;
105
+ let speed;
106
+ let envelope;
107
+ let envelopePeak = 0;
108
+ if (zeta < .999999) {
109
+ const decay = zeta * omega0;
110
+ const omegaD = omega0 * Math.sqrt(1 - zeta * zeta);
111
+ const a = x0;
112
+ const b = (v0 + decay * x0) / omegaD;
113
+ const bv = (decay * v0 + omega0 * omega0 * x0) / omegaD;
114
+ displacement = (t) => Math.exp(-decay * t) * (a * Math.cos(omegaD * t) + b * Math.sin(omegaD * t));
115
+ speed = (t) => Math.exp(-decay * t) * (v0 * Math.cos(omegaD * t) - bv * Math.sin(omegaD * t));
116
+ const amplitude = Math.abs(a) + Math.abs(b);
117
+ envelope = (t) => amplitude * Math.exp(-decay * t);
118
+ } else if (zeta <= 1.000001) {
119
+ const b = v0 + omega0 * x0;
120
+ displacement = (t) => (x0 + b * t) * Math.exp(-omega0 * t);
121
+ speed = (t) => (v0 - omega0 * b * t) * Math.exp(-omega0 * t);
122
+ const absA = Math.abs(x0);
123
+ const absB = Math.abs(b);
124
+ envelope = (t) => (absA + absB * t) * Math.exp(-omega0 * t);
125
+ envelopePeak = absB > 0 ? Math.max(0, 1 / omega0 - absA / absB) : 0;
126
+ } else {
127
+ const root = omega0 * Math.sqrt(zeta * zeta - 1);
128
+ const r1 = -zeta * omega0 + root;
129
+ const r2 = -zeta * omega0 - root;
130
+ const c1 = (v0 - r2 * x0) / (r1 - r2);
131
+ const c2 = x0 - c1;
132
+ displacement = (t) => c1 * Math.exp(r1 * t) + c2 * Math.exp(r2 * t);
133
+ speed = (t) => r1 * c1 * Math.exp(r1 * t) + r2 * c2 * Math.exp(r2 * t);
134
+ const absC1 = Math.abs(c1);
135
+ const absC2 = Math.abs(c2);
136
+ envelope = (t) => absC1 * Math.exp(r1 * t) + absC2 * Math.exp(r2 * t);
137
+ }
138
+ const settleTime = (threshold) => {
139
+ if (!(threshold > 0)) return Infinity;
140
+ if (zeta === 0) return x0 === 0 && v0 === 0 ? 0 : Infinity;
141
+ const start = envelopePeak;
142
+ if (envelope(start) <= threshold) return 0;
143
+ if (zeta < .999999) {
144
+ const amplitude = envelope(0);
145
+ return Math.log(amplitude / threshold) / (zeta * omega0);
146
+ }
147
+ let lo = start;
148
+ let hi = Math.max(start, 1 / omega0);
149
+ while (envelope(hi) > threshold) {
150
+ lo = hi;
151
+ hi *= 2;
152
+ if (hi > 1e6) return Infinity;
153
+ }
154
+ for (let i = 0; i < 100 && hi - lo > 1e-12; i++) {
155
+ const mid = (lo + hi) / 2;
156
+ if (envelope(mid) > threshold) lo = mid;
157
+ else hi = mid;
158
+ }
159
+ return hi;
160
+ };
161
+ return {
162
+ spring,
163
+ from,
164
+ to,
165
+ initialVelocity,
166
+ value: (t) => to + displacement(t),
167
+ velocity: (t) => speed(t),
168
+ settleTime
169
+ };
170
+ }
171
+ //#endregion
2
172
  //#region src/motion/engine/constants.ts
3
173
  const PROPERTIES = [
4
174
  "x",
@@ -303,5 +473,36 @@ function resolveMotion(element, leafOrGroup, key) {
303
473
  if (typeof value === "number") return value * tempo;
304
474
  return isSpring(value) ? springAtTempo(value, tempo) : value;
305
475
  }
476
+ /**
477
+ * How `move` on `spring` plays at the tempo of the theme `element` is in: how
478
+ * long it takes, as `resolveSettleMs` gives it, and its progress over that
479
+ * time as CSS `linear()` easing. A CSS part that takes both follows the
480
+ * spring frame by frame, so the two start and land together. A sheet's scrim
481
+ * fades this way under the sheet's close.
482
+ *
483
+ * With `doneAt`, a position between `from` and `to`, the progress is measured
484
+ * toward `doneAt` instead. It reaches 1 the first time the move gets there
485
+ * and stays at 1. A sheet leaves view before its close ends, because its
486
+ * surface reaches below the screen, and its scrim is clear by then.
487
+ */
488
+ function resolveMoveTiming(element, spring, move, doneAt = move.to) {
489
+ const curve = solveSpring(toSpring(resolveMotion(element, spring)), move);
490
+ const durationMs = curve.settleTime(move.epsilon) * 1e3;
491
+ const span = doneAt - move.from;
492
+ if (span === 0 || durationMs === 0) return {
493
+ durationMs,
494
+ easing: linearEasing(durationMs, () => 1)
495
+ };
496
+ const progressAt = (t) => (curve.value(t / 1e3) - move.from) / span;
497
+ let reachedAt = Infinity;
498
+ for (let t = 0; t <= durationMs; t++) if (progressAt(t) >= 1) {
499
+ reachedAt = t;
500
+ break;
501
+ }
502
+ return {
503
+ durationMs,
504
+ easing: linearEasing(durationMs, (t) => t >= reachedAt ? 1 : progressAt(t))
505
+ };
506
+ }
306
507
  //#endregion
307
- export { REDUCED_TRANSITION as C, SAMPLE_TOLERANCE as E, PROPERTIES as S, SAMPLE_GRID_MS as T, END_RECHECK_MS as _, expandList as a, MAX_DURATION_MS as b, isIdentityText as c, round as d, sameShown as f, END_HOLD_MS as g, DECAY_PROPERTIES as h, expand as i, motionNow as l, CHANNEL_OF as m, defaultIsCoarsePointer as n, format as o, CHANNELS as p, defaultPrefersReducedMotion as r, inlineText as s, resolveMotion as t, registerCustomProperty as u, IDENTITY as v, SAME_VALUE as w, MAX_KEYFRAMES as x, IDENTITY_TEXT as y };
508
+ export { PROPERTIES as C, SAMPLE_TOLERANCE as D, SAMPLE_GRID_MS as E, solveSpring as O, MAX_KEYFRAMES as S, SAME_VALUE as T, END_HOLD_MS as _, expand as a, IDENTITY_TEXT as b, inlineText as c, registerCustomProperty as d, round as f, DECAY_PROPERTIES as g, CHANNEL_OF as h, defaultPrefersReducedMotion as i, toSpring as k, isIdentityText as l, CHANNELS as m, resolveMoveTiming as n, expandList as o, sameShown as p, defaultIsCoarsePointer as r, format as s, resolveMotion as t, motionNow as u, END_RECHECK_MS as v, REDUCED_TRANSITION as w, MAX_DURATION_MS as x, IDENTITY as y };