mtrl-addons 0.3.0 → 0.3.2
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/components/vlist/types.d.ts +11 -0
- package/dist/core/viewport/features/collection.d.ts +4 -0
- package/dist/core/viewport/types.d.ts +17 -0
- package/dist/index.js +231 -32
- package/dist/index.mjs +231 -32
- package/package.json +1 -1
|
@@ -584,6 +584,17 @@ export interface VListConfig<T extends ListItem = ListItem> {
|
|
|
584
584
|
measureItems?: boolean;
|
|
585
585
|
/** Stop scrolling when clicking on the viewport (default: true) */
|
|
586
586
|
stopOnClick?: boolean;
|
|
587
|
+
/** Momentum configuration for touch/drag scrolling */
|
|
588
|
+
momentum?: {
|
|
589
|
+
/** How quickly velocity decreases per frame (0-1, higher = longer coast, default: 0.95) */
|
|
590
|
+
deceleration?: number;
|
|
591
|
+
/** Minimum velocity before stopping in px/ms (default: 0.1) */
|
|
592
|
+
minVelocity?: number;
|
|
593
|
+
/** Maximum gesture duration in ms to trigger momentum (default: 1000) */
|
|
594
|
+
maxDuration?: number;
|
|
595
|
+
/** Minimum velocity in px/ms to trigger momentum (default: 0.3) */
|
|
596
|
+
velocityThreshold?: number;
|
|
597
|
+
};
|
|
587
598
|
};
|
|
588
599
|
performance?: {
|
|
589
600
|
recycleElements?: boolean;
|
|
@@ -17,6 +17,10 @@ export interface CollectionConfig {
|
|
|
17
17
|
selectId?: string | number;
|
|
18
18
|
autoLoad?: boolean;
|
|
19
19
|
autoSelectFirst?: boolean;
|
|
20
|
+
/** Maximum items to keep in memory (default: 1000) */
|
|
21
|
+
maxCachedItems?: number;
|
|
22
|
+
/** Extra items to keep around visible range during eviction (default: 150) */
|
|
23
|
+
evictionBuffer?: number;
|
|
20
24
|
}
|
|
21
25
|
export interface CollectionComponent {
|
|
22
26
|
collection: {
|
|
@@ -57,6 +57,17 @@ export interface ViewportConfig {
|
|
|
57
57
|
sensitivity?: number;
|
|
58
58
|
/** Stop scrolling when clicking on the viewport (default: true) */
|
|
59
59
|
stopOnClick?: boolean;
|
|
60
|
+
/** Momentum configuration for touch/drag scrolling */
|
|
61
|
+
momentum?: {
|
|
62
|
+
/** How quickly velocity decreases per frame (0-1, higher = longer coast, default: 0.95) */
|
|
63
|
+
deceleration?: number;
|
|
64
|
+
/** Minimum velocity before stopping in px/ms (default: 0.1) */
|
|
65
|
+
minVelocity?: number;
|
|
66
|
+
/** Maximum gesture duration in ms to trigger momentum (default: 1000) */
|
|
67
|
+
maxDuration?: number;
|
|
68
|
+
/** Minimum velocity in px/ms to trigger momentum (default: 0.3) */
|
|
69
|
+
velocityThreshold?: number;
|
|
70
|
+
};
|
|
60
71
|
};
|
|
61
72
|
scrollbar?: {
|
|
62
73
|
enabled?: boolean;
|
|
@@ -78,6 +89,12 @@ export interface ViewportConfig {
|
|
|
78
89
|
bufferSize?: number;
|
|
79
90
|
renderDebounce?: number;
|
|
80
91
|
};
|
|
92
|
+
cache?: {
|
|
93
|
+
/** Maximum items to keep in memory (default: 1000) */
|
|
94
|
+
maxItems?: number;
|
|
95
|
+
/** Extra items to keep around visible range during eviction (default: 150) */
|
|
96
|
+
evictionBuffer?: number;
|
|
97
|
+
};
|
|
81
98
|
placeholders?: {
|
|
82
99
|
enabled?: boolean;
|
|
83
100
|
template?: (index: number) => string | HTMLElement;
|