@astryx-vue/core 0.7.29 → 0.9.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/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.d.ts +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-C8kE0YJh.js → Carousel-BOlQQSju.js} +82 -5
- 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.d.ts +1 -1
- package/dist/CommandPalette/index.d.ts +1 -1
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/Heading/index.d.ts +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/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-CcEXq6fT.js → InternationalizationProvider-BENPobyB.js} +1 -1
- 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/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +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/Popover/index.d.ts +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-2jO62NSM.js → PowerSearch-C8GQ3etS.js} +1 -1
- 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/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-sKQpWVKc.js → Table-C8ILhInV.js} +2 -2
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- 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/composables/index.d.ts +2 -2
- package/dist/composables/index.js +2 -2
- package/dist/{composables-lCxHhZQY.js → composables-CF4EnyHW.js} +441 -1
- package/dist/{index-DCxdesMw.d.ts → index-B62UAbz4.d.ts} +5 -5
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-dRBNR7Tq.d.ts → index-BNC-YmLY.d.ts} +144 -64
- package/dist/{index-BR3MOBYd.d.ts → index-BgT6mH3U.d.ts} +2 -2
- package/dist/{index-DY8Wph-A.d.ts → index-C1zwvxPH.d.ts} +2 -2
- package/dist/{index-D6pP-H_N.d.ts → index-CEWNso-N.d.ts} +1 -1
- package/dist/{index-BvWBeoa8.d.ts → index-CEjvYAUZ.d.ts} +1 -1
- package/dist/{index-CdvmnNMH.d.ts → index-COgrQZIL.d.ts} +1 -1
- package/dist/{index-BxWCX2pJ.d.ts → index-CP-fJFcJ.d.ts} +2 -2
- package/dist/{index-DKgonPjs.d.ts → index-Ccj-2j56.d.ts} +31 -1
- package/dist/{index-BMCjAlq6.d.ts → index-CfPGC9aW.d.ts} +1 -1
- package/dist/{index-C9ZssPUV.d.ts → index-CiVrhGUJ.d.ts} +1 -1
- package/dist/{index-MOtVbTwK.d.ts → index-CuW4AQ7M.d.ts} +2 -2
- package/dist/{index-DpYJBFJj.d.ts → index-Cun6cXGP.d.ts} +2 -2
- package/dist/{index-BPf_jmME.d.ts → index-D1JXm7Et.d.ts} +1 -1
- package/dist/{index-Cz72NaF_.d.ts → index-DTfA4uE3.d.ts} +2 -2
- package/dist/{index-pACjRM0E.d.ts → index-D_gk1H4N.d.ts} +14 -6
- package/dist/{index-CvLWh-d-.d.ts → index-DgW-eqEr.d.ts} +5 -5
- package/dist/{index-unAZVFGz.d.ts → index-Dy746dfn.d.ts} +1 -1
- package/dist/{index-CxdKu7d2.d.ts → index-MEix_m1o.d.ts} +1 -1
- package/dist/{index-Dlq0cFK-.d.ts → index-dWlCpnua.d.ts} +3 -3
- package/dist/{index-Bn-v89Vt.d.ts → index-mkbGYz8f.d.ts} +3 -3
- package/dist/{index-DZKv1WNB.d.ts → index-qayqGnJT.d.ts} +1 -1
- package/dist/{index-B16Jb5mf.d.ts → index-qsSn6gXx.d.ts} +7 -7
- package/dist/{index-CtYlR9Cu.d.ts → index-rdwI-mcm.d.ts} +1 -1
- package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
- package/dist/{index-C89cIh4E.d.ts → index-waTkqxTz.d.ts} +1 -1
- package/dist/{index-D4FgX9h3.d.ts → index-yhfD6HG9.d.ts} +3 -3
- package/dist/index.d.ts +31 -31
- package/dist/index.js +54 -9
- package/dist/{loadCatalog-BHlH2S6H.js → loadCatalog-CJs0hqbK.js} +1 -1
- package/dist/{loadCatalog-D_uf2uX1.d.ts → loadCatalog-TJL3Of5e.d.ts} +60 -2
- package/dist/locale/index.d.ts +4 -3
- package/dist/locale/index.js +49 -4
- package/dist/{locale-BGrZM4ow.js → locale-DD04T0Xc.js} +1 -1
- package/dist/{power-search-gHLIYXs5.d.ts → power-search-CqcsJT1F.d.ts} +6 -1
- package/dist/snapPagingValue-B5hfph1H.js +93 -0
- package/package.json +1 -1
- package/dist/index-BNbAJV9C.d.ts +0 -81
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-
|
|
1
|
+
import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-BNC-YmLY.js";
|
|
2
2
|
export { type FormatInstantOptions, type InstantFormat, _default as Timestamp, type TimestampColor, type TimestampFormat, type TimestampProps, type TimestampTooltipEntry, type TimestampTooltipFormat, type TimestampTooltipLine, formatInstant, formatRelativeTime, formatTooltipLines };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ToggleButtonEmits, B as ToggleButtonPressedChangeHandler, D as _default, E as _default$1, F as ToggleButtonGroupProps, H as ToggleButtonSize, I as ToggleButtonGroupSingleProps, L as ToggleButtonGroupSlots, M as ToggleButtonGroupEmits, N as ToggleButtonGroupMultipleProps, O as ToggleButtonChangeAction, P as ToggleButtonGroupOrientation, R as ToggleButtonGroupType, U as ToggleButtonSlots, V as ToggleButtonProps, j as ToggleButtonGroupBaseProps, k as ToggleButtonElevation, z as ToggleButtonGroupValue } from "../index-
|
|
1
|
+
import { A as ToggleButtonEmits, B as ToggleButtonPressedChangeHandler, D as _default, E as _default$1, F as ToggleButtonGroupProps, H as ToggleButtonSize, I as ToggleButtonGroupSingleProps, L as ToggleButtonGroupSlots, M as ToggleButtonGroupEmits, N as ToggleButtonGroupMultipleProps, O as ToggleButtonChangeAction, P as ToggleButtonGroupOrientation, R as ToggleButtonGroupType, U as ToggleButtonSlots, V as ToggleButtonProps, j as ToggleButtonGroupBaseProps, k as ToggleButtonElevation, z as ToggleButtonGroupValue } from "../index-BNC-YmLY.js";
|
|
2
2
|
export { _default as ToggleButton, _default as default, type ToggleButtonChangeAction, type ToggleButtonElevation, type ToggleButtonEmits, _default$1 as ToggleButtonGroup, type ToggleButtonGroupBaseProps, type ToggleButtonGroupEmits, type ToggleButtonGroupMultipleProps, type ToggleButtonGroupOrientation, type ToggleButtonGroupProps, type ToggleButtonGroupSingleProps, type ToggleButtonGroupSlots, type ToggleButtonGroupType, type ToggleButtonGroupValue, type ToggleButtonPressedChangeHandler, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TokenizerProps, c as TokenizerStatus, i as TokenizerOverflow, n as TokenizerChange, o as TokenizerSize, r as TokenizerEmits, s as TokenizerSlots, t as _default } from "../index-
|
|
1
|
+
import { a as TokenizerProps, c as TokenizerStatus, i as TokenizerOverflow, n as TokenizerChange, o as TokenizerSize, r as TokenizerEmits, s as TokenizerSlots, t as _default } from "../index-mkbGYz8f.js";
|
|
2
2
|
export { _default as Tokenizer, type TokenizerChange, type TokenizerEmits, type TokenizerOverflow, type TokenizerProps, type TokenizerSize, type TokenizerSlots, type TokenizerStatus };
|
package/dist/Toolbar/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { T as _default } from "../index-
|
|
1
|
+
import { T as _default } from "../index-BNC-YmLY.js";
|
|
2
2
|
import { $ as ToolbarSize, Q as ToolbarProps, Z as ToolbarOrientation } from "../useResizable-fEGAFziz.js";
|
|
3
3
|
export { _default as Toolbar, type ToolbarOrientation, type ToolbarProps, type ToolbarSize };
|
package/dist/Tooltip/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TooltipAlignment, c as TooltipProps, i as _default, l as TooltipTouchTrigger, n as UseTooltipReturn, o as TooltipFocusTrigger, r as useTooltip, s as TooltipPlacement, t as UseTooltipOptions } from "../index-
|
|
1
|
+
import { a as TooltipAlignment, c as TooltipProps, i as _default, l as TooltipTouchTrigger, n as UseTooltipReturn, o as TooltipFocusTrigger, r as useTooltip, s as TooltipPlacement, t as UseTooltipOptions } from "../index-DTfA4uE3.js";
|
|
2
2
|
export { _default as Tooltip, type TooltipAlignment, type TooltipFocusTrigger, type TooltipPlacement, type TooltipProps, type TooltipTouchTrigger, type UseTooltipOptions, type UseTooltipReturn, useTooltip };
|
package/dist/TopNav/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as TopNavMenuProps, S as TopNavMenuItem, _ as TopNavMegaMenuEmits, b as TopNavMegaMenuProps, c as _default$5, d as _default$2, f as _default$1, g as TopNavItemProps, h as TopNavItemEmits, l as _default$4, m as TopNavHeadingProps, p as _default, s as _default$6, u as _default$3, v as TopNavMegaMenuFeaturedCardProps, w as TopNavProps, x as TopNavMenuEmits, y as TopNavMegaMenuItemProps } from "../index-
|
|
1
|
+
import { C as TopNavMenuProps, S as TopNavMenuItem, _ as TopNavMegaMenuEmits, b as TopNavMegaMenuProps, c as _default$5, d as _default$2, f as _default$1, g as TopNavItemProps, h as TopNavItemEmits, l as _default$4, m as TopNavHeadingProps, p as _default, s as _default$6, u as _default$3, v as TopNavMegaMenuFeaturedCardProps, w as TopNavProps, x as TopNavMenuEmits, y as TopNavMegaMenuItemProps } from "../index-BNC-YmLY.js";
|
|
2
2
|
export { _default as TopNav, _default$1 as TopNavHeading, type TopNavHeadingProps, _default$2 as TopNavItem, type TopNavItemEmits, type TopNavItemProps, _default$3 as TopNavMegaMenu, type TopNavMegaMenuEmits, _default$4 as TopNavMegaMenuFeaturedCard, type TopNavMegaMenuFeaturedCardProps, _default$5 as TopNavMegaMenuItem, type TopNavMegaMenuItemProps, type TopNavMegaMenuProps, _default$6 as TopNavMenu, type TopNavMenuEmits, type TopNavMenuItem, type TopNavMenuProps, type TopNavProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as MergedRef, $n as ContainerRevealOptions, $t as useImageMode, A as useRestoreFocus, An as useDisclosureHandle, Ar as SnapPagingOptions, At as KeyboardHintOrientation, B as UseOverflowReturn, Bn as ParsedTime, Br as orderRange, Bt as UseInputStatusIconReturn, C as ScrollStickyContainment, Cn as UseEntryAnimationOptions, Cr as AppShellMobile, Ct as useLayerMountTarget, D as useScrollableArea, Dn as useDismiss, Dr as AnnouncePoliteness, Dt as UseLayerOptions, E as UseScrollableAreaResult, En as UseDismissOptions, Er as AnnounceFn, Et as LayerMode, F as PendingChange, Fn as resolveDatePresentation, Fr as compareISODate, Ft as UseInteractiveRoleOptions, G as UseNumberFieldOptions, Gn as isTimeInRange, Gt as IndicatorFocusRingHandlers, H as useOverflow, Hn as TimeSurface, Hr as spanDays, Ht as InputContainerHandlers, I as usePendingChange, In as resolveDateSurface, Ir as formatDateRange, It as UseInteractiveRoleReturn, J as addMonths, Jn as resolveTimeSurface, Jt as useIndicatorFocusRing, K as computeSteppedValue, Kn as parseDisplayTime, Kt as UseIndicatorFocusRingOptions, L as ComputeOverflowInput, Ln as HourFormat, Lr as isDayOutsideSpan, Lt as useInteractiveRole, M as UsePressFeedbackOptions, Mn as useDevWarning, Mr as RangeClickResult, Mt as UseKeyboardHintOptions, N as UsePressFeedbackReturn, Nn as DatePresentation, Nr as WeekStartsOn, Nt as useKeyboardHint, O as RestoreFocus, On as DisclosureHandle, Or as useAnnounce, Ot as UseLayerReturn, P as usePressFeedback, Pn as DateSurface, Pr as applyRangeClick, Pt as InteractiveRole, Q as todayISODate, Qn as useControllableState, Qt as perceptualLightness, R as ComputeOverflowResult, Rn as ISOTimeString, Rr as isRangeWithinSpan, Rt as InputStatusVariant, S as ScrollRole, Sn as EntryAnimationPreset, Sr as useChatNewMessages, St as useListFocus, T as UseScrollableAreaOptions, Tn as useEntryAnimation, Tr as useAppShellMobile, Tt as useResolvedLayerTeleport, U as NumberField, Un as formatDisplayTime, Ut as UseInputContainerOptions, V as computeOverflow, Vn as TimePresentation, Vr as resolveWeekStart, Vt as useInputStatusIcon, W as NumberStepDirection, Wn as formatISOTime, Wt as useInputContainer, X as parseISODate, Xn as ControllableState, Xt as UseImageModeOptions, Y as buildMonthGrid, Yn as shiftTime, Yt as ImageSampleRegion, Z as toISODate, Zn as UseControllableStateOptions, Zt as imageModeFromPixels, _ as useScrollLock, _n as formatFileSize, _r as UseChatStreamScrollReturn, _t as LongPressOptions, a as UseTouchTriggerOptions, an as UseGridRovingFocusOptions, ar as ComboboxOption, at as isMenuPressActivation, b as ScrollKeyboardAccess, bn as FieldControlStateInput, br as UseChatNewMessagesOptions, bt as ListFocusOrientation, c as useTouchTrigger, cn as UseGridFocusReturn, cr as useCoarsePointer, ct as MENU_PRESS_SETTLE_MS, d as snapToGraphemeBoundary, dn as UseFocusTrapOptions, dr as UseClickableContainerOptions, dt as MenuPressGesture, en as Hotkey, er as ContentRevealOptions, et as MergedRefHandle, f as useStreamingText, fn as useFocusTrap, fr as hasInteractiveAncestor, ft as MenuPressPointerType, g as useScrollOverflow, gn as FileSizeUnits, gr as UseChatStreamScrollOptions, gt as LongPressHandlers, h as UseScrollOverflowResult, hn as FileSelectionResult, hr as ChatScrollToBottomOptions, ht as useMediaQuery, i as LayerTouchTrigger, in as GridRovingFocus, ir as Combobox, it as useMenuPress, j as useResolvedLabelHidden, jn as devWarn, jr as ISODateRange, jt as UseKeyboardHint, k as UseRestoreFocusOptions, kn as DisclosureHandleRef, kr as SnapPaging, kt as useLayer, l as StreamingTextSpeed, ln as useGridFocus, lr as ClickableContainerHandlers, lt as MenuPressEffect, m as ScrollOverflowState, mn as FileSelectionOptions, mr as useClickableContainer, mt as menuPressStep, n as UseTypeaheadReturn, nn as HandleRef, nr as UseContainerRevealOptions, nt as MenuPress, o as UseTouchTriggerReturn, on as useGridRovingFocus, or as UseComboboxOptions, ot as resetMenuPress, p as useSnapPaging, pn as FileRejection, pr as hasTextSelection, pt as MenuPressStep, q as useNumberField, qn as parseISOTime, qt as UseIndicatorFocusRingReturn, r as useTypeahead, rn as useHandleRef, rr as useContainerReveal, rt as MenuPressOptions, s as isActionTrigger, sn as UseGridFocusOptions, sr as useCombobox, st as MENU_PRESS_MARKER, t as UseTypeaheadOptions, tn as useHotkeys, tr as UseContainerReveal, tt as useMergedRefs, u as UseStreamingTextOptions, un as FocusTrap, ur as INTERACTIVE_SELECTORS, ut as MenuPressEvent, v as ScrollAxis, vn as selectFiles, vr as useChatStreamScroll, vt as useLongPress, w as ScrollableAreaState, wn as UseEntryAnimationReturn, wr as appShellMobileKey, wt as useLayerTeleportTarget, x as ScrollOverscroll, xn as useFieldControlState, xr as UseChatNewMessagesReturn, xt as UseListFocusOptions, y as ScrollAxisState, yn as FieldControlState, yr as CHAT_MESSAGE_CLASS, yt as ListFocus, z as UseOverflowOptions, zn as NativePicker, zr as isSameRange, zt as UseInputStatusIconOptions } from "../index-Ccj-2j56.js";
|
|
2
2
|
import { a as SearchableItem, c as useAsyncSource, i as SearchSource, n as AsyncSourceStatus, o as UseAsyncSourceOptions, r as CreateStaticSourceOptions, s as createStaticSource, t as AsyncSource } from "../useAsyncSource-aGzrvRkI.js";
|
|
3
3
|
import { n as UseClipboardReturn, r as useClipboard, t as UseClipboardOptions } from "../useClipboard-CU-kfqeJ.js";
|
|
4
4
|
import { t as characterCount } from "../characters-rcDbGt71.js";
|
|
5
5
|
import { a as ResizableRegionConfig, c as UseResizableMultiConfig, d as percent, f as useResizable, i as ResizableRegion, l as UseResizableOptions, n as ResizablePercentSize, o as ResizableSize, r as ResizableProps, s as ResizableState, t as ResizableDirection, u as UseResizableSingleOptions } from "../useResizable-fEGAFziz.js";
|
|
6
|
-
export { type AnnounceFn, type AnnouncePoliteness, type AppShellMobile, type AsyncSource, type AsyncSourceStatus, CHAT_MESSAGE_CLASS, type ChatScrollToBottomOptions, type ClickableContainerHandlers, type Combobox, type ComboboxOption, type ComputeOverflowInput, type ComputeOverflowResult, type ContainerRevealOptions, type ContentRevealOptions, type ControllableState, type CreateStaticSourceOptions, type DatePresentation, type DateSurface, type DisclosureHandle, type DisclosureHandleRef, type EntryAnimationPreset, type FieldControlState, type FieldControlStateInput, type FileRejection, type FileSelectionOptions, type FileSelectionResult, type FileSizeUnits, type FocusTrap, type GridRovingFocus, type HandleRef, type Hotkey, type HourFormat, INTERACTIVE_SELECTORS, type ISODateRange, type ISOTimeString, type ImageSampleRegion, type IndicatorFocusRingHandlers, type InputContainerHandlers, type InputStatusVariant, type InteractiveRole, type KeyboardHintOrientation, type LayerMode, type LayerTouchTrigger, type ListFocus, type ListFocusOrientation, type LongPressHandlers, type LongPressOptions, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, type MenuPress, type MenuPressEffect, type MenuPressEvent, type MenuPressGesture, type MenuPressOptions, type MenuPressPointerType, type MenuPressStep, type MergedRef, type MergedRefHandle, type NativePicker, type NumberField, type NumberStepDirection, type ParsedTime, type PendingChange, type RangeClickResult, type ResizableDirection, type ResizablePercentSize, type ResizableProps, type ResizableRegion, type ResizableRegionConfig, type ResizableSize, type ResizableState, type RestoreFocus, type ScrollAxis, type ScrollAxisState, type ScrollKeyboardAccess, type ScrollOverflowState, type ScrollOverscroll, type ScrollRole, type ScrollStickyContainment, type ScrollableAreaState, type SearchSource, type SearchableItem, type StreamingTextSpeed, type TimePresentation, type TimeSurface, type UseAsyncSourceOptions, type UseChatNewMessagesOptions, type UseChatNewMessagesReturn, type UseChatStreamScrollOptions, type UseChatStreamScrollReturn, type UseClickableContainerOptions, type UseClipboardOptions, type UseClipboardReturn, type UseComboboxOptions, type UseContainerReveal, type UseContainerRevealOptions, type UseControllableStateOptions, type UseDismissOptions, type UseEntryAnimationOptions, type UseEntryAnimationReturn, type UseFocusTrapOptions, type UseGridFocusOptions, type UseGridFocusReturn, type UseGridRovingFocusOptions, type UseImageModeOptions, type UseIndicatorFocusRingOptions, type UseIndicatorFocusRingReturn, type UseInputContainerOptions, type UseInputStatusIconOptions, type UseInputStatusIconReturn, type UseInteractiveRoleOptions, type UseInteractiveRoleReturn, type UseKeyboardHint, type UseKeyboardHintOptions, type UseLayerOptions, type UseLayerReturn, type UseListFocusOptions, type UseNumberFieldOptions, type UseOverflowOptions, type UseOverflowReturn, type UsePressFeedbackOptions, type UsePressFeedbackReturn, type UseResizableMultiConfig, type UseResizableOptions, type UseResizableSingleOptions, type UseRestoreFocusOptions, type UseScrollOverflowResult, type UseScrollableAreaOptions, type UseScrollableAreaResult, type UseStreamingTextOptions, type UseTouchTriggerOptions, type UseTouchTriggerReturn, type UseTypeaheadOptions, type UseTypeaheadReturn, type WeekStartsOn, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useStreamingText, useTouchTrigger, useTypeahead };
|
|
6
|
+
export { type AnnounceFn, type AnnouncePoliteness, type AppShellMobile, type AsyncSource, type AsyncSourceStatus, CHAT_MESSAGE_CLASS, type ChatScrollToBottomOptions, type ClickableContainerHandlers, type Combobox, type ComboboxOption, type ComputeOverflowInput, type ComputeOverflowResult, type ContainerRevealOptions, type ContentRevealOptions, type ControllableState, type CreateStaticSourceOptions, type DatePresentation, type DateSurface, type DisclosureHandle, type DisclosureHandleRef, type EntryAnimationPreset, type FieldControlState, type FieldControlStateInput, type FileRejection, type FileSelectionOptions, type FileSelectionResult, type FileSizeUnits, type FocusTrap, type GridRovingFocus, type HandleRef, type Hotkey, type HourFormat, INTERACTIVE_SELECTORS, type ISODateRange, type ISOTimeString, type ImageSampleRegion, type IndicatorFocusRingHandlers, type InputContainerHandlers, type InputStatusVariant, type InteractiveRole, type KeyboardHintOrientation, type LayerMode, type LayerTouchTrigger, type ListFocus, type ListFocusOrientation, type LongPressHandlers, type LongPressOptions, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, type MenuPress, type MenuPressEffect, type MenuPressEvent, type MenuPressGesture, type MenuPressOptions, type MenuPressPointerType, type MenuPressStep, type MergedRef, type MergedRefHandle, type NativePicker, type NumberField, type NumberStepDirection, type ParsedTime, type PendingChange, type RangeClickResult, type ResizableDirection, type ResizablePercentSize, type ResizableProps, type ResizableRegion, type ResizableRegionConfig, type ResizableSize, type ResizableState, type RestoreFocus, type ScrollAxis, type ScrollAxisState, type ScrollKeyboardAccess, type ScrollOverflowState, type ScrollOverscroll, type ScrollRole, type ScrollStickyContainment, type ScrollableAreaState, type SearchSource, type SearchableItem, type SnapPaging, type SnapPagingOptions, type StreamingTextSpeed, type TimePresentation, type TimeSurface, type UseAsyncSourceOptions, type UseChatNewMessagesOptions, type UseChatNewMessagesReturn, type UseChatStreamScrollOptions, type UseChatStreamScrollReturn, type UseClickableContainerOptions, type UseClipboardOptions, type UseClipboardReturn, type UseComboboxOptions, type UseContainerReveal, type UseContainerRevealOptions, type UseControllableStateOptions, type UseDismissOptions, type UseEntryAnimationOptions, type UseEntryAnimationReturn, type UseFocusTrapOptions, type UseGridFocusOptions, type UseGridFocusReturn, type UseGridRovingFocusOptions, type UseImageModeOptions, type UseIndicatorFocusRingOptions, type UseIndicatorFocusRingReturn, type UseInputContainerOptions, type UseInputStatusIconOptions, type UseInputStatusIconReturn, type UseInteractiveRoleOptions, type UseInteractiveRoleReturn, type UseKeyboardHint, type UseKeyboardHintOptions, type UseLayerOptions, type UseLayerReturn, type UseListFocusOptions, type UseNumberFieldOptions, type UseOverflowOptions, type UseOverflowReturn, type UsePressFeedbackOptions, type UsePressFeedbackReturn, type UseResizableMultiConfig, type UseResizableOptions, type UseResizableSingleOptions, type UseRestoreFocusOptions, type UseScrollOverflowResult, type UseScrollableAreaOptions, type UseScrollableAreaResult, type UseStreamingTextOptions, type UseTouchTriggerOptions, type UseTouchTriggerReturn, type UseTypeaheadOptions, type UseTypeaheadReturn, type WeekStartsOn, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useSnapPaging, useStreamingText, useTouchTrigger, useTypeahead };
|
|
@@ -13,7 +13,7 @@ import { n as useAsyncSource, t as createStaticSource } from "../useAsyncSource-
|
|
|
13
13
|
import { n as CHAT_MESSAGE_CLASS, r as useChatNewMessages, t as useChatStreamScroll } from "../useChatStreamScroll-oDfybEos.js";
|
|
14
14
|
import { t as useClipboard } from "../useClipboard-Dk8cS810.js";
|
|
15
15
|
import { t as useCombobox } from "../useCombobox-CTo5C-gc.js";
|
|
16
|
-
import { a as
|
|
16
|
+
import { a as useSnapPaging, c as imageModeFromPixels, d as useGridRovingFocus, f as useGridFocus, h as useContainerReveal, i as useStreamingText, l as perceptualLightness, m as useControllableState, n as useTouchTrigger, o as useKeyboardHint, p as useEntryAnimation, r as snapToGraphemeBoundary, s as useIndicatorFocusRing, t as isActionTrigger, u as useImageMode } from "../composables-CF4EnyHW.js";
|
|
17
17
|
import { n as resolveDateSurface, t as resolveDatePresentation } from "../useDatePresentation-C07PnOCw.js";
|
|
18
18
|
import { a as isRangeWithinSpan, c as resolveWeekStart, i as isDayOutsideSpan, l as spanDays, n as compareISODate, o as isSameRange, r as formatDateRange, s as orderRange, t as applyRangeClick } from "../useDateRange-CIXoE_8k.js";
|
|
19
19
|
import { n as useDevWarning, t as devWarn } from "../useDevWarning-B2fsk2B-.js";
|
|
@@ -39,4 +39,4 @@ import { t as useScrollLock } from "../scrollLock-C3aT4-0z.js";
|
|
|
39
39
|
import { t as useScrollOverflow } from "../useScrollOverflow-DuMoGXmm.js";
|
|
40
40
|
import { a as parseISOTime, i as parseDisplayTime, n as formatISOTime, o as resolveTimeSurface, r as isTimeInRange, s as shiftTime, t as formatDisplayTime } from "../useTimeValue-BJd0xBhG.js";
|
|
41
41
|
import { t as useTypeahead } from "../useTypeahead-BvtflkRk.js";
|
|
42
|
-
export { CHAT_MESSAGE_CLASS, INTERACTIVE_SELECTORS, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useStreamingText, useTouchTrigger, useTypeahead };
|
|
42
|
+
export { CHAT_MESSAGE_CLASS, INTERACTIVE_SELECTORS, MENU_PRESS_MARKER, MENU_PRESS_SETTLE_MS, addMonths, appShellMobileKey, applyRangeClick, buildMonthGrid, compareISODate, computeOverflow, computeSteppedValue, characterCount as countCharacters, createStaticSource, devWarn, formatDateRange, formatDisplayTime, formatFileSize, formatISOTime, hasInteractiveAncestor, hasTextSelection, imageModeFromPixels, isActionTrigger, isDayOutsideSpan, isMenuPressActivation, isRangeWithinSpan, isSameRange, isTimeInRange, menuPressStep, orderRange, parseDisplayTime, parseISODate, parseISOTime, percent, perceptualLightness, resetMenuPress, resolveDatePresentation, resolveDateSurface, resolveTimeSurface, resolveWeekStart, selectFiles, shiftTime, snapToGraphemeBoundary, spanDays, toISODate, todayISODate, useAnnounce, useAppShellMobile, useAsyncSource, useChatNewMessages, useChatStreamScroll, useClickableContainer, useClipboard, useCoarsePointer, useCombobox, useContainerReveal, useControllableState, useDevWarning, useDisclosureHandle, useDismiss, useEntryAnimation, useFieldControlState, useFocusTrap, useGridFocus, useGridRovingFocus, useHandleRef, useHotkeys, useImageMode, useIndicatorFocusRing, useInputContainer, useInputStatusIcon, useInteractiveRole, useKeyboardHint, useLayer, useLayerMountTarget, useLayerTeleportTarget, useListFocus, useLongPress, useMediaQuery, useMenuPress, useMergedRefs, useNumberField, useOverflow, usePendingChange, usePressFeedback, useResizable, useResolvedLabelHidden, useResolvedLayerTeleport, useRestoreFocus, useScrollLock, useScrollOverflow, useScrollableArea, useSnapPaging, useStreamingText, useTouchTrigger, useTypeahead };
|
|
@@ -3,6 +3,7 @@ import { t as useMediaQuery } from "./useMediaQuery-GMmgp28-.js";
|
|
|
3
3
|
import { o as useComponentMessages } from "./context-B8IEFCDR.js";
|
|
4
4
|
import { t as _sfc_main$1 } from "./Kbd-D4JPY4VI.js";
|
|
5
5
|
import { t as keyboardHintMessages } from "./keyboard-hint-KWx0-7kD.js";
|
|
6
|
+
import { r as makeSnapPaging, s as snapPages } from "./snapPagingValue-B5hfph1H.js";
|
|
6
7
|
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, h, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, ref, renderList, toDisplayString, toValue, unref, vShow, watch, withDirectives } from "vue";
|
|
7
8
|
import "../styles/indicator-focus-ring.css";
|
|
8
9
|
import "../styles/keyboard-hint.css";
|
|
@@ -663,6 +664,445 @@ function useKeyboardHint(options = {}) {
|
|
|
663
664
|
};
|
|
664
665
|
}
|
|
665
666
|
//#endregion
|
|
667
|
+
//#region src/composables/internal/snapPagingMotion.ts
|
|
668
|
+
const browserClock = {
|
|
669
|
+
now: () => performance.now(),
|
|
670
|
+
frame: (callback) => requestAnimationFrame(() => callback()),
|
|
671
|
+
cancel: (handle) => cancelAnimationFrame(handle)
|
|
672
|
+
};
|
|
673
|
+
/** 只看最近这么久的位置算速度。 */
|
|
674
|
+
const VELOCITY_WINDOW_MS = 100;
|
|
675
|
+
/** 最后一次移动之后停了这么久,就当手指已经停住,速度为 0。 */
|
|
676
|
+
const STILL_AFTER_MS = 50;
|
|
677
|
+
/** 记录拖动中的位置,算出松手时的速度(像素每秒,朝末端为正)。 */
|
|
678
|
+
function createVelocitySampler() {
|
|
679
|
+
let samples = [];
|
|
680
|
+
return {
|
|
681
|
+
add(time, position) {
|
|
682
|
+
samples.push({
|
|
683
|
+
time,
|
|
684
|
+
position
|
|
685
|
+
});
|
|
686
|
+
samples = samples.filter((sample) => time - sample.time <= VELOCITY_WINDOW_MS);
|
|
687
|
+
},
|
|
688
|
+
reset() {
|
|
689
|
+
samples = [];
|
|
690
|
+
},
|
|
691
|
+
velocity(time) {
|
|
692
|
+
const last = samples[samples.length - 1];
|
|
693
|
+
const first = samples[0];
|
|
694
|
+
if (last == null || first == null || last === first || time - last.time > STILL_AFTER_MS) return 0;
|
|
695
|
+
const elapsed = last.time - first.time;
|
|
696
|
+
return elapsed > 0 ? (last.position - first.position) / elapsed * 1e3 : 0;
|
|
697
|
+
},
|
|
698
|
+
lastTime() {
|
|
699
|
+
return samples[samples.length - 1]?.time ?? null;
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
/** 下标列表里离 `to` 最近的那一个。 */
|
|
704
|
+
function nearestIndex(stops, to) {
|
|
705
|
+
let best = 0;
|
|
706
|
+
for (let i = 1; i < stops.length; i++) if (Math.abs(stops[i] - to) < Math.abs(stops[best] - to)) best = i;
|
|
707
|
+
return best;
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
710
|
+
* 从第 `anchor` 个停点算起的「一屏一页」:每一页落在离上一页一屏远最近的停点上,
|
|
711
|
+
* 并且至少往前走一个停点。
|
|
712
|
+
*/
|
|
713
|
+
function viewPages(stops, anchor, width) {
|
|
714
|
+
const pages = [stops[anchor]];
|
|
715
|
+
for (let i = anchor; i < stops.length - 1;) {
|
|
716
|
+
i = Math.max(nearestIndex(stops, stops[i] + width), i + 1);
|
|
717
|
+
pages.push(stops[i]);
|
|
718
|
+
}
|
|
719
|
+
for (let i = anchor; i > 0;) {
|
|
720
|
+
i = Math.min(nearestIndex(stops, stops[i] - width), i - 1);
|
|
721
|
+
pages.unshift(stops[i]);
|
|
722
|
+
}
|
|
723
|
+
return pages;
|
|
724
|
+
}
|
|
725
|
+
/** 松手后按这个时长(秒)把速度投出去,再找离投点最近的一页。 */
|
|
726
|
+
const PROJECTION_SECONDS = .1;
|
|
727
|
+
/**
|
|
728
|
+
* 松手时停在哪一页:轻扫至少翻到运动方向上的下一页,慢慢松手就停在投点最近的一页。
|
|
729
|
+
* 不论多快,离起手那一页(`anchor`)最多一页。返回页的下标。
|
|
730
|
+
*/
|
|
731
|
+
function pickPage(pages, at, velocity, anchor) {
|
|
732
|
+
let index = nearestIndex(pages, at + velocity * PROJECTION_SECONDS);
|
|
733
|
+
if (velocity >= 300) {
|
|
734
|
+
const ahead = pages.findIndex((page) => page > at + .5);
|
|
735
|
+
if (ahead !== -1) index = Math.max(index, ahead);
|
|
736
|
+
} else if (velocity <= -300) {
|
|
737
|
+
let behind = -1;
|
|
738
|
+
for (let i = pages.length - 1; i >= 0; i--) if (pages[i] < at - .5) {
|
|
739
|
+
behind = i;
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
if (behind !== -1) index = Math.min(index, behind);
|
|
743
|
+
}
|
|
744
|
+
return Math.min(Math.max(index, anchor - 1, 0), anchor + 1, pages.length - 1);
|
|
745
|
+
}
|
|
746
|
+
/** 弹簧的固有角频率:大约 0.4 秒走完一页,接近 UIKit 翻页的手感。 */
|
|
747
|
+
const SPRING_OMEGA = 2 * Math.PI / .4;
|
|
748
|
+
/** 轻扫很快时弹簧可以收得更紧,但不超过这个角频率。 */
|
|
749
|
+
const MAX_OMEGA = 60;
|
|
750
|
+
const REST_DISTANCE = .5;
|
|
751
|
+
const REST_VELOCITY = 20;
|
|
752
|
+
/**
|
|
753
|
+
* 用临界阻尼弹簧把位置从 `from` 带到 `to`,带着初速度 `velocity`(像素每秒)。
|
|
754
|
+
* 每一帧调用 `onFrame`,停稳后最后一次给出 `to` 并调用 `onRest`。
|
|
755
|
+
*/
|
|
756
|
+
function springTo(clock, from, to, velocity, onFrame, onRest) {
|
|
757
|
+
const start = clock.now();
|
|
758
|
+
const offset0 = from - to;
|
|
759
|
+
const toward = offset0 === 0 ? 0 : -velocity * Math.sign(offset0);
|
|
760
|
+
const omega = Math.max(SPRING_OMEGA, Math.min(MAX_OMEGA, toward / Math.max(Math.abs(offset0), 1e-6)));
|
|
761
|
+
let handle = 0;
|
|
762
|
+
let stopped = false;
|
|
763
|
+
function state(time) {
|
|
764
|
+
const t = Math.max(0, time - start) / 1e3;
|
|
765
|
+
const decay = Math.exp(-omega * t);
|
|
766
|
+
const b = velocity + omega * offset0;
|
|
767
|
+
return {
|
|
768
|
+
offset: (offset0 + b * t) * decay,
|
|
769
|
+
velocity: (b - omega * (offset0 + b * t)) * decay
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
function tick() {
|
|
773
|
+
if (stopped) return;
|
|
774
|
+
const now = state(clock.now());
|
|
775
|
+
if (Math.abs(now.offset) < REST_DISTANCE && Math.abs(now.velocity) < REST_VELOCITY) {
|
|
776
|
+
stopped = true;
|
|
777
|
+
onFrame(to);
|
|
778
|
+
onRest();
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
onFrame(to + now.offset);
|
|
782
|
+
handle = clock.frame(tick);
|
|
783
|
+
}
|
|
784
|
+
handle = clock.frame(tick);
|
|
785
|
+
return {
|
|
786
|
+
target: to,
|
|
787
|
+
velocity: () => stopped ? 0 : state(clock.now()).velocity,
|
|
788
|
+
stop() {
|
|
789
|
+
stopped = true;
|
|
790
|
+
clock.cancel(handle);
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/composables/internal/snapPagingSkip.ts
|
|
796
|
+
/**
|
|
797
|
+
* 原生吸附要跳过末端那一页吞掉的项(见 `snapPages`),这样滚轮、方向键和
|
|
798
|
+
* 普通滚动也停在和轻扫同样的页上。被跳过的项交还时恢复自己原来的行内值。
|
|
799
|
+
* 停点随尺寸和子项变化,最多一帧算一次;分页按住这一行时,等交还时再写。
|
|
800
|
+
*/
|
|
801
|
+
function followSkippedStops(element, track) {
|
|
802
|
+
const skipped = /* @__PURE__ */ new Map();
|
|
803
|
+
let frame = null;
|
|
804
|
+
let isDue = false;
|
|
805
|
+
function restore(item, own) {
|
|
806
|
+
if (own.value === "") item.style.removeProperty("scroll-snap-align");
|
|
807
|
+
else item.style.setProperty("scroll-snap-align", own.value, own.priority);
|
|
808
|
+
}
|
|
809
|
+
function skip(items) {
|
|
810
|
+
for (const [item, own] of skipped) if (!items.includes(item)) {
|
|
811
|
+
skipped.delete(item);
|
|
812
|
+
restore(item, own);
|
|
813
|
+
}
|
|
814
|
+
for (const item of items) if (item instanceof HTMLElement && !skipped.has(item)) {
|
|
815
|
+
skipped.set(item, {
|
|
816
|
+
value: item.style.getPropertyValue("scroll-snap-align"),
|
|
817
|
+
priority: item.style.getPropertyPriority("scroll-snap-align")
|
|
818
|
+
});
|
|
819
|
+
item.style.setProperty("scroll-snap-align", "none");
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
function apply() {
|
|
823
|
+
isDue = false;
|
|
824
|
+
skip(track.pages().skipped);
|
|
825
|
+
}
|
|
826
|
+
function schedule() {
|
|
827
|
+
if (track.isHeld()) {
|
|
828
|
+
isDue = true;
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
if (frame != null || typeof requestAnimationFrame !== "function") return;
|
|
832
|
+
frame = requestAnimationFrame(() => {
|
|
833
|
+
frame = null;
|
|
834
|
+
if (track.isHeld()) isDue = true;
|
|
835
|
+
else apply();
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
const resize = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
|
|
839
|
+
function observeItems() {
|
|
840
|
+
if (resize == null) return;
|
|
841
|
+
resize.disconnect();
|
|
842
|
+
resize.observe(element);
|
|
843
|
+
for (const item of Array.from(element.children)) resize.observe(item);
|
|
844
|
+
}
|
|
845
|
+
const mutations = typeof MutationObserver === "undefined" ? null : new MutationObserver(() => {
|
|
846
|
+
observeItems();
|
|
847
|
+
schedule();
|
|
848
|
+
});
|
|
849
|
+
mutations?.observe(element, { childList: true });
|
|
850
|
+
observeItems();
|
|
851
|
+
schedule();
|
|
852
|
+
return {
|
|
853
|
+
takeDue: () => isDue ? apply : void 0,
|
|
854
|
+
stop() {
|
|
855
|
+
mutations?.disconnect();
|
|
856
|
+
resize?.disconnect();
|
|
857
|
+
if (frame != null) cancelAnimationFrame(frame);
|
|
858
|
+
frame = null;
|
|
859
|
+
skip([]);
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
//#endregion
|
|
864
|
+
//#region src/composables/internal/snapPagingTrack.ts
|
|
865
|
+
function createSnapTrack(element, onHeld) {
|
|
866
|
+
let held = false;
|
|
867
|
+
let heldAt = 0;
|
|
868
|
+
let heldTravel = 0;
|
|
869
|
+
let sign = 1;
|
|
870
|
+
let ownSnapType = "";
|
|
871
|
+
let ownSnapPriority = "";
|
|
872
|
+
const isRtl = () => getComputedStyle(element).direction === "rtl";
|
|
873
|
+
const nativeTravel = () => Math.max(0, element.scrollWidth - element.clientWidth);
|
|
874
|
+
const position = () => held ? heldAt : Math.abs(element.scrollLeft);
|
|
875
|
+
const travel = () => held ? heldTravel : nativeTravel();
|
|
876
|
+
function write(at) {
|
|
877
|
+
element.scrollTo({
|
|
878
|
+
left: sign * at,
|
|
879
|
+
behavior: "instant"
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
function report() {
|
|
883
|
+
onHeld?.({
|
|
884
|
+
offset: heldAt,
|
|
885
|
+
travel: heldTravel
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
return {
|
|
889
|
+
isHeld: () => held,
|
|
890
|
+
position,
|
|
891
|
+
travel,
|
|
892
|
+
pages: () => snapPages(element, position(), travel()),
|
|
893
|
+
viewWidth() {
|
|
894
|
+
const style = getComputedStyle(element);
|
|
895
|
+
const padding = (Number.parseFloat(style.scrollPaddingLeft) || 0) + (Number.parseFloat(style.scrollPaddingRight) || 0);
|
|
896
|
+
return Math.max(1, element.clientWidth - padding);
|
|
897
|
+
},
|
|
898
|
+
takeOver() {
|
|
899
|
+
if (held) return;
|
|
900
|
+
sign = isRtl() ? -1 : 1;
|
|
901
|
+
heldAt = Math.abs(element.scrollLeft);
|
|
902
|
+
heldTravel = nativeTravel();
|
|
903
|
+
ownSnapType = element.style.getPropertyValue("scroll-snap-type");
|
|
904
|
+
ownSnapPriority = element.style.getPropertyPriority("scroll-snap-type");
|
|
905
|
+
element.style.setProperty("scroll-snap-type", "none");
|
|
906
|
+
held = true;
|
|
907
|
+
report();
|
|
908
|
+
},
|
|
909
|
+
place(at) {
|
|
910
|
+
if (!held) return;
|
|
911
|
+
heldAt = Math.min(Math.max(at, 0), heldTravel);
|
|
912
|
+
write(heldAt);
|
|
913
|
+
report();
|
|
914
|
+
},
|
|
915
|
+
handBack(beforeSnap) {
|
|
916
|
+
if (!held) return;
|
|
917
|
+
held = false;
|
|
918
|
+
beforeSnap?.();
|
|
919
|
+
if (ownSnapType === "") element.style.removeProperty("scroll-snap-type");
|
|
920
|
+
else element.style.setProperty("scroll-snap-type", ownSnapType, ownSnapPriority);
|
|
921
|
+
write(heldAt);
|
|
922
|
+
if (onHeld != null) {
|
|
923
|
+
onHeld({
|
|
924
|
+
offset: heldAt,
|
|
925
|
+
travel: heldTravel
|
|
926
|
+
});
|
|
927
|
+
onHeld(null);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region src/composables/internal/snapPagingAttach.ts
|
|
934
|
+
/** 手指移动超过这么多像素才算拖动;先往竖直方向走的交给页面滚动。 */
|
|
935
|
+
const DRAG_SLOP = 6;
|
|
936
|
+
function prefersReducedMotion() {
|
|
937
|
+
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* 把吸附分页挂到滚动行上。手指、触控笔和触控板横扫会接管这一行,停稳后交还;
|
|
941
|
+
* 鼠标拖动和鼠标滚轮仍然是原生滚动。
|
|
942
|
+
*/
|
|
943
|
+
function attachPaging(element, options, onHeld, clock = browserClock) {
|
|
944
|
+
const track = createSnapTrack(element, onHeld);
|
|
945
|
+
const skip = followSkippedStops(element, track);
|
|
946
|
+
const sampler = createVelocitySampler();
|
|
947
|
+
let pages = [0];
|
|
948
|
+
let anchor = 0;
|
|
949
|
+
let sign = 1;
|
|
950
|
+
let motion = null;
|
|
951
|
+
let drag = null;
|
|
952
|
+
let wheelTimer = null;
|
|
953
|
+
function hold() {
|
|
954
|
+
motion?.stop();
|
|
955
|
+
motion = null;
|
|
956
|
+
track.takeOver();
|
|
957
|
+
sign = getComputedStyle(element).direction === "rtl" ? -1 : 1;
|
|
958
|
+
const at = track.position();
|
|
959
|
+
const { stops } = track.pages();
|
|
960
|
+
pages = (options().pages ?? "view") === "item" ? stops : viewPages(stops, nearestIndex(stops, at), track.viewWidth());
|
|
961
|
+
anchor = nearestIndex(pages, at);
|
|
962
|
+
}
|
|
963
|
+
function finish() {
|
|
964
|
+
if (drag?.isActive || wheelTimer != null) return;
|
|
965
|
+
track.handBack(skip.takeDue());
|
|
966
|
+
}
|
|
967
|
+
function settleTo(target, velocity) {
|
|
968
|
+
motion?.stop();
|
|
969
|
+
motion = null;
|
|
970
|
+
if (prefersReducedMotion()) {
|
|
971
|
+
track.place(target);
|
|
972
|
+
finish();
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
motion = springTo(clock, track.position(), target, velocity, (at) => track.place(at), () => {
|
|
976
|
+
motion = null;
|
|
977
|
+
finish();
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
function release(velocity) {
|
|
981
|
+
const at = track.position();
|
|
982
|
+
settleTo(pages[pickPage(pages, at, velocity, anchor)] ?? at, velocity);
|
|
983
|
+
}
|
|
984
|
+
function onPointerDown(event) {
|
|
985
|
+
if (event.pointerType === "mouse" || !event.isPrimary) return;
|
|
986
|
+
const caught = motion != null;
|
|
987
|
+
if (caught) hold();
|
|
988
|
+
drag = {
|
|
989
|
+
id: event.pointerId,
|
|
990
|
+
x: event.clientX,
|
|
991
|
+
y: event.clientY,
|
|
992
|
+
from: track.position(),
|
|
993
|
+
isActive: caught
|
|
994
|
+
};
|
|
995
|
+
sampler.reset();
|
|
996
|
+
if (caught) sampler.add(clock.now(), track.position());
|
|
997
|
+
}
|
|
998
|
+
function onPointerMove(event) {
|
|
999
|
+
if (drag == null || event.pointerId !== drag.id) return;
|
|
1000
|
+
if (!drag.isActive) {
|
|
1001
|
+
const dx = event.clientX - drag.x;
|
|
1002
|
+
const dy = event.clientY - drag.y;
|
|
1003
|
+
if (Math.abs(dx) < DRAG_SLOP && Math.abs(dy) < DRAG_SLOP) return;
|
|
1004
|
+
if (Math.abs(dy) > Math.abs(dx) || track.travel() <= 1) {
|
|
1005
|
+
drag = null;
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
hold();
|
|
1009
|
+
drag.isActive = true;
|
|
1010
|
+
drag.x = event.clientX;
|
|
1011
|
+
drag.from = track.position();
|
|
1012
|
+
try {
|
|
1013
|
+
element.setPointerCapture(event.pointerId);
|
|
1014
|
+
} catch {}
|
|
1015
|
+
}
|
|
1016
|
+
event.preventDefault();
|
|
1017
|
+
track.place(drag.from - sign * (event.clientX - drag.x));
|
|
1018
|
+
sampler.add(clock.now(), track.position());
|
|
1019
|
+
}
|
|
1020
|
+
function endDrag(event, velocity) {
|
|
1021
|
+
if (drag == null || event.pointerId !== drag.id) return;
|
|
1022
|
+
const wasActive = drag.isActive;
|
|
1023
|
+
drag = null;
|
|
1024
|
+
if (wasActive) release(velocity(clock.now()));
|
|
1025
|
+
}
|
|
1026
|
+
const onPointerUp = (event) => endDrag(event, (now) => sampler.velocity(now));
|
|
1027
|
+
const onPointerCancel = (event) => endDrag(event, () => 0);
|
|
1028
|
+
function onWheel(event) {
|
|
1029
|
+
if (event.defaultPrevented || event.deltaMode !== 0 || event.deltaX === 0 || Math.abs(event.deltaX) <= Math.abs(event.deltaY)) return;
|
|
1030
|
+
if (drag?.isActive) {
|
|
1031
|
+
event.preventDefault();
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
if (wheelTimer == null) {
|
|
1035
|
+
if (!track.isHeld() && track.travel() <= 1) return;
|
|
1036
|
+
hold();
|
|
1037
|
+
sampler.reset();
|
|
1038
|
+
} else clearTimeout(wheelTimer);
|
|
1039
|
+
event.preventDefault();
|
|
1040
|
+
const low = pages[anchor - 1] ?? pages[0] ?? 0;
|
|
1041
|
+
const high = pages[anchor + 1] ?? pages[pages.length - 1] ?? 0;
|
|
1042
|
+
track.place(Math.min(Math.max(track.position() + sign * event.deltaX, low), high));
|
|
1043
|
+
sampler.add(clock.now(), track.position());
|
|
1044
|
+
wheelTimer = setTimeout(() => {
|
|
1045
|
+
wheelTimer = null;
|
|
1046
|
+
release(sampler.velocity(sampler.lastTime() ?? clock.now()));
|
|
1047
|
+
}, 120);
|
|
1048
|
+
}
|
|
1049
|
+
function move(target) {
|
|
1050
|
+
if (drag?.isActive) return;
|
|
1051
|
+
const velocity = motion?.velocity() ?? 0;
|
|
1052
|
+
if (wheelTimer != null) {
|
|
1053
|
+
clearTimeout(wheelTimer);
|
|
1054
|
+
wheelTimer = null;
|
|
1055
|
+
}
|
|
1056
|
+
hold();
|
|
1057
|
+
const end = track.travel();
|
|
1058
|
+
settleTo(Math.min(Math.max(target(track.position(), end), 0), end), velocity);
|
|
1059
|
+
}
|
|
1060
|
+
const ownTouchAction = element.style.getPropertyValue("touch-action");
|
|
1061
|
+
element.style.setProperty("touch-action", "pan-y pinch-zoom");
|
|
1062
|
+
element.addEventListener("pointerdown", onPointerDown);
|
|
1063
|
+
element.addEventListener("pointermove", onPointerMove);
|
|
1064
|
+
element.addEventListener("pointerup", onPointerUp);
|
|
1065
|
+
element.addEventListener("pointercancel", onPointerCancel);
|
|
1066
|
+
element.addEventListener("wheel", onWheel, { passive: false });
|
|
1067
|
+
return {
|
|
1068
|
+
detach() {
|
|
1069
|
+
element.removeEventListener("pointerdown", onPointerDown);
|
|
1070
|
+
element.removeEventListener("pointermove", onPointerMove);
|
|
1071
|
+
element.removeEventListener("pointerup", onPointerUp);
|
|
1072
|
+
element.removeEventListener("pointercancel", onPointerCancel);
|
|
1073
|
+
element.removeEventListener("wheel", onWheel);
|
|
1074
|
+
if (ownTouchAction === "") element.style.removeProperty("touch-action");
|
|
1075
|
+
else element.style.setProperty("touch-action", ownTouchAction);
|
|
1076
|
+
if (wheelTimer != null) clearTimeout(wheelTimer);
|
|
1077
|
+
wheelTimer = null;
|
|
1078
|
+
motion?.stop();
|
|
1079
|
+
motion = null;
|
|
1080
|
+
drag = null;
|
|
1081
|
+
track.handBack();
|
|
1082
|
+
skip.stop();
|
|
1083
|
+
},
|
|
1084
|
+
move,
|
|
1085
|
+
moveHeld(target) {
|
|
1086
|
+
if (!track.isHeld()) return false;
|
|
1087
|
+
move(target);
|
|
1088
|
+
return true;
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region src/composables/useSnapPaging.ts
|
|
1094
|
+
/**
|
|
1095
|
+
* 给 Carousel 的吸附停点加上 iOS 式翻页:`<Carousel :has-snap="paging">`,
|
|
1096
|
+
* 其中 `const paging = useSnapPaging()`。手指或触控板横扫时,一次轻扫翻一屏,
|
|
1097
|
+
* 传 `{ pages: 'item' }` 时翻一项,停在某一项的起始边。鼠标滚轮和鼠标拖动保持原生滚动。
|
|
1098
|
+
*
|
|
1099
|
+
* `options` 可以是 ref 或 getter,新的 `pages` 从下一次轻扫开始生效。
|
|
1100
|
+
* Carousel 一直用它第一次挂上的那个值。
|
|
1101
|
+
*/
|
|
1102
|
+
function useSnapPaging(options = {}) {
|
|
1103
|
+
return makeSnapPaging((element, onHeld) => attachPaging(element, () => toValue(options), onHeld));
|
|
1104
|
+
}
|
|
1105
|
+
//#endregion
|
|
666
1106
|
//#region src/composables/useStreamingText.ts
|
|
667
1107
|
const CHARS_PER_TICK = {
|
|
668
1108
|
natural: 10,
|
|
@@ -889,4 +1329,4 @@ function useTouchTrigger(options) {
|
|
|
889
1329
|
};
|
|
890
1330
|
}
|
|
891
1331
|
//#endregion
|
|
892
|
-
export {
|
|
1332
|
+
export { useSnapPaging as a, imageModeFromPixels as c, useGridRovingFocus as d, useGridFocus as f, useContainerReveal as h, useStreamingText as i, perceptualLightness as l, useControllableState as m, useTouchTrigger as n, useKeyboardHint as o, useEntryAnimation as p, snapToGraphemeBoundary as r, useIndicatorFocusRing as s, isActionTrigger as t, useImageMode as u };
|
|
@@ -174,31 +174,31 @@ declare const __VLS_base: import("vue").DefineComponent<MultiSelectorProps, {
|
|
|
174
174
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
175
175
|
search: (query: string) => any;
|
|
176
176
|
click: (event: MouseEvent) => any;
|
|
177
|
+
focus: (event: FocusEvent) => any;
|
|
177
178
|
change: (value: (string | number)[], change?: MultiSelectorCreateChange | undefined) => any;
|
|
178
179
|
keydown: (event: KeyboardEvent) => any;
|
|
179
180
|
openChange: (isOpen: boolean) => any;
|
|
180
181
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
181
|
-
focus: (event: FocusEvent) => any;
|
|
182
182
|
}, string, import("vue").PublicProps, Readonly<MultiSelectorProps> & Readonly<{
|
|
183
183
|
onSearch?: ((query: string) => any) | undefined;
|
|
184
184
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
185
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
185
186
|
onChange?: ((value: (string | number)[], change?: MultiSelectorCreateChange | undefined) => any) | undefined;
|
|
186
187
|
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
187
188
|
onOpenChange?: ((isOpen: boolean) => any) | undefined;
|
|
188
189
|
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
189
|
-
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
190
190
|
}>, {
|
|
191
191
|
required: boolean;
|
|
192
192
|
isLoading: boolean;
|
|
193
193
|
variant: MultiSelectorVariant;
|
|
194
|
-
modelValue: readonly (string | number)[];
|
|
195
194
|
status: MultiSelectorStatus;
|
|
195
|
+
modelValue: readonly (string | number)[];
|
|
196
196
|
statusVariant: MultiSelectorStatusVariant;
|
|
197
|
-
isReadOnly: boolean;
|
|
198
197
|
disabled: boolean;
|
|
198
|
+
isReadOnly: boolean;
|
|
199
|
+
clearable: boolean;
|
|
199
200
|
presentation: MultiSelectorPresentation;
|
|
200
201
|
labelHidden: boolean;
|
|
201
|
-
clearable: boolean;
|
|
202
202
|
hasCreate: boolean;
|
|
203
203
|
optional: boolean;
|
|
204
204
|
searchable: boolean;
|
|
@@ -175,8 +175,8 @@ declare const __VLS_base$1: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
175
175
|
}>, {
|
|
176
176
|
position: OverlayPosition;
|
|
177
177
|
align: OverlayAlign;
|
|
178
|
-
scrim: OverlayScrimMode;
|
|
179
178
|
showOn: OverlayShowOn;
|
|
179
|
+
scrim: OverlayScrimMode;
|
|
180
180
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
181
181
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
182
182
|
declare const _default$1: typeof __VLS_export$1;
|
|
@@ -192,8 +192,8 @@ declare const __VLS_base: import("vue").DefineComponent<OverlayScrimProps, {}, {
|
|
|
192
192
|
isOpen: boolean;
|
|
193
193
|
position: OverlayPosition;
|
|
194
194
|
align: OverlayAlign;
|
|
195
|
-
scrim: OverlayScrimMode;
|
|
196
195
|
showOn: OverlayShowOn;
|
|
196
|
+
scrim: OverlayScrimMode;
|
|
197
197
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
198
198
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
199
199
|
declare const _default: typeof __VLS_export;
|