@texturehq/edges 5.13.0 → 5.14.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.
@@ -256,7 +256,9 @@ type StackNavItem = {
256
256
  *
257
257
  * If both `href` and `children` are present, clicking the row both navigates
258
258
  * to `href` (a section overview) and pushes its sub-pane onto the stack.
259
- * This mirrors the Vercel/Linear/Edges dashboard pattern.
259
+ * This mirrors the Vercel/Linear/Edges dashboard pattern. Set
260
+ * `pushOnSelect: false` to split the two: the row becomes a plain link and a
261
+ * separate chevron button drills into the sub-pane.
260
262
  */
261
263
  href?: string;
262
264
  /** Optional leading-edge icon. Alias-friendly for item models shared with SideNav. */
@@ -272,10 +274,12 @@ type StackNavItem = {
272
274
  /** Nested children. Triggers the drill-in arrow and pushes a new pane. */
273
275
  children?: StackNavItem[];
274
276
  /**
275
- * When `false` and the row has `children`, selecting the row only navigates
276
- * to `href` (if present) — it does not push a sub-pane. Useful for
277
- * "Overview" leaves that live in the same array as their siblings. Defaults
278
- * to `true`.
277
+ * When `false` and the row has both `children` and an `href`, selecting the
278
+ * row only navigates — it does not push a sub-pane; the row's chevron becomes
279
+ * a separate drill-in button, and a `value` matching the row keeps its own
280
+ * pane open rather than auto-opening the children. Without an `href` the row
281
+ * still drills in on click (there is nothing else it could do). Defaults to
282
+ * `true`.
279
283
  */
280
284
  pushOnSelect?: boolean;
281
285
  /** Aria-label override for screen readers. */
@@ -296,13 +300,13 @@ type StackNavRowRenderProps = {
296
300
  * Whether the item has children. Use it to decide whether to draw a drill-in
297
301
  * affordance.
298
302
  *
299
- * Note this reports child presence, not a guarantee about `select`: the click
300
- * path pushes a pane whenever children exist and does not consult
301
- * `pushOnSelect`, which today only affects deep-link resolution. That
302
- * discrepancy predates this prop and is left alone here rather than changed
303
- * underneath existing consumers.
303
+ * Note this reports child presence, not a guarantee about `select`: `select`
304
+ * pushes a pane when children exist unless the item is an `href` row with
305
+ * `pushOnSelect: false`, whose pane is pushed by `drillIn` instead.
304
306
  */
305
307
  hasChildren: boolean;
308
+ /** Push the item's sub-pane without navigating — the chevron affordance for split rows. */
309
+ drillIn: () => void;
306
310
  /**
307
311
  * Run StackNav's selection: report through `onSelect` and push the sub-pane
308
312
  * when the item has children.
@@ -256,7 +256,9 @@ type StackNavItem = {
256
256
  *
257
257
  * If both `href` and `children` are present, clicking the row both navigates
258
258
  * to `href` (a section overview) and pushes its sub-pane onto the stack.
259
- * This mirrors the Vercel/Linear/Edges dashboard pattern.
259
+ * This mirrors the Vercel/Linear/Edges dashboard pattern. Set
260
+ * `pushOnSelect: false` to split the two: the row becomes a plain link and a
261
+ * separate chevron button drills into the sub-pane.
260
262
  */
261
263
  href?: string;
262
264
  /** Optional leading-edge icon. Alias-friendly for item models shared with SideNav. */
@@ -272,10 +274,12 @@ type StackNavItem = {
272
274
  /** Nested children. Triggers the drill-in arrow and pushes a new pane. */
273
275
  children?: StackNavItem[];
274
276
  /**
275
- * When `false` and the row has `children`, selecting the row only navigates
276
- * to `href` (if present) — it does not push a sub-pane. Useful for
277
- * "Overview" leaves that live in the same array as their siblings. Defaults
278
- * to `true`.
277
+ * When `false` and the row has both `children` and an `href`, selecting the
278
+ * row only navigates — it does not push a sub-pane; the row's chevron becomes
279
+ * a separate drill-in button, and a `value` matching the row keeps its own
280
+ * pane open rather than auto-opening the children. Without an `href` the row
281
+ * still drills in on click (there is nothing else it could do). Defaults to
282
+ * `true`.
279
283
  */
280
284
  pushOnSelect?: boolean;
281
285
  /** Aria-label override for screen readers. */
@@ -296,13 +300,13 @@ type StackNavRowRenderProps = {
296
300
  * Whether the item has children. Use it to decide whether to draw a drill-in
297
301
  * affordance.
298
302
  *
299
- * Note this reports child presence, not a guarantee about `select`: the click
300
- * path pushes a pane whenever children exist and does not consult
301
- * `pushOnSelect`, which today only affects deep-link resolution. That
302
- * discrepancy predates this prop and is left alone here rather than changed
303
- * underneath existing consumers.
303
+ * Note this reports child presence, not a guarantee about `select`: `select`
304
+ * pushes a pane when children exist unless the item is an `href` row with
305
+ * `pushOnSelect: false`, whose pane is pushed by `drillIn` instead.
304
306
  */
305
307
  hasChildren: boolean;
308
+ /** Push the item's sub-pane without navigating — the chevron affordance for split rows. */
309
+ drillIn: () => void;
306
310
  /**
307
311
  * Run StackNav's selection: report through `onSelect` and push the sub-pane
308
312
  * when the item has children.