@v1nt1248/3nclient-lib 0.3.35 → 0.3.37

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/README.md CHANGED
@@ -32,6 +32,7 @@ You can run the project as `pnpm dev` or `npm run dev`.
32
32
  - Ui3nSelector
33
33
  - Ui3nScrollbarVertical
34
34
  - Ui3nScrollbarHorizontal
35
+ - Ui3nScrollbar
35
36
  - Ui3nStepLineBar
36
37
  - Ui3nSwitch
37
38
  - Ui3nSlider
@@ -28,7 +28,7 @@ import { Ui3nVirtualElement, Ui3nMenuProps, Ui3nMenuEmits, Ui3nMenuSlots, Ui3nMe
28
28
  import { default as Ui3nList } from './ui3n-list/ui3n-list';
29
29
  import { Ui3nListProps, Ui3nListEmits, Ui3nListSlots } from './ui3n-list/types';
30
30
  import { default as Ui3nVirtualScroll } from './ui3n-virtual-scroll/ui3n-virtual-scroll';
31
- import { Ui3nVirtualScrollProps, Ui3nVirtualScrollSlots } from './ui3n-virtual-scroll/types';
31
+ import { Ui3nVirtualScrollProps, Ui3nVirtualScrollEmits, Ui3nVirtualScrollSlots, Ui3nVirtualScrollExpose } from './ui3n-virtual-scroll/types';
32
32
  import { default as Ui3nTabs } from './ui3n-tabs/ui3n-tabs';
33
33
  import { Ui3nTabsProps, Ui3nTabsEmits, Ui3nTabsSlots } from './ui3n-tabs/types';
34
34
  import { default as Ui3nBadge } from './ui3n-badge/ui3n-badge';
@@ -64,4 +64,6 @@ import { default as Ui3nScrollbarVertical } from './ui3n-scrollbar-vertical/ui3n
64
64
  import { Ui3nScrollbarVerticalProps, Ui3nScrollbarVerticalEmits, Ui3nScrollbarVerticalSlots, Ui3nScrollbarVerticalExpose } from './ui3n-scrollbar-vertical/types';
65
65
  import { default as Ui3nScrollbarHorizontal } from './ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal';
66
66
  import { Ui3nScrollbarHorizontalProps, Ui3nScrollbarHorizontalEmits, Ui3nScrollbarHorizontalSlots, Ui3nScrollbarHorizontalExpose } from './ui3n-scrollbar-horizontal/types';
67
- export { Ui3nIcon, Ui3nIconProps, Ui3nIconEmits, Ui3nButton, Ui3nButtonProps, Ui3nButtonEmits, Ui3nChip, Ui3nChipProps, Ui3nChipEmits, Ui3nChipSlots, Ui3nDropFiles, Ui3nDropFilesProps, Ui3nDropFilesEmits, Ui3nDropFilesSlots, Ui3nDropFilesExpose, Ui3nEmoji, Ui3nEmojiProps, Ui3nEmojiEmits, Ui3nInput, Ui3nInputProps, Ui3nInputEmits, Ui3nInputSlots, Ui3nInputExpose, Ui3nInputFile, Ui3nInputFileProps, Ui3nInputFileEmits, Ui3nInputFileExpose, Ui3nText, Ui3nTextProps, Ui3nTextEmits, Ui3nTextExpose, Ui3nCheckbox, Ui3nCheckboxProps, Ui3nCheckboxEmits, Ui3nCheckboxSlots, Ui3nCheckboxExpose, Ui3nCheckboxValue, Ui3nNotification, Ui3nTableSortIcon, Ui3nTableSortIconProps, Ui3nTable, Ui3nTableSort, Ui3nTableConfig, Ui3nTableHeadProps, Ui3nTableBodyProps, Ui3nTableGroupActionsSlot, Ui3nTableHeaderCellSlot, Ui3nTableBodyRowSlotScope, Ui3nTableBodyRowSlot, Ui3nTableBodyRowCellSlotScope, Ui3nTableBodyRowCellSlot, Ui3nTableSlots, Ui3nTableProps, Ui3nTableEmits, Ui3nTableExpose, Ui3nDialogProvider, Ui3nDialog, Ui3nDialogComponentProps, Ui3nDialogComponentEmits, Ui3nDialogComponentSlots, Ui3nDialogEvent, Ui3nMenu, Ui3nVirtualElement, Ui3nMenuProps, Ui3nMenuEmits, Ui3nMenuSlots, Ui3nMenuExpose, Ui3nList, Ui3nListProps, Ui3nListEmits, Ui3nListSlots, Ui3nVirtualScroll, Ui3nVirtualScrollProps, Ui3nVirtualScrollSlots, Ui3nTabs, Ui3nTabsProps, Ui3nTabsEmits, Ui3nTabsSlots, Ui3nBadge, Ui3nBadgeProps, Ui3nBreadcrumb, Ui3nBreadcrumbProps, Ui3nBreadcrumbEmits, Ui3nBreadcrumbSlots, Ui3nBreadcrumbs, Ui3nBreadcrumbsProps, Ui3nSwitch, Ui3nSwitchProps, Ui3nSwitchEmits, Ui3nSwitchSlots, Ui3nSwitchExpose, Ui3nStepLineBar, Ui3nStepLineBarProps, Ui3nProgressLinear, Ui3nProgressLinearProps, Ui3nProgressCircular, Ui3nProgressCircularProps, Ui3nTooltip, Ui3nTooltipEmits, Ui3nTooltipProps, Ui3nTooltipSlots, Ui3nTooltipPlacement, Ui3nRadio, Ui3nRadioGroup, Ui3nRadioValue, Ui3nRadioEmits, Ui3nRadioProps, Ui3nRadioSlots, Ui3nRadioExpose, Ui3nRadioGroupEmits, Ui3nRadioGroupProps, Ui3nRadioGroupSlots, Ui3nRadioGroupExpose, Ui3nEditable, Ui3nEditableProps, Ui3nEditableEmits, Ui3nEditableExpose, Ui3nAutocomplete, Ui3nAutocompleteProps, Ui3nAutocompleteEmits, Ui3nAutocompleteSlots, Ui3nAutocompleteExpose, Ui3nAutocompleteOptionBase, Ui3nSlider, UI3nSliderProps, UI3nSliderEmits, UI3nSliderExpose, Ui3nSelector, Ui3nSelectorProps, Ui3nSelectorEmits, Ui3nSelectorSlots, Ui3nSelectorExpose, Ui3nSelectorOptionBase, Ui3nSelectorItemDisplayingFunction, Ui3nMobileMenu, Ui3nMobileMenuProps, Ui3nMobileMenuEmits, Ui3nMobileMenuSlots, Ui3nMobileMenuItem, Ui3nMobileMenuItemBase, Ui3nMobileMenuItemProps, Ui3nMobileMenuItemEmits, Ui3nScrollbarVertical, Ui3nScrollbarVerticalProps, Ui3nScrollbarVerticalEmits, Ui3nScrollbarVerticalSlots, Ui3nScrollbarVerticalExpose, Ui3nScrollbarHorizontal, Ui3nScrollbarHorizontalProps, Ui3nScrollbarHorizontalEmits, Ui3nScrollbarHorizontalSlots, Ui3nScrollbarHorizontalExpose, };
67
+ import { default as Ui3nScrollbar } from './ui3n-scrollbar/ui3n-scrollbar';
68
+ import { Ui3nScrollbarProps, Ui3nScrollbarEmits, Ui3nScrollbarSlots, Ui3nScrollbarExpose, Ui3nScrollbarAxes, Ui3nScrollbarVerticalOptions, Ui3nScrollbarHorizontalOptions } from './ui3n-scrollbar/types';
69
+ export { Ui3nIcon, Ui3nIconProps, Ui3nIconEmits, Ui3nButton, Ui3nButtonProps, Ui3nButtonEmits, Ui3nChip, Ui3nChipProps, Ui3nChipEmits, Ui3nChipSlots, Ui3nDropFiles, Ui3nDropFilesProps, Ui3nDropFilesEmits, Ui3nDropFilesSlots, Ui3nDropFilesExpose, Ui3nEmoji, Ui3nEmojiProps, Ui3nEmojiEmits, Ui3nInput, Ui3nInputProps, Ui3nInputEmits, Ui3nInputSlots, Ui3nInputExpose, Ui3nInputFile, Ui3nInputFileProps, Ui3nInputFileEmits, Ui3nInputFileExpose, Ui3nText, Ui3nTextProps, Ui3nTextEmits, Ui3nTextExpose, Ui3nCheckbox, Ui3nCheckboxProps, Ui3nCheckboxEmits, Ui3nCheckboxSlots, Ui3nCheckboxExpose, Ui3nCheckboxValue, Ui3nNotification, Ui3nTableSortIcon, Ui3nTableSortIconProps, Ui3nTable, Ui3nTableSort, Ui3nTableConfig, Ui3nTableHeadProps, Ui3nTableBodyProps, Ui3nTableGroupActionsSlot, Ui3nTableHeaderCellSlot, Ui3nTableBodyRowSlotScope, Ui3nTableBodyRowSlot, Ui3nTableBodyRowCellSlotScope, Ui3nTableBodyRowCellSlot, Ui3nTableSlots, Ui3nTableProps, Ui3nTableEmits, Ui3nTableExpose, Ui3nDialogProvider, Ui3nDialog, Ui3nDialogComponentProps, Ui3nDialogComponentEmits, Ui3nDialogComponentSlots, Ui3nDialogEvent, Ui3nMenu, Ui3nVirtualElement, Ui3nMenuProps, Ui3nMenuEmits, Ui3nMenuSlots, Ui3nMenuExpose, Ui3nList, Ui3nListProps, Ui3nListEmits, Ui3nListSlots, Ui3nVirtualScroll, Ui3nVirtualScrollProps, Ui3nVirtualScrollEmits, Ui3nVirtualScrollSlots, Ui3nVirtualScrollExpose, Ui3nTabs, Ui3nTabsProps, Ui3nTabsEmits, Ui3nTabsSlots, Ui3nBadge, Ui3nBadgeProps, Ui3nBreadcrumb, Ui3nBreadcrumbProps, Ui3nBreadcrumbEmits, Ui3nBreadcrumbSlots, Ui3nBreadcrumbs, Ui3nBreadcrumbsProps, Ui3nSwitch, Ui3nSwitchProps, Ui3nSwitchEmits, Ui3nSwitchSlots, Ui3nSwitchExpose, Ui3nStepLineBar, Ui3nStepLineBarProps, Ui3nProgressLinear, Ui3nProgressLinearProps, Ui3nProgressCircular, Ui3nProgressCircularProps, Ui3nTooltip, Ui3nTooltipEmits, Ui3nTooltipProps, Ui3nTooltipSlots, Ui3nTooltipPlacement, Ui3nRadio, Ui3nRadioGroup, Ui3nRadioValue, Ui3nRadioEmits, Ui3nRadioProps, Ui3nRadioSlots, Ui3nRadioExpose, Ui3nRadioGroupEmits, Ui3nRadioGroupProps, Ui3nRadioGroupSlots, Ui3nRadioGroupExpose, Ui3nEditable, Ui3nEditableProps, Ui3nEditableEmits, Ui3nEditableExpose, Ui3nAutocomplete, Ui3nAutocompleteProps, Ui3nAutocompleteEmits, Ui3nAutocompleteSlots, Ui3nAutocompleteExpose, Ui3nAutocompleteOptionBase, Ui3nSlider, UI3nSliderProps, UI3nSliderEmits, UI3nSliderExpose, Ui3nSelector, Ui3nSelectorProps, Ui3nSelectorEmits, Ui3nSelectorSlots, Ui3nSelectorExpose, Ui3nSelectorOptionBase, Ui3nSelectorItemDisplayingFunction, Ui3nMobileMenu, Ui3nMobileMenuProps, Ui3nMobileMenuEmits, Ui3nMobileMenuSlots, Ui3nMobileMenuItem, Ui3nMobileMenuItemBase, Ui3nMobileMenuItemProps, Ui3nMobileMenuItemEmits, Ui3nScrollbarVertical, Ui3nScrollbarVerticalProps, Ui3nScrollbarVerticalEmits, Ui3nScrollbarVerticalSlots, Ui3nScrollbarVerticalExpose, Ui3nScrollbarHorizontal, Ui3nScrollbarHorizontalProps, Ui3nScrollbarHorizontalEmits, Ui3nScrollbarHorizontalSlots, Ui3nScrollbarHorizontalExpose, Ui3nScrollbar, Ui3nScrollbarProps, Ui3nScrollbarEmits, Ui3nScrollbarSlots, Ui3nScrollbarExpose, Ui3nScrollbarAxes, Ui3nScrollbarVerticalOptions, Ui3nScrollbarHorizontalOptions, };
@@ -0,0 +1,61 @@
1
+ import { VNode } from 'vue';
2
+ export type Ui3nScrollbarAxes = 'vertical' | 'horizontal' | 'both';
3
+ export type Ui3nScrollbarVerticalOptions = {
4
+ thumbMinHeight?: number | string;
5
+ thumbHeight?: number | string | 'auto';
6
+ thumbRadius?: number | string;
7
+ thumbColor?: string;
8
+ thumbHoverColor?: string;
9
+ thumbActiveColor?: string;
10
+ trackWidth?: number;
11
+ trackRadius?: number | string;
12
+ trackColor?: string;
13
+ /**
14
+ * Offset of the vertical track from the top of the scrollport (px).
15
+ * Useful when content has a sticky header that should not be covered by the track.
16
+ */
17
+ trackOffsetTop?: number | string;
18
+ };
19
+ export type Ui3nScrollbarHorizontalOptions = {
20
+ thumbMinWidth?: number | string;
21
+ thumbWidth?: number | string | 'auto';
22
+ thumbRadius?: number | string;
23
+ thumbColor?: string;
24
+ thumbHoverColor?: string;
25
+ thumbActiveColor?: string;
26
+ trackHeight?: number | string;
27
+ trackRadius?: number | string;
28
+ trackColor?: string;
29
+ };
30
+ export interface Ui3nScrollbarProps {
31
+ axes?: Ui3nScrollbarAxes;
32
+ vertical?: Ui3nScrollbarVerticalOptions;
33
+ horizontal?: Ui3nScrollbarHorizontalOptions;
34
+ autoUpdate?: boolean;
35
+ }
36
+ export interface Ui3nScrollbarScrollPayload {
37
+ event: Event;
38
+ scrollTop: number;
39
+ scrollLeft: number;
40
+ }
41
+ export interface Ui3nScrollbarEmits {
42
+ (ev: 'scroll', value: Ui3nScrollbarScrollPayload): void;
43
+ (ev: 'scroll:vertical', value: Ui3nScrollbarScrollPayload): void;
44
+ (ev: 'scroll:horizontal', value: Ui3nScrollbarScrollPayload): void;
45
+ }
46
+ export interface Ui3nScrollbarSlots {
47
+ default: () => VNode;
48
+ }
49
+ export interface Ui3nScrollbarExpose {
50
+ scrollTo(options: ScrollToOptions): void;
51
+ scrollToVertical(options?: {
52
+ top?: number;
53
+ behavior?: ScrollBehavior;
54
+ }): void;
55
+ scrollToHorizontal(options?: {
56
+ left?: number;
57
+ behavior?: ScrollBehavior;
58
+ }): void;
59
+ getContainer(): HTMLDivElement;
60
+ updateMetrics(): void;
61
+ }
@@ -0,0 +1,53 @@
1
+ import { Ui3nScrollbarProps, Ui3nScrollbarSlots, Ui3nScrollbarVerticalOptions, Ui3nScrollbarHorizontalOptions, Ui3nScrollbarAxes, Ui3nScrollbarScrollPayload } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: Readonly<Ui3nScrollbarSlots> & Ui3nScrollbarSlots;
5
+ refs: {
6
+ containerRef: HTMLDivElement;
7
+ trackRefV: HTMLDivElement;
8
+ thumbRefV: HTMLDivElement;
9
+ trackRefH: HTMLDivElement;
10
+ thumbRefH: HTMLDivElement;
11
+ };
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<Ui3nScrollbarProps, {
16
+ scrollTo(options: ScrollToOptions): void;
17
+ scrollToVertical(options?: {
18
+ top?: number;
19
+ behavior?: ScrollBehavior;
20
+ }): void;
21
+ scrollToHorizontal(options?: {
22
+ left?: number;
23
+ behavior?: ScrollBehavior;
24
+ }): void;
25
+ getContainer(): HTMLDivElement;
26
+ updateMetrics(): void;
27
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
28
+ scroll: (value: Ui3nScrollbarScrollPayload) => any;
29
+ "scroll:vertical": (value: Ui3nScrollbarScrollPayload) => any;
30
+ "scroll:horizontal": (value: Ui3nScrollbarScrollPayload) => any;
31
+ }, string, import('vue').PublicProps, Readonly<Ui3nScrollbarProps> & Readonly<{
32
+ onScroll?: ((value: Ui3nScrollbarScrollPayload) => any) | undefined;
33
+ "onScroll:vertical"?: ((value: Ui3nScrollbarScrollPayload) => any) | undefined;
34
+ "onScroll:horizontal"?: ((value: Ui3nScrollbarScrollPayload) => any) | undefined;
35
+ }>, {
36
+ horizontal: Ui3nScrollbarHorizontalOptions;
37
+ vertical: Ui3nScrollbarVerticalOptions;
38
+ axes: Ui3nScrollbarAxes;
39
+ autoUpdate: boolean;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
41
+ containerRef: HTMLDivElement;
42
+ trackRefV: HTMLDivElement;
43
+ thumbRefV: HTMLDivElement;
44
+ trackRefH: HTMLDivElement;
45
+ thumbRefH: HTMLDivElement;
46
+ }, HTMLDivElement>;
47
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
48
+ export default _default;
49
+ type __VLS_WithTemplateSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -19,6 +19,7 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nScrollbarVertic
19
19
  }, string, import('vue').PublicProps, Readonly<Ui3nScrollbarVerticalProps> & Readonly<{
20
20
  onScroll?: ((value: Event) => any) | undefined;
21
21
  }>, {
22
+ autoUpdate: boolean;
22
23
  thumbMinHeight: number | string;
23
24
  thumbHeight: number | string | "auto";
24
25
  thumbRadius: number | string;
@@ -28,7 +29,6 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nScrollbarVertic
28
29
  trackWidth: number;
29
30
  trackRadius: number | string;
30
31
  trackColor: string;
31
- autoUpdate: boolean;
32
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
33
  containerRef: HTMLDivElement;
34
34
  trackRef: HTMLDivElement;
@@ -1,7 +1,8 @@
1
1
  import { Ref, UnwrapRef } from 'vue';
2
2
  import { Ui3nTableBodyBaseItem, Ui3nTableConfig, Ui3nTableEmits, Ui3nTableProps } from '../../../../components/ui3n-table/types';
3
3
  import { Ui3nCheckboxValue } from '../../../../components/ui3n-checkbox/types';
4
- export declare function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<T>, emits: Ui3nTableEmits<T>): {
4
+ export declare function isAbsoluteCssSize(value: string): boolean;
5
+ export declare function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTableProps<T>, emits: Ui3nTableEmits<T>, scrollbarContainerRef?: Ref<HTMLDivElement | null>): {
5
6
  tableEl: Ref<HTMLDivElement | null, HTMLDivElement | null>;
6
7
  tableColumnWidth: import('vue').ComputedRef<string>;
7
8
  unusedPlaceCssStyle: import('vue').ComputedRef<{
@@ -28,6 +29,10 @@ export declare function useTable<T extends Ui3nTableBodyBaseItem>(props: Ui3nTab
28
29
  selectedRows: Ref<Set<T> | T[keyof T][], Set<T> | T[keyof T][]>;
29
30
  selectedRowsArray: import('vue').ComputedRef<T[]>;
30
31
  selectedRowsSize: import('vue').ComputedRef<number>;
32
+ stickyColumnsActive: import('vue').ComputedRef<boolean>;
33
+ stickyColumnsCount: import('vue').ComputedRef<number>;
34
+ stickyColumnLefts: import('vue').ComputedRef<string[]>;
35
+ scrollportWidth: Ref<number | null, number | null>;
31
36
  closeGroupActionsRow: () => void;
32
37
  getRowKey: (row: T, index: number) => string | number;
33
38
  isRowSelected: (row: T) => boolean;
@@ -56,6 +56,48 @@ export type Ui3nTableConfig<T extends Ui3nTableBodyBaseItem, K extends keyof T =
56
56
  * Minimum height for unused place
57
57
  */
58
58
  minHeightUnusedPlace?: number | string;
59
+ /**
60
+ * Number of leading visible columns to pin on horizontal scroll.
61
+ * `0` / omitted — off. Clamped to at most `visibleColumns.length - 1`.
62
+ * Requires absolute widths (e.g. px/rem) on all visible columns when > 0.
63
+ * @default 0
64
+ */
65
+ stickyColumns?: number;
66
+ /**
67
+ * Custom scrollbar settings.
68
+ * When omitted, native browser overflow is used.
69
+ */
70
+ scrollbar?: {
71
+ /**
72
+ * Which overflow axes to enable.
73
+ * @default 'both'
74
+ */
75
+ axes?: 'vertical' | 'horizontal' | 'both';
76
+ vertical?: {
77
+ thumbMinHeight?: number | string;
78
+ thumbHeight?: number | string | 'auto';
79
+ thumbRadius?: number | string;
80
+ thumbColor?: string;
81
+ thumbHoverColor?: string;
82
+ thumbActiveColor?: string;
83
+ trackWidth?: number;
84
+ trackRadius?: number | string;
85
+ trackColor?: string;
86
+ /** Offset of vertical track from top (usually set by table for sticky header). */
87
+ trackOffsetTop?: number | string;
88
+ };
89
+ horizontal?: {
90
+ thumbMinWidth?: number | string;
91
+ thumbWidth?: number | string | 'auto';
92
+ thumbRadius?: number | string;
93
+ thumbColor?: string;
94
+ thumbHoverColor?: string;
95
+ thumbActiveColor?: string;
96
+ trackHeight?: number | string;
97
+ trackRadius?: number | string;
98
+ trackColor?: string;
99
+ };
100
+ };
59
101
  };
60
102
  /**
61
103
  * Table header properties type
@@ -193,6 +235,16 @@ export type Ui3nTableBodyRowSlotScope<T extends Ui3nTableBodyBaseItem, K extends
193
235
  columnStyle?: {
194
236
  [P in Omit<K, 'id'> as string | number]: Record<string, string>;
195
237
  };
238
+ /**
239
+ * Effective sticky column count after validation/clamp (`0` = off).
240
+ * Custom `#row`: first `stickyColumnsCount` direct children should be sticky cells
241
+ * with `left: stickyColumnLefts[i]`.
242
+ */
243
+ stickyColumnsCount?: number;
244
+ /**
245
+ * CSS `left` values for sticky columns `[0 .. stickyColumnsCount - 1]`.
246
+ */
247
+ stickyColumnLefts?: string[];
196
248
  /**
197
249
  * Events
198
250
  */
@@ -15,6 +15,38 @@ export interface Ui3nVirtualScrollProps<T> {
15
15
  * Number of items to render ahead
16
16
  */
17
17
  renderAhead?: number;
18
+ /**
19
+ * When true, if the user is near the bottom of the list,
20
+ * keep the viewport stuck to the bottom after items update
21
+ * (typical chat behavior). Default: false.
22
+ */
23
+ stickToBottom?: boolean;
24
+ /**
25
+ * Distance from the bottom (px) treated as "near bottom" for stickToBottom.
26
+ * Default: 32.
27
+ */
28
+ stickToBottomThreshold?: number;
29
+ /**
30
+ * Distance from an edge (px) at which 'reached-top' / 'reached-bottom' fire.
31
+ * Default: 64.
32
+ */
33
+ reachEdgeThreshold?: number;
34
+ }
35
+ /**
36
+ * Virtual scroll component emits
37
+ */
38
+ export interface Ui3nVirtualScrollEmits {
39
+ (ev: 'scroll', value: Event): void;
40
+ /**
41
+ * The list has been scrolled close to its top - the moment to load
42
+ * a previous page of items. Fires once per approach: it will not repeat
43
+ * until the list leaves the edge or 'items' change.
44
+ */
45
+ (ev: 'reached-top'): void;
46
+ /**
47
+ * Same as 'reached-top', for the bottom edge.
48
+ */
49
+ (ev: 'reached-bottom'): void;
18
50
  }
19
51
  /**
20
52
  * Virtual scroll component slots
@@ -28,3 +60,9 @@ export interface Ui3nVirtualScrollSlots<T> {
28
60
  index: number;
29
61
  }) => VNode;
30
62
  }
63
+ export interface Ui3nVirtualScrollExpose {
64
+ scrollToBottom(): void;
65
+ scrollToItem(id: string, align?: 'start' | 'end' | 'center'): void;
66
+ getScrollTop(): number;
67
+ isStuckToBottom(): boolean;
68
+ }
@@ -1,12 +1,16 @@
1
- import { Ui3nVirtualScrollProps, Ui3nVirtualScrollSlots } from './types';
1
+ import { Ui3nVirtualScrollEmits, Ui3nVirtualScrollExpose, Ui3nVirtualScrollProps, Ui3nVirtualScrollSlots } from './types';
2
2
  declare const _default: <T extends {
3
- id?: string;
3
+ id: string;
4
4
  }>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & Ui3nVirtualScrollProps<T> & Partial<{}>> & import('vue').PublicProps;
6
- expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly onScroll?: ((value: Event) => any) | undefined;
7
+ readonly "onReached-top"?: (() => any) | undefined;
8
+ readonly "onReached-bottom"?: (() => any) | undefined;
9
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onScroll" | "onReached-top" | "onReached-bottom"> & Ui3nVirtualScrollProps<T> & Partial<{}>> & import('vue').PublicProps;
10
+ expose(exposed: import('vue').ShallowUnwrapRef<Ui3nVirtualScrollExpose>): void;
7
11
  attrs: any;
8
12
  slots: Readonly<Ui3nVirtualScrollSlots<T>> & Ui3nVirtualScrollSlots<T>;
9
- emit: {};
13
+ emit: Ui3nVirtualScrollEmits;
10
14
  }>) => import('vue').VNode & {
11
15
  __ctx?: Awaited<typeof __VLS_setup>;
12
16
  };
@@ -35,6 +35,7 @@ import { default as Ui3nMobileMenu } from './components/ui3n-mobile-menu/ui3n-mo
35
35
  import { default as Ui3nMobileMenuItem } from './components/ui3n-mobile-menu-item/ui3n-mobile-menu-item';
36
36
  import { default as Ui3nScrollbarVertical } from './components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical';
37
37
  import { default as Ui3nScrollbarHorizontal } from './components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal';
38
+ import { default as Ui3nScrollbar } from './components/ui3n-scrollbar/ui3n-scrollbar';
38
39
  import { default as Ui3nHtml } from './directives/ui3n-html';
39
40
  import { default as Ui3nClickOutside } from './directives/ui3n-click-outside';
40
41
  import { default as Ui3nResize } from './directives/ui3n-resize';
@@ -100,6 +101,7 @@ declare module 'vue' {
100
101
  Ui3nMobileMenuMenuItem: typeof Ui3nMobileMenuItem;
101
102
  Ui3nScrollbarVertical: typeof Ui3nScrollbarVertical;
102
103
  Ui3nScrollbarHorizontal: typeof Ui3nScrollbarHorizontal;
104
+ Ui3nScrollbar: typeof Ui3nScrollbar;
103
105
  }
104
106
  interface GlobalDirectives {
105
107
  Ui3nHtml: typeof Ui3nHtml;
@@ -33,6 +33,7 @@ import { default as Ui3nMobileMenu } from './components/ui3n-mobile-menu/ui3n-mo
33
33
  import { default as Ui3nMobileMenuItem } from './components/ui3n-mobile-menu-item/ui3n-mobile-menu-item';
34
34
  import { default as Ui3nScrollbarVertical } from './components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical';
35
35
  import { default as Ui3nScrollbarHorizontal } from './components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal';
36
+ import { default as Ui3nScrollbar } from './components/ui3n-scrollbar/ui3n-scrollbar';
36
37
  import { default as Ui3nHtml } from './directives/ui3n-html';
37
38
  import { default as Ui3nClickOutside } from './directives/ui3n-click-outside';
38
39
  import { default as Ui3nResize } from './directives/ui3n-resize';
@@ -80,6 +81,7 @@ declare module 'vue' {
80
81
  Ui3nMobileMenuItem: typeof Ui3nMobileMenuItem;
81
82
  Ui3nScrollbarVertical: typeof Ui3nScrollbarVertical;
82
83
  Ui3nScrollbarHorizontal: typeof Ui3nScrollbarHorizontal;
84
+ Ui3nScrollbar: typeof Ui3nScrollbar;
83
85
  }
84
86
  interface GlobalDirectives {
85
87
  Ui3nHtml: typeof Ui3nHtml;