@astryx-vue/core 0.24.0 → 0.26.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-DXOTr1D7.js → AlertDialog-Sku86l_R.js} +194 -8
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-Cmu6bMY6.js → AppShell-CJWvaqgZ.js} +5 -5
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-dMcn3j8Z.js → Avatar-C5KaulzE.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-BUXjzekw.js → AvatarGroup-DT5RbxDa.js} +1 -1
- package/dist/Badge/index.d.ts +1 -2
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-CTY9qV89.js → Banner-cg2nXT_4.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-DyJJtZZU.js → BottomSheet-BtuF3uH6.js} +114 -11
- package/dist/{BottomSheet-ZOjuZya0.js → BottomSheet-DKrJyrhw.js} +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-Nv-089W0.js → Breadcrumbs-Cvzwy6sZ.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-TiYG0btL.js → Button-D8AGK5oT.js} +3 -3
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-DNN4O9_-.js → ButtonGroup-CUN_rC57.js} +2 -2
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-DsXup1mZ.js → Carousel-DrCG9wbP.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DqYT_S9M.js → Chat-BIHEfSec.js} +205 -43
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-FKfsoLcl.js → CheckboxInput-wmX3Ekj-.js} +7 -7
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DuSVBtMk.js → CheckboxList-JWXHHU-u.js} +6 -6
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-dNmSVHBu.js → ClickableCard-CwGxO0GU.js} +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-5KoJDvWd.js → CodeBlock-PMZd9dQ9.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-B1qW6OuL.js → Collapsible-BDCJRfFN.js} +3 -3
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-B2riNg_7.js → CommandPalette-CJyQd7P-.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-C4CO8Fd2.js → ComplexSelector-DIb8LjYJ.js} +4 -4
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-SzsWZf18.js → ContextMenu-HLvsROcS.js} +13 -26
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-D9Jv70H7.js → DateInput-D5YBijbb.js} +14 -33
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-BsB2kg_q.js → DateRangeInput-BlcHsqgx.js} +6 -6
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BDyKPKGD.js → DateTimeInput-Bx3LWb9Y.js} +7 -7
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-DUlWQH8R.js → Dialog-CNLEL4Mf.js} +1 -1
- package/dist/{Dialog-JCB5s-T-.js → Dialog-CxeXQTqH.js} +10 -0
- package/dist/{DialogHeader-C6hZZxdv.js → DialogHeader-CjXS_wba.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-BDuiw1-g.js → Drawer-B_4HN6v5.js} +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-Der2x_k_.js → DropdownMenu-CvdeExRQ.js} +5 -5
- package/dist/{DropdownMenu-BhxKnh6D.js → DropdownMenu-D_fBzKvf.js} +52 -23
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-CnFkYtcS.js → EmptyState-DUaFClsX.js} +4 -50
- package/dist/Field/index.d.ts +3 -3
- package/dist/Field/index.js +3 -3
- package/dist/{Field-D4UmRHlD.js → Field-Btyrw1hd.js} +2 -2
- package/dist/{FieldInfoTip-BSqcEcUx.js → FieldInfoTip-Dwl9HNp1.js} +1 -1
- package/dist/{FieldLabel-CZbayYFD.js → FieldLabel-B4l3sS4O.js} +3 -3
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-8oYiJsq_.js → FileInput-BUwV9fQa.js} +135 -85
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-CGJVeNsL.js → FormLayout-0_X9o-L4.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-COtyAhtB.js → Heading-BuZaxfIK.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-DGlOpk4x.js → HoverCard-CZhfsvP4.js} +2 -2
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CwjHTIBg.js → IconButton-D9ZRJ7vD.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-CNZateDb.js → InfoTip-BDo2xI8h.js} +2 -2
- package/dist/{InputClearButton-CzCP41sx.js → InputClearButton-C-j9Nf1s.js} +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-CfUGHDNz.js → InputGroup-1Ukiu-dg.js} +6 -6
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DaZS5Dch.js → InternationalizationProvider-B2Gv5yAm.js} +1 -1
- package/dist/{Item-DyaYlbyE.js → Item-DUI1Qnnd.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-Dzzd2Vqe.js → Lightbox-BOWTHnTb.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-B7OJQ0zl.js → Link-ruNSnGtC.js} +2 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-gj_lOvEt.js → ListItem-C8SqSrU6.js} +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-Cbj-nqhN.js → Markdown-C-KT_riK.js} +3 -3
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-BlcdCg8M.js → MobileNavToggle-BGNYwwfI.js} +12 -0
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dokwc4Mg.js → MoreMenu-DnwzVBEE.js} +17 -31
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-CId8-qAX.js → MultiSelector-Cl_HzKvn.js} +25 -26
- package/dist/{NavDisclosure-CqAThYgR.js → NavDisclosure-B66SHKdd.js} +1 -1
- package/dist/{NavHeadingSurface-DJ4pWvEi.js → NavHeadingSurface-BZCzkCPJ.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-_eIEwV41.js → NavItem-c1ScHEJY.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-BtA_Xbmr.js → NavMenu-pCZjhMHe.js} +2 -2
- package/dist/{NavMenuItem-BxfjAf1T.js → NavMenuItem-BIqpJmH6.js} +3 -3
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-Bl5TFhGD.js → NumberInput-Dz0H_XPw.js} +386 -99
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-NuPQMjxw.js → Outline-DvQbXc_H.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CumJl6X_.js → OverflowList-MCN1PhBB.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-C0Bx80Tu.js → Pagination-Cq9BIzPe.js} +59 -48
- package/dist/Popover/index.d.ts +3 -3
- package/dist/Popover/index.js +1 -1
- package/dist/Popover-BJAyg1Qh.js +1247 -0
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-Dq6Gi9z1.js → PowerSearch-wXnusKnz.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-Dp-0xquN.js → ProgressBar-C6x0E-BF.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-IKBXLzYU.js → RadioGroup-LUDji_LA.js} +7 -7
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-NW4fGKgm.js → RadioList-CmeUUgn-.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-DRxcUlVP.js → SegmentedControl-BkWz-I2J.js} +2 -2
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Dp-LsEcf.js → SelectableCard-GRWYx3iD.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-BW_oxWDM.js → Selector-BL_JH51H.js} +30 -25
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-B5mMRj98.js → SideNav-DtAQA-o-.js} +9 -9
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-oD3AY4jh.js → Slider-DEMdW9An.js} +4 -4
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-B3oOyRF7.js → StatusDot-_rucEf3d.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CgOdL36_.js → Stepper-CCuggsov.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DG_A9cD0.js → Switch-BxRYZTQV.js} +6 -6
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-FkoypUk0.js → TabList-D8KzfcGB.js} +3 -3
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-zNW23VwP.js → Table-DYDBgr3y.js} +15 -15
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-v1ep26uD.js → Text-CHauN5So.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BilHnmSs.js → TextArea-BJl6YH4p.js} +56 -22
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-D6tHM2sA.js → TextInput-CGOVY0Zk.js} +78 -34
- package/dist/Theme/index.d.ts +2 -2
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-llGdnQM8.js → Thumbnail-C3MvJ67s.js} +3 -3
- package/dist/{TimeField-C5rcoaVu.js → TimeField-C2of7Ok5.js} +14 -33
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D0N8nwrI.js → TimeInput-B_YY-IHW.js} +3 -3
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-65PfuoQ7.js → Timer-OULaFQFf.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-rYC8mE3r.js → Timestamp-B6J0nfYH.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BtQ-4Y6Z.js → Toast-BKPl8iIr.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-Bnn_MiOn.js → ToggleButton-DfpsuhMa.js} +3 -3
- package/dist/Token/index.js +1 -1
- package/dist/{Token-B-j3AKxB.js → Token-C7Dt5ygK.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-Cpdy_L00.js → Tokenizer-CSmIMDc4.js} +6 -6
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-CByjfHBZ.js → Tooltip-gT9_hIEv.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-q8xDVlM_.js → TopNav-BsrhSbkn.js} +5 -5
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CEGInQtF.js → TreeList-BEPHdVYu.js} +3 -3
- package/dist/Typeahead/index.d.ts +2 -2
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-C-PdRnRQ.js → Typeahead-CdLc7S2v.js} +7 -7
- package/dist/{types-fRasDCe4.d.ts → adaptationTypes-Cn_pfrsw.d.ts} +155 -155
- package/dist/animator-BooLoGyI.js +3164 -0
- package/dist/announceRenderedText-CslZ0cev.js +50 -0
- package/dist/{assertOptions-og3t30Fh.js → assertOptions-CFn7Gdcr.js} +22 -2
- package/dist/{batch-oTkSbtVz.js → batch-CM-vJhQg.js} +3 -279
- package/dist/{handle-CSHfxBie.js → bezier-Cts7gENO.js} +3 -22
- package/dist/{clickGuard-ChKuogmR.js → clickGuard-FrlnECMp.js} +1 -2
- package/dist/coarsePointer-BfMx3H23.js +86 -0
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +7 -7
- package/dist/{composables-COCeg92e.js → composables-D9DVeNnL.js} +10 -3271
- package/dist/{context-DsNhYm5O.js → context-CrVCeUUK.js} +1 -1
- package/dist/context-DH8E-qjm.js +173 -0
- package/dist/{edge-3sC8-cbB.js → edge-BYXwSggM.js} +1 -1
- package/dist/{edgeRide-DOxmVxTM.js → edgeRide-B5mlN2Q4.js} +4 -4
- package/dist/escape-DzSxSmez.js +10 -0
- package/dist/{field-CehUqCe0.js → field-BaUBjqf5.js} +4 -2
- package/dist/{fieldParts-CbWvZLhH.js → fieldParts-CuE5V12i.js} +1 -1
- package/dist/{sharedRealm-H1OrlP0V.js → flatTree-BB4yPMNL.js} +1 -49
- package/dist/handle-BazRxHwq.js +22 -0
- package/dist/holdEntranceInput-DMCOeRqu.js +37 -0
- package/dist/{index-CuW4AQ7M.d.ts → index--kbwaSXW.d.ts} +1 -1
- package/dist/{index-CsYDrQ9R.d.ts → index-668zPVsH.d.ts} +1 -1
- package/dist/{index-_FjbcSgD.d.ts → index-7Q-wnbe7.d.ts} +1 -1
- package/dist/{index-Q1oG9yIT.d.ts → index-B-3EGjfQ.d.ts} +2 -2
- package/dist/{index-HULXozsK.d.ts → index-B3uBbehw.d.ts} +8 -8
- package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
- package/dist/{index-CnVjgLP5.d.ts → index-BCW6qCcS.d.ts} +1 -1
- package/dist/{index-QnlWyUxN.d.ts → index-BFGtLIp8.d.ts} +2 -2
- package/dist/{index-DDAcxZAP.d.ts → index-BZUVNr2c.d.ts} +1 -1
- package/dist/{index-BWcZ-L80.d.ts → index-BcRvRqWU.d.ts} +1 -1
- package/dist/{index-CEjvYAUZ.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-ZKBj_1nu.d.ts → index-BfFpUr1B.d.ts} +1 -1
- package/dist/{index-DofC9Rll.d.ts → index-BtqvPjAf.d.ts} +1 -1
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/{index-mK1ICsVg.d.ts → index-C3JmGujU.d.ts} +1 -1
- package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-BfoazhEu.d.ts → index-CTXG-KKT.d.ts} +1 -1
- package/dist/{index-COgrQZIL.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-lmd9LZKB.d.ts → index-ClJINYPl.d.ts} +5 -2
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/index-CuFLztiI.d.ts +49 -0
- package/dist/{index-BOCb89V9.d.ts → index-DFLPv9io.d.ts} +2 -2
- package/dist/index-DHUCHxn2.d.ts +69 -0
- package/dist/{index-85RFPeV0.d.ts → index-DHsYyqMP.d.ts} +5 -5
- package/dist/{index-GmoeIuhl.d.ts → index-DMZ5SKJJ.d.ts} +35 -3
- package/dist/{index-DYabo8TI.d.ts → index-DPhQZXYw.d.ts} +1 -1
- package/dist/{index-DRDOArzq.d.ts → index-DSEEgvak.d.ts} +1152 -214
- package/dist/{index-DxR6cZBf.d.ts → index-DZCpswvp.d.ts} +1 -1
- package/dist/{index-etx25Eq-.d.ts → index-NOxH5oYj.d.ts} +1 -1
- package/dist/{index-CH-xSiJz.d.ts → index-XY0rleGM.d.ts} +2 -2
- package/dist/{index-0RIgvtdm.d.ts → index-ZXrvTM3A.d.ts} +2 -2
- package/dist/{index-DGXCnzOL.d.ts → index-aHC2C89h.d.ts} +1 -1
- package/dist/{index-0pBqcQXV.d.ts → index-tpkJfk6X.d.ts} +6 -1
- package/dist/index.d.ts +43 -44
- package/dist/index.js +101 -101
- package/dist/inputHold-BmChuR9x.js +525 -0
- package/dist/inputHoldState-pblUT4oh.js +39 -0
- package/dist/inputStream-LZdK8luP.js +239 -0
- package/dist/{landing-DFC97kl9.js → landing-B9Uvex6x.js} +3 -2
- package/dist/lazyBottomSheet-CL_PrTxb.js +16 -0
- package/dist/{loadCatalog-C8mRnC0E.d.ts → loadCatalog-2Hu-xisJ.d.ts} +2 -0
- package/dist/{loadCatalog-BeQt6Uq-.js → loadCatalog-umh_C97k.js} +2 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +3 -3
- package/dist/{locale-B4FpGKpc.js → locale-BDPlcO62.js} +1 -1
- package/dist/presentationHold-7IkbR4d8.js +118 -0
- package/dist/{pressFeedback-CEUPQWIS.js → pressFeedback-DVR5V1b6.js} +3 -164
- package/dist/progress-FQfSgLZC.js +38 -0
- package/dist/renderedText-BwJdmps3.js +32 -0
- package/dist/{stillPointerGate-1Tgkns0J.js → stillPointerGate-D3loXLh7.js} +1 -1
- package/dist/textEntryTraits-cb0LZSNl.js +11 -0
- package/dist/themeTiming-CWEvdh31.js +287 -0
- package/dist/{tooltipFocusRules-vIH7PZh1.js → tooltipFocusRules-CFNKWzYn.js} +1 -1
- package/dist/{tooltipTriggerRules-DoBAbfGc.js → tooltipTriggerRules-DyPyWOdP.js} +1 -1
- package/dist/touchHold-CFJlSClt.js +30 -0
- package/dist/{context-DQPBIsl5.js → transientCopy-VAsg2a46.js} +1 -172
- package/dist/{types-OGMYGejX.d.ts → types-BA1veIoa.d.ts} +25 -2
- package/dist/{types-bAQk3F8G.d.ts → types-Cvh2VwQZ.d.ts} +4 -2
- package/dist/{types-C1ydeFiu.d.ts → types-DL-hRibg.d.ts} +1 -1
- package/dist/{useActionGroupTracking-PVBCtLUE.js → useActionGroupTracking-C6BzQzvp.js} +2 -2
- package/dist/{useChatStreamScroll-BIMKffDA.js → useChatStreamScroll-Cv51kRT0.js} +91 -30
- package/dist/{useDismiss-CMIsdIOQ.js → useDismiss-C7_S7qUA.js} +87 -5
- package/dist/useEntryErrorReport-Wee3N8IA.js +51 -0
- package/dist/useHeldPresentation-7MH-RlSF.js +24 -0
- package/dist/{useInputStatusIcon-CrgeMzrf.js → useInputStatusIcon-BFw-EXjJ.js} +1 -1
- package/dist/{useInputStatusIcon-B6m_t8cK.d.ts → useInputStatusIcon-CFkOmDS4.d.ts} +1 -1
- package/dist/{useMenuDrillIn-CQrzwZvx.js → useMenuDrillIn-CP0P49ej.js} +9 -8
- package/dist/{useMenuPress-wqRDvUMW.js → useMenuPress-Di_3jhOx.js} +5 -3
- package/dist/{usePressFeedback-aufF1sCH.js → usePressFeedback-BhNcuxQv.js} +1 -1
- package/dist/{useTooltip-BwqzEtoF.js → useTooltip-BpBMQ815.js} +4 -34
- package/dist/{useTouchHitArea-BMDBe36j.js → useTouchHitArea-CNZyA18Y.js} +2 -2
- package/dist/{useTruncationTooltip-CRhoPzeu.js → useTruncationTooltip-t5G978XB.js} +3 -3
- package/dist/{useTypeaheadMenuConfig-GvdIymRg.js → useTypeaheadMenuConfig-DeDGVR8S.js} +1 -1
- package/package.json +1 -1
- package/styles/alert-dialog.css +5 -0
- package/styles/chat.css +45 -17
- package/styles/context-menu.css +17 -73
- package/styles/dialog.css +18 -1
- package/styles/dropdown-menu.css +47 -38
- package/styles/file-input.css +8 -1
- package/styles/hover-card.css +13 -72
- package/styles/input-group.css +0 -15
- package/styles/layer.css +68 -0
- package/styles/multi-selector.css +17 -30
- package/styles/number-input.css +49 -4
- package/styles/pagination.css +0 -22
- package/styles/popover.css +26 -72
- package/styles/selector.css +17 -30
- package/styles/text-area.css +16 -1
- package/styles/text-input.css +26 -5
- package/styles/tooltip.css +12 -71
- package/styles/typeahead.css +17 -30
- package/dist/Popover-DpR4rwiW.js +0 -374
- package/dist/index-B9WzWqzk.d.ts +0 -18
- package/dist/index-CyMStZq4.d.ts +0 -957
- package/dist/types-DIYwbkpe.d.ts +0 -33
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
import { c as isHTMLElement, l as isNode, n as deepActiveElement, o as isDocument, r as parentAcrossShadow, s as isElement, t as containsAlongFlatTree } from "./flatTree-BB4yPMNL.js";
|
|
2
|
+
import { i as subscribeInput, n as getLastMousePoint, t as getDownPresses } from "./inputStream-LZdK8luP.js";
|
|
3
|
+
import { n as registerTouchHold } from "./touchHold-CFJlSClt.js";
|
|
4
|
+
import { t as FOCUSABLE_SELECTOR } from "./focus-x7mxEqjR.js";
|
|
5
|
+
import { a as liveLayers, i as isMouseLast, n as heldDocuments, o as liveShields, r as isInputShield, s as pressHolds, t as held } from "./inputHoldState-pblUT4oh.js";
|
|
6
|
+
//#region src/layer/inputHoldInert.ts
|
|
7
|
+
/**
|
|
8
|
+
* @file inputHoldInert.ts
|
|
9
|
+
* @output 退场暂挡(`scope: 'layer'`)的内容处理:把浮层内容变成 inert、把焦点移出去,
|
|
10
|
+
* 放开时恢复;判断一个节点是不是在浮层里面的另一个浮层里
|
|
11
|
+
* @position 输入暂挡的退场部分(对应上游 Layer/inputHold 的 makeContentInert)
|
|
12
|
+
*/
|
|
13
|
+
/** 浮层根:每个浮层(对话框、弹出框、toast 区域)都带的类,以及原生的顶层元素。 */
|
|
14
|
+
const LAYER_ROOT_SELECTOR = ".astryx-layer, [popover], dialog";
|
|
15
|
+
function isLayerRoot(element) {
|
|
16
|
+
return element.matches(LAYER_ROOT_SELECTOR);
|
|
17
|
+
}
|
|
18
|
+
/** `target` 是否在 `layer` 里面的另一个浮层里(模态框托管的 toast 区域)。 */
|
|
19
|
+
function isInNestedLayer(target, layer) {
|
|
20
|
+
for (let node = target; node != null && node !== layer; node = parentAcrossShadow(node)) if (isElement(node) && isLayerRoot(node)) return true;
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
/** 里面什么可聚焦的都没有的实时区域:它不接输入,inert 会吞掉写进去的话。 */
|
|
24
|
+
function isTextLiveRegion(element) {
|
|
25
|
+
const live = element.getAttribute("aria-live");
|
|
26
|
+
return (live != null ? live !== "off" : [
|
|
27
|
+
"status",
|
|
28
|
+
"alert",
|
|
29
|
+
"log"
|
|
30
|
+
].includes(element.getAttribute("role") ?? "")) && !element.matches(FOCUSABLE_SELECTOR) && element.querySelector(FOCUSABLE_SELECTOR) == null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 把浮层内容变成 inert,焦点移出去。挡板、没有可聚焦内容的直接子实时区域、浮层
|
|
34
|
+
* 里面的另一个浮层保持可用;装着另一个浮层的元素自己保持可用,它的其它子元素变成
|
|
35
|
+
* inert(inert 内容里不会有可用的后代)。浮层元素本身保持可用:inert 子树不接命中,
|
|
36
|
+
* 浮层里的挡板照样接住每一下。返回变成 inert 的元素和它们原来的状态。
|
|
37
|
+
*/
|
|
38
|
+
function makeContentInert(layer, shield) {
|
|
39
|
+
const content = /* @__PURE__ */ new Map();
|
|
40
|
+
const makeInertAround = (parent, isLayer) => {
|
|
41
|
+
for (const child of parent.children) {
|
|
42
|
+
if (child === shield || isLayerRoot(child) || isLayer && isTextLiveRegion(child)) continue;
|
|
43
|
+
if (child.querySelector(LAYER_ROOT_SELECTOR) != null) {
|
|
44
|
+
makeInertAround(child, false);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
content.set(child, child.hasAttribute("inert"));
|
|
48
|
+
child.setAttribute("inert", "");
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
makeInertAround(layer, true);
|
|
52
|
+
const focused = deepActiveElement(layer.ownerDocument);
|
|
53
|
+
if (isHTMLElement(focused) && [...content.keys()].some((element) => element.contains(focused))) focused.blur();
|
|
54
|
+
return content;
|
|
55
|
+
}
|
|
56
|
+
/** 放开退场暂挡:内容恢复原来的 inert 状态。 */
|
|
57
|
+
function restoreContent(content) {
|
|
58
|
+
for (const [element, wasInert] of content) if (!wasInert) element.removeAttribute("inert");
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/layer/inputHoldShield.ts
|
|
62
|
+
const SWALLOWED = [
|
|
63
|
+
"pointerdown",
|
|
64
|
+
"pointerup",
|
|
65
|
+
"touchstart",
|
|
66
|
+
"touchend",
|
|
67
|
+
"mousedown",
|
|
68
|
+
"mouseup",
|
|
69
|
+
"click",
|
|
70
|
+
"contextmenu"
|
|
71
|
+
];
|
|
72
|
+
function swallow(event) {
|
|
73
|
+
if (event.cancelable && event.type !== "touchstart") event.preventDefault();
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 放进 `layer` 里的透明遮挡:`isFull` 时从顶层盖满视口,否则只盖浮层自己。
|
|
78
|
+
* 挡板在浮层里面,点在它上面等于点在浮层里,会被轻触关闭的浮层不会因此关掉。
|
|
79
|
+
*/
|
|
80
|
+
function addShield(layer, isFull) {
|
|
81
|
+
const shield = layer.ownerDocument.createElement("div");
|
|
82
|
+
if (isFull) shield.setAttribute("popover", "manual");
|
|
83
|
+
shield.setAttribute("aria-hidden", "true");
|
|
84
|
+
shield.setAttribute("data-astryx-input-shield", "");
|
|
85
|
+
Object.assign(shield.style, {
|
|
86
|
+
position: isFull ? "fixed" : "absolute",
|
|
87
|
+
inset: "0",
|
|
88
|
+
width: isFull ? "100vw" : "100%",
|
|
89
|
+
height: isFull ? "100vh" : "100%",
|
|
90
|
+
zIndex: isFull ? "auto" : "2147483647",
|
|
91
|
+
maxWidth: "none",
|
|
92
|
+
maxHeight: "none",
|
|
93
|
+
margin: "0",
|
|
94
|
+
padding: "0",
|
|
95
|
+
border: "0",
|
|
96
|
+
background: "transparent",
|
|
97
|
+
overflow: "hidden",
|
|
98
|
+
touchAction: "pinch-zoom",
|
|
99
|
+
pointerEvents: "auto",
|
|
100
|
+
visibility: "visible"
|
|
101
|
+
});
|
|
102
|
+
for (const type of SWALLOWED) shield.addEventListener(type, swallow, {
|
|
103
|
+
capture: true,
|
|
104
|
+
passive: false
|
|
105
|
+
});
|
|
106
|
+
layer.append(shield);
|
|
107
|
+
liveShields.add(shield);
|
|
108
|
+
if (isFull && typeof shield.showPopover === "function") try {
|
|
109
|
+
shield.showPopover();
|
|
110
|
+
} catch {}
|
|
111
|
+
return shield;
|
|
112
|
+
}
|
|
113
|
+
/** 拆掉一块挡板。 */
|
|
114
|
+
function removeShield(shield) {
|
|
115
|
+
liveShields.delete(shield);
|
|
116
|
+
shield.remove();
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* 每个点周围的正方形口子。两个重叠的口子合成一个盖住两者的框:按非零环绕规则,
|
|
120
|
+
* 同向画的两个口子重叠的部分会被算两次,反而又合上了。
|
|
121
|
+
*/
|
|
122
|
+
function openings(points) {
|
|
123
|
+
const boxes = [];
|
|
124
|
+
for (const { x, y } of points) {
|
|
125
|
+
let box = {
|
|
126
|
+
left: x - 2,
|
|
127
|
+
right: x + 2,
|
|
128
|
+
top: y - 2,
|
|
129
|
+
bottom: y + 2
|
|
130
|
+
};
|
|
131
|
+
for (let index = boxes.length - 1; index >= 0; index--) {
|
|
132
|
+
const other = boxes[index];
|
|
133
|
+
if (box.left < other.right && other.left < box.right && box.top < other.bottom && other.top < box.bottom) {
|
|
134
|
+
box = {
|
|
135
|
+
left: Math.min(box.left, other.left),
|
|
136
|
+
right: Math.max(box.right, other.right),
|
|
137
|
+
top: Math.min(box.top, other.top),
|
|
138
|
+
bottom: Math.max(box.bottom, other.bottom)
|
|
139
|
+
};
|
|
140
|
+
boxes.splice(index, 1);
|
|
141
|
+
index = boxes.length;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
boxes.push(box);
|
|
145
|
+
}
|
|
146
|
+
return boxes;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* 给鼠标在挡板上留条路。浏览器先命中测试、脚本才读得到指针类型,所以手指
|
|
150
|
+
* 升起挡板后一直没动过的鼠标,会按到挡板上。满屏挡板在输入流最后听到鼠标
|
|
151
|
+
* 的那一点留个口子;只盖浮层自己的挡板干脆不接点击(它跟着进场动画在动)——
|
|
152
|
+
* 手指按在那里照样被按压暂挡按指针拦下。满屏挡板还给升起前就按下的手指
|
|
153
|
+
* 各留一个口子(见 {@link openToEarlierPresses})。
|
|
154
|
+
*/
|
|
155
|
+
function openToMouse(state, doc) {
|
|
156
|
+
const { shield } = state;
|
|
157
|
+
if (shield == null || state.layer > 0) return;
|
|
158
|
+
const view = doc.defaultView;
|
|
159
|
+
const mouse = view == null ? null : getLastMousePoint(view);
|
|
160
|
+
const downPresses = view == null ? null : getDownPresses(view);
|
|
161
|
+
const presses = [];
|
|
162
|
+
if (state.isShieldFull && downPresses != null) for (const pointerId of state.pressOpenings) {
|
|
163
|
+
const point = downPresses.get(pointerId);
|
|
164
|
+
if (point != null) presses.push(point);
|
|
165
|
+
}
|
|
166
|
+
if (mouse == null && presses.length === 0 || shield.style.pointerEvents === "none") {
|
|
167
|
+
shield.style.removeProperty("clip-path");
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (!state.isShieldFull) {
|
|
171
|
+
shield.style.pointerEvents = "none";
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const outline = [
|
|
175
|
+
"0 0",
|
|
176
|
+
"100% 0",
|
|
177
|
+
"100% 100%",
|
|
178
|
+
"0 100%"
|
|
179
|
+
];
|
|
180
|
+
for (const { left, right, top, bottom } of openings(mouse == null ? presses : [mouse, ...presses])) outline.push(`0 ${top}px`, `${left}px ${top}px`, `${left}px ${bottom}px`, `${right}px ${bottom}px`, `${right}px ${top}px`, `0 ${top}px`);
|
|
181
|
+
shield.style.clipPath = `polygon(${outline.join(", ")})`;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* 满屏挡板升起前就按下的每根手指或笔,在它那里留个口子。WebKit 会对这一下的
|
|
185
|
+
* 抬起重新做命中测试(即使抓着指针),抬起落在挡板上就是落在浮层里,会被轻触
|
|
186
|
+
* 关闭的浮层就关不掉了。有了口子,抬起落到下面原本的东西上,轻触关闭照常。
|
|
187
|
+
* 在更早一次暂挡里按下、正被按压暂挡拦着的按压不留口子。
|
|
188
|
+
*/
|
|
189
|
+
function openToEarlierPresses(state, doc) {
|
|
190
|
+
const view = doc.defaultView;
|
|
191
|
+
if (view == null) return;
|
|
192
|
+
const pressHold = pressHolds.get(doc);
|
|
193
|
+
for (const pointerId of getDownPresses(view).keys()) if (pressHold?.holds(pointerId) !== true) state.pressOpenings.add(pointerId);
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/layer/inputHoldPress.ts
|
|
197
|
+
const HELD_POINTERS = /* @__PURE__ */ new Set(["touch", "pen"]);
|
|
198
|
+
/** 被挡的一下在暂挡结束后最多再跟多久。 */
|
|
199
|
+
const STRAY_PRESS_MS = 1e4;
|
|
200
|
+
const POINTER_EVENTS = [
|
|
201
|
+
"pointerdown",
|
|
202
|
+
"pointermove",
|
|
203
|
+
"pointerup",
|
|
204
|
+
"pointercancel"
|
|
205
|
+
];
|
|
206
|
+
const TOUCH_EVENTS = [
|
|
207
|
+
"touchstart",
|
|
208
|
+
"touchmove",
|
|
209
|
+
"touchend",
|
|
210
|
+
"touchcancel"
|
|
211
|
+
];
|
|
212
|
+
const PRESS_EVENTS = [
|
|
213
|
+
"mousedown",
|
|
214
|
+
"mouseup",
|
|
215
|
+
"click",
|
|
216
|
+
"auxclick",
|
|
217
|
+
"dblclick",
|
|
218
|
+
"contextmenu"
|
|
219
|
+
];
|
|
220
|
+
/** 文档的按压暂挡,没开就开起来。 */
|
|
221
|
+
function pressHoldFor(doc) {
|
|
222
|
+
let hold = pressHolds.get(doc) ?? null;
|
|
223
|
+
if (hold == null) {
|
|
224
|
+
hold = createPressHold(doc);
|
|
225
|
+
if (hold != null) pressHolds.set(doc, hold);
|
|
226
|
+
}
|
|
227
|
+
return hold;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* 有浮层被挡期间,拦下落进 `doc` 窗口的每一下手指或笔的按压,每一下都跟到它
|
|
231
|
+
* 自己结束,哪怕暂挡已经放开。移动的鼠标从挡板穿过去。它通过共享输入流最先
|
|
232
|
+
* 听到事件,被挡的事件在那里就停下:文档、元素上的监听都听不到,按压反馈和
|
|
233
|
+
* 手势宿主也听不到。每个文档一份;不再挡、被挡的按压和它们的 click 都结束后退订。
|
|
234
|
+
*/
|
|
235
|
+
function createPressHold(doc) {
|
|
236
|
+
const view = doc.defaultView;
|
|
237
|
+
if (view == null) return null;
|
|
238
|
+
/** 新的按压要不要挡:直到 release。 */
|
|
239
|
+
let isHolding = true;
|
|
240
|
+
let isListening = true;
|
|
241
|
+
/** 还按着的被挡按压,按 pointerId 和 touch identifier 记。 */
|
|
242
|
+
const pointers = /* @__PURE__ */ new Set();
|
|
243
|
+
const touches = /* @__PURE__ */ new Set();
|
|
244
|
+
/** 下一个 click 属于谁:被挡的那一下,还是别的。 */
|
|
245
|
+
let lastPress = null;
|
|
246
|
+
/** 没写指针类型的 click 在这个时刻之前都算被挡那一下的。 */
|
|
247
|
+
let clickUntil = -Infinity;
|
|
248
|
+
let timer;
|
|
249
|
+
const unsubscribers = [];
|
|
250
|
+
const now = () => view.performance.now();
|
|
251
|
+
const isPressDown = () => pointers.size > 0 || touches.size > 0;
|
|
252
|
+
const swallow = (event) => {
|
|
253
|
+
if (event.cancelable) event.preventDefault();
|
|
254
|
+
event.stopImmediatePropagation();
|
|
255
|
+
};
|
|
256
|
+
/** release 之后:最后一下被挡的按压和它的 click 结束就退订。 */
|
|
257
|
+
const settle = () => {
|
|
258
|
+
if (isHolding || !isListening) return;
|
|
259
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
260
|
+
if (isPressDown()) {
|
|
261
|
+
timer = setTimeout(stop, STRAY_PRESS_MS);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
const wait = clickUntil - now();
|
|
265
|
+
if (wait > 0) timer = setTimeout(stop, wait);
|
|
266
|
+
else stop();
|
|
267
|
+
};
|
|
268
|
+
/** 还有浮层被挡吗(离开文档的不算)。 */
|
|
269
|
+
const holdsNewPress = () => {
|
|
270
|
+
if (isHolding) liveLayers(doc);
|
|
271
|
+
return isHolding;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* 落在 `target` 上的新按压要不要挡。有浮层盖满视口时,按在哪都挡,退场浮层
|
|
275
|
+
* 里面的另一个浮层除外;只挡自己那块(`'surface'`)时,只挡按在浮层上的,周围页面照常。
|
|
276
|
+
*/
|
|
277
|
+
const holdsPressAt = (target) => {
|
|
278
|
+
if (!holdsNewPress()) return false;
|
|
279
|
+
for (const layer of liveLayers(doc)) {
|
|
280
|
+
const state = held.get(layer);
|
|
281
|
+
if (state == null) continue;
|
|
282
|
+
if (state.viewport > 0 || state.layer > 0 && !(isNode(target) && isInNestedLayer(target, layer))) return true;
|
|
283
|
+
if (state.surface > 0 && isNode(target) && containsAlongFlatTree(layer, target)) return true;
|
|
284
|
+
}
|
|
285
|
+
return false;
|
|
286
|
+
};
|
|
287
|
+
const pressEnded = () => {
|
|
288
|
+
clickUntil = now() + 800;
|
|
289
|
+
settle();
|
|
290
|
+
};
|
|
291
|
+
/** 手指或笔来了,挡板接点击;移动的鼠标来了,挡板让开。 */
|
|
292
|
+
const followPointer = (pointerType) => {
|
|
293
|
+
for (const layer of liveLayers(doc)) {
|
|
294
|
+
const state = held.get(layer);
|
|
295
|
+
if (state?.shield == null || state.layer > 0) continue;
|
|
296
|
+
const value = pointerType === "mouse" ? "none" : "auto";
|
|
297
|
+
if (state.shield.style.pointerEvents !== value) state.shield.style.pointerEvents = value;
|
|
298
|
+
openToMouse(state, doc);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* 挡板给鼠标让开时,被挡的一下落到了挡板后面:把它抓到挡板上,抬起也算暂挡的,
|
|
303
|
+
* 会被轻触关闭的浮层不会关掉。合成的按压没有活动指针可抓,照样吞掉。
|
|
304
|
+
*/
|
|
305
|
+
const captureToShield = (event) => {
|
|
306
|
+
if (!event.isTrusted) return;
|
|
307
|
+
const top = liveLayers(doc).at(-1);
|
|
308
|
+
const shield = top == null ? null : held.get(top)?.shield;
|
|
309
|
+
if (shield == null || isInputShield(event.target)) return;
|
|
310
|
+
try {
|
|
311
|
+
shield.setPointerCapture(event.pointerId);
|
|
312
|
+
} catch {}
|
|
313
|
+
};
|
|
314
|
+
/** 更早按下那一下的口子跟着它走,抬起时合上。输入流已经先记下了这次的位置。 */
|
|
315
|
+
const followEarlierPress = (event) => {
|
|
316
|
+
const { pointerId, type } = event;
|
|
317
|
+
for (const layer of liveLayers(doc)) {
|
|
318
|
+
const state = held.get(layer);
|
|
319
|
+
if (state == null || !state.pressOpenings.has(pointerId)) continue;
|
|
320
|
+
if (type === "pointerup" || type === "pointercancel") state.pressOpenings.delete(pointerId);
|
|
321
|
+
openToMouse(state, doc);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const onPointer = (event) => {
|
|
325
|
+
const { pointerId, pointerType, type } = event;
|
|
326
|
+
if (HELD_POINTERS.has(pointerType) && type !== "pointerdown" && !pointers.has(pointerId)) followEarlierPress(event);
|
|
327
|
+
if ((HELD_POINTERS.has(pointerType) ? type === "pointerdown" || type === "pointermove" : pointerType === "mouse" && type === "pointermove" && event.buttons === 0) && holdsNewPress()) followPointer(pointerType);
|
|
328
|
+
if (type === "pointerdown") {
|
|
329
|
+
if (!HELD_POINTERS.has(pointerType) || !holdsPressAt(event.target)) {
|
|
330
|
+
pointers.delete(pointerId);
|
|
331
|
+
lastPress = "free";
|
|
332
|
+
clickUntil = -Infinity;
|
|
333
|
+
settle();
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
pointers.add(pointerId);
|
|
337
|
+
lastPress = "held";
|
|
338
|
+
captureToShield(event);
|
|
339
|
+
} else if (!pointers.has(pointerId)) return false;
|
|
340
|
+
swallow(event);
|
|
341
|
+
if (type === "pointerup" || type === "pointercancel") {
|
|
342
|
+
pointers.delete(pointerId);
|
|
343
|
+
pressEnded();
|
|
344
|
+
}
|
|
345
|
+
return true;
|
|
346
|
+
};
|
|
347
|
+
const onTouch = (event) => {
|
|
348
|
+
const { changedTouches, touches: down, type } = event;
|
|
349
|
+
const changed = Array.from(changedTouches);
|
|
350
|
+
if (type === "touchstart") {
|
|
351
|
+
const live = new Set(Array.from(down, (touch) => touch.identifier));
|
|
352
|
+
for (const identifier of touches) if (!live.has(identifier)) touches.delete(identifier);
|
|
353
|
+
const heldTouches = changed.filter((touch) => holdsPressAt(touch.target));
|
|
354
|
+
if (heldTouches.length === 0) {
|
|
355
|
+
for (const touch of changed) touches.delete(touch.identifier);
|
|
356
|
+
lastPress = "free";
|
|
357
|
+
clickUntil = -Infinity;
|
|
358
|
+
settle();
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
for (const touch of heldTouches) touches.add(touch.identifier);
|
|
362
|
+
lastPress = "held";
|
|
363
|
+
event.stopImmediatePropagation();
|
|
364
|
+
return true;
|
|
365
|
+
}
|
|
366
|
+
if (!changed.some((touch) => touches.has(touch.identifier))) return false;
|
|
367
|
+
if (type === "touchmove") {
|
|
368
|
+
event.stopImmediatePropagation();
|
|
369
|
+
if (down.length === 1 && event.cancelable) event.preventDefault();
|
|
370
|
+
return true;
|
|
371
|
+
}
|
|
372
|
+
swallow(event);
|
|
373
|
+
for (const touch of changed) touches.delete(touch.identifier);
|
|
374
|
+
pressEnded();
|
|
375
|
+
return true;
|
|
376
|
+
};
|
|
377
|
+
const onPress = (event) => {
|
|
378
|
+
if (event.detail === 0) return false;
|
|
379
|
+
const { pointerType } = event;
|
|
380
|
+
if (lastPress === "held" && (pointerType == null || pointerType === "" || HELD_POINTERS.has(pointerType)) && (isPressDown() || now() <= clickUntil)) {
|
|
381
|
+
swallow(event);
|
|
382
|
+
return true;
|
|
383
|
+
}
|
|
384
|
+
return false;
|
|
385
|
+
};
|
|
386
|
+
const pressHold = {
|
|
387
|
+
hold() {
|
|
388
|
+
isHolding = true;
|
|
389
|
+
if (timer !== void 0) {
|
|
390
|
+
clearTimeout(timer);
|
|
391
|
+
timer = void 0;
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
release() {
|
|
395
|
+
if (!isHolding) return;
|
|
396
|
+
isHolding = false;
|
|
397
|
+
settle();
|
|
398
|
+
},
|
|
399
|
+
holds: (pointerId) => pointers.has(pointerId)
|
|
400
|
+
};
|
|
401
|
+
function stop() {
|
|
402
|
+
if (!isListening) return;
|
|
403
|
+
isListening = false;
|
|
404
|
+
if (pressHolds.get(doc) === pressHold) pressHolds.delete(doc);
|
|
405
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
406
|
+
for (const unsubscribe of unsubscribers.splice(0)) unsubscribe();
|
|
407
|
+
}
|
|
408
|
+
unsubscribers.push(...POINTER_EVENTS.map((type) => subscribeInput(view, type, onPointer, {
|
|
409
|
+
cancels: true,
|
|
410
|
+
first: true
|
|
411
|
+
})), ...TOUCH_EVENTS.map((type) => subscribeInput(view, type, onTouch, {
|
|
412
|
+
cancels: type === "touchmove" || type === "touchend",
|
|
413
|
+
first: true
|
|
414
|
+
})), ...PRESS_EVENTS.map((type) => subscribeInput(view, type, onPress, {
|
|
415
|
+
cancels: true,
|
|
416
|
+
first: true
|
|
417
|
+
})));
|
|
418
|
+
return pressHold;
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/layer/inputHold.ts
|
|
422
|
+
/**
|
|
423
|
+
* 手势宿主问的那一句:`target` 上这一下触摸要不要挡。落在挡板上的都挡;
|
|
424
|
+
* 落在退场浮层里的,除了它里面的另一个浮层,什么指针都挡;落在进场浮层里的,
|
|
425
|
+
* 除了鼠标都挡。什么都没挡时立刻答否。
|
|
426
|
+
*/
|
|
427
|
+
function holdsTouch(target) {
|
|
428
|
+
const doc = isDocument(target) ? target : target.ownerDocument;
|
|
429
|
+
if (doc == null || !heldDocuments.has(doc)) return false;
|
|
430
|
+
if (isInputShield(target)) return true;
|
|
431
|
+
let isHeld = false;
|
|
432
|
+
for (let node = target; node != null; node = parentAcrossShadow(node)) {
|
|
433
|
+
const state = isElement(node) ? held.get(node) : void 0;
|
|
434
|
+
if (state == null) continue;
|
|
435
|
+
const isNested = state.layer > 0 && isInNestedLayer(target, node);
|
|
436
|
+
if (state.layer > 0 && !isNested) return true;
|
|
437
|
+
if (!isNested || state.viewport > 0 || state.surface > 0) isHeld = true;
|
|
438
|
+
}
|
|
439
|
+
return isHeld && !isMouseLast(doc);
|
|
440
|
+
}
|
|
441
|
+
let isRegistered = false;
|
|
442
|
+
function startHolding(layer) {
|
|
443
|
+
if (!isRegistered) {
|
|
444
|
+
isRegistered = true;
|
|
445
|
+
registerTouchHold(holdsTouch);
|
|
446
|
+
}
|
|
447
|
+
const doc = layer.ownerDocument;
|
|
448
|
+
let layers = heldDocuments.get(doc);
|
|
449
|
+
if (layers == null) {
|
|
450
|
+
layers = /* @__PURE__ */ new Set();
|
|
451
|
+
heldDocuments.set(doc, layers);
|
|
452
|
+
}
|
|
453
|
+
layers.add(layer);
|
|
454
|
+
pressHoldFor(doc)?.hold();
|
|
455
|
+
}
|
|
456
|
+
function stopHolding(layer) {
|
|
457
|
+
heldDocuments.get(layer.ownerDocument)?.delete(layer);
|
|
458
|
+
liveLayers(layer.ownerDocument);
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* 在 `until` settle 之前把输入挡在 `layer` 外面,返回提前放开的函数(重复调用无害)。
|
|
462
|
+
* 同一个浮层上的几次暂挡叠在一起,最后一次放开时浮层才恢复。每个事件按它自己的
|
|
463
|
+
* 指针判断,不看主指针,所以触屏上的鼠标在呈现期间照样能点。
|
|
464
|
+
*/
|
|
465
|
+
function holdInput(layer, { until, scope }) {
|
|
466
|
+
let state = held.get(layer);
|
|
467
|
+
if (state == null) {
|
|
468
|
+
state = {
|
|
469
|
+
viewport: 0,
|
|
470
|
+
layer: 0,
|
|
471
|
+
surface: 0,
|
|
472
|
+
shield: null,
|
|
473
|
+
isShieldFull: false,
|
|
474
|
+
pressOpenings: /* @__PURE__ */ new Set(),
|
|
475
|
+
inertContent: null
|
|
476
|
+
};
|
|
477
|
+
held.set(layer, state);
|
|
478
|
+
}
|
|
479
|
+
startHolding(layer);
|
|
480
|
+
const isFull = scope !== "surface";
|
|
481
|
+
const raisesFullShield = isFull && (state.shield == null || !state.isShieldFull);
|
|
482
|
+
if (state.shield != null && isFull && !state.isShieldFull) {
|
|
483
|
+
removeShield(state.shield);
|
|
484
|
+
state.shield = null;
|
|
485
|
+
}
|
|
486
|
+
if (state.shield == null) {
|
|
487
|
+
state.isShieldFull = isFull || state.viewport > 0 || state.layer > 0;
|
|
488
|
+
state.shield = addShield(layer, state.isShieldFull);
|
|
489
|
+
if (isMouseLast(layer.ownerDocument)) state.shield.style.pointerEvents = "none";
|
|
490
|
+
}
|
|
491
|
+
if (scope === "viewport") state.viewport += 1;
|
|
492
|
+
else if (scope === "layer") state.layer += 1;
|
|
493
|
+
else state.surface += 1;
|
|
494
|
+
if (scope === "layer") {
|
|
495
|
+
state.shield.style.pointerEvents = "auto";
|
|
496
|
+
state.shield.style.removeProperty("clip-path");
|
|
497
|
+
if (state.layer === 1) state.inertContent = makeContentInert(layer, state.shield);
|
|
498
|
+
}
|
|
499
|
+
if (raisesFullShield) openToEarlierPresses(state, layer.ownerDocument);
|
|
500
|
+
openToMouse(state, layer.ownerDocument);
|
|
501
|
+
let isReleased = false;
|
|
502
|
+
const release = () => {
|
|
503
|
+
if (isReleased) return;
|
|
504
|
+
isReleased = true;
|
|
505
|
+
const current = held.get(layer);
|
|
506
|
+
if (current == null) return;
|
|
507
|
+
if (scope === "viewport") current.viewport -= 1;
|
|
508
|
+
else if (scope === "layer") current.layer -= 1;
|
|
509
|
+
else current.surface -= 1;
|
|
510
|
+
if (scope === "layer" && current.layer === 0 && current.inertContent != null) {
|
|
511
|
+
restoreContent(current.inertContent);
|
|
512
|
+
current.inertContent = null;
|
|
513
|
+
}
|
|
514
|
+
if (current.viewport === 0 && current.layer === 0 && current.surface === 0) {
|
|
515
|
+
if (current.shield != null) removeShield(current.shield);
|
|
516
|
+
held.delete(layer);
|
|
517
|
+
stopHolding(layer);
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
const end = "finished" in until ? until.finished : until;
|
|
521
|
+
Promise.resolve(end).then(release, release);
|
|
522
|
+
return release;
|
|
523
|
+
}
|
|
524
|
+
//#endregion
|
|
525
|
+
export { holdInput as t };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { c as sharedState, r as getLastPointerType } from "./inputStream-LZdK8luP.js";
|
|
2
|
+
//#region src/layer/inputHoldState.ts
|
|
3
|
+
/**
|
|
4
|
+
* @file inputHoldState.ts
|
|
5
|
+
* @output 输入暂挡的共享登记:哪些浮层正被挡着、各文档的按压暂挡、哪些元素是挡板
|
|
6
|
+
* @position `inputHold.ts`、`inputHoldShield.ts`、`inputHoldPress.ts` 共用的状态,
|
|
7
|
+
* 按 realm 共享,页面上另一份 core 副本挡住的浮层,手势宿主一样看得见
|
|
8
|
+
*/
|
|
9
|
+
const { held, heldDocuments, pressHolds, liveShields } = sharedState("layer/input-hold/state", 1, () => ({
|
|
10
|
+
held: /* @__PURE__ */ new WeakMap(),
|
|
11
|
+
/** 每个文档里被挡着的浮层,先挡的在前。 */
|
|
12
|
+
heldDocuments: /* @__PURE__ */ new WeakMap(),
|
|
13
|
+
pressHolds: /* @__PURE__ */ new WeakMap(),
|
|
14
|
+
liveShields: /* @__PURE__ */ new WeakSet()
|
|
15
|
+
}));
|
|
16
|
+
/** 共享输入流最后送来的指针事件是不是鼠标的。 */
|
|
17
|
+
function isMouseLast(doc) {
|
|
18
|
+
const view = doc?.defaultView;
|
|
19
|
+
return view != null && getLastPointerType(view) === "mouse";
|
|
20
|
+
}
|
|
21
|
+
/** `node` 是不是一块正在生效的挡板。需要看穿挡板的命中测试跳过它。 */
|
|
22
|
+
function isInputShield(node) {
|
|
23
|
+
return node != null && liveShields.has(node);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 文档里还在文档中的被挡浮层,先挡的在前。离开文档的浮层不再挡什么;
|
|
27
|
+
* 一个都不剩时,按压暂挡不再接新的按压,等已挡的按压结束后退订。
|
|
28
|
+
*/
|
|
29
|
+
function liveLayers(doc) {
|
|
30
|
+
const layers = heldDocuments.get(doc);
|
|
31
|
+
if (layers == null) return [];
|
|
32
|
+
for (const layer of layers) if (!layer.isConnected) layers.delete(layer);
|
|
33
|
+
if (layers.size > 0) return [...layers];
|
|
34
|
+
heldDocuments.delete(doc);
|
|
35
|
+
pressHolds.get(doc)?.release();
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { liveLayers as a, isMouseLast as i, heldDocuments as n, liveShields as o, isInputShield as r, pressHolds as s, held as t };
|