vlist 2.0.0 → 2.0.1

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.
Files changed (77) hide show
  1. package/dist/index.js +1 -28
  2. package/dist/internals.js +1 -60
  3. package/package.json +1 -1
  4. package/dist/constants.js +0 -83
  5. package/dist/core/create.js +0 -740
  6. package/dist/core/dom.js +0 -47
  7. package/dist/core/hooks.js +0 -67
  8. package/dist/core/index.js +0 -13
  9. package/dist/core/pipeline.js +0 -307
  10. package/dist/core/pool.js +0 -42
  11. package/dist/core/scroll.js +0 -137
  12. package/dist/core/sizes.js +0 -6
  13. package/dist/core/state.js +0 -56
  14. package/dist/core/types.js +0 -7
  15. package/dist/core/velocity.js +0 -33
  16. package/dist/events/emitter.js +0 -60
  17. package/dist/events/index.js +0 -6
  18. package/dist/plugins/a11y/index.js +0 -1
  19. package/dist/plugins/a11y/plugin.js +0 -259
  20. package/dist/plugins/async/index.js +0 -12
  21. package/dist/plugins/async/manager.js +0 -568
  22. package/dist/plugins/async/placeholder.js +0 -154
  23. package/dist/plugins/async/plugin.js +0 -311
  24. package/dist/plugins/async/sparse.js +0 -540
  25. package/dist/plugins/autosize/index.js +0 -4
  26. package/dist/plugins/autosize/plugin.js +0 -185
  27. package/dist/plugins/grid/index.js +0 -5
  28. package/dist/plugins/grid/layout.js +0 -275
  29. package/dist/plugins/grid/plugin.js +0 -347
  30. package/dist/plugins/grid/renderer.js +0 -525
  31. package/dist/plugins/grid/types.js +0 -11
  32. package/dist/plugins/groups/async-bridge.js +0 -246
  33. package/dist/plugins/groups/index.js +0 -13
  34. package/dist/plugins/groups/layout.js +0 -294
  35. package/dist/plugins/groups/plugin.js +0 -571
  36. package/dist/plugins/groups/sticky.js +0 -255
  37. package/dist/plugins/groups/types.js +0 -12
  38. package/dist/plugins/masonry/index.js +0 -6
  39. package/dist/plugins/masonry/layout.js +0 -261
  40. package/dist/plugins/masonry/plugin.js +0 -381
  41. package/dist/plugins/masonry/renderer.js +0 -354
  42. package/dist/plugins/masonry/types.js +0 -9
  43. package/dist/plugins/page/index.js +0 -5
  44. package/dist/plugins/page/plugin.js +0 -166
  45. package/dist/plugins/scale/index.js +0 -4
  46. package/dist/plugins/scale/plugin.js +0 -507
  47. package/dist/plugins/scrollbar/controller.js +0 -574
  48. package/dist/plugins/scrollbar/index.js +0 -6
  49. package/dist/plugins/scrollbar/plugin.js +0 -93
  50. package/dist/plugins/scrollbar/scrollbar.js +0 -556
  51. package/dist/plugins/selection/index.js +0 -7
  52. package/dist/plugins/selection/plugin.js +0 -601
  53. package/dist/plugins/selection/state.js +0 -332
  54. package/dist/plugins/snapshots/index.js +0 -5
  55. package/dist/plugins/snapshots/plugin.js +0 -301
  56. package/dist/plugins/sortable/index.js +0 -6
  57. package/dist/plugins/sortable/plugin.js +0 -753
  58. package/dist/plugins/table/header.js +0 -501
  59. package/dist/plugins/table/index.js +0 -12
  60. package/dist/plugins/table/layout.js +0 -211
  61. package/dist/plugins/table/plugin.js +0 -391
  62. package/dist/plugins/table/renderer.js +0 -625
  63. package/dist/plugins/table/types.js +0 -12
  64. package/dist/plugins/transition/index.js +0 -5
  65. package/dist/plugins/transition/plugin.js +0 -405
  66. package/dist/rendering/aria.js +0 -23
  67. package/dist/rendering/index.js +0 -18
  68. package/dist/rendering/measured.js +0 -98
  69. package/dist/rendering/renderer.js +0 -586
  70. package/dist/rendering/scale.js +0 -267
  71. package/dist/rendering/scroll.js +0 -71
  72. package/dist/rendering/sizes.js +0 -193
  73. package/dist/rendering/sort.js +0 -65
  74. package/dist/rendering/viewport.js +0 -268
  75. package/dist/types.js +0 -5
  76. package/dist/utils/padding.js +0 -49
  77. package/dist/utils/stats.js +0 -124
