@astryx-vue/core 0.43.4 → 0.43.5
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-CcQuJKn6.js → AlertDialog-CbYI2lSn.js} +2 -2
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-BZrs85ca.js → AppShell-D7Q66weN.js} +11 -4
- 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-B_c2Qm7B.js → BottomSheet-Cp6j099l.js} +1 -1
- package/dist/{BottomSheet-CN2GXFrM.js → BottomSheet-YMCZQnE7.js} +1 -1
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-Drv_deCP.js → Breadcrumbs-Divj8J_1.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-D0eyxcQ5.js → Chat-Cr_MEm-a.js} +1 -1
- 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/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-Q9v7cY07.js → ClickableCard-VoDgBMvb.js} +24 -4
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BdX1TRrW.js → ComplexSelector-QoKg-f6B.js} +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-CzeZmLy8.js → ContextMenu-C941I0rG.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-Ck4gAiFL.js → DateInput-D-QtIGlw.js} +2 -2
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-ChrXW-_5.js → DateRangeInput-IpznCdkO.js} +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-D5X_NyMg.js → DateTimeInput-DMptZyjX.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-a54pw41L.js → DropdownMenu-S8usz-Yk.js} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-OncHh-9P.js → EmptyState-BU4RhwEo.js} +2 -2
- package/dist/Heading/index.d.ts +1 -1
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BfoFn1o5.js → Heading-BBcdemCU.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Layout/index.js +2 -2
- package/dist/{Layout-OQ1qfgFZ.js → Layout-CwBC_vhy.js} +1 -1
- package/dist/{LayoutPanel-C7meqbdC.js → LayoutPanel-CNQxpDF3.js} +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CVrDI3Df.js → Lightbox-Ims5yQjw.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/Markdown/index.js +1 -1
- package/dist/{Markdown-CH1HEQ5H.js → Markdown-DtFXmWK6.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-BjBPWy34.js → MobileNavToggle-6te1baa6.js} +6 -4
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BV0ilgia.js → MoreMenu-BxC8oVyA.js} +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BWOqNKUw.js → MultiSelector-4N6ZQdr1.js} +2 -2
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DDSIBcXu.js → NumberInput-CO3_Suv2.js} +1 -1
- package/dist/OverflowList/index.d.ts +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-D5NEGm3v.js → Pagination-_FAAwTkY.js} +2 -2
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-CD9zRZCN.js → Popover-Bm13yzVR.js} +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CgyDqwVA.js → PowerSearch-BxH88nbf.js} +13 -13
- 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/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/Section/index.d.ts +2 -2
- package/dist/Section/index.js +1 -1
- package/dist/{Section-Km_FjJ-i.js → Section-B_zTnJut.js} +6 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SegmentedControl/index.js +1 -1
- package/dist/{SegmentedControl-C4cyOw3z.js → SegmentedControl-9xB-4P3G.js} +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/SelectableCard/index.js +1 -1
- package/dist/{SelectableCard-DNQqIEyw.js → SelectableCard-CiGBc6LT.js} +3 -2
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-DIQgqqjp.js → Selector-C6ESJ-zk.js} +3 -3
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DJTPCwwg.js → SideNav-BwRn6ryA.js} +1 -1
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-D_IQQkrP.js → Slider-Bg_qnNFt.js} +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stack/index.js +1 -1
- package/dist/{Stack-Bj3MyHVh.js → Stack-Cr68kCrs.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Table/index.d.ts +2 -2
- package/dist/Table/index.js +1 -1
- package/dist/{Table-C2oRVE_7.js → Table-ADs9W5i_.js} +9 -9
- package/dist/Text/index.d.ts +1 -1
- package/dist/Text/index.js +2 -2
- package/dist/{Text-DcTbvkLq.js → Text-Czw1L8Zc.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-CsfwwuIa.js → TextArea-CXeK9k3F.js} +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-CstQuPUe.js → TextInput-BDa8jBbY.js} +1 -1
- package/dist/Theme/index.js +1 -1
- package/dist/{Theme-B_kAJHy2.js → Theme-fCN_zUNt.js} +1 -1
- package/dist/{TimeField-Bno6mkOA.js → TimeField-DIcpNQIQ.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-CJFEeyET.js → TimeInput-DI2yFG9f.js} +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-vj0M-kQs.js → Timer-DUWtr4HW.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-ANLjz4lW.js → Timestamp-dTZ7YIWw.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-eOB86IoD.js → Tokenizer-CLByEOf-.js} +5 -5
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Toolbar/index.js +1 -1
- package/dist/{Toolbar-BHkPxDxA.js → Toolbar-J0Q0-NZB.js} +7 -4
- 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-D79FiL4s.js → TopNav-C-Rxvn3-.js} +1 -1
- package/dist/{assertOptions-Cl5NciZF.js → assertOptions--NMPt4op.js} +1 -1
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +2 -2
- package/dist/{composables-DqIVxGbe.js → composables-Dr2d0LpH.js} +1 -1
- package/dist/{index-BI1QLuYB.d.ts → index-0RIgvtdm.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-CC9ETLL4.d.ts → index-BMoR8Uoh.d.ts} +3 -3
- package/dist/{index-DyKu6YTp.d.ts → index-BPnP3Abd.d.ts} +3 -3
- package/dist/{index-D1aUS4mJ.d.ts → index-BZ9ki2Po.d.ts} +56 -50
- package/dist/{index-DSsuY9v9.d.ts → index-BaXcJ7eE.d.ts} +1 -1
- package/dist/{index-maTGrWjF.d.ts → index-BenG-F5d.d.ts} +1 -1
- package/dist/{index-BB9acgK8.d.ts → index-BgT6mH3U.d.ts} +1 -1
- package/dist/{index-CTjkJP4x.d.ts → index-C5NuAlfY.d.ts} +3 -0
- package/dist/{index-C8hyLvk2.d.ts → index-C7uGs5Cl.d.ts} +2 -2
- package/dist/{index-waTkqxTz.d.ts → index-C89cIh4E.d.ts} +1 -1
- package/dist/{index-Ds4dOCSy.d.ts → index-CCa_dvoF.d.ts} +3 -3
- package/dist/{index-iGHM85Y1.d.ts → index-CI-FbXLB.d.ts} +3 -3
- package/dist/{index-BaFphczL.d.ts → index-COgrQZIL.d.ts} +1 -1
- package/dist/{index-DpiL3YlX.d.ts → index-CQtvsQ1J.d.ts} +6 -6
- package/dist/{index-CBOv5j3c.d.ts → index-CbA8rR_b.d.ts} +1 -1
- package/dist/{index-zMNvYijA.d.ts → index-CkkybuPJ.d.ts} +2 -2
- package/dist/{index-rdwI-mcm.d.ts → index-CtYlR9Cu.d.ts} +1 -1
- package/dist/{index-Csn58myZ.d.ts → index-D-cuURNK.d.ts} +1 -1
- package/dist/{index-CEv_AvOg.d.ts → index-D2nMIyHd.d.ts} +1 -1
- package/dist/{index-J83fLEyo.d.ts → index-DgNCHxvu.d.ts} +2 -2
- package/dist/{index-D1IOCfUe.d.ts → index-Dno9YNVJ.d.ts} +7 -7
- package/dist/{index-D3UaSnbN.d.ts → index-DofC9Rll.d.ts} +2 -2
- package/dist/{index-DD3c1ZhS.d.ts → index-DuuH0y8h.d.ts} +2 -2
- package/dist/{index-vCRf5fyK.d.ts → index-ZKBj_1nu.d.ts} +1 -1
- package/dist/index.d.ts +28 -28
- package/dist/index.js +48 -48
- package/dist/internal/touch.js +1 -1
- package/dist/{lazyBottomSheet-Cgu6B2R1.js → lazyBottomSheet-BHzk8JsS.js} +1 -1
- package/dist/{sharedResizeObserver-BekhnB3E.js → sharedResizeObserver-BnRTJaNh.js} +54 -1
- package/dist/{types-uFMH9NaM.d.ts → types-ByudyXHy.d.ts} +1 -1
- package/dist/{useMobileKeyboard-xkLI3Sc0.js → useMobileKeyboard-DxddrPiU.js} +1 -1
- package/dist/{useResizable-ZYDRiLfL.js → useResizable-C7McXqlY.js} +28 -2
- package/dist/{useResizable-CJFVvx_2.d.ts → useResizable-if_cP4fs.d.ts} +1 -1
- package/dist/{useScrollRegionProps-D5fMvdfn.js → useScrollRegionProps-YzH-PyAg.js} +21 -7
- package/dist/{useTruncation-D_T-ezdp.js → useTruncation-Cn8Ohj_1.js} +1 -1
- package/dist/{useTruncationTooltip-B0_h3sf9.js → useTruncationTooltip-D8trOJ_a.js} +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/styles/app-shell.css +5 -1
- package/styles/clickable-card.css +16 -5
- package/styles/collapsible.css +5 -0
- package/styles/layer.css +5 -1
- package/styles/mobile-nav.css +5 -0
- package/styles/resize-handle.css +11 -0
- package/styles/section.css +15 -0
- package/dist/{index-7tsRPFfY.d.ts → index-CNZCQgHF.d.ts} +1 -1
|
@@ -87,5 +87,58 @@ function unobserveResize(element, callback) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Observe `element` as `observeResize` does, without the call it makes on
|
|
92
|
+
* registration. That call runs where the caller registers, such as a mount
|
|
93
|
+
* hook, where a read forces a layout before the browser's own. The browser's
|
|
94
|
+
* first notification comes after it lays `element` out.
|
|
95
|
+
*
|
|
96
|
+
* An element another subscriber already observes gets no new first
|
|
97
|
+
* notification. So `onResize` runs in a microtask instead, with no entry, and
|
|
98
|
+
* the caller measures there. It does not run once the registration has ended.
|
|
99
|
+
*
|
|
100
|
+
* Returns null where no ResizeObserver exists (jsdom). The caller measures at
|
|
101
|
+
* once there. Internal.
|
|
102
|
+
*/
|
|
103
|
+
function observeResizeAfterLayout(element, onResize) {
|
|
104
|
+
if (typeof ResizeObserver === "undefined") return null;
|
|
105
|
+
const wasObserved = isResizeObserved(element);
|
|
106
|
+
let isRegistered = false;
|
|
107
|
+
let isActive = true;
|
|
108
|
+
const unsubscribe = observeResize(element, (entry) => {
|
|
109
|
+
if (isRegistered) onResize(entry);
|
|
110
|
+
});
|
|
111
|
+
isRegistered = true;
|
|
112
|
+
if (wasObserved) queueMicrotask(() => {
|
|
113
|
+
if (isActive) onResize(null);
|
|
114
|
+
});
|
|
115
|
+
return () => {
|
|
116
|
+
isActive = false;
|
|
117
|
+
unsubscribe();
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Returns a resize handler that calls `onFirst` for the first notification
|
|
122
|
+
* and `onLater` for each notification after its delivery. The rest of the
|
|
123
|
+
* first delivery calls nothing: when several boxes of one element group first
|
|
124
|
+
* report together, the first measurement already reads them all. The shared
|
|
125
|
+
* observer reports one delivery in one callback, and a microtask follows that
|
|
126
|
+
* callback, so the microtask ends the first delivery. Internal.
|
|
127
|
+
*/
|
|
128
|
+
function splitFirstResizeDelivery(onFirst, onLater) {
|
|
129
|
+
let phase = "waiting";
|
|
130
|
+
return () => {
|
|
131
|
+
if (phase === "later") {
|
|
132
|
+
onLater();
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (phase === "first") return;
|
|
136
|
+
phase = "first";
|
|
137
|
+
queueMicrotask(() => {
|
|
138
|
+
phase = "later";
|
|
139
|
+
});
|
|
140
|
+
onFirst();
|
|
141
|
+
};
|
|
142
|
+
}
|
|
90
143
|
//#endregion
|
|
91
|
-
export { observeResize as n,
|
|
144
|
+
export { unobserveResize as a, splitFirstResizeDelivery as i, observeResize as n, observeResizeAfterLayout as r, isResizeObserved as t };
|
|
@@ -27,7 +27,7 @@ interface SectionProps extends PaddingInput {
|
|
|
27
27
|
height?: SizeValue;
|
|
28
28
|
/** 最大宽度。数字是像素,字符串原样使用。 */
|
|
29
29
|
maxWidth?: SizeValue;
|
|
30
|
-
/**
|
|
30
|
+
/** 最小高度。数字是像素,字符串原样使用。上色的内层撑满区域达到的高度。 */
|
|
31
31
|
minHeight?: SizeValue;
|
|
32
32
|
/** 哪些边画分隔线。start / end 随书写方向翻转。 */
|
|
33
33
|
dividers?: SectionDivider[];
|
|
@@ -7,7 +7,7 @@ import { t as KEYBOARD_SPRING } from "./springs-BqW2WrS-.js";
|
|
|
7
7
|
import { t as TOUCH_QUERY } from "./touchQueries-xy5IeZfe.js";
|
|
8
8
|
import { n as scrollingAncestor, t as nearestScroller } from "./scrollingAncestor-QzzYeTWo.js";
|
|
9
9
|
import { t as useAttachment } from "./useAttachment-CGiD9rt6.js";
|
|
10
|
-
import { n as observeResize } from "./sharedResizeObserver-
|
|
10
|
+
import { n as observeResize } from "./sharedResizeObserver-BnRTJaNh.js";
|
|
11
11
|
import { A as riddenAnimators, C as hasOwnTranslate, D as nearestFixedAncestor, E as isMovedByApp, F as subscribeKeyboardHeight, I as layoutViewportHeight, M as getKeyboardHeight, N as isKeyboardMeasurable, O as registerKeyboardTarget, P as isTextEntryControl, S as followsKeyboard, T as isInsideKeyboardTarget, _ as refuseFocusReveal, a as revealWithKeyboard, b as fixedContainerOf, c as claimTapFocus, d as claimKeyboardScrollBack, f as stopKeyboardScrollBack, g as keyboardProfileOf, h as hidesField, i as revealDistance, j as findTextEntryControl, k as restingBottom, l as watchRevealPan, m as getKeyboardLayoutGuide, n as bandOf, o as scrollBy, p as bringsUpKeyboard, r as deliverTap, s as watchPans, t as rideKeyboard, u as distanceIntoBand, v as coveredBy, w as isDockedContainer, x as focusedFieldIn, y as drawnOffsetOf } from "./rideKeyboard-DgecasHn.js";
|
|
12
12
|
import { readonly, shallowRef, toValue, watch } from "vue";
|
|
13
13
|
//#region src/keyboard/keyboardRide.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as isImeKeyEvent } from "./ime-VY8-80S8.js";
|
|
2
2
|
import { t as isApplePlatform } from "./isApplePlatform-B1ju6F5B.js";
|
|
3
3
|
import { t as animatorFor } from "./animator-L1kmTBSi.js";
|
|
4
|
+
import { r as themeReducesMotion } from "./reducedMotionMark-CYSyfURo.js";
|
|
4
5
|
import { t as resolveMotion } from "./resolveMotion-BHR1cz0Q.js";
|
|
5
6
|
import { d as springs } from "./springs-BqW2WrS-.js";
|
|
6
7
|
import { t as project } from "./projection-BafBD5NP.js";
|
|
@@ -165,8 +166,9 @@ function createOvershootDrawing(pane, handleOf) {
|
|
|
165
166
|
}
|
|
166
167
|
};
|
|
167
168
|
}
|
|
169
|
+
/** 减少动效:系统设置,或者对所有人减少动效的主题(reducedMotion: 'always')。 */
|
|
168
170
|
function reducesMotion(element) {
|
|
169
|
-
return element?.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
171
|
+
return element?.ownerDocument.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true || themeReducesMotion(element);
|
|
170
172
|
}
|
|
171
173
|
function createRegionMotion(host) {
|
|
172
174
|
let pane = null;
|
|
@@ -555,6 +557,9 @@ function useSingleRegion(options, cascade) {
|
|
|
555
557
|
let settledDefault = false;
|
|
556
558
|
let dragging = false;
|
|
557
559
|
let dragLimits = null;
|
|
560
|
+
let hasBeenResized = false;
|
|
561
|
+
let restoredSize = null;
|
|
562
|
+
let stateAtGestureStart = null;
|
|
558
563
|
function observesContainer() {
|
|
559
564
|
return options.containerRef != null && (sizeDependsOnBasis(options.minSize) || sizeDependsOnBasis(options.maxSize) || sizeDependsOnBasis(options.defaultSize));
|
|
560
565
|
}
|
|
@@ -606,6 +611,7 @@ function useSingleRegion(options, cascade) {
|
|
|
606
611
|
options.onSizeChange?.(0);
|
|
607
612
|
},
|
|
608
613
|
endGesture() {
|
|
614
|
+
noteGestureEnd();
|
|
609
615
|
dragging = false;
|
|
610
616
|
dragLimits = null;
|
|
611
617
|
persist();
|
|
@@ -633,6 +639,7 @@ function useSingleRegion(options, cascade) {
|
|
|
633
639
|
const saved = options.autoSaveId ? loadPersistedState(options.autoSaveId) : null;
|
|
634
640
|
const collapsed = controlledCollapse.value ?? saved?.isCollapsed ?? (collapsible && options.defaultIsCollapsed === true);
|
|
635
641
|
const starting = saved?.size ?? initial;
|
|
642
|
+
restoredSize = saved?.size ?? null;
|
|
636
643
|
if (options.containerRef != null && !basis.measured) {
|
|
637
644
|
basisMeasured.value = false;
|
|
638
645
|
applySize(starting, Boolean(collapsed));
|
|
@@ -644,12 +651,17 @@ function useSingleRegion(options, cascade) {
|
|
|
644
651
|
applySize(starting, Boolean(collapsed));
|
|
645
652
|
}
|
|
646
653
|
restore();
|
|
654
|
+
/**
|
|
655
|
+
* 第一次调整之前,只有被边界或吸附点改过的恢复尺寸才写回;之后存储记下区域显示的尺寸。
|
|
656
|
+
*/
|
|
647
657
|
function persist() {
|
|
648
658
|
if (!options.autoSaveId || !basisMeasured.value) return;
|
|
659
|
+
if (!hasBeenResized && (restoredSize == null || restoredSize === expandedSize.value)) return;
|
|
649
660
|
savePersistedState(options.autoSaveId, expandedSize.value, isCollapsed.value);
|
|
650
661
|
}
|
|
651
662
|
function setCollapsed(next) {
|
|
652
663
|
if (!collapsible && next) return;
|
|
664
|
+
if (next !== isCollapsed.value) hasBeenResized = true;
|
|
653
665
|
if (options.isCollapsed != null) {
|
|
654
666
|
options.onCollapseChange?.(next);
|
|
655
667
|
return;
|
|
@@ -660,12 +672,23 @@ function useSingleRegion(options, cascade) {
|
|
|
660
672
|
cascade?.settle();
|
|
661
673
|
}
|
|
662
674
|
function resize(next) {
|
|
675
|
+
if (isCollapsed.value || clampSize(next, limits().min, limits().max, snaps) !== size.value) hasBeenResized = true;
|
|
663
676
|
applySize(next, false);
|
|
664
677
|
cascade?.settle();
|
|
665
678
|
options.onSizeChange?.(size.value);
|
|
666
679
|
persist();
|
|
667
680
|
}
|
|
681
|
+
/** 一次手势只有真的挪动了尺寸或收起状态,才算人调整过。 */
|
|
682
|
+
function noteGestureEnd() {
|
|
683
|
+
const start = stateAtGestureStart;
|
|
684
|
+
stateAtGestureStart = null;
|
|
685
|
+
if (start != null && (start.size !== size.value || start.isCollapsed !== isCollapsed.value)) hasBeenResized = true;
|
|
686
|
+
}
|
|
668
687
|
function onResizeStart() {
|
|
688
|
+
stateAtGestureStart = {
|
|
689
|
+
size: size.value,
|
|
690
|
+
isCollapsed: isCollapsed.value
|
|
691
|
+
};
|
|
669
692
|
dragging = true;
|
|
670
693
|
dragLimits = limits();
|
|
671
694
|
motion.start();
|
|
@@ -725,7 +748,10 @@ function useSingleRegion(options, cascade) {
|
|
|
725
748
|
onBeforeUnmount(() => {
|
|
726
749
|
observer?.disconnect();
|
|
727
750
|
motion.dispose();
|
|
728
|
-
if (dragging)
|
|
751
|
+
if (dragging) {
|
|
752
|
+
noteGestureEnd();
|
|
753
|
+
persist();
|
|
754
|
+
}
|
|
729
755
|
});
|
|
730
756
|
watch(controlledCollapse, (next) => {
|
|
731
757
|
if (next != null) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as SpacingStep } from "./types-BTk0WZ0b.js";
|
|
2
|
-
import { i as SectionVariant } from "./types-
|
|
2
|
+
import { i as SectionVariant } from "./types-ByudyXHy.js";
|
|
3
3
|
import { CSSProperties, MaybeRefOrGetter, Ref, VNode, VNodeChild } from "vue";
|
|
4
4
|
//#region src/Toolbar/types.d.ts
|
|
5
5
|
type ToolbarSize = 'sm' | 'md' | 'lg';
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import { a as isMeasurable, i as getLogicalAxisMapping, u as measureScrollAxis } from "./scrollGeometry-ajfQQRJt.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as splitFirstResizeDelivery, r as observeResizeAfterLayout } from "./sharedResizeObserver-BnRTJaNh.js";
|
|
3
3
|
import { computed, onScopeDispose, shallowRef, toValue, watch } from "vue";
|
|
4
4
|
//#region src/composables/internal/mainOverflow.ts
|
|
5
5
|
/**
|
|
6
6
|
* 内容直接放在滚动容器里、没有内层盒子的区域(AppShell 的主区域,可滚动的 LayoutContent、
|
|
7
7
|
* LayoutPanel、StackItem)是不是溢出。内容变长时容器自己的大小不变,所以盯的是它的直接子元素。
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* 浏览器第一次排好版后量一次,之后只在答案变化时调 `onChange`。多个信号合并成每帧一次测量。
|
|
10
10
|
* 藏起来、没连在文档上、尺寸为 0 的区域答「不知道」:保留上一次的答案,等下一次有效的信号。
|
|
11
11
|
* 返回停止观察的函数。
|
|
12
|
+
*
|
|
13
|
+
* 区域在挂载时绑上,那时读布局会逼浏览器提前排一遍版。所以第一次测量等尺寸观察器的第一次通知,
|
|
14
|
+
* 那时浏览器刚排好区域或它的子元素,立即量不会多排一遍;同一轮通知里区域和子元素一起到,也只量一次。
|
|
15
|
+
* 没有 ResizeObserver 的环境里绑上就量。
|
|
12
16
|
*/
|
|
13
17
|
function observeMainOverflow(main, onChange) {
|
|
14
18
|
let isActive = true;
|
|
15
19
|
let frame = null;
|
|
16
20
|
let overflows = null;
|
|
21
|
+
let isLaidOut = false;
|
|
17
22
|
function measure() {
|
|
18
23
|
frame = null;
|
|
19
24
|
if (!isActive) return;
|
|
@@ -27,13 +32,17 @@ function observeMainOverflow(main, onChange) {
|
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
34
|
function scheduleMeasure() {
|
|
30
|
-
if (!isActive || frame != null) return;
|
|
35
|
+
if (!isActive || !isLaidOut || frame != null) return;
|
|
31
36
|
if (typeof requestAnimationFrame !== "function") {
|
|
32
37
|
measure();
|
|
33
38
|
return;
|
|
34
39
|
}
|
|
35
40
|
frame = requestAnimationFrame(measure);
|
|
36
41
|
}
|
|
42
|
+
const onResize = splitFirstResizeDelivery(() => {
|
|
43
|
+
isLaidOut = true;
|
|
44
|
+
measure();
|
|
45
|
+
}, scheduleMeasure);
|
|
37
46
|
const childObservers = /* @__PURE__ */ new Map();
|
|
38
47
|
function syncChildObservers() {
|
|
39
48
|
const children = new Set(Array.from(main.children));
|
|
@@ -41,11 +50,16 @@ function observeMainOverflow(main, onChange) {
|
|
|
41
50
|
stop();
|
|
42
51
|
childObservers.delete(child);
|
|
43
52
|
}
|
|
44
|
-
for (const child of children) if (!childObservers.has(child))
|
|
53
|
+
for (const child of children) if (!childObservers.has(child)) {
|
|
54
|
+
const stop = observeResizeAfterLayout(child, (entry) => {
|
|
55
|
+
if (entry != null) onResize();
|
|
56
|
+
});
|
|
57
|
+
childObservers.set(child, stop ?? (() => {}));
|
|
58
|
+
}
|
|
45
59
|
}
|
|
46
|
-
measure();
|
|
47
60
|
syncChildObservers();
|
|
48
|
-
const stopObservingMain =
|
|
61
|
+
const stopObservingMain = observeResizeAfterLayout(main, onResize);
|
|
62
|
+
if (stopObservingMain == null) onResize();
|
|
49
63
|
const mutations = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
50
64
|
syncChildObservers();
|
|
51
65
|
scheduleMeasure();
|
|
@@ -71,7 +85,7 @@ function observeMainOverflow(main, onChange) {
|
|
|
71
85
|
isActive = false;
|
|
72
86
|
if (frame != null && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frame);
|
|
73
87
|
frame = null;
|
|
74
|
-
stopObservingMain();
|
|
88
|
+
stopObservingMain?.();
|
|
75
89
|
mutations?.disconnect();
|
|
76
90
|
for (const stop of childObservers.values()) stop();
|
|
77
91
|
childObservers.clear();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as observeResize, t as isResizeObserved } from "./sharedResizeObserver-
|
|
1
|
+
import { n as observeResize, t as isResizeObserved } from "./sharedResizeObserver-BnRTJaNh.js";
|
|
2
2
|
import { t as observeContent } from "./sharedMutationObserver-Dvh3N1N2.js";
|
|
3
3
|
import { onScopeDispose, ref, toValue, watch } from "vue";
|
|
4
4
|
//#region src/Text/useTruncation.ts
|
|
@@ -2,7 +2,7 @@ import { t as matchesFocusVisible } from "./tooltipTriggerRules-BjnT3wIz.js";
|
|
|
2
2
|
import { a as trackInteractionModality, t as getInteractionModality } from "./interactionModality-4Km2ibsq.js";
|
|
3
3
|
import { r as tooltipPresentInterestKey } from "./useTooltip-DSB9njlb.js";
|
|
4
4
|
import { t as _sfc_main$1 } from "./Tooltip-BYXFoOwa.js";
|
|
5
|
-
import { n as useTruncation, t as truncatePlacement } from "./useTruncation-
|
|
5
|
+
import { n as useTruncation, t as truncatePlacement } from "./useTruncation-Cn8Ohj_1.js";
|
|
6
6
|
import { computed, createBlock, createCommentVNode, defineComponent, openBlock, provide, shallowRef } from "vue";
|
|
7
7
|
//#region src/Text/TruncationTooltip.vue
|
|
8
8
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
package/dist/utils/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as isSafeUrl, r as sanitizeUrl, t as isSafeDestination } from "../safeUrl-CsvfcZ9m.js";
|
|
2
2
|
import { n as firstCharacter, r as truncateCharacters, t as characterCount } from "../characters-DmSa8HSB.js";
|
|
3
3
|
import { i as scrollsPage, n as scrollEventTarget, r as scrollportTop, t as setScrollAnchoringOff } from "../scrollAnchoring-CNplZXRt.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as unobserveResize, n as observeResize } from "../sharedResizeObserver-BnRTJaNh.js";
|
|
5
5
|
import { a as formatDisplayTime12h, i as createISOTimeString, n as clampTime, o as formatDisplayTime24h, r as compareTime, t as adjustTime, u as parseTimeInput } from "../timeParser-nVL5sIwT.js";
|
|
6
6
|
import { A as plainDateSetFirstOfMonth, C as plainDateIsAfter, D as plainDateMax, E as plainDateIsInRange, F as plainDateToday, I as plainDateWeekFieldName, M as plainDateToDate, N as plainDateToISO, O as plainDateMin, P as plainDateToInstant, S as plainDateGetWeekNumber, T as plainDateIsEqual, _ as plainDateDiffDays, a as DATE_FORMAT_SHORT_WITH_WEEKDAY, b as plainDateFromISO, c as DATE_FORMAT_WITH_WEEKDAY, d as getDaysInMonth, f as getTimeZoneParts, g as plainDateDayOfWeek, h as plainDateCreate, i as DATE_FORMAT_SHORT, j as plainDateSetStartOfWeek, k as plainDateSetEndOfWeekExclusive, l as SHARED_DATE_FORMAT_OPTIONS, m as plainDateAddMonths, n as DATE_FORMAT_MONTH_ONLY, o as DATE_FORMAT_SHORT_WITH_YEAR, p as plainDateAddDays, r as DATE_FORMAT_MONTH_YEAR, s as DATE_FORMAT_WEEKDAY_ONLY, t as DATE_FORMAT_LONG, u as formatSharedDate, v as plainDateFormat, w as plainDateIsBefore, x as plainDateFromInstant, y as plainDateFromDate } from "../plainDate-CaTDErKr.js";
|
|
7
7
|
import { a as pickerPresentationFromNativePicker, c as resolvePickerPresentation, i as effectivePickerPresentation, l as isLocaleDayFirst, o as presentationFromNativePicker, r as effectiveInputPresentation, s as resolveInputPresentation, t as DEFAULT_INPUT_PRESENTATION, u as parseDateInput } from "../inputPresentation-DES0JwkL.js";
|
package/package.json
CHANGED
package/styles/app-shell.css
CHANGED
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
--layout-padding-inner-y: initial;
|
|
21
21
|
--layout-content-width: initial;
|
|
22
22
|
--layout-alignment-width: initial;
|
|
23
|
-
|
|
23
|
+
/* 外层 Section 显式给的内边距靠继承传给里面没给 padding 的 Section,也停在这里。 */
|
|
24
|
+
--_section-inline-start: initial;
|
|
25
|
+
--_section-inline-end: initial;
|
|
26
|
+
--_section-block-start: initial;
|
|
27
|
+
--_section-block-end: initial;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
.astryx-app-shell[data-variant='wash'],
|
|
@@ -45,19 +45,20 @@
|
|
|
45
45
|
transition-property: none;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
/* 只为卡片自己的链接、按钮或复选框画焦点环;子内容里的控件自己画,卡片不再套一圈。 */
|
|
49
|
+
.astryx-clickable-card:has(> [data-astryx-focus-owner]:focus-visible) {
|
|
49
50
|
outline: var(--astryx-focus-outline-width, 2px) solid var(--astryx-focus-outline-color, var(--astryx-color-text-primary, #171717));
|
|
50
51
|
outline-offset: var(--astryx-focus-outline-offset, 2px);
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
.astryx-clickable-card[data-disabled
|
|
54
|
+
.astryx-clickable-card[data-disabled] {
|
|
54
55
|
cursor: default;
|
|
55
56
|
opacity: 0.5;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
.astryx-clickable-card[data-disabled
|
|
59
|
-
.astryx-clickable-card[data-disabled
|
|
60
|
-
.astryx-clickable-card[data-disabled
|
|
59
|
+
.astryx-clickable-card[data-disabled]::after,
|
|
60
|
+
.astryx-clickable-card[data-disabled]:hover::after,
|
|
61
|
+
.astryx-clickable-card[data-disabled]:active::after {
|
|
61
62
|
background-color: transparent;
|
|
62
63
|
}
|
|
63
64
|
|
|
@@ -112,6 +113,16 @@
|
|
|
112
113
|
--astryx-selectable-card-accent: var(--astryx-color-yellow, #ca8a04);
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
/*
|
|
117
|
+
* 强制颜色模式去掉选中环的阴影、重画边框,选中需要自己的环:画在不占地方的 ::after 上,切换选中时什么都不挪动。
|
|
118
|
+
* 主题给卡片设的边框色到不了这一层;内容会滚动的定高卡片上,这一层跟着内容滚。
|
|
119
|
+
*/
|
|
120
|
+
@media (forced-colors: active) {
|
|
121
|
+
.astryx-selectable-card[data-selected='true']::after {
|
|
122
|
+
border: 2px solid Highlight;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
115
126
|
/* 减少动态效果时,悬停、按下、选中的颜色和边框都立即切换,不做过渡。 */
|
|
116
127
|
@media (prefers-reduced-motion: reduce) {
|
|
117
128
|
.astryx-clickable-card::after,
|
package/styles/collapsible.css
CHANGED
package/styles/layer.css
CHANGED
|
@@ -65,7 +65,11 @@
|
|
|
65
65
|
--layout-padding-own-outer-y: initial;
|
|
66
66
|
--layout-padding-inner-x: initial;
|
|
67
67
|
--layout-padding-inner-y: initial;
|
|
68
|
-
|
|
68
|
+
/* 外层 Section 显式给的内边距靠继承传给里面没给 padding 的 Section,也停在这里。 */
|
|
69
|
+
--_section-inline-start: initial;
|
|
70
|
+
--_section-inline-end: initial;
|
|
71
|
+
--_section-block-start: initial;
|
|
72
|
+
--_section-block-end: initial;
|
|
69
73
|
/* 步骤条的连接线空隙只属于外面那条轨道。浮层里的步骤条回到自己的 0。 */
|
|
70
74
|
--astryx-step-connector-gap: initial;
|
|
71
75
|
/* 外面容器传给 Text 的 anywhere 换行也停在这里,浮层里的 Text 回到自己的 break-word。 */
|
package/styles/mobile-nav.css
CHANGED
package/styles/resize-handle.css
CHANGED
|
@@ -198,4 +198,15 @@
|
|
|
198
198
|
opacity: 1;
|
|
199
199
|
background-color: var(--astryx-color-border-emphasized, #d4d4d4);
|
|
200
200
|
}
|
|
201
|
+
|
|
202
|
+
/* 减少动效(系统设置或主题对所有人减少)时握把的显隐、变色和位移立刻落定。 */
|
|
203
|
+
@media (prefers-reduced-motion: reduce) {
|
|
204
|
+
.astryx-resize-handle-pill {
|
|
205
|
+
transition-duration: 0s;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where([data-astryx-reduced-motion]) .astryx-resize-handle-pill {
|
|
210
|
+
transition-duration: 0s;
|
|
211
|
+
}
|
|
201
212
|
}
|
package/styles/section.css
CHANGED
|
@@ -60,4 +60,19 @@
|
|
|
60
60
|
.astryx-section__inner[data-divider-end] {
|
|
61
61
|
border-inline-end: 1px solid var(--astryx-color-border, #ebebeb);
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* 有 minHeight 时,height: 100% 解析成内容高度,所以外层变成纵向弹性容器,上色的内层长到外层达到的高度。
|
|
66
|
+
* 只在这时这样做:作为弹性项目,内层会包住子元素的外边距和浮动。
|
|
67
|
+
*/
|
|
68
|
+
.astryx-section--fills-min-height {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.astryx-section--fills-min-height > .astryx-section__inner {
|
|
74
|
+
flex-grow: 1;
|
|
75
|
+
/* 外层被设了 height 而内容更高时,内容照常溢出上色的内层,不把它撑高。 */
|
|
76
|
+
min-height: 0;
|
|
77
|
+
}
|
|
63
78
|
}
|
|
@@ -43,9 +43,9 @@ 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;
|
|
48
47
|
color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
|
|
48
|
+
labelHidden: boolean;
|
|
49
49
|
removable: boolean;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
51
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|