@streamscloud/kit 0.94.3 → 0.94.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.
@@ -1,8 +1,8 @@
1
1
  <script lang="ts">import NodeView from './cmp.tree-node-view.svelte';
2
2
  import { createTreeKeyboard } from './tree-keyboard.svelte';
3
- let { nodes, checked, header } = $props();
3
+ let { nodes, checked, header, keepExpandSlot = false } = $props();
4
4
  const nodesComputed = $derived(nodes ? (Array.isArray(nodes) ? nodes : [nodes]) : []);
5
- const hideExpandIcon = $derived(nodesComputed.every((f) => !f.children.length));
5
+ const hideExpandIcon = $derived(!keepExpandSlot && nodesComputed.every((f) => !f.children.length));
6
6
  const checkedSet = $derived(checked ? new Set(checked) : null);
7
7
  $effect(() => {
8
8
  for (const root of nodesComputed) {
@@ -7,6 +7,8 @@ type Props = {
7
7
  checked?: readonly string[];
8
8
  /** Optional content rendered above the nodes (e.g. a header). */
9
9
  header?: Snippet;
10
+ /** Keeps the expand-chevron column even when no node has children, so several Trees stacked together line up. */
11
+ keepExpandSlot?: boolean;
10
12
  };
11
13
  /**
12
14
  * Tree — hierarchical, collapsible node list driven by `TreeNode` model instances. Each `TreeNode`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.94.3",
3
+ "version": "0.94.4",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",