@astryx-vue/core 0.1.1 → 0.2.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-BylcA4vV.js → AlertDialog-ovx4cBjM.js} +1 -1
- package/dist/AppShell/index.d.ts +2 -0
- package/dist/AppShell/index.js +2 -0
- package/dist/AppShell-EiGyPFbA.js +249 -0
- package/dist/AspectRatio/index.d.ts +2 -0
- package/dist/AspectRatio/index.js +2 -0
- package/dist/AspectRatio-Bij7e-tq.js +40 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-BEyrkUtr.js → Calendar-BG7wEsro.js} +1 -1
- package/dist/Carousel/index.d.ts +2 -0
- package/dist/Carousel/index.js +2 -0
- package/dist/Carousel-BTtHkKea.js +363 -0
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-CO3mCs9A.js → Chat-DjNxw5gv.js} +2 -2
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-C86o3XoG.js → CheckboxInput-CMsEE1_4.js} +4 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-BL2sDOWK.js → CheckboxList-EsIEXjK_.js} +2 -2
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-BqwJvw7o.js → Citation-DijdbUUu.js} +2 -2
- package/dist/ClickableCard/index.d.ts +2 -0
- package/dist/ClickableCard/index.js +2 -0
- package/dist/ClickableCard-Bhds4RRe.js +112 -0
- package/dist/Code/index.d.ts +3 -2
- package/dist/Code/index.js +4 -2
- package/dist/Code-yb_KOFtJ.js +299 -0
- package/dist/{CodeBlock-BQdooQy2.js → CodeBlock-CxTb6j9_.js} +8 -2
- package/dist/Collapsible/index.d.ts +2 -2
- package/dist/Collapsible/index.js +2 -2
- package/dist/Collapsible-9MC08X39.js +192 -0
- package/dist/CommandPalette/index.d.ts +2 -0
- package/dist/CommandPalette/index.js +2 -0
- package/dist/CommandPalette-BD2iODF5.js +489 -0
- package/dist/ComplexSelector/index.d.ts +2 -0
- package/dist/ComplexSelector/index.js +2 -0
- package/dist/ComplexSelector-D9iXd5cH.js +293 -0
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-dA-ppaRQ.js → ContextMenu-HS_WqYIg.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-BOIb0zAp.js → DateInput-DE2TN1Rq.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DLcbgUBi.js → DateRangeInput-1bhPGG2s.js} +4 -4
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-RitYX_Yx.js → DateTimeInput-SnPdgk6P.js} +4 -4
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-B0gogrvG.js → DropdownMenu-UJGych6v.js} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-Bhlqgsg4.js → EmptyState-CUJdTYKV.js} +1 -1
- package/dist/Field/index.js +2 -2
- package/dist/{Field-VlTBsIEo.js → Field-8zRxzDHE.js} +11 -3
- package/dist/{FieldLabel-B1NRyQlS.js → FieldLabel-DmmJyX7w.js} +6 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CYvEV503.js → FileInput-BQiwE-GB.js} +3 -3
- package/dist/FormLayout/index.d.ts +2 -0
- package/dist/FormLayout/index.js +2 -0
- package/dist/FormLayout-D47FjiOq.js +40 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +2 -0
- package/dist/{Icon-5MdZQ18k.js → Icon-Dfr4k6-S.js} +1 -1
- package/dist/Layout/index.d.ts +2 -0
- package/dist/Layout/index.js +3 -0
- package/dist/Layout-Bed3kP0M.js +56 -0
- package/dist/LayoutPanel-C34uOq3e.js +358 -0
- package/dist/Lightbox/index.d.ts +2 -0
- package/dist/Lightbox/index.js +2 -0
- package/dist/Lightbox-CshKoB0r.js +384 -0
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-Dnlp8cVx.js → Markdown-D-Ua055V.js} +2 -2
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-DIsqS1Qb.js → MetadataList-sYph_d8Q.js} +1 -1
- package/dist/MobileNav/index.d.ts +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-aUZiDwHm.js → MobileNavToggle-DD9D01aj.js} +19 -12
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BXL6Dqsu.js → MoreMenu-BVrK5kkk.js} +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-Bh8or2S6.js → MultiSelector-DiYov9sF.js} +3 -3
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +1 -1
- package/dist/{NavMenuItem-mzNQESpB.js → NavMenuItem-B-k7olt5.js} +2 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-C3S-4dIu.js → NumberInput-CTYiQxHq.js} +1 -1
- package/dist/Outline/index.d.ts +2 -0
- package/dist/Outline/index.js +2 -0
- package/dist/Outline-DQfEBxlc.js +325 -0
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-Kr4iJrNV.js → OverflowList-BU5VCntl.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-BRStpeSB.js → Pagination-HdhtykeF.js} +2 -2
- package/dist/Popover/index.d.ts +2 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-DS6oTV_j.js → RadioGroup-BqjdSCfJ.js} +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-pwr93I-z.js → RadioList-DI8ujXcT.js} +1 -1
- package/dist/Resizable/index.d.ts +2 -0
- package/dist/Resizable/index.js +2 -0
- package/dist/Resizable-BhSMfO5B.js +261 -0
- package/dist/ScrollableArea/index.d.ts +2 -0
- package/dist/ScrollableArea/index.js +2 -0
- package/dist/ScrollableArea-DQDYjnxO.js +78 -0
- package/dist/Section/index.d.ts +2 -0
- package/dist/Section/index.js +2 -0
- package/dist/Section-C48Wqfc7.js +68 -0
- package/dist/SelectableCard/index.d.ts +2 -0
- package/dist/SelectableCard/index.js +2 -0
- package/dist/SelectableCard-Bj5s_tIN.js +108 -0
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DvEUIVEC.js → Selector-Da-2BO3q.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -1
- package/dist/{SideNav-B7LX4RcP.js → SideNav-B-Om6Bz3.js} +49 -27
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DTnWxtnb.js → Slider-D8h_RKcF.js} +1 -1
- package/dist/Stepper/index.d.ts +2 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Stepper-BZ_8SEZt.js +423 -0
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-CNdnr5TP.js → Switch-SesQzPGZ.js} +4 -2
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +2 -2
- package/dist/TabList-Cnc2Hs1H.js +380 -0
- package/dist/Table/index.d.ts +2 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-D5zWaITo.js → Table-D-LhAy_J.js} +6 -6
- package/dist/Text/index.d.ts +3 -2
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CKd7e3gK.js → Text-BHVghsWo.js} +12 -2
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BL0NuB99.js → TextArea-Cv9UVbzS.js} +5 -3
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-B0IKC7g5.js → TextInput-BasnjVvy.js} +5 -3
- package/dist/Theme/index.d.ts +2 -0
- package/dist/Theme/index.js +2 -0
- package/dist/Theme-BuUiiJNr.js +429 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-DMOgWncm.js → Thumbnail-Dc1UpykG.js} +2 -2
- package/dist/{TimeField-DeQ1ukHl.js → TimeField-C7t9Knq9.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-jb1nLqZk.js → TimeInput-BXxCOY98.js} +2 -2
- package/dist/Timer/index.d.ts +2 -0
- package/dist/Timer/index.js +2 -0
- package/dist/Timer-B7GV6hqd.js +134 -0
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-DrWwVQBL.js → Timestamp-DlZSmgCJ.js} +3 -3
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CV2J94bn.js → Token-wt4e80IM.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DF9r4hTW.js → Tokenizer-nmTqdS9n.js} +3 -3
- 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-BH_s3uap.js → TopNav-notp-mJx.js} +58 -32
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-D9cR-w7r.js → TreeList-s1xBQ0qq.js} +2 -2
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-s4DC1Qem.js → Typeahead-VAuiCurV.js} +3 -3
- package/dist/composables/index.d.ts +3 -2
- package/dist/composables/index.js +5 -2
- package/dist/composables-CVfjp9h4.js +502 -0
- package/dist/context-BjNya0v8.js +19 -0
- package/dist/context-Cfjh8te1.js +29 -0
- package/dist/{context-BshXcNYX.js → context-Dbo22sck.js} +138 -0
- package/dist/context-O2Vb8cJl.js +57 -0
- package/dist/index-1AZ4KZhg.d.ts +96 -0
- package/dist/index-1uRMrk63.d.ts +54 -0
- package/dist/{index-FEy8qFSD.d.ts → index-BHqRH7QW.d.ts} +2 -2
- package/dist/index-BMrggCw-.d.ts +52 -0
- package/dist/{index-BlWLperN.d.ts → index-BUXNRekN.d.ts} +2 -2
- package/dist/index-Bainr_3n.d.ts +31 -0
- package/dist/index-Be1czg3M.d.ts +167 -0
- package/dist/{index-Dbmgcm8a.d.ts → index-BeR-1LgF.d.ts} +2 -0
- package/dist/{index-DXDGk38y.d.ts → index-Bn_odHQ9.d.ts} +1 -1
- package/dist/index-BrJzFA5X.d.ts +38 -0
- package/dist/{index-AkMWQ97a.d.ts → index-BtPZKO20.d.ts} +3 -3
- package/dist/index-Bu0Zd1uw.d.ts +38 -0
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/index-By2mSzUA.d.ts +67 -0
- package/dist/index-C59PdX9L.d.ts +141 -0
- package/dist/{index-BkIgRYGz.d.ts → index-C5p2NeCr.d.ts} +2 -2
- package/dist/{index-CQ9F1f_F.d.ts → index-C6iJwTL0.d.ts} +324 -145
- package/dist/{index-B4OOtNP8.d.ts → index-C7mxUcDR.d.ts} +2 -2
- package/dist/{index-BSRk8MFK.d.ts → index-C8wDPDcP.d.ts} +1 -1
- package/dist/index-CDdRQQF3.d.ts +170 -0
- package/dist/index-COqjznX0.d.ts +47 -0
- package/dist/index-CRizexSC.d.ts +147 -0
- package/dist/{index-Bc0dgVM5.d.ts → index-CTolyeii.d.ts} +4 -4
- package/dist/index-CVn0GBdB.d.ts +115 -0
- package/dist/index-Cm_TiLXU.d.ts +22 -0
- package/dist/index-Cn-sSds-.d.ts +68 -0
- package/dist/index-CsVS37na.d.ts +81 -0
- package/dist/{index-5R_pi3eT.d.ts → index-D-ZuubCK.d.ts} +3 -3
- package/dist/{index-g03bmR4K.d.ts → index-D0TlUOtG.d.ts} +2 -2
- package/dist/index-DA52oIdw.d.ts +171 -0
- package/dist/{index-D3V7yRUP.d.ts → index-DOUEn7V0.d.ts} +4 -4
- package/dist/{index-CCA4R0Mf.d.ts → index-DT9S92sh.d.ts} +31 -6
- package/dist/{index-CR6sUmRT.d.ts → index-DXSs3rwa.d.ts} +3 -107
- package/dist/{index--dh0s8Li.d.ts → index-DfgHJE7H.d.ts} +1 -1
- package/dist/{index-CNcQmDrK.d.ts → index-DoFCm2Q2.d.ts} +71 -0
- package/dist/{index-mQ6EPmaG.d.ts → index-DsyKhauk.d.ts} +78 -9
- package/dist/{index-12ObcW99.d.ts → index-DtjAdYEc.d.ts} +2 -2
- package/dist/{index-Byar3h1e.d.ts → index-HV6W3xCx.d.ts} +1 -1
- package/dist/{index-CsJpQElv.d.ts → index-NzLDrOkk.d.ts} +2 -2
- package/dist/{index-BnNh5Iml.d.ts → index-SMh42NI8.d.ts} +99 -2
- package/dist/{index-Q4gqBSIZ.d.ts → index-fa72tWIU.d.ts} +1 -1
- package/dist/{index-Bqb_Fyju.d.ts → index-jdjcb3Js.d.ts} +2 -2
- package/dist/{index-BhYFxnjV.d.ts → index-kaKBOZSU.d.ts} +2 -2
- package/dist/index-nKlTsNfV.d.ts +42 -0
- package/dist/index.d.ts +84 -63
- package/dist/index.js +118 -91
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/size-BuTzpgnR.d.ts +14 -0
- package/dist/size-xcIqExkS.js +79 -0
- package/dist/syntaxTheme-Bcs1YMF7.d.ts +38 -0
- package/dist/syntaxTheme-ClpWALZX.js +75 -0
- package/dist/types-Bt-lSgYX.d.ts +65 -0
- package/dist/types-DZoEm_DG.d.ts +97 -0
- package/dist/{index-Bovw9_8d.d.ts → types-Db3Owy8Q.d.ts} +1 -36
- package/dist/types-JktRxujg.d.ts +107 -0
- package/dist/useAppShellMobile-DTsyuAJ4.js +19 -0
- package/dist/useClickableContainer-DyNpnSEa.js +112 -0
- package/dist/useResizable-CeESZS1v.d.ts +72 -0
- package/dist/useScrollableArea-DDk_CluT.js +172 -0
- package/package.json +73 -1
- package/styles/app-shell.css +151 -0
- package/styles/aspect-ratio.css +49 -0
- package/styles/card.css +5 -1
- package/styles/carousel.css +120 -0
- package/styles/clickable-card.css +101 -0
- package/styles/collapsible.css +37 -0
- package/styles/command-palette.css +183 -0
- package/styles/complex-selector.css +114 -0
- package/styles/field.css +12 -0
- package/styles/form-layout.css +31 -0
- package/styles/heading.css +25 -19
- package/styles/layout.css +280 -0
- package/styles/lightbox.css +144 -0
- package/styles/media-theme.css +51 -0
- package/styles/outline.css +124 -0
- package/styles/resize-handle.css +128 -0
- package/styles/scrollable-area.css +50 -0
- package/styles/section.css +60 -0
- package/styles/side-nav.css +26 -0
- package/styles/stepper.css +357 -0
- package/styles/tab-menu.css +91 -0
- package/styles/text.css +63 -14
- package/styles/theme.css +29 -0
- package/styles/timer.css +34 -0
- package/styles.css +18 -0
- package/dist/Collapsible-BYg9soTk.js +0 -102
- package/dist/TabList-LV1U4ZD6.js +0 -184
- package/dist/composables-Dq9RS33w.js +0 -111
- package/dist/index-BzqRns96.d.ts +0 -64
- package/dist/index-TnaIHsCS.d.ts +0 -87
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { a as useAstryxMessages } from "./context-Dbo22sck.js";
|
|
2
|
+
import { t as _sfc_main$1 } from "./IconButton-BNQuz9W_.js";
|
|
3
|
+
import { t as _sfc_main$2 } from "./Icon-Dfr4k6-S.js";
|
|
4
|
+
import { Comment, Fragment, Text, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, unref, useSlots, watch, withCtx } from "vue";
|
|
5
|
+
import "../styles/carousel.css";
|
|
6
|
+
//#region src/Carousel/slides.ts
|
|
7
|
+
function flattenSlides(nodes) {
|
|
8
|
+
const slides = [];
|
|
9
|
+
for (const node of nodes) {
|
|
10
|
+
if (node.type === Comment) continue;
|
|
11
|
+
if (node.type === Fragment && Array.isArray(node.children)) {
|
|
12
|
+
slides.push(...flattenSlides(node.children));
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
if (node.type === Text && String(node.children ?? "").trim() === "") continue;
|
|
16
|
+
slides.push(node);
|
|
17
|
+
}
|
|
18
|
+
return slides;
|
|
19
|
+
}
|
|
20
|
+
const CarouselSlideHost = defineComponent({
|
|
21
|
+
name: "CarouselSlideHost",
|
|
22
|
+
props: { node: {
|
|
23
|
+
type: Object,
|
|
24
|
+
required: true
|
|
25
|
+
} },
|
|
26
|
+
setup(props) {
|
|
27
|
+
return () => props.node;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/Carousel/useCarouselScroll.ts
|
|
32
|
+
function prefersReducedMotion() {
|
|
33
|
+
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
34
|
+
}
|
|
35
|
+
function isRtlElement(element) {
|
|
36
|
+
return getComputedStyle(element).direction === "rtl";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Track which logical edges of a horizontal scroller are hiding content.
|
|
40
|
+
* RTL uses the negative `scrollLeft` that Chromium and current Firefox share.
|
|
41
|
+
*/
|
|
42
|
+
function readOverflow(element) {
|
|
43
|
+
const max = element.scrollWidth - element.clientWidth;
|
|
44
|
+
if (!(max > 1)) return {
|
|
45
|
+
hasOverflow: false,
|
|
46
|
+
overflowStart: false,
|
|
47
|
+
overflowEnd: false
|
|
48
|
+
};
|
|
49
|
+
if (isRtlElement(element)) {
|
|
50
|
+
const left = element.scrollLeft;
|
|
51
|
+
return {
|
|
52
|
+
hasOverflow: true,
|
|
53
|
+
overflowStart: left < -1,
|
|
54
|
+
overflowEnd: left > -max + 1
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
hasOverflow: true,
|
|
59
|
+
overflowStart: element.scrollLeft > 1,
|
|
60
|
+
overflowEnd: element.scrollLeft < max - 1
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function useCarouselScroller(scroller) {
|
|
64
|
+
const overflow = ref({
|
|
65
|
+
hasOverflow: false,
|
|
66
|
+
overflowStart: false,
|
|
67
|
+
overflowEnd: false
|
|
68
|
+
});
|
|
69
|
+
let frame = 0;
|
|
70
|
+
let observer = null;
|
|
71
|
+
function measure() {
|
|
72
|
+
const element = scroller.value;
|
|
73
|
+
overflow.value = element == null ? {
|
|
74
|
+
hasOverflow: false,
|
|
75
|
+
overflowStart: false,
|
|
76
|
+
overflowEnd: false
|
|
77
|
+
} : readOverflow(element);
|
|
78
|
+
}
|
|
79
|
+
function schedule() {
|
|
80
|
+
if (typeof requestAnimationFrame !== "function") {
|
|
81
|
+
measure();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (frame !== 0) return;
|
|
85
|
+
frame = requestAnimationFrame(() => {
|
|
86
|
+
frame = 0;
|
|
87
|
+
measure();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function scrollByDirection(direction, hasLoop) {
|
|
91
|
+
const element = scroller.value;
|
|
92
|
+
if (element == null) return;
|
|
93
|
+
const behavior = prefersReducedMotion() ? "auto" : "smooth";
|
|
94
|
+
const rtlSign = isRtlElement(element) ? -1 : 1;
|
|
95
|
+
const state = readOverflow(element);
|
|
96
|
+
if (hasLoop && state.hasOverflow) {
|
|
97
|
+
const atEnd = direction === 1 && !state.overflowEnd;
|
|
98
|
+
const atStart = direction === -1 && !state.overflowStart;
|
|
99
|
+
if (atEnd || atStart) {
|
|
100
|
+
element.scrollBy({
|
|
101
|
+
left: rtlSign * -direction * element.scrollWidth,
|
|
102
|
+
behavior
|
|
103
|
+
});
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const itemWidth = element.firstElementChild?.offsetWidth ?? 0;
|
|
108
|
+
const amount = Math.max(element.clientWidth - itemWidth * .5, itemWidth);
|
|
109
|
+
element.scrollBy({
|
|
110
|
+
left: rtlSign * direction * amount,
|
|
111
|
+
behavior
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function scrollToIndex(index) {
|
|
115
|
+
const element = scroller.value;
|
|
116
|
+
const items = element?.children;
|
|
117
|
+
if (element == null || items == null || items.length === 0) return;
|
|
118
|
+
const target = items[Math.max(0, Math.min(index, items.length - 1))];
|
|
119
|
+
const behavior = prefersReducedMotion() ? "auto" : "smooth";
|
|
120
|
+
const containerRect = element.getBoundingClientRect();
|
|
121
|
+
const itemRect = target.getBoundingClientRect();
|
|
122
|
+
const delta = isRtlElement(element) ? itemRect.right - containerRect.right : itemRect.left - containerRect.left;
|
|
123
|
+
element.scrollBy({
|
|
124
|
+
left: delta,
|
|
125
|
+
behavior
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function onWheel(event) {
|
|
129
|
+
if (!event.shiftKey || event.deltaY === 0 || event.deltaX !== 0) return;
|
|
130
|
+
const element = scroller.value;
|
|
131
|
+
if (element == null || element.scrollWidth <= element.clientWidth) return;
|
|
132
|
+
event.preventDefault();
|
|
133
|
+
element.scrollBy({
|
|
134
|
+
left: event.deltaY,
|
|
135
|
+
behavior: "auto"
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
function onKeyDown(event, hasLoop) {
|
|
139
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
140
|
+
const element = scroller.value;
|
|
141
|
+
if (element == null || element.scrollWidth <= element.clientWidth) return;
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
const rtl = isRtlElement(element);
|
|
144
|
+
scrollByDirection((event.key === "ArrowRight" ? !rtl : rtl) ? 1 : -1, hasLoop);
|
|
145
|
+
}
|
|
146
|
+
onMounted(() => {
|
|
147
|
+
const element = scroller.value;
|
|
148
|
+
if (element == null) return;
|
|
149
|
+
measure();
|
|
150
|
+
element.addEventListener("scroll", schedule, { passive: true });
|
|
151
|
+
element.addEventListener("wheel", onWheel, { passive: false });
|
|
152
|
+
observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
|
|
153
|
+
observer?.observe(element);
|
|
154
|
+
for (const child of element.children) observer?.observe(child);
|
|
155
|
+
});
|
|
156
|
+
onBeforeUnmount(() => {
|
|
157
|
+
const element = scroller.value;
|
|
158
|
+
element?.removeEventListener("scroll", schedule);
|
|
159
|
+
element?.removeEventListener("wheel", onWheel);
|
|
160
|
+
observer?.disconnect();
|
|
161
|
+
if (frame !== 0 && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frame);
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
measure,
|
|
165
|
+
onKeyDown,
|
|
166
|
+
overflow,
|
|
167
|
+
scrollByDirection,
|
|
168
|
+
scrollToIndex
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/Carousel/Carousel.vue
|
|
173
|
+
const _hoisted_1 = ["aria-label"];
|
|
174
|
+
const _hoisted_2 = [
|
|
175
|
+
"data-gap",
|
|
176
|
+
"data-padding",
|
|
177
|
+
"data-snap",
|
|
178
|
+
"data-edge-fade",
|
|
179
|
+
"data-fade"
|
|
180
|
+
];
|
|
181
|
+
const _hoisted_3 = ["aria-label"];
|
|
182
|
+
const _hoisted_4 = {
|
|
183
|
+
key: 0,
|
|
184
|
+
class: "astryx-carousel__controls"
|
|
185
|
+
};
|
|
186
|
+
const _hoisted_5 = ["data-hidden"];
|
|
187
|
+
const _hoisted_6 = ["data-hidden"];
|
|
188
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
189
|
+
name: "AstryxCarousel",
|
|
190
|
+
inheritAttrs: false,
|
|
191
|
+
__name: "Carousel",
|
|
192
|
+
props: {
|
|
193
|
+
gap: { default: 1 },
|
|
194
|
+
hasButtons: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: true
|
|
197
|
+
},
|
|
198
|
+
hasEdgeFade: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: true
|
|
201
|
+
},
|
|
202
|
+
hasLoop: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
default: false
|
|
205
|
+
},
|
|
206
|
+
hasSnap: {
|
|
207
|
+
type: Boolean,
|
|
208
|
+
default: false
|
|
209
|
+
},
|
|
210
|
+
padding: {},
|
|
211
|
+
label: {}
|
|
212
|
+
},
|
|
213
|
+
setup(__props, { expose: __expose }) {
|
|
214
|
+
const props = __props;
|
|
215
|
+
const slots = useSlots();
|
|
216
|
+
const messages = useAstryxMessages();
|
|
217
|
+
const scroller = ref(null);
|
|
218
|
+
const startButton = ref(null);
|
|
219
|
+
const endButton = ref(null);
|
|
220
|
+
const focusedNav = ref(null);
|
|
221
|
+
const { measure, onKeyDown, overflow, scrollByDirection, scrollToIndex } = useCarouselScroller(scroller);
|
|
222
|
+
const slides = computed(() => flattenSlides(slots.default?.() ?? []));
|
|
223
|
+
const regionLabel = computed(() => props.label ?? messages.value.carousel.label);
|
|
224
|
+
const canScrollStart = computed(() => props.hasLoop && overflow.value.hasOverflow ? true : overflow.value.overflowStart);
|
|
225
|
+
const canScrollEnd = computed(() => props.hasLoop && overflow.value.hasOverflow ? true : overflow.value.overflowEnd);
|
|
226
|
+
const fade = computed(() => {
|
|
227
|
+
if (!props.hasEdgeFade) return "none";
|
|
228
|
+
if (props.hasLoop && overflow.value.hasOverflow || overflow.value.overflowStart && overflow.value.overflowEnd) return "both";
|
|
229
|
+
if (overflow.value.overflowStart) return "start";
|
|
230
|
+
if (overflow.value.overflowEnd) return "end";
|
|
231
|
+
return "none";
|
|
232
|
+
});
|
|
233
|
+
const spacingName = computed(() => String(props.gap).replace(".", "-"));
|
|
234
|
+
const paddingName = computed(() => props.padding == null ? void 0 : String(props.padding).replace(".", "-"));
|
|
235
|
+
const scrollerStyle = computed(() => {
|
|
236
|
+
const style = { "--astryx-carousel-gap": `var(--astryx-spacing-${spacingName.value}, ${props.gap * 4}px)` };
|
|
237
|
+
if (paddingName.value != null) style["--astryx-carousel-padding"] = `var(--astryx-spacing-${paddingName.value})`;
|
|
238
|
+
return style;
|
|
239
|
+
});
|
|
240
|
+
let previousCanScroll = null;
|
|
241
|
+
watch([canScrollStart, canScrollEnd], async ([start, end]) => {
|
|
242
|
+
const previous = previousCanScroll;
|
|
243
|
+
previousCanScroll = {
|
|
244
|
+
start,
|
|
245
|
+
end
|
|
246
|
+
};
|
|
247
|
+
const side = focusedNav.value;
|
|
248
|
+
if (previous == null || side == null) return;
|
|
249
|
+
if (!(side === "start" ? previous.start : previous.end) || (side === "start" ? start : end)) return;
|
|
250
|
+
await nextTick();
|
|
251
|
+
const pressed = side === "start" ? startButton.value : endButton.value;
|
|
252
|
+
if (pressed == null) return;
|
|
253
|
+
const active = pressed.ownerDocument.activeElement;
|
|
254
|
+
if (active !== pressed && active !== pressed.ownerDocument.body) return;
|
|
255
|
+
const opposite = side === "start" ? endButton.value : startButton.value;
|
|
256
|
+
const receiver = opposite != null && !opposite.disabled ? opposite : scroller.value;
|
|
257
|
+
if (receiver == null) return;
|
|
258
|
+
focusedNav.value = null;
|
|
259
|
+
receiver.focus({ preventScroll: true });
|
|
260
|
+
});
|
|
261
|
+
function buttonElement(target) {
|
|
262
|
+
return target instanceof HTMLButtonElement ? target : null;
|
|
263
|
+
}
|
|
264
|
+
function onStartFocus(event) {
|
|
265
|
+
startButton.value = buttonElement(event.currentTarget);
|
|
266
|
+
focusedNav.value = "start";
|
|
267
|
+
}
|
|
268
|
+
function onEndFocus(event) {
|
|
269
|
+
endButton.value = buttonElement(event.currentTarget);
|
|
270
|
+
focusedNav.value = "end";
|
|
271
|
+
}
|
|
272
|
+
function onNavBlur(event) {
|
|
273
|
+
const button = buttonElement(event.currentTarget);
|
|
274
|
+
if (button != null && !button.disabled) focusedNav.value = null;
|
|
275
|
+
}
|
|
276
|
+
function scrollNext() {
|
|
277
|
+
scrollByDirection(1, props.hasLoop);
|
|
278
|
+
}
|
|
279
|
+
function scrollPrev() {
|
|
280
|
+
scrollByDirection(-1, props.hasLoop);
|
|
281
|
+
}
|
|
282
|
+
__expose({
|
|
283
|
+
canScrollNext: () => props.hasLoop ? overflow.value.hasOverflow : overflow.value.overflowEnd,
|
|
284
|
+
canScrollPrev: () => props.hasLoop ? overflow.value.hasOverflow : overflow.value.overflowStart,
|
|
285
|
+
scrollNext,
|
|
286
|
+
scrollPrev,
|
|
287
|
+
scrollTo: scrollToIndex
|
|
288
|
+
});
|
|
289
|
+
watch(slides, () => {
|
|
290
|
+
nextTick(measure);
|
|
291
|
+
});
|
|
292
|
+
return (_ctx, _cache) => {
|
|
293
|
+
return openBlock(), createElementBlock("div", {
|
|
294
|
+
class: normalizeClass(["astryx-carousel", _ctx.$attrs.class]),
|
|
295
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
|
296
|
+
role: "region",
|
|
297
|
+
"aria-roledescription": "carousel",
|
|
298
|
+
"aria-label": regionLabel.value,
|
|
299
|
+
"data-component": "carousel"
|
|
300
|
+
}, [
|
|
301
|
+
createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- tabindex 把滚动区放进 Tab 序列;左右方向键只滚动这一行。 "),
|
|
302
|
+
createElementVNode("div", {
|
|
303
|
+
ref_key: "scroller",
|
|
304
|
+
ref: scroller,
|
|
305
|
+
class: "astryx-carousel__scroller",
|
|
306
|
+
"data-gap": __props.gap,
|
|
307
|
+
"data-padding": __props.padding,
|
|
308
|
+
"data-snap": __props.hasSnap || void 0,
|
|
309
|
+
"data-edge-fade": __props.hasEdgeFade || void 0,
|
|
310
|
+
"data-fade": fade.value,
|
|
311
|
+
tabindex: "0",
|
|
312
|
+
style: normalizeStyle(scrollerStyle.value),
|
|
313
|
+
onKeydown: _cache[0] || (_cache[0] = ($event) => unref(onKeyDown)($event, __props.hasLoop))
|
|
314
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(slides.value, (slide, index) => {
|
|
315
|
+
return openBlock(), createElementBlock("div", {
|
|
316
|
+
key: index,
|
|
317
|
+
class: "astryx-carousel__item",
|
|
318
|
+
role: "group",
|
|
319
|
+
"aria-roledescription": "slide",
|
|
320
|
+
"aria-label": unref(messages).carousel.slide(index + 1, slides.value.length)
|
|
321
|
+
}, [createVNode(unref(CarouselSlideHost), { node: slide }, null, 8, ["node"])], 8, _hoisted_3);
|
|
322
|
+
}), 128))], 44, _hoisted_2),
|
|
323
|
+
__props.hasButtons ? (openBlock(), createElementBlock("div", _hoisted_4, [createElementVNode("div", {
|
|
324
|
+
class: "astryx-carousel__pill astryx-carousel__pill--start",
|
|
325
|
+
"data-hidden": !canScrollStart.value || void 0
|
|
326
|
+
}, [createVNode(_sfc_main$1, {
|
|
327
|
+
variant: "ghost",
|
|
328
|
+
size: "sm",
|
|
329
|
+
label: unref(messages).carousel.scrollLeft,
|
|
330
|
+
"is-disabled": !canScrollStart.value,
|
|
331
|
+
onFocus: onStartFocus,
|
|
332
|
+
onBlur: onNavBlur,
|
|
333
|
+
onClick: scrollPrev
|
|
334
|
+
}, {
|
|
335
|
+
default: withCtx(() => [createVNode(_sfc_main$2, {
|
|
336
|
+
icon: "chevronLeft",
|
|
337
|
+
size: "xsm"
|
|
338
|
+
})]),
|
|
339
|
+
_: 1
|
|
340
|
+
}, 8, ["label", "is-disabled"])], 8, _hoisted_5), createElementVNode("div", {
|
|
341
|
+
class: "astryx-carousel__pill astryx-carousel__pill--end",
|
|
342
|
+
"data-hidden": !canScrollEnd.value || void 0
|
|
343
|
+
}, [createVNode(_sfc_main$1, {
|
|
344
|
+
variant: "ghost",
|
|
345
|
+
size: "sm",
|
|
346
|
+
label: unref(messages).carousel.scrollRight,
|
|
347
|
+
"is-disabled": !canScrollEnd.value,
|
|
348
|
+
onFocus: onEndFocus,
|
|
349
|
+
onBlur: onNavBlur,
|
|
350
|
+
onClick: scrollNext
|
|
351
|
+
}, {
|
|
352
|
+
default: withCtx(() => [createVNode(_sfc_main$2, {
|
|
353
|
+
icon: "chevronRight",
|
|
354
|
+
size: "xsm"
|
|
355
|
+
})]),
|
|
356
|
+
_: 1
|
|
357
|
+
}, 8, ["label", "is-disabled"])], 8, _hoisted_6)])) : createCommentVNode("v-if", true)
|
|
358
|
+
], 14, _hoisted_1);
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
//#endregion
|
|
363
|
+
export { _sfc_main as t };
|
package/dist/Chat/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as _sfc_main$6, c as _sfc_main$3, d as useChatLayoutContext, f as useChatListContext, i as _sfc_main$7, l as _sfc_main$2, m as _sfc_main$1, n as _sfc_main$9, o as _sfc_main$5, p as useChatMessageContext, r as _sfc_main$8, s as _sfc_main$4, t as _sfc_main$10, u as _sfc_main } from "../Chat-
|
|
1
|
+
import { a as _sfc_main$6, c as _sfc_main$3, d as useChatLayoutContext, f as useChatListContext, i as _sfc_main$7, l as _sfc_main$2, m as _sfc_main$1, n as _sfc_main$9, o as _sfc_main$5, p as useChatMessageContext, r as _sfc_main$8, s as _sfc_main$4, t as _sfc_main$10, u as _sfc_main } from "../Chat-DjNxw5gv.js";
|
|
2
2
|
export { _sfc_main as ChatLayout, _sfc_main$1 as ChatLayoutScrollButton, _sfc_main$2 as ChatMessage, _sfc_main$3 as ChatMessageBubble, _sfc_main$4 as ChatMessageList, _sfc_main$5 as ChatMessageMetadata, _sfc_main$6 as ChatReasoning, _sfc_main$7 as ChatSystemMessage, _sfc_main$8 as ChatToolCalls, _sfc_main$9 as ChatTypingIndicator, _sfc_main$10 as ChatUnreadDivider, useChatLayoutContext, useChatListContext, useChatMessageContext };
|
|
@@ -2,9 +2,9 @@ import { t as _sfc_main$14 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
|
2
2
|
import { t as _sfc_main$15 } from "./Button-DrqeomlE.js";
|
|
3
3
|
import { t as useAnnounce } from "./announce-Cnio10Wk.js";
|
|
4
4
|
import { r as useChatNewMessages, t as useChatStreamScroll } from "./useChatStreamScroll-oDfybEos.js";
|
|
5
|
+
import { a as useAstryxMessages, i as useAstryxLocale } from "./context-Dbo22sck.js";
|
|
5
6
|
import { t as _sfc_main$16 } from "./Badge-Ba0EwsTj.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as _sfc_main$17 } from "./Icon-5MdZQ18k.js";
|
|
7
|
+
import { t as _sfc_main$17 } from "./Icon-Dfr4k6-S.js";
|
|
8
8
|
import { t as _sfc_main$18 } from "./Spinner-9cYUCnDy.js";
|
|
9
9
|
import { t as _sfc_main$19 } from "./Divider-BtwnL18I.js";
|
|
10
10
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, ref, renderList, renderSlot, toDisplayString, unref, useId, useModel, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _r as CheckboxInputSlots, fr as _default, gr as CheckboxInputProps, hr as CheckboxInputEmits, mr as CheckboxInputChangeEvent, pr as CheckboxInputChangeAction, vr as CheckboxValue } from "../index-C6iJwTL0.js";
|
|
2
2
|
export { _default as CheckboxInput, type CheckboxInputChangeAction, type CheckboxInputChangeEvent, type CheckboxInputEmits, type CheckboxInputProps, type CheckboxInputSlots, type CheckboxValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../CheckboxInput-
|
|
1
|
+
import { t as _sfc_main } from "../CheckboxInput-CMsEE1_4.js";
|
|
2
2
|
export { _sfc_main as CheckboxInput };
|
|
@@ -2,7 +2,8 @@ import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
|
2
2
|
import { n as useButtonTooltip } from "./Button-DrqeomlE.js";
|
|
3
3
|
import { t as _sfc_main$2 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
4
|
import { t as _sfc_main$3 } from "./CheckboxIndicator-DdJmksHt.js";
|
|
5
|
-
import {
|
|
5
|
+
import { i as useAriaRequired } from "./context-Cfjh8te1.js";
|
|
6
|
+
import { t as _sfc_main$4 } from "./FieldLabel-DmmJyX7w.js";
|
|
6
7
|
import { t as _sfc_main$5 } from "./FieldStatus-MjY19ERl.js";
|
|
7
8
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, renderSlot, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
8
9
|
import "../styles/button.css";
|
|
@@ -122,6 +123,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
122
123
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
123
124
|
const props = __props;
|
|
124
125
|
const emit = __emit;
|
|
126
|
+
const ariaRequired = useAriaRequired(props);
|
|
125
127
|
const model = useModel(__props, "modelValue");
|
|
126
128
|
const attrs = useAttrs();
|
|
127
129
|
const input = useTemplateRef("input");
|
|
@@ -247,7 +249,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
247
249
|
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
248
250
|
"aria-readonly": __props.isReadOnly || void 0,
|
|
249
251
|
"aria-busy": busy.value || void 0,
|
|
250
|
-
"aria-required":
|
|
252
|
+
"aria-required": unref(ariaRequired),
|
|
251
253
|
"aria-invalid": __props.status?.type === "error" ? true : inputAttrs()["aria-invalid"],
|
|
252
254
|
onClick: click,
|
|
253
255
|
onChange: change,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cr as CheckboxListEmits, dr as CheckboxListProps, lr as CheckboxListItemEmits, or as _default$1, sr as _default, ur as CheckboxListItemProps } from "../index-C6iJwTL0.js";
|
|
2
2
|
export { _default as CheckboxList, type CheckboxListEmits, _default$1 as CheckboxListItem, type CheckboxListItemEmits, type CheckboxListItemProps, type CheckboxListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _sfc_main, t as _sfc_main$1 } from "../CheckboxList-
|
|
1
|
+
import { n as _sfc_main, t as _sfc_main$1 } from "../CheckboxList-EsIEXjK_.js";
|
|
2
2
|
export { _sfc_main as CheckboxList, _sfc_main$1 as CheckboxListItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as _sfc_main$2 } from "./CheckboxInput-
|
|
2
|
-
import { t as _sfc_main$3 } from "./Field-
|
|
1
|
+
import { t as _sfc_main$2 } from "./CheckboxInput-CMsEE1_4.js";
|
|
2
|
+
import { t as _sfc_main$3 } from "./Field-8zRxzDHE.js";
|
|
3
3
|
import { r as useItemDescriptionId } from "./Item-C1z6gXn8.js";
|
|
4
4
|
import { n as _sfc_main$4, t as _sfc_main$5 } from "./ListItem-pGxvn6QJ.js";
|
|
5
5
|
import { computed, createBlock, createElementVNode, createSlots, createVNode, defineComponent, inject, mergeModels, openBlock, provide, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef, withCtx } from "vue";
|
package/dist/Citation/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Citation-
|
|
1
|
+
import { t as _sfc_main } from "../Citation-DijdbUUu.js";
|
|
2
2
|
export { _sfc_main as Citation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as useAstryxMessages } from "./context-
|
|
2
|
-
import { t as _sfc_main$1 } from "./Icon-
|
|
1
|
+
import { a as useAstryxMessages } from "./context-Dbo22sck.js";
|
|
2
|
+
import { t as _sfc_main$1 } from "./Icon-Dfr4k6-S.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, openBlock, toDisplayString, useTemplateRef } from "vue";
|
|
4
4
|
import "../styles/citation.css";
|
|
5
5
|
//#region src/Citation/Citation.vue
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
|
+
import { n as useClickableContainer } from "./useClickableContainer-DyNpnSEa.js";
|
|
3
|
+
import { t as _sfc_main$2 } from "./Card-HAjZQg2s.js";
|
|
4
|
+
import { computed, createBlock, defineComponent, openBlock, renderSlot, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import "../styles/clickable-card.css";
|
|
6
|
+
//#region src/ClickableCard/ClickableCard.vue
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
|
+
name: "AstryxClickableCard",
|
|
9
|
+
__name: "ClickableCard",
|
|
10
|
+
props: {
|
|
11
|
+
label: {},
|
|
12
|
+
href: {},
|
|
13
|
+
target: {},
|
|
14
|
+
isDisabled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
variant: { default: "default" },
|
|
19
|
+
elevation: { default: "none" },
|
|
20
|
+
padding: {},
|
|
21
|
+
width: {},
|
|
22
|
+
height: {},
|
|
23
|
+
maxWidth: {}
|
|
24
|
+
},
|
|
25
|
+
emits: ["click"],
|
|
26
|
+
setup(__props, { emit: __emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const emit = __emit;
|
|
29
|
+
const cardRef = useTemplateRef("card");
|
|
30
|
+
const interactiveRef = useTemplateRef("interactive");
|
|
31
|
+
const containerRef = computed(() => cardRef.value?.element ?? null);
|
|
32
|
+
const controlRef = computed(() => interactiveRef.value?.element ?? null);
|
|
33
|
+
const handlers = useClickableContainer({
|
|
34
|
+
containerRef,
|
|
35
|
+
interactiveRef: controlRef,
|
|
36
|
+
get disabled() {
|
|
37
|
+
return props.isDisabled;
|
|
38
|
+
},
|
|
39
|
+
get href() {
|
|
40
|
+
return props.href;
|
|
41
|
+
},
|
|
42
|
+
get target() {
|
|
43
|
+
return props.target;
|
|
44
|
+
},
|
|
45
|
+
onClick(event) {
|
|
46
|
+
emit("click", event);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
function onSurfaceClick(event) {
|
|
50
|
+
if (props.isDisabled) return;
|
|
51
|
+
handlers.onClick(event);
|
|
52
|
+
}
|
|
53
|
+
function onSurfaceMouseUp(event) {
|
|
54
|
+
if (props.isDisabled) return;
|
|
55
|
+
handlers.onMouseUp(event);
|
|
56
|
+
}
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
59
|
+
ref: "card",
|
|
60
|
+
class: "astryx-clickable-card",
|
|
61
|
+
"data-disabled": __props.isDisabled || void 0,
|
|
62
|
+
elevation: __props.elevation,
|
|
63
|
+
height: __props.height,
|
|
64
|
+
"max-width": __props.maxWidth,
|
|
65
|
+
padding: __props.padding,
|
|
66
|
+
variant: __props.variant,
|
|
67
|
+
width: __props.width,
|
|
68
|
+
onClick: onSurfaceClick,
|
|
69
|
+
onMouseup: onSurfaceMouseUp
|
|
70
|
+
}, {
|
|
71
|
+
default: withCtx(() => [__props.href ? (openBlock(), createBlock(_sfc_main$1, {
|
|
72
|
+
key: 0,
|
|
73
|
+
ref: "interactive",
|
|
74
|
+
as: "a",
|
|
75
|
+
"aria-disabled": __props.isDisabled || void 0,
|
|
76
|
+
"aria-label": __props.label,
|
|
77
|
+
href: __props.isDisabled ? void 0 : __props.href,
|
|
78
|
+
tabindex: __props.isDisabled ? -1 : void 0,
|
|
79
|
+
target: __props.target
|
|
80
|
+
}, null, 8, [
|
|
81
|
+
"aria-disabled",
|
|
82
|
+
"aria-label",
|
|
83
|
+
"href",
|
|
84
|
+
"tabindex",
|
|
85
|
+
"target"
|
|
86
|
+
])) : (openBlock(), createBlock(_sfc_main$1, {
|
|
87
|
+
key: 1,
|
|
88
|
+
ref: "interactive",
|
|
89
|
+
as: "button",
|
|
90
|
+
"aria-label": __props.label,
|
|
91
|
+
disabled: __props.isDisabled,
|
|
92
|
+
type: "button",
|
|
93
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event))
|
|
94
|
+
}, null, 8, ["aria-label", "disabled"])), renderSlot(_ctx.$slots, "default")]),
|
|
95
|
+
_: 3
|
|
96
|
+
}, 8, [
|
|
97
|
+
"data-disabled",
|
|
98
|
+
"elevation",
|
|
99
|
+
"height",
|
|
100
|
+
"max-width",
|
|
101
|
+
"padding",
|
|
102
|
+
"variant",
|
|
103
|
+
"width"
|
|
104
|
+
]);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/ClickableCard/index.ts
|
|
110
|
+
var ClickableCard_default = _sfc_main;
|
|
111
|
+
//#endregion
|
|
112
|
+
export { _sfc_main as n, ClickableCard_default as t };
|
package/dist/Code/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SyntaxTokenKey, c as githubDark, i as SyntaxThemeTokens, n as SyntaxThemeDefinition, o as SyntaxTokenValue, r as SyntaxThemeInput, s as defineSyntaxTheme, t as SYNTAX_TOKEN_KEYS } from "../syntaxTheme-Bcs1YMF7.js";
|
|
2
|
+
import { A as CodeBlockTokenizer, C as applyHighlightRanges, D as CodeBlockEmits, E as CodeBlockContainer, F as CodeSlots, I as SyntaxToken, L as TokenLine, M as CodeHighlightMode, N as CodeProps, O as CodeBlockProps, P as CodeSize, S as HIGHLIGHTED_TOKEN_TYPES, T as _default, _ as oneDarkPro, a as tokenize, b as tokyoNight, c as allSyntaxPresets, d as darkSyntaxPresets, f as dracula, g as nord, h as monokai, i as flatTokensToLines, j as CodeColor, k as CodeBlockSize, l as catppuccinLatte, m as lightSyntaxPresets, n as useSyntaxTheme, o as tokenizeAsync, p as githubLight, r as SYNC_TOKENIZE_THRESHOLD, s as _default$2, t as UseSyntaxThemeReturn, u as catppuccinMocha, v as oneLight, w as _default$1, x as tokyoNightLight, y as solarizedLight } from "../index-DsyKhauk.js";
|
|
2
3
|
import { n as UseClipboardReturn, r as useClipboard, t as UseClipboardOptions } from "../useClipboard-CU-kfqeJ.js";
|
|
3
|
-
export { _default as Code, _default$1 as CodeBlock, type CodeBlockContainer, type CodeBlockEmits, type CodeBlockProps, type CodeBlockSize, type CodeBlockTokenizer, type CodeColor, type CodeHighlightMode, type CodeProps, type CodeSize, type CodeSlots, type UseClipboardOptions as CopyToClipboardOptions, type UseClipboardReturn as CopyToClipboardReturn, HIGHLIGHTED_TOKEN_TYPES, SYNC_TOKENIZE_THRESHOLD, type SyntaxToken, type TokenLine, applyHighlightRanges, flatTokensToLines, tokenize, tokenizeAsync, useClipboard as useCopyToClipboard };
|
|
4
|
+
export { _default as Code, _default$1 as CodeBlock, type CodeBlockContainer, type CodeBlockEmits, type CodeBlockProps, type CodeBlockSize, type CodeBlockTokenizer, type CodeColor, type CodeHighlightMode, type CodeProps, type CodeSize, type CodeSlots, type UseClipboardOptions as CopyToClipboardOptions, type UseClipboardReturn as CopyToClipboardReturn, HIGHLIGHTED_TOKEN_TYPES, SYNC_TOKENIZE_THRESHOLD, SYNTAX_TOKEN_KEYS, _default$2 as SyntaxTheme, type SyntaxThemeDefinition, type SyntaxThemeInput, type SyntaxThemeTokens, type SyntaxToken, type SyntaxTokenKey, type SyntaxTokenValue, type TokenLine, type UseSyntaxThemeReturn, allSyntaxPresets, applyHighlightRanges, catppuccinLatte, catppuccinMocha, darkSyntaxPresets, defineSyntaxTheme, dracula, flatTokensToLines, githubDark, githubLight, lightSyntaxPresets, monokai, nord, oneDarkPro, oneLight, solarizedLight, tokenize, tokenizeAsync, tokyoNight, tokyoNightLight, useClipboard as useCopyToClipboard, useSyntaxTheme };
|
package/dist/Code/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { t as useClipboard } from "../useClipboard-BDfbEsWd.js";
|
|
2
|
-
import { a as tokenizeAsync, c as _sfc_main, i as tokenize, n as SYNC_TOKENIZE_THRESHOLD, o as HIGHLIGHTED_TOKEN_TYPES, r as flatTokensToLines, s as applyHighlightRanges, t as _sfc_main$1 } from "../CodeBlock-
|
|
3
|
-
|
|
2
|
+
import { a as tokenizeAsync, c as _sfc_main, i as tokenize, n as SYNC_TOKENIZE_THRESHOLD, o as HIGHLIGHTED_TOKEN_TYPES, r as flatTokensToLines, s as applyHighlightRanges, t as _sfc_main$1 } from "../CodeBlock-CxTb6j9_.js";
|
|
3
|
+
import { n as defineSyntaxTheme, r as githubDark, t as SYNTAX_TOKEN_KEYS } from "../syntaxTheme-ClpWALZX.js";
|
|
4
|
+
import { a as catppuccinMocha, c as githubLight, d as nord, f as oneDarkPro, g as tokyoNightLight, h as tokyoNight, i as catppuccinLatte, l as lightSyntaxPresets, m as solarizedLight, n as _sfc_main$2, o as darkSyntaxPresets, p as oneLight, r as allSyntaxPresets, s as dracula, t as useSyntaxTheme, u as monokai } from "../Code-yb_KOFtJ.js";
|
|
5
|
+
export { _sfc_main as Code, _sfc_main$1 as CodeBlock, HIGHLIGHTED_TOKEN_TYPES, SYNC_TOKENIZE_THRESHOLD, SYNTAX_TOKEN_KEYS, _sfc_main$2 as SyntaxTheme, allSyntaxPresets, applyHighlightRanges, catppuccinLatte, catppuccinMocha, darkSyntaxPresets, defineSyntaxTheme, dracula, flatTokensToLines, githubDark, githubLight, lightSyntaxPresets, monokai, nord, oneDarkPro, oneLight, solarizedLight, tokenize, tokenizeAsync, tokyoNight, tokyoNightLight, useClipboard as useCopyToClipboard, useSyntaxTheme };
|