@astryx-vue/core 0.32.0 → 0.32.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.
- 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-mWlY4pE3.js} +4 -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.js +2 -2
- package/dist/{Breadcrumbs-CnvaPn8M.js → Breadcrumbs-D05OmNfd.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-DJrx97cA.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-Cf5zttC-.js} +2 -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 +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DfoShDVW.js → ContextMenu-CLCgJG0C.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/Divider/index.d.ts +1 -1
- 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.js +2 -2
- package/dist/{DropdownMenu-BaRXEFLa.js → DropdownMenu-BWgt12MZ.js} +8 -8
- 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.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BXTbW_px.js → Heading-jYno4L3t.js} +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-C9Cs0Jqr.js} +1 -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-tU7e1J1I.js} +1 -1
- package/dist/{LayoutPanel-BPboQAJj.js → LayoutPanel-D8t8F-sl.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 +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-_lOmngHp.js → ListItem-DOFfdRA_.js} +2 -2
- 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/MetadataList/index.d.ts +1 -1
- 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-COSDjYyl.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/Overlay/index.d.ts +1 -1
- 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-CDwASKYp.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-CcS-NP4r.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-DnoR_4ml.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.d.ts +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-CoWGEhzQ.js} +11 -13
- package/dist/Text/index.d.ts +1 -1
- 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.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.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.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CsgXzBdm.js → TreeList-CqJ3xfhB.js} +3 -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-CINO01Ek.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 +2 -2
- package/dist/composables/index.js +12 -12
- package/dist/{composables-kHI1dSq2.js → composables-B7FrCjk6.js} +11 -7
- package/dist/{context-ZWA02GaM.js → context-C_rX8KGX.js} +1 -2
- package/dist/cssValues-Cr6PhYTx.js +223 -0
- package/dist/{pressGesture-BzIBmKF2.js → gestures-C8VhWve7.js} +2 -296
- package/dist/{index-CQi9WGWE.d.ts → index-AgTJRqUY.d.ts} +2 -2
- package/dist/{index-Bxus0zuz.d.ts → index-B-Z4GL8g.d.ts} +11 -11
- package/dist/{index-CHLZPpjQ.d.ts → index-B44fLswd.d.ts} +1 -1
- 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-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/{index-etx25Eq-.d.ts → index-Bwh8O-v8.d.ts} +1 -1
- package/dist/{index-Cm36VS1A.d.ts → index-C3JmGujU.d.ts} +3 -3
- package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-CiVrhGUJ.d.ts → index-C9ZssPUV.d.ts} +1 -1
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-JE1HrzdJ.d.ts → index-CUuUoX3h.d.ts} +3 -3
- package/dist/{index-FeZXsFO-.d.ts → index-CbA8rR_b.d.ts} +2 -2
- package/dist/{index-BpFzfJbo.d.ts → index-CdvmnNMH.d.ts} +2 -2
- package/dist/{index-Bzi3A980.d.ts → index-ChqMaV6N.d.ts} +1 -1
- package/dist/{index-BIiG1CF_.d.ts → index-CilCxEvD.d.ts} +4 -4
- package/dist/{index-BgT6mH3U.d.ts → index-D7ShT2c-.d.ts} +1 -1
- package/dist/{index-DIw5D3zj.d.ts → index-D8l_CmL-.d.ts} +2 -2
- 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-B83v2qNb.d.ts → index-DIkdln91.d.ts} +3 -3
- package/dist/{index-CdRxeyhB.d.ts → index-DLE-sASO.d.ts} +1 -1
- package/dist/{index-CO9GW-ik.d.ts → index-DPklTi3o.d.ts} +1 -1
- package/dist/{index-Cj-Ob5jw.d.ts → index-DoYrlaEI.d.ts} +10 -10
- package/dist/{index-DGe-ApvN.d.ts → index-In41wHf3.d.ts} +4 -4
- package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
- package/dist/{index-ILJ7sKx3.d.ts → index-QC9FDUDA.d.ts} +4 -4
- package/dist/{index-4m5X7IYX.d.ts → index-Rz4jwv4Q.d.ts} +96 -96
- package/dist/{index-DogWVRJi.d.ts → index-ZXrvTM3A.d.ts} +2 -2
- package/dist/{index-DAEgHJTK.d.ts → index-aHC2C89h.d.ts} +4 -4
- package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
- package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
- package/dist/{index-ql9ApSTF.d.ts → index-yQc-te9a.d.ts} +2 -2
- package/dist/index.d.ts +36 -36
- package/dist/index.js +103 -103
- package/dist/{batch-DPlrpYU6.js → landing-DrnLUanQ.js} +812 -4
- 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/resizableChannel-BeoqCSou.js +387 -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/{useActionGroupTracking-CLFF7FI2.js → useActionGroupTracking-iv0p__dY.js} +3 -3
- package/dist/{useAnimatedLayout-DWWc31RR.js → useAnimatedLayout-B_mZd526.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-BIaZZDJ2.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/resize-handle.css +2 -0
- 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
|
@@ -1,508 +0,0 @@
|
|
|
1
|
-
import { b as isSpring, h as motionRoleOf, m as motionRoleIn } from "./pressGesture-BzIBmKF2.js";
|
|
2
|
-
import { t as linearEasing } from "./linearEasing-BiRVC8Mq.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
|
|
172
|
-
//#region src/motion/engine/constants.ts
|
|
173
|
-
const PROPERTIES = [
|
|
174
|
-
"x",
|
|
175
|
-
"y",
|
|
176
|
-
"rotate",
|
|
177
|
-
"scaleX",
|
|
178
|
-
"scaleY",
|
|
179
|
-
"opacity"
|
|
180
|
-
];
|
|
181
|
-
/** The axes momentum moves: `decay` takes only these (DR2, DEC-2). */
|
|
182
|
-
const DECAY_PROPERTIES = ["x", "y"];
|
|
183
|
-
const IDENTITY = {
|
|
184
|
-
x: 0,
|
|
185
|
-
y: 0,
|
|
186
|
-
rotate: 0,
|
|
187
|
-
scaleX: 1,
|
|
188
|
-
scaleY: 1,
|
|
189
|
-
opacity: 1
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* Keyframes are added until linear interpolation is within this: a quarter of
|
|
193
|
-
* a device pixel (this quarter of a CSS pixel, divided by the device pixel
|
|
194
|
-
* ratio where it is above 1), a twentieth of a degree, a 2000th of the size,
|
|
195
|
-
* about one step of an 8-bit alpha. Every one is below what a moving element
|
|
196
|
-
* can show.
|
|
197
|
-
*/
|
|
198
|
-
const SAMPLE_TOLERANCE = {
|
|
199
|
-
x: .25,
|
|
200
|
-
y: .25,
|
|
201
|
-
rotate: .05,
|
|
202
|
-
scaleX: 5e-4,
|
|
203
|
-
scaleY: 5e-4,
|
|
204
|
-
opacity: .004
|
|
205
|
-
};
|
|
206
|
-
/** Keyframes start on this grid (ms) and are split where the curve needs it. */
|
|
207
|
-
const SAMPLE_GRID_MS = 1e3 / 30;
|
|
208
|
-
/** A curve that has not settled by then (an undamped spring) snaps. */
|
|
209
|
-
const MAX_DURATION_MS = 3e4;
|
|
210
|
-
/**
|
|
211
|
-
* How close a spring's target and a value must be to count as the same, in
|
|
212
|
-
* the property's own units. Only float rounding separates two ways of
|
|
213
|
-
* computing one value, far below anything the screen shows.
|
|
214
|
-
*/
|
|
215
|
-
const SAME_VALUE = 1e-6;
|
|
216
|
-
/** Above this many keyframes the tolerance is relaxed. */
|
|
217
|
-
const MAX_KEYFRAMES = 1200;
|
|
218
|
-
/**
|
|
219
|
-
* The keyframes hold the end state this long after a curve ends. An engine
|
|
220
|
-
* whose compositor ends an animation while the main thread is blocked falls
|
|
221
|
-
* back to the value its main thread last committed, the curve's start
|
|
222
|
-
* (WebKit on Linux); the hold keeps the end state on screen through any such
|
|
223
|
-
* block. It only stretches the last keyframe. The main thread retires the
|
|
224
|
-
* animation as soon as it runs after the curve's end.
|
|
225
|
-
*
|
|
226
|
-
* Why a tail inside the curve's own animation, with a bound (measured Oct 24
|
|
227
|
-
* 2026; do not replace it without these proofs):
|
|
228
|
-
* - WebKit on Linux (WebKitGTK and WPE) ignores `fill` on its compositor:
|
|
229
|
-
* a 400 ms move that ends during a 1 s main-thread block snaps back to the
|
|
230
|
-
* block-start position 13 ms after its end, with `fill: forwards` or with
|
|
231
|
-
* no fill, and holds with this tail. iOS 26.2 Mobile Safari holds the end
|
|
232
|
-
* in all three forms, so there the tail is unneeded but harmless (measured
|
|
233
|
-
* Oct 25 2026). The browser proof "a spring that ends inside the block
|
|
234
|
-
* keeps showing its end state" catches it.
|
|
235
|
-
* - A separate static animation of the end state under the curve would hold
|
|
236
|
-
* it without a bound, but two animations on one property push Chromium to
|
|
237
|
-
* run the curve on the main thread: the 1 s block proof moved in 0 of 57
|
|
238
|
-
* frames, the start-before-a-block proof failed, and seeking the curve
|
|
239
|
-
* broke.
|
|
240
|
-
*/
|
|
241
|
-
const END_HOLD_MS = 6e4;
|
|
242
|
-
/**
|
|
243
|
-
* The soonest a running animation's end is looked for again, ms: a frame at
|
|
244
|
-
* 60 Hz. WebKit moves an animation's currentTime once per frame, so a look
|
|
245
|
-
* within a frame reads the frame's time, a fraction of a ms short of the end,
|
|
246
|
-
* and a timer for that fraction would fire again before anything moved.
|
|
247
|
-
*/
|
|
248
|
-
const END_RECHECK_MS = 1e3 / 60;
|
|
249
|
-
const CHANNELS = {
|
|
250
|
-
translate: ["x", "y"],
|
|
251
|
-
rotate: ["rotate"],
|
|
252
|
-
scale: ["scaleX", "scaleY"],
|
|
253
|
-
opacity: ["opacity"]
|
|
254
|
-
};
|
|
255
|
-
const CHANNEL_OF = {
|
|
256
|
-
x: "translate",
|
|
257
|
-
y: "translate",
|
|
258
|
-
rotate: "rotate",
|
|
259
|
-
scaleX: "scale",
|
|
260
|
-
scaleY: "scale",
|
|
261
|
-
opacity: "opacity"
|
|
262
|
-
};
|
|
263
|
-
/** What `inlineText` writes for each channel at identity. */
|
|
264
|
-
const IDENTITY_TEXT = {
|
|
265
|
-
translate: "none",
|
|
266
|
-
rotate: "none",
|
|
267
|
-
scale: "none",
|
|
268
|
-
opacity: "1"
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* The transition `decay` hands a Reduce Motion transition curve to: under
|
|
272
|
-
* Reduce Motion `animate` plays no spring (a cross-fade, or at once), so the
|
|
273
|
-
* spring itself is never solved.
|
|
274
|
-
*/
|
|
275
|
-
const REDUCED_TRANSITION = { spring: {
|
|
276
|
-
duration: .5,
|
|
277
|
-
bounce: 0
|
|
278
|
-
} };
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region src/motion/engine/cssValues.ts
|
|
281
|
-
function round(value, digits) {
|
|
282
|
-
return Number(value.toFixed(digits));
|
|
283
|
-
}
|
|
284
|
-
function format(channel, value) {
|
|
285
|
-
switch (channel) {
|
|
286
|
-
case "translate": return `${round(value("x"), 3)}px ${round(value("y"), 3)}px`;
|
|
287
|
-
case "rotate": return `${round(value("rotate"), 4)}deg`;
|
|
288
|
-
case "scale": return `${round(value("scaleX"), 5)} ${round(value("scaleY"), 5)}`;
|
|
289
|
-
case "opacity": return `${round(Math.min(1, Math.max(0, value("opacity"))), 4)}`;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Whether a computed value shows `expected` (`format`'s text). An unset or
|
|
294
|
-
* `none` value is the channel's identity. One value of a two-value channel
|
|
295
|
-
* stands for both (scale), or for x with y at 0 (translate).
|
|
296
|
-
*/
|
|
297
|
-
function sameShown(channel, shown, expected) {
|
|
298
|
-
const numbers = (text) => {
|
|
299
|
-
const list = ((text === "" || text === "none" ? IDENTITY_TEXT[channel] : text).match(/-?\d*\.?\d+(?:e-?\d+)?/g) ?? []).map(Number);
|
|
300
|
-
if (channel === "translate") return [list[0] ?? 0, list[1] ?? 0];
|
|
301
|
-
if (channel === "scale") return [list[0] ?? 1, list[1] ?? list[0] ?? 1];
|
|
302
|
-
return list.length > 0 ? list : [channel === "opacity" ? 1 : 0];
|
|
303
|
-
};
|
|
304
|
-
const a = numbers(shown);
|
|
305
|
-
const b = numbers(expected);
|
|
306
|
-
return a.length === b.length && a.every((value, i) => Math.abs(value - b[i]) < .001);
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* The inline text for a channel: `format`, except that an identity transform
|
|
310
|
-
* is written `none`. Any other value, `translate: 0px 0px` included, makes
|
|
311
|
-
* the element the containing block of its `position: fixed` descendants and
|
|
312
|
-
* a stacking context, so a motion back to identity would leave a fixed child
|
|
313
|
-
* moved with its parent; Mobile Safari also lets no finger scroll a list
|
|
314
|
-
* inside an element left at `scale: 1`. At rest the identity leaves the
|
|
315
|
-
* element entirely when its stylesheet agrees (`releaseIdentity`).
|
|
316
|
-
*/
|
|
317
|
-
function inlineText(channel, value) {
|
|
318
|
-
const at = (property, identity, digits) => round(value(property), digits) === identity;
|
|
319
|
-
switch (channel) {
|
|
320
|
-
case "translate": return at("x", 0, 3) && at("y", 0, 3) ? "none" : format(channel, value);
|
|
321
|
-
case "rotate": return at("rotate", 0, 4) ? "none" : format(channel, value);
|
|
322
|
-
case "scale": return at("scaleX", 1, 5) && at("scaleY", 1, 5) ? "none" : format(channel, value);
|
|
323
|
-
case "opacity": return format(channel, value);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
/** Whether a computed value (or an unset one) is the channel's identity. */
|
|
327
|
-
function isIdentityText(channel, text) {
|
|
328
|
-
const value = text.trim();
|
|
329
|
-
if (value === "" || value === "none") return true;
|
|
330
|
-
const numbers = value.split(/\s+/).map((part) => Number.parseFloat(part));
|
|
331
|
-
if (numbers.some((number) => !Number.isFinite(number))) return false;
|
|
332
|
-
const identity = channel === "scale" || channel === "opacity" ? 1 : 0;
|
|
333
|
-
return numbers.every((number) => Math.abs(number - identity) < 1e-6);
|
|
334
|
-
}
|
|
335
|
-
function expand(values) {
|
|
336
|
-
const out = {};
|
|
337
|
-
for (const [key, value] of Object.entries(values)) {
|
|
338
|
-
if (value == null || !Number.isFinite(value)) continue;
|
|
339
|
-
if (key === "scale") {
|
|
340
|
-
out.scaleX ??= value;
|
|
341
|
-
out.scaleY ??= value;
|
|
342
|
-
} else if (PROPERTIES.includes(key)) out[key] = value;
|
|
343
|
-
}
|
|
344
|
-
return out;
|
|
345
|
-
}
|
|
346
|
-
/** The time the motion clock reads (`performance.now()`'s time base). */
|
|
347
|
-
function motionNow() {
|
|
348
|
-
return typeof performance === "undefined" ? Date.now() : performance.now();
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Whether the user asked for reduced motion (`prefers-reduced-motion:
|
|
352
|
-
* reduce`), read at the moment of the call: the preference the animator uses
|
|
353
|
-
* by default for its Reduce Motion substitution. A component never reads it
|
|
354
|
-
* to pick a curve of its own: its motion settings do not override the
|
|
355
|
-
* policy (design:reduced-motion DR4); `animator.reducedMotion()` or
|
|
356
|
-
* `reducedMotionFade()` gives the policy's answer. False without a window
|
|
357
|
-
* (server rendering).
|
|
358
|
-
*/
|
|
359
|
-
function defaultPrefersReducedMotion() {
|
|
360
|
-
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
361
|
-
}
|
|
362
|
-
/** Whether the primary pointer is coarse: `(pointer: coarse)`. */
|
|
363
|
-
function defaultIsCoarsePointer() {
|
|
364
|
-
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(pointer: coarse)").matches;
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Registers `name` as an inherited `<length>` (initially 0px) or `<number>`
|
|
368
|
-
* (initially 0) so keyframes interpolate it; an unregistered custom property
|
|
369
|
-
* animates in steps. A property the page already registered is left as it
|
|
370
|
-
* is.
|
|
371
|
-
*/
|
|
372
|
-
function registerCustomProperty(name, syntax) {
|
|
373
|
-
if (typeof CSS === "undefined" || typeof CSS.registerProperty !== "function") return;
|
|
374
|
-
try {
|
|
375
|
-
CSS.registerProperty({
|
|
376
|
-
name,
|
|
377
|
-
syntax,
|
|
378
|
-
inherits: true,
|
|
379
|
-
initialValue: syntax === "<length>" ? "0px" : "0"
|
|
380
|
-
});
|
|
381
|
-
} catch (error) {
|
|
382
|
-
if (!(error instanceof DOMException) || error.name !== "InvalidModificationError") throw error;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
function expandList(properties) {
|
|
386
|
-
const out = /* @__PURE__ */ new Set();
|
|
387
|
-
for (const property of properties) if (property === "scale") {
|
|
388
|
-
out.add("scaleX");
|
|
389
|
-
out.add("scaleY");
|
|
390
|
-
} else out.add(property);
|
|
391
|
-
return [...out];
|
|
392
|
-
}
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region src/motion/themeTempo.ts
|
|
395
|
-
/**
|
|
396
|
-
* @file themeTempo.ts
|
|
397
|
-
* @input An element on the page
|
|
398
|
-
* @output `themeTempo(element)`: the tempo of the theme the element is in
|
|
399
|
-
* @position Motion foundation; resolveMotion.ts scales a motion role by it,
|
|
400
|
-
* and the pager scales its settle by it, which no role names
|
|
401
|
-
*
|
|
402
|
-
* A theme that sets `tempo` writes it, clamped, to the private custom
|
|
403
|
-
* property `--_astryx-motion-tempo` beside its duration tokens. An
|
|
404
|
-
* adaptation rule writes it where its condition holds, and a nested theme
|
|
405
|
-
* that sets no tempo inherits it. A layer whose durations come from a
|
|
406
|
-
* duration scale writes a tempo of 1, so its springs keep its own pace. One
|
|
407
|
-
* read of a custom property forces no layout.
|
|
408
|
-
* Nothing here imports a theme module, runs on import or runs on the server.
|
|
409
|
-
*/
|
|
410
|
-
/** The property a theme that sets `tempo` writes (theme/themeMotion.ts). */
|
|
411
|
-
const TEMPO_PROPERTY = "--_astryx-motion-tempo";
|
|
412
|
-
/**
|
|
413
|
-
* The tempo motion on `element` plays at: the one its theme or an adaptation
|
|
414
|
-
* rule sets, else 1. Without an element in a document, or with a value that
|
|
415
|
-
* is not a positive number, it is 1.
|
|
416
|
-
*/
|
|
417
|
-
function themeTempo(element) {
|
|
418
|
-
const view = element?.ownerDocument?.defaultView;
|
|
419
|
-
if (element == null || view == null) return 1;
|
|
420
|
-
const text = view.getComputedStyle(element).getPropertyValue(TEMPO_PROPERTY).trim();
|
|
421
|
-
const tempo = text === "" ? NaN : Number(text);
|
|
422
|
-
return Number.isFinite(tempo) && tempo > 0 ? tempo : 1;
|
|
423
|
-
}
|
|
424
|
-
//#endregion
|
|
425
|
-
//#region src/motion/resolveMotion.ts
|
|
426
|
-
/**
|
|
427
|
-
* The roles the tempo leaves as measured: the parts that follow a finger,
|
|
428
|
-
* and ProgressBar's busy loop.
|
|
429
|
-
*/
|
|
430
|
-
const FIXED_ROLES = /* @__PURE__ */ new Set([
|
|
431
|
-
"springs.fingerTracking",
|
|
432
|
-
"switchControl.tracking",
|
|
433
|
-
"progress.reducedMotionPulseMs"
|
|
434
|
-
]);
|
|
435
|
-
/** Each role spring at each tempo, so a role resolves to one object per tempo. */
|
|
436
|
-
const springsAtTempo = /* @__PURE__ */ new WeakMap();
|
|
437
|
-
/**
|
|
438
|
-
* `spring` at `tempo`. In each of its forms, the undamped period grows by the
|
|
439
|
-
* tempo and the damping ratio stays. So the motion keeps its shape and takes
|
|
440
|
-
* `tempo` times as long.
|
|
441
|
-
*/
|
|
442
|
-
function springAtTempo(spring, tempo) {
|
|
443
|
-
let byTempo = springsAtTempo.get(spring);
|
|
444
|
-
if (byTempo == null) {
|
|
445
|
-
byTempo = /* @__PURE__ */ new Map();
|
|
446
|
-
springsAtTempo.set(spring, byTempo);
|
|
447
|
-
}
|
|
448
|
-
let scaled = byTempo.get(tempo);
|
|
449
|
-
if (scaled == null) {
|
|
450
|
-
if ("response" in spring) scaled = {
|
|
451
|
-
response: spring.response * tempo,
|
|
452
|
-
dampingRatio: spring.dampingRatio
|
|
453
|
-
};
|
|
454
|
-
else if ("duration" in spring) scaled = {
|
|
455
|
-
duration: spring.duration * tempo,
|
|
456
|
-
bounce: spring.bounce
|
|
457
|
-
};
|
|
458
|
-
else scaled = {
|
|
459
|
-
...spring.mass == null ? null : { mass: spring.mass },
|
|
460
|
-
stiffness: spring.stiffness / (tempo * tempo),
|
|
461
|
-
damping: spring.damping / tempo
|
|
462
|
-
};
|
|
463
|
-
byTempo.set(tempo, scaled);
|
|
464
|
-
}
|
|
465
|
-
return scaled;
|
|
466
|
-
}
|
|
467
|
-
function resolveMotion(element, leafOrGroup, key) {
|
|
468
|
-
const value = key === void 0 ? leafOrGroup : leafOrGroup[key];
|
|
469
|
-
const role = key === void 0 ? motionRoleOf(leafOrGroup) : motionRoleIn(leafOrGroup, key);
|
|
470
|
-
if (role == null || role.kind === "curve" || FIXED_ROLES.has(role.id)) return value;
|
|
471
|
-
const tempo = themeTempo(element);
|
|
472
|
-
if (tempo === 1) return value;
|
|
473
|
-
if (typeof value === "number") return value * tempo;
|
|
474
|
-
return isSpring(value) ? springAtTempo(value, tempo) : value;
|
|
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
|
-
}
|
|
507
|
-
//#endregion
|
|
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 };
|