@jsenv/navi 0.28.3 → 0.28.4

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.
@@ -42516,12 +42516,20 @@ const ListUI = props => {
42516
42516
  });
42517
42517
  } else if (loading && loadingFallback) {
42518
42518
  if (loadingFallback === "skeleton") {
42519
+ // Skeleton rows draw their own separators: they never reach ListItemUI
42520
+ // (where real items get theirs from SeparatorContext), and without them
42521
+ // the list would visibly gain its dividers only once loaded.
42519
42522
  const template = loadingSkeletonTemplate ?? jsx(ListItem, {
42520
42523
  skeleton: true
42521
42524
  });
42522
42525
  const skeletons = [];
42523
42526
  let skeletonIndex = 0;
42524
42527
  while (skeletonIndex < loadingSkeletonCount) {
42528
+ if (separator && skeletonIndex > 0) {
42529
+ skeletons.push(cloneElement(resolveSeparatorVnode(separator, skeletonIndex - 1), {
42530
+ key: `navi-list-skeleton-separator-${skeletonIndex}`
42531
+ }));
42532
+ }
42525
42533
  skeletons.push(cloneElement(template, {
42526
42534
  key: `navi-list-skeleton-${skeletonIndex}`
42527
42535
  }));
@@ -42677,9 +42685,7 @@ const ListContent = ({
42677
42685
  loading: loading,
42678
42686
  error: error,
42679
42687
  searchNoMatchMode: searchNoMatchMode,
42680
- separator: separator === true ? jsx(Separator, {
42681
- margin: "0"
42682
- }) : separator,
42688
+ separator: separator,
42683
42689
  expandX: expandX
42684
42690
  // Deliberately not expandY here (unlike expandX above): the outer
42685
42691
  // .navi_list_container already gets its own expandY treatment (see
@@ -43511,7 +43517,7 @@ const ListItemUI = props => {
43511
43517
  }
43512
43518
  // separatorIndex is only used as the function-form argument (gap index)
43513
43519
  const separatorIndex = groupVisibleIndex === null ? visibleIndex : groupVisibleIndex;
43514
- const separatorVnode = typeof separator === "function" ? separator(separatorIndex - 1) : separator;
43520
+ const separatorVnode = resolveSeparatorVnode(separator, separatorIndex - 1);
43515
43521
  return jsxs(Fragment$1, {
43516
43522
  children: [separatorVnode, listItemVnode]
43517
43523
  });
@@ -43723,6 +43729,21 @@ const ListItemGroup = ({
43723
43729
  });
43724
43730
  };
43725
43731
 
43732
+ // The `separator` prop accepts `true` (the default divider), a vnode, or a
43733
+ // function receiving the gap index — this turns any of them into the vnode to
43734
+ // render at that gap.
43735
+ const resolveSeparatorVnode = (separator, gapIndex) => {
43736
+ if (separator === true) {
43737
+ return jsx(Separator, {
43738
+ margin: "0"
43739
+ });
43740
+ }
43741
+ if (typeof separator === "function") {
43742
+ return separator(gapIndex);
43743
+ }
43744
+ return separator;
43745
+ };
43746
+
43726
43747
  const PickerNaviTime = props => {
43727
43748
  const Next = useNextResolver();
43728
43749
  const {