@astryx-vue/core 0.38.0 → 0.39.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-BVTKz7re.js → AlertDialog-DnylRSpj.js} +3 -3
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-C2y8U6wp.js → AppShell-lv3WDlCi.js} +5 -5
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-NCI6aOKt.js → Banner-CqIYLEcx.js} +2 -2
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-dgHDqtQg.js → BottomSheet-6W3izQzr.js} +1 -1
- package/dist/{BottomSheet-CFdGLVIF.js → BottomSheet-D37eNqz5.js} +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CwEfccnT.js → Breadcrumbs-BEzCPnoe.js} +2 -2
- package/dist/Button/index.js +1 -1
- package/dist/{Button-BZV5wL4j.js → Button-DGIfLwqj.js} +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-S5IjkDsY.js → Calendar-CfhOlgQJ.js} +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-CbOusMO0.js → Carousel-DmeW51vC.js} +2 -2
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-BrHbv7Ah.js → Chat-whrqE8Zj.js} +5 -5
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CV8aHb9r.js → CheckboxInput-CHO4Jz0m.js} +3 -3
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxListItem-SyF1JdT3.js → CheckboxListItem-C4dmrC_w.js} +3 -3
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-Ijf06x0V.js → Citation-DXMQVSi5.js} +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-BNOzyQX4.js → Code-D80SHrJx.js} +4 -3
- package/dist/{CodeBlock-DYXx_9Kj.js → CodeBlock-vhMVY90M.js} +3 -3
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-48Q1GfRw.js → Collapsible-CaKmR3yE.js} +3 -3
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-Ct70AcIK.js → CommandPalette-C-iXk7EB.js} +2 -2
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-NnPRhI6t.js → ComplexSelector-BsdtBmd0.js} +5 -5
- package/dist/{ComponentIcon-Dw4xQxg3.js → ComponentIcon-B67QcA-d.js} +2 -2
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-C7m059d4.js → ContextMenu-GZkN9lf1.js} +6 -6
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-D-NIlF5P.js → DateInput-Cb6eLrbU.js} +9 -9
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-BYl649eD.js → DateRangeInput-BUFeQYJ6.js} +6 -6
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-CBzae6EW.js → DateTimeInput-r-MOwLs4.js} +9 -9
- package/dist/Dialog/index.js +1 -1
- package/dist/{DialogHeader-DKt_lREy.js → DialogHeader-CPhEYbZ1.js} +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-D63qUfxP.js → Drawer-C0ntt2L9.js} +1 -1
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-BkTjcbtP.js → DropdownMenu-CSWLdtI4.js} +7 -7
- package/dist/Field/index.js +3 -3
- package/dist/{Field-DgtZ9Czv.js → Field-BYAHZ4s7.js} +2 -2
- package/dist/{FieldIcon-BU1ZWAuo.js → FieldIcon-C6A69-um.js} +1 -1
- package/dist/{FieldInfoTip-D4vkQb2F.js → FieldInfoTip-6IHEEEJL.js} +2 -2
- package/dist/{FieldLabel-DkElUlTP.js → FieldLabel-CHaeZROf.js} +2 -2
- package/dist/FieldStatus/index.js +1 -1
- package/dist/{FieldStatus-DmCWPT6U.js → FieldStatus-QjwGygl3.js} +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-epZuREvN.js → FileInput-DD3DvIT0.js} +5 -5
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/Icon/index.js +2 -2
- package/dist/{Icon-Dk0jccgU.js → Icon-BUSj1-Th.js} +1 -1
- package/dist/{Icon-M1Rlknd0.js → Icon-CYXC4iYF.js} +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-ddP2kBOE.js → IconButton-CzU-cz_H.js} +1 -1
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/Indicator/index.js +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-D2rbGvF9.js → InfoTip-Ckhg715K.js} +1 -1
- package/dist/{InputClearButton-pGsDJl26.js → InputClearButton-Btjd5Lnk.js} +2 -2
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-BIVCj2rq.js → InputGroup-C388xPHC.js} +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-DIs9FbLS.js → Layout-DTSKNAzq.js} +1 -1
- package/dist/{LayoutPanel-DPueklAW.js → LayoutPanel-CH4HZGLR.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CYFqIuYF.js → Lightbox-CQhmsbhy.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-Bte02xvC.js → Link-BsmxrY3Y.js} +1 -1
- package/dist/List/index.js +1 -1
- package/dist/{ListItem-DyJ5nTUB.js → ListItem-BEc2EF1u.js} +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-DLOM7sua.js → Markdown-BkL2wt7F.js} +3 -3
- package/dist/{MediaTheme-CBkEmVe4.js → MediaTheme-BavxpAJt.js} +5 -77
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-Dfw9RqEG.js → MoreMenu-pvuN9vfu.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-670gfK2P.js → MultiSelector-sD97taHQ.js} +8 -8
- package/dist/{NavHeadingSurface-CyzeGig1.js → NavHeadingSurface-C3QJ64vm.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-CoozsQxb.js → NumberInput-B3Y_NOui.js} +6 -6
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-HRiDkiv1.js → Pagination-BJKFuELz.js} +2 -2
- package/dist/{PickerWheel-BH7fotFp.js → PickerWheel-J5F_ecWb.js} +1 -1
- package/dist/Popover/index.d.ts +2 -2
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CIfmPr2b.js → Popover-CVZnqsUy.js} +4 -4
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-lZ7C-9_i.js → PowerSearch-BHTHVINR.js} +21 -21
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-DE0vl44p.js → RadioGroup-CvMj98z_.js} +2 -2
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioListItem-CMH7E4o4.js → RadioListItem-CptY2wdB.js} +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{ResizeHandle-IXhzcM0r.js → ResizeHandle-ruXeaXUT.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-DfQbw_Kx.js → SegmentedControl-DMxIY7uq.js} +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-BA_Br1PQ.js → Selector-DhKtSP71.js} +7 -7
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -2
- package/dist/{SideNav-iTVaFVr8.js → SideNav-DOXNxEIp.js} +7 -7
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-Dd-7-KDB.js → Slider-D5GYcH4S.js} +1 -1
- package/dist/Spinner/index.js +1 -1
- package/dist/{Spinner-D1adu3uH.js → Spinner-lLOYfbOY.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-2Pzjo2X6.js → Stepper-0ycdCwND.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-CDzpdofs.js → Switch-DDHf_9iJ.js} +2 -2
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-2WI0pFSQ.js → TabList-BnLUktgm.js} +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-Dv2v2Qn1.js → Table-B49mlc0R.js} +13 -13
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-DVaMUVoM.js → TextArea-BSB5WIpK.js} +6 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-CuZ0_q-W.js → TextInput-Ck-6Mtbt.js} +6 -6
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +3 -3
- package/dist/{Theme-CwruhtLu.js → Theme-B_kAJHy2.js} +111 -23
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DdWfJKHa.js → Thumbnail-Tg50Msul.js} +3 -3
- package/dist/{TimeField-BxM1p1iV.js → TimeField-CLD_j1tX.js} +7 -7
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-OazN0w6r.js → TimeInput-DuijuQMd.js} +2 -2
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-B6Ob-xlj.js → Timestamp-D8fyTuhk.js} +2 -2
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-CW2ML8tU.js → Toast-51l_F_YA.js} +4 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-8XAM4Mko.js → ToggleButton-_fEU63Nz.js} +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-OZbI0TqN.js → Tokenizer-wWybLovw.js} +9 -9
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-Bea1f-4t.js → TopNav-GvK-XIRl.js} +3 -3
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-DEGpCrNi.js → TreeList-CfELZwbQ.js} +5 -5
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-BONCIm6m.js → Typeahead-DtNM4311.js} +5 -5
- package/dist/{accessibleName-YrrAARQX.js → accessibleName-CYV4uRm9.js} +3 -3
- package/dist/{adaptationTypes-D874ONPJ.d.ts → adaptationTypes-D5HrfPSt.d.ts} +9 -0
- package/dist/{assertOptions-Byu4Yqfg.js → assertOptions-BOwrrTT-.js} +1 -1
- package/dist/colorMode-DVs86FF2.js +49 -0
- package/dist/{compactDefinition-CMTR5KqU.d.ts → compactDefinition-BPg0hR8Q.d.ts} +1 -1
- package/dist/{compactDefinition-BeFUKEFg.js → compactDefinition-D32f2O_H.js} +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +7 -7
- package/dist/{composables-BJfZbXeW.js → composables-D5840uKi.js} +1 -1
- package/dist/{context-DArta_KP.js → context-CLCiYDtY.js} +1 -1
- package/dist/context-CwV8eyUd.js +12 -0
- package/dist/contrast-B0fsdq4U.js +75 -0
- package/dist/{index-Pad9p8CU.d.ts → index-Ak1b0V24.d.ts} +1 -1
- package/dist/{index-BrY-v2wz.d.ts → index-Bk2SsmEu.d.ts} +3 -3
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/{index-Dgl2rXqH.d.ts → index-BzaRSOA3.d.ts} +2 -1
- package/dist/index-CDZhxbEp.d.ts +44 -0
- package/dist/{index-CQi9WGWE.d.ts → index-CEdoNcHF.d.ts} +1 -1
- package/dist/{index-DkYOGpsC.d.ts → index-CTo75wH5.d.ts} +1 -1
- package/dist/{index-V6uruC4Z.d.ts → index-CqvIpZ-t.d.ts} +1 -1
- package/dist/{index-JE1HrzdJ.d.ts → index-DVX2jlTQ.d.ts} +2 -2
- package/dist/{index-DPhQZXYw.d.ts → index-DYabo8TI.d.ts} +1 -1
- package/dist/{index-BtqvPjAf.d.ts → index-DofC9Rll.d.ts} +1 -1
- package/dist/{index-CTASAiq2.d.ts → index-EyFu5eSZ.d.ts} +3 -3
- package/dist/{index-EUzmHHm6.d.ts → index-WBF_zxXX.d.ts} +2 -2
- package/dist/{index-DxFU2kv3.d.ts → index-ZXDolNI1.d.ts} +29 -29
- package/dist/index.d.ts +20 -18
- package/dist/index.js +85 -84
- package/dist/{landing-CwF_76em.js → landing-DjJvKu3c.js} +1 -1
- package/dist/{lazyBottomSheet-COX_Z3-V.js → lazyBottomSheet-DUPKYGf1.js} +1 -1
- package/dist/motionTokenDefaults-EFzpiAF5.js +38 -0
- package/dist/palette/index.d.ts +3 -0
- package/dist/palette/index.js +2 -0
- package/dist/palette-DlNBLR8U.js +2114 -0
- package/dist/{presentationHold-ZKixVLcz.js → presentationHold-Bjjux3fp.js} +1 -1
- package/dist/{reportChange-DuOzs-8h.js → reportChange-wIeU3q3y.js} +1 -1
- package/dist/{resizableChannel-6oZZNYYM.js → resizableChannel-b7iQNnCj.js} +2 -2
- package/dist/{themeTiming-Cv_hsTJU.js → themeTiming-DOf0j6SM.js} +2 -1
- package/dist/{tokenReferences-sKpv-7_O.js → tokenReferences-CdmofltU.js} +1 -38
- package/dist/{triggerVariant-DPuBmzpp.js → triggerVariant-CRQoD-4F.js} +1 -1
- package/dist/{types-D97oBk6c.d.ts → types-DTlpQo7j.d.ts} +1 -1
- package/dist/types-DypDQlbk.d.ts +176 -0
- package/dist/{useAnimatedLayout-CVYflMPG.js → useAnimatedLayout-CXjd5pjG.js} +1 -1
- package/dist/{useChatStreamScroll-3mJvbNtI.js → useChatStreamScroll-BQpGHGAr.js} +1 -1
- package/dist/{useHeldPresentation-CaIKTwUh.js → useHeldPresentation-0Z0Untra.js} +1 -1
- package/dist/{useIndicator-PFDBNOvX.js → useIndicator-Co1ERlg-.js} +2 -2
- package/dist/{useInputStatusIcon-CV8qfqzK.js → useInputStatusIcon-DJfhmCiH.js} +2 -2
- package/dist/{useMediaQuery-BzXGT1Aw.js → useMediaQuery-DKnSDG3S.js} +1 -1
- package/dist/{useMenuHover-DoBatZeD.js → useMenuHover-Dahcf3qo.js} +1 -1
- package/dist/{useMobileKeyboard-DOa93Ek2.js → useMobileKeyboard-Cibxl8ZC.js} +1 -1
- package/dist/{useResizable-9WyAIDnz.js → useResizable-CJQAV_tU.js} +1 -1
- package/dist/useResolvedColorMode-CyZjLvfj.js +159 -0
- package/dist/{useTypeaheadMenuConfig-DUZD3GqE.js → useTypeaheadMenuConfig-0glQWHQd.js} +1 -1
- package/package.json +5 -1
- package/dist/context-Cws_tXTr.js +0 -7
- package/dist/useResolvedColorMode-Df97_9w_.js +0 -78
- package/dist/{index-BqhgeAT4.d.ts → index-5FGt4HsB.d.ts} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as watchMediaQuery, n as matchesMediaQuery } from "./coarsePointer-BWNSUIY8.js";
|
|
2
|
-
import { r as useCompactDefinition } from "./compactDefinition-
|
|
2
|
+
import { r as useCompactDefinition } from "./compactDefinition-D32f2O_H.js";
|
|
3
3
|
import { computed, getCurrentInstance, onMounted, onScopeDispose, shallowRef, toValue, watch } from "vue";
|
|
4
4
|
//#region src/composables/internal/presentation.ts
|
|
5
5
|
/**
|
|
@@ -3,7 +3,7 @@ import { f as toSpring } from "./roles-D6hLs7Rg.js";
|
|
|
3
3
|
import { c as solveSpring, i as reducedMotionCrossFade, n as sampleCount, s as settlingDuration, t as linearEasing } from "./linearEasing-CDsqxyiS.js";
|
|
4
4
|
import { r as themeReducesMotion } from "./reducedMotionMark-CYSyfURo.js";
|
|
5
5
|
import { a as registerPresentedOffset, c as writePresentedResolve, n as clearPresentedResolve, t as batchPresented } from "./presentation-Cl58tYA6.js";
|
|
6
|
-
import { i as readThemeTokenText, n as readThemeTiming } from "./themeTiming-
|
|
6
|
+
import { i as readThemeTokenText, n as readThemeTiming } from "./themeTiming-DOf0j6SM.js";
|
|
7
7
|
//#region src/motion/layout/glides.ts
|
|
8
8
|
/**
|
|
9
9
|
* @file glides.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { o as sharedWeakMap } from "./sharedRealm-BYHklCVM.js";
|
|
2
2
|
import { t as resolveMotion } from "./resolveMotion-BCM4CX-R.js";
|
|
3
3
|
import { s as springs } from "./springs-B5hVbZta.js";
|
|
4
|
-
import { C as safeAnimate, D as scaleOf, E as intersects, O as visibleRect, _ as layoutMotion, a as placeOf, b as springGlide, c as areaOf, d as extentOf, f as isRtl, g as glideNextChange, h as changeStartIn, i as nextInFlow, k as glideOf, l as createAnimatedLayout, m as pxClip, n as rideNeighbour, p as previousInFlow, t as reportLayoutChange, x as beginChange, y as sampleOver } from "./reportChange-
|
|
5
|
-
import { n as landLayoutGlide } from "./landing-
|
|
4
|
+
import { C as safeAnimate, D as scaleOf, E as intersects, O as visibleRect, _ as layoutMotion, a as placeOf, b as springGlide, c as areaOf, d as extentOf, f as isRtl, g as glideNextChange, h as changeStartIn, i as nextInFlow, k as glideOf, l as createAnimatedLayout, m as pxClip, n as rideNeighbour, p as previousInFlow, t as reportLayoutChange, x as beginChange, y as sampleOver } from "./reportChange-wIeU3q3y.js";
|
|
5
|
+
import { n as landLayoutGlide } from "./landing-DjJvKu3c.js";
|
|
6
6
|
//#region src/motion/layout/edgeReport.ts
|
|
7
7
|
const resizeReveals = sharedWeakMap("motion/animated-layout/resize-reveals", 1);
|
|
8
8
|
/** The inline properties a size hold sets, by axis. */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { i as parseMotionRoleValue, r as parseCssEasing } from "./roles-D6hLs7Rg.js";
|
|
2
2
|
import { t as cubicBezier } from "./bezier-Dko5MnTp.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as easeDefaults, t as durationDefaults } from "./motionTokenDefaults-EFzpiAF5.js";
|
|
4
4
|
import { n as normalizeTokenName } from "./tokenName-0U-WEH09.js";
|
|
5
|
+
import { t as resolveTokenReferences } from "./tokenReferences-CdmofltU.js";
|
|
5
6
|
//#region src/motion/themeTiming.ts
|
|
6
7
|
/**
|
|
7
8
|
* The value `@astryx-vue/themes` declares for each timing token, by its
|
|
@@ -1,40 +1,3 @@
|
|
|
1
|
-
//#region src/Theme/motionTokenDefaults.ts
|
|
2
|
-
/**
|
|
3
|
-
* @file motionTokenDefaults.ts
|
|
4
|
-
* @input Nothing: the values `@astryx-vue/themes` declares on `:root`
|
|
5
|
-
* @output durationDefaults and easeDefaults, keyed by the theme vocabulary's
|
|
6
|
-
* unprefixed names, and their name types
|
|
7
|
-
* @position Theme utility with no imports. The neutral theme stylesheet
|
|
8
|
-
* (`packages/themes/neutral/base.css`) declares these values as
|
|
9
|
-
* `--astryx-duration-*` and `--astryx-ease-*`; motionTokenDefaults.test.ts
|
|
10
|
-
* keeps the two equal. Motion tokens a theme generates (`tempo`,
|
|
11
|
-
* `character`) start from these values, and the motion foundation falls
|
|
12
|
-
* back to them where no stylesheet applies. Pure; safe on the server.
|
|
13
|
-
*/
|
|
14
|
-
const durationDefaults = {
|
|
15
|
-
"--duration-fast-min": "95ms",
|
|
16
|
-
"--duration-fast": "125ms",
|
|
17
|
-
"--duration-fast-max": "165ms",
|
|
18
|
-
"--duration-medium-min": "225ms",
|
|
19
|
-
"--duration-medium": "300ms",
|
|
20
|
-
"--duration-medium-max": "400ms",
|
|
21
|
-
"--duration-slow-min": "525ms",
|
|
22
|
-
"--duration-slow": "700ms",
|
|
23
|
-
"--duration-slow-max": "935ms",
|
|
24
|
-
/** The standard dismissal duration. */
|
|
25
|
-
"--duration-exit": "var(--duration-fast)"
|
|
26
|
-
};
|
|
27
|
-
const easeDefaults = {
|
|
28
|
-
/** Decelerates: state changes. */
|
|
29
|
-
"--ease-standard": "cubic-bezier(0.24, 1, 0.4, 1)",
|
|
30
|
-
/** Entrances. A theme's `character` sets it; at `'standard'` it equals `--ease-standard`. */
|
|
31
|
-
"--ease-entrance": "cubic-bezier(0.24, 1, 0.4, 1)",
|
|
32
|
-
/** Moves on screen. A theme's `character` sets it; at `'standard'` it equals `--ease-standard`. */
|
|
33
|
-
"--ease-move": "cubic-bezier(0.24, 1, 0.4, 1)",
|
|
34
|
-
/** Accelerates: things leaving. */
|
|
35
|
-
"--ease-exit": "cubic-bezier(0.3, 0, 0.6, 0.6)"
|
|
36
|
-
};
|
|
37
|
-
//#endregion
|
|
38
1
|
//#region src/Theme/tokenReferences.ts
|
|
39
2
|
/**
|
|
40
3
|
* @file tokenReferences.ts
|
|
@@ -164,4 +127,4 @@ function resolveTokenReferences(raw) {
|
|
|
164
127
|
return cache;
|
|
165
128
|
}
|
|
166
129
|
//#endregion
|
|
167
|
-
export {
|
|
130
|
+
export { splitTopLevelWhitespace as n, resolveTokenReferences as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as _sfc_main$1 } from "./Icon-
|
|
1
|
+
import { t as _sfc_main$1 } from "./Icon-BUSj1-Th.js";
|
|
2
2
|
import { t as _sfc_main$2 } from "./ButtonTooltip-ZpQP-aQg.js";
|
|
3
3
|
import { t as useButtonTooltip } from "./useButtonTooltip-DjCaZMp_.js";
|
|
4
4
|
import { o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as LayerPlacement, t as LayerAlignment } from "./position-DFW5ymAF.js";
|
|
2
|
-
import "./compactDefinition-
|
|
2
|
+
import "./compactDefinition-BPg0hR8Q.js";
|
|
3
3
|
import { ComputedRef, MaybeRefOrGetter } from "vue";
|
|
4
4
|
//#region src/composables/internal/presentation.d.ts
|
|
5
5
|
type AdaptivePresentation = 'popover' | 'bottom-sheet' | 'adaptive';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
//#region src/palette/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 色阶生成器的请求、候选结果和诊断的形状,以及 `themePalette()` 的输入输出。
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A color an author pins at one stop of one mode, constraining generation.
|
|
7
|
+
*/
|
|
8
|
+
interface TonalPaletteAnchor {
|
|
9
|
+
/** Mode containing the anchored stop. */
|
|
10
|
+
mode: 'light' | 'dark';
|
|
11
|
+
/** Existing requested stop where the anchor applies. */
|
|
12
|
+
stop: number;
|
|
13
|
+
/** sRGB hex the stop is pulled toward: three or six digits, with or without `#`; the generator normalizes it. */
|
|
14
|
+
color: string;
|
|
15
|
+
/** `exact` preserves the chosen color at that stop; `bounded` permits adjustment within `maxDeltaE`; `flexible` treats the color as guidance and blends toward it. */
|
|
16
|
+
policy: 'exact' | 'bounded' | 'flexible';
|
|
17
|
+
/** Required non-negative perceptual-distance limit for a `bounded` anchor. */
|
|
18
|
+
maxDeltaE?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One requested family: a seed color and the constraints applied to its ramp.
|
|
22
|
+
*/
|
|
23
|
+
interface TonalPaletteFamilyInput {
|
|
24
|
+
/** Lower-kebab-case key for the family in the generated palette. `black` and `white` are reserved for the standalone values. */
|
|
25
|
+
id: string;
|
|
26
|
+
/** sRGB hex the ramp is generated from: three or six digits, with or without `#`; the generator normalizes it. */
|
|
27
|
+
seed: string;
|
|
28
|
+
/** Display name for review artifacts; defaults to `id`. */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** `neutral` derives the ramp from `neutralProfile` instead of the seed hue; defaults to `chromatic`. */
|
|
31
|
+
kind?: 'chromatic' | 'neutral';
|
|
32
|
+
/** Colors pinned at specific stops. */
|
|
33
|
+
anchors?: TonalPaletteAnchor[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Mutes the dark edge of every chromatic family. Their dark ramps keep
|
|
37
|
+
* `edgeMultiplier` of their in-gamut chroma through `throughStop`, then
|
|
38
|
+
* recover along a smoothstep to the standard recipe at `recoverAtStop`. Light
|
|
39
|
+
* ramps, neutral families, and the black and white endpoints do not change.
|
|
40
|
+
*/
|
|
41
|
+
interface TonalPaletteDarkChromaTaper {
|
|
42
|
+
/** Share of chroma, from 0 to 1, that the dark edge keeps. */
|
|
43
|
+
edgeMultiplier: number;
|
|
44
|
+
/** Last stop that takes the full edge multiplier; must be a requested stop. */
|
|
45
|
+
throughStop: number;
|
|
46
|
+
/** First stop back on the standard recipe; must be a requested stop after `throughStop`. */
|
|
47
|
+
recoverAtStop: number;
|
|
48
|
+
/** Edge multipliers, from 0 to 1, by chromatic family id, in place of `edgeMultiplier`. */
|
|
49
|
+
familyMultipliers?: Record<string, number>;
|
|
50
|
+
}
|
|
51
|
+
interface TonalPaletteGenerationInput {
|
|
52
|
+
/** The recipe to run: astryx-oklch-v1 when none is named, so a request or config made before v2 keeps its colors; astryx-oklch-v2 makes pale stops follow the vibrancy and the seed's own chroma. New palettes name v2 (the theme editor records it); a config pins its recipe by naming it. */
|
|
53
|
+
recipe?: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
54
|
+
families: TonalPaletteFamilyInput[];
|
|
55
|
+
/** Chroma control from 0 (most muted) through 50 (default) to 100 (most vivid). */
|
|
56
|
+
vibrancy?: number;
|
|
57
|
+
/** Hue treatment for `neutral` families: `neutral-v1` is fully achromatic, `warm-v1` and `cool-v1` add a slight tint, and `custom` derives the hue from the family's own seed. Defaults to `neutral-v1`. */
|
|
58
|
+
neutralProfile?: 'neutral-v1' | 'warm-v1' | 'cool-v1' | 'custom';
|
|
59
|
+
modeStrategy?: 'light-only' | 'dark-only' | 'light-and-dark';
|
|
60
|
+
/** Mutes the dark edge of the chromatic families. */
|
|
61
|
+
darkChromaTaper?: TonalPaletteDarkChromaTaper;
|
|
62
|
+
/** Ordered stops shared by every requested family; defaults to 0 through 100 in increments of 5. Decimal stops are supported, and authors may omit the repeated black and white endpoints. */
|
|
63
|
+
stops?: number[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A generated palette candidate. The palette is still subject to author review
|
|
67
|
+
* and is not connected to runtime theme values.
|
|
68
|
+
*/
|
|
69
|
+
interface TonalPaletteCandidate {
|
|
70
|
+
schemaVersion: 1;
|
|
71
|
+
status: 'candidate';
|
|
72
|
+
recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
73
|
+
/** Exact solid black for theme authoring outside a tonal family. */
|
|
74
|
+
black: '#000000';
|
|
75
|
+
/** Exact solid white for theme authoring outside a tonal family. */
|
|
76
|
+
white: '#ffffff';
|
|
77
|
+
/** Canonical order for iterating the palette's stop lookup maps. */
|
|
78
|
+
stops: number[];
|
|
79
|
+
palette: Record<string, {
|
|
80
|
+
name: string;
|
|
81
|
+
light?: Record<string, string>;
|
|
82
|
+
dark?: Record<string, string>;
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Per-ramp evidence recorded for one family in one mode.
|
|
87
|
+
*/
|
|
88
|
+
interface TonalPaletteRampDiagnostics {
|
|
89
|
+
/** Whether luminance rises across every stop. */
|
|
90
|
+
monotonic: boolean;
|
|
91
|
+
/** Smallest perceptual gap between neighboring stops; a small value means two stops read as one color. */
|
|
92
|
+
minimumAdjacentDeltaE: number;
|
|
93
|
+
/** Largest gap between neighboring stops. */
|
|
94
|
+
maximumAdjacentDeltaE: number;
|
|
95
|
+
/** Largest hue distance, in degrees, between a stop and the family's reference hue. */
|
|
96
|
+
maximumHueDrift: number;
|
|
97
|
+
/** Named drift the ramp is at risk of, or `null`. */
|
|
98
|
+
hueIdentityRisk: 'blue-to-purple' | 'yellow-to-brown' | null;
|
|
99
|
+
/** Stops whose ideal color fell outside sRGB and was mapped back into it. */
|
|
100
|
+
gamutMappedStops: number[];
|
|
101
|
+
/** Each anchor with the color the stop received after its policy was applied and the perceptual distance that color still has from the requested target. */
|
|
102
|
+
anchors: (TonalPaletteAnchor & {
|
|
103
|
+
generatedColor: string;
|
|
104
|
+
deltaE: number;
|
|
105
|
+
})[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Cross-family evidence for one mode, sampled at the stop nearest 50.
|
|
109
|
+
*/
|
|
110
|
+
interface TonalPaletteCoordinationDiagnostics {
|
|
111
|
+
/** Mode these samples come from. */
|
|
112
|
+
mode: 'light' | 'dark';
|
|
113
|
+
/** Sampled stop. */
|
|
114
|
+
stop: number;
|
|
115
|
+
/** The two chromatic families hardest to tell apart, or `null` with fewer than two. */
|
|
116
|
+
closestFamilies: [string, string] | null;
|
|
117
|
+
/** Perceptual distance between them. */
|
|
118
|
+
minimumFamilyDeltaE: number | null;
|
|
119
|
+
/** Most saturated family at this stop. */
|
|
120
|
+
strongestFamily: string | null;
|
|
121
|
+
/** Least saturated family at this stop. */
|
|
122
|
+
weakestFamily: string | null;
|
|
123
|
+
/** Strongest chroma over weakest; a large ratio means the families are unbalanced. */
|
|
124
|
+
chromaRatio: number | null;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The request as the generator resolved it, with every default filled in.
|
|
128
|
+
*/
|
|
129
|
+
interface TonalPaletteNormalizedRequest {
|
|
130
|
+
recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
131
|
+
vibrancy: number;
|
|
132
|
+
neutralProfile: 'neutral-v1' | 'warm-v1' | 'cool-v1' | 'custom';
|
|
133
|
+
modeStrategy: 'light-only' | 'dark-only' | 'light-and-dark';
|
|
134
|
+
/** The requested taper, with `familyMultipliers` filled in; present only when the request has a taper. */
|
|
135
|
+
darkChromaTaper?: Required<TonalPaletteDarkChromaTaper>;
|
|
136
|
+
stops: number[];
|
|
137
|
+
families: {
|
|
138
|
+
id: string;
|
|
139
|
+
name: string;
|
|
140
|
+
seed: string;
|
|
141
|
+
kind: 'chromatic' | 'neutral';
|
|
142
|
+
anchors: TonalPaletteAnchor[];
|
|
143
|
+
}[];
|
|
144
|
+
}
|
|
145
|
+
/** A part style's lifted secondary text, as color-mode blocks: the property that carries it, for each mode. */
|
|
146
|
+
type PaletteLift = Readonly<Record<'@light' | '@dark', Readonly<Record<string, string>>>>;
|
|
147
|
+
/** The seeds `themePalette()` grows a theme's colors from. */
|
|
148
|
+
interface ThemePaletteInput {
|
|
149
|
+
/** The accent: buttons, links, focus rings, selection. */
|
|
150
|
+
accent?: string;
|
|
151
|
+
/** The grays of surfaces, text, borders and icons. */
|
|
152
|
+
neutral?: string;
|
|
153
|
+
/** The success status color. */
|
|
154
|
+
success?: string;
|
|
155
|
+
/** The warning status color. */
|
|
156
|
+
warning?: string;
|
|
157
|
+
/** The danger status color (the error tokens). */
|
|
158
|
+
danger?: string;
|
|
159
|
+
/** The info status color. */
|
|
160
|
+
info?: string;
|
|
161
|
+
/** Chroma as a whole number from 0 (most muted) through 50 (default) to 100 (most vivid). */
|
|
162
|
+
vibrancy?: number;
|
|
163
|
+
/** The recipe: `astryx-oklch-v1` when none is named. With a `neutral` seed it fixes the generated stops across upgrades; without one, stops picked against Core's default surfaces follow them. */
|
|
164
|
+
recipe?: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
165
|
+
}
|
|
166
|
+
/** A theme's colors made by `themePalette()`, for `defineTheme({palette})`. */
|
|
167
|
+
interface ThemePalette {
|
|
168
|
+
readonly kind: 'theme-palette';
|
|
169
|
+
readonly recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2';
|
|
170
|
+
/** Each color token's `[light, dark]` value. */
|
|
171
|
+
readonly tokens: Readonly<Record<string, readonly [string, string]>>;
|
|
172
|
+
/** Part styles that lift secondary text on the accent tint, the neutral track and the coloured cards, as the official themes do, by part and style key. */
|
|
173
|
+
readonly components: Readonly<Record<string, Readonly<Record<string, PaletteLift>>>>;
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
export { TonalPaletteCandidate as a, TonalPaletteFamilyInput as c, TonalPaletteRampDiagnostics as d, TonalPaletteAnchor as i, TonalPaletteGenerationInput as l, ThemePalette as n, TonalPaletteCoordinationDiagnostics as o, ThemePaletteInput as r, TonalPaletteDarkChromaTaper as s, PaletteLift as t, TonalPaletteNormalizedRequest as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as subscribeInput } from "./inputStream-DmPkJ1aU.js";
|
|
2
|
-
import { t as useMediaQuery } from "./useMediaQuery-
|
|
2
|
+
import { t as useMediaQuery } from "./useMediaQuery-DKnSDG3S.js";
|
|
3
3
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
4
4
|
//#region src/composables/useChatNewMessages.ts
|
|
5
5
|
/** Class that marks a transcript row `useChatNewMessages` watches. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useAdaptivePresentation, n as usePresentationHold } from "./presentationHold-
|
|
1
|
+
import { i as useAdaptivePresentation, n as usePresentationHold } from "./presentationHold-Bjjux3fp.js";
|
|
2
2
|
import { computed, toValue, watch } from "vue";
|
|
3
3
|
//#region src/layer/useHeldPresentation.ts
|
|
4
4
|
function useHeldPresentation(presentation, isOpen) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as isRenderable } from "./isRenderable-BnKHIqfd.js";
|
|
2
|
-
import { t as _sfc_main$2 } from "./Icon-
|
|
3
|
-
import {
|
|
2
|
+
import { t as _sfc_main$2 } from "./Icon-BUSj1-Th.js";
|
|
3
|
+
import { r as themeContextKey } from "./context-CwV8eyUd.js";
|
|
4
4
|
import { n as decorativeAttrs, t as _sfc_main$3 } from "./CheckboxIndicator-fH4d-JE1.js";
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, inject, mergeProps, openBlock, renderSlot, unref, useAttrs, useSlots, useTemplateRef } from "vue";
|
|
6
6
|
import "../styles/check-indicator.css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as _sfc_main } from "./FieldIcon-
|
|
2
|
-
import { t as _sfc_main$1 } from "./FieldInfoTip-
|
|
1
|
+
import { t as _sfc_main } from "./FieldIcon-C6A69-um.js";
|
|
2
|
+
import { t as _sfc_main$1 } from "./FieldInfoTip-6IHEEEJL.js";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
4
|
//#region src/composables/useInputStatusIcon.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as useMediaQuery } from "./useMediaQuery-
|
|
1
|
+
import { t as useMediaQuery } from "./useMediaQuery-DKnSDG3S.js";
|
|
2
2
|
import { t as useListFocus } from "./useListFocus-Ccd_HU9T.js";
|
|
3
3
|
import { t as createHideTimer } from "./hoverIntent-DMHGb85c.js";
|
|
4
4
|
import { getCurrentScope, onScopeDispose, toValue, watch } from "vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as isNode, n as deepActiveElement, o as isDocument } from "./flatTree-BB4yPMNL.js";
|
|
2
2
|
import { a as sharedState, o as sharedWeakMap } from "./sharedRealm-BYHklCVM.js";
|
|
3
3
|
import { a as subscribeInput } from "./inputStream-DmPkJ1aU.js";
|
|
4
|
-
import { t as useMediaQuery } from "./useMediaQuery-
|
|
4
|
+
import { t as useMediaQuery } from "./useMediaQuery-DKnSDG3S.js";
|
|
5
5
|
import { t as animatorFor } from "./animator-i7djdtNK.js";
|
|
6
6
|
import { t as KEYBOARD_SPRING } from "./springs-B5hVbZta.js";
|
|
7
7
|
import { t as TOUCH_QUERY } from "./touchQueries-xy5IeZfe.js";
|
|
@@ -4,7 +4,7 @@ import { t as resolveMotion } from "./resolveMotion-BCM4CX-R.js";
|
|
|
4
4
|
import { s as springs } from "./springs-B5hVbZta.js";
|
|
5
5
|
import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
|
|
6
6
|
import { t as project } from "./projection-DzrWyxL1.js";
|
|
7
|
-
import { c as createRegionPaneSlot, f as registerPropsRegion, h as slideNextOnRelease, i as registerResizableChannel, l as edgeAxis, m as slideMotionsOf, o as resizeHandleBeside, p as shownSizeReader, s as createPaneReveal, u as isScriptMotion } from "./resizableChannel-
|
|
7
|
+
import { c as createRegionPaneSlot, f as registerPropsRegion, h as slideNextOnRelease, i as registerResizableChannel, l as edgeAxis, m as slideMotionsOf, o as resizeHandleBeside, p as shownSizeReader, s as createPaneReveal, u as isScriptMotion } from "./resizableChannel-b7iQNnCj.js";
|
|
8
8
|
import { i as rubberBandSlope, r as rubberBandInverse, t as rubberBand } from "./rubberBand-C-2erWWl.js";
|
|
9
9
|
import { computed, onBeforeUnmount, onMounted, onScopeDispose, reactive, ref, toValue, watch } from "vue";
|
|
10
10
|
//#region src/composables/useHotkeys.ts
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { n as systemSchemeKey } from "./context-CwV8eyUd.js";
|
|
2
|
+
import { n as watchMediaQuery, t as useMediaQuery } from "./useMediaQuery-DKnSDG3S.js";
|
|
3
|
+
import { t as readColorMode } from "./colorMode-DVs86FF2.js";
|
|
4
|
+
import { computed, getCurrentInstance, inject, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
5
|
+
//#region src/Theme/rootScheme.ts
|
|
6
|
+
const STYLE_NODES = "style, link[rel~=\"stylesheet\"]";
|
|
7
|
+
const SCHEME_META = "meta[name=\"color-scheme\" i]";
|
|
8
|
+
/** 只写一种时是那一种,两种都写是 null,一种都没写是 undefined。 */
|
|
9
|
+
function oneScheme(schemes) {
|
|
10
|
+
const names = schemes.toLowerCase().split(/\s+/);
|
|
11
|
+
const light = names.includes("light");
|
|
12
|
+
const dark = names.includes("dark");
|
|
13
|
+
if (light && dark) return null;
|
|
14
|
+
if (light || dark) return dark ? "dark" : "light";
|
|
15
|
+
}
|
|
16
|
+
/** 此刻页面根画的配色。 */
|
|
17
|
+
function readRootScheme() {
|
|
18
|
+
if (typeof document === "undefined" || typeof window === "undefined") return null;
|
|
19
|
+
const declared = window.getComputedStyle(document.documentElement).colorScheme;
|
|
20
|
+
if (declared == null || declared === "") return null;
|
|
21
|
+
if (declared !== "normal") return oneScheme(declared) ?? null;
|
|
22
|
+
for (const meta of document.querySelectorAll(SCHEME_META)) {
|
|
23
|
+
const content = meta.getAttribute("content") ?? "";
|
|
24
|
+
const fromMeta = oneScheme(content);
|
|
25
|
+
if (fromMeta !== void 0) return fromMeta;
|
|
26
|
+
if (/(?:^|\s)normal(?:\s|$)/i.test(content)) return "light";
|
|
27
|
+
}
|
|
28
|
+
return "light";
|
|
29
|
+
}
|
|
30
|
+
/** 这批变动会不会改变根的配色:根自己的属性、样式节点的内容、样式或 meta 节点增减。 */
|
|
31
|
+
function changesRootScheme(records) {
|
|
32
|
+
return records.some((record) => {
|
|
33
|
+
const target = record.target;
|
|
34
|
+
if (target === document.documentElement) return true;
|
|
35
|
+
const element = target instanceof Element ? target : target.parentElement;
|
|
36
|
+
if (element?.closest("style") != null) return true;
|
|
37
|
+
if (record.type === "attributes") return element?.matches("link, style, meta") === true;
|
|
38
|
+
const watched = `${STYLE_NODES}, ${SCHEME_META}`;
|
|
39
|
+
return [...record.addedNodes, ...record.removedNodes].some((node) => node instanceof Element && (node.matches(watched) || node.querySelector(watched) != null));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
43
|
+
let stopWatching = null;
|
|
44
|
+
function notify() {
|
|
45
|
+
for (const listener of listeners) listener();
|
|
46
|
+
}
|
|
47
|
+
function onStylesheetLoad(event) {
|
|
48
|
+
if (event.target instanceof HTMLLinkElement) notify();
|
|
49
|
+
}
|
|
50
|
+
/** 全页面共用一个观察器,第一个订阅者来时启动,最后一个走时停掉。 */
|
|
51
|
+
function subscribe(listener) {
|
|
52
|
+
listeners.add(listener);
|
|
53
|
+
if (listeners.size === 1 && typeof MutationObserver !== "undefined") {
|
|
54
|
+
const observer = new MutationObserver((records) => {
|
|
55
|
+
if (changesRootScheme(records)) notify();
|
|
56
|
+
});
|
|
57
|
+
observer.observe(document.documentElement, { attributes: true });
|
|
58
|
+
observer.observe(document.head, {
|
|
59
|
+
childList: true,
|
|
60
|
+
subtree: true,
|
|
61
|
+
characterData: true,
|
|
62
|
+
attributes: true,
|
|
63
|
+
attributeFilter: [
|
|
64
|
+
"href",
|
|
65
|
+
"media",
|
|
66
|
+
"disabled",
|
|
67
|
+
"rel",
|
|
68
|
+
"name",
|
|
69
|
+
"content"
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
document.addEventListener("load", onStylesheetLoad, true);
|
|
73
|
+
const stopPreference = typeof window.matchMedia === "function" ? watchMediaQuery("(prefers-color-scheme: dark)", notify) : () => {};
|
|
74
|
+
stopWatching = () => {
|
|
75
|
+
observer.disconnect();
|
|
76
|
+
document.removeEventListener("load", onStylesheetLoad, true);
|
|
77
|
+
stopPreference();
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return () => {
|
|
81
|
+
listeners.delete(listener);
|
|
82
|
+
if (listeners.size === 0) {
|
|
83
|
+
stopWatching?.();
|
|
84
|
+
stopWatching = null;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 页面根画的配色,随页面变化。`watching` 为 false 时不读也不订阅;
|
|
90
|
+
* 挂载前(服务端和 hydration 那一趟)一律是 null,和服务端算得一样。
|
|
91
|
+
*/
|
|
92
|
+
function useRootScheme(watching) {
|
|
93
|
+
const scheme = ref(null);
|
|
94
|
+
const mounted = ref(false);
|
|
95
|
+
let unsubscribe = null;
|
|
96
|
+
function sync() {
|
|
97
|
+
unsubscribe?.();
|
|
98
|
+
unsubscribe = null;
|
|
99
|
+
if (!mounted.value || !watching()) {
|
|
100
|
+
scheme.value = null;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
scheme.value = readRootScheme();
|
|
104
|
+
unsubscribe = subscribe(() => {
|
|
105
|
+
scheme.value = readRootScheme();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
onMounted(() => {
|
|
109
|
+
mounted.value = true;
|
|
110
|
+
});
|
|
111
|
+
watch([mounted, watching], sync, { immediate: true });
|
|
112
|
+
onBeforeUnmount(() => {
|
|
113
|
+
mounted.value = false;
|
|
114
|
+
unsubscribe?.();
|
|
115
|
+
unsubscribe = null;
|
|
116
|
+
});
|
|
117
|
+
return scheme;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/Theme/useResolvedColorMode.ts
|
|
121
|
+
/**
|
|
122
|
+
* 能不能读读者的页面(文档属性、计算样式、系统偏好)。
|
|
123
|
+
*
|
|
124
|
+
* 组件里挂载后才为 true:服务端看不到读者的页面,hydration 那一趟也必须和服务端算得一样,
|
|
125
|
+
* 否则深色页面或页面自己的 CSS 变量会让第一次渲染和服务端 HTML 对不上。
|
|
126
|
+
* 组件外调用时没有挂载这一步,直接为 true。
|
|
127
|
+
*/
|
|
128
|
+
function usePageReadable() {
|
|
129
|
+
const readable = ref(getCurrentInstance() == null);
|
|
130
|
+
if (!readable.value) onMounted(() => {
|
|
131
|
+
readable.value = true;
|
|
132
|
+
});
|
|
133
|
+
return readable;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 主题明确给了 light 或 dark 就用它;否则 `system` 跟随页面:
|
|
137
|
+
* 文档属性、`dark` 类,再到页面根画的配色(根声明了两种或读不到时看系统偏好)。
|
|
138
|
+
* 在强制了浅色或深色的 Theme 里面,`system` 直接跟读者的偏好。
|
|
139
|
+
* 跟随页面的那一半挂载前按服务端的 light 算,见 `usePageReadable`。
|
|
140
|
+
*/
|
|
141
|
+
function useResolvedColorMode(requested, pageReadable = usePageReadable()) {
|
|
142
|
+
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
|
|
143
|
+
const around = inject(systemSchemeKey, null);
|
|
144
|
+
const systemScheme = () => around?.value ?? "root";
|
|
145
|
+
const forced = () => {
|
|
146
|
+
const mode = requested();
|
|
147
|
+
return mode === "light" || mode === "dark";
|
|
148
|
+
};
|
|
149
|
+
const pageScheme = useRootScheme(() => !forced() && systemScheme() === "root");
|
|
150
|
+
return computed(() => {
|
|
151
|
+
const mode = requested();
|
|
152
|
+
if (mode === "light" || mode === "dark") return mode;
|
|
153
|
+
if (!pageReadable.value) return "light";
|
|
154
|
+
if (systemScheme() === "preference") return prefersDark.value ? "dark" : "light";
|
|
155
|
+
return readColorMode(prefersDark.value, pageScheme.value);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
export { useResolvedColorMode as n, useRootScheme as r, usePageReadable as t };
|
|
@@ -4,7 +4,7 @@ import { t as devWarn } from "./useDevWarning-B2fsk2B-.js";
|
|
|
4
4
|
import { t as useAnnounce } from "./announce-GU01Oix2.js";
|
|
5
5
|
import { n as useAsyncSource } from "./useAsyncSource-7GTcK8ep.js";
|
|
6
6
|
import { t as useCombobox } from "./useCombobox-BbDP75hw.js";
|
|
7
|
-
import { t as _sfc_main$3 } from "./Spinner-
|
|
7
|
+
import { t as _sfc_main$3 } from "./Spinner-lLOYfbOY.js";
|
|
8
8
|
import { t as createStillPointerGate } from "./stillPointerGate-DXFzBeMy.js";
|
|
9
9
|
import { i as isOptionAction, n as searchResultMessage, r as OptionAction, t as useOptionActionGrid } from "./useOptionActionGrid-C7ibYM_A.js";
|
|
10
10
|
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryx-vue/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.39.0",
|
|
5
5
|
"description": "Vue 3 components for the unofficial astryx-vue port of Astryx. Not affiliated with Meta.",
|
|
6
6
|
"author": "ShenQingchuan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -493,6 +493,10 @@
|
|
|
493
493
|
"import": "./dist/locale/index.js"
|
|
494
494
|
},
|
|
495
495
|
"./locales/*.json": "./locales/*.json",
|
|
496
|
+
"./palette": {
|
|
497
|
+
"types": "./dist/palette/index.d.ts",
|
|
498
|
+
"import": "./dist/palette/index.js"
|
|
499
|
+
},
|
|
496
500
|
"./package.json": "./package.json",
|
|
497
501
|
"./reset.css": {
|
|
498
502
|
"types": "./css.d.ts",
|
package/dist/context-Cws_tXTr.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//#region src/Theme/context.ts
|
|
2
|
-
const themeContextKey = Symbol("astryx-theme");
|
|
3
|
-
/** Present when this component is already inside a Theme. */
|
|
4
|
-
const themeNestingKey = Symbol("astryx-theme-nesting");
|
|
5
|
-
const mediaThemeKey = Symbol("astryx-media-theme");
|
|
6
|
-
//#endregion
|
|
7
|
-
export { themeContextKey as n, themeNestingKey as r, mediaThemeKey as t };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { t as useMediaQuery } from "./useMediaQuery-BzXGT1Aw.js";
|
|
2
|
-
import { computed, getCurrentInstance, onMounted, ref } from "vue";
|
|
3
|
-
//#region src/Theme/colorMode.ts
|
|
4
|
-
/**
|
|
5
|
-
* Split `light-dark(light, dark)` at the top-level comma.
|
|
6
|
-
* Nested functions such as `rgb()` keep their own commas.
|
|
7
|
-
*/
|
|
8
|
-
function splitLightDark(value) {
|
|
9
|
-
const trimmed = value.trim();
|
|
10
|
-
if (!trimmed.startsWith("light-dark(") || !trimmed.endsWith(")")) return null;
|
|
11
|
-
const body = trimmed.slice(11, -1);
|
|
12
|
-
let depth = 0;
|
|
13
|
-
for (let index = 0; index < body.length; index += 1) {
|
|
14
|
-
const char = body[index];
|
|
15
|
-
if (char === "(") depth += 1;
|
|
16
|
-
else if (char === ")") depth -= 1;
|
|
17
|
-
else if (char === "," && depth === 0) {
|
|
18
|
-
const light = body.slice(0, index).trim();
|
|
19
|
-
const dark = body.slice(index + 1).trim();
|
|
20
|
-
return light && dark ? [light, dark] : null;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Pick the stop `light-dark()` would use for the effective mode.
|
|
27
|
-
* A value that is not `light-dark()` is returned unchanged.
|
|
28
|
-
*/
|
|
29
|
-
function resolveLightDark(value, mode) {
|
|
30
|
-
const parts = splitLightDark(value);
|
|
31
|
-
if (!parts) return value.trim();
|
|
32
|
-
return mode === "dark" ? parts[1] : parts[0];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The mode `light-dark()` is using on the page.
|
|
36
|
-
*
|
|
37
|
-
* An explicit theme mode is handled by the caller. This reads the document
|
|
38
|
-
* attribute, the docs site's `dark` class, then the OS preference that was
|
|
39
|
-
* already measured.
|
|
40
|
-
*/
|
|
41
|
-
function readColorMode(prefersDark) {
|
|
42
|
-
if (typeof document !== "undefined") {
|
|
43
|
-
const attr = document.documentElement.getAttribute("data-astryx-color-mode");
|
|
44
|
-
if (attr === "light" || attr === "dark") return attr;
|
|
45
|
-
if (document.documentElement.classList.contains("dark")) return "dark";
|
|
46
|
-
}
|
|
47
|
-
return prefersDark ? "dark" : "light";
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/Theme/useResolvedColorMode.ts
|
|
51
|
-
/**
|
|
52
|
-
* 能不能读读者的页面(文档属性、计算样式、系统偏好)。
|
|
53
|
-
*
|
|
54
|
-
* 组件里挂载后才为 true:服务端看不到读者的页面,hydration 那一趟也必须和服务端算得一样,
|
|
55
|
-
* 否则深色页面或页面自己的 CSS 变量会让第一次渲染和服务端 HTML 对不上。
|
|
56
|
-
* 组件外调用时没有挂载这一步,直接为 true。
|
|
57
|
-
*/
|
|
58
|
-
function usePageReadable() {
|
|
59
|
-
const readable = ref(getCurrentInstance() == null);
|
|
60
|
-
if (!readable.value) onMounted(() => {
|
|
61
|
-
readable.value = true;
|
|
62
|
-
});
|
|
63
|
-
return readable;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* 主题明确给了 light 或 dark 就用它;否则跟随页面(文档属性、`dark` 类、系统偏好)。
|
|
67
|
-
* 跟随页面的那一半挂载前按服务端的 light 算,见 `usePageReadable`。
|
|
68
|
-
*/
|
|
69
|
-
function useResolvedColorMode(requested, pageReadable = usePageReadable()) {
|
|
70
|
-
const prefersDark = useMediaQuery("(prefers-color-scheme: dark)");
|
|
71
|
-
return computed(() => {
|
|
72
|
-
const mode = requested();
|
|
73
|
-
if (mode === "light" || mode === "dark") return mode;
|
|
74
|
-
return pageReadable.value ? readColorMode(prefersDark.value) : "light";
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
export { useResolvedColorMode as n, resolveLightDark as r, usePageReadable as t };
|
|
@@ -43,8 +43,8 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
|
|
|
43
43
|
onRemove?: ((event: Event) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
size: TokenSize;
|
|
46
|
-
labelHidden: boolean;
|
|
47
46
|
disabled: boolean;
|
|
47
|
+
labelHidden: boolean;
|
|
48
48
|
color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
|
|
49
49
|
removable: boolean;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|