@principal-ade/dynamic-file-tree 0.2.16 → 0.2.18

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.
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ var useContainerHeight = (initialHeight = 600) => {
8
8
  if (containerRef.current) {
9
9
  const height = containerRef.current.clientHeight;
10
10
  if (height > 0) {
11
- setContainerHeight(height);
11
+ setContainerHeight((prevHeight) => prevHeight !== height ? height : prevHeight);
12
12
  }
13
13
  }
14
14
  };
@@ -1952,7 +1952,7 @@ var MultiFileTree = ({
1952
1952
  };
1953
1953
  // src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
1954
1954
  import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, GitCommit, ExternalLink, List, ListX, Eye as Eye2, EyeOff as EyeOff2 } from "lucide-react";
1955
- import React13, { useMemo as useMemo9, useRef as useRef5, useLayoutEffect } from "react";
1955
+ import React13, { useMemo as useMemo9, useRef as useRef5 } from "react";
1956
1956
  import { Tree as Tree3 } from "react-arborist";
1957
1957
 
1958
1958
  // src/utils/gitStatus.tsx
@@ -2768,27 +2768,6 @@ var StoryboardWorkflowsTreeCoreInner = ({
2768
2768
  const initialHeight = 600;
2769
2769
  const [containerRef, containerHeight] = useContainerHeight(initialHeight);
2770
2770
  const treeRef = useRef5(null);
2771
- const scrollTopRef = useRef5(0);
2772
- const listElementRef = useRef5(null);
2773
- useLayoutEffect(() => {
2774
- if (containerRef.current && !listElementRef.current) {
2775
- const listElement = containerRef.current.querySelector('[role="tree"]')?.parentElement;
2776
- if (listElement) {
2777
- listElementRef.current = listElement;
2778
- const handleScroll = () => {
2779
- scrollTopRef.current = listElement.scrollTop;
2780
- };
2781
- listElement.addEventListener("scroll", handleScroll);
2782
- return () => listElement.removeEventListener("scroll", handleScroll);
2783
- }
2784
- }
2785
- return;
2786
- });
2787
- useLayoutEffect(() => {
2788
- if (listElementRef.current && scrollTopRef.current > 0) {
2789
- listElementRef.current.scrollTop = scrollTopRef.current;
2790
- }
2791
- });
2792
2771
  return /* @__PURE__ */ React13.createElement("div", {
2793
2772
  ref: containerRef,
2794
2773
  style: {
@@ -2810,9 +2789,7 @@ var StoryboardWorkflowsTreeCoreInner = ({
2810
2789
  ...dndProps
2811
2790
  }, NodeRenderer));
2812
2791
  };
2813
- var StoryboardWorkflowsTreeCore = React13.memo(StoryboardWorkflowsTreeCoreInner, () => {
2814
- return true;
2815
- });
2792
+ var StoryboardWorkflowsTreeCore = React13.memo(StoryboardWorkflowsTreeCoreInner);
2816
2793
  // src/components/StoryboardWorkflowsTree/types.ts
2817
2794
  function hasWorkflowContent(node) {
2818
2795
  return node.workflow !== undefined && "content" in node.workflow && node.workflow.content !== undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAShE,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AA49BjB,eAAO,MAAM,2BAA2B,0DAGtC,CAAC"}
1
+ {"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AAm7BjB,eAAO,MAAM,2BAA2B,0DAA+C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useContainerHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/useContainerHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAe,MAAY,KAAG,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,MAAM,CAoBzG,CAAC"}
1
+ {"version":3,"file":"useContainerHeight.d.ts","sourceRoot":"","sources":["../../../src/hooks/useContainerHeight.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAAI,gBAAe,MAAY,KAAG,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,MAAM,CAqBzG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principal-ade/dynamic-file-tree",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
4
4
  "description": "React component for selective directory filtering and file tree visualization",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",