@astryx-vue/core 0.48.1 → 0.48.2
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-B1phVXj9.js → AlertDialog-CZv_5cjZ.js} +4 -4
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-BCOpv2wi.js → AppShell-BdpXOpJ0.js} +2 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-Dui84EMQ.js → AvatarGroup-DPdGsmCQ.js} +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-BtD6bun6.js → Banner-rKRkWR6U.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-D-nz570f.js → Breadcrumbs-B1LVoSmF.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-_Wy_YD0w.js → Button-ByMwpaTC.js} +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-CQKamSTm.js → ButtonGroup-DlzYnaXk.js} +1 -1
- 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-CInT4bwV.js → Carousel-PAvDguJz.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-TU_tpExs.js → Chat-CYljOQ16.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BXp8vIjt.js → CheckboxInput-B7LhVr3T.js} +2 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-CevOAULo.js → CheckboxListItem-DV3Uh8dj.js} +3 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-VoDgBMvb.js → ClickableCard-BbvpZLNq.js} +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-BFoxW_eI.js → Code-Aw-ZvPzl.js} +1 -1
- package/dist/{CodeBlock-CpcoW68P.js → CodeBlock-BZUBgEQK.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-glc_Y77Q.js → Collapsible-BOHljBHe.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-CEpOlFoY.js → CommandPalette-B5TShtZd.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BX32ZAmU.js → ComplexSelector-BewrtpKV.js} +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-gLnBJXh2.js → ContextMenu--QuYdWDQ.js} +2 -2
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-UvbTAr_0.js → DateInput-D4o83xnR.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-zGzYdcfZ.js → DateRangeInput-A-Hrvnmo.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BWqBtee7.js → DateTimeInput-DWX1Z3S_.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-BYiOO5UP.js → Dialog-CPW0FBYo.js} +1 -1
- package/dist/{Dialog--SFgs-bT.js → Dialog-PyGSnp1J.js} +1 -1
- package/dist/{DialogHeader-CsuqB8Tf.js → DialogHeader-CT4gkqfm.js} +1 -1
- 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-BQfvjMZQ.js → Drawer-BkU8kiAU.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-BwtO2fd3.js → DropdownMenu-NqkHivVB.js} +5 -5
- package/dist/Field/index.js +1 -1
- package/dist/{FieldInfoTip-CxhS1Oei.js → FieldInfoTip-Dss2g3m-.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-DUuDBMrT.js → FileInput-B00g3NMy.js} +2 -2
- package/dist/{GestureHost-C0FstEs3.js → GestureHost-CnGqeHAJ.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CXAXoL8g.js → IconButton-BilMzjDj.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/{InputClearButton-CRwLkUd4.js → InputClearButton-DEmIF1Dt.js} +1 -1
- package/dist/{Item-D4mWkTkn.js → Item-o9ot81Zr.js} +5 -5
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-0BL2xYy4.js → Lightbox-Di1n_Ghn.js} +7 -7
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-DEVHdJ7S.js → Link-OTGW6ZdS.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +4 -4
- package/dist/{List-INZ3S-pZ.js → List-Da9fS7xP.js} +2 -2
- package/dist/{ListItem-Ds5nLB5D.js → ListItem-Cp65x47S.js} +2 -2
- package/dist/{LongPressGestureRecognizer-C_DTqk3V.js → LongPressGestureRecognizer-BA7RijIc.js} +2 -2
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-CnyEpkWI.js → Markdown-DvBtpprk.js} +2 -2
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MobileNav/index.js +2 -2
- package/dist/{MobileNav-VyNrmHHo.js → MobileNav-BFH7bZOn.js} +1 -1
- package/dist/{MobileNavDrawer-DswHZ82s.js → MobileNavDrawer-BtktK3CL.js} +1 -1
- package/dist/{MobileNavToggle-BLsbreUS.js → MobileNavToggle-BpAWd0-p.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-D7l8D7sU.js → MoreMenu-CiYBQ9pt.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BQLPD0NQ.js → MultiSelector-Cd0x_5Cz.js} +2 -2
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-GFrkWRSJ.js → NavItem-BvO78bR8.js} +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu-B14_ovBG.js → NavMenu-DAukml6r.js} +1 -1
- package/dist/{NavMenuItem-DMXY_6AO.js → NavMenuItem-DVII3tzg.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DNJqobg9.js → NumberInput-BBEONs4g.js} +2 -2
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-C4j3zWvV.js → Outline-ClmviJhz.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-wrh7FgSu.js → OverflowList-rE--IEGl.js} +1 -1
- 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-CPzv-x-D.js → Pagination-Cu9RHoEu.js} +1 -1
- package/dist/{PanGestureRecognizer-WZ_rV6KY.js → PanGestureRecognizer-DZpS28MS.js} +1 -1
- package/dist/{PickerWheel-BN_Ad6FQ.js → PickerWheel-BWGMqoC0.js} +4 -4
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DGVQ7Xiz.js → Popover-CgyIJd4u.js} +2 -2
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-26idtyvm.js → PowerSearch-Cg0Fe7Ne.js} +16 -16
- package/dist/{PressTracker-CiaaoD3I.js → PressTracker-C7qJfE-H.js} +1 -1
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-BTKuboQj.js → RadioGroup-WoFdfefT.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-BBen7qdK.js → RadioListItem-CULhpyUB.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-0jm3K1vo.js → SegmentedControl-BDD1z8ow.js} +4 -4
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-CiGBc6LT.js → SelectableCard-CDu58-PT.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BEhgJPPI.js → SideNav-BQbQ4vk6.js} +2 -2
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DSJotaeW.js → Slider-IqPowFpR.js} +5 -5
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-iDROGNwb.js → Stepper-B65oFMhT.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DGS8pEOP.js → Switch-C3Z-eqrJ.js} +3 -3
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-BMlgDsmO.js → TabList-CQSr1JqR.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-vkuJ-b7o.js → Table-D58FbmZl.js} +8 -8
- package/dist/{TapGestureRecognizer-LcbkQFq0.js → TapGestureRecognizer-DWgoCDMm.js} +2 -2
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-DgwVNQv-.js → TextArea-vg40GTUn.js} +3 -3
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-CYB4kvaK.js → TextInput-BT5SNPml.js} +3 -3
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-D_1X7wBJ.js → Thumbnail-DjTQfpBD.js} +2 -2
- package/dist/{TimeField-DNZroMry.js → TimeField-DzdNGtUE.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-CLzoPxvj.js → TimeInput-CUM1fNsE.js} +1 -1
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-BdqvbKZ5.js → Timestamp-B0dj9IUl.js} +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-DQrgFtDs.js → Toast-DDOAUhO2.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-DdBYgIyN.js → ToggleButton-BQrwvaI1.js} +2 -2
- package/dist/Token/index.js +1 -1
- package/dist/{Token-Dmz6vEMX.js → Token-CYpUplLh.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-Drgs51C8.js → Tokenizer-CU2M1KhH.js} +5 -5
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Dm2TXvNQ.js → TopNav-orrt1pgV.js} +4 -4
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-Bj2qwKXr.js → TreeList-BNEnEOlP.js} +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-CbZ3CWDI.js → Typeahead-_ijsXkA2.js} +2 -2
- package/dist/{accessibleName-Cr8Gc_jb.js → accessibleName-BSQ6PVw-.js} +1 -1
- package/dist/{boxHold-JsQX9R5i.js → boxHold-DthWQaiw.js} +1 -1
- package/dist/composables/index.js +5 -5
- package/dist/{composables-C-syBXby.js → composables-G10dqPNt.js} +6 -6
- package/dist/{holdEntranceInput-Cs656CnM.js → holdEntranceInput-DK89Ky_U.js} +1 -1
- package/dist/{index-DPtUixr8.d.ts → index--pZVy2s-.d.ts} +6 -6
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-DZMs9KqG.d.ts → index-BMoR8Uoh.d.ts} +1 -1
- package/dist/{index-BbHuan0g.d.ts → index-BZ_lQz43.d.ts} +1 -1
- package/dist/{index-CdvmnNMH.d.ts → index-BaFphczL.d.ts} +1 -1
- package/dist/{index-BB9acgK8.d.ts → index-BgT6mH3U.d.ts} +1 -1
- package/dist/{index-mK1ICsVg.d.ts → index-C3JmGujU.d.ts} +1 -1
- package/dist/{index-B_XTzQhm.d.ts → index-C5HUsKnf.d.ts} +2 -2
- package/dist/{index-C7uGs5Cl.d.ts → index-C8hyLvk2.d.ts} +2 -2
- package/dist/{index-CbA8rR_b.d.ts → index-CBOv5j3c.d.ts} +1 -1
- package/dist/{index-DPcZ_oAp.d.ts → index-CJB63c7Y.d.ts} +1 -1
- package/dist/{index-BH9_uPqT.d.ts → index-COazJoIt.d.ts} +6 -6
- package/dist/{index-C8wfe0Mr.d.ts → index-D05JGsT3.d.ts} +1 -1
- package/dist/{index-DofC9Rll.d.ts → index-D3UaSnbN.d.ts} +2 -2
- package/dist/{index-BaXcJ7eE.d.ts → index-DSsuY9v9.d.ts} +1 -1
- package/dist/{index-BkjD7Pn0.d.ts → index-Dqo0KSCZ.d.ts} +71 -71
- package/dist/{index-BugRfA0z.d.ts → index-Er_LwyZ7.d.ts} +2 -2
- package/dist/{index-a6o69uPN.d.ts → index-Pad9p8CU.d.ts} +1 -1
- package/dist/{index-CFZSTi4J.d.ts → index-SdevVVTE.d.ts} +2 -2
- package/dist/{index-BA8exXNP.d.ts → index-X4S7_dmq.d.ts} +1 -1
- package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
- package/dist/{index-CA9D-3UG.d.ts → index-anFpazJ1.d.ts} +3 -3
- package/dist/{index-Cyzp19HQ.d.ts → index-ehT_1wO5.d.ts} +2 -2
- package/dist/{index-CCa_dvoF.d.ts → index-m-fFGq2e.d.ts} +2 -2
- package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
- package/dist/{index-NOXYEdOI.d.ts → index-utZGF4GR.d.ts} +1 -1
- package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.js +77 -77
- package/dist/{inputAge-C-SoLwpD.js → inputAge-Bc4vvqmK.js} +1 -1
- package/dist/{inputHold-C1LkNE02.js → inputHold-DJrwmWbJ.js} +156 -10
- package/dist/internal/touch.js +6 -6
- package/dist/{itemSlots-DQS1Q4hS.js → itemSlots-DtrAXXlG.js} +2 -2
- package/dist/{snapPagingCatcher-ivaaFuon.js → snapPagingCatcher-CJopa2KW.js} +1 -1
- package/dist/{useActionGroupTracking-CXIqZDh3.js → useActionGroupTracking-fTU4uvzA.js} +1 -1
- package/dist/{useFingerScroll-CAC6Pd3m.js → useFingerScroll-BOegur8G.js} +1 -1
- package/dist/{useGestureRecognizer-C7CXCbBp.js → useGestureRecognizer-BPFoGD43.js} +1 -1
- package/dist/{useInputStatusIcon-DBPW7-tw.js → useInputStatusIcon-DFx25PSi.js} +1 -1
- package/dist/{useMenuEntranceHold-Dkl03O-0.js → useMenuEntranceHold-Dewv7oTN.js} +1 -1
- package/dist/{useMenuPress-DKGeEWJw.js → useMenuPress-Cxn2iz5-.js} +1 -1
- package/dist/{usePressFeedback-X_9-5DMi.js → usePressFeedback-DjRpNo2t.js} +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/styles/overlay.css +36 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as getLastMousePoint, s as subscribeInput, t as getDownPresses } from "./inputStream-CFvjNDgT.js";
|
|
2
2
|
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";
|
|
3
|
+
import { r as timeOn } from "./inputAge-Bc4vvqmK.js";
|
|
3
4
|
import { n as registerTouchHold } from "./touchHold-CciGr8hU.js";
|
|
4
5
|
import { t as FOCUSABLE_SELECTOR } from "./focus-DxAD3umZ.js";
|
|
5
6
|
import { a as liveLayers, i as isMouseLast, n as heldDocuments, o as liveShields, r as isInputShield, s as pressHolds, t as held } from "./inputHoldState-B4uHEjk5.js";
|
|
@@ -57,6 +58,64 @@ function makeContentInert(layer, shield) {
|
|
|
57
58
|
function restoreContent(content) {
|
|
58
59
|
for (const [element, wasInert] of content) if (!wasInert) element.removeAttribute("inert");
|
|
59
60
|
}
|
|
61
|
+
/** 暂挡看到的帧不到两帧时用的帧间隔。 */
|
|
62
|
+
const DEFAULT_FRAME_MS = 1e3 / 60;
|
|
63
|
+
/**
|
|
64
|
+
* @param view - 暂挡所在的窗口。
|
|
65
|
+
* @param isHolding - 还在挡吗;离开文档的浮层在这里结束记帧。
|
|
66
|
+
*/
|
|
67
|
+
function createHoldFrames(view, isHolding) {
|
|
68
|
+
const now = () => view.performance.now();
|
|
69
|
+
/** 挡着期间最后一帧开始的时刻,或者暂挡开始的时刻。 */
|
|
70
|
+
let lastFrameAt = now();
|
|
71
|
+
/** 倒数第二帧开始的时刻。 */
|
|
72
|
+
let frameBeforeAt = null;
|
|
73
|
+
/** 最近几帧之间的间隔,最多八个。 */
|
|
74
|
+
const gaps = [];
|
|
75
|
+
let request = null;
|
|
76
|
+
function watch() {
|
|
77
|
+
if (request != null || typeof view.requestAnimationFrame !== "function") return;
|
|
78
|
+
request = view.requestAnimationFrame((frameTime) => {
|
|
79
|
+
request = null;
|
|
80
|
+
if (!isHolding()) return;
|
|
81
|
+
const at = Math.min(frameTime, now());
|
|
82
|
+
if (frameBeforeAt != null) {
|
|
83
|
+
gaps.push(at - lastFrameAt);
|
|
84
|
+
if (gaps.length > 8) gaps.shift();
|
|
85
|
+
}
|
|
86
|
+
frameBeforeAt = lastFrameAt;
|
|
87
|
+
lastFrameAt = at;
|
|
88
|
+
watch();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function interval() {
|
|
92
|
+
const sorted = [...gaps].sort((a, b) => a - b);
|
|
93
|
+
return sorted.length > 0 ? sorted[Math.floor(sorted.length / 2)] : DEFAULT_FRAME_MS;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
start(isNewHold) {
|
|
97
|
+
if (isNewHold) {
|
|
98
|
+
lastFrameAt = now();
|
|
99
|
+
frameBeforeAt = null;
|
|
100
|
+
}
|
|
101
|
+
watch();
|
|
102
|
+
},
|
|
103
|
+
stop() {
|
|
104
|
+
if (request != null) {
|
|
105
|
+
view.cancelAnimationFrame?.(request);
|
|
106
|
+
request = null;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
interval,
|
|
110
|
+
isAfterLongTask() {
|
|
111
|
+
const frame = interval();
|
|
112
|
+
const longest = 2 * frame;
|
|
113
|
+
const sinceFrame = now() - lastFrameAt;
|
|
114
|
+
const endsLongGap = frameBeforeAt != null && sinceFrame <= frame && lastFrameAt - frameBeforeAt > longest;
|
|
115
|
+
return sinceFrame > longest || endsLongGap;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
60
119
|
//#endregion
|
|
61
120
|
//#region src/layer/inputHoldShield.ts
|
|
62
121
|
const SWALLOWED = [
|
|
@@ -197,6 +256,15 @@ function openToEarlierPresses(state, doc) {
|
|
|
197
256
|
const HELD_POINTERS = /* @__PURE__ */ new Set(["touch", "pen"]);
|
|
198
257
|
/** 被挡的一下在暂挡结束后最多再跟多久。 */
|
|
199
258
|
const STRAY_PRESS_MS = 1e4;
|
|
259
|
+
/**
|
|
260
|
+
* `scope` 范围、挡着 `layer` 的暂挡挡不挡落在 `target` 上的新按压。盖满视口时按在哪都挡;
|
|
261
|
+
* 退场时也是,退场浮层里面的另一个浮层除外;只挡自己那块(`'surface'`)时,只挡按在浮层上的。
|
|
262
|
+
*/
|
|
263
|
+
function isPressHeldBy(scope, layer, target) {
|
|
264
|
+
if (scope === "viewport") return true;
|
|
265
|
+
if (scope === "layer") return !(isNode(target) && isInNestedLayer(target, layer));
|
|
266
|
+
return isNode(target) && containsAlongFlatTree(layer, target);
|
|
267
|
+
}
|
|
200
268
|
const POINTER_EVENTS = [
|
|
201
269
|
"pointerdown",
|
|
202
270
|
"pointermove",
|
|
@@ -228,9 +296,13 @@ function pressHoldFor(doc) {
|
|
|
228
296
|
}
|
|
229
297
|
/**
|
|
230
298
|
* 有浮层被挡期间,拦下落进 `doc` 窗口的每一下手指或笔的按压,每一下都跟到它
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
299
|
+
* 自己结束,哪怕暂挡已经放开。按压按它事件带的时间(手指落下的时刻)判断,所以
|
|
300
|
+
* 暂挡期间落下、引擎在暂挡结束后才派发的一下照样挡:按时的放开之后等
|
|
301
|
+
* `LATE_RELEASE_FRAMES` 个帧间隔,长任务里的放开之后等 `LATE_PRESS_MS`。手指或笔的
|
|
302
|
+
* 一下有 pointerdown 和 touchstart 两个起点,时间和目标相同,第二个跟第一个的判决走。
|
|
303
|
+
* 移动的鼠标从挡板穿过去。它通过共享输入流最先听到事件,被挡的事件在那里就停下:
|
|
304
|
+
* 文档、元素上的监听都听不到,按压反馈和手势宿主也听不到。每个文档一份;不再挡、
|
|
305
|
+
* 被挡的按压和它们的 click 都结束、也没有迟到的按压还能来之后退订。
|
|
234
306
|
*/
|
|
235
307
|
function createPressHold(doc) {
|
|
236
308
|
const view = doc.defaultView;
|
|
@@ -245,6 +317,11 @@ function createPressHold(doc) {
|
|
|
245
317
|
let lastPress = null;
|
|
246
318
|
/** 没写指针类型的 click 在这个时刻之前都算被挡那一下的。 */
|
|
247
319
|
let clickUntil = -Infinity;
|
|
320
|
+
/** 被挡的手指或笔起点里,另一个起点还没来的。 */
|
|
321
|
+
const heldPointerStarts = [];
|
|
322
|
+
const heldTouchStarts = [];
|
|
323
|
+
/** 结束了的暂挡,它们期间按下的按压还可能迟到。 */
|
|
324
|
+
const endedHolds = [];
|
|
248
325
|
let timer;
|
|
249
326
|
const unsubscribers = [];
|
|
250
327
|
const now = () => view.performance.now();
|
|
@@ -261,7 +338,8 @@ function createPressHold(doc) {
|
|
|
261
338
|
timer = setTimeout(stop, STRAY_PRESS_MS);
|
|
262
339
|
return;
|
|
263
340
|
}
|
|
264
|
-
const
|
|
341
|
+
const lateUntil = Math.max(-Infinity, ...endedHolds.map((hold) => hold.until));
|
|
342
|
+
const wait = Math.max(clickUntil, lateUntil) - now();
|
|
265
343
|
if (wait > 0) timer = setTimeout(stop, wait);
|
|
266
344
|
else stop();
|
|
267
345
|
};
|
|
@@ -270,6 +348,31 @@ function createPressHold(doc) {
|
|
|
270
348
|
if (isHolding) liveLayers(doc);
|
|
271
349
|
return isHolding;
|
|
272
350
|
};
|
|
351
|
+
const frames = createHoldFrames(view, () => isListening && holdsNewPress());
|
|
352
|
+
/** 取走时间和目标都对得上、正在等的那个起点。 */
|
|
353
|
+
const takeHeldStart = (starts, time, target) => {
|
|
354
|
+
const index = starts.findIndex((start) => start.time === time && start.target === target);
|
|
355
|
+
if (index === -1) return false;
|
|
356
|
+
starts.splice(index, 1);
|
|
357
|
+
return true;
|
|
358
|
+
};
|
|
359
|
+
/** 输入发生的时刻,页面时钟上。没带时间、或者时间比现在还晚的算现在。 */
|
|
360
|
+
const timeOfInput = (event) => Math.min(timeOn(view.performance, event.timeStamp) ?? now(), now());
|
|
361
|
+
/** 忘掉 `isDone` 说完了的、过了等待期的、浮层已离开文档的结束暂挡。返回有没有忘掉。 */
|
|
362
|
+
const forgetEndedHolds = (isDone) => {
|
|
363
|
+
const count = endedHolds.length;
|
|
364
|
+
for (let index = count - 1; index >= 0; index--) {
|
|
365
|
+
const hold = endedHolds[index];
|
|
366
|
+
if (isDone(hold) || now() > hold.until || !hold.layer.isConnected) endedHolds.splice(index, 1);
|
|
367
|
+
}
|
|
368
|
+
return endedHolds.length < count;
|
|
369
|
+
};
|
|
370
|
+
/** 时间不早于某次暂挡结束的输入,排在那次暂挡期间按下的每一下之后:那次不会再有迟到的了。 */
|
|
371
|
+
const noteInputAt = (time) => {
|
|
372
|
+
if (forgetEndedHolds((hold) => time >= hold.to)) settle();
|
|
373
|
+
};
|
|
374
|
+
/** 在 `time` 落在 `target` 上的一下,是不是落在一次已结束、当时挡这一下的暂挡期间,而且还在等待期内。 */
|
|
375
|
+
const wasHeldAt = (target, time) => endedHolds.some((hold) => hold.from <= time && time < hold.to && now() <= hold.until && isPressHeldBy(hold.scope, hold.layer, target));
|
|
273
376
|
/**
|
|
274
377
|
* 落在 `target` 上的新按压要不要挡。有浮层盖满视口时,按在哪都挡,退场浮层
|
|
275
378
|
* 里面的另一个浮层除外;只挡自己那块(`'surface'`)时,只挡按在浮层上的,周围页面照常。
|
|
@@ -279,8 +382,7 @@ function createPressHold(doc) {
|
|
|
279
382
|
for (const layer of liveLayers(doc)) {
|
|
280
383
|
const state = held.get(layer);
|
|
281
384
|
if (state == null) continue;
|
|
282
|
-
if (state.viewport > 0 || state.layer > 0 &&
|
|
283
|
-
if (state.surface > 0 && isNode(target) && containsAlongFlatTree(layer, target)) return true;
|
|
385
|
+
if (state.viewport > 0 && isPressHeldBy("viewport", layer, target) || state.layer > 0 && isPressHeldBy("layer", layer, target) || state.surface > 0 && isPressHeldBy("surface", layer, target)) return true;
|
|
284
386
|
}
|
|
285
387
|
return false;
|
|
286
388
|
};
|
|
@@ -323,10 +425,14 @@ function createPressHold(doc) {
|
|
|
323
425
|
};
|
|
324
426
|
const onPointer = (event) => {
|
|
325
427
|
const { pointerId, pointerType, type } = event;
|
|
428
|
+
const time = timeOfInput(event);
|
|
429
|
+
noteInputAt(time);
|
|
326
430
|
if (HELD_POINTERS.has(pointerType) && type !== "pointerdown" && !pointers.has(pointerId)) followEarlierPress(event);
|
|
327
431
|
if ((HELD_POINTERS.has(pointerType) ? type === "pointerdown" || type === "pointermove" : pointerType === "mouse" && type === "pointermove" && event.buttons === 0) && holdsNewPress()) followPointer(pointerType);
|
|
328
432
|
if (type === "pointerdown") {
|
|
329
|
-
|
|
433
|
+
const isFingerOrPen = HELD_POINTERS.has(pointerType);
|
|
434
|
+
const followsHeldTouch = isFingerOrPen && takeHeldStart(heldTouchStarts, time, event.target);
|
|
435
|
+
if (!(followsHeldTouch || isFingerOrPen && (holdsPressAt(event.target) || wasHeldAt(event.target, time)))) {
|
|
330
436
|
pointers.delete(pointerId);
|
|
331
437
|
lastPress = "free";
|
|
332
438
|
clickUntil = -Infinity;
|
|
@@ -334,7 +440,12 @@ function createPressHold(doc) {
|
|
|
334
440
|
return false;
|
|
335
441
|
}
|
|
336
442
|
pointers.add(pointerId);
|
|
443
|
+
if (!followsHeldTouch) heldPointerStarts.push({
|
|
444
|
+
time,
|
|
445
|
+
target: event.target
|
|
446
|
+
});
|
|
337
447
|
lastPress = "held";
|
|
448
|
+
settle();
|
|
338
449
|
captureToShield(event);
|
|
339
450
|
} else if (!pointers.has(pointerId)) return false;
|
|
340
451
|
swallow(event);
|
|
@@ -346,11 +457,14 @@ function createPressHold(doc) {
|
|
|
346
457
|
};
|
|
347
458
|
const onTouch = (event) => {
|
|
348
459
|
const { changedTouches, touches: down, type } = event;
|
|
460
|
+
const time = timeOfInput(event);
|
|
461
|
+
noteInputAt(time);
|
|
349
462
|
const changed = Array.from(changedTouches);
|
|
350
463
|
if (type === "touchstart") {
|
|
351
464
|
const live = new Set(Array.from(down, (touch) => touch.identifier));
|
|
352
465
|
for (const identifier of touches) if (!live.has(identifier)) touches.delete(identifier);
|
|
353
|
-
const
|
|
466
|
+
const followers = changed.filter((touch) => takeHeldStart(heldPointerStarts, time, touch.target));
|
|
467
|
+
const heldTouches = changed.filter((touch) => followers.includes(touch) || holdsPressAt(touch.target) || wasHeldAt(touch.target, time));
|
|
354
468
|
if (heldTouches.length === 0) {
|
|
355
469
|
for (const touch of changed) touches.delete(touch.identifier);
|
|
356
470
|
lastPress = "free";
|
|
@@ -358,8 +472,15 @@ function createPressHold(doc) {
|
|
|
358
472
|
settle();
|
|
359
473
|
return false;
|
|
360
474
|
}
|
|
361
|
-
for (const touch of heldTouches)
|
|
475
|
+
for (const touch of heldTouches) {
|
|
476
|
+
touches.add(touch.identifier);
|
|
477
|
+
if (!followers.includes(touch)) heldTouchStarts.push({
|
|
478
|
+
time,
|
|
479
|
+
target: touch.target
|
|
480
|
+
});
|
|
481
|
+
}
|
|
362
482
|
lastPress = "held";
|
|
483
|
+
settle();
|
|
363
484
|
event.stopImmediatePropagation();
|
|
364
485
|
return true;
|
|
365
486
|
}
|
|
@@ -375,6 +496,7 @@ function createPressHold(doc) {
|
|
|
375
496
|
return true;
|
|
376
497
|
};
|
|
377
498
|
const onPress = (event) => {
|
|
499
|
+
noteInputAt(timeOfInput(event));
|
|
378
500
|
if (event.detail === 0) return false;
|
|
379
501
|
const { pointerType } = event;
|
|
380
502
|
if (lastPress === "held" && (pointerType == null || pointerType === "" || HELD_POINTERS.has(pointerType)) && (isPressDown() || now() <= clickUntil)) {
|
|
@@ -385,6 +507,7 @@ function createPressHold(doc) {
|
|
|
385
507
|
};
|
|
386
508
|
const pressHold = {
|
|
387
509
|
hold() {
|
|
510
|
+
frames.start(!isHolding);
|
|
388
511
|
isHolding = true;
|
|
389
512
|
if (timer !== void 0) {
|
|
390
513
|
clearTimeout(timer);
|
|
@@ -394,15 +517,29 @@ function createPressHold(doc) {
|
|
|
394
517
|
release() {
|
|
395
518
|
if (!isHolding) return;
|
|
396
519
|
isHolding = false;
|
|
520
|
+
frames.stop();
|
|
397
521
|
settle();
|
|
398
522
|
},
|
|
399
|
-
holds: (pointerId) => pointers.has(pointerId)
|
|
523
|
+
holds: (pointerId) => pointers.has(pointerId),
|
|
524
|
+
ended(hold) {
|
|
525
|
+
forgetEndedHolds(() => false);
|
|
526
|
+
if (!hold.layer.isConnected) return;
|
|
527
|
+
const wait = frames.isAfterLongTask() ? 500 : 2 * frames.interval();
|
|
528
|
+
endedHolds.push({
|
|
529
|
+
...hold,
|
|
530
|
+
until: hold.to + wait
|
|
531
|
+
});
|
|
532
|
+
}
|
|
400
533
|
};
|
|
401
534
|
function stop() {
|
|
402
535
|
if (!isListening) return;
|
|
403
536
|
isListening = false;
|
|
404
537
|
if (pressHolds.get(doc) === pressHold) pressHolds.delete(doc);
|
|
405
538
|
if (timer !== void 0) clearTimeout(timer);
|
|
539
|
+
frames.stop();
|
|
540
|
+
endedHolds.length = 0;
|
|
541
|
+
heldPointerStarts.length = 0;
|
|
542
|
+
heldTouchStarts.length = 0;
|
|
406
543
|
for (const unsubscribe of unsubscribers.splice(0)) unsubscribe();
|
|
407
544
|
}
|
|
408
545
|
unsubscribers.push(...POINTER_EVENTS.map((type) => subscribeInput(view, type, onPointer, {
|
|
@@ -415,6 +552,7 @@ function createPressHold(doc) {
|
|
|
415
552
|
cancels: true,
|
|
416
553
|
first: true
|
|
417
554
|
})));
|
|
555
|
+
frames.start(false);
|
|
418
556
|
return pressHold;
|
|
419
557
|
}
|
|
420
558
|
//#endregion
|
|
@@ -498,12 +636,20 @@ function holdInput(layer, { until, scope }) {
|
|
|
498
636
|
}
|
|
499
637
|
if (raisesFullShield) openToEarlierPresses(state, layer.ownerDocument);
|
|
500
638
|
openToMouse(state, layer.ownerDocument);
|
|
639
|
+
const clock = layer.ownerDocument.defaultView?.performance;
|
|
640
|
+
const from = clock?.now() ?? 0;
|
|
501
641
|
let isReleased = false;
|
|
502
642
|
const release = () => {
|
|
503
643
|
if (isReleased) return;
|
|
504
644
|
isReleased = true;
|
|
505
645
|
const current = held.get(layer);
|
|
506
646
|
if (current == null) return;
|
|
647
|
+
pressHolds.get(layer.ownerDocument)?.ended({
|
|
648
|
+
layer,
|
|
649
|
+
scope,
|
|
650
|
+
from,
|
|
651
|
+
to: clock?.now() ?? from
|
|
652
|
+
});
|
|
507
653
|
if (scope === "viewport") current.viewport -= 1;
|
|
508
654
|
else if (scope === "layer") current.layer -= 1;
|
|
509
655
|
else current.surface -= 1;
|
package/dist/internal/touch.js
CHANGED
|
@@ -6,13 +6,13 @@ import { n as createMotionEngine, t as animatorFor } from "../animator-ChW9baIw.
|
|
|
6
6
|
import { t as cubicBezier } from "../bezier-Dko5MnTp.js";
|
|
7
7
|
import { t as resolveMotion } from "../resolveMotion-BHR1cz0Q.js";
|
|
8
8
|
import { a as NAVIGATION_PUSH_SPRING, i as NAVIGATION_POP_SPRING, n as NAVIGATION_BAR_ELEMENTS_SPRING, r as NAVIGATION_INTERACTIVE_POP_FINISH_SPRING } from "../springs-BqW2WrS-.js";
|
|
9
|
-
import { i as ALL_NATIVE_TOUCH, t as getGestureHost } from "../GestureHost-
|
|
10
|
-
import { t as PanGestureRecognizer } from "../PanGestureRecognizer-
|
|
9
|
+
import { i as ALL_NATIVE_TOUCH, t as getGestureHost } from "../GestureHost-CnGqeHAJ.js";
|
|
10
|
+
import { t as PanGestureRecognizer } from "../PanGestureRecognizer-DZpS28MS.js";
|
|
11
11
|
import { t as TOUCH_QUERY } from "../touchQueries-xy5IeZfe.js";
|
|
12
12
|
import { t as isCoarsePointer } from "../coarsePointer-BWNSUIY8.js";
|
|
13
13
|
import { t as isRtlElement } from "../isRtlElement-NHuH48AA.js";
|
|
14
14
|
import { n as reducedMotionFade } from "../reducedMotion-CgciA13L.js";
|
|
15
|
-
import { t as LongPressGestureRecognizer } from "../LongPressGestureRecognizer-
|
|
15
|
+
import { t as LongPressGestureRecognizer } from "../LongPressGestureRecognizer-BA7RijIc.js";
|
|
16
16
|
import { t as focusForLastInput } from "../focusReturn-CXHM5lOY.js";
|
|
17
17
|
import { i as rubberBandSlope, r as rubberBandInverse, t as rubberBand } from "../rubberBand-CE3LYEUx.js";
|
|
18
18
|
import { c as measureLogicalScrollAxis } from "../scrollGeometry-ajfQQRJt.js";
|
|
@@ -20,9 +20,9 @@ import { n as observeResize } from "../sharedResizeObserver-BnRTJaNh.js";
|
|
|
20
20
|
import { t as mapProgress } from "../progress-FQfSgLZC.js";
|
|
21
21
|
import { t as isFocusLost } from "../focusLeaving-mWmyOnpz.js";
|
|
22
22
|
import { t as useFocusAcrossSwap } from "../focusAcrossSwap-DYmqoqKg.js";
|
|
23
|
-
import { t as TapGestureRecognizer } from "../TapGestureRecognizer-
|
|
24
|
-
import { t as useGestureRecognizer } from "../useGestureRecognizer-
|
|
25
|
-
import { t as useFingerScroll } from "../useFingerScroll-
|
|
23
|
+
import { t as TapGestureRecognizer } from "../TapGestureRecognizer-DWgoCDMm.js";
|
|
24
|
+
import { t as useGestureRecognizer } from "../useGestureRecognizer-BPFoGD43.js";
|
|
25
|
+
import { t as useFingerScroll } from "../useFingerScroll-BOegur8G.js";
|
|
26
26
|
//#region src/gestures/ScreenEdgePanGestureRecognizer.ts
|
|
27
27
|
/**
|
|
28
28
|
* How far past `edgeRegion` a view still counts as the edge zone, px: layout
|
|
@@ -6,8 +6,8 @@ import { n as createMotionEngine, r as SETTLE_THRESHOLD } from "./animator-ChW9b
|
|
|
6
6
|
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
7
7
|
import { t as resolveMotion } from "./resolveMotion-BHR1cz0Q.js";
|
|
8
8
|
import { d as springs, u as registerSpringsTable } from "./springs-BqW2WrS-.js";
|
|
9
|
-
import { t as getGestureHost } from "./GestureHost-
|
|
10
|
-
import { t as PanGestureRecognizer } from "./PanGestureRecognizer-
|
|
9
|
+
import { t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
|
|
10
|
+
import { t as PanGestureRecognizer } from "./PanGestureRecognizer-DZpS28MS.js";
|
|
11
11
|
import { t as resolveSnapPoint } from "./resolveSnapPoint-Cm2KePTm.js";
|
|
12
12
|
import { computed, inject, provide } from "vue";
|
|
13
13
|
//#region src/gestures/createPanGesture.ts
|
|
@@ -4,7 +4,7 @@ import { d as registerScrollTable, f as scroll } from "./gestures-BpGkqgpV.js";
|
|
|
4
4
|
import { r as SETTLE_THRESHOLD } from "./animator-ChW9baIw.js";
|
|
5
5
|
import { t as resolveMotion } from "./resolveMotion-BHR1cz0Q.js";
|
|
6
6
|
import { n as solveDecay } from "./decay-ClFADeqT.js";
|
|
7
|
-
import { t as LongPressGestureRecognizer } from "./LongPressGestureRecognizer-
|
|
7
|
+
import { t as LongPressGestureRecognizer } from "./LongPressGestureRecognizer-BA7RijIc.js";
|
|
8
8
|
//#region src/motion/coast.ts
|
|
9
9
|
/** A curve that holds `end` from `duration` on. */
|
|
10
10
|
function settling(duration, end, at, velocity) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as isTrackedByGroup, v as GROUP_PRESS_POINTERS, y as PRESS_GROUP_ITEM_ATTRIBUTE } from "./pressSlot-WuaTVSU4.js";
|
|
2
2
|
import { a as resolveGroupTouch, i as createActionGroupTracker } from "./useTouchHitArea-Cs4K31MA.js";
|
|
3
|
-
import { n as msSinceInput } from "./inputAge-
|
|
3
|
+
import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
|
|
4
4
|
import { n as isInsideScrollView } from "./scrollView-D2GwmeFx.js";
|
|
5
5
|
import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-VrM5-7aV.js";
|
|
6
6
|
import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as subscribeInput } from "./inputStream-CFvjNDgT.js";
|
|
2
2
|
import { l as isNode, o as isDocument } from "./flatTree-BB4yPMNL.js";
|
|
3
|
-
import { t as getGestureHost } from "./GestureHost-
|
|
3
|
+
import { t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
|
|
4
4
|
import { r as watchCoarsePointer, t as isCoarsePointer } from "./coarsePointer-BWNSUIY8.js";
|
|
5
5
|
import { t as useAttachment } from "./useAttachment-CGiD9rt6.js";
|
|
6
6
|
//#region src/gestures/fingerScroll.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as sharedState } from "./sharedRealm-BYHklCVM.js";
|
|
2
|
-
import { l as internals, t as getGestureHost } from "./GestureHost-
|
|
2
|
+
import { l as internals, t as getGestureHost } from "./GestureHost-CnGqeHAJ.js";
|
|
3
3
|
import { t as useAttachment } from "./useAttachment-CGiD9rt6.js";
|
|
4
4
|
import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
|
|
5
5
|
//#region src/gestures/gestureSync.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _sfc_main } from "./FieldIcon-COfz-h_b.js";
|
|
2
|
-
import { t as _sfc_main$1 } from "./FieldInfoTip-
|
|
2
|
+
import { t as _sfc_main$1 } from "./FieldInfoTip-Dss2g3m-.js";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
4
|
//#region src/composables/useInputStatusIcon.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as withoutClickGuard, i as endsTouch, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-DOe-7mpi.js";
|
|
2
|
-
import { n as msSinceInput } from "./inputAge-
|
|
2
|
+
import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
|
|
3
3
|
import { s as currentGesture } from "./layerDepth-DxI-GE81.js";
|
|
4
4
|
import { t as focusForLastInput } from "./focusReturn-CXHM5lOY.js";
|
|
5
5
|
import { t as claimPress } from "./pressClaim-DvdlIn4w.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as finish, d as PRESS_CONTAINER_ATTRIBUTE, f as isTrackedByGroup, i as finger, l as PRESSABLE_ATTRIBUTE, n as apply, o as releaseIfDead, p as pressSurfaceAt, r as button, s as takeOver, u as PRESS_ACTION_ATTRIBUTE } from "./pressSlot-WuaTVSU4.js";
|
|
2
2
|
import { s as subscribeInput } from "./inputStream-CFvjNDgT.js";
|
|
3
3
|
import { s as UIKIT_PRESS } from "./gestures-BpGkqgpV.js";
|
|
4
|
-
import { n as msSinceInput } from "./inputAge-
|
|
4
|
+
import { n as msSinceInput } from "./inputAge-Bc4vvqmK.js";
|
|
5
5
|
import { n as isInsideScrollView } from "./scrollView-D2GwmeFx.js";
|
|
6
6
|
import { a as idlePressGesture, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS } from "./pressGesture-VrM5-7aV.js";
|
|
7
7
|
import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
|
package/dist/utils/index.js
CHANGED
|
@@ -5,6 +5,6 @@ import { a as unobserveResize, n as observeResize } from "../sharedResizeObserve
|
|
|
5
5
|
import { a as formatDisplayTime12h, i as createISOTimeString, n as clampTime, o as formatDisplayTime24h, r as compareTime, t as adjustTime, u as parseTimeInput } from "../timeParser-nVL5sIwT.js";
|
|
6
6
|
import { A as plainDateSetFirstOfMonth, C as plainDateIsAfter, D as plainDateMax, E as plainDateIsInRange, F as plainDateToday, I as plainDateWeekFieldName, M as plainDateToDate, N as plainDateToISO, O as plainDateMin, P as plainDateToInstant, S as plainDateGetWeekNumber, T as plainDateIsEqual, _ as plainDateDiffDays, a as DATE_FORMAT_SHORT_WITH_WEEKDAY, b as plainDateFromISO, c as DATE_FORMAT_WITH_WEEKDAY, d as getDaysInMonth, f as getTimeZoneParts, g as plainDateDayOfWeek, h as plainDateCreate, i as DATE_FORMAT_SHORT, j as plainDateSetStartOfWeek, k as plainDateSetEndOfWeekExclusive, l as SHARED_DATE_FORMAT_OPTIONS, m as plainDateAddMonths, n as DATE_FORMAT_MONTH_ONLY, o as DATE_FORMAT_SHORT_WITH_YEAR, p as plainDateAddDays, r as DATE_FORMAT_MONTH_YEAR, s as DATE_FORMAT_WEEKDAY_ONLY, t as DATE_FORMAT_LONG, u as formatSharedDate, v as plainDateFormat, w as plainDateIsBefore, x as plainDateFromInstant, y as plainDateFromDate } from "../plainDate-By2VjeSI.js";
|
|
7
7
|
import { a as pickerPresentationFromNativePicker, c as resolvePickerPresentation, i as effectivePickerPresentation, l as isLocaleDayFirst, o as presentationFromNativePicker, r as effectiveInputPresentation, s as resolveInputPresentation, t as DEFAULT_INPUT_PRESENTATION, u as parseDateInput } from "../inputPresentation-Br70N2eS.js";
|
|
8
|
-
import { t as useFingerScroll } from "../useFingerScroll-
|
|
8
|
+
import { t as useFingerScroll } from "../useFingerScroll-BOegur8G.js";
|
|
9
9
|
import { a as groupItems, i as getItemGroup, n as getInputARIA, o as normalizeDayOfWeek, r as joinAriaIDs, s as chainEventHandlers, t as parseStyleKey } from "../utils-BW62BpDR.js";
|
|
10
10
|
export { DATE_FORMAT_LONG, DATE_FORMAT_MONTH_ONLY, DATE_FORMAT_MONTH_YEAR, DATE_FORMAT_SHORT, DATE_FORMAT_SHORT_WITH_WEEKDAY, DATE_FORMAT_SHORT_WITH_YEAR, DATE_FORMAT_WEEKDAY_ONLY, DATE_FORMAT_WITH_WEEKDAY, DEFAULT_INPUT_PRESENTATION, SHARED_DATE_FORMAT_OPTIONS, adjustTime, chainEventHandlers, characterCount, clampTime, compareTime, createISOTimeString, plainDateToISO as dateToISO, plainDateToISO, effectiveInputPresentation, effectivePickerPresentation, firstCharacter, formatDisplayTime12h, formatDisplayTime24h, formatSharedDate, getDaysInMonth, getInputARIA, getItemGroup, getTimeZoneParts, groupItems, isLocaleDayFirst, isSafeDestination, isSafeUrl, joinAriaIDs, normalizeDayOfWeek, observeResize, parseDateInput, plainDateFromISO as parseISO, plainDateFromISO, parseStyleKey, parseTimeInput, pickerPresentationFromNativePicker, plainDateAddDays, plainDateAddMonths, plainDateCreate, plainDateDayOfWeek, plainDateDiffDays, plainDateFormat, plainDateFromDate, plainDateFromInstant, plainDateGetWeekNumber, plainDateIsAfter, plainDateIsBefore, plainDateIsEqual, plainDateIsInRange, plainDateMax, plainDateMin, plainDateSetEndOfWeekExclusive, plainDateSetFirstOfMonth, plainDateSetStartOfWeek, plainDateToDate, plainDateToInstant, plainDateToday, plainDateWeekFieldName, presentationFromNativePicker, resolveInputPresentation, resolvePickerPresentation, sanitizeUrl, truncateCharacters, unobserveResize, scrollEventTarget as unstable_scrollEventTarget, scrollportTop as unstable_scrollportTop, scrollsPage as unstable_scrollsPage, setScrollAnchoringOff as unstable_setScrollAnchoringOff, useFingerScroll as unstable_useFingerScroll };
|
package/package.json
CHANGED
package/styles/overlay.css
CHANGED
|
@@ -21,8 +21,12 @@
|
|
|
21
21
|
gap: var(--astryx-spacing-2, 8px);
|
|
22
22
|
padding: var(--astryx-spacing-3, 12px);
|
|
23
23
|
pointer-events: none;
|
|
24
|
-
|
|
25
|
-
transition-
|
|
24
|
+
/* The clip path is discrete: its delay times it against the fade. */
|
|
25
|
+
transition-property: opacity, visibility, transform, clip-path;
|
|
26
|
+
transition-duration:
|
|
27
|
+
var(--astryx-duration-fast-max, 165ms), var(--astryx-duration-fast-max, 165ms),
|
|
28
|
+
var(--astryx-duration-fast-max, 165ms), 0s;
|
|
29
|
+
transition-behavior: allow-discrete;
|
|
26
30
|
transition-timing-function: var(--astryx-ease-standard, cubic-bezier(0.24, 1, 0.4, 1));
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -105,12 +109,18 @@
|
|
|
105
109
|
|
|
106
110
|
/*
|
|
107
111
|
* Hidden, driven by CSS: the reveal is selected on the container, so the
|
|
108
|
-
* scrim itself only carries the resting state here.
|
|
112
|
+
* scrim itself only carries the resting state here. It hides with opacity,
|
|
113
|
+
* not visibility, so its content stays in the tab order: Tab reaches an
|
|
114
|
+
* action and focus within reveals it. At rest a clip path keeps the content
|
|
115
|
+
* out of hit-testing, content that sets its own pointer-events and a touch
|
|
116
|
+
* tap that comes before the hover state included. On hide the clip applies
|
|
117
|
+
* once the fade ends.
|
|
109
118
|
*/
|
|
110
119
|
.astryx-overlay-scrim[data-visibility='hover'],
|
|
111
120
|
.astryx-overlay-scrim[data-visibility='focus'] {
|
|
112
121
|
opacity: 0;
|
|
113
|
-
|
|
122
|
+
clip-path: inset(50%);
|
|
123
|
+
transition-delay: 0s, 0s, 0s, var(--astryx-duration-fast-max, 165ms);
|
|
114
124
|
}
|
|
115
125
|
|
|
116
126
|
.astryx-overlay-scrim[data-position='bottom'][data-visibility='hidden'],
|
|
@@ -125,26 +135,32 @@
|
|
|
125
135
|
transform: translateY(-100%);
|
|
126
136
|
}
|
|
127
137
|
|
|
128
|
-
/*
|
|
138
|
+
/*
|
|
139
|
+
* Hover needs a pointer that can hover; a touch device toggles by tap. On a
|
|
140
|
+
* hover reveal the clip lifts one frame after the fade starts, so the first
|
|
141
|
+
* paint and the first click land on the same frame.
|
|
142
|
+
*/
|
|
129
143
|
@media (hover: hover) {
|
|
130
144
|
.astryx-overlay-scope:hover .astryx-overlay-scrim[data-visibility='hover'] {
|
|
131
145
|
opacity: 1;
|
|
132
|
-
visibility: visible;
|
|
133
146
|
pointer-events: auto;
|
|
134
147
|
transform: translateY(0);
|
|
148
|
+
clip-path: none;
|
|
149
|
+
transition-delay: 0s, 0s, 0s, 1ms;
|
|
135
150
|
}
|
|
136
151
|
}
|
|
137
152
|
|
|
138
153
|
/*
|
|
139
|
-
* Focus reveals the overlay for keyboard users, and keeps it on
|
|
140
|
-
* the content inside holds focus.
|
|
154
|
+
* Focus reveals the overlay for keyboard users at once, and keeps it on
|
|
155
|
+
* screen while the content inside holds focus.
|
|
141
156
|
*/
|
|
142
157
|
.astryx-overlay-scope:focus-within .astryx-overlay-scrim[data-visibility='hover'],
|
|
143
158
|
.astryx-overlay-scope:focus-within .astryx-overlay-scrim[data-visibility='focus'] {
|
|
144
159
|
opacity: 1;
|
|
145
|
-
visibility: visible;
|
|
146
160
|
pointer-events: auto;
|
|
147
161
|
transform: translateY(0);
|
|
162
|
+
clip-path: none;
|
|
163
|
+
transition-delay: 0s;
|
|
148
164
|
}
|
|
149
165
|
|
|
150
166
|
@starting-style {
|
|
@@ -163,9 +179,18 @@
|
|
|
163
179
|
}
|
|
164
180
|
}
|
|
165
181
|
|
|
182
|
+
/* Under reduced motion, from the setting or a theme, the scrim shows and hides at once. */
|
|
166
183
|
@media (prefers-reduced-motion: reduce) {
|
|
167
|
-
.astryx-overlay-scrim
|
|
168
|
-
|
|
184
|
+
.astryx-overlay-scrim,
|
|
185
|
+
.astryx-overlay-scope:is(:hover, :focus-within, *) .astryx-overlay-scrim[data-visibility] {
|
|
186
|
+
transition-duration: 0s;
|
|
187
|
+
transition-delay: 0s;
|
|
169
188
|
}
|
|
170
189
|
}
|
|
190
|
+
|
|
191
|
+
:where([data-astryx-reduced-motion]) .astryx-overlay-scrim,
|
|
192
|
+
:where([data-astryx-reduced-motion]) .astryx-overlay-scope:is(:hover, :focus-within, *) .astryx-overlay-scrim[data-visibility] {
|
|
193
|
+
transition-duration: 0s;
|
|
194
|
+
transition-delay: 0s;
|
|
195
|
+
}
|
|
171
196
|
}
|