@astryx-vue/core 0.3.0 → 0.4.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-RAVA_cT1.js → AlertDialog-C2inDZWG.js} +5 -5
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-0wTvOo3H.js → AppShell-awAKicsc.js} +3 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-pPZ4dI_s.js → Avatar-DXBjJ88C.js} +47 -34
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-B--NQSB3.js → AvatarGroup-kpAeKLNq.js} +57 -13
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-GbGxrqQO.js → Banner-BdvuyzAe.js} +71 -35
- package/dist/Blockquote/index.js +1 -1
- package/dist/Blockquote-DRoKdcxZ.js +27 -0
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-pt7m4CvC.js → BottomSheet-B4sc3F1S.js} +286 -140
- package/dist/{BottomSheet-JYMB_Ofl.js → BottomSheet-m54uCMJN.js} +20 -4
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Breadcrumbs-D4ZzHEB0.js +223 -0
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-B6Hj_O_s.js → Button-ONOoHdkg.js} +25 -15
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/ButtonGroup-DnkSZ9a5.js +87 -0
- package/dist/{ButtonTooltip-nWWrth8j.js → ButtonTooltip-CNKOQHYR.js} +7 -4
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-B7vIowKq.js → Calendar-CjK-JUDM.js} +5 -5
- package/dist/Card/index.d.ts +2 -2
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CA8zpD9v.js → Carousel-D262qigj.js} +8 -8
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bmna9EOA.js → Chat-DD_mlIP3.js} +165 -101
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/{CheckboxIndicator-D37cm2Rh.js → CheckboxIndicator-fH4d-JE1.js} +9 -3
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BS9J6edf.js → CheckboxInput-D8vTmAMZ.js} +20 -12
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CX1i_jVP.js → CheckboxList-DCvHewHB.js} +155 -38
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Djgwa0ko.js → Citation-C69BgxW3.js} +8 -3
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DUsC-j03.js → ClickableCard-ChAfiw9T.js} +9 -6
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +3 -3
- package/dist/{Code-XnPuGxey.js → Code-Bg7GBdxy.js} +2 -1
- package/dist/{CodeBlock-D0BFubut.js → CodeBlock-DsbwTBiT.js} +8 -8
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Cov3Pyq5.js → Collapsible-Bdj0WYpb.js} +13 -11
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-YHsUNg3V.js → CommandPalette-CZ7CZglZ.js} +147 -67
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-DWLdKPGI.js → ComplexSelector-CIz6DDmY.js} +114 -28
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-Bq9b3Ti5.js → ContextMenu-CxoiRh_h.js} +297 -179
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DT518j5E.js → DateInput-C67HCOU-.js} +563 -72
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-Bqi5tlIA.js → DateRangeInput-Dsf5Tyf-.js} +91 -26
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/DateTimeInput-tfM1y5nZ.js +562 -0
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +2 -2
- package/dist/{Dialog-BiOSKQso.js → Dialog-DT1GzCrB.js} +28 -11
- package/dist/{Dialog-FGHfDu5M.js → Dialog-fhyxB00e.js} +32 -5
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/{Divider-BtwnL18I.js → Divider-mOZ6vIQw.js} +5 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-CoOQVlRp.js → DropdownMenu-C6wBC18g.js} +84 -56
- package/dist/{DropdownMenu-DEb2dSSP.js → DropdownMenu-G-pWSiBk.js} +479 -264
- package/dist/{DropdownMenuRadioItem.vue-CXEURBcq.d.ts → DropdownMenuRadioItem.vue-Qd-8Rg4Q.d.ts} +236 -230
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-C_GH7IV5.js → EmptyState-CmOQf2SH.js} +2 -2
- package/dist/Field/index.d.ts +4 -3
- package/dist/Field/index.js +4 -3
- package/dist/{Field-D5gUEGw4.js → Field-JIxT3xCh.js} +5 -4
- package/dist/FieldIcon-BFSHZEs_.js +40 -0
- package/dist/{FieldInfoTip-Ds-sW_jY.js → FieldInfoTip-BbgLt4ug.js} +4 -4
- package/dist/{FieldLabel-BNeXRuGH.js → FieldLabel-CHqp1y3z.js} +13 -8
- package/dist/FieldStatus/index.d.ts +1 -1
- package/dist/FieldStatus/index.js +1 -1
- package/dist/{FieldStatus-MjY19ERl.js → FieldStatus-DaAB3TIt.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BpdiO1V8.js → FileInput-Bi1uty-F.js} +108 -31
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-D47FjiOq.js → FormLayout-B9dUB6Ps.js} +1 -1
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BnwWEWkp.js → Heading-BzBunfN7.js} +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-ycY50pRN.js → HoverCard-BpJhT0sn.js} +35 -22
- package/dist/Icon/index.d.ts +4 -4
- package/dist/Icon/index.js +1 -1
- package/dist/{Icon-bteSId7T.js → Icon-KDnUyY7f.js} +12 -20
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DDNgNl7B.js → IconButton-DI-XBbtV.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +2 -1
- package/dist/InputClearButton-CfSIqc-V.js +40 -0
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/InputGroup/index.js +2 -2
- package/dist/{InputGroup-CA03Smrs.js → InputGroup-D3F-QnET.js} +2 -2
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-DJay_w3B.js → InternationalizationProvider-CVV5QDgp.js} +5 -9
- package/dist/{Item-KhFKX9St.js → Item-DWMIjN8n.js} +34 -9
- package/dist/Kbd/index.js +1 -1
- package/dist/{Kbd-BB-Dw6zE.js → Kbd-CV3LO2Ge.js} +18 -2
- package/dist/LayerContentBoundary-CvsKxwwm.js +27 -0
- package/dist/LayerProvider/index.js +1 -1
- package/dist/{LayerProvider-D9NsQFzL.js → LayerProvider-B6zpMBWC.js} +15 -3
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-C6RHllr-.js → Layout-JJRCG7Mf.js} +1 -1
- package/dist/{LayoutPanel-DXOsaeQb.js → LayoutPanel-zM5vjrKS.js} +12 -8
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-DTF9EdTG.js → Lightbox-CjXhbDPc.js} +14 -12
- package/dist/Link/index.js +1 -1
- package/dist/{Link-BqHCtiyt.js → Link-ClNkTN1Q.js} +29 -12
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-8RWT8XAG.js → ListItem-BQXMu1Tb.js} +1 -1
- package/dist/Markdown/index.d.ts +5 -2
- package/dist/Markdown/index.js +4 -2
- package/dist/Markdown/parser/index.d.ts +4 -0
- package/dist/Markdown/parser/index.js +2 -0
- package/dist/Markdown/plugin-protocol/index.d.ts +35 -0
- package/dist/Markdown/plugin-protocol/index.js +107 -0
- package/dist/Markdown/plugin-renderer/index.d.ts +31 -0
- package/dist/Markdown/plugin-renderer/index.js +42 -0
- package/dist/{Markdown-CvtN7HnF.js → Markdown-EIBrwQrb.js} +195 -524
- package/dist/MediaTheme-DlLqYhDy.js +433 -0
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-B-OelQlt.js → MetadataList-DLlSLX1n.js} +15 -7
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DxGz0xKA.js → MobileNavToggle-DgJYyzT6.js} +52 -17
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dlb7MLlW.js → MoreMenu-C8BEt6-O.js} +74 -61
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/MultiSelector-C7NCAtwW.js +1456 -0
- package/dist/{NavDisclosure-C_fugrQ3.js → NavDisclosure-Bq9DTZLO.js} +29 -7
- package/dist/{NavHeadingSurface-B3yJspSN.js → NavHeadingSurface-DQXisuaX.js} +29 -26
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +2 -2
- package/dist/{NavItem-BBIGSvDj.js → NavItem-BPb3yfgz.js} +17 -4
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-ThXguZAz.js → NavMenu-BYIDzjix.js} +42 -15
- package/dist/{NavMenuItem-BvJNsDFC.js → NavMenuItem-D3FO90GR.js} +14 -12
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-3u3NZWnv.js +727 -0
- package/dist/Outline/index.d.ts +2 -2
- package/dist/Outline/index.js +2 -2
- package/dist/{Outline-755h-lMP.js → Outline-8szj9eXu.js} +91 -6
- package/dist/OverflowList/index.d.ts +2 -2
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-NmrSMbxb.js → OverflowList-BizpEwH8.js} +23 -6
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DqwNQFRp.js → Pagination-Cihr1CjD.js} +2 -2
- package/dist/PickerWheel-CSwUYfes.js +69 -0
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DJf8POzL.js → Popover-78dFjTb9.js} +20 -15
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-DvjiPqMZ.js → PowerSearch-BHx91ypY.js} +778 -590
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-CVLzdoBK.js → ProgressBar-VP4JS7vm.js} +10 -7
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-Bfu6JSNV.js → RadioGroup-DeSIRrgt.js} +94 -26
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-xY1cwLdZ.js → RadioList-Co2lmetC.js} +57 -8
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-q4nD_586.js → ResizeHandle-DjLZ2pcq.js} +103 -50
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/ScrollableArea/index.js +1 -1
- package/dist/{ScrollableArea-D4dCJv9I.js → ScrollableArea-0u6RWtGG.js} +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-ChHmFrrC.js → SegmentedControl-D1wWGBZo.js} +11 -5
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-Cku4dRzc.js → SelectableCard-BEqnhPaX.js} +16 -11
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-swa3RNQI.js +1049 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-BF8mYDxl.js → SideNav-BH6XKsW2.js} +56 -42
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DWobsPgm.js → Slider-DG2YXll8.js} +172 -46
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner-BY8iQz--.js +200 -0
- package/dist/Stack/index.js +2 -2
- package/dist/{Stack-CTsTFfar.js → Stack-Bb_h60t3.js} +1 -1
- package/dist/{Stack-kQlYbbL4.js → Stack-Bp-XN9J4.js} +12 -7
- package/dist/StatusDot/index.d.ts +1 -1
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-BPUhMOff.js → StatusDot-BS_ohXhd.js} +8 -4
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CE8dHysu.js → Stepper-FtkTq5qR.js} +127 -113
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DaVPRxvN.js → Switch-0JKvJluV.js} +38 -22
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-DIkK9sgK.js → TabList-cpjvnbhx.js} +205 -63
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-fecqnm7P.js → Table-fWs_ZQBF.js} +735 -461
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CV3LmscH.js → Text-CmTOgYXf.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Ab5Sw60T.js → TextArea-CwSfEjT1.js} +110 -50
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-zFT1_qgI.js → TextInput-CavITage.js} +71 -38
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -2
- package/dist/Theme-BbDT8B_C.js +2125 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-C3NnJUFG.js → Thumbnail-DpJnaNbg.js} +17 -14
- package/dist/{TimeField-CoHDGmsP.js → TimeField-DefNjDIT.js} +297 -40
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-D2k3Ux3p.js → TimeInput-j5vzN8MG.js} +78 -9
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-avMQk5DN.js → Timer-CH7GsEVu.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-xpQKCk0d.js → Timestamp-dtT4yADD.js} +9 -9
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast-igtJYSw0.js +685 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B-C-Q7XP.js → ToggleButton-cLjh9W-x.js} +5 -4
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-DsntTYhQ.js → Token-DhsAtAH6.js} +32 -17
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-B5C_qY7t.js → Tokenizer-BGdj78UK.js} +107 -23
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BrgvvTCk.js → Toolbar-C0pMWL4S.js} +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-C4Vaqd3G.js → Tooltip-sAM8i1eO.js} +23 -19
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Ciq0l1w7.js → TopNav-Dw0m387B.js} +23 -22
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-BUz-KZJd.js → TreeList-Bunn7u3T.js} +129 -46
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-JP9RT87x.js → Typeahead-DRyf2HEh.js} +123 -26
- package/dist/{TypeaheadMenu-DBW6rHeO.js → TypeaheadMenu-BY5__sPC.js} +141 -51
- package/dist/{announce-Cnio10Wk.js → announce-B210eJVf.js} +17 -2
- package/dist/characters-rcDbGt71.d.ts +29 -0
- package/dist/characters-wTnzjkkR.js +58 -0
- package/dist/{colorMode-CBgdgDSn.js → colorMode-BxqfDP4P.js} +1 -4
- package/dist/composables/index.d.ts +5 -4
- package/dist/composables/index.js +23 -18
- package/dist/{composables-CbKx9C1Y.js → composables-CnsDaMuU.js} +167 -197
- package/dist/context-B6UElI5X.js +5 -0
- package/dist/context-CM-cjGg_.js +1425 -0
- package/dist/{context-Cfjh8te1.js → context-Cfml4jaK.js} +5 -3
- package/dist/context-IvbU9c3T.js +8 -0
- package/dist/context-pjBxaMSh.js +28 -0
- package/dist/fieldParts--SyRZVQG.js +44 -0
- package/dist/fieldParts-LXpQMKE8.d.ts +27 -0
- package/dist/{focus-CpficIgf.js → focus-l8jVTcqd.js} +1 -1
- package/dist/hoverIntent-DMHGb85c.js +115 -0
- package/dist/{index-ClNU2Th8.d.ts → index-3t5RAfNP.d.ts} +6 -2
- package/dist/{index-B9e52paP.d.ts → index-5LVG3QyV.d.ts} +1 -1
- package/dist/{index-CsNi1I8j.d.ts → index-B08-Uxhv.d.ts} +4 -2
- package/dist/{index-TXcNH86P.d.ts → index-B1eCxBCY.d.ts} +1 -1
- package/dist/{index-Cn-sSds-.d.ts → index-B1t1oQWH.d.ts} +24 -1
- package/dist/{index-BkjSF265.d.ts → index-BEZ4ezJk.d.ts} +3 -3
- package/dist/{index-yT1yiiww.d.ts → index-BI6jikpA.d.ts} +23 -11
- package/dist/{index-DeQwYJbg.d.ts → index-BNaRK-s5.d.ts} +10 -1
- package/dist/{index-D97pQbua.d.ts → index-BV2D2x_u.d.ts} +1 -1
- package/dist/{index-Crp3NFLW.d.ts → index-BZKgbyN9.d.ts} +1 -1
- package/dist/{index-Bu8NA2SD.d.ts → index-BaxM-pFP.d.ts} +12 -3
- package/dist/{index-BVKivP59.d.ts → index-Bgk1Rj2A.d.ts} +32 -3
- package/dist/index-BkUkm6Al.d.ts +11 -0
- package/dist/index-Bo-ofFyg.d.ts +166 -0
- package/dist/{index-B1WJxt-n.d.ts → index-C-tFz2Yx.d.ts} +17 -7
- package/dist/{index-DWh2WC8W.d.ts → index-C4Cjz6OK.d.ts} +2 -2
- package/dist/{index-CqE4Bf3Q.d.ts → index-C732aNMY.d.ts} +18 -4
- package/dist/{index-B7yhzGUT.d.ts → index-C7sam-SB.d.ts} +2 -2
- package/dist/{index-BrJzFA5X.d.ts → index-C90l2rH1.d.ts} +1 -1
- package/dist/{index-vP0EtrJJ.d.ts → index-C9gAlDt_.d.ts} +6 -3
- package/dist/index-CKUfpmFL.d.ts +375 -0
- package/dist/{index-CL1T2j4y.d.ts → index-CL8JvxHW.d.ts} +3 -3
- package/dist/{index-IBAInumL.d.ts → index-CMme-xmL.d.ts} +19 -6
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-12QYAbiz.d.ts → index-CRrSHbok.d.ts} +3 -2
- package/dist/{index-B42oE_F-.d.ts → index-CT5OEUxd.d.ts} +17 -4
- package/dist/{index-DG52Bg0W.d.ts → index-CTf3SK0b.d.ts} +6 -0
- package/dist/{index-Cde5JvtX.d.ts → index-CUVmtB5-.d.ts} +13 -6
- package/dist/{index-DXpSFlPG.d.ts → index-CWaSYtk9.d.ts} +4 -4
- package/dist/{index-CVn0GBdB.d.ts → index-Ca8VIE4l.d.ts} +1 -1
- package/dist/{index-Cyb9Du5Z.d.ts → index-CfR2Z0uG.d.ts} +1 -1
- package/dist/{index-Byar3h1e.d.ts → index-D05JGsT3.d.ts} +6 -3
- package/dist/{index-hCpxKePE.d.ts → index-D5N9ikrS.d.ts} +1 -1
- package/dist/{index-CkKPMIeX.d.ts → index-D7XRtUTY.d.ts} +9 -0
- package/dist/{index-i0tNFWfz.d.ts → index-D8lv2BiD.d.ts} +3 -1
- package/dist/{index-TntQsADQ.d.ts → index-DEm3kRBO.d.ts} +4 -3
- package/dist/{index-0QGtSf3r.d.ts → index-DFLPv9io.d.ts} +4 -3
- package/dist/{index-C2nbK2AA.d.ts → index-DLAG3m9W.d.ts} +13 -3
- package/dist/{index-D41_xqjs.d.ts → index-DTuhnqHb.d.ts} +16 -9
- package/dist/{index-B3Fomy15.d.ts → index-DbiZvj1P.d.ts} +4 -4
- package/dist/{index-C5e-7Obr.d.ts → index-Dj1_1t3j.d.ts} +19 -6
- package/dist/{index-DIXAzTKL.d.ts → index-DxxudRgB.d.ts} +1 -1
- package/dist/{index-BhpAUzUr.d.ts → index-Dy746dfn.d.ts} +1 -1
- package/dist/{index-GI9xIV9l.d.ts → index-JL4auphT.d.ts} +2 -2
- package/dist/{index-DVmgNb78.d.ts → index-TA1zVibb.d.ts} +4 -4
- package/dist/{index-DUaLJO7l.d.ts → index-UA93Im7H.d.ts} +155 -109
- package/dist/{index-COgrQZIL.d.ts → index-YKCx03zD.d.ts} +2 -2
- package/dist/{index-XuAAcYiP.d.ts → index-f3d9cVtj.d.ts} +1 -1
- package/dist/{index-T2FOcOuI.d.ts → index-jOwU3YoR.d.ts} +400 -90
- package/dist/{index-CICeEoZV.d.ts → index-pNtfr-RW.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-pYh4gqgl.d.ts} +1 -1
- package/dist/index.d.ts +81 -75
- package/dist/index.js +150 -136
- package/dist/inlineSize-BNe8wggI.js +66 -0
- package/dist/inputPresentation-BOyHkCDr.js +62 -0
- package/dist/interactionModality-ACpTMhak.js +44 -0
- package/dist/isApplePlatform-B1ju6F5B.js +27 -0
- package/dist/isRenderable-BnKHIqfd.js +21 -0
- package/dist/layerDepth-CNDh-IHb.js +181 -0
- package/dist/link-DuuA2eCL.js +30 -0
- package/dist/loadCatalog-CsZFr9dg.js +424 -0
- package/dist/loadCatalog-opk5hs94.d.ts +803 -0
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -3
- package/dist/locale-D1Z3K290.js +343 -0
- package/dist/modalOutlet-CUOcrhIu.js +56 -0
- package/dist/optionAction-Cg7xQLUA.d.ts +6 -0
- package/dist/{power-search-DrDfcoL1.d.ts → power-search-gHLIYXs5.d.ts} +2 -0
- package/dist/protocol-DHxY0NI8.js +113 -0
- package/dist/protocol-DwUmpC5G.d.ts +240 -0
- package/dist/publicParser-B6XMcsB2.d.ts +141 -0
- package/dist/publicParser-DWUMCx7j.js +1437 -0
- package/dist/resizableChannel-3vivrEcT.js +20 -0
- package/dist/safeUrl-CsvfcZ9m.js +54 -0
- package/dist/scopedProvide-C-Df7c15.js +30 -0
- package/dist/scrollKeyboardDelegation-D7cumnOl.js +238 -0
- package/dist/scrollLock-C3aT4-0z.js +102 -0
- package/dist/{searchResultMessage-hXXNOFJP.js → searchResultMessage-DtyScdZs.js} +5 -14
- package/dist/{semantic-CKH9XVqa.d.ts → semantic-BF_AjLvk.d.ts} +6 -3
- package/dist/slug-DAK6hdbr.js +17 -0
- package/dist/syntaxContext-DmIfNNtb.js +4 -0
- package/dist/triggerVariant-BsL8jMHs.js +16 -0
- package/dist/{types-0Q_SJv_F.d.ts → types-Bb7OGivY.d.ts} +6 -1
- package/dist/{types-CwyibrRB.d.ts → types-C5GQ2KCK.d.ts} +23 -3
- package/dist/{types-gKsEkk2g.d.ts → types-CsqwQkf1.d.ts} +143 -10
- package/dist/upstreamMap-ocuIRfI2.js +893 -0
- package/dist/{useAnchoredListbox-DwztMNjP.js → useAnchoredListbox-DGxxKHZb.js} +2 -2
- package/dist/{useAsyncSource-xpQovjV_.d.ts → useAsyncSource-aGzrvRkI.d.ts} +3 -0
- package/dist/{useClickableContainer-DyNpnSEa.js → useClickableContainer-CdGp_Cev.js} +1 -1
- package/dist/{useClipboard-BDfbEsWd.js → useClipboard-Dk8cS810.js} +1 -1
- package/dist/useHoverLayerDismiss-kYJ_NqL4.js +27 -0
- package/dist/{useIndicator-i1NORM7W.js → useIndicator-D9Y0dJsm.js} +5 -23
- package/dist/{useInputContainer-CpgDe2-4.js → useInputContainer-CLcYrby4.js} +1 -1
- package/dist/{useInputStatusIcon-DBOwxV4x.js → useInputStatusIcon-CWkCeMyX.js} +2 -2
- package/dist/useLayerMountTarget-BmZyeKWE.js +156 -0
- package/dist/{useListFocus-D0iOJl39.js → useListFocus-ChxLg0b4.js} +3 -2
- package/dist/{useMenuDrillIn-DzKGkTho.js → useMenuDrillIn-DhUnPvKs.js} +6 -5
- package/dist/useMenuHover-Djreu23i.js +170 -0
- package/dist/useMenuPress-8foxY8z4.js +764 -0
- package/dist/{useMergedRefs-CfHHlCsn.js → useMergedRefs-Cb6_w93m.js} +24 -4
- package/dist/{useNumberField-4-dIGVed.js → useNumberField-Dk1BE3-K.js} +3 -3
- package/dist/useOptionActionGrid-CkJcuvaU.js +97 -0
- package/dist/{usePositionedLayer-Cru9_00b.js → usePositionedLayer-B7cvG-_v.js} +43 -49
- package/dist/usePressFeedback-BJCpjEpv.js +319 -0
- package/dist/{useResizable-DDwPpPe6.d.ts → useResizable-1MHPNaRD.d.ts} +19 -1
- package/dist/{useResizable-B3ahKLoZ.js → useResizable-I3BCiLSL.js} +72 -40
- package/dist/useResolvedLabelHidden-B2rlWiaI.js +30 -0
- package/dist/{useRestoreFocus-Djw9RUIf.js → useRestoreFocus-XEKs5-gp.js} +49 -7
- package/dist/useScrollOverflow-DuMoGXmm.js +67 -0
- package/dist/useScrollableArea-BE8b3qm7.js +222 -0
- package/dist/{useTimeValue-6ufHM15W.js → useTimeValue-BJd0xBhG.js} +4 -22
- package/dist/useTranslator-PEXMxDpv.js +35 -0
- package/dist/{useTypeahead-PAK8lMYz.js → useTypeahead-BvtflkRk.js} +4 -5
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +5 -0
- package/dist/{utils-D33VQDnk.js → utils-ClVseK2w.js} +29 -2
- package/dist/utils-z3Q6BGIJ.js +819 -0
- package/locales/SOURCE.json +1 -1
- package/package.json +18 -2
- package/reset.css +364 -1
- package/styles/avatar-group.css +9 -1
- package/styles/badge.css +8 -5
- package/styles/banner.css +125 -26
- package/styles/blockquote.css +1 -0
- package/styles/bordered-control.css +1 -1
- package/styles/bottom-sheet.css +74 -6
- package/styles/breadcrumbs.css +16 -2
- package/styles/button-group.css +3 -1
- package/styles/button.css +53 -11
- package/styles/card.css +1 -1
- package/styles/chat.css +16 -6
- package/styles/checkbox-input.css +10 -0
- package/styles/clickable-card.css +10 -3
- package/styles/collapsible.css +12 -5
- package/styles/command-palette.css +29 -14
- package/styles/complex-selector.css +24 -5
- package/styles/context-menu.css +3 -3
- package/styles/date-input.css +111 -1
- package/styles/dialog-header.css +4 -1
- package/styles/dialog.css +7 -0
- package/styles/dropdown-menu.css +12 -3
- package/styles/field.css +5 -0
- package/styles/form-layout.css +1 -0
- package/styles/heading.css +18 -8
- package/styles/icon.css +9 -9
- package/styles/kbd.css +1 -1
- package/styles/layer.css +72 -0
- package/styles/list.css +9 -2
- package/styles/metadata-list.css +1 -0
- package/styles/mobile-nav.css +4 -1
- package/styles/multi-selector.css +48 -1
- package/styles/nav-item.css +9 -2
- package/styles/nav-menu.css +12 -2
- package/styles/number-input.css +9 -1
- package/styles/overflow-list.css +1 -1
- package/styles/popover.css +2 -1
- package/styles/power-search.css +5 -3
- package/styles/pressable.css +63 -22
- package/styles/progress-bar.css +15 -3
- package/styles/radio.css +16 -0
- package/styles/resize-handle.css +42 -0
- package/styles/segmented-control.css +12 -4
- package/styles/selector.css +53 -1
- package/styles/side-nav.css +19 -0
- package/styles/slider.css +4 -3
- package/styles/spinner.css +48 -42
- package/styles/stepper.css +58 -4
- package/styles/switch.css +26 -0
- package/styles/tab-list.css +132 -3
- package/styles/table.css +88 -11
- package/styles/text-area.css +7 -1
- package/styles/text-input.css +1 -1
- package/styles/text.css +6 -6
- package/styles/thumbnail.css +11 -3
- package/styles/time-input.css +8 -0
- package/styles/toast.css +37 -3
- package/styles/token.css +2 -2
- package/styles/tokenizer.css +1 -1
- package/styles/toolbar.css +4 -1
- package/styles/tree-list.css +1 -1
- package/styles/typeahead.css +34 -1
- package/styles.css +1 -0
- package/dist/Blockquote-DFqBv_oJ.js +0 -18
- package/dist/Breadcrumbs-DIm4figq.js +0 -141
- package/dist/ButtonGroup-ySQWanDP.js +0 -125
- package/dist/DateTimeInput-A7m2O3bg.js +0 -268
- package/dist/FieldIcon--NTgW5IU.js +0 -44
- package/dist/MultiSelector-BtAUfQ3t.js +0 -990
- package/dist/NumberInput-AZ9x3oja.js +0 -473
- package/dist/Selector-DJ2BhUTV.js +0 -677
- package/dist/Spinner-9cYUCnDy.js +0 -84
- package/dist/Theme-CtaUWo4g.js +0 -1246
- package/dist/Toast-BuqIZV5z.js +0 -322
- package/dist/context-4PuqD1Ic.js +0 -4
- package/dist/context-D5-MwxnN.js +0 -4
- package/dist/context-iABt_ueM.js +0 -976
- package/dist/index-BH9PzQ1F.d.ts +0 -87
- package/dist/link-C4_WogdF.js +0 -18
- package/dist/loadCatalog-BGHKG_9N.d.ts +0 -457
- package/dist/loadCatalog-CXKqEB9s.js +0 -877
- package/dist/locale-DgkZEMTn.js +0 -105
- package/dist/platform-B_9W_aHW.js +0 -33
- package/dist/scrollLock-BzIvIimL.js +0 -42
- package/dist/useMenuPress-D-FRNrBW.js +0 -573
- package/dist/useScrollableArea-DDk_CluT.js +0 -172
- /package/dist/{index-lgvUFSCO.d.ts → index-CryFtTT6.d.ts} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/utils/characters.ts
|
|
2
|
+
/**
|
|
3
|
+
* Reuse a single segmenter when the runtime supports Intl.Segmenter.
|
|
4
|
+
* `grapheme` is the Intl granularity name for a user-perceived character.
|
|
5
|
+
*/
|
|
6
|
+
const characterSegmenter = typeof Intl.Segmenter === "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
|
|
7
|
+
/**
|
|
8
|
+
* Split a string into user-perceived characters. The code-point fallback
|
|
9
|
+
* keeps surrogate pairs intact but may split joined emoji sequences and flag
|
|
10
|
+
* pairs on runtimes without Intl.Segmenter.
|
|
11
|
+
*/
|
|
12
|
+
function splitCharacters(str) {
|
|
13
|
+
if (characterSegmenter) return [...characterSegmenter.segment(str)].map((s) => s.segment);
|
|
14
|
+
return [...str];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Number of characters in a string — the count a person would give, where one
|
|
18
|
+
* emoji, flag, or accented letter is one character. Replacement for `.length`
|
|
19
|
+
* on user-visible strings, which counts internal storage units instead.
|
|
20
|
+
*/
|
|
21
|
+
function characterCount(str) {
|
|
22
|
+
if (str === "") return 0;
|
|
23
|
+
return splitCharacters(str).length;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The first character of a string, or '' when empty. Replacement for
|
|
27
|
+
* `.charAt(0)`, which can return half of an emoji. Reads only the first
|
|
28
|
+
* character, so cost does not scale with the length of the string.
|
|
29
|
+
*/
|
|
30
|
+
function firstCharacter(str) {
|
|
31
|
+
if (characterSegmenter) {
|
|
32
|
+
const first = characterSegmenter.segment(str)[Symbol.iterator]().next();
|
|
33
|
+
return first.done ? "" : first.value.segment;
|
|
34
|
+
}
|
|
35
|
+
const codePoint = str.codePointAt(0);
|
|
36
|
+
return codePoint == null ? "" : String.fromCodePoint(codePoint);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Truncate to at most `max` characters, ellipsis included: strings within
|
|
40
|
+
* `max` characters pass through unchanged; longer strings are cut so the
|
|
41
|
+
* result — content plus `ellipsis` — is exactly `max` characters (or just the
|
|
42
|
+
* ellipsis, when `max` is smaller than the ellipsis itself). Replacement for
|
|
43
|
+
* `str.slice(0, n) + '…'`, which can cut an emoji in half.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```
|
|
47
|
+
* truncateCharacters('abcdefghij', 5) // 'abcd…'
|
|
48
|
+
* truncateCharacters('abcdefghij', 8, '...') // 'abcde...'
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
function truncateCharacters(str, max, ellipsis = "…") {
|
|
52
|
+
const characters = splitCharacters(str);
|
|
53
|
+
if (characters.length <= max) return str;
|
|
54
|
+
const keep = Math.max(max - characterCount(ellipsis), 0);
|
|
55
|
+
return characters.slice(0, keep).join("") + ellipsis;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { firstCharacter as n, truncateCharacters as r, characterCount as t };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
//#region src/Code/syntaxContext.ts
|
|
2
|
-
const syntaxThemeKey = Symbol("astryx-syntax-theme");
|
|
3
|
-
//#endregion
|
|
4
1
|
//#region src/Theme/colorMode.ts
|
|
5
2
|
/**
|
|
6
3
|
* Split `light-dark(light, dark)` at the top-level comma.
|
|
@@ -48,4 +45,4 @@ function readColorMode(prefersDark) {
|
|
|
48
45
|
return prefersDark ? "dark" : "light";
|
|
49
46
|
}
|
|
50
47
|
//#endregion
|
|
51
|
-
export { resolveLightDark as n,
|
|
48
|
+
export { resolveLightDark as n, readColorMode as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as SearchableItem, c as useAsyncSource, i as SearchSource, n as AsyncSourceStatus, o as UseAsyncSourceOptions, r as CreateStaticSourceOptions, s as createStaticSource, t as AsyncSource } from "../useAsyncSource-
|
|
1
|
+
import { $ as MergedRefHandle, $n as UseContainerReveal, $t as Hotkey, A as useResolvedLabelHidden, An as useDevWarning, Ar as applyRangeClick, At as UseKeyboardHint, B as computeOverflow, Bn as TimeSurface, Bt as useInputStatusIcon, C as ScrollableAreaState, Cn as useEntryAnimation, Cr as useAppShellMobile, Ct as useLayerTeleportTarget, D as RestoreFocus, Dn as DisclosureHandleRef, Dr as ISODateRange, Dt as UseLayerReturn, E as useScrollableArea, En as DisclosureHandle, Er as useAnnounce, Et as UseLayerOptions, F as usePendingChange, Fn as HourFormat, Fr as isSameRange, Ft as UseInteractiveRoleReturn, G as computeSteppedValue, Gn as parseISOTime, Gt as UseIndicatorFocusRingOptions, H as NumberField, Hn as formatISOTime, Ht as UseInputContainerOptions, I as ComputeOverflowInput, In as ISOTimeString, Ir as orderRange, It as useInteractiveRole, J as buildMonthGrid, Jn as ControllableState, Jt as ImageSampleRegion, K as useNumberField, Kn as resolveTimeSurface, Kt as UseIndicatorFocusRingReturn, L as ComputeOverflowResult, Ln as NativePicker, Lr as resolveWeekStart, Lt as InputStatusVariant, M as UsePressFeedbackReturn, Mn as DateSurface, Mr as formatDateRange, Mt as useKeyboardHint, N as usePressFeedback, Nn as resolveDatePresentation, Nr as isDayOutsideSpan, Nt as InteractiveRole, O as UseRestoreFocusOptions, On as useDisclosureHandle, Or as RangeClickResult, Ot as useLayer, P as PendingChange, Pn as resolveDateSurface, Pr as isRangeWithinSpan, Pt as UseInteractiveRoleOptions, Q as MergedRef, Qn as ContentRevealOptions, Qt as useImageMode, R as UseOverflowOptions, Rn as ParsedTime, Rr as spanDays, Rt as UseInputStatusIconOptions, S as ScrollStickyContainment, Sn as UseEntryAnimationReturn, Sr as appShellMobileKey, St as useLayerMountTarget, T as UseScrollableAreaResult, Tn as useDismiss, Tr as AnnouncePoliteness, Tt as LayerMode, U as NumberStepDirection, Un as isTimeInRange, Ut as useInputContainer, V as useOverflow, Vn as formatDisplayTime, Vt as InputContainerHandlers, W as UseNumberFieldOptions, Wn as parseDisplayTime, Wt as IndicatorFocusRingHandlers, X as toISODate, Xn as useControllableState, Xt as imageModeFromPixels, Y as parseISODate, Yn as UseControllableStateOptions, Yt as UseImageModeOptions, Z as todayISODate, Zn as ContainerRevealOptions, Zt as perceptualLightness, _ as ScrollAxis, _n as FieldControlState, _r as CHAT_MESSAGE_CLASS, _t as useLongPress, a as UseTouchTriggerOptions, an as useGridRovingFocus, ar as useCombobox, at as resetMenuPress, b as ScrollOverscroll, bn as EntryAnimationPreset, br as useChatNewMessages, bt as UseListFocusOptions, c as useTouchTrigger, cn as useGridFocus, cr as INTERACTIVE_SELECTORS, ct as MenuPressEffect, d as snapToGraphemeBoundary, dn as useFocusTrap, dr as hasTextSelection, dt as MenuPressPointerType, en as useHotkeys, er as UseContainerRevealOptions, et as useMergedRefs, f as useStreamingText, fn as FileRejection, fr as useClickableContainer, ft as MenuPressStep, g as useScrollLock, gn as selectFiles, gr as useChatStreamScroll, gt as LongPressOptions, h as useScrollOverflow, hn as formatFileSize, hr as UseChatStreamScrollReturn, ht as LongPressHandlers, i as LayerTouchTrigger, in as UseGridRovingFocusOptions, ir as UseComboboxOptions, it as isMenuPressActivation, j as UsePressFeedbackOptions, jn as DatePresentation, jr as compareISODate, jt as UseKeyboardHintOptions, k as useRestoreFocus, kn as devWarn, kr as WeekStartsOn, kt as KeyboardHintOrientation, l as StreamingTextSpeed, ln as FocusTrap, lr as UseClickableContainerOptions, lt as MenuPressEvent, m as UseScrollOverflowResult, mn as FileSelectionResult, mr as UseChatStreamScrollOptions, mt as useMediaQuery, n as UseTypeaheadReturn, nn as useHandleRef, nr as Combobox, nt as MenuPressOptions, o as UseTouchTriggerReturn, on as UseGridFocusOptions, or as useCoarsePointer, ot as MENU_PRESS_MARKER, p as ScrollOverflowState, pn as FileSelectionOptions, pr as ChatScrollToBottomOptions, pt as menuPressStep, q as addMonths, qn as shiftTime, qt as useIndicatorFocusRing, r as useTypeahead, rn as GridRovingFocus, rr as ComboboxOption, rt as useMenuPress, s as isActionTrigger, sn as UseGridFocusReturn, sr as ClickableContainerHandlers, st as MENU_PRESS_SETTLE_MS, t as UseTypeaheadOptions, tn as HandleRef, tr as useContainerReveal, tt as MenuPress, u as UseStreamingTextOptions, un as UseFocusTrapOptions, ur as hasInteractiveAncestor, ut as MenuPressGesture, v as ScrollAxisState, vn as FieldControlStateInput, vr as UseChatNewMessagesOptions, vt as ListFocus, w as UseScrollableAreaOptions, wn as UseDismissOptions, wr as AnnounceFn, wt as useResolvedLayerTeleport, x as ScrollRole, xn as UseEntryAnimationOptions, xr as AppShellMobile, xt as useListFocus, y as ScrollKeyboardAccess, yn as useFieldControlState, yr as UseChatNewMessagesReturn, yt as ListFocusOrientation, z as UseOverflowReturn, zn as TimePresentation, zt as UseInputStatusIconReturn } from "../index-jOwU3YoR.js";
|
|
2
|
+
import { a as SearchableItem, c as useAsyncSource, i as SearchSource, n as AsyncSourceStatus, o as UseAsyncSourceOptions, r as CreateStaticSourceOptions, s as createStaticSource, t as AsyncSource } from "../useAsyncSource-aGzrvRkI.js";
|
|
3
3
|
import { n as UseClipboardReturn, r as useClipboard, t as UseClipboardOptions } from "../useClipboard-CU-kfqeJ.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { t as characterCount } from "../characters-rcDbGt71.js";
|
|
5
|
+
import { a as ResizableRegionConfig, c as UseResizableMultiConfig, d as percent, f as useResizable, i as ResizableRegion, l as UseResizableOptions, n as ResizablePercentSize, o as ResizableSize, r as ResizableProps, s as ResizableState, t as ResizableDirection, u as UseResizableSingleOptions } from "../useResizable-1MHPNaRD.js";
|
|
6
|
+
export { type AnnounceFn, type AnnouncePoliteness, type AppShellMobile, type AsyncSource, type AsyncSourceStatus, CHAT_MESSAGE_CLASS, type ChatScrollToBottomOptions, type ClickableContainerHandlers, type Combobox, type ComboboxOption, type ComputeOverflowInput, type ComputeOverflowResult, type ContainerRevealOptions, type ContentRevealOptions, type ControllableState, type CreateStaticSourceOptions, type DatePresentation, type DateSurface, type DisclosureHandle, type DisclosureHandleRef, type EntryAnimationPreset, type FieldControlState, type FieldControlStateInput, type FileRejection, type FileSelectionOptions, type FileSelectionResult, type FocusTrap, type GridRovingFocus, type HandleRef, type Hotkey, type HourFormat, INTERACTIVE_SELECTORS, type ISODateRange, type ISOTimeString, type ImageSampleRegion, type IndicatorFocusRingHandlers, type InputContainerHandlers, type InputStatusVariant, type InteractiveRole, type KeyboardHintOrientation, type LayerMode, type LayerTouchTrigger, type ListFocus, type ListFocusOrientation, type LongPressHandlers, type LongPressOptions, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, type MenuPress, type MenuPressEffect, type MenuPressEvent, type MenuPressGesture, type MenuPressOptions, type MenuPressPointerType, type MenuPressStep, type MergedRef, type MergedRefHandle, type NativePicker, type NumberField, type NumberStepDirection, type ParsedTime, type PendingChange, type RangeClickResult, type ResizableDirection, type ResizablePercentSize, type ResizableProps, type ResizableRegion, type ResizableRegionConfig, type ResizableSize, type ResizableState, type RestoreFocus, type ScrollAxis, type ScrollAxisState, type ScrollKeyboardAccess, type ScrollOverflowState, type ScrollOverscroll, type ScrollRole, type ScrollStickyContainment, type ScrollableAreaState, type SearchSource, type SearchableItem, type StreamingTextSpeed, type TimePresentation, type TimeSurface, type UseAsyncSourceOptions, type UseChatNewMessagesOptions, type UseChatNewMessagesReturn, type UseChatStreamScrollOptions, type UseChatStreamScrollReturn, type UseClickableContainerOptions, type UseClipboardOptions, type UseClipboardReturn, type UseComboboxOptions, type UseContainerReveal, type UseContainerRevealOptions, type UseControllableStateOptions, type UseDismissOptions, type UseEntryAnimationOptions, type UseEntryAnimationReturn, type UseFocusTrapOptions, type UseGridFocusOptions, type UseGridFocusReturn, type UseGridRovingFocusOptions, type UseImageModeOptions, type UseIndicatorFocusRingOptions, type UseIndicatorFocusRingReturn, type UseInputContainerOptions, type UseInputStatusIconOptions, type UseInputStatusIconReturn, type UseInteractiveRoleOptions, type UseInteractiveRoleReturn, type UseKeyboardHint, type UseKeyboardHintOptions, type UseLayerOptions, type UseLayerReturn, type UseListFocusOptions, type UseNumberFieldOptions, type UseOverflowOptions, type UseOverflowReturn, type UsePressFeedbackOptions, type UsePressFeedbackReturn, type UseResizableMultiConfig, type UseResizableOptions, type UseResizableSingleOptions, type UseRestoreFocusOptions, type UseScrollOverflowResult, type UseScrollableAreaOptions, type UseScrollableAreaResult, type UseStreamingTextOptions, type UseTouchTriggerOptions, type UseTouchTriggerReturn, type UseTypeaheadOptions, type UseTypeaheadReturn, type WeekStartsOn, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useStreamingText, useTouchTrigger, useTypeahead };
|
|
@@ -1,34 +1,39 @@
|
|
|
1
|
+
import { t as usePressFeedback } from "../usePressFeedback-BJCpjEpv.js";
|
|
2
|
+
import { n as useLayerTeleportTarget, r as useResolvedLayerTeleport, t as useLayerMountTarget } from "../useLayerMountTarget-BmZyeKWE.js";
|
|
1
3
|
import { t as useMediaQuery } from "../useMediaQuery-GMmgp28-.js";
|
|
2
|
-
import { t as
|
|
4
|
+
import { t as characterCount } from "../characters-wTnzjkkR.js";
|
|
5
|
+
import { t as useAnnounce } from "../announce-B210eJVf.js";
|
|
3
6
|
import { n as useAppShellMobile, t as appShellMobileKey } from "../useAppShellMobile-DTsyuAJ4.js";
|
|
4
7
|
import { n as useAsyncSource, t as createStaticSource } from "../useAsyncSource-Gk0VtE7_.js";
|
|
5
8
|
import { n as CHAT_MESSAGE_CLASS, r as useChatNewMessages, t as useChatStreamScroll } from "../useChatStreamScroll-oDfybEos.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as useClipboard } from "../useClipboard-
|
|
8
|
-
import { a as
|
|
9
|
+
import { i as useClickableContainer, n as hasInteractiveAncestor, r as hasTextSelection, t as INTERACTIVE_SELECTORS } from "../useClickableContainer-CdGp_Cev.js";
|
|
10
|
+
import { t as useClipboard } from "../useClipboard-Dk8cS810.js";
|
|
11
|
+
import { a as useKeyboardHint, c as perceptualLightness, d as useGridFocus, f as useEntryAnimation, h as useCoarsePointer, i as useStreamingText, l as useImageMode, m as useContainerReveal, n as useTouchTrigger, o as useIndicatorFocusRing, p as useControllableState, r as snapToGraphemeBoundary, s as imageModeFromPixels, t as isActionTrigger, u as useGridRovingFocus } from "../composables-CnsDaMuU.js";
|
|
9
12
|
import { t as useCombobox } from "../useCombobox-CTo5C-gc.js";
|
|
10
|
-
import { a as useKeyboardHint, c as perceptualLightness, d as useGridFocus, f as useEntryAnimation, i as usePressFeedback, l as useImageMode, m as useContainerReveal, n as useStreamingText, o as useIndicatorFocusRing, p as useControllableState, r as useScrollOverflow, s as imageModeFromPixels, t as snapToGraphemeBoundary, u as useGridRovingFocus } from "../composables-CbKx9C1Y.js";
|
|
11
13
|
import { n as resolveDateSurface, t as resolveDatePresentation } from "../useDatePresentation-C07PnOCw.js";
|
|
12
14
|
import { a as isRangeWithinSpan, c as resolveWeekStart, i as isDayOutsideSpan, l as spanDays, n as compareISODate, o as isSameRange, r as formatDateRange, s as orderRange, t as applyRangeClick } from "../useDateRange-CIXoE_8k.js";
|
|
13
15
|
import { n as useDevWarning, t as devWarn } from "../useDevWarning-DznOpOHT.js";
|
|
14
16
|
import { t as useDisclosureHandle } from "../useDisclosureHandle-Df3HhAfC.js";
|
|
15
|
-
import { n as useDismiss } from "../usePositionedLayer-
|
|
17
|
+
import { n as useDismiss } from "../usePositionedLayer-B7cvG-_v.js";
|
|
16
18
|
import { t as useFieldControlState } from "../useFieldControlState-voICDrys.js";
|
|
17
19
|
import { n as selectFiles, t as formatFileSize } from "../useFileSelection-BPtaegqK.js";
|
|
18
|
-
import { n as useFocusTrap, t as useRestoreFocus } from "../useRestoreFocus-
|
|
20
|
+
import { n as useFocusTrap, t as useRestoreFocus } from "../useRestoreFocus-XEKs5-gp.js";
|
|
19
21
|
import { t as useHandleRef } from "../useHandleRef-6cdKugm8.js";
|
|
20
|
-
import { n as useResizable, r as useHotkeys, t as percent } from "../useResizable-
|
|
21
|
-
import { t as useInputContainer } from "../useInputContainer-
|
|
22
|
-
import { t as useInputStatusIcon } from "../useInputStatusIcon-
|
|
22
|
+
import { n as useResizable, r as useHotkeys, t as percent } from "../useResizable-I3BCiLSL.js";
|
|
23
|
+
import { t as useInputContainer } from "../useInputContainer-CLcYrby4.js";
|
|
24
|
+
import { t as useInputStatusIcon } from "../useInputStatusIcon-CWkCeMyX.js";
|
|
23
25
|
import { t as useInteractiveRole } from "../useInteractiveRole-Cn0Nd5GX.js";
|
|
24
|
-
import { n as useLayer, t as useMergedRefs } from "../useMergedRefs-
|
|
25
|
-
import { t as useListFocus } from "../useListFocus-
|
|
26
|
-
import { a as
|
|
26
|
+
import { n as useLayer, t as useMergedRefs } from "../useMergedRefs-Cb6_w93m.js";
|
|
27
|
+
import { t as useListFocus } from "../useListFocus-ChxLg0b4.js";
|
|
28
|
+
import { a as isMenuPressActivation, i as MENU_PRESS_MARKER, n as MENU_PRESS_SETTLE_MS, o as resetMenuPress, r as menuPressStep, s as useLongPress, t as useMenuPress } from "../useMenuPress-8foxY8z4.js";
|
|
27
29
|
import { a as todayISODate, i as toISODate, n as buildMonthGrid, r as parseISODate, t as addMonths } from "../useMonthGrid-fGHSSrFc.js";
|
|
28
|
-
import {
|
|
30
|
+
import { n as useNumberField, t as computeSteppedValue } from "../useNumberField-Dk1BE3-K.js";
|
|
29
31
|
import { n as useOverflow, t as computeOverflow } from "../useOverflow-VrwF5oek.js";
|
|
30
32
|
import { t as usePendingChange } from "../usePendingChange-ib-h8FZK.js";
|
|
31
|
-
import { t as
|
|
32
|
-
import { t as
|
|
33
|
-
import { t as
|
|
34
|
-
|
|
33
|
+
import { t as useResolvedLabelHidden } from "../useResolvedLabelHidden-B2rlWiaI.js";
|
|
34
|
+
import { t as useScrollableArea } from "../useScrollableArea-BE8b3qm7.js";
|
|
35
|
+
import { t as useScrollLock } from "../scrollLock-C3aT4-0z.js";
|
|
36
|
+
import { t as useScrollOverflow } from "../useScrollOverflow-DuMoGXmm.js";
|
|
37
|
+
import { a as parseISOTime, i as parseDisplayTime, n as formatISOTime, o as resolveTimeSurface, r as isTimeInRange, s as shiftTime, t as formatDisplayTime } from "../useTimeValue-BJd0xBhG.js";
|
|
38
|
+
import { t as useTypeahead } from "../useTypeahead-BvtflkRk.js";
|
|
39
|
+
export { CHAT_MESSAGE_CLASS, INTERACTIVE_SELECTORS, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useStreamingText, useTouchTrigger, useTypeahead };
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { r as trackInteractionModality, t as getInteractionModality } from "./interactionModality-ACpTMhak.js";
|
|
3
|
+
import { t as _sfc_main$1 } from "./Kbd-CV3LO2Ge.js";
|
|
4
|
+
import { s as useAstryxMessages } from "./context-CM-cjGg_.js";
|
|
5
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, h, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, ref, renderList, shallowRef, toDisplayString, toValue, unref, vShow, watch, withDirectives } from "vue";
|
|
5
6
|
import "../styles/indicator-focus-ring.css";
|
|
6
7
|
import "../styles/keyboard-hint.css";
|
|
7
|
-
|
|
8
|
+
//#region src/composables/useCoarsePointer.ts
|
|
9
|
+
/** 粗指针(触摸)为 true。服务端和细指针设备为 false。 */
|
|
10
|
+
function useCoarsePointer() {
|
|
11
|
+
const coarse = shallowRef(false);
|
|
12
|
+
let query;
|
|
13
|
+
function update() {
|
|
14
|
+
coarse.value = query?.matches ?? false;
|
|
15
|
+
}
|
|
16
|
+
onMounted(() => {
|
|
17
|
+
query = window.matchMedia("(pointer: coarse)");
|
|
18
|
+
update();
|
|
19
|
+
query.addEventListener("change", update);
|
|
20
|
+
});
|
|
21
|
+
onScopeDispose(() => {
|
|
22
|
+
query?.removeEventListener("change", update);
|
|
23
|
+
});
|
|
24
|
+
return computed(() => coarse.value);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
8
27
|
//#region src/composables/useContainerReveal.ts
|
|
9
28
|
function useContainerReveal(options = {}) {
|
|
10
29
|
function containerProps(reveal = {}) {
|
|
@@ -662,198 +681,6 @@ function useKeyboardHint(options = {}) {
|
|
|
662
681
|
};
|
|
663
682
|
}
|
|
664
683
|
//#endregion
|
|
665
|
-
//#region src/composables/internal/pressFeedback.ts
|
|
666
|
-
/** 标出要走上报按压模型的元素。样式在 `styles/pressable.css`。 */
|
|
667
|
-
const PRESSABLE_ATTRIBUTE = "data-astryx-pressable";
|
|
668
|
-
/** 按压成立时由控制器写在元素上,抬手时移除。 */
|
|
669
|
-
const PRESSED_ATTRIBUTE = "data-astryx-pressed";
|
|
670
|
-
/** 手指按下多久才算真按了。 */
|
|
671
|
-
const HOLD_MS = 150;
|
|
672
|
-
/** 手指移动超过这个距离就当是滑动,不是按压。 */
|
|
673
|
-
const MOVE_TOLERANCE_PX = 10;
|
|
674
|
-
const PRESSABLE_PROPS = Object.freeze({ [PRESSABLE_ATTRIBUTE]: "" });
|
|
675
|
-
/**
|
|
676
|
-
* 一个文档级的控制器,给所有带标记的元素统一做按压反馈。
|
|
677
|
-
* 第一个用到的组件装上它,最后一个卸载时拆掉,所以每个元素自己不加监听、不加状态。
|
|
678
|
-
*/
|
|
679
|
-
let press = null;
|
|
680
|
-
let users = 0;
|
|
681
|
-
let installed = false;
|
|
682
|
-
let releaseTimer = null;
|
|
683
|
-
function clearPressTimer() {
|
|
684
|
-
if (press?.timer != null) {
|
|
685
|
-
clearTimeout(press.timer);
|
|
686
|
-
press.timer = null;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
function clearReleaseTimer() {
|
|
690
|
-
if (releaseTimer != null) {
|
|
691
|
-
clearTimeout(releaseTimer);
|
|
692
|
-
releaseTimer = null;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
function paint(element) {
|
|
696
|
-
element.setAttribute(PRESSED_ATTRIBUTE, "");
|
|
697
|
-
}
|
|
698
|
-
function unpaint(element) {
|
|
699
|
-
element.removeAttribute(PRESSED_ATTRIBUTE);
|
|
700
|
-
}
|
|
701
|
-
function reset() {
|
|
702
|
-
clearPressTimer();
|
|
703
|
-
if (press != null) unpaint(press.element);
|
|
704
|
-
press = null;
|
|
705
|
-
}
|
|
706
|
-
/** 抬手后让样式先画到 1,再撤掉属性,这样淡出的是 CSS 过渡。 */
|
|
707
|
-
function releaseAfterTap(element) {
|
|
708
|
-
paint(element);
|
|
709
|
-
clearReleaseTimer();
|
|
710
|
-
releaseTimer = setTimeout(() => {
|
|
711
|
-
releaseTimer = null;
|
|
712
|
-
unpaint(element);
|
|
713
|
-
}, 0);
|
|
714
|
-
}
|
|
715
|
-
function onPointerDown(event) {
|
|
716
|
-
if (event.pointerType === "mouse") return;
|
|
717
|
-
const target = event.target;
|
|
718
|
-
if (!(target instanceof Element)) return;
|
|
719
|
-
const element = target.closest(`[${PRESSABLE_ATTRIBUTE}]`);
|
|
720
|
-
if (element == null) return;
|
|
721
|
-
reset();
|
|
722
|
-
press = {
|
|
723
|
-
pointerId: event.pointerId,
|
|
724
|
-
element,
|
|
725
|
-
startX: event.clientX,
|
|
726
|
-
startY: event.clientY,
|
|
727
|
-
believed: false,
|
|
728
|
-
cancelled: false,
|
|
729
|
-
timer: setTimeout(() => {
|
|
730
|
-
if (press == null || press.cancelled) return;
|
|
731
|
-
press.believed = true;
|
|
732
|
-
press.timer = null;
|
|
733
|
-
paint(press.element);
|
|
734
|
-
}, HOLD_MS)
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
function onPointerMove(event) {
|
|
738
|
-
if (press == null || press.cancelled || event.pointerId !== press.pointerId) return;
|
|
739
|
-
if (Math.hypot(event.clientX - press.startX, event.clientY - press.startY) < MOVE_TOLERANCE_PX) return;
|
|
740
|
-
press.cancelled = true;
|
|
741
|
-
clearPressTimer();
|
|
742
|
-
unpaint(press.element);
|
|
743
|
-
}
|
|
744
|
-
function onPointerUp(event) {
|
|
745
|
-
if (press == null || event.pointerId !== press.pointerId) return;
|
|
746
|
-
const current = press;
|
|
747
|
-
clearPressTimer();
|
|
748
|
-
press = null;
|
|
749
|
-
if (current.cancelled || current.believed) unpaint(current.element);
|
|
750
|
-
else releaseAfterTap(current.element);
|
|
751
|
-
}
|
|
752
|
-
/** 浏览器收回这次手势(来电、系统手势),直接作废,不要补那一下。 */
|
|
753
|
-
function onPointerCancel(event) {
|
|
754
|
-
if (press == null || event.pointerId !== press.pointerId) return;
|
|
755
|
-
clearPressTimer();
|
|
756
|
-
press.cancelled = true;
|
|
757
|
-
unpaint(press.element);
|
|
758
|
-
press = null;
|
|
759
|
-
}
|
|
760
|
-
function onScroll() {
|
|
761
|
-
if (press == null) return;
|
|
762
|
-
press.cancelled = true;
|
|
763
|
-
clearPressTimer();
|
|
764
|
-
unpaint(press.element);
|
|
765
|
-
}
|
|
766
|
-
function install() {
|
|
767
|
-
if (installed || typeof document === "undefined") return;
|
|
768
|
-
installed = true;
|
|
769
|
-
document.addEventListener("pointerdown", onPointerDown, true);
|
|
770
|
-
document.addEventListener("pointermove", onPointerMove, true);
|
|
771
|
-
document.addEventListener("pointerup", onPointerUp, true);
|
|
772
|
-
document.addEventListener("pointercancel", onPointerCancel, true);
|
|
773
|
-
document.addEventListener("scroll", onScroll, true);
|
|
774
|
-
}
|
|
775
|
-
function uninstall() {
|
|
776
|
-
if (!installed || typeof document === "undefined") return;
|
|
777
|
-
installed = false;
|
|
778
|
-
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
779
|
-
document.removeEventListener("pointermove", onPointerMove, true);
|
|
780
|
-
document.removeEventListener("pointerup", onPointerUp, true);
|
|
781
|
-
document.removeEventListener("pointercancel", onPointerCancel, true);
|
|
782
|
-
document.removeEventListener("scroll", onScroll, true);
|
|
783
|
-
clearReleaseTimer();
|
|
784
|
-
reset();
|
|
785
|
-
}
|
|
786
|
-
/**
|
|
787
|
-
* 对应原版 Astryx 的 `hooks/usePressFeedback`。
|
|
788
|
-
*
|
|
789
|
-
* 手指按下去时,CSS 的 `:active` 会在手指落下的瞬间就亮,而且滚动已经开始了它可能还亮着。
|
|
790
|
-
* 这里的按压模型反过来:先等 150 毫秒,确认这真是按压;手指一动超过 10 像素、
|
|
791
|
-
* 或者页面滚走了,马上作废,本次按压里不再亮回来;快速点一下则在抬手时补上;
|
|
792
|
-
* 松手后 200 毫秒淡出。这几个时间和系统列表的手感一致。
|
|
793
|
-
*
|
|
794
|
-
* 一个文档级控制器给所有带标记的元素做这件事(第一个用到的组件装上,最后一个卸载时拆掉),
|
|
795
|
-
* 所以调用这个组合式函数不会给你的元素加监听,也不加状态。
|
|
796
|
-
*
|
|
797
|
-
* 鼠标上的表现不变:`styles/pressable.css` 里给鼠标留了 `:active`,
|
|
798
|
-
* 在 `@media (pointer: coarse)` 之外才生效。
|
|
799
|
-
*/
|
|
800
|
-
function usePressFeedback() {
|
|
801
|
-
users += 1;
|
|
802
|
-
install();
|
|
803
|
-
if (getCurrentScope() != null) onScopeDispose(() => {
|
|
804
|
-
users -= 1;
|
|
805
|
-
if (users <= 0) uninstall();
|
|
806
|
-
});
|
|
807
|
-
return { pressableProps: PRESSABLE_PROPS };
|
|
808
|
-
}
|
|
809
|
-
//#endregion
|
|
810
|
-
//#region src/composables/useScrollOverflow.ts
|
|
811
|
-
/**
|
|
812
|
-
* 观察一个横向滚动容器,报告起始边和结束边有没有被挡住。
|
|
813
|
-
* 容差 1px,滚动和尺寸变化都会重新量。
|
|
814
|
-
*/
|
|
815
|
-
function useScrollOverflow() {
|
|
816
|
-
const element = ref(null);
|
|
817
|
-
const overflowStart = ref(false);
|
|
818
|
-
const overflowEnd = ref(false);
|
|
819
|
-
const hasOverflow = ref(false);
|
|
820
|
-
let observer;
|
|
821
|
-
function measure() {
|
|
822
|
-
const node = element.value;
|
|
823
|
-
if (node == null) return;
|
|
824
|
-
const tolerance = 1;
|
|
825
|
-
const maxScroll = node.scrollWidth - node.clientWidth;
|
|
826
|
-
const nextStart = Math.abs(node.scrollLeft) > tolerance;
|
|
827
|
-
const nextEnd = Math.abs(node.scrollLeft) < maxScroll - tolerance;
|
|
828
|
-
const nextHas = node.scrollWidth > node.clientWidth + tolerance;
|
|
829
|
-
overflowStart.value = nextStart;
|
|
830
|
-
overflowEnd.value = nextEnd;
|
|
831
|
-
hasOverflow.value = nextHas;
|
|
832
|
-
}
|
|
833
|
-
function scrollRef(node) {
|
|
834
|
-
element.value?.removeEventListener("scroll", measure);
|
|
835
|
-
observer?.disconnect();
|
|
836
|
-
element.value = node;
|
|
837
|
-
if (node == null) return;
|
|
838
|
-
node.addEventListener("scroll", measure, { passive: true });
|
|
839
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
840
|
-
observer = new ResizeObserver(measure);
|
|
841
|
-
observer.observe(node);
|
|
842
|
-
}
|
|
843
|
-
measure();
|
|
844
|
-
}
|
|
845
|
-
onBeforeUnmount(() => {
|
|
846
|
-
element.value?.removeEventListener("scroll", measure);
|
|
847
|
-
observer?.disconnect();
|
|
848
|
-
});
|
|
849
|
-
return {
|
|
850
|
-
scrollRef,
|
|
851
|
-
overflowStart,
|
|
852
|
-
overflowEnd,
|
|
853
|
-
hasOverflow
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
//#endregion
|
|
857
684
|
//#region src/composables/useStreamingText.ts
|
|
858
685
|
const CHARS_PER_TICK = {
|
|
859
686
|
natural: 10,
|
|
@@ -937,4 +764,147 @@ function useStreamingText(targetText, isStreaming = false, options) {
|
|
|
937
764
|
});
|
|
938
765
|
}
|
|
939
766
|
//#endregion
|
|
940
|
-
|
|
767
|
+
//#region src/composables/useTouchTrigger.ts
|
|
768
|
+
/**
|
|
769
|
+
* 「按下去」算作点击的指针类型。笔也在里面,但它只在落笔时算:
|
|
770
|
+
* 笔悬停在屏幕上方时是悬停,和鼠标一样。
|
|
771
|
+
*/
|
|
772
|
+
const TOUCH_POINTER_TYPES = /* @__PURE__ */ new Set(["touch", "pen"]);
|
|
773
|
+
/**
|
|
774
|
+
* 表示「激活它会做事」的 ARIA role。显式 role 优先于标签名:
|
|
775
|
+
* `<button role="presentation">` 只是布景,`<span role="button">` 才是真控件。
|
|
776
|
+
*/
|
|
777
|
+
const ACTION_ROLES = /* @__PURE__ */ new Set([
|
|
778
|
+
"button",
|
|
779
|
+
"checkbox",
|
|
780
|
+
"combobox",
|
|
781
|
+
"link",
|
|
782
|
+
"menuitem",
|
|
783
|
+
"menuitemcheckbox",
|
|
784
|
+
"menuitemradio",
|
|
785
|
+
"option",
|
|
786
|
+
"radio",
|
|
787
|
+
"searchbox",
|
|
788
|
+
"slider",
|
|
789
|
+
"spinbutton",
|
|
790
|
+
"switch",
|
|
791
|
+
"tab",
|
|
792
|
+
"textbox"
|
|
793
|
+
]);
|
|
794
|
+
/**
|
|
795
|
+
* 激活这个元素是不是「做了别的事」,而不是「显示浮层」。
|
|
796
|
+
*
|
|
797
|
+
* 比「可聚焦」窄是有意的:纯文字 Tooltip 的触发器带 `tabindex=0`,
|
|
798
|
+
* 键盘用户要能聚焦它读提示,但它本身没有动作。
|
|
799
|
+
*
|
|
800
|
+
* 返回 true 只决定「浮层不开」,那一下点击本身不会被吞掉:这里不调
|
|
801
|
+
* `preventDefault`,也不调 `stopPropagation`。
|
|
802
|
+
*/
|
|
803
|
+
function isActionTrigger(element) {
|
|
804
|
+
const role = element.getAttribute("role");
|
|
805
|
+
if (role != null && role !== "") return ACTION_ROLES.has(role);
|
|
806
|
+
switch (element.tagName) {
|
|
807
|
+
case "BUTTON":
|
|
808
|
+
case "INPUT":
|
|
809
|
+
case "LABEL":
|
|
810
|
+
case "SELECT":
|
|
811
|
+
case "SUMMARY":
|
|
812
|
+
case "TEXTAREA": return true;
|
|
813
|
+
case "A":
|
|
814
|
+
case "AREA": return element.hasAttribute("href");
|
|
815
|
+
default: return isEditable(element);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
function isEditable(element) {
|
|
819
|
+
if (element.isContentEditable === true) return true;
|
|
820
|
+
const attribute = element.getAttribute("contenteditable");
|
|
821
|
+
return attribute != null && attribute !== "false";
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* 悬停类浮层(Tooltip、HoverCard)共用的触屏行为。
|
|
825
|
+
*
|
|
826
|
+
* 触屏上表达不了「悬停」:点一下会合成 `mouseenter`,不处理的悬停浮层要么
|
|
827
|
+
* 每次点都弹出来、又没有东西能关掉它,要么把用户点控件的这一下吃掉。
|
|
828
|
+
*/
|
|
829
|
+
function useTouchTrigger(options) {
|
|
830
|
+
trackInteractionModality();
|
|
831
|
+
const isTouchPointer = ref(false);
|
|
832
|
+
let isOpenNow = toValue(options.isOpen);
|
|
833
|
+
/**
|
|
834
|
+
* 这一层是不是被「点一下」打开的。只有点开的浮层才欠用户一次「点外面关闭」:
|
|
835
|
+
* 悬停打开的自己会随指针离开关掉,受控打开的不是我们该关的。
|
|
836
|
+
*/
|
|
837
|
+
let isTapOpen = false;
|
|
838
|
+
let outsideListener = null;
|
|
839
|
+
watch(() => toValue(options.isOpen), (open) => {
|
|
840
|
+
if (isOpenNow && !open) disarmOutsideDismiss();
|
|
841
|
+
isOpenNow = open;
|
|
842
|
+
}, { flush: "sync" });
|
|
843
|
+
function disarmOutsideDismiss() {
|
|
844
|
+
isTapOpen = false;
|
|
845
|
+
if (outsideListener == null) return;
|
|
846
|
+
document.removeEventListener("pointerdown", outsideListener, true);
|
|
847
|
+
outsideListener = null;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* 装「点外面关闭」。用捕获阶段,触发器自己 stopPropagation 也拦不住,
|
|
851
|
+
* 免得留一个关不掉的浮层。打开它的那一次按压在 document 捕获阶段已经走过了,
|
|
852
|
+
* 所以这个监听看不到它。
|
|
853
|
+
*/
|
|
854
|
+
function armOutsideDismiss() {
|
|
855
|
+
isTapOpen = true;
|
|
856
|
+
if (outsideListener != null) return;
|
|
857
|
+
outsideListener = (event) => {
|
|
858
|
+
const target = event.target;
|
|
859
|
+
if (target != null) {
|
|
860
|
+
if (options.triggerRef.value?.contains(target) === true) return;
|
|
861
|
+
if (document.getElementById(toValue(options.layerId))?.contains(target) === true) return;
|
|
862
|
+
}
|
|
863
|
+
disarmOutsideDismiss();
|
|
864
|
+
options.hide();
|
|
865
|
+
};
|
|
866
|
+
document.addEventListener("pointerdown", outsideListener, true);
|
|
867
|
+
}
|
|
868
|
+
onScopeDispose(disarmOutsideDismiss);
|
|
869
|
+
function isEnabledNow() {
|
|
870
|
+
return toValue(options.isEnabled) ?? true;
|
|
871
|
+
}
|
|
872
|
+
function isControlledNow() {
|
|
873
|
+
return toValue(options.isControlled) === true;
|
|
874
|
+
}
|
|
875
|
+
function isTouchInteraction() {
|
|
876
|
+
return isTouchPointer.value && getInteractionModality() === "pointer";
|
|
877
|
+
}
|
|
878
|
+
function handlePointerEnter(event) {
|
|
879
|
+
isTouchPointer.value = event.pointerType === "touch";
|
|
880
|
+
}
|
|
881
|
+
function handlePointerDown(event) {
|
|
882
|
+
const isTouch = TOUCH_POINTER_TYPES.has(event.pointerType);
|
|
883
|
+
isTouchPointer.value = isTouch;
|
|
884
|
+
if (!isTouch || isControlledNow()) return false;
|
|
885
|
+
const trigger = options.triggerRef.value;
|
|
886
|
+
const touchTrigger = toValue(options.touchTrigger);
|
|
887
|
+
if ((touchTrigger === "auto" ? trigger != null && isActionTrigger(trigger) ? "none" : "tap" : touchTrigger) === "none" || !isEnabledNow()) {
|
|
888
|
+
disarmOutsideDismiss();
|
|
889
|
+
options.hide();
|
|
890
|
+
return true;
|
|
891
|
+
}
|
|
892
|
+
if (isOpenNow || isTapOpen) {
|
|
893
|
+
disarmOutsideDismiss();
|
|
894
|
+
options.hide();
|
|
895
|
+
return true;
|
|
896
|
+
}
|
|
897
|
+
armOutsideDismiss();
|
|
898
|
+
options.show();
|
|
899
|
+
return true;
|
|
900
|
+
}
|
|
901
|
+
return {
|
|
902
|
+
isTouchPointer,
|
|
903
|
+
isTouchInteraction,
|
|
904
|
+
handlePointerEnter,
|
|
905
|
+
handlePointerDown,
|
|
906
|
+
clearTapOpen: disarmOutsideDismiss
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
//#endregion
|
|
910
|
+
export { useKeyboardHint as a, perceptualLightness as c, useGridFocus as d, useEntryAnimation as f, useCoarsePointer as h, useStreamingText as i, useImageMode as l, useContainerReveal as m, useTouchTrigger as n, useIndicatorFocusRing as o, useControllableState as p, snapToGraphemeBoundary as r, imageModeFromPixels as s, isActionTrigger as t, useGridRovingFocus as u };
|