@astryx-vue/core 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-D_lrpZz_.js → AlertDialog-CvNtu0Jd.js} +7 -7
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-CxUmt6hX.js → AppShell-BmX6wqba.js} +5 -5
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-DT5RbxDa.js → AvatarGroup-Dd-yDDNz.js} +2 -2
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-Ctg1puM6.js → Banner-DKmvoMxD.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-_K41Oliv.js → BottomSheet-B8_znPYE.js} +1 -1
- package/dist/{BottomSheet-CmNOXlZO.js → BottomSheet-BZ_yFoKC.js} +845 -276
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CdGqhFKU.js → Breadcrumbs-CJpvbZsf.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-CvHeZGf1.js → Button-DdPty46q.js} +2 -2
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/ButtonGroup/index.js +1 -1
- package/dist/{ButtonGroup-CUN_rC57.js → ButtonGroup-oI99JAyN.js} +3 -3
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CbdHb8MD.js → Carousel-BNr79JpP.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-B7ccEmTR.js → Chat-BadS0fEx.js} +2 -2
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-5r6VWqId.js → CheckboxInput-CzP8gP3v.js} +3 -3
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-CKeQzQ0W.js → CheckboxListItem-CxBjpX3d.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-ChmOwgYq.js → ClickableCard-B86P2aiM.js} +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-5rZyPwty.js → Code-_PngYOKp.js} +2 -0
- package/dist/{CodeBlock-4i1vvmOc.js → CodeBlock-Cgm4uOhG.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-B2vrr_YP.js → Collapsible-DXl9RRaX.js} +3 -3
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BMwvTjff.js → CommandPalette-BgVwGtdA.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-B4iFyilD.js → ComplexSelector-vna5wtig.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DquYeIEF.js → ContextMenu-CE-FnLI6.js} +4 -4
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-MNNyi4XK.js → DateInput-BCasoeIj.js} +3 -3
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DOHntScL.js → DateRangeInput-Bi97pjDX.js} +3 -3
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BaghFHW6.js → DateTimeInput-CKnvjLhi.js} +5 -5
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-Ctha_b_L.js → Dialog-BN-NycQr.js} +1 -1
- package/dist/{Dialog-CGf64DqF.js → Dialog-Dt0gNuMT.js} +1 -1
- package/dist/{DialogHeader-BxTV37GT.js → DialogHeader-CSH2_5v-.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-DAnc2ut9.js → Drawer-PeMgE4iA.js} +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-BPi0pm0w.js → DropdownMenu-B_KDdI8P.js} +5 -5
- package/dist/{DropdownMenu-DuSVFQoS.js → DropdownMenu-aYOIh9gZ.js} +7 -7
- package/dist/Field/index.js +3 -3
- package/dist/{Field-d5R_kRMv.js → Field-D-fRqyso.js} +1 -1
- package/dist/{FieldInfoTip-BhKtjq3g.js → FieldInfoTip-Bstp5Lvd.js} +1 -1
- package/dist/{FieldLabel-BHNpYFx7.js → FieldLabel-lV_qLaGp.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BCg4HROm.js → FileInput-CTNnDIkm.js} +3 -3
- package/dist/Heading/index.d.ts +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-BZgU_THt.js → IconButton-DPezhVBA.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-E2-OzKti.js → InfoTip-B4BFfLtT.js} +1 -1
- package/dist/{InputClearButton-B62_uexC.js → InputClearButton-CxU3iv-5.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-DKBqRYFf.js → InputGroup-CraWGK6Y.js} +1 -1
- package/dist/{Item-C8UAQwFQ.js → Item-C9u_kQUO.js} +15 -14
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-Bou1gTfv.js → Lightbox-BNUG9CQ1.js} +1 -1
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-CaJ5lmKk.js → Link-Bwgpn-di.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-BlrEngDO.js → ListItem-_lOmngHp.js} +2 -2
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-BE6vdvPG.js → Markdown-BlEi5UGN.js} +2 -2
- package/dist/{MediaTheme-UM8oOqwX.js → MediaTheme-CBkEmVe4.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-D5yGMHU4.js → MobileNavToggle-wVa9dzH1.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CNzTagqr.js → MoreMenu-CXshllJj.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-MGEiRi1W.js → MultiSelector-Bs3Imw6k.js} +5 -5
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavItem/index.js +1 -1
- package/dist/{NavItem-kj9FbbFS.js → NavItem-D4xHjSTo.js} +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu-ZN5cqCxO.js → NavMenu-NCg3VjAQ.js} +2 -2
- package/dist/{NavMenuItem-xm3e0V8q.js → NavMenuItem-Bla6fYVl.js} +3 -3
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-D4ECOHh_.js → NumberInput-DicgvFte.js} +3 -3
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-DI9MZnuQ.js → Outline-CnSt_KvS.js} +4 -3
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-m1tf_fR1.js → OverflowList-BYYz3ePw.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BdjxuxM3.js → Pagination-kJhH6sPF.js} +3 -3
- package/dist/Popover/index.d.ts +2 -2
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-DEj8xWN-.js → Popover-CqL_AXQB.js} +6 -6
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-BJDFietK.js → PowerSearch-Ff2n7eJ2.js} +19 -19
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-B3UoJrOA.js → RadioGroup-CsJYGjyx.js} +3 -3
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-CD7kUGlN.js → RadioListItem-Yc3K82YE.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-DGd6JlaD.js → SegmentedControl-C-F5dkcG.js} +2 -2
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-GRWYx3iD.js → SelectableCard-CwfpgsS8.js} +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-BD0u-5Fy.js → Selector-DgzSGUul.js} +3 -3
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-DoqCLRiX.js → SideNav-DNQZ8l6b.js} +6 -6
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DHR7HZ7N.js → Slider-Bq_7Nskr.js} +2 -2
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-CCuggsov.js → Stepper-CWluGqBs.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-CnFC7jGw.js → Switch-DTPvMAxd.js} +2 -2
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-fMlX8m6n.js → TabList-C4i7UZkp.js} +3 -3
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-DoKmVdhZ.js → Table-CqAV7l7W.js} +13 -13
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-y9mmYAIy.js → TextArea-J2_wct0p.js} +4 -4
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-BLGEh7vE.js → TextInput-Da1TYd57.js} +4 -4
- package/dist/Theme/index.d.ts +4 -3
- package/dist/Theme/index.js +4 -3
- package/dist/{Theme-BmTbbiAD.js → Theme-CwruhtLu.js} +290 -62
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Dm8krgGF.js → Thumbnail-1LsaJ4_m.js} +2 -2
- package/dist/{TimeField-DS30hnty.js → TimeField-ojhX2ZOj.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-DcY4b3dg.js → TimeInput-CfeDP72M.js} +2 -2
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-BhBuBHu8.js → Timestamp-SseS_qtf.js} +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-CnLk7LzS.js → Toast-yUVFaZiJ.js} +175 -22
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-B9IJcpdJ.js → ToggleButton-B6hBzeVl.js} +3 -3
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-C7Dt5ygK.js → Token-DTGUCgpn.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-D7ZCTbnf.js → Tokenizer-nSEekhN1.js} +8 -8
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-DSWH8ll4.js → Toolbar-BHkPxDxA.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CK_F6Ud5.js → TopNav-CcIayfsW.js} +4 -4
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-Dh0uAj2B.js → TreeList-CsgXzBdm.js} +4 -4
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-Cs-46obm.js → Typeahead-BD6xXNKh.js} +3 -3
- package/dist/VelocityTracker-DgjmootV.js +165 -0
- package/dist/{adaptationTypes-Cn_pfrsw.d.ts → adaptationTypes-D874ONPJ.d.ts} +28 -6
- package/dist/{animator-BGq5a6vT.js → animator-C0kqgDUJ.js} +30 -173
- package/dist/{assertOptions-CJgNig1l.js → assertOptions-DHfonaBU.js} +1 -1
- package/dist/{batch-BhaAWUIt.js → batch-DPlrpYU6.js} +5 -19
- package/dist/bezier-Dko5MnTp.js +37 -0
- package/dist/{clickGuard-FrlnECMp.js → clickGuard-C3VmOLhI.js} +2 -1
- package/dist/compactDefinition-BeFUKEFg.js +29 -0
- package/dist/compactDefinition-CMTR5KqU.d.ts +19 -0
- package/dist/composables/index.js +7 -7
- package/dist/composables-CVvk9709.js +2548 -0
- package/dist/{context-jtpQfR6F.js → context-ZWA02GaM.js} +2 -2
- package/dist/{edge-CJIswPTX.js → edge-DFaE6rUg.js} +1 -1
- package/dist/{edgeRide-Drk4V-MC.js → edgeRide-UdNxbwxY.js} +4 -4
- package/dist/{handle-BazRxHwq.js → handle-CwxCHapJ.js} +1 -1
- package/dist/{holdEntranceInput-DMCOeRqu.js → holdEntranceInput-DgimbgGm.js} +1 -1
- package/dist/{index-DVS4jM-l.d.ts → index-0RIgvtdm.d.ts} +1 -1
- package/dist/{index-D14kSf-g.d.ts → index-AgTJRqUY.d.ts} +3 -3
- package/dist/{index-C1e8LNx2.d.ts → index-BjqoHLMq.d.ts} +1 -1
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-BL9fE6gs.d.ts → index-CG6dbyeb.d.ts} +8 -8
- package/dist/{index-YKCx03zD.d.ts → index-COgrQZIL.d.ts} +2 -2
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-C6IcBhAn.d.ts → index-C_iTVOHQ.d.ts} +4 -4
- package/dist/{index-FeZXsFO-.d.ts → index-CbA8rR_b.d.ts} +2 -2
- package/dist/{index-Bzi3A980.d.ts → index-ChqMaV6N.d.ts} +1 -1
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/{index-DGe-ApvN.d.ts → index-CuW4AQ7M.d.ts} +3 -3
- package/dist/{index-T5bzxQ30.d.ts → index-DCyYldjP.d.ts} +1 -1
- package/dist/{index-BVeTS-R5.d.ts → index-DH_xZI84.d.ts} +6 -6
- package/dist/{index-CUuUoX3h.d.ts → index-DVX2jlTQ.d.ts} +1 -1
- package/dist/{index-668zPVsH.d.ts → index-DkYOGpsC.d.ts} +1 -1
- package/dist/{index-hUa5oQ5O.d.ts → index-Dp6MmjIo.d.ts} +88 -88
- package/dist/{index-BIqW3_GP.d.ts → index-DtY_R6Oh.d.ts} +2 -2
- package/dist/{index-CTXG-KKT.d.ts → index-EUzmHHm6.d.ts} +2 -1
- package/dist/{index-DQ3akoRZ.d.ts → index-QC9FDUDA.d.ts} +4 -4
- package/dist/{index-DIw5D3zj.d.ts → index-ZKBj_1nu.d.ts} +2 -2
- package/dist/{index-Ea2V_FSK.d.ts → index-aHC2C89h.d.ts} +4 -4
- package/dist/{index-Cm36VS1A.d.ts → index-mK1ICsVg.d.ts} +2 -2
- package/dist/{index-ql9ApSTF.d.ts → index-yQc-te9a.d.ts} +2 -2
- package/dist/index.d.ts +30 -29
- package/dist/index.js +90 -89
- package/dist/{inputHold-BmChuR9x.js → inputHold-DW2LYHb5.js} +4 -4
- package/dist/{inputHoldState-pblUT4oh.js → inputHoldState-xntIqr5W.js} +2 -1
- package/dist/{inputStream-LZdK8luP.js → inputStream-bPd9eB2b.js} +2 -49
- package/dist/isRtlElement-NHuH48AA.js +23 -0
- package/dist/{landing-CBaXCGEg.js → landing-CSCE9afT.js} +3 -3
- package/dist/{lazyBottomSheet-Cmd-WMEE.js → lazyBottomSheet-CbU1Pnfk.js} +1 -1
- package/dist/{timing-CSHWQbTJ.js → linearEasing-BiRVC8Mq.js} +30 -22
- package/dist/{bezier-Df-yGuNZ.js → presentation-Cy_yf56y.js} +2 -39
- package/dist/{presentationHold-7IkbR4d8.js → presentationHold-B4tK68sd.js} +3 -29
- package/dist/{pressFeedback-DVR5V1b6.js → pressFeedback-9dqGYjxv.js} +2 -2
- package/dist/reducedMotionMark-CYSyfURo.js +34 -0
- package/dist/{resolveMotion-CurhYTVC.js → resolveMotion-B9NDPeUz.js} +202 -1
- package/dist/resolveSnapPoint-DdZyBkT4.js +717 -0
- package/dist/{flatTree-BB4yPMNL.js → sharedRealm-H1OrlP0V.js} +49 -1
- package/dist/{themeTiming-BFDOPRjK.js → themeTiming-D1U0redl.js} +2 -112
- package/dist/tokenReferences-sKpv-7_O.js +167 -0
- package/dist/{touchHold-CFJlSClt.js → touchHold-DXtx7npm.js} +1 -1
- package/dist/{types-BA1veIoa.d.ts → types-D97oBk6c.d.ts} +1 -1
- package/dist/{useActionGroupTracking-C6BzQzvp.js → useActionGroupTracking-CLFF7FI2.js} +2 -2
- package/dist/{useAnimatedLayout-DC2l3WrE.js → useAnimatedLayout-DWWc31RR.js} +1 -1
- package/dist/{composables-BTRbNgmR.js → useAttachment-BuNyeUXy.js} +44 -3464
- package/dist/{useChatStreamScroll-Cv51kRT0.js → useChatStreamScroll-CuMzkXgD.js} +1 -1
- package/dist/{useHeldPresentation-7MH-RlSF.js → useHeldPresentation-BF5vGVUn.js} +1 -1
- package/dist/{useInputStatusIcon-BngSzjVd.js → useInputStatusIcon-BqV6YzTV.js} +1 -1
- package/dist/{useListFocus-CkHfsZp0.js → useListFocus-Ccd_HU9T.js} +2 -23
- package/dist/{useMenuDrillIn-BQx6lQMz.js → useMenuDrillIn-CMsgOcDP.js} +3 -2
- package/dist/{useMenuEntranceHold-buV5S9yk.js → useMenuEntranceHold-HznOwIry.js} +1 -1
- package/dist/{useMenuHover-CfQtWMg-.js → useMenuHover-DoBatZeD.js} +1 -1
- package/dist/{useMenuPress-DU6pAIHy.js → useMenuPress-DcwVUsQO.js} +3 -3
- package/dist/{usePressFeedback-BhNcuxQv.js → usePressFeedback-DHdmAsMp.js} +1 -1
- package/dist/{useTouchHitArea-CNZyA18Y.js → useTouchHitArea-SY1ITxSJ.js} +2 -2
- package/package.json +1 -1
- package/reset.css +1 -1
- package/styles/bottom-sheet.css +28 -8
- package/styles/chat.css +5 -5
- package/styles/drawer.css +9 -0
- package/dist/motionTokenDefaults-EFzpiAF5.js +0 -38
- package/dist/{index-D8lv2BiD.d.ts → index-BqhgeAT4.d.ts} +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { n as themeContextKey, r as themeNestingKey, t as mediaThemeKey } from "./context-Cws_tXTr.js";
|
|
2
2
|
import { n as resolveIconEntryVariants, t as readThemeIconIds } from "./themeIcons-1O7ymucc.js";
|
|
3
|
-
import { n as
|
|
3
|
+
import { n as setRootReducedMotionMark, t as reducedMotionMarkProps } from "./reducedMotionMark-CYSyfURo.js";
|
|
4
|
+
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
5
|
+
import { i as easeDefaults, n as splitTopLevelWhitespace, r as durationDefaults } from "./tokenReferences-sKpv-7_O.js";
|
|
4
6
|
import { n as normalizeTokenName, r as prefixTokenReferences, t as isPortableTokenName } from "./tokenName-0U-WEH09.js";
|
|
5
7
|
import { n as observeResize } from "./sharedResizeObserver-BekhnB3E.js";
|
|
6
8
|
import { n as WIDTH_BREAKPOINT_NAMES, t as DEFAULT_WIDTH_BREAKPOINTS } from "./adaptationTypes-Beao49TN.js";
|
|
7
9
|
import { r as staticComponentIcons, t as mergeComponentIcons } from "./componentIcons-BBJqmilP.js";
|
|
8
10
|
import { a as syntaxThemeStyle } from "./syntaxTheme-R7xnu5x5.js";
|
|
9
11
|
import { t as syntaxThemeKey } from "./syntaxContext-DmIfNNtb.js";
|
|
10
|
-
import { a as contrastRatio, i as compositeOver, o as parseColor, r as bridgeComponentTokens
|
|
11
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, h, inject, markRaw,
|
|
12
|
+
import { a as contrastRatio, c as relativeLuminance, i as compositeOver, o as parseColor, r as bridgeComponentTokens } from "./MediaTheme-CBkEmVe4.js";
|
|
13
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, h, inject, markRaw, mergeProps, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useAttrs, useTemplateRef, watch } from "vue";
|
|
12
14
|
import "../styles/theme.css";
|
|
13
15
|
//#region src/Theme/declarationBoundary.ts
|
|
14
16
|
/**
|
|
@@ -525,10 +527,134 @@ function expandRadiusScale(config) {
|
|
|
525
527
|
"--radius-element": step(2),
|
|
526
528
|
"--radius-container": step(3),
|
|
527
529
|
"--radius-page": step(7),
|
|
528
|
-
"--radius-chat": step(7),
|
|
529
530
|
"--radius-full": "9999px"
|
|
530
531
|
};
|
|
531
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* The chat radius a theme that sets `--astryx-radius-container` declares in
|
|
535
|
+
* its own scope: `--astryx-radius-chat` follows the container radius, so a
|
|
536
|
+
* nested theme with a different container reads its own. A theme that sets or
|
|
537
|
+
* inherits a chat radius keeps it, and a theme with no container sets nothing.
|
|
538
|
+
*/
|
|
539
|
+
function deriveChatRadius(tokens) {
|
|
540
|
+
if (tokens["--astryx-radius-container"] === void 0 || tokens["--astryx-radius-chat"] !== void 0) return {};
|
|
541
|
+
return { "--astryx-radius-chat": "var(--astryx-radius-container)" };
|
|
542
|
+
}
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/Theme/colorModeBlocks.ts
|
|
545
|
+
/** 主题根的强制模式属性(`<Theme mode="light|dark">` 写的)。 */
|
|
546
|
+
const MODE_ATTR = "data-astryx-color-mode";
|
|
547
|
+
/** 先深后浅,同一属性两边都写时浅色赢,和 onDark / onLight 表面一致。 */
|
|
548
|
+
const COLOR_MODES = ["dark", "light"];
|
|
549
|
+
function isColorModeKey(key) {
|
|
550
|
+
return key === "@light" || key === "@dark";
|
|
551
|
+
}
|
|
552
|
+
function surfaceSelector(mode) {
|
|
553
|
+
return `[data-astryx-media="${mode}"]`;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* 这些祖先条件成立时,元素最近的表面是 `mode`。
|
|
557
|
+
*
|
|
558
|
+
* CSS 没有“最近的带某属性的祖先”这种选择器,所以逐层写:元素外面从外到里的
|
|
559
|
+
* 表面形成 R 段同色的段,最近那段决定。条件 k 是 k 个深浅交替、以 `mode`
|
|
560
|
+
* 结尾的表面链,且外面没有再长一层、以另一种模式结尾的链。
|
|
561
|
+
*/
|
|
562
|
+
function nearestSurfaceIs(mode) {
|
|
563
|
+
const other = mode === "dark" ? "light" : "dark";
|
|
564
|
+
const chain = (length, last) => Array.from({ length }, (_, i) => surfaceSelector((length - 1 - i) % 2 === 0 ? last : last === mode ? other : mode)).join(" ");
|
|
565
|
+
return Array.from({ length: 4 }, (_, i) => `:scope ${chain(i + 1, mode)} *:not(:scope ${chain(i + 2, other)} *)`);
|
|
566
|
+
}
|
|
567
|
+
/** 模式 `mode` 的块要写的几组条件:强制模式、system 根跟随偏好、最近的表面。 */
|
|
568
|
+
function modeConditions(mode) {
|
|
569
|
+
const outsideSurfaces = ":where(:not(:scope [data-astryx-media] *))";
|
|
570
|
+
return [
|
|
571
|
+
{ suffix: `:where(:scope[${MODE_ATTR}="${mode}"] *)${outsideSurfaces}` },
|
|
572
|
+
{
|
|
573
|
+
suffix: `:where(:scope:not([${MODE_ATTR}="light"], [${MODE_ATTR}="dark"]) *)${outsideSurfaces}`,
|
|
574
|
+
media: `(prefers-color-scheme: ${mode})`
|
|
575
|
+
},
|
|
576
|
+
{ suffix: `:where(${nearestSurfaceIs(mode).join(", ")})` }
|
|
577
|
+
];
|
|
578
|
+
}
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/Theme/mergeComponents.ts
|
|
581
|
+
/**
|
|
582
|
+
* Reads each entry through `read` and drops an entry that reads as undefined.
|
|
583
|
+
* An object that loses all its entries becomes undefined. A null, an array or a
|
|
584
|
+
* non-object returns unchanged, and so does an object with no changes.
|
|
585
|
+
*/
|
|
586
|
+
function readEntries(value, read) {
|
|
587
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
|
|
588
|
+
const entries = Object.entries(value);
|
|
589
|
+
let changed = false;
|
|
590
|
+
const kept = [];
|
|
591
|
+
for (const [key, entry] of entries) {
|
|
592
|
+
const set = entry === void 0 ? void 0 : read(entry, key);
|
|
593
|
+
if (set === void 0) {
|
|
594
|
+
changed = true;
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
changed ||= set !== entry;
|
|
598
|
+
kept.push([key, set]);
|
|
599
|
+
}
|
|
600
|
+
if (entries.length > 0 && kept.length === 0) return void 0;
|
|
601
|
+
return changed ? Object.fromEntries(kept) : value;
|
|
602
|
+
}
|
|
603
|
+
/**
|
|
604
|
+
* A style key's value without the properties it leaves undefined, at every
|
|
605
|
+
* depth. A pseudo-class block that empties stays, empty: a restated
|
|
606
|
+
* pseudo-class block still replaces the base's. A color-mode block that
|
|
607
|
+
* empties is not set, as a property is not.
|
|
608
|
+
*/
|
|
609
|
+
function withoutUndefined(value, key) {
|
|
610
|
+
const set = readEntries(value, withoutUndefined);
|
|
611
|
+
return set === void 0 && !isColorModeKey(key) ? {} : set;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* A component style map without what it leaves undefined: a component, a
|
|
615
|
+
* style key, or a property at any depth is not set, and so is a component or
|
|
616
|
+
* style key whose every value is. Every layer that reads a theme's component
|
|
617
|
+
* map (the merge, each resolved layer, the stylesheet) reads it through this.
|
|
618
|
+
*/
|
|
619
|
+
function withoutUnsetComponents(map) {
|
|
620
|
+
return readEntries(map, (rules) => readEntries(rules, (styles) => readEntries(styles, withoutUndefined)));
|
|
621
|
+
}
|
|
622
|
+
/** One style key's styles, `next` over `base`; a color-mode block merges per property. */
|
|
623
|
+
function mergeStyles(base, next) {
|
|
624
|
+
const merged = {
|
|
625
|
+
...base,
|
|
626
|
+
...next
|
|
627
|
+
};
|
|
628
|
+
for (const key of Object.keys(next)) {
|
|
629
|
+
const own = next[key];
|
|
630
|
+
const inherited = base?.[key];
|
|
631
|
+
if (isColorModeKey(key) && typeof own === "object" && typeof inherited === "object") merged[key] = {
|
|
632
|
+
...inherited,
|
|
633
|
+
...own
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
return merged;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Merge component maps. `next` wins per style key and per property, so a
|
|
640
|
+
* child that restates one property of `button.base` keeps the rest. A
|
|
641
|
+
* color-mode block (`@light`, `@dark`) merges per property the same way; a
|
|
642
|
+
* restated pseudo-class block replaces the base's whole.
|
|
643
|
+
*/
|
|
644
|
+
function mergeComponentMaps(inheritedMap, ownMap) {
|
|
645
|
+
const base = withoutUnsetComponents(inheritedMap);
|
|
646
|
+
const next = withoutUnsetComponents(ownMap);
|
|
647
|
+
if (base == null) return next;
|
|
648
|
+
if (next == null) return base;
|
|
649
|
+
const merged = {};
|
|
650
|
+
for (const [component, rules] of Object.entries(base)) merged[component] = { ...rules };
|
|
651
|
+
for (const [component, rules] of Object.entries(next)) {
|
|
652
|
+
const target = merged[component] ?? {};
|
|
653
|
+
for (const [key, styles] of Object.entries(rules)) target[key] = mergeStyles(target[key], styles);
|
|
654
|
+
merged[component] = target;
|
|
655
|
+
}
|
|
656
|
+
return merged;
|
|
657
|
+
}
|
|
532
658
|
//#endregion
|
|
533
659
|
//#region src/Theme/expandMotionScale.ts
|
|
534
660
|
function assertMotion(config) {
|
|
@@ -955,7 +1081,12 @@ const NAMED_WEIGHTS = {
|
|
|
955
1081
|
semibold: "var(--font-weight-semibold)",
|
|
956
1082
|
bold: "var(--font-weight-bold)"
|
|
957
1083
|
};
|
|
1084
|
+
/**
|
|
1085
|
+
* A named weight as its token, any other value as written. A theme written in
|
|
1086
|
+
* JavaScript or read from JSON may give a number: it is written as its text.
|
|
1087
|
+
*/
|
|
958
1088
|
function weightToken(value) {
|
|
1089
|
+
if (typeof value === "number") return String(value);
|
|
959
1090
|
return NAMED_WEIGHTS[value.trim()] ?? value;
|
|
960
1091
|
}
|
|
961
1092
|
function quoteFamily(family) {
|
|
@@ -964,11 +1095,11 @@ function quoteFamily(family) {
|
|
|
964
1095
|
if (/[^a-z0-9-]/i.test(trimmed)) return `"${trimmed.replace(/"/g, "")}"`;
|
|
965
1096
|
return trimmed;
|
|
966
1097
|
}
|
|
1098
|
+
/** A role's font list: its family and fallbacks. Fallbacks with no family build nothing. */
|
|
967
1099
|
function fontStack(role) {
|
|
968
|
-
if (!role?.family
|
|
969
|
-
const family =
|
|
970
|
-
|
|
971
|
-
return family ?? role.fallbacks;
|
|
1100
|
+
if (!role?.family) return void 0;
|
|
1101
|
+
const family = quoteFamily(role.family);
|
|
1102
|
+
return role.fallbacks ? `${family}, ${role.fallbacks}` : family;
|
|
972
1103
|
}
|
|
973
1104
|
function headingSizeAliases(tokens) {
|
|
974
1105
|
const aliases = {};
|
|
@@ -1021,7 +1152,8 @@ function scaleConfig(config) {
|
|
|
1021
1152
|
}
|
|
1022
1153
|
/**
|
|
1023
1154
|
* Font stacks, the type scale, and the heading size aliases Heading reads.
|
|
1024
|
-
*
|
|
1155
|
+
* A heading with no `family` takes the body's whole font list; with its own
|
|
1156
|
+
* `family`, only its own `fallbacks`.
|
|
1025
1157
|
*/
|
|
1026
1158
|
function resolveTypography(config) {
|
|
1027
1159
|
if (!config) return { tokens: {} };
|
|
@@ -1093,25 +1225,6 @@ function resolveTokenMap(tokens, location) {
|
|
|
1093
1225
|
return resolved;
|
|
1094
1226
|
}
|
|
1095
1227
|
/**
|
|
1096
|
-
* Merge component maps. `next` wins per style key and per property, so a
|
|
1097
|
-
* child that restates one property of `button.base` keeps the rest.
|
|
1098
|
-
*/
|
|
1099
|
-
function mergeComponentMaps(base, next) {
|
|
1100
|
-
if (base == null) return next;
|
|
1101
|
-
if (next == null) return base;
|
|
1102
|
-
const merged = {};
|
|
1103
|
-
for (const [component, rules] of Object.entries(base)) merged[component] = { ...rules };
|
|
1104
|
-
for (const [component, rules] of Object.entries(next)) {
|
|
1105
|
-
const target = merged[component] ?? {};
|
|
1106
|
-
for (const [key, styles] of Object.entries(rules)) target[key] = {
|
|
1107
|
-
...target[key],
|
|
1108
|
-
...styles
|
|
1109
|
-
};
|
|
1110
|
-
merged[component] = target;
|
|
1111
|
-
}
|
|
1112
|
-
return merged;
|
|
1113
|
-
}
|
|
1114
|
-
/**
|
|
1115
1228
|
* Expand the generator axes, then lay explicit `tokens` over the result.
|
|
1116
1229
|
* Explicit tokens win token by token. Authored component styles win over
|
|
1117
1230
|
* the generated type-scale rules property by property. `motion` reads what
|
|
@@ -1133,7 +1246,7 @@ function resolveThemeValues(input, location, context) {
|
|
|
1133
1246
|
settleMotionTokens(tokens, input, context);
|
|
1134
1247
|
return {
|
|
1135
1248
|
tokens,
|
|
1136
|
-
components: mergeComponentMaps(typography.components, input.components)
|
|
1249
|
+
components: mergeComponentMaps(typography.components, withoutUnsetComponents(input.components))
|
|
1137
1250
|
};
|
|
1138
1251
|
}
|
|
1139
1252
|
//#endregion
|
|
@@ -1227,6 +1340,7 @@ function resolveLocalTokens(themeName, declarations, base, portableTokens) {
|
|
|
1227
1340
|
const localTokens = { ...base?.localTokens };
|
|
1228
1341
|
const owners = { ...base?.localTokenOwners };
|
|
1229
1342
|
for (const [name, value] of Object.entries(declarations ?? {})) {
|
|
1343
|
+
if (value === void 0) continue;
|
|
1230
1344
|
const path = `defineTheme("${themeName}").localTokens["${name}"]`;
|
|
1231
1345
|
if (!CUSTOM_PROPERTY_NAME.test(name)) throw new Error(`${path}: a local token name must be a CSS custom property such as --brand-ink.`);
|
|
1232
1346
|
if (isPortableTokenName(name)) throw new Error(`${path}: "${name}" is a shared theme token. Set it through tokens, or pick a name outside the shared vocabulary.`);
|
|
@@ -1253,6 +1367,7 @@ function resolveAdaptationLocalTokens(path, declarations, rootLocalTokens) {
|
|
|
1253
1367
|
if (declarations === void 0) return void 0;
|
|
1254
1368
|
const resolved = {};
|
|
1255
1369
|
for (const [name, value] of Object.entries(declarations)) {
|
|
1370
|
+
if (value === void 0) continue;
|
|
1256
1371
|
if (!rootLocalTokens || !Object.hasOwn(rootLocalTokens, name)) throw new Error(`${path}["${name}"] cannot add a theme-local token. Declare it in the root theme or a theme it extends first.`);
|
|
1257
1372
|
const css = tokenValueToCss(value, `${path}["${name}"]`);
|
|
1258
1373
|
const reason = checkDeclarationValue(css);
|
|
@@ -1538,7 +1653,7 @@ const DERIVED_VARS = {
|
|
|
1538
1653
|
vars: ["--_checkbox-input-gap"],
|
|
1539
1654
|
replaces: true
|
|
1540
1655
|
}],
|
|
1541
|
-
"chat": [{
|
|
1656
|
+
"chat-composer": [{
|
|
1542
1657
|
property: "borderRadius",
|
|
1543
1658
|
vars: ["--_chat-composer-radius"]
|
|
1544
1659
|
}, {
|
|
@@ -1559,6 +1674,10 @@ const DERIVED_VARS = {
|
|
|
1559
1674
|
property: "padding",
|
|
1560
1675
|
expand: "container"
|
|
1561
1676
|
}],
|
|
1677
|
+
"drawer": [{
|
|
1678
|
+
property: "padding",
|
|
1679
|
+
expand: "container"
|
|
1680
|
+
}],
|
|
1562
1681
|
"dropdown-menu": [{
|
|
1563
1682
|
property: "borderRadius",
|
|
1564
1683
|
vars: ["--_dropdown-menu-radius"]
|
|
@@ -1597,6 +1716,11 @@ const DERIVED_VARS = {
|
|
|
1597
1716
|
replaces: true
|
|
1598
1717
|
}]
|
|
1599
1718
|
};
|
|
1719
|
+
const PADDING_SHORTHANDS = /* @__PURE__ */ new Set([
|
|
1720
|
+
"padding",
|
|
1721
|
+
"paddingBlock",
|
|
1722
|
+
"paddingInline"
|
|
1723
|
+
]);
|
|
1600
1724
|
const PADDING_PROPS = /* @__PURE__ */ new Set([
|
|
1601
1725
|
"padding",
|
|
1602
1726
|
"paddingBlock",
|
|
@@ -1615,14 +1739,16 @@ const PHYSICAL_BLOCK_PADDING = {
|
|
|
1615
1739
|
paddingTop: "paddingBlockStart",
|
|
1616
1740
|
paddingBottom: "paddingBlockEnd"
|
|
1617
1741
|
};
|
|
1742
|
+
/** Split a value on the whitespace between its components; `clamp(8px, 2vw)` stays whole. */
|
|
1618
1743
|
function words(value) {
|
|
1619
|
-
return value
|
|
1744
|
+
return splitTopLevelWhitespace(value);
|
|
1620
1745
|
}
|
|
1621
1746
|
function parsePadding(entries) {
|
|
1622
1747
|
const parsed = {};
|
|
1623
1748
|
for (const [raw, value] of entries) {
|
|
1624
1749
|
const prop = PHYSICAL_BLOCK_PADDING[raw] ?? raw;
|
|
1625
1750
|
const parts = words(value);
|
|
1751
|
+
if (parts.length === 0 && PADDING_SHORTHANDS.has(prop)) continue;
|
|
1626
1752
|
if (prop === "padding") {
|
|
1627
1753
|
parsed.blockStart = parts[0];
|
|
1628
1754
|
parsed.inline = parts[1] ?? parts[0];
|
|
@@ -1689,6 +1815,29 @@ function applyDerivedVars(component, declarations) {
|
|
|
1689
1815
|
];
|
|
1690
1816
|
}
|
|
1691
1817
|
//#endregion
|
|
1818
|
+
//#region src/Theme/pressSelector.ts
|
|
1819
|
+
/**
|
|
1820
|
+
* 主题里写的 `:active` 跟随触屏按压模型:鼠标保留 `:active`,粗指针下
|
|
1821
|
+
* 改看按压控制器写的 `data-astryx-press="on"`,手指刚落下或滚动时不会亮。
|
|
1822
|
+
* 控制器只标记最里层的可按元素,这个选择器让主题的按压样式既落在被标记的
|
|
1823
|
+
* 元素上,也落在它里面(直到下一个可按元素)和包着它的不可按元素上。
|
|
1824
|
+
* 每一支的特异性都等于一个属性选择器,和 `:active` 的一个伪类相当。
|
|
1825
|
+
*/
|
|
1826
|
+
const PRESS_ON = "[data-astryx-press=\"on\"]";
|
|
1827
|
+
const PRESSABLE = "[data-astryx-pressable]";
|
|
1828
|
+
const PRESS_BELIEVED_SELECTOR = `:is(${PRESS_ON}, ${PRESS_ON} :where(:not(${PRESSABLE}, ${PRESS_ON} ${PRESSABLE} *)), :where(:not(${PRESSABLE})):has(${PRESS_ON}))`;
|
|
1829
|
+
/** 粗指针(手指)媒体查询,不带 `@media`。 */
|
|
1830
|
+
const COARSE_POINTER_QUERY = "(pointer: coarse)";
|
|
1831
|
+
const ACTIVE_PSEUDO = /:active(?![-\w])/g;
|
|
1832
|
+
/** 这个伪类里有没有 `:active`。 */
|
|
1833
|
+
function hasActivePseudo(pseudo) {
|
|
1834
|
+
return new RegExp(ACTIVE_PSEUDO.source).test(pseudo);
|
|
1835
|
+
}
|
|
1836
|
+
/** 把伪类里的 `:active` 换成触屏按压选择器。 */
|
|
1837
|
+
function pressedPseudo(pseudo) {
|
|
1838
|
+
return pseudo.replace(ACTIVE_PSEUDO, PRESS_BELIEVED_SELECTOR);
|
|
1839
|
+
}
|
|
1840
|
+
//#endregion
|
|
1692
1841
|
//#region src/Theme/componentStyles.ts
|
|
1693
1842
|
/** A theme target: `<component-kebab>` or `<component-kebab>-<part>`. */
|
|
1694
1843
|
const TARGET_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
@@ -1786,10 +1935,21 @@ function declarationBlock(entries, location, { toProperty = cssProperty } = {})
|
|
|
1786
1935
|
}
|
|
1787
1936
|
return lines.join("\n");
|
|
1788
1937
|
}
|
|
1789
|
-
|
|
1938
|
+
/**
|
|
1939
|
+
* Sort one style block into declarations, pseudo-class blocks and, for a style
|
|
1940
|
+
* key, its `@light` and `@dark` blocks. A value left undefined is not set.
|
|
1941
|
+
*/
|
|
1942
|
+
function splitOverrides(overrides, location, withModes) {
|
|
1790
1943
|
const base = [];
|
|
1791
1944
|
const pseudos = [];
|
|
1945
|
+
const modes = {};
|
|
1792
1946
|
for (const [key, value] of Object.entries(overrides)) {
|
|
1947
|
+
if (value === void 0) continue;
|
|
1948
|
+
if (withModes && isColorModeKey(key)) {
|
|
1949
|
+
if (value === null || typeof value !== "object") throw new Error(`${location}: theme style block "${key}" must be an object of CSS declarations.`);
|
|
1950
|
+
modes[key === "@dark" ? "dark" : "light"] = value;
|
|
1951
|
+
continue;
|
|
1952
|
+
}
|
|
1793
1953
|
if (key.startsWith(":")) {
|
|
1794
1954
|
if (!PSEUDO.has(key) || typeof value === "string") throw new Error(`${location}: theme style pseudo "${key}" is not supported.`);
|
|
1795
1955
|
pseudos.push([key, value]);
|
|
@@ -1800,10 +1960,46 @@ function splitOverrides(overrides, location) {
|
|
|
1800
1960
|
}
|
|
1801
1961
|
return {
|
|
1802
1962
|
base,
|
|
1803
|
-
pseudos
|
|
1963
|
+
pseudos,
|
|
1964
|
+
modes
|
|
1804
1965
|
};
|
|
1805
1966
|
}
|
|
1806
1967
|
/**
|
|
1968
|
+
* One themed `:active` follows the touch press model: the `:active` rule
|
|
1969
|
+
* applies off a coarse pointer, and under one the press attribute takes its
|
|
1970
|
+
* place, so a finger paints the press only while the press is believed.
|
|
1971
|
+
*/
|
|
1972
|
+
function pseudoRules(selectors, pseudo, body) {
|
|
1973
|
+
if (!hasActivePseudo(pseudo)) return [`${withPseudo(selectors, pseudo)} {\n${body}\n}`];
|
|
1974
|
+
return [`@media not all and ${COARSE_POINTER_QUERY} {\n${withPseudo(selectors, pseudo)} {\n${body}\n}\n}`, `@media ${COARSE_POINTER_QUERY} {\n${withPseudo(selectors, pressedPseudo(pseudo))} {\n${body}\n}\n}`];
|
|
1975
|
+
}
|
|
1976
|
+
/** Rules for one style block on `selectors`, each passed through `wrap`. */
|
|
1977
|
+
function blockRules(target, overrides, selectors, where, wrap, surface, withModes) {
|
|
1978
|
+
const rules = [];
|
|
1979
|
+
const { base, pseudos, modes } = splitOverrides(overrides, where, withModes);
|
|
1980
|
+
const body = declarationBlock(applyDerivedVars(target, base), where);
|
|
1981
|
+
if (body) rules.push(wrap(`${selectors.join(", ")} {\n${body}\n}`));
|
|
1982
|
+
for (const [pseudo, block] of pseudos) {
|
|
1983
|
+
const pseudoBody = declarationBlock(applyDerivedVars(target, Object.entries(block)), `${where}["${pseudo}"]`);
|
|
1984
|
+
if (pseudoBody) rules.push(...pseudoRules(selectors, pseudo, pseudoBody).map(wrap));
|
|
1985
|
+
}
|
|
1986
|
+
for (const mode of COLOR_MODES) {
|
|
1987
|
+
const block = modes[mode];
|
|
1988
|
+
if (block === void 0) continue;
|
|
1989
|
+
const modeWhere = `${where}["@${mode}"]`;
|
|
1990
|
+
if (surface !== void 0) {
|
|
1991
|
+
if (surface === mode) rules.push(...blockRules(target, block, selectors, modeWhere, wrap, surface, false));
|
|
1992
|
+
continue;
|
|
1993
|
+
}
|
|
1994
|
+
for (const { suffix, media } of modeConditions(mode)) {
|
|
1995
|
+
const modeSelector = `:is(${selectors.join(", ")})${suffix}`;
|
|
1996
|
+
const modeWrap = media === void 0 ? wrap : (rule) => wrap(`@media ${media} {\n${rule}\n}`);
|
|
1997
|
+
rules.push(...blockRules(target, block, [modeSelector], modeWhere, modeWrap, surface, false));
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
return rules;
|
|
2001
|
+
}
|
|
2002
|
+
/**
|
|
1807
2003
|
* Compile a component style map into rule text, without scope or layer.
|
|
1808
2004
|
*
|
|
1809
2005
|
* Each rule targets the stable `.astryx-<target>` class plus the reflected
|
|
@@ -1812,15 +2008,12 @@ function splitOverrides(overrides, location) {
|
|
|
1812
2008
|
*/
|
|
1813
2009
|
function compileComponentRules(components, location, surface) {
|
|
1814
2010
|
const rules = [];
|
|
1815
|
-
for (const [target, styles] of Object.entries(components ?? {}))
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
for (const [pseudo, block] of pseudos) {
|
|
1822
|
-
const pseudoBody = declarationBlock(applyDerivedVars(target, Object.entries(block)), `${where}["${pseudo}"]`);
|
|
1823
|
-
if (pseudoBody) rules.push(`${withPseudo(selectors, pseudo)} {\n${pseudoBody}\n}`);
|
|
2011
|
+
for (const [target, styles] of Object.entries(components ?? {})) {
|
|
2012
|
+
if (styles === void 0) continue;
|
|
2013
|
+
for (const [key, overrides] of Object.entries(styles)) {
|
|
2014
|
+
if (overrides === void 0) continue;
|
|
2015
|
+
const where = `${location}components.${target}["${key}"]`;
|
|
2016
|
+
rules.push(...blockRules(target, overrides, targetSelectors(target, key, surface), where, (rule) => rule, surface, true));
|
|
1824
2017
|
}
|
|
1825
2018
|
}
|
|
1826
2019
|
return rules;
|
|
@@ -2837,7 +3030,13 @@ function propGuardRules(components, options = {}) {
|
|
|
2837
3030
|
const written = safeValue(authored?.[property]) ?? safeValue(fallback?.[property]);
|
|
2838
3031
|
return `${PROPERTY_CSS[property]}: ${written ?? value};`;
|
|
2839
3032
|
}).join(" ");
|
|
2840
|
-
|
|
3033
|
+
const selectors = targetSelectors(target, key, options.surface);
|
|
3034
|
+
rules.push(`${selectors.join(", ")} { ${body} }`);
|
|
3035
|
+
if (target === "link" && key === "color:accent") {
|
|
3036
|
+
const rest = safeValue(authored?.color) ?? safeValue(fallback?.color) ?? "var(--astryx-link-accent-foreground, #0074e2)";
|
|
3037
|
+
const hover = selectors.map((selector) => `${selector}:where(:hover):where(:not(:disabled, [aria-disabled="true"]))`).join(", ");
|
|
3038
|
+
rules.push(`${hover} { color: var(--astryx-link-hover-color, ${rest}); }`);
|
|
3039
|
+
}
|
|
2841
3040
|
}
|
|
2842
3041
|
}
|
|
2843
3042
|
return rules;
|
|
@@ -3001,6 +3200,7 @@ function assertTargets(components) {
|
|
|
3001
3200
|
function defineTheme(input) {
|
|
3002
3201
|
if (!THEME_NAME.test(input.name)) throw new Error(`Theme name "${input.name}" must use letters, numbers, and hyphens.`);
|
|
3003
3202
|
if ("extends" in input && !isDefinedTheme(input.extends)) throw new Error(`defineTheme("${input.name}"): \`extends\` must be a theme from defineTheme(), got ${describeBadBase(input.extends)}. Check that the import naming the base theme resolves to it.`);
|
|
3203
|
+
if ("localTokens" in input && input.localTokens === void 0) throw new Error(`defineTheme("${input.name}"): localTokens is undefined: omit the field or pass an object.`);
|
|
3004
3204
|
assertTargets(input.components);
|
|
3005
3205
|
assertTargets(input.onDark?.components);
|
|
3006
3206
|
assertTargets(input.onLight?.components);
|
|
@@ -3024,12 +3224,15 @@ function defineTheme(input) {
|
|
|
3024
3224
|
...authoredBaseTokens(base),
|
|
3025
3225
|
...own.tokens
|
|
3026
3226
|
};
|
|
3027
|
-
const
|
|
3227
|
+
const derivedRoles = {
|
|
3228
|
+
...deriveStatusRoleTokens(authoredTokens),
|
|
3229
|
+
...deriveChatRadius(authoredTokens)
|
|
3230
|
+
};
|
|
3028
3231
|
const tokens = {
|
|
3029
3232
|
...authoredTokens,
|
|
3030
|
-
...
|
|
3233
|
+
...derivedRoles
|
|
3031
3234
|
};
|
|
3032
|
-
const derivedTokens = Object.keys(
|
|
3235
|
+
const derivedTokens = Object.keys(derivedRoles);
|
|
3033
3236
|
const components = mergeComponentMaps(base?.components, own.components);
|
|
3034
3237
|
const local = resolveLocalTokens(input.name, input.localTokens, base, tokens);
|
|
3035
3238
|
const ownAxes = {
|
|
@@ -3221,7 +3424,8 @@ function capture() {
|
|
|
3221
3424
|
const root = document.documentElement;
|
|
3222
3425
|
return {
|
|
3223
3426
|
theme: root.getAttribute("data-astryx-theme"),
|
|
3224
|
-
mode: root.getAttribute("data-astryx-color-mode")
|
|
3427
|
+
mode: root.getAttribute("data-astryx-color-mode"),
|
|
3428
|
+
reducedMotion: root.hasAttribute("data-astryx-reduced-motion")
|
|
3225
3429
|
};
|
|
3226
3430
|
}
|
|
3227
3431
|
function writeAttribute(name, value) {
|
|
@@ -3231,26 +3435,29 @@ function writeAttribute(name, value) {
|
|
|
3231
3435
|
}
|
|
3232
3436
|
function apply(entry) {
|
|
3233
3437
|
const root = document.documentElement;
|
|
3234
|
-
|
|
3438
|
+
writeAttribute("data-astryx-theme", entry.name());
|
|
3235
3439
|
const mode = entry.mode();
|
|
3236
3440
|
if (mode === "light" || mode === "dark") root.setAttribute("data-astryx-color-mode", mode);
|
|
3237
3441
|
else root.removeAttribute("data-astryx-color-mode");
|
|
3442
|
+
setRootReducedMotionMark(root, entry.reducesMotion());
|
|
3238
3443
|
}
|
|
3239
3444
|
function restoreBase() {
|
|
3240
3445
|
if (!baseSnapshot) return;
|
|
3241
3446
|
writeAttribute("data-astryx-theme", baseSnapshot.theme);
|
|
3242
3447
|
writeAttribute("data-astryx-color-mode", baseSnapshot.mode);
|
|
3448
|
+
setRootReducedMotionMark(document.documentElement, baseSnapshot.reducedMotion);
|
|
3243
3449
|
baseSnapshot = null;
|
|
3244
3450
|
}
|
|
3245
3451
|
/**
|
|
3246
3452
|
* The outermost Theme mirrors its name and mode onto `documentElement`, so
|
|
3247
3453
|
* portaled UI and browser chrome see the same theme. Nested themes do not.
|
|
3248
3454
|
*/
|
|
3249
|
-
function useThemeRootSync(isNested, themeName, mode) {
|
|
3455
|
+
function useThemeRootSync(isNested, themeName, mode, reducesMotion = () => false) {
|
|
3250
3456
|
if (isNested || typeof document === "undefined") return;
|
|
3251
3457
|
const entry = {
|
|
3252
3458
|
name: themeName,
|
|
3253
|
-
mode
|
|
3459
|
+
mode,
|
|
3460
|
+
reducesMotion
|
|
3254
3461
|
};
|
|
3255
3462
|
let stopTextSizeSync;
|
|
3256
3463
|
onMounted(() => {
|
|
@@ -3259,7 +3466,11 @@ function useThemeRootSync(isNested, themeName, mode) {
|
|
|
3259
3466
|
entries.push(entry);
|
|
3260
3467
|
apply(entry);
|
|
3261
3468
|
});
|
|
3262
|
-
watch(() => [
|
|
3469
|
+
watch(() => [
|
|
3470
|
+
themeName(),
|
|
3471
|
+
mode(),
|
|
3472
|
+
reducesMotion()
|
|
3473
|
+
], () => {
|
|
3263
3474
|
if (entries[entries.length - 1] === entry) apply(entry);
|
|
3264
3475
|
});
|
|
3265
3476
|
onBeforeUnmount(() => {
|
|
@@ -3288,13 +3499,31 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
3288
3499
|
const root = useTemplateRef("root");
|
|
3289
3500
|
const isNested = inject(themeNestingKey, false);
|
|
3290
3501
|
const parentSyntax = inject(syntaxThemeKey, null);
|
|
3502
|
+
const parent = inject(themeContextKey, null);
|
|
3503
|
+
const ownTheme = computed(() => isDefinedTheme(props.theme) ? props.theme : null);
|
|
3504
|
+
const applied = computed(() => ownTheme.value ?? parent?.value.theme ?? null);
|
|
3505
|
+
const appliedName = computed(() => applied.value?.name ?? null);
|
|
3506
|
+
function describeValue(value) {
|
|
3507
|
+
if (typeof value === "string") return `the string "${value}"`;
|
|
3508
|
+
if (value === null) return "null";
|
|
3509
|
+
if (typeof value === "object") return "an object that defineTheme() did not make";
|
|
3510
|
+
return `a value of type ${typeof value}`;
|
|
3511
|
+
}
|
|
3512
|
+
watch(ownTheme, (theme) => {
|
|
3513
|
+
if (theme !== null) return;
|
|
3514
|
+
const value = props.theme;
|
|
3515
|
+
const fix = value === "light" || value === "dark" || value === "system" ? `To set the color mode, use mode="${value}".` : "Pass a theme from defineTheme() or a theme package.";
|
|
3516
|
+
devWarn("Theme", `\`theme\` takes a theme from defineTheme(), but got ${describeValue(value)}. ${fix} Until then, this Theme applies no theme of its own.`);
|
|
3517
|
+
}, { immediate: true });
|
|
3291
3518
|
provide(themeNestingKey, true);
|
|
3292
3519
|
provide(themeContextKey, computed(() => ({
|
|
3293
|
-
theme:
|
|
3520
|
+
theme: applied.value ?? neutralTheme,
|
|
3294
3521
|
mode: props.mode
|
|
3295
3522
|
})));
|
|
3296
|
-
|
|
3297
|
-
|
|
3523
|
+
const syntax = computed(() => ownTheme.value?.syntax ?? parentSyntax?.value ?? null);
|
|
3524
|
+
if (parentSyntax || ownTheme.value?.syntax) provide(syntaxThemeKey, syntax);
|
|
3525
|
+
const reducesMotion = computed(() => resolveKnobs(applied.value?.axes?.motion).reducedMotion === "always");
|
|
3526
|
+
useThemeRootSync(isNested, () => appliedName.value, () => props.mode, () => reducesMotion.value);
|
|
3298
3527
|
const colorScheme = computed(() => {
|
|
3299
3528
|
if (props.mode === "dark") return "dark";
|
|
3300
3529
|
if (props.mode === "light") return "light";
|
|
@@ -3303,17 +3532,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
3303
3532
|
const rootStyle = computed(() => ({ colorScheme: colorScheme.value }));
|
|
3304
3533
|
__expose({ element: root });
|
|
3305
3534
|
return (_ctx, _cache) => {
|
|
3306
|
-
return openBlock(), createElementBlock("div", {
|
|
3535
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
3307
3536
|
ref_key: "root",
|
|
3308
3537
|
ref: root,
|
|
3309
|
-
class:
|
|
3310
|
-
"data-astryx-theme":
|
|
3311
|
-
"data-astryx-color-mode": __props.mode === "system" ? void 0 : __props.mode
|
|
3312
|
-
|
|
3313
|
-
}, [__props.theme.css ? (openBlock(), createBlock(unref(ThemeStyle), {
|
|
3538
|
+
class: ["astryx-theme", unref(attrs).class],
|
|
3539
|
+
"data-astryx-theme": appliedName.value ?? void 0,
|
|
3540
|
+
"data-astryx-color-mode": __props.mode === "system" ? void 0 : __props.mode
|
|
3541
|
+
}, unref(reducedMotionMarkProps)(reducesMotion.value), { style: [rootStyle.value, unref(attrs).style] }), [ownTheme.value?.css ? (openBlock(), createBlock(unref(ThemeStyle), {
|
|
3314
3542
|
key: 0,
|
|
3315
|
-
css:
|
|
3316
|
-
}, null, 8, ["css"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")],
|
|
3543
|
+
css: ownTheme.value.css
|
|
3544
|
+
}, null, 8, ["css"])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
|
|
3317
3545
|
};
|
|
3318
3546
|
}
|
|
3319
3547
|
});
|
package/dist/Thumbnail/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Thumbnail-
|
|
1
|
+
import { t as _sfc_main } from "../Thumbnail-1LsaJ4_m.js";
|
|
2
2
|
export { _sfc_main as Thumbnail };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as usePressFeedback } from "./usePressFeedback-
|
|
1
|
+
import { t as usePressFeedback } from "./usePressFeedback-DHdmAsMp.js";
|
|
2
2
|
import { t as _sfc_main$1 } from "./Icon-Dk0jccgU.js";
|
|
3
3
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
4
|
-
import { t as _sfc_main$2 } from "./IconButton-
|
|
4
|
+
import { t as _sfc_main$2 } from "./IconButton-DPezhVBA.js";
|
|
5
5
|
import { o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
6
6
|
import { t as _sfc_main$3 } from "./Tooltip-CxzlUVN0.js";
|
|
7
7
|
import { t as spinnerMessages } from "./spinner-DVia-eDf.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as _sfc_main$2 } from "./BottomSheet-
|
|
1
|
+
import { n as _sfc_main$2 } from "./BottomSheet-BZ_yFoKC.js";
|
|
2
2
|
import { t as _sfc_main$3 } from "./Icon-Dk0jccgU.js";
|
|
3
3
|
import { n as usePositionedLayer, t as useDismiss } from "./useDismiss-BKtyCwx4.js";
|
|
4
4
|
import { s as isImeKeyEvent } from "./layerDepth-D3Rh8T5C.js";
|
|
@@ -7,7 +7,7 @@ import { t as _sfc_main$5 } from "./ButtonTooltip-ZpQP-aQg.js";
|
|
|
7
7
|
import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
|
|
8
8
|
import { t as useMediaQuery } from "./useMediaQuery-BzXGT1Aw.js";
|
|
9
9
|
import { t as _sfc_main$6 } from "./FieldIcon-BU1ZWAuo.js";
|
|
10
|
-
import { t as _sfc_main$7 } from "./IconButton-
|
|
10
|
+
import { t as _sfc_main$7 } from "./IconButton-DPezhVBA.js";
|
|
11
11
|
import { a as useAstryxLocale, o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
12
12
|
import { a as resolveHourFormat, r as isLocaleTimeComplete } from "./timeFormat-Cnd5vu5t.js";
|
|
13
13
|
import { a as parseISOTime, i as parseDisplayTime, n as formatISOTime, o as resolveTimeSurface, r as isTimeInRange, s as shiftTime, t as formatDisplayTime } from "./useTimeValue-8YfPQffv.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as TimeInputSize, it as TimeInputProps, nt as _default, ot as TimeInputEntryError, rt as TimeInputEmits } from "../index-
|
|
1
|
+
import { at as TimeInputSize, it as TimeInputProps, nt as _default, ot as TimeInputEntryError, rt as TimeInputEmits } from "../index-Dp6MmjIo.js";
|
|
2
2
|
export { _default as TimeInput, type TimeInputEmits, type TimeInputEntryError, type TimeInputProps, type TimeInputSize };
|
package/dist/TimeInput/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../TimeInput-
|
|
1
|
+
import { t as _sfc_main } from "../TimeInput-CfeDP72M.js";
|
|
2
2
|
export { _sfc_main as TimeInput };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as useInputGroupDisabled } from "./context-Bg7eSJ47.js";
|
|
2
2
|
import { i as useSize } from "./SizeContext-BbaF-SEx.js";
|
|
3
3
|
import { t as useResolvedLabelHidden } from "./useResolvedLabelHidden-B2rlWiaI.js";
|
|
4
|
-
import { t as _sfc_main$1 } from "./Field-
|
|
4
|
+
import { t as _sfc_main$1 } from "./Field-D-fRqyso.js";
|
|
5
5
|
import { t as useFieldPartStyling } from "./fieldParts-CuE5V12i.js";
|
|
6
|
-
import { t as _sfc_main$2 } from "./TimeField-
|
|
6
|
+
import { t as _sfc_main$2 } from "./TimeField-ojhX2ZOj.js";
|
|
7
7
|
import { computed, createBlock, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, normalizeStyle, openBlock, shallowRef, unref, useAttrs, useId, useModel, withCtx } from "vue";
|
|
8
8
|
//#region src/TimeInput/TimeInput.vue
|
|
9
9
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-
|
|
1
|
+
import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-Dp6MmjIo.js";
|
|
2
2
|
export { type FormatInstantOptions, type InstantFormat, _default as Timestamp, type TimestampColor, type TimestampFormat, type TimestampProps, type TimestampTooltipEntry, type TimestampTooltipFormat, type TimestampTooltipLine, formatInstant, formatRelativeTime, formatTooltipLines };
|
package/dist/Timestamp/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as formatInstant } from "../formatInstant-CjCwl6JS.js";
|
|
2
|
-
import { n as formatTooltipLines, r as formatRelativeTime, t as _sfc_main } from "../Timestamp-
|
|
2
|
+
import { n as formatTooltipLines, r as formatRelativeTime, t as _sfc_main } from "../Timestamp-SseS_qtf.js";
|
|
3
3
|
export { _sfc_main as Timestamp, formatInstant, formatRelativeTime, formatTooltipLines };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
2
2
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
3
3
|
import { t as writeClipboardText } from "./clipboardWrite-Ds6fxmZc.js";
|
|
4
|
-
import { t as _sfc_main$2 } from "./IconButton-
|
|
4
|
+
import { t as _sfc_main$2 } from "./IconButton-DPezhVBA.js";
|
|
5
5
|
import { a as useAstryxLocale, o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
6
6
|
import { t as _sfc_main$3 } from "./Text-D48QFTtL.js";
|
|
7
7
|
import { r as useCalendarSystem } from "./calendar-C7py_wtb.js";
|
package/dist/Toast/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _sfc_main$1, r as _sfc_main, t as useToast } from "../Toast-
|
|
1
|
+
import { n as _sfc_main$1, r as _sfc_main, t as useToast } from "../Toast-yUVFaZiJ.js";
|
|
2
2
|
export { _sfc_main as Toast, _sfc_main$1 as ToastViewport, useToast };
|