@astryx-vue/core 0.36.1 → 0.37.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-C4oB89RV.js → AlertDialog-DwITRN1M.js} +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-CU12SF6s.js → AppShell-ClZ2Y8cu.js} +2 -2
- 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/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-DCLOhzZP.js → BottomSheet-CDxV1Rkx.js} +3 -3
- package/dist/BottomSheet-Cr6FacYP.js +1853 -0
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-BfjWIfgO.js → Breadcrumbs-DaxgM0-F.js} +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-f9HzZe5y.js → Chat-BRtDKajd.js} +230 -12
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-Dxp-BWv-.js → Collapsible-DfVihLCR.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-PyPfsPLY.js → CommandPalette-CWaKVNGZ.js} +2 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-B07QdP_p.js → ComplexSelector-D2QRdM57.js} +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-B6NH9NBS.js → ContextMenu-D-G53u7B.js} +4 -4
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-TrPijW9a.js → DateInput-BHSp4fZS.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-bKPzsoHA.js → DateRangeInput-DP1QWK_6.js} +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-5jZPqFu2.js → DateTimeInput-Bgx9lgWb.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-CDAicnpK.js → Dialog-DCKT1dWC.js} +2 -1
- package/dist/{Dialog-dm_qZ9NI.js → Dialog-DRQrtKHT.js} +5 -82
- package/dist/{DialogHeader-CQfcOIfF.js → DialogHeader-C3Mc580J.js} +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/Drawer-CnFTUjln.js +422 -0
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-C-SLsVSO.js → DropdownMenu-DU_Rw88D.js} +4 -4
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-CpFgVnlQ.js → Layout-BDS2ZN6C.js} +1 -1
- package/dist/{LayoutPanel-Dhm0Hubb.js → LayoutPanel-D56PBM4I.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-BSzyDGkK.js → Lightbox-CnTXrgq6.js} +2 -2
- 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/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-C1_IinAo.js → MobileNavToggle-CjlgmcSf.js} +2 -2
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-DbYO8V7N.js → MoreMenu-CGTbwTyw.js} +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-CthCkW-w.js → MultiSelector-DUQMNBoZ.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenu-g8ZVhLMG.js → NavMenu-BflnhBtX.js} +1 -1
- package/dist/{NavMenuItem-DJg9jfHm.js → NavMenuItem-CrFrczWe.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-BM52uE72.js → NumberInput-vWUcgJU8.js} +2 -0
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-nW6GCEsY.js → OverflowList-D9Ua6e3-.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DFZivDZZ.js → Pagination-DBikmHyn.js} +3 -3
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-IvZGq1LC.js → Popover-CTCWhA_K.js} +3 -3
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CQdyB8_N.js → PowerSearch-CTNFHNnr.js} +10 -10
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +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-icOfE3ja.js → Selector-BvxQXUYr.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-ZZ5zCQz0.js → SideNav-D8jQrwtL.js} +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-C-HBxmkc.js → TabList-DjRutwar.js} +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-aMqVf_iH.js → Table-3GiSElIS.js} +8 -8
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-YJtL9Fi6.js → TextArea-BtBC4IoD.js} +2 -0
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-CuPxOApN.js → TextInput-cotkU2bC.js} +2 -0
- package/dist/{TimeField-DNxPI2cM.js → TimeField-BYuUKUNq.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-PJdyNX0T.js → TimeInput-Bqo_oHMl.js} +1 -1
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-W6aKxXlF.js → Toast-BSay0eZw.js} +14 -6
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-CdyoUaoZ.js → Tokenizer-D-wBxbBE.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-CxAm5bN5.js → TopNav-D7jH9iwk.js} +2 -2
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/{accessibleName-CN1vKvS_.js → accessibleName-CHrrgpAy.js} +1 -1
- package/dist/composables/index.js +4 -4
- package/dist/{focusLeaving-DMkbxFkF.js → focusLeaving-BbZ69DYV.js} +1 -1
- package/dist/{focusReturn-DfZS7TCp.js → focusReturn-BeSRm0xD.js} +34 -3
- package/dist/{index-ZXrvTM3A.d.ts → index-0RIgvtdm.d.ts} +2 -2
- package/dist/{index-tdOyqA_U.d.ts → index-Ak1b0V24.d.ts} +1 -1
- package/dist/{index-DYabo8TI.d.ts → index-B44fLswd.d.ts} +2 -2
- package/dist/{index-B27k2e77.d.ts → index-B7Rd2RuL.d.ts} +44 -32
- package/dist/{index-X4S7_dmq.d.ts → index-BA8exXNP.d.ts} +1 -1
- package/dist/{index-BgT6mH3U.d.ts → index-BB9acgK8.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-x7g2WHHx.d.ts → index-BhpRhww0.d.ts} +3 -3
- package/dist/{index-rr6Rns7h.d.ts → index-CGRtGORf.d.ts} +1 -1
- package/dist/{index-C4S65SAW.d.ts → index-CKnr0JlT.d.ts} +1 -1
- package/dist/{index-CdvmnNMH.d.ts → index-COgrQZIL.d.ts} +1 -1
- package/dist/{index-CBOv5j3c.d.ts → index-CbA8rR_b.d.ts} +1 -1
- package/dist/{index-JE1HrzdJ.d.ts → index-DVX2jlTQ.d.ts} +2 -2
- package/dist/{index-DofC9Rll.d.ts → index-Dk50Zh3F.d.ts} +2 -2
- package/dist/{index-BfFpUr1B.d.ts → index-ZKBj_1nu.d.ts} +1 -1
- package/dist/{index-BufuCsTx.d.ts → index-hwP1oWCA.d.ts} +2 -2
- package/dist/{index-C3JmGujU.d.ts → index-mK1ICsVg.d.ts} +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +46 -46
- package/dist/{layerFocusReturn-CEvrMbxH.js → layerFocusReturn-uixUCSc8.js} +1 -1
- package/dist/{lazyBottomSheet-DlrpPOl8.js → lazyBottomSheet-C6Rw8yoX.js} +1 -1
- package/dist/{modalOutlet-Drr9a16b.js → modalOutlet-BwR9AAlm.js} +16 -1
- package/dist/position-DwHfneha.js +79 -0
- package/dist/rideKeyboard-BCzVooOd.js +1635 -0
- package/dist/sheetTransition-BEm1GCv1.js +76 -0
- package/dist/{useChatStreamScroll-DWhnCSP1.js → useChatStreamScroll-3mJvbNtI.js} +30 -4
- package/dist/{useFocusTrap-DcjriBe1.js → useFocusTrap-Bj9GskLh.js} +1 -1
- package/dist/{useMenuPress-zOinmIFS.js → useMenuPress-kjmot8Bn.js} +1 -1
- package/dist/useMobileKeyboard-BDPV51xl.js +806 -0
- package/dist/{useRestoreFocus-DS7uQWok.js → useRestoreFocus-m3rsqE4d.js} +1 -1
- package/package.json +1 -1
- package/styles/chat.css +6 -0
- package/styles/drawer.css +136 -44
- package/dist/BottomSheet-Chr9yCIL.js +0 -4353
- package/dist/Drawer-DKSqpR2p.js +0 -137
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/BottomSheet/sheetTransition.ts
|
|
2
|
+
const BACKSTOP_BUFFER_MS = 50;
|
|
3
|
+
function parseTransitionTime(value) {
|
|
4
|
+
const normalized = value.trim();
|
|
5
|
+
if (!/^-?(?:\d+|\d*\.\d+)(?:ms|s)$/.test(normalized)) return null;
|
|
6
|
+
const time = Number.parseFloat(normalized);
|
|
7
|
+
return normalized.endsWith("ms") ? time : time * 1e3;
|
|
8
|
+
}
|
|
9
|
+
/** Longest transition duration + delay that applies to `property`, in ms. */
|
|
10
|
+
function transitionMsFor(element, property) {
|
|
11
|
+
const style = getComputedStyle(element);
|
|
12
|
+
const properties = (style.transitionProperty || "").split(",").map((value) => value.trim());
|
|
13
|
+
const durations = (style.transitionDuration || "").split(",").map(parseTransitionTime);
|
|
14
|
+
const delays = (style.transitionDelay || "").split(",").map((value) => parseTransitionTime(value) ?? 0);
|
|
15
|
+
return properties.reduce((longest, name, index) => {
|
|
16
|
+
if (name !== property && name !== "all") return longest;
|
|
17
|
+
const duration = durations[index % durations.length];
|
|
18
|
+
if (duration == null) return longest;
|
|
19
|
+
return Math.max(longest, duration + (delays[index % delays.length] ?? 0));
|
|
20
|
+
}, 0);
|
|
21
|
+
}
|
|
22
|
+
/** Whether a CSS transition of `property` still runs on `element`. */
|
|
23
|
+
function hasRunningTransition(element, property) {
|
|
24
|
+
return (element.getAnimations?.() ?? []).some((animation) => animation.transitionProperty === property && (animation.playState === "running" || animation.playState === "paused"));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Calls `complete` when `element` finishes transitioning `property`: on the
|
|
28
|
+
* matching `transitionend`/`transitioncancel`, or on a timer backstop so a
|
|
29
|
+
* missed event can never strand the caller. Without a resolved duration — the
|
|
30
|
+
* case in a stylesheet-free test environment — it completes immediately.
|
|
31
|
+
*/
|
|
32
|
+
function waitForTransition(element, property, complete) {
|
|
33
|
+
if (element == null) {
|
|
34
|
+
complete();
|
|
35
|
+
return () => {};
|
|
36
|
+
}
|
|
37
|
+
let done = false;
|
|
38
|
+
let timer = null;
|
|
39
|
+
let backstopMs = 0;
|
|
40
|
+
let onTransitionEnd = () => {};
|
|
41
|
+
const finish = () => {
|
|
42
|
+
if (done) return;
|
|
43
|
+
done = true;
|
|
44
|
+
if (timer != null) clearTimeout(timer);
|
|
45
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
46
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
47
|
+
complete();
|
|
48
|
+
};
|
|
49
|
+
onTransitionEnd = (event) => {
|
|
50
|
+
if (event.target !== element || event.propertyName !== property) return;
|
|
51
|
+
if (event.type === "transitioncancel" && hasRunningTransition(element, property)) {
|
|
52
|
+
if (timer != null) {
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
timer = setTimeout(finish, backstopMs);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
finish();
|
|
59
|
+
};
|
|
60
|
+
const duration = transitionMsFor(element, property);
|
|
61
|
+
if (duration <= 0) {
|
|
62
|
+
finish();
|
|
63
|
+
return () => {};
|
|
64
|
+
}
|
|
65
|
+
element.addEventListener("transitionend", onTransitionEnd);
|
|
66
|
+
element.addEventListener("transitioncancel", onTransitionEnd);
|
|
67
|
+
backstopMs = duration + BACKSTOP_BUFFER_MS;
|
|
68
|
+
timer = setTimeout(finish, backstopMs);
|
|
69
|
+
return () => {
|
|
70
|
+
if (timer != null) clearTimeout(timer);
|
|
71
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
72
|
+
element.removeEventListener("transitioncancel", onTransitionEnd);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { waitForTransition as t };
|
|
@@ -107,6 +107,32 @@ function setScrollAnchoringOff(element, isOff) {
|
|
|
107
107
|
} else element.removeAttribute(SCROLL_ANCHORING);
|
|
108
108
|
}
|
|
109
109
|
//#endregion
|
|
110
|
+
//#region src/composables/internal/streamFollowing.ts
|
|
111
|
+
/**
|
|
112
|
+
* @file streamFollowing.ts
|
|
113
|
+
* @input The scroll-anchoring owner
|
|
114
|
+
* @output markFollowing, which the stream scroll calls with each change of its
|
|
115
|
+
* lock, and isFollowingNewest, which ChatLayout's keyboard reads
|
|
116
|
+
* @position Internal to useChatStreamScroll and Chat; not exported
|
|
117
|
+
*/
|
|
118
|
+
const following = /* @__PURE__ */ new WeakSet();
|
|
119
|
+
/**
|
|
120
|
+
* Whether the stream scroll on `scroller` follows its newest message now, as
|
|
121
|
+
* its lock says.
|
|
122
|
+
*/
|
|
123
|
+
function isFollowingNewest(scroller) {
|
|
124
|
+
return following.has(scroller);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The lock's marks on the scroller: anchoring off while the hook follows, and
|
|
128
|
+
* the state `isFollowingNewest` reads.
|
|
129
|
+
*/
|
|
130
|
+
function markFollowing(el, locked) {
|
|
131
|
+
setScrollAnchoringOff(el, locked);
|
|
132
|
+
if (locked) following.add(el);
|
|
133
|
+
else following.delete(el);
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
110
136
|
//#region src/composables/useChatStreamScroll.ts
|
|
111
137
|
const SIXTY_FPS_MS = 1e3 / 60;
|
|
112
138
|
const CHAT_MESSAGE_CLASS = "astryx-chat-message";
|
|
@@ -142,7 +168,7 @@ function useChatStreamScroll(options) {
|
|
|
142
168
|
locked = next;
|
|
143
169
|
isLocked.value = next;
|
|
144
170
|
const el = scrollRef.value;
|
|
145
|
-
if (el)
|
|
171
|
+
if (el) markFollowing(el, next);
|
|
146
172
|
if (!next) cancelFrame();
|
|
147
173
|
}
|
|
148
174
|
function cancelFrame() {
|
|
@@ -252,7 +278,7 @@ function useChatStreamScroll(options) {
|
|
|
252
278
|
lastScrollTop = el.scrollTop;
|
|
253
279
|
lastScrollHeight = el.scrollHeight;
|
|
254
280
|
lastOffsetHeight = shownHeight();
|
|
255
|
-
|
|
281
|
+
markFollowing(el, locked);
|
|
256
282
|
const onScroll = () => {
|
|
257
283
|
const { scrollTop, scrollHeight } = el;
|
|
258
284
|
const offsetHeight = shownHeight();
|
|
@@ -308,7 +334,7 @@ function useChatStreamScroll(options) {
|
|
|
308
334
|
el.removeEventListener("scrollend", onScrollEnd);
|
|
309
335
|
el.removeEventListener("wheel", onWheel);
|
|
310
336
|
el.removeEventListener("touchmove", onTouchMove);
|
|
311
|
-
|
|
337
|
+
markFollowing(el, false);
|
|
312
338
|
});
|
|
313
339
|
}, { immediate: true });
|
|
314
340
|
return {
|
|
@@ -323,4 +349,4 @@ function useChatStreamScroll(options) {
|
|
|
323
349
|
};
|
|
324
350
|
}
|
|
325
351
|
//#endregion
|
|
326
|
-
export {
|
|
352
|
+
export { useChatNewMessages as i, isFollowingNewest as n, CHAT_MESSAGE_CLASS$1 as r, useChatStreamScroll as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as isImeKeyEvent } from "./ime-VY8-80S8.js";
|
|
2
2
|
import { a as trackInteractionModality } from "./interactionModality-4Km2ibsq.js";
|
|
3
3
|
import { i as hasInnerRegionHolding, n as collapseRadioGroups, o as precedes, r as focusablesIn, s as registerRegion, t as attemptFocus } from "./focusRegion-CmDg7_4b.js";
|
|
4
|
-
import { t as focusForLastInput } from "./focusReturn-
|
|
4
|
+
import { t as focusForLastInput } from "./focusReturn-BeSRm0xD.js";
|
|
5
5
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
6
6
|
//#region src/composables/useFocusTrap.ts
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as msSinceInput } from "./inputAge-C-SoLwpD.js";
|
|
2
2
|
import { i as withoutClickGuard, r as disarmEveryClickGuard, t as armClickGuard } from "./clickGuard-BkegH2NW.js";
|
|
3
3
|
import { s as currentGesture } from "./layerDepth-DRfWATFr.js";
|
|
4
|
-
import { t as focusForLastInput } from "./focusReturn-
|
|
4
|
+
import { t as focusForLastInput } from "./focusReturn-BeSRm0xD.js";
|
|
5
5
|
import { t as claimPress } from "./pressClaim-DvdlIn4w.js";
|
|
6
6
|
import { r as isInputShield } from "./inputHoldState-Bav14W7v.js";
|
|
7
7
|
import { getCurrentScope, onScopeDispose, toValue } from "vue";
|