@astryx-vue/core 0.32.0 → 0.33.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.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-C5pc5nQN.js → AlertDialog-JmxbMkeV.js} +8 -8
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-B7dkDyY8.js → AppShell-CPQDndnd.js} +5 -6
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-CYW9ZTD3.js → Avatar-B-gSpEw4.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-Dd-yDDNz.js → AvatarGroup-CCFMtKks.js} +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-BNrs2Ptl.js → Banner-BJETFZr7.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-Z92IvLBU.js → BottomSheet-C6pQBvnU.js} +10 -38
- package/dist/{BottomSheet-CAJJ8cR5.js → BottomSheet-C_LoskZt.js} +3 -3
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CnvaPn8M.js → Breadcrumbs-BrxMrKHO.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-CzMWqCpJ.js → Button-X7k1WCkW.js} +4 -4
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-oI99JAyN.js → ButtonGroup-D5E7QLWI.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BjyedZ0Y.js → Carousel-Bpbx-2DK.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-CJr2RIyc.js → Chat-D7Q2z9W2.js} +5 -5
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BrbQTrL-.js → CheckboxInput-Cxtmdymo.js} +3 -3
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-CrAzFR4x.js → CheckboxListItem-C75nzKE8.js} +5 -5
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-B86P2aiM.js → ClickableCard-CLXCxaxo.js} +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-pWPw1-iu.js → CodeBlock-Bgxy15iD.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-DXl9RRaX.js → Collapsible-Cf9evVsQ.js} +3 -3
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-DnbvnT4c.js → CommandPalette-CniaCqex.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWQbuovE.js → ComplexSelector-DYeYZKON.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DfoShDVW.js → ContextMenu-Bp7G_Ys2.js} +6 -6
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-D9_QsZMj.js → DateInput-BmEbQA1z.js} +4 -4
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-8P8i8aVI.js → DateRangeInput-CoA1PuGz.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-C2XWslHp.js → DateTimeInput-CL0sp0ES.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-Cet6PTnf.js → Dialog-C46xHdDO.js} +1 -1
- package/dist/{Dialog-B1Hlr0x_.js → Dialog-uzq24bX_.js} +2 -2
- package/dist/{DialogHeader-BiHQct4G.js → DialogHeader-E0auaRKt.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-Bm3l7Dey.js → Drawer-DfhhdBMZ.js} +2 -2
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-BaRXEFLa.js → DropdownMenu-DrJpONZH.js} +8 -8
- package/dist/{DropdownMenuRadioItem.vue-B4iwMWWD.d.ts → DropdownMenuRadioItem.vue-BDDI4EZK.d.ts} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-CXDlpIdI.js → EmptyState-C8WQltQk.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-njr7AUcW.js → Field-CrnwM-2A.js} +1 -1
- package/dist/{FieldInfoTip-DLqZykVm.js → FieldInfoTip-DqQP1T-d.js} +1 -1
- package/dist/{FieldLabel-CyL5D1lu.js → FieldLabel-CLxclKT2.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CtqZSRdh.js → FileInput-BHFjo_zo.js} +3 -3
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BXTbW_px.js → Heading-jYno4L3t.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-zVUEeqF2.js → HoverCard-D_6idU4r.js} +4 -4
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CoZFp0CP.js → IconButton-B6m42AlL.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-Eg2IGZJw.js → InfoTip-CUkTHca2.js} +2 -2
- package/dist/{InputClearButton-CBsL91my.js → InputClearButton-s_MEW25n.js} +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-BE83-MCX.js → InputGroup-42PbUmg-.js} +1 -1
- package/dist/{Item-C9u_kQUO.js → Item-tVHjgQDe.js} +2 -1
- package/dist/{LayerContentBoundary-DmRI6Bg0.js → LayerContentBoundary-XvH9wmdg.js} +1 -1
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-094k14rN.js → Layout-DJ6CQLw2.js} +1 -1
- package/dist/{LayoutPanel-BPboQAJj.js → LayoutPanel-Bqh82ULc.js} +22 -2
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-5PtYb0r4.js → Lightbox-Bur4pvRo.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BzXVGE7G.js → Link-DVslj_GH.js} +2 -2
- package/dist/List/index.d.ts +2 -2
- package/dist/List/index.js +2 -2
- package/dist/ListItem-B60jTcXy.js +530 -0
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-HDZPj9Vw.js → Markdown-Baq5r2Mp.js} +3 -3
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-CrUf5UPQ.js → MobileNavToggle-BV3fmVmO.js} +2 -2
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-DzpufGyj.js → MoreMenu-DIx487BZ.js} +6 -6
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BS6wxlx4.js → MultiSelector-eJSx3iZR.js} +8 -8
- package/dist/{NavDisclosure-BM0dJGLA.js → NavDisclosure-B8G8t325.js} +1 -1
- package/dist/{NavHeadingSurface-CuQnoV_V.js → NavHeadingSurface-BkNP_1au.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-D4xHjSTo.js → NavItem-B7xpLk_x.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-fXsoJKjW.js → NavMenu-C6OU4a5Z.js} +3 -3
- package/dist/{NavMenuItem-BKY6eRkz.js → NavMenuItem-BZuajqYL.js} +3 -3
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-Ueted2wi.js → NumberInput-Dd4QQGZp.js} +3 -3
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-CnSt_KvS.js → Outline-coqRQ06s.js} +4 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-KpebInhH.js → OverflowList-DS7cmNsr.js} +2 -2
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BliQ5RGN.js → Pagination-BWPJfO4_.js} +2 -2
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DXfXGrWG.js → Popover-DnrZk22Y.js} +8 -8
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CmJKFEEu.js → PowerSearch-BV5n_nig.js} +26 -26
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-Dj1ucJxG.js → ProgressBar-C-HzrG8T.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-BLOjBRrM.js → RadioGroup-B-AkUDI8.js} +4 -4
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-CHxTpBva.js → RadioListItem-DhmF7YNL.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-BMSbAFdP.js → ResizeHandle-ezvpdXTS.js} +21 -4
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-C-F5dkcG.js → SegmentedControl-BdbqWErg.js} +2 -2
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-CwfpgsS8.js → SelectableCard-YzN6trLf.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-OhIdsI8A.js → Selector-BNr_kb6Q.js} +6 -6
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-CcdDU-hP.js → SideNav-FEpgj5dB.js} +9 -11
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DjbWQ1wn.js → Slider-DaHQhbA7.js} +2 -2
- package/dist/Stack/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-Bta_bpaZ.js → StatusDot-B7T0et3H.js} +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CWluGqBs.js → Stepper-C3ZFN-Gp.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-D4ojsj_l.js → Switch-B8HRxp3u.js} +2 -2
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-S99zXoRN.js → TabList-BOQ0bvE3.js} +3 -3
- package/dist/Table/index.d.ts +2 -2
- package/dist/Table/index.js +1 -1
- package/dist/{Table-3NTjPpHc.js → Table-BOcDJ2a_.js} +12 -13
- package/dist/Text/index.js +1 -1
- package/dist/{Text-DNKNlENe.js → Text-DqiV40AF.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-DnSmL0A8.js → TextArea-Vrx7Os5P.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-DyHEMYld.js → TextInput-DOeUROX8.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-D8GlIdNm.js → Thumbnail-BF53Z6jm.js} +3 -3
- package/dist/{TimeField-ADeT0OA1.js → TimeField-CkGXOHTG.js} +4 -4
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-C1gzJGHk.js → TimeInput-DCksf1di.js} +2 -2
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-DhI2oV5L.js → Timer-DDrODKow.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-CTZSVsmd.js → Timestamp-CCzREXNN.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-DUqDW07c.js → Toast-CoAEdN_I.js} +2 -2
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-BMBH2tmu.js → ToggleButton-DAW-pV4r.js} +3 -3
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DTGUCgpn.js → Token-DZmmnHEj.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-C0CdEzQT.js → Tokenizer-DsPtN6tZ.js} +13 -13
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-CEyd_iFa.js → Tooltip-DhV7MkwU.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-BObecD_X.js → TopNav-Djli-IEz.js} +5 -5
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CsgXzBdm.js → TreeList-BGHHEcg1.js} +4 -4
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-C_0dTmaf.js → Typeahead-Dowds5Z-.js} +6 -6
- package/dist/{VelocityTracker-DgjmootV.js → VelocityTracker-DVbtTSXR.js} +1 -1
- package/dist/{accessibleName-Cq7krRE-.js → accessibleName-Bjt5L8jX.js} +1 -1
- package/dist/{animator-C0kqgDUJ.js → animator-DLWdws2R.js} +3 -2
- package/dist/{assertOptions-Km_9Y5rI.js → assertOptions-BCEzojGr.js} +1 -1
- package/dist/composables/index.d.ts +3 -3
- package/dist/composables/index.js +12 -12
- package/dist/{composables-kHI1dSq2.js → composables-B7FrCjk6.js} +11 -7
- package/dist/{context-ZWA02GaM.js → context-BcJmSPj1.js} +1 -2
- package/dist/cssValues-Cr6PhYTx.js +223 -0
- package/dist/{pressGesture-BzIBmKF2.js → gestures-C8VhWve7.js} +2 -296
- package/dist/{index-DogWVRJi.d.ts → index-0RIgvtdm.d.ts} +1 -1
- package/dist/{index-CQi9WGWE.d.ts → index-AgTJRqUY.d.ts} +2 -2
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-CdRxeyhB.d.ts → index-BU1HdDER.d.ts} +2 -2
- package/dist/{index-maTGrWjF.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-C1e8LNx2.d.ts → index-BjqoHLMq.d.ts} +1 -1
- package/dist/{index-Bxus0zuz.d.ts → index-BtPaMbkN.d.ts} +11 -11
- package/dist/{index-4m5X7IYX.d.ts → index-BvdhRgke.d.ts} +98 -98
- package/dist/{index-etx25Eq-.d.ts → index-Bwh8O-v8.d.ts} +1 -1
- package/dist/{index-CiVrhGUJ.d.ts → index-C9ZssPUV.d.ts} +1 -1
- package/dist/{index-FeZXsFO-.d.ts → index-CBOv5j3c.d.ts} +3 -3
- package/dist/{index-Cj-Ob5jw.d.ts → index-CG6dbyeb.d.ts} +10 -10
- package/dist/{index-BpFzfJbo.d.ts → index-COgrQZIL.d.ts} +2 -2
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-BIiG1CF_.d.ts → index-C_iTVOHQ.d.ts} +4 -4
- package/dist/{index-B83v2qNb.d.ts → index-Casdfb9N.d.ts} +4 -4
- package/dist/{index-Bzi3A980.d.ts → index-ChqMaV6N.d.ts} +1 -1
- package/dist/{index-DGe-ApvN.d.ts → index-CuW4AQ7M.d.ts} +3 -3
- package/dist/{index-DbNGGCM0.d.ts → index-DAz4l6Jw.d.ts} +1 -1
- package/dist/{index-T5bzxQ30.d.ts → index-DCyYldjP.d.ts} +1 -1
- package/dist/{index-BWWirRm3.d.ts → index-DHUCHxn2.d.ts} +1 -1
- package/dist/{index-CHLZPpjQ.d.ts → index-DYabo8TI.d.ts} +3 -3
- package/dist/{index-o3JHyrk8.d.ts → index-DjSQLT53.d.ts} +1 -1
- package/dist/{index-Dk50Zh3F.d.ts → index-DofC9Rll.d.ts} +2 -2
- package/dist/{index-JE1HrzdJ.d.ts → index-DsWEyz1N.d.ts} +1 -1
- package/dist/{index-C943VIzi.d.ts → index-DvCLTiDV.d.ts} +1 -1
- package/dist/{index-ILJ7sKx3.d.ts → index-QC9FDUDA.d.ts} +4 -4
- package/dist/{index-BA8exXNP.d.ts → index-X4S7_dmq.d.ts} +1 -1
- package/dist/{index-DIw5D3zj.d.ts → index-ZKBj_1nu.d.ts} +2 -2
- package/dist/{index-DAEgHJTK.d.ts → index-aHC2C89h.d.ts} +4 -4
- package/dist/{index-Cm36VS1A.d.ts → index-mK1ICsVg.d.ts} +2 -2
- package/dist/{index-ql9ApSTF.d.ts → index-yQc-te9a.d.ts} +2 -2
- package/dist/index.d.ts +37 -37
- package/dist/index.js +103 -103
- package/dist/landing-Dx9vPF0t.js +51 -0
- package/dist/{layerDepth-8jb4An1z.js → layerDepth-BdZX0xSD.js} +1 -1
- package/dist/{lazyBottomSheet-CNYA5qOy.js → lazyBottomSheet-BUXYsz28.js} +1 -1
- package/dist/linearEasing-BxWjPql6.js +282 -0
- package/dist/{pressFeedback-9dqGYjxv.js → pressFeedback-CPzGi_88.js} +2 -1
- package/dist/pressGesture-BV4fYPIG.js +103 -0
- package/dist/{batch-DPlrpYU6.js → reportChange-BkOEttEP.js} +763 -4
- package/dist/resizableChannel-DS0idC-X.js +388 -0
- package/dist/resolveMotion-BLdMNTpf.js +117 -0
- package/dist/resolveSnapPoint-DygD-wmL.js +110 -0
- package/dist/roles-CPMsH5Ob.js +196 -0
- package/dist/rubberBand-DecgmtDj.js +123 -0
- package/dist/{resolveSnapPoint-DdZyBkT4.js → springs-BR66JuIm.js} +2 -182
- package/dist/{stillPointerGate-CpzpYNqy.js → stillPointerGate-BChxtcd6.js} +1 -1
- package/dist/{themeTiming-D1U0redl.js → themeTiming-BA_wpgEn.js} +1 -1
- package/dist/{tooltipFocusRules-BfnTnTpn.js → tooltipFocusRules-CU8eUu3v.js} +2 -2
- package/dist/{tooltipTriggerRules-BRdKWVzo.js → tooltipTriggerRules-CKfpQu9d.js} +1 -1
- package/dist/{types-ClOMFbqC.d.ts → types-BHHT6Bho.d.ts} +17 -0
- package/dist/{useActionGroupTracking-CLFF7FI2.js → useActionGroupTracking-iv0p__dY.js} +3 -3
- package/dist/{useAnimatedLayout-DWWc31RR.js → useAnimatedLayout-BC1mJaxA.js} +1 -1
- package/dist/{useAttachment-BuNyeUXy.js → useAttachment-BohgLE3o.js} +3 -3
- package/dist/{useCombobox-DkwiskdE.js → useCombobox-BYRrwLe-.js} +1 -1
- package/dist/{useDismiss-fhWaGqY8.js → useDismiss-Qq0hUJoO.js} +1 -1
- package/dist/{useFocusTrap-DT2UCZd-.js → useFocusTrap-CX-qEF-G.js} +1 -1
- package/dist/{useInputStatusIcon-B1i0sFKu.js → useInputStatusIcon-CYvxaJvt.js} +1 -1
- package/dist/{useMenuPress-CBtTaYOS.js → useMenuPress-DDvcJNRd.js} +2 -2
- package/dist/{usePressFeedback-DHdmAsMp.js → usePressFeedback-BuyFZkQO.js} +1 -1
- package/dist/{useResizable-AfPBAq5c.js → useResizable-BL7wxH1p.js} +411 -85
- package/dist/{useResizable-CJd4JkbJ.d.ts → useResizable-CKDaU_se.d.ts} +10 -8
- package/dist/{useTooltip-llyJd1q6.js → useTooltip-CgJi5QQW.js} +4 -4
- package/dist/{useTouchHitArea-SY1ITxSJ.js → useTouchHitArea-Dsz80HzY.js} +1 -1
- package/dist/{useTouchTriggerInternal-DzsFiDjb.js → useTouchTriggerInternal-BapohoUw.js} +1 -1
- package/dist/{useTruncationTooltip-BFm7XgvO.js → useTruncationTooltip-x1cQd8of.js} +3 -3
- package/dist/{useTypeahead-8Y5m41VA.js → useTypeahead-CZuT8Niw.js} +1 -1
- package/dist/{useTypeaheadMenuConfig-Cy-gOjVd.js → useTypeaheadMenuConfig-BMd42XKb.js} +2 -2
- package/package.json +1 -1
- package/styles/list.css +45 -0
- package/styles/pressable.css +13 -0
- package/styles/resize-handle.css +2 -0
- package/styles/tree-list.css +21 -0
- package/dist/ListItem-_lOmngHp.js +0 -202
- package/dist/edge-DFaE6rUg.js +0 -164
- package/dist/edgeRide-UdNxbwxY.js +0 -500
- package/dist/handle-CwxCHapJ.js +0 -22
- package/dist/landing-CSCE9afT.js +0 -105
- package/dist/linearEasing-BiRVC8Mq.js +0 -98
- package/dist/resizableChannel-LElsNkSY.js +0 -33
- package/dist/resolveMotion-B9NDPeUz.js +0 -508
- package/dist/{index-D8lv2BiD.d.ts → index-BqhgeAT4.d.ts} +1 -1
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { a as registerMotionTable } from "./roles-CPMsH5Ob.js";
|
|
2
|
+
//#region src/motion/springParameters.ts
|
|
3
|
+
/**
|
|
4
|
+
* @file springParameters.ts
|
|
5
|
+
* @output The `Spring` model and the conversions between Apple's spring
|
|
6
|
+
* vocabularies (duration and bounce, response and damping ratio, mass,
|
|
7
|
+
* stiffness and damping), and UIKit's relative velocity
|
|
8
|
+
* @position Pure math under spring.ts, which re-exports all of it. See
|
|
9
|
+
* spring.ts for the sources of each conversion.
|
|
10
|
+
*/
|
|
11
|
+
const TAU = 2 * Math.PI;
|
|
12
|
+
function assertPositiveFinite(name, value) {
|
|
13
|
+
if (!(Number.isFinite(value) && value > 0)) throw new RangeError(`spring: ${name} must be a positive number, got ${value}`);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* SwiftUI's `Spring(duration:bounce:)` and UIKit's
|
|
17
|
+
* `UIView.animate(springDuration:bounce:…)`: the WWDC23 equations. Bounce is
|
|
18
|
+
* clamped to SwiftUI's documented range (−1, 1].
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```
|
|
22
|
+
* springFromDurationBounce({duration: 0.5, bounce: 0}); // SwiftUI .smooth
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
function springFromDurationBounce({ duration, bounce }) {
|
|
26
|
+
assertPositiveFinite("duration", duration);
|
|
27
|
+
if (!Number.isFinite(bounce)) throw new RangeError(`spring: bounce must be finite, got ${bounce}`);
|
|
28
|
+
const b = Math.min(1, Math.max(-.999999, bounce));
|
|
29
|
+
return {
|
|
30
|
+
mass: 1,
|
|
31
|
+
stiffness: (TAU / duration) ** 2,
|
|
32
|
+
damping: b >= 0 ? (1 - b) * 2 * TAU / duration : 2 * TAU / (duration * (1 + b))
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* SwiftUI's `Spring(response:dampingRatio:)` and
|
|
37
|
+
* `Animation.spring(response:dampingFraction:)`. Overdamping (ratio > 1) is
|
|
38
|
+
* kept, as SwiftUI keeps it for this initializer.
|
|
39
|
+
*/
|
|
40
|
+
function springFromResponse({ response, dampingRatio }) {
|
|
41
|
+
assertPositiveFinite("response", response);
|
|
42
|
+
if (!(Number.isFinite(dampingRatio) && dampingRatio >= 0)) throw new RangeError(`spring: dampingRatio must be ≥ 0, got ${dampingRatio}`);
|
|
43
|
+
const omega = TAU / response;
|
|
44
|
+
return {
|
|
45
|
+
mass: 1,
|
|
46
|
+
stiffness: omega * omega,
|
|
47
|
+
damping: 2 * dampingRatio * omega
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* `CASpringAnimation` / `UISpringTimingParameters(mass:stiffness:damping:)`
|
|
52
|
+
* / SwiftUI `Spring(mass:stiffness:damping:allowOverDamping:)`. Like SwiftUI,
|
|
53
|
+
* an overdamped spring is treated as critically damped unless
|
|
54
|
+
* `allowOverdamping` is set: "a value of false specifies that such cases
|
|
55
|
+
* should instead be treated as critically damped".
|
|
56
|
+
*/
|
|
57
|
+
function springFromPhysics({ mass = 1, stiffness, damping, allowOverdamping = false }) {
|
|
58
|
+
assertPositiveFinite("mass", mass);
|
|
59
|
+
assertPositiveFinite("stiffness", stiffness);
|
|
60
|
+
if (!(Number.isFinite(damping) && damping >= 0)) throw new RangeError(`spring: damping must be ≥ 0, got ${damping}`);
|
|
61
|
+
const critical = 2 * Math.sqrt(stiffness * mass);
|
|
62
|
+
return {
|
|
63
|
+
mass,
|
|
64
|
+
stiffness,
|
|
65
|
+
damping: allowOverdamping ? damping : Math.min(damping, critical)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Undamped angular frequency ω₀ = √(k/m), rad/s. */
|
|
69
|
+
function naturalFrequency(spring) {
|
|
70
|
+
return Math.sqrt(spring.stiffness / spring.mass);
|
|
71
|
+
}
|
|
72
|
+
/** Damping ratio ζ = c / (2·√(k·m)). */
|
|
73
|
+
function dampingRatioOf(spring) {
|
|
74
|
+
return spring.damping / (2 * Math.sqrt(spring.stiffness * spring.mass));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Normalizes a description to the physical `Spring`. A physical description
|
|
78
|
+
* gets `springFromPhysics`' treatment: overdamping is clamped to critical, as
|
|
79
|
+
* SwiftUI and Core Animation do by default.
|
|
80
|
+
*/
|
|
81
|
+
function toSpring(description) {
|
|
82
|
+
if ("stiffness" in description) return springFromPhysics(description);
|
|
83
|
+
if ("bounce" in description) return springFromDurationBounce(description);
|
|
84
|
+
return springFromResponse(description);
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/motion/spring.ts
|
|
88
|
+
/**
|
|
89
|
+
* Closed-form solution of the spring released at `from` with
|
|
90
|
+
* `initialVelocity` (units/s), heading for `to`.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```
|
|
94
|
+
* const curve = solveSpring(springFromDurationBounce({duration: 0.5, bounce: 0}), {from: 0, to: 300});
|
|
95
|
+
* curve.value(0.1); // px after 100 ms
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
function solveSpring(spring, { from, to, velocity: initialVelocity = 0 }) {
|
|
99
|
+
const omega0 = naturalFrequency(spring);
|
|
100
|
+
const zeta = dampingRatioOf(spring);
|
|
101
|
+
const x0 = from - to;
|
|
102
|
+
const v0 = initialVelocity;
|
|
103
|
+
let displacement;
|
|
104
|
+
let speed;
|
|
105
|
+
let envelope;
|
|
106
|
+
let envelopePeak = 0;
|
|
107
|
+
if (zeta < .999999) {
|
|
108
|
+
const decay = zeta * omega0;
|
|
109
|
+
const omegaD = omega0 * Math.sqrt(1 - zeta * zeta);
|
|
110
|
+
const a = x0;
|
|
111
|
+
const b = (v0 + decay * x0) / omegaD;
|
|
112
|
+
const bv = (decay * v0 + omega0 * omega0 * x0) / omegaD;
|
|
113
|
+
displacement = (t) => Math.exp(-decay * t) * (a * Math.cos(omegaD * t) + b * Math.sin(omegaD * t));
|
|
114
|
+
speed = (t) => Math.exp(-decay * t) * (v0 * Math.cos(omegaD * t) - bv * Math.sin(omegaD * t));
|
|
115
|
+
const amplitude = Math.abs(a) + Math.abs(b);
|
|
116
|
+
envelope = (t) => amplitude * Math.exp(-decay * t);
|
|
117
|
+
} else if (zeta <= 1.000001) {
|
|
118
|
+
const b = v0 + omega0 * x0;
|
|
119
|
+
displacement = (t) => (x0 + b * t) * Math.exp(-omega0 * t);
|
|
120
|
+
speed = (t) => (v0 - omega0 * b * t) * Math.exp(-omega0 * t);
|
|
121
|
+
const absA = Math.abs(x0);
|
|
122
|
+
const absB = Math.abs(b);
|
|
123
|
+
envelope = (t) => (absA + absB * t) * Math.exp(-omega0 * t);
|
|
124
|
+
envelopePeak = absB > 0 ? Math.max(0, 1 / omega0 - absA / absB) : 0;
|
|
125
|
+
} else {
|
|
126
|
+
const root = omega0 * Math.sqrt(zeta * zeta - 1);
|
|
127
|
+
const r1 = -zeta * omega0 + root;
|
|
128
|
+
const r2 = -zeta * omega0 - root;
|
|
129
|
+
const c1 = (v0 - r2 * x0) / (r1 - r2);
|
|
130
|
+
const c2 = x0 - c1;
|
|
131
|
+
displacement = (t) => c1 * Math.exp(r1 * t) + c2 * Math.exp(r2 * t);
|
|
132
|
+
speed = (t) => r1 * c1 * Math.exp(r1 * t) + r2 * c2 * Math.exp(r2 * t);
|
|
133
|
+
const absC1 = Math.abs(c1);
|
|
134
|
+
const absC2 = Math.abs(c2);
|
|
135
|
+
envelope = (t) => absC1 * Math.exp(r1 * t) + absC2 * Math.exp(r2 * t);
|
|
136
|
+
}
|
|
137
|
+
const settleTime = (threshold) => {
|
|
138
|
+
if (!(threshold > 0)) return Infinity;
|
|
139
|
+
if (zeta === 0) return x0 === 0 && v0 === 0 ? 0 : Infinity;
|
|
140
|
+
const start = envelopePeak;
|
|
141
|
+
if (envelope(start) <= threshold) return 0;
|
|
142
|
+
if (zeta < .999999) {
|
|
143
|
+
const amplitude = envelope(0);
|
|
144
|
+
return Math.log(amplitude / threshold) / (zeta * omega0);
|
|
145
|
+
}
|
|
146
|
+
let lo = start;
|
|
147
|
+
let hi = Math.max(start, 1 / omega0);
|
|
148
|
+
while (envelope(hi) > threshold) {
|
|
149
|
+
lo = hi;
|
|
150
|
+
hi *= 2;
|
|
151
|
+
if (hi > 1e6) return Infinity;
|
|
152
|
+
}
|
|
153
|
+
for (let i = 0; i < 100 && hi - lo > 1e-12; i++) {
|
|
154
|
+
const mid = (lo + hi) / 2;
|
|
155
|
+
if (envelope(mid) > threshold) lo = mid;
|
|
156
|
+
else hi = mid;
|
|
157
|
+
}
|
|
158
|
+
return hi;
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
spring,
|
|
162
|
+
from,
|
|
163
|
+
to,
|
|
164
|
+
initialVelocity,
|
|
165
|
+
value: (t) => to + displacement(t),
|
|
166
|
+
velocity: (t) => speed(t),
|
|
167
|
+
settleTime
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/** Core Animation's settling epsilon (documented for SwiftUI's Spring). */
|
|
171
|
+
const SETTLING_EPSILON = .001;
|
|
172
|
+
/**
|
|
173
|
+
* `CASpringAnimation.settlingDuration` / SwiftUI `Spring.settlingDuration`:
|
|
174
|
+
* seconds until a unit move (target 1) stays within `epsilon` of its target.
|
|
175
|
+
* `initialVelocity` is UIKit's relative velocity (distance fractions per
|
|
176
|
+
* second, positive toward the target), 0 by default as in SwiftUI.
|
|
177
|
+
*/
|
|
178
|
+
function settlingDuration(spring, { initialVelocity = 0, epsilon = SETTLING_EPSILON } = {}) {
|
|
179
|
+
return solveSpring(spring, {
|
|
180
|
+
from: 0,
|
|
181
|
+
to: 1,
|
|
182
|
+
velocity: initialVelocity
|
|
183
|
+
}).settleTime(epsilon);
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/motion/uikit/timing.ts
|
|
187
|
+
/**
|
|
188
|
+
* @file timing.ts
|
|
189
|
+
* @input Nothing; data only
|
|
190
|
+
* @output Exports `timing`: the non-spring clocks and curves UIKit uses
|
|
191
|
+
* (press highlight onset, flash and fade, Core Animation's named Bézier
|
|
192
|
+
* curves, the navigation bar hide/show duration, the keyboard
|
|
193
|
+
* notification duration, the Reduced Motion cross-fade)
|
|
194
|
+
* @position The timing domain of the UIKit constants table (motion/uikit)
|
|
195
|
+
*
|
|
196
|
+
* Every leaf carries one or more `@source` (apple-docs | wwdc | webkit |
|
|
197
|
+
* measured | GUESS); webkit and GUESS values also carry the `@measure` task
|
|
198
|
+
* that will confirm or replace them (MEASUREMENTS.md). uikit.test.ts
|
|
199
|
+
* enforces both.
|
|
200
|
+
*
|
|
201
|
+
* Durations are in ms (the unit of pointer-event timestamps, which these
|
|
202
|
+
* clocks are compared against); curves are cubic-bézier control points
|
|
203
|
+
* [x1, y1, x2, y2].
|
|
204
|
+
*/
|
|
205
|
+
/**
|
|
206
|
+
* The Reduce Motion fade, its own export so the animator reads it without
|
|
207
|
+
* the rest of the table (`architecture:component-style-authoring` INV6).
|
|
208
|
+
* `timing` composes it under its table paths, `reducedMotionCrossFadeMs` and
|
|
209
|
+
* `curves.move`, so their roles are unchanged.
|
|
210
|
+
*/
|
|
211
|
+
const reducedMotionCrossFade = {
|
|
212
|
+
/**
|
|
213
|
+
* The Reduced Motion cross-fade, in ms, on `curves.move`: under
|
|
214
|
+
* Reduce Motion an entrance, exit, presentation switch or state change
|
|
215
|
+
* becomes an opacity-only cross-fade of this length on a coarse pointer
|
|
216
|
+
* (design:reduced-motion DR2 caps it at 200 ms, by owner decision DEC-1
|
|
217
|
+
* of 2026-10-24, departing from UIKit's own navigation cross-fade,
|
|
218
|
+
* measured below at 0.5 s). Not a role: nothing lengthens it (DR4).
|
|
219
|
+
* @source apple-docs https://developer.apple.com/documentation/uikit/uiaccessibility/preferscrossfadetransitions
|
|
220
|
+
* (the setting)
|
|
221
|
+
* @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
|
|
222
|
+
* iPhone 17 Pro, CAAnimation dump with Reduce Motion and Prefer
|
|
223
|
+
* Cross-Fade Transitions on (opacity CABasicAnimation 0.5 s,
|
|
224
|
+
* (0.42, 0, 0.58, 1)), Oct 23 2026
|
|
225
|
+
*/
|
|
226
|
+
durationMs: 200,
|
|
227
|
+
/**
|
|
228
|
+
* `easeInEaseOut`; UIKit's default curve (`UIView.AnimationCurve
|
|
229
|
+
* .easeInOut`, "the default curve for most animations").
|
|
230
|
+
* @source apple-docs https://developer.apple.com/documentation/quartzcore/camediatimingfunctionname/easeineaseout
|
|
231
|
+
* @source measured: UIKit lab (injected host app), iOS 26.2 simulator,
|
|
232
|
+
* iPhone 17 Pro, CAMediaTimingFunction read from UIView.animate,
|
|
233
|
+
* Oct 23 2026
|
|
234
|
+
*/
|
|
235
|
+
curve: [
|
|
236
|
+
.42,
|
|
237
|
+
0,
|
|
238
|
+
.58,
|
|
239
|
+
1
|
|
240
|
+
]
|
|
241
|
+
};
|
|
242
|
+
const { durationMs: reducedMotionCrossFadeMs, curve: move } = reducedMotionCrossFade;
|
|
243
|
+
const reducedMotionCrossFadeRoles = { curves: { move } };
|
|
244
|
+
/**
|
|
245
|
+
* Registers only the Reduce Motion fade's curve as its role,
|
|
246
|
+
* `timing.curves.move`, for code that reads the fade without the rest of the
|
|
247
|
+
* table (the animator, reducedMotionFade()). The fade's length is not a role.
|
|
248
|
+
*/
|
|
249
|
+
function registerReducedMotionCrossFade() {
|
|
250
|
+
registerMotionTable("timing", reducedMotionCrossFadeRoles, { roles: ["curves.move"] });
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region src/motion/linearEasing.ts
|
|
254
|
+
/**
|
|
255
|
+
* @file linearEasing.ts
|
|
256
|
+
* @input A duration and the fraction of a move done at each time
|
|
257
|
+
* @output Exports `linearEasing`, that curve as CSS `linear()` easing text,
|
|
258
|
+
* and `sampleCount`, how many samples cover a duration at 60 per second
|
|
259
|
+
* @position Pure math under the motion helpers; no DOM, no React
|
|
260
|
+
*/
|
|
261
|
+
/** Samples per second of a sampled curve: one per frame at 60 Hz. */
|
|
262
|
+
const SAMPLES_PER_SECOND = 60;
|
|
263
|
+
/** How many samples cover `durationMs`, both ends included: at least 2. */
|
|
264
|
+
function sampleCount(durationMs) {
|
|
265
|
+
return Math.max(2, Math.ceil(durationMs / 1e3 * SAMPLES_PER_SECOND) + 1);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* The curve `done` traces over `durationMs` as CSS `linear()` easing text,
|
|
269
|
+
* one stop per frame. `done(t)` is the fraction of the move done `t` ms in.
|
|
270
|
+
* A CSS transition with this easing and duration follows the curve.
|
|
271
|
+
*/
|
|
272
|
+
function linearEasing(durationMs, done) {
|
|
273
|
+
const count = sampleCount(durationMs);
|
|
274
|
+
const stops = [];
|
|
275
|
+
for (let i = 0; i < count; i++) {
|
|
276
|
+
const value = done(i / (count - 1) * durationMs);
|
|
277
|
+
stops.push(String(Math.round(value * 1e4) / 1e4));
|
|
278
|
+
}
|
|
279
|
+
return `linear(${stops.join(", ")})`;
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { settlingDuration as a, registerReducedMotionCrossFade as i, sampleCount as n, solveSpring as o, reducedMotionCrossFade as r, toSpring as s, linearEasing as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { f as isDocument, h as isNode, l as parentAcrossShadow, p as isElement } from "./sharedRealm-H1OrlP0V.js";
|
|
2
2
|
import { i as subscribeInput } from "./inputStream-bPd9eB2b.js";
|
|
3
|
-
import {
|
|
3
|
+
import { r as UIKIT_PRESS } from "./gestures-C8VhWve7.js";
|
|
4
|
+
import { a as idlePressGesture, n as PRESS_ONSET_MS, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS, t as PRESS_FLASH_MS } from "./pressGesture-BV4fYPIG.js";
|
|
4
5
|
import { n as hasInteractiveAncestor } from "./useClickableContainer-Dtjg-nkm.js";
|
|
5
6
|
//#region src/utils/inputAge.ts
|
|
6
7
|
/**
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { r as UIKIT_PRESS } from "./gestures-C8VhWve7.js";
|
|
2
|
+
//#region src/composables/internal/pressGesture.ts
|
|
3
|
+
/**
|
|
4
|
+
* 触屏按压模型的纯状态机:输入「刚发生了什么」,输出「现在该画什么」。
|
|
5
|
+
*
|
|
6
|
+
* 系统原生控件(UIKit)对手指的处理:滚动视图外,手指落下的那一帧就亮;
|
|
7
|
+
* 滚动视图里按下先等 0.15 秒才认,因为这次触摸可能变成滚动。滚动一接管手势就立刻取消,
|
|
8
|
+
* 这次手势里不再亮回来;抬手后淡出。iOS Safari 的 CSS `:active` 一样都不做:
|
|
9
|
+
* 手指一碰就亮,滚动开始 1.6 秒后还亮着。所以粗指针下的按压状态由这里管,
|
|
10
|
+
* `:active` 只留给鼠标。
|
|
11
|
+
*
|
|
12
|
+
* 这里不碰 DOM、不碰时钟,测试直接喂事件就能把整套规则跑一遍。
|
|
13
|
+
* DOM 那一半在 `pressFeedback.ts`。
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* 滚动视图里,手指停多久才算真按。UIKit 的 `delaysContentTouches` 就是 0.15 秒。
|
|
17
|
+
* 快速划一下在这之前就被滚动接管了,所以什么都不亮。从触摸本身的时间戳算起。
|
|
18
|
+
*/
|
|
19
|
+
const PRESS_ONSET_MS = UIKIT_PRESS.contentTouchDelay.value;
|
|
20
|
+
/** 手指最多能挪多远还算按压,单位 CSS 像素。iOS 的滚动大约在这个距离接管手势。 */
|
|
21
|
+
const PRESS_SLOP_PX = UIKIT_PRESS.slop.value;
|
|
22
|
+
/** 太快的轻点:抬手时补亮,满强度保持这么久再淡出。不然最常见的操作一点反馈都没有。 */
|
|
23
|
+
const PRESS_FLASH_MS = UIKIT_PRESS.quickTapFlash.value;
|
|
24
|
+
/** 滚动刚停不久就落下的手指是在「刹车」,不是按压。这个窗口内不亮。 */
|
|
25
|
+
const PRESS_SCROLL_BRAKE_MS = UIKIT_PRESS.scrollBrake.value;
|
|
26
|
+
const IDLE = {
|
|
27
|
+
originX: 0,
|
|
28
|
+
originY: 0,
|
|
29
|
+
phase: "idle"
|
|
30
|
+
};
|
|
31
|
+
function travelled(gesture, x, y) {
|
|
32
|
+
return Math.hypot(x - gesture.originX, y - gesture.originY) > PRESS_SLOP_PX;
|
|
33
|
+
}
|
|
34
|
+
function to(gesture, phase, paint, timer) {
|
|
35
|
+
return {
|
|
36
|
+
gesture: {
|
|
37
|
+
...gesture,
|
|
38
|
+
phase
|
|
39
|
+
},
|
|
40
|
+
paint,
|
|
41
|
+
timer
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function stay(gesture, paint) {
|
|
45
|
+
return {
|
|
46
|
+
gesture,
|
|
47
|
+
paint,
|
|
48
|
+
timer: null
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function stepArmed(gesture, event) {
|
|
52
|
+
switch (event.kind) {
|
|
53
|
+
case "move": return travelled(gesture, event.x, event.y) ? to(gesture, "dead", "none", null) : stay(gesture, "none");
|
|
54
|
+
case "cancel": return to(gesture, "dead", "none", null);
|
|
55
|
+
case "onset": return to(gesture, "pressed", "on", null);
|
|
56
|
+
case "up": return to(gesture, "flash", "on", "flash");
|
|
57
|
+
default: return stay(gesture, "none");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function stepPressed(gesture, event) {
|
|
61
|
+
if (event.kind === "move" && !travelled(gesture, event.x, event.y)) return stay(gesture, "on");
|
|
62
|
+
if (event.kind === "move" || event.kind === "cancel") return to(gesture, "dead", "none", null);
|
|
63
|
+
if (event.kind === "up") return to(gesture, "fading", "fading", "fade");
|
|
64
|
+
return stay(gesture, "on");
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 一个事件,一个答案。
|
|
68
|
+
*/
|
|
69
|
+
function pressGestureStep(gesture, event) {
|
|
70
|
+
if (event.kind === "down") {
|
|
71
|
+
if (event.delayed === false) return {
|
|
72
|
+
gesture: {
|
|
73
|
+
originX: event.x,
|
|
74
|
+
originY: event.y,
|
|
75
|
+
phase: "pressed"
|
|
76
|
+
},
|
|
77
|
+
paint: "on",
|
|
78
|
+
timer: null
|
|
79
|
+
};
|
|
80
|
+
return {
|
|
81
|
+
gesture: {
|
|
82
|
+
originX: event.x,
|
|
83
|
+
originY: event.y,
|
|
84
|
+
phase: "armed"
|
|
85
|
+
},
|
|
86
|
+
paint: "none",
|
|
87
|
+
timer: "onset"
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
switch (gesture.phase) {
|
|
91
|
+
case "armed": return stepArmed(gesture, event);
|
|
92
|
+
case "pressed": return stepPressed(gesture, event);
|
|
93
|
+
case "flash": return event.kind === "flashEnd" ? to(gesture, "fading", "fading", "fade") : stay(gesture, "on");
|
|
94
|
+
case "fading": return event.kind === "fadeEnd" ? stay(IDLE, "none") : stay(gesture, "fading");
|
|
95
|
+
case "dead": return event.kind === "up" ? stay(IDLE, "none") : stay(gesture, "none");
|
|
96
|
+
case "idle": return stay(IDLE, "none");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function idlePressGesture() {
|
|
100
|
+
return IDLE;
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
export { idlePressGesture as a, PRESS_SLOP_PX as i, PRESS_ONSET_MS as n, pressGestureStep as o, PRESS_SCROLL_BRAKE_MS as r, PRESS_FLASH_MS as t };
|