@principal-ade/dynamic-file-tree 0.2.17 → 0.2.19

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,12 +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((prevHeight) => {
12
- if (prevHeight !== height) {
13
- console.log("[useContainerHeight] Height changing:", prevHeight, "->", height);
14
- }
15
- return height;
16
- });
11
+ setContainerHeight((prevHeight) => prevHeight !== height ? height : prevHeight);
17
12
  }
18
13
  }
19
14
  };
@@ -1957,7 +1952,7 @@ var MultiFileTree = ({
1957
1952
  };
1958
1953
  // src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
1959
1954
  import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, GitCommit, ExternalLink, List, ListX, Eye as Eye2, EyeOff as EyeOff2 } from "lucide-react";
1960
- import React13, { useMemo as useMemo9, useRef as useRef5, useLayoutEffect } from "react";
1955
+ import React13, { useMemo as useMemo9, useRef as useRef5 } from "react";
1961
1956
  import { Tree as Tree3 } from "react-arborist";
1962
1957
 
1963
1958
  // src/utils/gitStatus.tsx
@@ -2511,7 +2506,6 @@ var StoryboardWorkflowsTreeCoreInner = ({
2511
2506
  onScenarioVisibilityToggle,
2512
2507
  showScenarios = false
2513
2508
  }) => {
2514
- console.log("[StoryboardWorkflowsTreeCoreInner] RENDER - if this logs after initial mount, React.memo is not working");
2515
2509
  const dndProps = getDndProps(enableDragAndDrop);
2516
2510
  const parentDndManager = useParentDndManager();
2517
2511
  const gitStatusMap = useMemo9(() => {
@@ -2774,27 +2768,6 @@ var StoryboardWorkflowsTreeCoreInner = ({
2774
2768
  const initialHeight = 600;
2775
2769
  const [containerRef, containerHeight] = useContainerHeight(initialHeight);
2776
2770
  const treeRef = useRef5(null);
2777
- const scrollTopRef = useRef5(0);
2778
- const listElementRef = useRef5(null);
2779
- useLayoutEffect(() => {
2780
- if (containerRef.current && !listElementRef.current) {
2781
- const listElement = containerRef.current.querySelector('[role="tree"]')?.parentElement;
2782
- if (listElement) {
2783
- listElementRef.current = listElement;
2784
- const handleScroll = () => {
2785
- scrollTopRef.current = listElement.scrollTop;
2786
- };
2787
- listElement.addEventListener("scroll", handleScroll);
2788
- return () => listElement.removeEventListener("scroll", handleScroll);
2789
- }
2790
- }
2791
- return;
2792
- });
2793
- useLayoutEffect(() => {
2794
- if (listElementRef.current && scrollTopRef.current > 0) {
2795
- listElementRef.current.scrollTop = scrollTopRef.current;
2796
- }
2797
- });
2798
2771
  return /* @__PURE__ */ React13.createElement("div", {
2799
2772
  ref: containerRef,
2800
2773
  style: {
@@ -2806,7 +2779,7 @@ var StoryboardWorkflowsTreeCoreInner = ({
2806
2779
  }
2807
2780
  }, /* @__PURE__ */ React13.createElement(Tree3, {
2808
2781
  ref: treeRef,
2809
- initialData: treeData,
2782
+ data: treeData,
2810
2783
  onSelect: handleSelect,
2811
2784
  openByDefault: defaultOpen,
2812
2785
  width: "100%",
@@ -2816,9 +2789,7 @@ var StoryboardWorkflowsTreeCoreInner = ({
2816
2789
  ...dndProps
2817
2790
  }, NodeRenderer));
2818
2791
  };
2819
- var StoryboardWorkflowsTreeCore = React13.memo(StoryboardWorkflowsTreeCoreInner, () => {
2820
- return true;
2821
- });
2792
+ var StoryboardWorkflowsTreeCore = React13.memo(StoryboardWorkflowsTreeCoreInner);
2822
2793
  // src/components/StoryboardWorkflowsTree/types.ts
2823
2794
  function hasWorkflowContent(node) {
2824
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;AA+9BjB,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,CAyBzG,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.17",
3
+ "version": "0.2.19",
4
4
  "description": "React component for selective directory filtering and file tree visualization",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",