@jsenv/navi 0.29.345 → 0.29.346

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.
@@ -68486,6 +68486,7 @@ const useListScrollSync = ({
68486
68486
  };
68487
68487
  useLayoutEffect(resolveScroller);
68488
68488
  useStickyScrollportWarning(ref, scroller);
68489
+ useDuplicateHeaderWarning(ref);
68489
68490
  useStuckWindowWarning({
68490
68491
  ref,
68491
68492
  scrollerElResolved,
@@ -69508,6 +69509,34 @@ const useStickyScrollportWarning = (ref, scroller) => {
69508
69509
  });
69509
69510
  });
69510
69511
  };
69512
+ // A list has one header: the row that caps it — the column row of a table —
69513
+ // and the box the list measures to keep the others from scrolling under it. A
69514
+ // second one takes that same place, so both sit at the capped edge before
69515
+ // every row and the rows declared between them read as belonging to the last:
69516
+ // a title meant to open a run of rows ends up titling nothing. That title is a
69517
+ // group label, which is why this points at List.Group rather than at the
69518
+ // stacking.
69519
+ const useDuplicateHeaderWarning = ref => {
69520
+ const doneRef = useRef(false);
69521
+ useLayoutEffect(() => {
69522
+ if (doneRef.current) {
69523
+ return;
69524
+ }
69525
+ const listContainerEl = ref.current;
69526
+ if (!listContainerEl) {
69527
+ return;
69528
+ }
69529
+ const headerEls = listContainerEl.querySelectorAll(".navi_list_item_header");
69530
+ if (headerEls.length < 2) {
69531
+ return;
69532
+ }
69533
+ doneRef.current = true;
69534
+ console.warn(`<List> has ${headerEls.length} rows carrying "header", and a list has one: they all stick to the edge it caps, before every row, and the rows declared between them read as belonging to the last one. A title standing over a run of rows is a group: <List.Group label="...">{rows}</List.Group>.`, {
69535
+ list: listContainerEl,
69536
+ headers: [...headerEls]
69537
+ });
69538
+ });
69539
+ };
69511
69540
 
69512
69541
  /**
69513
69542
  * "Am I stuck?" — the question a `position: sticky` element cannot ask about
@@ -71902,7 +71931,7 @@ const useItemStore = ({
71902
71931
  };
71903
71932
 
71904
71933
  /**
71905
- * ListGroup — a labeled group of list items.
71934
+ * List.Group — a labeled group of list items.
71906
71935
  *
71907
71936
  * Renders a <li role="presentation"> wrapper containing a label span
71908
71937
  * (accessible via aria-labelledby) and a <ul role="group"> for the items.
@@ -72238,7 +72267,8 @@ const ListResolved = /*#__PURE__*/createComponentResolver([ListFirstResolver, Li
72238
72267
  */
72239
72268
  const List = /*#__PURE__*/Object.assign(ListResolved, {
72240
72269
  Item: ListItem,
72241
- Items: ListItems
72270
+ Items: ListItems,
72271
+ Group: ListItemGroup
72242
72272
  });
72243
72273
 
72244
72274
  const PickerNaviTime = props => {