@oxog/scrollex 1.1.1 → 1.2.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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkMEEFAXSA_cjs = require('../chunk-MEEFAXSA.cjs');
3
+ var chunkCTKEJZGD_cjs = require('../chunk-CTKEJZGD.cjs');
4
4
  var react = require('react');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
 
@@ -15,16 +15,16 @@ function masonryRenderer(options) {
15
15
  } = options;
16
16
  let kernel = null;
17
17
  let virtualItems = [];
18
- let columnCount = typeof columns === "number" ? chunkMEEFAXSA_cjs.normalizeColumnCount(columns) : 1;
18
+ let columnCount = typeof columns === "number" ? chunkCTKEJZGD_cjs.normalizeColumnCount(columns) : 1;
19
19
  let columnWidth = 0;
20
20
  let columnHeights = [];
21
21
  let totalHeight = 0;
22
22
  const layoutCache = /* @__PURE__ */ new Map();
23
23
  function calculateColumns(containerWidth) {
24
24
  if (typeof columns === "number") {
25
- columnCount = chunkMEEFAXSA_cjs.normalizeColumnCount(columns);
25
+ columnCount = chunkCTKEJZGD_cjs.normalizeColumnCount(columns);
26
26
  } else {
27
- columnCount = chunkMEEFAXSA_cjs.autoColumnCount(containerWidth, minColumnWidth, gap);
27
+ columnCount = chunkCTKEJZGD_cjs.autoColumnCount(containerWidth, minColumnWidth, gap);
28
28
  }
29
29
  columnWidth = (containerWidth - (columnCount - 1) * gap) / columnCount;
30
30
  }
@@ -570,8 +570,9 @@ function scrollRestoration(options) {
570
570
  };
571
571
  if (includeIndex) {
572
572
  const keyboardNav2 = kernel.getPlugin("keyboard-nav");
573
- if (keyboardNav2?.api?.getFocusedIndex) {
574
- const focusedIndex = keyboardNav2.api.getFocusedIndex();
573
+ const navApi = keyboardNav2?.api;
574
+ if (navApi?.getFocusedIndex) {
575
+ const focusedIndex = navApi.getFocusedIndex();
575
576
  if (focusedIndex !== null) {
576
577
  state.focusedIndex = focusedIndex;
577
578
  }
@@ -607,8 +608,9 @@ function scrollRestoration(options) {
607
608
  kernel.scrollTo(kernel.getOptions().direction === "horizontal" ? state.scrollLeft : state.scrollTop);
608
609
  if (includeIndex && state.focusedIndex !== void 0) {
609
610
  const keyboardNav2 = kernel.getPlugin("keyboard-nav");
610
- if (keyboardNav2?.api?.setFocusedIndex) {
611
- keyboardNav2.api.setFocusedIndex(state.focusedIndex);
611
+ const navApi = keyboardNav2?.api;
612
+ if (navApi?.setFocusedIndex) {
613
+ navApi.setFocusedIndex(state.focusedIndex);
612
614
  }
613
615
  }
614
616
  return true;
@@ -667,7 +669,7 @@ function scrollRestoration(options) {
667
669
  install(k) {
668
670
  kernel = k;
669
671
  if (saveOnScroll) {
670
- debouncedSave = chunkMEEFAXSA_cjs.debounce(save, debounceMs);
672
+ debouncedSave = chunkCTKEJZGD_cjs.debounce(save, debounceMs);
671
673
  }
672
674
  if (restoreOnMount && restoredKernels.get(k) !== key) {
673
675
  restoreFrame = requestAnimationFrame(() => {
@@ -1654,23 +1656,23 @@ function EventsPanel({ eventLog, onClear }) {
1654
1656
 
1655
1657
  Object.defineProperty(exports, "autoMeasurerPlugin", {
1656
1658
  enumerable: true,
1657
- get: function () { return chunkMEEFAXSA_cjs.autoMeasurerPlugin; }
1659
+ get: function () { return chunkCTKEJZGD_cjs.autoMeasurerPlugin; }
1658
1660
  });
1659
1661
  Object.defineProperty(exports, "gridRendererPlugin", {
1660
1662
  enumerable: true,
1661
- get: function () { return chunkMEEFAXSA_cjs.gridRendererPlugin; }
1663
+ get: function () { return chunkCTKEJZGD_cjs.gridRendererPlugin; }
1662
1664
  });
1663
1665
  Object.defineProperty(exports, "infiniteLoaderPlugin", {
1664
1666
  enumerable: true,
1665
- get: function () { return chunkMEEFAXSA_cjs.infiniteLoaderPlugin; }
1667
+ get: function () { return chunkCTKEJZGD_cjs.infiniteLoaderPlugin; }
1666
1668
  });
1667
1669
  Object.defineProperty(exports, "listRendererPlugin", {
1668
1670
  enumerable: true,
1669
- get: function () { return chunkMEEFAXSA_cjs.listRendererPlugin; }
1671
+ get: function () { return chunkCTKEJZGD_cjs.listRendererPlugin; }
1670
1672
  });
1671
1673
  Object.defineProperty(exports, "scrollControllerPlugin", {
1672
1674
  enumerable: true,
1673
- get: function () { return chunkMEEFAXSA_cjs.scrollControllerPlugin; }
1675
+ get: function () { return chunkCTKEJZGD_cjs.scrollControllerPlugin; }
1674
1676
  });
1675
1677
  exports.DebugPanelOverlay = DebugPanelOverlay;
1676
1678
  exports.bidirectional = bidirectional;