@floor/vlist 0.5.7 → 0.6.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.
Files changed (108) hide show
  1. package/README.md +793 -592
  2. package/dist/async/index.js +1 -0
  3. package/dist/builder/context.d.ts +3 -3
  4. package/dist/builder/context.d.ts.map +1 -1
  5. package/dist/builder/core.d.ts +1 -1
  6. package/dist/builder/core.d.ts.map +1 -1
  7. package/dist/builder/index.js +1 -250
  8. package/dist/builder/types.d.ts +3 -3
  9. package/dist/builder/types.d.ts.map +1 -1
  10. package/dist/compression/index.js +1 -104
  11. package/dist/core/core.js +1 -0
  12. package/dist/core/full.d.ts +22 -0
  13. package/dist/core/full.d.ts.map +1 -0
  14. package/dist/core/index.js +1 -133
  15. package/dist/core/lite.d.ts +129 -0
  16. package/dist/core/lite.d.ts.map +1 -0
  17. package/dist/core/minimal.d.ts +104 -0
  18. package/dist/core/minimal.d.ts.map +1 -0
  19. package/dist/core-light.js +1 -68
  20. package/dist/data/index.js +1 -233
  21. package/dist/features/async/index.d.ts +9 -0
  22. package/dist/features/async/index.d.ts.map +1 -0
  23. package/dist/features/async/manager.d.ts +103 -0
  24. package/dist/features/async/manager.d.ts.map +1 -0
  25. package/dist/features/async/placeholder.d.ts +62 -0
  26. package/dist/features/async/placeholder.d.ts.map +1 -0
  27. package/dist/features/async/plugin.d.ts +60 -0
  28. package/dist/features/async/plugin.d.ts.map +1 -0
  29. package/dist/features/async/sparse.d.ts +91 -0
  30. package/dist/features/async/sparse.d.ts.map +1 -0
  31. package/dist/features/grid/index.d.ts +9 -0
  32. package/dist/features/grid/index.d.ts.map +1 -0
  33. package/dist/features/grid/layout.d.ts +29 -0
  34. package/dist/features/grid/layout.d.ts.map +1 -0
  35. package/dist/features/grid/plugin.d.ts +48 -0
  36. package/dist/features/grid/plugin.d.ts.map +1 -0
  37. package/dist/features/grid/renderer.d.ts +55 -0
  38. package/dist/features/grid/renderer.d.ts.map +1 -0
  39. package/dist/features/grid/types.d.ts +71 -0
  40. package/dist/features/grid/types.d.ts.map +1 -0
  41. package/dist/features/page/index.d.ts +8 -0
  42. package/dist/features/page/index.d.ts.map +1 -0
  43. package/dist/features/page/plugin.d.ts +53 -0
  44. package/dist/features/page/plugin.d.ts.map +1 -0
  45. package/dist/features/scale/index.d.ts +10 -0
  46. package/dist/features/scale/index.d.ts.map +1 -0
  47. package/dist/features/scale/plugin.d.ts +42 -0
  48. package/dist/features/scale/plugin.d.ts.map +1 -0
  49. package/dist/features/scrollbar/controller.d.ts +121 -0
  50. package/dist/features/scrollbar/controller.d.ts.map +1 -0
  51. package/dist/features/scrollbar/index.d.ts +8 -0
  52. package/dist/features/scrollbar/index.d.ts.map +1 -0
  53. package/dist/features/scrollbar/plugin.d.ts +60 -0
  54. package/dist/features/scrollbar/plugin.d.ts.map +1 -0
  55. package/dist/features/scrollbar/scrollbar.d.ts +73 -0
  56. package/dist/features/scrollbar/scrollbar.d.ts.map +1 -0
  57. package/dist/features/sections/index.d.ts +10 -0
  58. package/dist/features/sections/index.d.ts.map +1 -0
  59. package/dist/features/sections/layout.d.ts +46 -0
  60. package/dist/features/sections/layout.d.ts.map +1 -0
  61. package/dist/features/sections/plugin.d.ts +64 -0
  62. package/dist/features/sections/plugin.d.ts.map +1 -0
  63. package/dist/features/sections/sticky.d.ts +33 -0
  64. package/dist/features/sections/sticky.d.ts.map +1 -0
  65. package/dist/features/sections/types.d.ts +86 -0
  66. package/dist/features/sections/types.d.ts.map +1 -0
  67. package/dist/features/selection/index.d.ts +7 -0
  68. package/dist/features/selection/index.d.ts.map +1 -0
  69. package/dist/features/selection/plugin.d.ts +44 -0
  70. package/dist/features/selection/plugin.d.ts.map +1 -0
  71. package/dist/features/selection/state.d.ts +102 -0
  72. package/dist/features/selection/state.d.ts.map +1 -0
  73. package/dist/features/snapshots/index.d.ts +8 -0
  74. package/dist/features/snapshots/index.d.ts.map +1 -0
  75. package/dist/features/snapshots/plugin.d.ts +44 -0
  76. package/dist/features/snapshots/plugin.d.ts.map +1 -0
  77. package/dist/grid/index.js +1 -198
  78. package/dist/groups/index.js +1 -204
  79. package/dist/index.d.ts +17 -8
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +1 -1129
  82. package/dist/page/index.js +1 -0
  83. package/dist/plugins/groups/plugin.d.ts +3 -2
  84. package/dist/plugins/groups/plugin.d.ts.map +1 -1
  85. package/dist/react/index.js +1 -1024
  86. package/dist/react/react.js +1 -0
  87. package/dist/rendering/heights.d.ts +63 -0
  88. package/dist/rendering/heights.d.ts.map +1 -0
  89. package/dist/rendering/index.d.ts +9 -0
  90. package/dist/rendering/index.d.ts.map +1 -0
  91. package/dist/rendering/renderer.d.ts +103 -0
  92. package/dist/rendering/renderer.d.ts.map +1 -0
  93. package/dist/rendering/scale.d.ts +116 -0
  94. package/dist/rendering/scale.d.ts.map +1 -0
  95. package/dist/rendering/viewport.d.ts +139 -0
  96. package/dist/rendering/viewport.d.ts.map +1 -0
  97. package/dist/scale/index.js +1 -0
  98. package/dist/scroll/index.js +1 -116
  99. package/dist/scrollbar/index.js +1 -0
  100. package/dist/sections/index.js +1 -0
  101. package/dist/selection/index.js +1 -96
  102. package/dist/snapshots/index.js +1 -21
  103. package/dist/svelte/index.js +1 -1012
  104. package/dist/svelte/svelte.js +1 -0
  105. package/dist/vue/index.js +1 -1018
  106. package/dist/vue/vue.js +1 -0
  107. package/dist/window/index.js +1 -18
  108. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ var K=()=>{let E=null;return{name:"withPage",priority:5,setup(P){let{dom:S,state:q,config:V,emitter:I}=P;S.root.style.overflow="visible",S.root.style.height="auto",S.viewport.classList.remove(`${V.classPrefix}-viewport--custom-scrollbar`),P.disableViewportResize(),P.setScrollTarget(window),P.setScrollFns(()=>{let y=S.viewport.getBoundingClientRect();if(V.horizontal)return Math.max(0,-y.left);else return Math.max(0,-y.top)},(y)=>{let b=S.viewport.getBoundingClientRect();if(V.horizontal){let j=b.left+window.scrollX;window.scrollTo(j+y,window.scrollY)}else{let j=b.top+window.scrollY;window.scrollTo(window.scrollX,j+y)}}),P.setContainerDimensions({width:()=>window.innerWidth,height:()=>window.innerHeight}),q.viewportState.containerHeight=window.innerHeight;let{innerHeight:B,innerWidth:F}=window,G=()=>{let{innerWidth:y,innerHeight:b}=window,j=V.horizontal?y:b,J=V.horizontal?F:B;if(Math.abs(j-J)<=1)return;B=b,F=y,q.viewportState.containerHeight=b,I.emit("resize",{width:y,height:b});for(let k=0;k<P.resizeHandlers.length;k++)P.resizeHandlers[k](y,b);P.renderIfNeeded()};window.addEventListener("resize",G,{passive:!0}),E=()=>{window.removeEventListener("resize",G)},P.destroyHandlers.push(E)},destroy(){if(E)E(),E=null}}};export{K as withPage};
@@ -15,9 +15,10 @@
15
15
  * Restrictions:
16
16
  * - Items must be pre-sorted by group
17
17
  * - Cannot be combined with direction: 'horizontal'
18
- * - Cannot be combined with reverse: true
19
18
  *
20
- * Can be combined with withGrid for grouped 2D layouts.
19
+ * Can be combined with:
20
+ * - withGrid for grouped 2D layouts
21
+ * - reverse: true (sticky header shows current section as you scroll up through history)
21
22
  */
22
23
  import type { VListItem } from "../../types";
23
24
  import type { VListPlugin } from "../../builder/types";
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/groups/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,qBAAqB,CAAC;AAuBvE,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAE5C,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IAErB,6CAA6C;IAC7C,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,E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