@astryx-vue/core 0.33.3 → 0.33.4
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-BwH9WU-t.js → AlertDialog-CwyMvZEI.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-BwzRYOky.js → AppShell-4hWTPKSD.js} +5 -5
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-C0V--ipx.js → AvatarGroup-BIPixZOb.js} +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-Ds5KIeES.js → Banner-CMXebR4Y.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-DWAYp-JJ.js → Breadcrumbs-BPxPAEHQ.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-X-Q_ghg8.js → Button-B7PvGVt6.js} +2 -2
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-DsYdUmF1.js → ButtonGroup-BkwQ0h97.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-D8uVV1J_.js → Carousel-BmfKiv69.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Dy-icS2C.js → Chat-2AG37D51.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CiUtutIS.js → CheckboxInput-rbMgS8ZL.js} +79 -74
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-B6sV7-Og.js → CheckboxListItem-Ckt1Cwt_.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DDk_RtHd.js → ClickableCard-Dh0tOQv-.js} +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-r2-MlpBB.js → CodeBlock-ZluDuBT7.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-0XI3tKgj.js → Collapsible-B_9H2wV_.js} +3 -3
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BYR0Lxxd.js → CommandPalette-Cbr-WWC8.js} +2 -2
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-CIXrqCoX.js → ComplexSelector-BPvBCUJk.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-CfVyaP5v.js → ContextMenu-BF4ALBZn.js} +3 -3
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DRzZ8dY7.js → DateInput-C7PICKR2.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DL2aOQXJ.js → DateRangeInput-Dt-BA7AA.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-KWkpamG4.js → DateTimeInput-XEESzGJf.js} +4 -4
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-BM5VEE8z.js → Dialog-B1xC9xMC.js} +1 -1
- package/dist/{Dialog-CJzq1gms.js → Dialog-BmdNX3NC.js} +1 -1
- package/dist/{DialogHeader-Do4EOX2f.js → DialogHeader-DcP4xAk3.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-DuQ620WO.js → Drawer-CdHbZffI.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-CbENfJOq.js → DropdownMenu-C1494BkC.js} +6 -6
- package/dist/Field/index.js +3 -3
- package/dist/{Field-B1fsgAqp.js → Field-KszpxUdx.js} +1 -1
- package/dist/{FieldInfoTip-CntJCcnM.js → FieldInfoTip-CY9BTVtK.js} +1 -1
- package/dist/{FieldLabel-D56uJrRE.js → FieldLabel-KPCTcJpO.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-EjlruVVX.js → FileInput-BTIn6OoY.js} +3 -3
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-CXg9qTRM.js → IconButton-e5xeGow-.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-jFet-iAx.js → InfoTip-DpvV8zrm.js} +1 -1
- package/dist/{InputClearButton-DBTrsrSH.js → InputClearButton-BzxJH6mk.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-D7UBxktR.js → InputGroup-Bj4hksiI.js} +1 -1
- package/dist/{Item-DbalBZXc.js → Item-D62Cibn1.js} +2 -2
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-BEJwZon4.js → Layout-SJoCw8NC.js} +1 -1
- package/dist/{LayoutPanel-BgJdL0KV.js → LayoutPanel-DZN4RxX6.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DJXB22k0.js → Lightbox-FWtAn7X5.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-eXwB0Hjg.js → Link-BxK3lbA-.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-C5B8uYyn.js → ListItem-B4jt3EXr.js} +3 -3
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-COub2yng.js → Markdown-CsoseOGe.js} +2 -2
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DI5yDKfp.js → MobileNavToggle-AgT6hzTg.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-C7gie2PE.js → MoreMenu-4zcxptan.js} +5 -5
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-CnGUU8P3.js → MultiSelector-LuAE71wE.js} +4 -4
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-Cciu9aok.js → NavItem-mcmzIshL.js} +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu--iyy_m84.js → NavMenu-Bp35Bk7_.js} +1 -1
- package/dist/{NavMenuItem-BmAm-Cv8.js → NavMenuItem-DviXkleh.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-CD9sHbON.js → NumberInput-CxzhFPQw.js} +3 -3
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-vieAJS2J.js → Outline-KpA-ffCT.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-YLVHypB3.js → OverflowList-DRZxrAYq.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-Bnkp4oAA.js → Pagination-B3JMAlnl.js} +2 -2
- package/dist/{PanGestureRecognizer-CzIWpazn.js → PanGestureRecognizer-R5y8LZ9h.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CYJ1z_7L.js → Popover-CQr95J2s.js} +4 -4
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DEpXEmgs.js → PowerSearch-BEaqgsZa.js} +18 -18
- package/dist/{PressTracker-L5-Ark_9.js → PressTracker-Dze87pxw.js} +2 -2
- 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-BdO-xZv0.js → RadioGroup-CpMYh9eL.js} +8 -5
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-DzGPuWTt.js → RadioListItem-n-h5r1GO.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-Dcel1HkU.js → ResizeHandle-J9-dAMuo.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/SegmentedControl-nz9d6e0y.js +1465 -0
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-BZTF6qw-.js → SelectableCard-C018jluo.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-SkwSbf4j.js → Selector-CW1jaM4F.js} +2 -2
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-BxJfJU95.js → SideNav-DgRpBPuP.js} +6 -6
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-ORmi7QJ7.js → Slider-Bz72itTP.js} +6 -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-C4-wtxn4.js → Stepper-Af_rH8C4.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-Cw1UKVjQ.js → Switch-BYsb1gKn.js} +11 -82
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DNDe2ipJ.js → TabList-Cgw2IuL-.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-CqppyRk8.js → Table-DzE-4_og.js} +11 -11
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-I3ghDb9r.js → TextArea-DrYMTaZm.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-Xz_ibpOl.js → TextInput-B-1cuwcB.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-bS62Tr_f.js → Thumbnail-DeMaRkDU.js} +2 -2
- package/dist/{TimeField-Bsb8n22d.js → TimeField-C1Nv-fz3.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D40_6GrX.js → TimeInput-Dvh6qqHI.js} +2 -2
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-Bt9ZR975.js → Timestamp-wFkl39dn.js} +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BQxfIeVU.js → Toast-CO6Z1r1s.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-IFhFMpQh.js → ToggleButton-DPpjDYxP.js} +3 -3
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CpmqfG4i.js → Token-DZkUAIYA.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-Dvr7ICpS.js → Tokenizer-CX7D4klL.js} +7 -7
- 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-Cw_dcKpf.js → TopNav-D8Hc_kQ-.js} +3 -3
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CBfKKbUQ.js → TreeList-lNyuRBOk.js} +4 -4
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-D9-WjsCU.js → Typeahead-BiosTaFo.js} +3 -3
- package/dist/{accessibleName-Cw9s1690.js → accessibleName-f5xApbXG.js} +2 -2
- package/dist/{assertOptions-V_jJxpn9.js → assertOptions-Byu4Yqfg.js} +1 -1
- package/dist/boxHold-YML2o6iP.js +170 -0
- package/dist/browserClickWait-DIj9tkLa.js +77 -0
- package/dist/{coarsePointer-DGnAPIcU.js → coarsePointer-BWNSUIY8.js} +2 -32
- package/dist/composables/index.js +6 -6
- package/dist/{composables-BJoAw6XA.js → composables-CPDafrux.js} +3 -2
- package/dist/{context-WDet15_N.js → context-C1MPE6J5.js} +1 -1
- package/dist/{geometry-CoQRz-F1.js → geometry-CGa3nNzZ.js} +6 -131
- package/dist/{holdEntranceInput-BsusS3bM.js → holdEntranceInput-C8B_DYYs.js} +1 -1
- package/dist/{index--kbwaSXW.d.ts → index-B6GTqpW-.d.ts} +3 -3
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-CY0KtUSC.d.ts → index-BdICULsZ.d.ts} +85 -85
- package/dist/{index-ZKBj_1nu.d.ts → index-BfFpUr1B.d.ts} +1 -1
- package/dist/{index-CTjkJP4x.d.ts → index-Bgk1Rj2A.d.ts} +1 -1
- package/dist/{index-BjqoHLMq.d.ts → index-C1e8LNx2.d.ts} +1 -1
- package/dist/{index-CKnr0JlT.d.ts → index-C4S65SAW.d.ts} +1 -1
- package/dist/{index-mK1ICsVg.d.ts → index-C9uW39Mj.d.ts} +3 -3
- package/dist/{index-JE1HrzdJ.d.ts → index-CUuUoX3h.d.ts} +3 -3
- package/dist/{index-Bwh8O-v8.d.ts → index-CZ29Xu_E.d.ts} +1 -1
- package/dist/{index-V6uruC4Z.d.ts → index-CpkQlo1t.d.ts} +2 -2
- package/dist/{index-D1JOMiI5.d.ts → index-CukA-J8A.d.ts} +7 -7
- package/dist/{index-BqQlY3fL.d.ts → index-DN5Ga_Zm.d.ts} +3 -3
- package/dist/{index-DPhQZXYw.d.ts → index-DYabo8TI.d.ts} +1 -1
- package/dist/{index-DuxRUPMc.d.ts → index-DhrnMYVh.d.ts} +1 -1
- package/dist/{index-GyRgg1-v.d.ts → index-DlsrR4Gm.d.ts} +7 -7
- package/dist/{index-BtqvPjAf.d.ts → index-DofC9Rll.d.ts} +1 -1
- package/dist/{index-BI1QLuYB.d.ts → index-ZXrvTM3A.d.ts} +3 -3
- package/dist/{index-CbA8rR_b.d.ts → index-a_FOKJMw.d.ts} +2 -2
- package/dist/{index-COgrQZIL.d.ts → index-jz9GfvS0.d.ts} +2 -2
- package/dist/{index-yQc-te9a.d.ts → index-ql9ApSTF.d.ts} +2 -2
- package/dist/{index-Pad9p8CU.d.ts → index-tdOyqA_U.d.ts} +2 -2
- package/dist/index.d.ts +23 -23
- package/dist/index.js +83 -83
- package/dist/{landing-Qk_FHR-s.js → landing-BW6qLvC8.js} +1 -1
- package/dist/{presentationHold-CZsVmjlY.js → presentationHold-ZKixVLcz.js} +1 -1
- package/dist/pressClaim-DvdlIn4w.js +24 -0
- package/dist/{pressFeedback-9ogipvI4.js → pressFeedback--_INTed0.js} +45 -5
- package/dist/{reportChange-BUTgduu-.js → reportChange-DwOfucSf.js} +1 -1
- package/dist/{resizableChannel-_j_AW2B6.js → resizableChannel-BnwrR5tr.js} +2 -2
- package/dist/selectionLock-BrUpRS0E.js +130 -0
- package/dist/{themeTiming-ClYaZxGf.js → themeTiming-BJziEh4O.js} +1 -1
- package/dist/touchQueries-xy5IeZfe.js +32 -0
- package/dist/{useActionGroupTracking-ByLJoM-8.js → useActionGroupTracking-BTjuGF9J.js} +2 -2
- package/dist/{useAnimatedLayout-IcX0UfS4.js → useAnimatedLayout-CRAuCwTZ.js} +1 -1
- package/dist/{useHeldPresentation-DJEthuMT.js → useHeldPresentation-CaIKTwUh.js} +1 -1
- package/dist/{useInputStatusIcon-D0q4S1Ye.js → useInputStatusIcon-Bl2JFlc3.js} +1 -1
- package/dist/{useMenuEntranceHold-B7f9ShX2.js → useMenuEntranceHold-C-kHicUN.js} +1 -1
- package/dist/{useMenuPress-cBIQyTsN.js → useMenuPress-CF1GHP_7.js} +3 -1
- package/dist/{usePressFeedback-Dx-a3i82.js → usePressFeedback-B_NavJu0.js} +1 -1
- package/dist/{useResizable-JvgYydox.js → useResizable-I0APFcMz.js} +1 -1
- package/dist/{useTouchHitArea-BGkvMAyp.js → useTouchHitArea-BpEJXuu-.js} +1 -1
- package/package.json +1 -1
- package/styles/segmented-control.css +20 -11
- package/dist/SegmentedControl-BURyE9XU.js +0 -416
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { c as containsAlongFlatTree, g as isNode, m as isElement, o as sharedWeakMap } from "./sharedRealm-DBtNH73I.js";
|
|
2
|
+
import { n as isIosWebKit } from "./touchQueries-xy5IeZfe.js";
|
|
3
|
+
//#region src/utils/selectionLock.ts
|
|
4
|
+
/**
|
|
5
|
+
* @file selectionLock.ts
|
|
6
|
+
* @input The elements a held touch contact presses, and the touch's target
|
|
7
|
+
* @output lockSelection and locksSelectionFor give a held finger's lock;
|
|
8
|
+
* lockStyles and isTextEntry are shared with a claimed drag's hold
|
|
9
|
+
* (dragSelection.ts)
|
|
10
|
+
* @position Recognizers whose hold does something bring lockSelection; the
|
|
11
|
+
* gesture host reads locksSelectionFor, and its drag hold is
|
|
12
|
+
* dragSelection.ts
|
|
13
|
+
*/
|
|
14
|
+
/** What a held finger must not start on a control or a cell. */
|
|
15
|
+
const SELECTION_LOCK = [
|
|
16
|
+
"-webkit-touch-callout",
|
|
17
|
+
"-webkit-user-select",
|
|
18
|
+
"user-select"
|
|
19
|
+
];
|
|
20
|
+
/** Inputs whose text a held finger edits: it places the caret there. */
|
|
21
|
+
const TEXT_ENTRY_TYPES = /* @__PURE__ */ new Set([
|
|
22
|
+
"text",
|
|
23
|
+
"search",
|
|
24
|
+
"email",
|
|
25
|
+
"url",
|
|
26
|
+
"tel",
|
|
27
|
+
"password",
|
|
28
|
+
"number"
|
|
29
|
+
]);
|
|
30
|
+
/**
|
|
31
|
+
* Whether a contact of this pointer kind takes the lock: a finger or a pen,
|
|
32
|
+
* under any primary pointer, a laptop's touchscreen and a desktop pen tablet
|
|
33
|
+
* included, since a pen's hold acts as a finger's.
|
|
34
|
+
*/
|
|
35
|
+
function locksSelectionFor(pointerType) {
|
|
36
|
+
return pointerType !== "mouse";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Locked elements, how many contacts hold each, and what to restore. Every
|
|
40
|
+
* copy of Core counts here, so the first lock's saved styles come back only
|
|
41
|
+
* after the last release in any copy.
|
|
42
|
+
*/
|
|
43
|
+
const locks = sharedWeakMap("utils/selection-lock/locks", 1);
|
|
44
|
+
/**
|
|
45
|
+
* Refuse a selection and the touch callout on `elements` (and on a non-text
|
|
46
|
+
* input target inside one of them) until the returned function runs, while
|
|
47
|
+
* any holder holds. Idempotent release.
|
|
48
|
+
*/
|
|
49
|
+
function lockSelection(elements, target) {
|
|
50
|
+
const set = new Set(elements);
|
|
51
|
+
if (isSelectableControl(target) && [...set].some((element) => containsAlongFlatTree(element, target))) set.add(target);
|
|
52
|
+
if (!isIosWebKit()) {
|
|
53
|
+
const refuse = (event) => {
|
|
54
|
+
if (!isTextEntry(event.target)) event.preventDefault();
|
|
55
|
+
};
|
|
56
|
+
for (const element of set) element.addEventListener("selectstart", refuse);
|
|
57
|
+
let isRefusing = true;
|
|
58
|
+
return () => {
|
|
59
|
+
if (isRefusing) {
|
|
60
|
+
isRefusing = false;
|
|
61
|
+
for (const element of set) element.removeEventListener("selectstart", refuse);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return lockStyles(set);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The selection-lock styles on `set`, refcounted per element; idempotent
|
|
69
|
+
* release.
|
|
70
|
+
*/
|
|
71
|
+
function lockStyles(set) {
|
|
72
|
+
const locked = [];
|
|
73
|
+
for (const element of set) {
|
|
74
|
+
const style = styleOf(element);
|
|
75
|
+
if (style == null) continue;
|
|
76
|
+
locked.push(element);
|
|
77
|
+
const lock = locks.get(element);
|
|
78
|
+
if (lock != null) {
|
|
79
|
+
lock.count += 1;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
locks.set(element, {
|
|
83
|
+
count: 1,
|
|
84
|
+
saved: SELECTION_LOCK.map((name) => ({
|
|
85
|
+
name,
|
|
86
|
+
value: style.getPropertyValue(name),
|
|
87
|
+
priority: style.getPropertyPriority(name)
|
|
88
|
+
}))
|
|
89
|
+
});
|
|
90
|
+
for (const name of SELECTION_LOCK) style.setProperty(name, "none");
|
|
91
|
+
}
|
|
92
|
+
let isReleased = false;
|
|
93
|
+
return () => {
|
|
94
|
+
if (isReleased) return;
|
|
95
|
+
isReleased = true;
|
|
96
|
+
for (const element of locked) {
|
|
97
|
+
const lock = locks.get(element);
|
|
98
|
+
if (lock == null || --lock.count > 0) continue;
|
|
99
|
+
locks.delete(element);
|
|
100
|
+
const style = styleOf(element);
|
|
101
|
+
for (const { name, value, priority } of lock.saved) if (value === "") style?.removeProperty(name);
|
|
102
|
+
else style?.setProperty(name, value, priority);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A form control WebKit's own stylesheet makes selectable, which no
|
|
108
|
+
* ancestor's lock reaches: every input that is not a text field.
|
|
109
|
+
*/
|
|
110
|
+
function isSelectableControl(node) {
|
|
111
|
+
return isElement(node) && node.localName === "input" && !TEXT_ENTRY_TYPES.has(node.type);
|
|
112
|
+
}
|
|
113
|
+
/** Text a held finger edits: it places the caret there. */
|
|
114
|
+
function isTextEntry(node) {
|
|
115
|
+
const element = isElement(node) ? node : isNode(node) ? node.parentElement : null;
|
|
116
|
+
if (element == null) return false;
|
|
117
|
+
if (element.localName === "textarea") return true;
|
|
118
|
+
if (element.localName === "input") return TEXT_ENTRY_TYPES.has(element.type);
|
|
119
|
+
return element.isContentEditable;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* An element's inline style, when it has one (HTML and SVG elements). It is
|
|
123
|
+
* checked as an object, so another window's style passes too.
|
|
124
|
+
*/
|
|
125
|
+
function styleOf(element) {
|
|
126
|
+
const style = element.style;
|
|
127
|
+
return typeof style === "object" && style !== null ? style : null;
|
|
128
|
+
}
|
|
129
|
+
//#endregion
|
|
130
|
+
export { locksSelectionFor as i, lockSelection as n, lockStyles as r, isTextEntry as t };
|
|
@@ -174,4 +174,4 @@ function readThemeTimingOrInstant(element, tokens) {
|
|
|
174
174
|
return (element == null ? null : readThemeTiming(element, tokens)) ?? easedProgress(0, (x) => x);
|
|
175
175
|
}
|
|
176
176
|
//#endregion
|
|
177
|
-
export {
|
|
177
|
+
export { readThemeTokenText as i, readThemeTiming as n, readThemeTimingOrInstant as r, easedProgress as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/utils/touchQueries.ts
|
|
2
|
+
/**
|
|
3
|
+
* @file touchQueries.ts
|
|
4
|
+
* @input Nothing: plain strings
|
|
5
|
+
* @output TOUCH_QUERY, the media query for a coarse primary pointer; and
|
|
6
|
+
* IOS_SUPPORTS_QUERY with isIosWebKit, the iOS WebKit engine check
|
|
7
|
+
* @position The dependency-free half of touchPresentation.ts, for code that
|
|
8
|
+
* must load without React or the theme: the motion foundation, which
|
|
9
|
+
* Node-side specs and browser proofs load without a StyleX compile.
|
|
10
|
+
* touchPresentation.ts re-exports it beside the hook and the parts that
|
|
11
|
+
* read the theme.
|
|
12
|
+
*/
|
|
13
|
+
/** The primary pointer is coarse: touch behaviours. */
|
|
14
|
+
const TOUCH_QUERY = "(pointer: coarse)";
|
|
15
|
+
/**
|
|
16
|
+
* The engine is WebKit on iOS or iPadOS: the only one that implements
|
|
17
|
+
* `-webkit-touch-callout`. For a style iOS WebKit requires, never a
|
|
18
|
+
* behaviour; isIosWebKit reads it for an engine workaround a record names.
|
|
19
|
+
*/
|
|
20
|
+
const IOS_SUPPORTS_QUERY = "(-webkit-touch-callout: none)";
|
|
21
|
+
/**
|
|
22
|
+
* Whether `view`'s engine is iOS WebKit, by IOS_SUPPORTS_QUERY. Only for an
|
|
23
|
+
* engine workaround a record names (`spec:AST-013` FR6): the selection
|
|
24
|
+
* lock's inline style, and the gesture host's presented hit testing. The
|
|
25
|
+
* keyboard's rise and its scroll back from the blur read it too. False where
|
|
26
|
+
* `CSS.supports` is missing (jsdom has `CSS.escape` only).
|
|
27
|
+
*/
|
|
28
|
+
function isIosWebKit(view = globalThis) {
|
|
29
|
+
return view?.CSS?.supports?.(IOS_SUPPORTS_QUERY) === true;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { isIosWebKit as n, TOUCH_QUERY as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-
|
|
1
|
+
import { c as PRESS_GROUP_ITEM_ATTRIBUTE, d as isInsideScrollView, h as msSinceInput, l as isTrackedByGroup } from "./pressFeedback--_INTed0.js";
|
|
2
|
+
import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-BpEJXuu-.js";
|
|
3
3
|
import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-B3Efxs_z.js";
|
|
4
4
|
import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
|
|
5
5
|
//#region src/composables/internal/useActionGroupTracking.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useAdaptivePresentation, n as usePresentationHold } from "./presentationHold-
|
|
1
|
+
import { i as useAdaptivePresentation, n as usePresentationHold } from "./presentationHold-ZKixVLcz.js";
|
|
2
2
|
import { computed, toValue, watch } from "vue";
|
|
3
3
|
//#region src/layer/useHeldPresentation.ts
|
|
4
4
|
function useHeldPresentation(presentation, isOpen) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as _sfc_main } from "./FieldIcon-BU1ZWAuo.js";
|
|
2
|
-
import { t as _sfc_main$1 } from "./FieldInfoTip-
|
|
2
|
+
import { t as _sfc_main$1 } from "./FieldInfoTip-CY9BTVtK.js";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
4
|
//#region src/composables/useInputStatusIcon.ts
|
|
5
5
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as msSinceInput } from "./pressFeedback--_INTed0.js";
|
|
2
2
|
import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-CxqcfBCJ.js";
|
|
3
3
|
import { s as currentGesture } from "./layerDepth-SGFJ5L6X.js";
|
|
4
4
|
import { t as focusForLastInput } from "./focusReturn-DfZS7TCp.js";
|
|
5
|
+
import { t as claimPress } from "./pressClaim-DvdlIn4w.js";
|
|
5
6
|
import { r as isInputShield } from "./inputHoldState-BYi5FKZl.js";
|
|
6
7
|
import { getCurrentScope, onScopeDispose, toValue } from "vue";
|
|
7
8
|
//#region src/composables/useLongPress.ts
|
|
@@ -51,6 +52,7 @@ function useLongPress(options) {
|
|
|
51
52
|
timer = null;
|
|
52
53
|
deadline = null;
|
|
53
54
|
if (from == null) return;
|
|
55
|
+
claimPress();
|
|
54
56
|
options.onLongPress({
|
|
55
57
|
x: from.x,
|
|
56
58
|
y: from.y
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as PRESSABLE_ATTRIBUTE, o as PRESS_ACTION_ATTRIBUTE, r as installPressFeedback, s as PRESS_CONTAINER_ATTRIBUTE } from "./pressFeedback--_INTed0.js";
|
|
2
2
|
import { getCurrentInstance, getCurrentScope, onMounted, onScopeDispose } from "vue";
|
|
3
3
|
import "../styles/pressable.css";
|
|
4
4
|
//#region src/composables/usePressFeedback.ts
|
|
@@ -4,7 +4,7 @@ import { t as resolveMotion } from "./resolveMotion-DftkGFw6.js";
|
|
|
4
4
|
import { o as springs } from "./springs-DjAn_oV5.js";
|
|
5
5
|
import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
|
|
6
6
|
import { t as project } from "./projection-qPcLQcwK.js";
|
|
7
|
-
import { c as createRegionPaneSlot, f as registerPropsRegion, h as slideNextOnRelease, i as registerResizableChannel, l as edgeAxis, m as slideMotionsOf, o as resizeHandleBeside, p as shownSizeReader, s as createPaneReveal, u as isScriptMotion } from "./resizableChannel-
|
|
7
|
+
import { c as createRegionPaneSlot, f as registerPropsRegion, h as slideNextOnRelease, i as registerResizableChannel, l as edgeAxis, m as slideMotionsOf, o as resizeHandleBeside, p as shownSizeReader, s as createPaneReveal, u as isScriptMotion } from "./resizableChannel-BnwrR5tr.js";
|
|
8
8
|
import { i as rubberBandSlope, r as rubberBandInverse, t as rubberBand } from "./rubberBand-DDd5ElTe.js";
|
|
9
9
|
import { computed, onBeforeUnmount, onMounted, onScopeDispose, reactive, ref, toValue, watch } from "vue";
|
|
10
10
|
//#region src/composables/useHotkeys.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as PRESS_GROUP_ITEM_ATTRIBUTE, i as pressFadeMs, l as isTrackedByGroup, t as PRESSED_ATTRIBUTE } from "./pressFeedback--_INTed0.js";
|
|
2
2
|
import { t as armClickGuard } from "./clickGuard-CxqcfBCJ.js";
|
|
3
3
|
import { toValue, watch } from "vue";
|
|
4
4
|
import "../styles/touch-hit-area.css";
|
package/package.json
CHANGED
|
@@ -98,28 +98,38 @@
|
|
|
98
98
|
|
|
99
99
|
/*
|
|
100
100
|
* 选中块是控件里独立的一块表面,选中的分段一变就滑到新位置,大小也跟着变。
|
|
101
|
-
*
|
|
102
|
-
*
|
|
101
|
+
* 脚本把它的位置和大小写在行内(left、top、width、height),动画只改
|
|
102
|
+
* translate、scale 和 opacity。量到位置之前(服务端渲染、还没有布局),
|
|
103
|
+
* 选中块藏着,选中的分段自己画这块底色;量到以后控件带上 data-selection,
|
|
104
|
+
* 由选中块画,分段只留文字的颜色和字重。
|
|
103
105
|
*/
|
|
104
106
|
.astryx-segmented-control__selection {
|
|
105
107
|
position: absolute;
|
|
106
108
|
z-index: 0;
|
|
107
109
|
top: 0;
|
|
108
110
|
left: 0;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
display: none;
|
|
112
|
+
box-sizing: border-box;
|
|
111
113
|
border-radius: max(0px, calc(var(--_segmented-control-radius) - var(--_segmented-control-padding)));
|
|
112
114
|
background-color: var(--astryx-segmented-control-item-selected-background, light-dark(#fff, #262626));
|
|
113
115
|
box-shadow: var(--astryx-segmented-control-item-selected-shadow);
|
|
114
|
-
transform: translate(var(--_selection-x), var(--_selection-y));
|
|
115
116
|
pointer-events: none;
|
|
116
117
|
forced-color-adjust: none;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
.astryx-segmented-control[data-selection
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
.astryx-segmented-control[data-selection] > .astryx-segmented-control__selection:not(.astryx-segmented-control__selection--leaving),
|
|
121
|
+
.astryx-segmented-control__selection--leaving[data-shown] {
|
|
122
|
+
display: block;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* 手指按住选中的分段时,选中块抬起来,带上主题的低层级投影。 */
|
|
126
|
+
.astryx-segmented-control__selection[data-lifted] {
|
|
127
|
+
box-shadow: var(--astryx-shadow-low, 0 1px 2px rgb(0 0 0 / 12%));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* 触屏呈现下文字颜色跟着选中块走,不再自己过渡。 */
|
|
131
|
+
.astryx-segmented-control[data-touch] > .astryx-segmented-control-item {
|
|
132
|
+
transition-property: none;
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
.astryx-segmented-control[data-selection] > .astryx-segmented-control-item {
|
|
@@ -214,8 +224,7 @@
|
|
|
214
224
|
}
|
|
215
225
|
|
|
216
226
|
@media (prefers-reduced-motion: reduce) {
|
|
217
|
-
.astryx-segmented-control-item
|
|
218
|
-
.astryx-segmented-control[data-selection='ready'] > .astryx-segmented-control__selection {
|
|
227
|
+
.astryx-segmented-control-item {
|
|
219
228
|
transition-duration: 0s;
|
|
220
229
|
}
|
|
221
230
|
}
|