@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,388 @@
|
|
|
1
|
+
import { a as sharedWeakMap } from "./sharedRealm-H1OrlP0V.js";
|
|
2
|
+
import { t as resolveMotion } from "./resolveMotion-BLdMNTpf.js";
|
|
3
|
+
import { n as springs } from "./springs-BR66JuIm.js";
|
|
4
|
+
import { C as safeAnimate, D as scaleOf, E as intersects, O as visibleRect, _ as layoutMotion, a as placeOf, b as springGlide, c as areaOf, d as extentOf, f as isRtl, g as glideNextChange, h as changeStartIn, i as nextInFlow, k as glideOf, l as createAnimatedLayout, m as pxClip, n as rideNeighbour, p as previousInFlow, t as reportLayoutChange, x as beginChange, y as sampleOver } from "./reportChange-BkOEttEP.js";
|
|
5
|
+
import { n as landLayoutGlide } from "./landing-Dx9vPF0t.js";
|
|
6
|
+
//#region src/motion/layout/edgeReport.ts
|
|
7
|
+
const resizeReveals = sharedWeakMap("motion/animated-layout/resize-reveals", 1);
|
|
8
|
+
/** The inline properties a size hold sets, by axis. */
|
|
9
|
+
const HOLD_PROPERTIES = {
|
|
10
|
+
inline: [
|
|
11
|
+
"inline-size",
|
|
12
|
+
"min-inline-size",
|
|
13
|
+
"max-inline-size",
|
|
14
|
+
"flex-basis",
|
|
15
|
+
"flex-grow",
|
|
16
|
+
"flex-shrink"
|
|
17
|
+
],
|
|
18
|
+
block: [
|
|
19
|
+
"block-size",
|
|
20
|
+
"min-block-size",
|
|
21
|
+
"max-block-size",
|
|
22
|
+
"flex-basis",
|
|
23
|
+
"flex-grow",
|
|
24
|
+
"flex-shrink"
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
function insideOf(element, axis) {
|
|
28
|
+
const style = getComputedStyle(element);
|
|
29
|
+
return {
|
|
30
|
+
gutters: [style.getPropertyValue(`padding-${axis}-start`), style.getPropertyValue(`padding-${axis}-end`)],
|
|
31
|
+
overflow: [style.getPropertyValue("overflow-x"), style.getPropertyValue("overflow-y")],
|
|
32
|
+
scroll: [element.scrollLeft, element.scrollTop]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function restoreScroll(element, inside) {
|
|
36
|
+
const [across, down] = inside.scroll;
|
|
37
|
+
if (element.scrollLeft !== across) element.scrollLeft = across;
|
|
38
|
+
if (element.scrollTop !== down) element.scrollTop = down;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Holds `element` at `extent` own px along `edge`'s axis while it conceals to
|
|
42
|
+
* `keep`, freeing the difference by the margin on that edge's side, so what
|
|
43
|
+
* lies beyond the edge stays where the new size puts it. Its padding,
|
|
44
|
+
* overflow and scroll offset stay as `inside` measured them, so nothing in it
|
|
45
|
+
* moves while it is clipped. Returns what puts back every value it set.
|
|
46
|
+
* When no margin frees it, as the content on that side did not stay put, it
|
|
47
|
+
* sets nothing and returns null.
|
|
48
|
+
*/
|
|
49
|
+
function holdExtent(element, area, edge, extent, keep, inside) {
|
|
50
|
+
const axis = edge.startsWith("inline") ? "inline" : "block";
|
|
51
|
+
const margin = `margin-${edge}`;
|
|
52
|
+
const insideProperties = [
|
|
53
|
+
[`padding-${axis}-start`, inside.gutters[0]],
|
|
54
|
+
[`padding-${axis}-end`, inside.gutters[1]],
|
|
55
|
+
["overflow-x", inside.overflow[0]],
|
|
56
|
+
["overflow-y", inside.overflow[1]]
|
|
57
|
+
];
|
|
58
|
+
const prior = [
|
|
59
|
+
...HOLD_PROPERTIES[axis],
|
|
60
|
+
margin,
|
|
61
|
+
...insideProperties.map(([property]) => property)
|
|
62
|
+
].map((property) => [
|
|
63
|
+
property,
|
|
64
|
+
element.style.getPropertyValue(property),
|
|
65
|
+
element.style.getPropertyPriority(property)
|
|
66
|
+
]);
|
|
67
|
+
const restore = () => {
|
|
68
|
+
for (const [property, value, priority] of prior) if (value === "") element.style.removeProperty(property);
|
|
69
|
+
else element.style.setProperty(property, value, priority);
|
|
70
|
+
};
|
|
71
|
+
const isEnd = edge.endsWith("end");
|
|
72
|
+
const rtl = axis === "inline" && isRtl(element);
|
|
73
|
+
const beyond = isEnd ? nextInFlow(element, area) : previousInFlow(element, area);
|
|
74
|
+
const before = beyond == null ? null : placeOf(beyond, rtl);
|
|
75
|
+
const size = `${extent}px`;
|
|
76
|
+
element.style.setProperty(`${axis}-size`, size, "important");
|
|
77
|
+
element.style.setProperty(`min-${axis}-size`, size, "important");
|
|
78
|
+
element.style.setProperty(`max-${axis}-size`, size, "important");
|
|
79
|
+
element.style.setProperty("flex-basis", "auto", "important");
|
|
80
|
+
element.style.setProperty("flex-grow", "0", "important");
|
|
81
|
+
element.style.setProperty("flex-shrink", "0", "important");
|
|
82
|
+
for (const [property, value] of insideProperties) if (value !== "") element.style.setProperty(property, value, "important");
|
|
83
|
+
element.style.setProperty(margin, `${keep - extent}px`, "important");
|
|
84
|
+
if (beyond != null && before != null) {
|
|
85
|
+
const landed = placeOf(beyond, rtl);
|
|
86
|
+
const scale = scaleOf(element, element.getBoundingClientRect());
|
|
87
|
+
const perPx = axis === "inline" ? scale.x : scale.y;
|
|
88
|
+
const sign = isEnd ? 1 : -1;
|
|
89
|
+
const drift = (landed[axis] - before[axis]) * sign;
|
|
90
|
+
if (Math.abs(drift) > .5) element.style.setProperty(margin, `${keep - extent - drift / perPx}px`, "important");
|
|
91
|
+
const settled = placeOf(beyond, rtl);
|
|
92
|
+
if (Math.abs(settled.block - before.block) > 1 || Math.abs(settled.inline - before.inline) > 1) {
|
|
93
|
+
restore();
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
restoreScroll(element, inside);
|
|
98
|
+
return restore;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Reports a resized element's edge reveal (`spec:AST-105` FR9) with no copy:
|
|
102
|
+
* a resize controller's pane collapsing or opening beside the content it
|
|
103
|
+
* shares a row with (`component:Resizable` FR8, `component:LayoutPanel`
|
|
104
|
+
* FR7). Measure before the change commits and animate after the
|
|
105
|
+
* new size is applied, as `reportLayoutChange` does; the content beside the
|
|
106
|
+
* element glides through that report. A larger extent reveals by `edge` from
|
|
107
|
+
* the extent the element showed. A smaller one conceals: the element is held
|
|
108
|
+
* at the extent it was laid out at, the difference freed by the margin on
|
|
109
|
+
* that edge's side so the content beyond it stays where the new size puts it,
|
|
110
|
+
* and clipped down to its new extent; the hold goes when the motion ends.
|
|
111
|
+
* Its padding, overflow and scroll offset stay as laid out while it is held,
|
|
112
|
+
* so nothing inside it jumps when the new size changes them. The
|
|
113
|
+
* moving edge rides the glide of the content on that side, frame by frame,
|
|
114
|
+
* and a change made while it runs starts from the extent it shows. It slides:
|
|
115
|
+
* nothing fades. Under Reduce Motion with a coarse primary pointer a reveal
|
|
116
|
+
* fades in and a conceal lands at once (`design:reduced-motion` DR2); with a
|
|
117
|
+
* fine one every change lands at once (DR3).
|
|
118
|
+
*/
|
|
119
|
+
function reportLayoutEdge(handle, getElement, { edge = "block-end" } = {}) {
|
|
120
|
+
const report = reportLayoutChange(handle, getElement);
|
|
121
|
+
/**
|
|
122
|
+
* What the element showed, its laid-out extent and its box, before the
|
|
123
|
+
* change.
|
|
124
|
+
*/
|
|
125
|
+
let measured = null;
|
|
126
|
+
const axis = edge.startsWith("inline") ? "inline" : "block";
|
|
127
|
+
const release = (element) => {
|
|
128
|
+
if (element == null) return;
|
|
129
|
+
resizeReveals.get(element)?.release();
|
|
130
|
+
};
|
|
131
|
+
return {
|
|
132
|
+
measureBefore() {
|
|
133
|
+
const element = getElement();
|
|
134
|
+
measured = null;
|
|
135
|
+
if (element != null) {
|
|
136
|
+
beginChange(element.ownerDocument);
|
|
137
|
+
const running = resizeReveals.get(element);
|
|
138
|
+
const elapsed = Number(running?.animation?.currentTime);
|
|
139
|
+
const rect = element.getBoundingClientRect();
|
|
140
|
+
const inside = insideOf(element, axis);
|
|
141
|
+
measured = running == null ? {
|
|
142
|
+
shown: extentOf(element, edge),
|
|
143
|
+
box: extentOf(element, edge),
|
|
144
|
+
rect,
|
|
145
|
+
inside
|
|
146
|
+
} : {
|
|
147
|
+
shown: running.shownAt(Number.isFinite(elapsed) ? Math.max(0, elapsed) : 0),
|
|
148
|
+
box: running.box,
|
|
149
|
+
rect,
|
|
150
|
+
inside
|
|
151
|
+
};
|
|
152
|
+
running?.release();
|
|
153
|
+
}
|
|
154
|
+
report.measureBefore();
|
|
155
|
+
},
|
|
156
|
+
animate() {
|
|
157
|
+
report.animate();
|
|
158
|
+
const element = getElement();
|
|
159
|
+
const before = measured;
|
|
160
|
+
measured = null;
|
|
161
|
+
if (handle == null || element == null || before == null) return;
|
|
162
|
+
restoreScroll(element, before.inside);
|
|
163
|
+
const area = areaOf(handle, element);
|
|
164
|
+
if (area == null) return;
|
|
165
|
+
const after = extentOf(element, edge);
|
|
166
|
+
if (Math.abs(after - before.shown) < .5) return;
|
|
167
|
+
const visible = visibleRect(area);
|
|
168
|
+
if (!intersects(element.getBoundingClientRect(), visible) && !intersects(before.rect, visible)) return;
|
|
169
|
+
const motion = layoutMotion(area);
|
|
170
|
+
if (motion.kind === "instant") return;
|
|
171
|
+
const isConceal = after < before.shown;
|
|
172
|
+
const change = changeStartIn(area, element.ownerDocument);
|
|
173
|
+
if (motion.kind === "fade") {
|
|
174
|
+
if (!isConceal) safeAnimate(element, [{ opacity: 0 }, { opacity: 1 }], {
|
|
175
|
+
duration: motion.durationMs,
|
|
176
|
+
easing: motion.easing
|
|
177
|
+
}, change);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const { progress } = motion;
|
|
181
|
+
const rtl = edge.startsWith("inline") && isRtl(element);
|
|
182
|
+
const box = isConceal ? Math.max(before.box, before.shown) : after;
|
|
183
|
+
const restore = isConceal ? holdExtent(element, area, edge, box, after, before.inside) : () => {};
|
|
184
|
+
if (restore == null) return;
|
|
185
|
+
const from = box - before.shown;
|
|
186
|
+
const to = box - after;
|
|
187
|
+
const curve = (t) => to + (from - to) * progress.remaining(t);
|
|
188
|
+
const animation = safeAnimate(element, sampleOver(progress.durationMs, (t) => ({ clipPath: pxClip(edge, curve(t), rtl) })), {
|
|
189
|
+
duration: progress.durationMs,
|
|
190
|
+
easing: "linear"
|
|
191
|
+
}, change);
|
|
192
|
+
const reveal = {
|
|
193
|
+
animation,
|
|
194
|
+
shownAt: (t) => box - curve(t),
|
|
195
|
+
box,
|
|
196
|
+
release: () => {
|
|
197
|
+
if (resizeReveals.get(element) !== reveal) return;
|
|
198
|
+
resizeReveals.delete(element);
|
|
199
|
+
animation?.cancel();
|
|
200
|
+
restore();
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
if (animation == null) {
|
|
204
|
+
restore();
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
resizeReveals.set(element, reveal);
|
|
208
|
+
animation.addEventListener?.("finish", reveal.release);
|
|
209
|
+
rideNeighbour(element, area, edge, rtl, animation, () => resizeReveals.get(element) === reveal, (towards) => Math.min(box, Math.max(0, isConceal ? to - towards : -towards)), (hidden) => ({ clipPath: pxClip(edge, hidden, rtl) }), (hiddenAt) => {
|
|
210
|
+
reveal.shownAt = (t) => box - hiddenAt(t);
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
cancel() {
|
|
214
|
+
measured = null;
|
|
215
|
+
release(getElement());
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/Resizable/resizablePane.ts
|
|
221
|
+
function createRegionPaneSlot(onPaneChange) {
|
|
222
|
+
let current = null;
|
|
223
|
+
let listener = null;
|
|
224
|
+
let isDragging = false;
|
|
225
|
+
return {
|
|
226
|
+
attach(pane) {
|
|
227
|
+
if (pane === current) return;
|
|
228
|
+
current = pane;
|
|
229
|
+
onPaneChange(pane);
|
|
230
|
+
},
|
|
231
|
+
pane: () => current,
|
|
232
|
+
listen(next) {
|
|
233
|
+
listener = next;
|
|
234
|
+
},
|
|
235
|
+
beforeChange(toCollapsed) {
|
|
236
|
+
listener?.beforeChange(toCollapsed);
|
|
237
|
+
},
|
|
238
|
+
committed() {
|
|
239
|
+
listener?.committed();
|
|
240
|
+
},
|
|
241
|
+
setPointerDragging(next) {
|
|
242
|
+
isDragging = next;
|
|
243
|
+
},
|
|
244
|
+
isPointerDragging: () => isDragging
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/** 和收起控制一样不放进导出的 `ResizableProps`:手写的对象没有区域,面板不滑动。 */
|
|
248
|
+
const propsRegions = sharedWeakMap("resizable/resizable-pane/props-regions", 1);
|
|
249
|
+
/** `useResizable` 给它返回的每个 props 对象登记所属区域。 */
|
|
250
|
+
function registerPropsRegion(props, slot) {
|
|
251
|
+
propsRegions.set(props, slot);
|
|
252
|
+
}
|
|
253
|
+
/** `useResizable` 自己的 props 所属的区域;手写对象返回 undefined。 */
|
|
254
|
+
function regionOfProps(props) {
|
|
255
|
+
return propsRegions.get(props);
|
|
256
|
+
}
|
|
257
|
+
/** 在面板所在的那一行上用区域自己的布局动效句柄播,不留副本。 */
|
|
258
|
+
function createPaneReveal(getRow) {
|
|
259
|
+
let pending = null;
|
|
260
|
+
let played = null;
|
|
261
|
+
const layout = createAnimatedLayout(getRow);
|
|
262
|
+
const land = () => {
|
|
263
|
+
pending?.report.cancel();
|
|
264
|
+
pending = null;
|
|
265
|
+
played?.cancel();
|
|
266
|
+
played = null;
|
|
267
|
+
for (const child of getRow()?.children ?? []) landLayoutGlide(child);
|
|
268
|
+
};
|
|
269
|
+
return {
|
|
270
|
+
measure(pane) {
|
|
271
|
+
pending?.report.cancel();
|
|
272
|
+
pending = null;
|
|
273
|
+
const element = pane.element;
|
|
274
|
+
const report = reportLayoutEdge(layout, () => element, { edge: pane.contentFacingEdge() });
|
|
275
|
+
report.measureBefore();
|
|
276
|
+
pending = {
|
|
277
|
+
report,
|
|
278
|
+
pane,
|
|
279
|
+
widthBefore: pane.renderedWidth()
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
committed(pane) {
|
|
283
|
+
if (pending == null || pending.pane !== pane || pane.renderedWidth() === pending.widthBefore) return;
|
|
284
|
+
const { report } = pending;
|
|
285
|
+
pending = null;
|
|
286
|
+
played = report;
|
|
287
|
+
report.animate();
|
|
288
|
+
},
|
|
289
|
+
land
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* `row` 里下一次滑动按主题节奏的 settle 弹簧走,而不是主题的曲线。
|
|
294
|
+
* 从松手速度 `velocity`(朝终点的 px/s)出发,走 `distance` px。
|
|
295
|
+
* 返回「按滑动开始后的毫秒数,还剩多少比例没走」;什么都不滑时返回 null。
|
|
296
|
+
*/
|
|
297
|
+
function slideNextOnRelease(row, velocity, distance) {
|
|
298
|
+
if (!(distance > 0)) return null;
|
|
299
|
+
const progress = springGlide(resolveMotion(row, springs.settle), velocity / distance);
|
|
300
|
+
glideNextChange(row, progress);
|
|
301
|
+
return (elapsedMs) => elapsedMs >= progress.durationMs ? 0 : progress.remaining(elapsedMs);
|
|
302
|
+
}
|
|
303
|
+
function edgeGeometry(pane) {
|
|
304
|
+
const element = pane.element;
|
|
305
|
+
const edge = pane.contentFacingEdge();
|
|
306
|
+
const isInline = edge.startsWith("inline");
|
|
307
|
+
const isRtl = isInline && element.ownerDocument.defaultView?.getComputedStyle(element).direction === "rtl";
|
|
308
|
+
return {
|
|
309
|
+
isInline,
|
|
310
|
+
isForward: isInline ? edge.endsWith("end") !== isRtl : edge.endsWith("end")
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* 从分隔条画出来的中线读面板的边此刻显示的尺寸,滑动也算在内。
|
|
315
|
+
* 在面板显示 `size` 时量一次。
|
|
316
|
+
*/
|
|
317
|
+
function shownSizeReader(pane, handle, size) {
|
|
318
|
+
if (handle == null) return null;
|
|
319
|
+
const { isInline, isForward } = edgeGeometry(pane);
|
|
320
|
+
const rect = pane.element.getBoundingClientRect();
|
|
321
|
+
const far = isInline ? isForward ? rect.left : rect.right : isForward ? rect.top : rect.bottom;
|
|
322
|
+
const sign = isForward ? 1 : -1;
|
|
323
|
+
const middle = () => {
|
|
324
|
+
const box = handle.getBoundingClientRect();
|
|
325
|
+
return isInline ? box.left + box.width / 2 : box.top + box.height / 2;
|
|
326
|
+
};
|
|
327
|
+
const offset = sign * (middle() - far) - size;
|
|
328
|
+
return () => Math.max(sign * (middle() - far) - offset, 0);
|
|
329
|
+
}
|
|
330
|
+
/** 脚本播的动效,不是 CSS 过渡或 CSS 动画。 */
|
|
331
|
+
function isScriptMotion(motion) {
|
|
332
|
+
return !("transitionProperty" in motion) && !("animationName" in motion);
|
|
333
|
+
}
|
|
334
|
+
/** 面板此刻滑动的那些动效:旁边在滑的内容,和同一时钟上它自己那条边的动效。滑完后为空。 */
|
|
335
|
+
function slideMotionsOf(pane) {
|
|
336
|
+
const element = pane.element;
|
|
337
|
+
const beside = [...element.parentElement?.children ?? []].filter((child) => child !== element).map(glideOf).filter((motion) => motion != null);
|
|
338
|
+
const durationOf = (motion) => Number(motion.effect?.getComputedTiming().duration ?? 0);
|
|
339
|
+
const durationMs = beside.length > 0 ? durationOf(beside[0]) : null;
|
|
340
|
+
return [...typeof element.getAnimations === "function" ? element.getAnimations().filter((motion) => isScriptMotion(motion) && (durationMs == null || Math.abs(durationOf(motion) - durationMs) < 1)) : [], ...beside];
|
|
341
|
+
}
|
|
342
|
+
function edgeAxis(pane) {
|
|
343
|
+
const { isInline, isForward } = edgeGeometry(pane);
|
|
344
|
+
return {
|
|
345
|
+
sign: isForward ? 1 : -1,
|
|
346
|
+
axis: isInline ? "x" : "y"
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/composables/internal/resizableChannel.ts
|
|
351
|
+
/**
|
|
352
|
+
* Enter 和双击要恢复折叠前的尺寸。这个能力不放进导出的 `ResizableProps`,
|
|
353
|
+
* 手写的 props 没有登记,手柄就退回「收到最小值」。
|
|
354
|
+
*/
|
|
355
|
+
const collapseControls = /* @__PURE__ */ new WeakMap();
|
|
356
|
+
/** 没有配置上限时,分隔条要报的那个最大值。手写 props 不在这张表里。 */
|
|
357
|
+
const effectiveMaxima = /* @__PURE__ */ new WeakMap();
|
|
358
|
+
function registerResizableChannel(props, controls, effectiveMax) {
|
|
359
|
+
collapseControls.set(props, controls);
|
|
360
|
+
if (effectiveMax != null && Number.isFinite(effectiveMax)) effectiveMaxima.set(props, effectiveMax);
|
|
361
|
+
}
|
|
362
|
+
function getCollapseControls(props) {
|
|
363
|
+
return collapseControls.get(props);
|
|
364
|
+
}
|
|
365
|
+
/** 带着松手速度结束 `props` 跟着的拖动;手写的 props 不带速度地结束。 */
|
|
366
|
+
function endResizeAt(props, velocity) {
|
|
367
|
+
const release = collapseControls.get(props)?.release;
|
|
368
|
+
if (release == null) props._onResizeEnd();
|
|
369
|
+
else release(velocity);
|
|
370
|
+
}
|
|
371
|
+
function getEffectiveMaxPx(props) {
|
|
372
|
+
return effectiveMaxima.get(props);
|
|
373
|
+
}
|
|
374
|
+
/** `resizable` 传的是 `useResizable()` 的返回值(带着 `props`)还是它的 `props`,统一取出 `props`。 */
|
|
375
|
+
function resizablePropsOf(value) {
|
|
376
|
+
return isResizableRegion(value) ? value.props : value;
|
|
377
|
+
}
|
|
378
|
+
function isResizableRegion(value) {
|
|
379
|
+
const region = value;
|
|
380
|
+
return typeof region.collapse === "function" && typeof region.expand === "function" && region.props?._isResizableProps === true;
|
|
381
|
+
}
|
|
382
|
+
/** 面板旁边紧挨着的那个分隔条:起始侧面板在它后面,结束侧面板在它前面。 */
|
|
383
|
+
function resizeHandleBeside(panel, area) {
|
|
384
|
+
const sibling = area === "end" ? panel.previousElementSibling : panel.nextElementSibling;
|
|
385
|
+
return sibling instanceof HTMLElement && sibling.getAttribute("role") === "separator" ? sibling : null;
|
|
386
|
+
}
|
|
387
|
+
//#endregion
|
|
388
|
+
export { resizablePropsOf as a, createRegionPaneSlot as c, regionOfProps as d, registerPropsRegion as f, slideNextOnRelease as h, registerResizableChannel as i, edgeAxis as l, slideMotionsOf as m, getCollapseControls as n, resizeHandleBeside as o, shownSizeReader as p, getEffectiveMaxPx as r, createPaneReveal as s, endResizeAt as t, isScriptMotion as u };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { o as solveSpring, s as toSpring, t as linearEasing } from "./linearEasing-BxWjPql6.js";
|
|
2
|
+
import { n as motionRoleOf, s as isSpring, t as motionRoleIn } from "./roles-CPMsH5Ob.js";
|
|
3
|
+
//#region src/motion/themeTempo.ts
|
|
4
|
+
/**
|
|
5
|
+
* @file themeTempo.ts
|
|
6
|
+
* @input An element on the page
|
|
7
|
+
* @output `themeTempo(element)`: the tempo of the theme the element is in
|
|
8
|
+
* @position Motion foundation; resolveMotion.ts scales a motion role by it,
|
|
9
|
+
* and the pager scales its settle by it, which no role names
|
|
10
|
+
*
|
|
11
|
+
* A theme that sets `tempo` writes it, clamped, to the private custom
|
|
12
|
+
* property `--_astryx-motion-tempo` beside its duration tokens. An
|
|
13
|
+
* adaptation rule writes it where its condition holds, and a nested theme
|
|
14
|
+
* that sets no tempo inherits it. A layer whose durations come from a
|
|
15
|
+
* duration scale writes a tempo of 1, so its springs keep its own pace. One
|
|
16
|
+
* read of a custom property forces no layout.
|
|
17
|
+
* Nothing here imports a theme module, runs on import or runs on the server.
|
|
18
|
+
*/
|
|
19
|
+
/** The property a theme that sets `tempo` writes (theme/themeMotion.ts). */
|
|
20
|
+
const TEMPO_PROPERTY = "--_astryx-motion-tempo";
|
|
21
|
+
/**
|
|
22
|
+
* The tempo motion on `element` plays at: the one its theme or an adaptation
|
|
23
|
+
* rule sets, else 1. Without an element in a document, or with a value that
|
|
24
|
+
* is not a positive number, it is 1.
|
|
25
|
+
*/
|
|
26
|
+
function themeTempo(element) {
|
|
27
|
+
const view = element?.ownerDocument?.defaultView;
|
|
28
|
+
if (element == null || view == null) return 1;
|
|
29
|
+
const text = view.getComputedStyle(element).getPropertyValue(TEMPO_PROPERTY).trim();
|
|
30
|
+
const tempo = text === "" ? NaN : Number(text);
|
|
31
|
+
return Number.isFinite(tempo) && tempo > 0 ? tempo : 1;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/motion/resolveMotion.ts
|
|
35
|
+
/**
|
|
36
|
+
* The roles the tempo leaves as measured: the parts that follow a finger,
|
|
37
|
+
* and ProgressBar's busy loop.
|
|
38
|
+
*/
|
|
39
|
+
const FIXED_ROLES = /* @__PURE__ */ new Set([
|
|
40
|
+
"springs.fingerTracking",
|
|
41
|
+
"switchControl.tracking",
|
|
42
|
+
"progress.reducedMotionPulseMs"
|
|
43
|
+
]);
|
|
44
|
+
/** Each role spring at each tempo, so a role resolves to one object per tempo. */
|
|
45
|
+
const springsAtTempo = /* @__PURE__ */ new WeakMap();
|
|
46
|
+
/**
|
|
47
|
+
* `spring` at `tempo`. In each of its forms, the undamped period grows by the
|
|
48
|
+
* tempo and the damping ratio stays. So the motion keeps its shape and takes
|
|
49
|
+
* `tempo` times as long.
|
|
50
|
+
*/
|
|
51
|
+
function springAtTempo(spring, tempo) {
|
|
52
|
+
let byTempo = springsAtTempo.get(spring);
|
|
53
|
+
if (byTempo == null) {
|
|
54
|
+
byTempo = /* @__PURE__ */ new Map();
|
|
55
|
+
springsAtTempo.set(spring, byTempo);
|
|
56
|
+
}
|
|
57
|
+
let scaled = byTempo.get(tempo);
|
|
58
|
+
if (scaled == null) {
|
|
59
|
+
if ("response" in spring) scaled = {
|
|
60
|
+
response: spring.response * tempo,
|
|
61
|
+
dampingRatio: spring.dampingRatio
|
|
62
|
+
};
|
|
63
|
+
else if ("duration" in spring) scaled = {
|
|
64
|
+
duration: spring.duration * tempo,
|
|
65
|
+
bounce: spring.bounce
|
|
66
|
+
};
|
|
67
|
+
else scaled = {
|
|
68
|
+
...spring.mass == null ? null : { mass: spring.mass },
|
|
69
|
+
stiffness: spring.stiffness / (tempo * tempo),
|
|
70
|
+
damping: spring.damping / tempo
|
|
71
|
+
};
|
|
72
|
+
byTempo.set(tempo, scaled);
|
|
73
|
+
}
|
|
74
|
+
return scaled;
|
|
75
|
+
}
|
|
76
|
+
function resolveMotion(element, leafOrGroup, key) {
|
|
77
|
+
const value = key === void 0 ? leafOrGroup : leafOrGroup[key];
|
|
78
|
+
const role = key === void 0 ? motionRoleOf(leafOrGroup) : motionRoleIn(leafOrGroup, key);
|
|
79
|
+
if (role == null || role.kind === "curve" || FIXED_ROLES.has(role.id)) return value;
|
|
80
|
+
const tempo = themeTempo(element);
|
|
81
|
+
if (tempo === 1) return value;
|
|
82
|
+
if (typeof value === "number") return value * tempo;
|
|
83
|
+
return isSpring(value) ? springAtTempo(value, tempo) : value;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* How `move` on `spring` plays at the tempo of the theme `element` is in: how
|
|
87
|
+
* long it takes, as `resolveSettleMs` gives it, and its progress over that
|
|
88
|
+
* time as CSS `linear()` easing. A CSS part that takes both follows the
|
|
89
|
+
* spring frame by frame, so the two start and land together. A sheet's scrim
|
|
90
|
+
* fades this way under the sheet's close.
|
|
91
|
+
*
|
|
92
|
+
* With `doneAt`, a position between `from` and `to`, the progress is measured
|
|
93
|
+
* toward `doneAt` instead. It reaches 1 the first time the move gets there
|
|
94
|
+
* and stays at 1. A sheet leaves view before its close ends, because its
|
|
95
|
+
* surface reaches below the screen, and its scrim is clear by then.
|
|
96
|
+
*/
|
|
97
|
+
function resolveMoveTiming(element, spring, move, doneAt = move.to) {
|
|
98
|
+
const curve = solveSpring(toSpring(resolveMotion(element, spring)), move);
|
|
99
|
+
const durationMs = curve.settleTime(move.epsilon) * 1e3;
|
|
100
|
+
const span = doneAt - move.from;
|
|
101
|
+
if (span === 0 || durationMs === 0) return {
|
|
102
|
+
durationMs,
|
|
103
|
+
easing: linearEasing(durationMs, () => 1)
|
|
104
|
+
};
|
|
105
|
+
const progressAt = (t) => (curve.value(t / 1e3) - move.from) / span;
|
|
106
|
+
let reachedAt = Infinity;
|
|
107
|
+
for (let t = 0; t <= durationMs; t++) if (progressAt(t) >= 1) {
|
|
108
|
+
reachedAt = t;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
durationMs,
|
|
113
|
+
easing: linearEasing(durationMs, (t) => t >= reachedAt ? 1 : progressAt(t))
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { resolveMoveTiming as n, resolveMotion as t };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { a as selectSnapPoint } from "./rubberBand-DecgmtDj.js";
|
|
2
|
+
//#region src/motion/resolveSnapPoint.ts
|
|
3
|
+
/**
|
|
4
|
+
* @file resolveSnapPoint.ts
|
|
5
|
+
* @input A release (position and velocity on one axis), the points it can
|
|
6
|
+
* land on, and the release policy's thresholds
|
|
7
|
+
* @output Exports resolveSnapPoint: the index of the snap point a release lands on,
|
|
8
|
+
* and the projected rest position it was judged from
|
|
9
|
+
* @position The release policy of the motion foundation, on
|
|
10
|
+
* `selectSnapPoint` (projection.ts), which stays the math primitive
|
|
11
|
+
* (projection + nearest). Pure: no DOM, no React. Internal to core: not
|
|
12
|
+
* exported from the package or any barrel (resolveSnapPoint.test.ts locks
|
|
13
|
+
* that). A component's release rule calls it with its own points and
|
|
14
|
+
* thresholds; this is the one "where does a release land" helper, so a
|
|
15
|
+
* second one should not be added beside it.
|
|
16
|
+
*
|
|
17
|
+
* - A slow release lands on the snap point nearest where it would come to rest:
|
|
18
|
+
* its position, or, with `projection`, its position plus the distance it
|
|
19
|
+
* would coast at its velocity (projection.ts). Below
|
|
20
|
+
* `projection.minSpeed` nothing is projected, so it lands on the snap point
|
|
21
|
+
* nearest where it was let go. A tie goes the way a projected release
|
|
22
|
+
* moves, and otherwise to the earlier snap point (`selectSnapPoint`).
|
|
23
|
+
* - A flick (`flickThreshold` or faster) lands at least on the next snap point
|
|
24
|
+
* beyond its position in the direction it moves, or on the nearest
|
|
25
|
+
* snap point to its projection if that is farther. A snap point within
|
|
26
|
+
* `tolerance` of the position counts as reached, so the flick goes on to
|
|
27
|
+
* the one after it. With `flickPastProjection`, a flick lands on the first
|
|
28
|
+
* snap point at or past its projection instead. A projection that passes a
|
|
29
|
+
* snap point carries the flick on.
|
|
30
|
+
* - With `start` (where the drag began), a release moving back toward it
|
|
31
|
+
* cancels to the snap point nearest `start`, whatever its travel so far or its
|
|
32
|
+
* speed.
|
|
33
|
+
* - With `fromIndex` and `maxSteps`, a release lands at most `maxSteps`
|
|
34
|
+
* points away from the one at `fromIndex` (a pager's one page per
|
|
35
|
+
* release).
|
|
36
|
+
*
|
|
37
|
+
* Snap points are ascending positions on the axis; velocities are in the same
|
|
38
|
+
* units per second, positive toward larger positions.
|
|
39
|
+
*/
|
|
40
|
+
/** The deceleration rate whose projection reaches `seconds` of the velocity. */
|
|
41
|
+
function rateForProjection(seconds) {
|
|
42
|
+
const ms = seconds * 1e3;
|
|
43
|
+
return ms / (1 + ms);
|
|
44
|
+
}
|
|
45
|
+
/** The index of the snap point nearest `position` (the first on a tie). */
|
|
46
|
+
function nearestIndex(points, position) {
|
|
47
|
+
let best = 0;
|
|
48
|
+
for (let i = 1; i < points.length; i += 1) if (Math.abs(points[i] - position) < Math.abs(points[best] - position)) best = i;
|
|
49
|
+
return best;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The snap point a release lands on.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```
|
|
56
|
+
* // Snap points at 0, 300 and 640 px. Released at 300 px moving toward 640 at
|
|
57
|
+
* // 1200 px/s, a flick: on to 640, although its projection (420 px) is
|
|
58
|
+
* // nearer 300.
|
|
59
|
+
* resolveSnapPoint({
|
|
60
|
+
* points: [0, 300, 640],
|
|
61
|
+
* position: 300,
|
|
62
|
+
* velocity: 1200,
|
|
63
|
+
* flickThreshold: 1008,
|
|
64
|
+
* tolerance: 1,
|
|
65
|
+
* projection: {seconds: 0.1, minSpeed: 250},
|
|
66
|
+
* start: 0,
|
|
67
|
+
* }); // {index: 2, projected: 420}
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
function resolveSnapPoint({ points, position, velocity, flickThreshold, tolerance = 0, flickPastProjection = false, projection, start, fromIndex, maxSteps }) {
|
|
71
|
+
if (points.length === 0) throw new RangeError("resolveSnapPoint needs at least one snap point");
|
|
72
|
+
const projectedVelocity = projection == null || Math.abs(velocity) < (projection.minSpeed ?? 0) ? 0 : velocity;
|
|
73
|
+
const choice = selectSnapPoint(points, {
|
|
74
|
+
position,
|
|
75
|
+
velocity: projectedVelocity,
|
|
76
|
+
rate: projection == null ? void 0 : rateForProjection(projection.seconds),
|
|
77
|
+
fromIndex,
|
|
78
|
+
maxSteps
|
|
79
|
+
});
|
|
80
|
+
let index = choice.index;
|
|
81
|
+
if (Math.abs(velocity) >= flickThreshold) {
|
|
82
|
+
let next = -1;
|
|
83
|
+
if (velocity > 0) next = points.findIndex((d) => d > position + tolerance);
|
|
84
|
+
else for (let i = points.length - 1; i >= 0 && next === -1; i -= 1) if (points[i] < position - tolerance) next = i;
|
|
85
|
+
if (next !== -1 && (velocity > 0 ? next > index : next < index)) index = next;
|
|
86
|
+
if (flickPastProjection) {
|
|
87
|
+
const projected = choice.projected;
|
|
88
|
+
let past = velocity > 0 ? points.length - 1 : 0;
|
|
89
|
+
if (velocity > 0) {
|
|
90
|
+
const at = points.findIndex((d) => d >= projected - tolerance);
|
|
91
|
+
past = at === -1 ? past : at;
|
|
92
|
+
} else for (let i = points.length - 1; i >= 0; i -= 1) if (points[i] <= projected + tolerance) {
|
|
93
|
+
past = i;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
if (velocity > 0 ? past > index : past < index) index = past;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (start != null && velocity !== 0 && Math.sign(velocity) === Math.sign(start - position)) index = nearestIndex(points, start);
|
|
100
|
+
if (fromIndex != null && maxSteps != null) {
|
|
101
|
+
const from = Math.min(Math.max(fromIndex, 0), points.length - 1);
|
|
102
|
+
index = Math.min(Math.max(index, from - maxSteps), from + maxSteps);
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
index,
|
|
106
|
+
projected: choice.projected
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
export { resolveSnapPoint as t };
|