@astryx-vue/core 0.35.0 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-rndlABEe.js → AlertDialog-C4oB89RV.js} +5 -5
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-eVrOpRqn.js → AppShell-CU12SF6s.js} +2 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-BEBUEhxF.js → AvatarGroup-DhSPWemf.js} +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-CVBNGDsD.js → Banner-DeauKxQw.js} +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/BottomSheet-Chr9yCIL.js +4353 -0
- package/dist/{BottomSheet-B3qXtKQj.js → BottomSheet-DCLOhzZP.js} +1 -1
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-B-w_yw-n.js → Breadcrumbs-BfjWIfgO.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-DTdlisqJ.js → Button-V6i-PeBt.js} +2 -2
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-Bjzs-HAG.js → ButtonGroup-CEDeeGkY.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-DjySyeDR.js → Carousel-5NYWpta1.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DQ6BGAvP.js → Chat-f9HzZe5y.js} +2 -2
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-DSW8yq92.js → CheckboxInput-ixAs3zkT.js} +4 -4
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-B2E2O1AE.js → CheckboxListItem-DoWYdLf-.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-D4EGX9Dh.js → ClickableCard-DuOcbNlt.js} +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-BqqB2kUM.js → Code-qHt8uZqb.js} +1 -1
- package/dist/{CodeBlock-D7ZJQV5Q.js → CodeBlock-2zigEFFD.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-C5xSG7oP.js → Collapsible-Dxp-BWv-.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BUNdrxrB.js → CommandPalette-PyPfsPLY.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-m9wi7E0j.js → ComplexSelector-B07QdP_p.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-BEHfVIAq.js → ContextMenu-B6NH9NBS.js} +3 -3
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-CHeetz7k.js → DateInput-TrPijW9a.js} +4 -4
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-D524C1wc.js → DateRangeInput-bKPzsoHA.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-2gTBrcbr.js → DateTimeInput-5jZPqFu2.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-nyLGClca.js → Dialog-CDAicnpK.js} +1 -1
- package/dist/{Dialog-DS3xE1B7.js → Dialog-dm_qZ9NI.js} +1 -1
- package/dist/{DialogHeader-u_AaZpyZ.js → DialogHeader-CQfcOIfF.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-DqUdaZFh.js → Drawer-DKSqpR2p.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-DlAON5Jf.js → DropdownMenu-C-SLsVSO.js} +6 -6
- package/dist/Field/index.js +3 -3
- package/dist/{Field-YNS4XxpR.js → Field-CZndbiqR.js} +1 -1
- package/dist/{FieldInfoTip-DFlIBJlR.js → FieldInfoTip-Ii7lSYS8.js} +1 -1
- package/dist/{FieldLabel-i0gos7hU.js → FieldLabel-ru3qavED.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-DYVzAtvz.js → FileInput-BtVTN7LN.js} +3 -3
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DXt8DtsN.js → IconButton-4BXILpv-.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip--fZOD0ux.js → InfoTip-D2MzKXZH.js} +1 -1
- package/dist/{InputClearButton-LF0iVTVF.js → InputClearButton-Cm5Q3KK2.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-D4CPVzo0.js → InputGroup-CjB_XpEy.js} +1 -1
- package/dist/{Item-BKISM91o.js → Item-CKYsTbM4.js} +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-BwSvAsLi.js → Layout-CpFgVnlQ.js} +1 -1
- package/dist/{LayoutPanel-CmzJQpnL.js → LayoutPanel-Dhm0Hubb.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-B32Yh8Uy.js → Lightbox-BSzyDGkK.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-DSXyw9MW.js → Link-BnM830Xa.js} +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-D3iEhvU2.js → ListItem-B1ztelEC.js} +2 -2
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-BY5Bju8w.js → Markdown-JjZLAFq2.js} +2 -2
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-sC6GPVKQ.js → MobileNavToggle-C1_IinAo.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CcavOuxV.js → MoreMenu-DbYO8V7N.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Diu5zHbP.js → MultiSelector-CthCkW-w.js} +4 -4
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-DlW8noR6.js → NavItem-DTO-BEfc.js} +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu-J2kmtb1B.js → NavMenu-g8ZVhLMG.js} +1 -1
- package/dist/{NavMenuItem-DItNRTDZ.js → NavMenuItem-DJg9jfHm.js} +2 -2
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-vhm5TQon.js → NumberInput-BM52uE72.js} +3 -3
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-CVIDd0fN.js → Outline-D4DJTfKp.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-DjWWBOkx.js → OverflowList-nW6GCEsY.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DKsePQjC.js → Pagination-DFZivDZZ.js} +2 -2
- package/dist/{PanGestureRecognizer-C7hNunjF.js → PanGestureRecognizer-C-gk9mOy.js} +1 -1
- package/dist/{PickerWheel-Bf7xe6g6.js → PickerWheel-sIOSfcfO.js} +5 -5
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CKgepPJ6.js → Popover-IvZGq1LC.js} +3 -3
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DopZnZDZ.js → PowerSearch-CQdyB8_N.js} +19 -19
- package/dist/{PressTracker-DL75qEq_.js → PressTracker-CPRIrG4f.js} +2 -2
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-C-S-SnbH.js → RadioGroup-OLFNjvKt.js} +4 -4
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-DzKVK4DZ.js → RadioListItem-BAEF0vc8.js} +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-CaZEB4Py.js → ResizeHandle-Bd4TdK7E.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-Bp7dpEjn.js → SegmentedControl-C0xXOVTv.js} +8 -8
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-DPWaUCGZ.js → SelectableCard-B2QbpWiT.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-CJmeuWhN.js → Selector-icOfE3ja.js} +2 -2
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-D-AQqNPx.js → SideNav-ZZ5zCQz0.js} +4 -4
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DU-Yl3fd.js → Slider-Bd5fxqRa.js} +7 -7
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-67SsxUne.js → Stepper-3oMdVe0c.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-C6qaebkX.js → Switch-COKmqJQU.js} +8 -8
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-TbJ6y1gN.js → TabList-C-HBxmkc.js} +2 -2
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-DG_GVUF4.js → Table-aMqVf_iH.js} +9 -9
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-D6EtmxTk.js → TextArea-YJtL9Fi6.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-AngvgtdT.js → TextInput-CuPxOApN.js} +4 -4
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DExkxw8a.js → Thumbnail-oqrKH-co.js} +2 -2
- package/dist/{TimeField-BNGg25yA.js → TimeField-DNxPI2cM.js} +40 -11
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D8lwgHOR.js → TimeInput-PJdyNX0T.js} +2 -2
- 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-CeSb1A8c.js → Timestamp-CfzqAAX2.js} +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-B2Fq-JYA.js → Toast-W6aKxXlF.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-Bn8yLHbh.js → ToggleButton-Ditxp2jT.js} +3 -3
- package/dist/Token/index.js +1 -1
- package/dist/{Token-Dpxh42Mw.js → Token-Dk6MPUkH.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B3EnI98V.js → Tokenizer-CdyoUaoZ.js} +7 -7
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-D7mzM7pu.js → TopNav-CxAm5bN5.js} +3 -3
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BmeXFFqr.js → TreeList-Dnx-uco3.js} +1 -1
- package/dist/Typeahead/index.d.ts +3 -3
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-kLp9UG-Q.js → Typeahead-Cx086Mmv.js} +3 -3
- package/dist/{accessibleName-Zr1_WoBg.js → accessibleName-CN1vKvS_.js} +1 -1
- package/dist/{boxHold-Bh1fTcXx.js → boxHold-D1G2s1tG.js} +4 -4
- package/dist/{browserClickWait-CiUtuWNK.js → browserClickWait-Cb550_M2.js} +2 -2
- package/dist/{clickGuard-Bd-jBj_G.js → clickGuard-BkegH2NW.js} +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +7 -7
- package/dist/{composables-B6ebqwHY.js → composables-CpG7bhuQ.js} +74 -4
- package/dist/{geometry-0e0f5Mjv.js → geometry-BRW7FETc.js} +6 -195
- package/dist/{haptics-DIfaJavG.js → haptics-BEgivjBd.js} +2 -2
- package/dist/{holdEntranceInput-DWqsAYll.js → holdEntranceInput-CROBPhuO.js} +1 -1
- package/dist/{index-DXHmlFcC.d.ts → index--kbwaSXW.d.ts} +3 -3
- package/dist/{index-aHC2C89h.d.ts → index-1yvu_vpF.d.ts} +1 -1
- package/dist/{index-C9TEn6LQ.d.ts → index-B27k2e77.d.ts} +35 -35
- package/dist/{index-BB9acgK8.d.ts → index-BgT6mH3U.d.ts} +1 -1
- package/dist/{index-DoYrlaEI.d.ts → index-BufuCsTx.d.ts} +3 -3
- 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-CbA8rR_b.d.ts → index-CBOv5j3c.d.ts} +1 -1
- package/dist/{index-AgTJRqUY.d.ts → index-CQi9WGWE.d.ts} +2 -2
- package/dist/{index-C_iTVOHQ.d.ts → index-CilCxEvD.d.ts} +1 -1
- package/dist/{index-QC9FDUDA.d.ts → index-J83fLEyo.d.ts} +3 -3
- package/dist/{index-BA8exXNP.d.ts → index-X4S7_dmq.d.ts} +1 -1
- package/dist/{index-D8VViJw0.d.ts → index-sUMua5pp.d.ts} +47 -1
- package/dist/{index-BqAI9Sxh.d.ts → index-x7g2WHHx.d.ts} +2 -2
- package/dist/index.d.ts +16 -16
- package/dist/index.js +86 -86
- package/dist/inputAge-C-SoLwpD.js +42 -0
- package/dist/{inputHold-CvjeOOWT.js → inputHold-B53XZ8if.js} +2 -2
- package/dist/{inputHoldState-Cg1r8Ib7.js → inputHoldState-Bav14W7v.js} +1 -1
- package/dist/{inputStream-DkMWPYac.js → inputStream-DmPkJ1aU.js} +24 -1
- package/dist/{lazyBottomSheet-DlHcPsAT.js → lazyBottomSheet-DlrpPOl8.js} +1 -1
- package/dist/{resizableChannel-CaaqGvXj.js → resizableChannel-DpbFJbto.js} +1 -1
- package/dist/{scrollView-DcPpdCrj.js → scrollView-BGBtu5JP.js} +2 -42
- package/dist/selectionRanges-DB5jesLz.js +194 -0
- package/dist/{springs-DjAn_oV5.js → springs-CPk0tpwL.js} +1 -1
- package/dist/{types-DL-hRibg.d.ts → types-CTjJfVYK.d.ts} +11 -1
- package/dist/{useActionGroupTracking-DjIdPbfL.js → useActionGroupTracking-C-nLjHyn.js} +3 -2
- package/dist/{useChatStreamScroll-DEp17Yq9.js → useChatStreamScroll-DWhnCSP1.js} +1 -1
- package/dist/{useGestureRecognizer-DDd-6Km-.js → useGestureRecognizer-Di-YKr93.js} +1 -1
- package/dist/{useInputStatusIcon-m6l4qBmA.js → useInputStatusIcon-CXP2kRSe.js} +1 -1
- package/dist/{useMenuEntranceHold-C4LOzKIS.js → useMenuEntranceHold-DMHMzaRW.js} +1 -1
- package/dist/{useMenuPress-BDPqPten.js → useMenuPress-zOinmIFS.js} +3 -3
- package/dist/{usePressFeedback-D2mWzgoJ.js → usePressFeedback-CF4ISMfb.js} +3 -2
- package/dist/{useResizable-Bwv-j_9N.js → useResizable-7-uUaJ7x.js} +2 -2
- package/dist/{useTouchHitArea-DL9D10Rq.js → useTouchHitArea-CkHMLZ34.js} +1 -1
- package/package.json +1 -1
- package/styles/bottom-sheet.css +16 -0
- package/dist/BottomSheet-C6vet4pm.js +0 -1896
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { a as shadowRootsOutward, i as shadowHostOf, r as parentAcrossShadow } from "./flatTree-BB4yPMNL.js";
|
|
2
|
+
import { t as isTextEntry } from "./selectionLock-BM8XEZQD.js";
|
|
3
|
+
//#region src/utils/selectionRanges.ts
|
|
4
|
+
/**
|
|
5
|
+
* @file selectionRanges.ts
|
|
6
|
+
* @input A window's selection, a press's point
|
|
7
|
+
* @output selectionRangesOf and startsOnSelectableText, what a mouse or pen
|
|
8
|
+
* press reads; caretAt; and the range helpers a drag's hold uses to keep
|
|
9
|
+
* and put back the page's selection
|
|
10
|
+
* @position Read by the gesture host at a press, and by dragSelection.ts
|
|
11
|
+
*
|
|
12
|
+
* SYNC: When modified, update dragSelection.ts and gestures/hostSelection.ts.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The page's selection now, its ranges copied; none for a collapsed or empty
|
|
16
|
+
* one. A drag's hold keeps what this read when the press began.
|
|
17
|
+
*/
|
|
18
|
+
function selectionRangesOf(view) {
|
|
19
|
+
const selection = view?.getSelection();
|
|
20
|
+
if (selection == null) return [];
|
|
21
|
+
const composed = composedRangesOf(selection, []);
|
|
22
|
+
if (composed != null) return composed.filter((range) => !range.collapsed).map(liveWhereItCan);
|
|
23
|
+
if (selection.isCollapsed) return [];
|
|
24
|
+
const ranges = [];
|
|
25
|
+
for (let index = 0; index < selection.rangeCount; index++) ranges.push(selection.getRangeAt(index).cloneRange());
|
|
26
|
+
return ranges;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Whether a press at (`x`, `y`) lands on text a drag would select. That is a
|
|
30
|
+
* text field, or a character of non-empty text whose element allows a
|
|
31
|
+
* selection. A native button's label, slotted or not, is not selectable text,
|
|
32
|
+
* because the engine starts no selection from a drag inside a button. A point
|
|
33
|
+
* beside text, which a caret query snaps to the nearest character, lands on
|
|
34
|
+
* none. Where the engine has no caret query, nothing is selectable text.
|
|
35
|
+
*/
|
|
36
|
+
function startsOnSelectableText(doc, x, y, target) {
|
|
37
|
+
if (isTextEntry(target)) return true;
|
|
38
|
+
const caret = caretAt(doc, x, y, [...ownShadowRoot(target), ...openShadowRootsOf(target)]);
|
|
39
|
+
if (caret == null) return false;
|
|
40
|
+
const { node, offset } = caret;
|
|
41
|
+
if (node.nodeType !== 3 || (node.textContent ?? "").trim() === "") return false;
|
|
42
|
+
const element = node.parentElement ?? (node.parentNode == null ? null : shadowHostOf(node.parentNode));
|
|
43
|
+
if (element == null || !allowsSelection(element) || isInButton(node)) return false;
|
|
44
|
+
const length = (node.textContent ?? "").length;
|
|
45
|
+
const range = doc.createRange();
|
|
46
|
+
if (typeof range.getClientRects !== "function") return false;
|
|
47
|
+
for (const start of [offset - 1, offset]) {
|
|
48
|
+
if (start < 0 || start >= length) continue;
|
|
49
|
+
range.setStart(node, start);
|
|
50
|
+
range.setEnd(node, start + 1);
|
|
51
|
+
for (const rect of Array.from(range.getClientRects())) if (x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom) return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
/** Whether `node` is inside a native button, along the flat tree. */
|
|
56
|
+
function isInButton(node) {
|
|
57
|
+
for (let at = node; at != null; at = parentAcrossShadow(at)) if (at.nodeType === 1 && at.localName === "button") return true;
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
/** The caret position the engine puts at a point, by either query. */
|
|
61
|
+
function caretAt(doc, x, y, shadowRoots) {
|
|
62
|
+
const queries = doc;
|
|
63
|
+
if (typeof queries.caretPositionFromPoint === "function") {
|
|
64
|
+
const position = shadowRoots.length > 0 ? queries.caretPositionFromPoint(x, y, { shadowRoots: [...shadowRoots] }) : queries.caretPositionFromPoint(x, y);
|
|
65
|
+
return position == null ? null : {
|
|
66
|
+
node: position.offsetNode,
|
|
67
|
+
offset: position.offset
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (typeof queries.caretRangeFromPoint === "function") {
|
|
71
|
+
const range = queries.caretRangeFromPoint(x, y);
|
|
72
|
+
return range == null ? null : {
|
|
73
|
+
node: range.startContainer,
|
|
74
|
+
offset: range.startOffset
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/** Whether an element's text can be selected (`user-select` is not none). */
|
|
80
|
+
function allowsSelection(element) {
|
|
81
|
+
const style = element.ownerDocument.defaultView?.getComputedStyle(element);
|
|
82
|
+
if (style == null) return false;
|
|
83
|
+
return style.getPropertyValue("user-select") !== "none" && style.getPropertyValue("-webkit-user-select") !== "none";
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The ranges `selection` holds, with boundaries inside `shadowRoots` where the
|
|
87
|
+
* engine reads composed ranges.
|
|
88
|
+
*/
|
|
89
|
+
function heldRanges(selection, shadowRoots) {
|
|
90
|
+
const composed = composedRangesOf(selection, shadowRoots);
|
|
91
|
+
if (composed != null) return composed;
|
|
92
|
+
const ranges = [];
|
|
93
|
+
for (let index = 0; index < selection.rangeCount; index++) ranges.push(selection.getRangeAt(index));
|
|
94
|
+
return ranges;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A live copy of `range` when both boundaries share a root, so it follows
|
|
98
|
+
* DOM changes. A range across roots stays static: no live range holds it.
|
|
99
|
+
*/
|
|
100
|
+
function liveWhereItCan(range) {
|
|
101
|
+
const live = range.startContainer.ownerDocument?.createRange();
|
|
102
|
+
if (live == null || range.startContainer.getRootNode() !== range.endContainer.getRootNode()) return range;
|
|
103
|
+
live.setStart(range.startContainer, range.startOffset);
|
|
104
|
+
live.setEnd(range.endContainer, range.endOffset);
|
|
105
|
+
return live;
|
|
106
|
+
}
|
|
107
|
+
/** Whether both of `range`'s boundaries still exist in the document. */
|
|
108
|
+
function isValidRange(range) {
|
|
109
|
+
return isValidBoundary(range.startContainer, range.startOffset) && isValidBoundary(range.endContainer, range.endOffset);
|
|
110
|
+
}
|
|
111
|
+
function isValidBoundary(node, offset) {
|
|
112
|
+
const length = node.nodeType === 3 || node.nodeType === 4 || node.nodeType === 8 ? node.length : node.childNodes.length;
|
|
113
|
+
return node.isConnected && offset >= 0 && offset <= length;
|
|
114
|
+
}
|
|
115
|
+
/** Whether two range lists have the same boundaries, in order. */
|
|
116
|
+
function sameRanges(held, kept) {
|
|
117
|
+
return held.length === kept.length && kept.every((range, index) => {
|
|
118
|
+
const other = held[index];
|
|
119
|
+
return other.startContainer === range.startContainer && other.startOffset === range.startOffset && other.endContainer === range.endContainer && other.endOffset === range.endOffset;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Put `ranges` back as the selection. One range goes through
|
|
124
|
+
* `setBaseAndExtent`, which also reaches inside a shadow root.
|
|
125
|
+
*/
|
|
126
|
+
function selectRanges(selection, ranges) {
|
|
127
|
+
const [only] = ranges;
|
|
128
|
+
if (ranges.length === 1 && typeof selection.setBaseAndExtent === "function") {
|
|
129
|
+
selection.setBaseAndExtent(only.startContainer, only.startOffset, only.endContainer, only.endOffset);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
selection.removeAllRanges();
|
|
133
|
+
for (const range of ranges) {
|
|
134
|
+
const copy = range.startContainer.ownerDocument?.createRange();
|
|
135
|
+
if (copy == null) continue;
|
|
136
|
+
copy.setStart(range.startContainer, range.startOffset);
|
|
137
|
+
copy.setEnd(range.endContainer, range.endOffset);
|
|
138
|
+
selection.addRange(copy);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The selection's composed ranges, reaching into each open shadow root a
|
|
143
|
+
* boundary lands on; null where the engine has no `getComposedRanges`.
|
|
144
|
+
* Without the roots, a selection inside a shadow root reads as one around
|
|
145
|
+
* its host.
|
|
146
|
+
*/
|
|
147
|
+
function composedRangesOf(selection, known) {
|
|
148
|
+
const query = selection.getComposedRanges;
|
|
149
|
+
if (typeof query !== "function") return null;
|
|
150
|
+
const read = (roots) => {
|
|
151
|
+
try {
|
|
152
|
+
return query.call(selection, { shadowRoots: roots });
|
|
153
|
+
} catch {
|
|
154
|
+
try {
|
|
155
|
+
return query.call(selection, ...roots);
|
|
156
|
+
} catch {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const roots = [...known];
|
|
162
|
+
for (;;) {
|
|
163
|
+
const ranges = read([...roots]);
|
|
164
|
+
if (ranges == null) return null;
|
|
165
|
+
const found = /* @__PURE__ */ new Set();
|
|
166
|
+
for (const range of ranges) for (const [node, offset] of [[range.startContainer, range.startOffset], [range.endContainer, range.endOffset]]) for (const child of [node.childNodes[offset], node.childNodes[offset - 1]]) {
|
|
167
|
+
const root = child?.nodeType === 1 ? child.shadowRoot : null;
|
|
168
|
+
if (root != null && !roots.includes(root)) found.add(root);
|
|
169
|
+
}
|
|
170
|
+
if (found.size === 0) return ranges;
|
|
171
|
+
roots.push(...found);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** The open shadow roots on the root chains of `ranges`' boundaries. */
|
|
175
|
+
function shadowRootsOfRanges(ranges) {
|
|
176
|
+
const roots = /* @__PURE__ */ new Set();
|
|
177
|
+
for (const range of ranges) for (const root of [...openShadowRootsOf(range.startContainer), ...openShadowRootsOf(range.endContainer)]) roots.add(root);
|
|
178
|
+
return [...roots];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The open shadow root `target` hosts, if any. A press on text directly under
|
|
182
|
+
* a shadow root targets its host.
|
|
183
|
+
*/
|
|
184
|
+
function ownShadowRoot(target) {
|
|
185
|
+
const root = target?.nodeType === 1 ? target.shadowRoot : null;
|
|
186
|
+
return root == null ? [] : [root];
|
|
187
|
+
}
|
|
188
|
+
/** The open shadow roots on `target`'s root chain, innermost first. */
|
|
189
|
+
function openShadowRootsOf(target) {
|
|
190
|
+
if (target == null || typeof target.nodeType !== "number") return [];
|
|
191
|
+
return shadowRootsOutward(target.getRootNode()).map(({ root }) => root).filter((root) => root.mode === "open");
|
|
192
|
+
}
|
|
193
|
+
//#endregion
|
|
194
|
+
export { selectRanges as a, startsOnSelectableText as c, sameRanges as i, heldRanges as n, selectionRangesOf as o, isValidRange as r, shadowRootsOfRanges as s, caretAt as t };
|
|
@@ -534,4 +534,4 @@ function registerSpringsTable() {
|
|
|
534
534
|
registerMotionTable("springs", SPRING_ROLES, { roles: Object.keys(SPRING_ROLES) });
|
|
535
535
|
}
|
|
536
536
|
//#endregion
|
|
537
|
-
export {
|
|
537
|
+
export { SWITCH_THUMB_MOVE_SPRING as a, SLIDER_RELEASE_SPRING as i, SLIDER_DROP_SPRING as n, registerSpringsTable as o, SLIDER_LIFT_SPRING as r, springs as s, KEYBOARD_SPRING as t };
|
|
@@ -38,6 +38,16 @@ interface TypeaheadDialogMenuSlotProps {
|
|
|
38
38
|
/** 关闭菜单,并把焦点还给打开它时的元素。 */
|
|
39
39
|
close: () => void;
|
|
40
40
|
}
|
|
41
|
+
/** 组件实例上暴露的方法,用模板 ref 调用。 */
|
|
42
|
+
interface TypeaheadHandle {
|
|
43
|
+
/**
|
|
44
|
+
* 打开菜单。dialog 角色马上打开;listbox 角色显示结果,需要时先加载。
|
|
45
|
+
* 在 `change` 里调用,菜单会在这次选择之后保持打开。
|
|
46
|
+
*/
|
|
47
|
+
open: () => void;
|
|
48
|
+
/** 关闭菜单。 */
|
|
49
|
+
close: () => void;
|
|
50
|
+
}
|
|
41
51
|
type TypeaheadStatus = 'default' | 'success' | 'warning' | 'error';
|
|
42
52
|
interface BaseTypeaheadProps<T extends SearchableItem = SearchableItem> {
|
|
43
53
|
/** 当前选中的条目。空表示还没选。 */
|
|
@@ -202,4 +212,4 @@ interface TypeaheadSlots<T extends SearchableItem = SearchableItem> {
|
|
|
202
212
|
menu?: (props: TypeaheadListboxMenuSlotProps & TypeaheadDialogMenuSlotProps) => unknown;
|
|
203
213
|
}
|
|
204
214
|
//#endregion
|
|
205
|
-
export {
|
|
215
|
+
export { TypeaheadItemProps as a, TypeaheadProps as c, TypeaheadStatus as d, TypeaheadHandle as i, TypeaheadSize as l, TypeaheadDialogMenuSlotProps as n, TypeaheadListboxMenuSlotProps as o, TypeaheadEmits as r, TypeaheadMenuConfig as s, BaseTypeaheadProps as t, TypeaheadSlots as u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
1
|
+
import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
|
|
2
|
+
import { n as isInsideScrollView } from "./scrollView-BGBtu5JP.js";
|
|
3
|
+
import { i as createActionGroupTracker, o as resolveGroupTouch, r as GROUP_PRESS_POINTERS } from "./useTouchHitArea-CkHMLZ34.js";
|
|
3
4
|
import { i as PRESS_SLOP_PX, n as PRESS_ONSET_MS } from "./pressGesture-CfBgXWRM.js";
|
|
4
5
|
import { f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup } from "./pressSlot-B6TvGkSO.js";
|
|
5
6
|
import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as subscribeInput } from "./inputStream-DmPkJ1aU.js";
|
|
2
2
|
import { t as useMediaQuery } from "./useMediaQuery-BzXGT1Aw.js";
|
|
3
3
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
4
4
|
//#region src/composables/useChatNewMessages.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as sharedState } from "./sharedRealm-BYHklCVM.js";
|
|
2
|
-
import { f as internals, i as getGestureHost } from "./geometry-
|
|
2
|
+
import { f as internals, i as getGestureHost } from "./geometry-BRW7FETc.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-BU1ZWAuo.js";
|
|
2
|
-
import { t as _sfc_main$1 } from "./FieldInfoTip-
|
|
2
|
+
import { t as _sfc_main$1 } from "./FieldInfoTip-Ii7lSYS8.js";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
4
|
//#region src/composables/useInputStatusIcon.ts
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-
|
|
1
|
+
import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
|
|
2
|
+
import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-BkegH2NW.js";
|
|
3
3
|
import { s as currentGesture } from "./layerDepth-DRfWATFr.js";
|
|
4
4
|
import { t as focusForLastInput } from "./focusReturn-DfZS7TCp.js";
|
|
5
5
|
import { t as claimPress } from "./pressClaim-DvdlIn4w.js";
|
|
6
|
-
import { r as isInputShield } from "./inputHoldState-
|
|
6
|
+
import { r as isInputShield } from "./inputHoldState-Bav14W7v.js";
|
|
7
7
|
import { getCurrentScope, onScopeDispose, toValue } from "vue";
|
|
8
8
|
//#region src/composables/useLongPress.ts
|
|
9
9
|
const DEFAULT_DELAY_MS = 500;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
1
|
+
import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
|
|
2
|
+
import { n as isInsideScrollView } from "./scrollView-BGBtu5JP.js";
|
|
3
|
+
import { a as subscribeInput } from "./inputStream-DmPkJ1aU.js";
|
|
3
4
|
import { o as UIKIT_PRESS } from "./gestures-yKyyMqeQ.js";
|
|
4
5
|
import { a as idlePressGesture, o as pressGestureStep, r as PRESS_SCROLL_BRAKE_MS } from "./pressGesture-CfBgXWRM.js";
|
|
5
6
|
import { a as finish, d as PRESS_CONTAINER_ATTRIBUTE, i as finger, l as PRESSABLE_ATTRIBUTE, m as pressSurfaceAt, n as apply, o as releaseIfDead, p as isTrackedByGroup, r as button, s as takeOver, u as PRESS_ACTION_ATTRIBUTE } from "./pressSlot-B6TvGkSO.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as isImeKeyEvent } from "./ime-VY8-80S8.js";
|
|
2
2
|
import { t as animatorFor } from "./animator-Bptiubcx.js";
|
|
3
3
|
import { t as resolveMotion } from "./resolveMotion-DftkGFw6.js";
|
|
4
|
-
import {
|
|
4
|
+
import { s as springs } from "./springs-CPk0tpwL.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-DpbFJbto.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 { t as armClickGuard } from "./clickGuard-
|
|
1
|
+
import { t as armClickGuard } from "./clickGuard-BkegH2NW.js";
|
|
2
2
|
import { c as pressFadeMs, f as PRESS_GROUP_ITEM_ATTRIBUTE, p as isTrackedByGroup, t as PRESSED_ATTRIBUTE } from "./pressSlot-B6TvGkSO.js";
|
|
3
3
|
import { toValue, watch } from "vue";
|
|
4
4
|
import "../styles/touch-hit-area.css";
|
package/package.json
CHANGED
package/styles/bottom-sheet.css
CHANGED
|
@@ -281,6 +281,22 @@
|
|
|
281
281
|
scroll-padding-block-end: 48px;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
/*
|
|
285
|
+
* The inset the on-screen keyboard takes at the end of a Tall sheet's
|
|
286
|
+
* content (useMobileKeyboard writes --_keyboard-inset), so its last control
|
|
287
|
+
* can scroll above the keyboard. It is the content box's last in-flow box,
|
|
288
|
+
* after the content's own children, not a box after the content: Firefox
|
|
289
|
+
* resolves the content's `min-height` as `auto` in the block axis, so the
|
|
290
|
+
* content box keeps the body's height while its children overflow it, and
|
|
291
|
+
* an inset after that box would add no scroll range.
|
|
292
|
+
*/
|
|
293
|
+
.astryx-bottom-sheet__body[data-keyboard='tall'] > .astryx-bottom-sheet__content::after {
|
|
294
|
+
content: '';
|
|
295
|
+
display: block;
|
|
296
|
+
block-size: var(--_keyboard-inset, 0px);
|
|
297
|
+
pointer-events: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
284
300
|
/*
|
|
285
301
|
* The content box is a container. It keeps the body's block formatting and
|
|
286
302
|
* its percentage-height basis, and it publishes the inset it applies.
|