package/dist/constants.js DELETED
@@ -1,83 +0,0 @@
1
- /**
2
- * vlist - Constants
3
- * All default values and magic numbers in one place
4
- */
5
- // =============================================================================
6
- // Core
7
- // =============================================================================
8
- /** Default number of extra items to render outside viewport */
9
- export const OVERSCAN = 3;
10
- /** Default CSS class prefix */
11
- export const CLASS_PREFIX = "vlist";
12
- // =============================================================================
13
- // Async Loading
14
- // =============================================================================
15
- /** Distance from bottom (in pixels) to trigger infinite scroll */
16
- export const LOAD_THRESHOLD = 200;
17
- /** Default number of items to load per request */
18
- export const INITIAL_LOAD_SIZE = 50;
19
- /** Default load size for data manager */
20
- export const LOAD_SIZE = 50;
21
- /** Number of extra items to preload ahead of scroll direction */
22
- export const PRELOAD_AHEAD = 50;
23
- /**
24
- * Velocity threshold for preloading (px/ms)
25
- * When scrolling faster than this but slower than LOAD_VELOCITY_THRESHOLD,
26
- * we preload extra items in the scroll direction to reduce placeholder flashing.
27
- */
28
- export const PRELOAD_VELOCITY_THRESHOLD = 2;
29
- /**
30
- * Velocity threshold above which data loading is cancelled (px/ms)
31
- * Above this: skip loading, show placeholders, defer to idle.
32
- */
33
- export const LOAD_VELOCITY_THRESHOLD = 15;
34
- /** Maximum concurrent chunk requests (0 = unlimited) */
35
- export const MAX_CONCURRENT_LOADS = 6;
36
- // =============================================================================
37
- // Scale
38
- // =============================================================================
39
- /**
40
- * Maximum virtual size in pixels along the main axis
41
- * Most browsers support ~16.7M pixels, we use 16M for safety margin
42
- */
43
- export const MAX_VIRTUAL_SIZE = 16000000;
44
- // =============================================================================
45
- // Scrolling
46
- // =============================================================================
47
- /** Idle timeout for scroll detection (ms) */
48
- export const SCROLL_IDLE_TIMEOUT = 150;
49
- /** Default wheel sensitivity multiplier */
50
- export const WHEEL_SENSITIVITY = 1;
51
- /** Default easing for smooth scroll animations */
52
- export const SCROLL_EASING = (t) => t < 0.5 ? 2 * t * t : 1 - (-2 * t + 2) ** 2 / 2;
53
- /** Default smooth scroll duration (ms) */
54
- export const SCROLL_DURATION = 300;
55
- // =============================================================================
56
- // Scrollbar
57
- // =============================================================================
58
- /** Default auto-hide behavior */
59
- export const SCROLLBAR_AUTO_HIDE = true;
60
- /** Default auto-hide delay in milliseconds */
61
- export const SCROLLBAR_AUTO_HIDE_DELAY = 1000;
62
- /** Default minimum thumb size in pixels */
63
- export const SCROLLBAR_MIN_THUMB_SIZE = 30;
64
- // =============================================================================
65
- // Sparse Storage
66
- // =============================================================================
67
- /** Default chunk size for sparse storage */
68
- export const CHUNK_SIZE = 100;
69
- /** Default maximum cached items before eviction */
70
- export const MAX_CACHED_ITEMS = 10000;
71
- /** Buffer for eviction (keep extra items around visible range) */
72
- export const EVICTION_BUFFER = 500;
73
- // =============================================================================
74
- // Placeholder
75
- // =============================================================================
76
- /** Default character used for masking text in placeholders */
77
- export const MASK_CHARACTER = "x";
78
- /** Maximum items to sample for placeholder structure analysis */
79
- export const MAX_SAMPLE_SIZE = 20;
80
- /** Internal flag to identify placeholder items */
81
- export const PLACEHOLDER_FLAG = "_isPlaceholder";
82
- /** Prefix for placeholder item IDs */
83
- export const PLACEHOLDER_ID_PREFIX = "__placeholder_";