react-os-shell 0.1.29 → 0.1.31

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.
@@ -566,6 +566,24 @@ function DxfPanel({ url, filename, onDownload, onEmail }) {
566
566
  ] });
567
567
  }
568
568
  var DEFAULT_O3DV_LIBS = "https://cdn.jsdelivr.net/npm/online-3d-viewer@0.18.0/libs/";
569
+ function buildTree(node, depth = 0) {
570
+ return {
571
+ id: node.GetId?.() ?? 0,
572
+ name: node.GetName?.() || (depth === 0 ? "Root" : "Node"),
573
+ isMeshNode: !!node.IsMeshNode?.(),
574
+ meshIndices: node.GetMeshIndices?.() ?? [],
575
+ children: (node.GetChildNodes?.() ?? []).map((c) => buildTree(c, depth + 1))
576
+ };
577
+ }
578
+ function collectNodeIds(node, out) {
579
+ out.add(node.id);
580
+ for (const c of node.children) collectNodeIds(c, out);
581
+ }
582
+ function hexToRgb(OV, hex) {
583
+ const m = /^#?([0-9a-f]{6})$/i.exec(hex);
584
+ const n = m ? parseInt(m[1], 16) : 0;
585
+ return new OV.RGBColor(n >> 16 & 255, n >> 8 & 255, n & 255);
586
+ }
569
587
  function StepPanel({ url, filename, onDownload, onEmail }) {
570
588
  const containerRef = useRef(null);
571
589
  const viewerRef = useRef(null);
@@ -573,11 +591,29 @@ function StepPanel({ url, filename, onDownload, onEmail }) {
573
591
  const [loading, setLoading] = useState(true);
574
592
  const [error, setError] = useState(null);
575
593
  const [showHint, setShowHint] = useState(true);
594
+ const [tree, setTree] = useState(null);
595
+ const [expanded, setExpanded] = useState({});
596
+ const [hidden, setHidden] = useState(/* @__PURE__ */ new Set());
597
+ const [bgColor, setBgColor] = useState("#f5f6f8");
598
+ const [showEdges, setShowEdges] = useState(true);
599
+ const [edgeColor, setEdgeColor] = useState("#000000");
600
+ const [edgeThreshold, setEdgeThreshold] = useState(1);
601
+ const [showMeshes, setShowMeshes] = useState(true);
602
+ const [showSettings, setShowSettings] = useState(true);
603
+ const [sectionEnabled, setSectionEnabled] = useState(false);
604
+ const [sectionAxis, setSectionAxis] = useState("z");
605
+ const [sectionFlip, setSectionFlip] = useState(false);
606
+ const [sectionPosition, setSectionPosition] = useState(0.5);
607
+ const [sectionCapColor, setSectionCapColor] = useState("#9aa6b3");
608
+ const sectionRef = useRef(null);
576
609
  useEffect(() => {
577
610
  let cancelled = false;
578
611
  let viewer = null;
579
612
  setLoading(true);
580
613
  setError(null);
614
+ setTree(null);
615
+ setExpanded({});
616
+ setHidden(/* @__PURE__ */ new Set());
581
617
  (async () => {
582
618
  let OV;
583
619
  try {
@@ -606,17 +642,34 @@ function StepPanel({ url, filename, onDownload, onEmail }) {
606
642
  viewer = new OV.EmbeddedViewer(containerRef.current, {
607
643
  backgroundColor: new OV.RGBAColor(245, 246, 248, 255),
608
644
  defaultColor: new OV.RGBColor(180, 188, 200),
609
- edgeSettings: new OV.EdgeSettings(false, new OV.RGBColor(0, 0, 0), 1),
645
+ edgeSettings: new OV.EdgeSettings(true, new OV.RGBColor(0, 0, 0), 1),
610
646
  onModelLoaded: () => {
611
- if (!cancelled) setLoading(false);
647
+ if (cancelled) return;
648
+ try {
649
+ const model = viewer.GetModel?.();
650
+ const root = model?.GetRootNode?.();
651
+ if (root) {
652
+ const t = buildTree(root);
653
+ setTree(t);
654
+ const expandIds = { [t.id]: true };
655
+ for (const c of t.children) expandIds[c.id] = true;
656
+ setExpanded(expandIds);
657
+ }
658
+ } catch (err) {
659
+ console.warn("[Preview] mesh tree extraction failed", err);
660
+ }
661
+ setLoading(false);
662
+ },
663
+ onModelLoadFailed: () => {
664
+ if (!cancelled) {
665
+ setError("Failed to load 3D model.");
666
+ setLoading(false);
667
+ }
612
668
  }
613
669
  });
614
670
  viewerRef.current = viewer;
615
671
  const inputFile = new OV.InputFile(filename, OV.FileSource.Url, url);
616
672
  viewer.LoadModelFromInputFiles([inputFile]);
617
- setTimeout(() => {
618
- if (!cancelled) setLoading(false);
619
- }, 4e3);
620
673
  } catch (e) {
621
674
  if (!cancelled) {
622
675
  setError(e?.message || "Failed to load 3D model.");
@@ -633,64 +686,527 @@ function StepPanel({ url, filename, onDownload, onEmail }) {
633
686
  viewerRef.current = null;
634
687
  };
635
688
  }, [url, filename]);
689
+ useEffect(() => {
690
+ const v = viewerRef.current;
691
+ if (!v?.viewer) return;
692
+ try {
693
+ const visit = (mesh) => {
694
+ const ud = mesh.userData?.originalMeshInstance ?? mesh.userData;
695
+ const nodeId = ud?.id?.nodeId ?? ud?.nodeId;
696
+ if (typeof nodeId === "number") {
697
+ mesh.visible = !hidden.has(nodeId);
698
+ }
699
+ };
700
+ v.viewer.mainModel?.EnumerateMeshesAndLines?.(visit);
701
+ v.viewer.mainModel?.EnumerateEdges?.(visit);
702
+ v.viewer.Render?.();
703
+ } catch (err) {
704
+ console.warn("[Preview] visibility update failed", err);
705
+ }
706
+ }, [hidden, tree]);
707
+ useEffect(() => {
708
+ const OV = ovRef.current;
709
+ const v = viewerRef.current;
710
+ if (!OV || !v?.viewer) return;
711
+ try {
712
+ v.viewer.SetEdgeSettings(new OV.EdgeSettings(showEdges, hexToRgb(OV, edgeColor), edgeThreshold));
713
+ v.viewer.Render?.();
714
+ } catch {
715
+ }
716
+ }, [showEdges, edgeColor, edgeThreshold]);
717
+ useEffect(() => {
718
+ const OV = ovRef.current;
719
+ const v = viewerRef.current;
720
+ if (!OV || !v?.viewer) return;
721
+ try {
722
+ const c = hexToRgb(OV, bgColor);
723
+ v.viewer.SetBackgroundColor(new OV.RGBAColor(c.r, c.g, c.b, 255));
724
+ v.viewer.Render?.();
725
+ } catch {
726
+ }
727
+ }, [bgColor]);
728
+ useEffect(() => {
729
+ const v = viewerRef.current;
730
+ if (!v?.viewer || loading) return;
731
+ let cancelled = false;
732
+ let teardown = null;
733
+ (async () => {
734
+ const THREE = await import('three');
735
+ if (cancelled) return;
736
+ const renderer = v.viewer.renderer;
737
+ const scene = v.viewer.scene;
738
+ if (!renderer || !scene) return;
739
+ if (sectionRef.current) {
740
+ const s = sectionRef.current;
741
+ for (const [mat, prev] of s.materialState.entries()) {
742
+ mat.clippingPlanes = prev.clippingPlanes;
743
+ mat.clipShadows = prev.clipShadows;
744
+ mat.needsUpdate = true;
745
+ }
746
+ for (const helper of s.helpers) {
747
+ helper.parent?.remove(helper);
748
+ helper.geometry?.dispose?.();
749
+ helper.material?.dispose?.();
750
+ }
751
+ if (s.capMesh) {
752
+ scene.remove(s.capMesh);
753
+ s.capMesh.geometry?.dispose?.();
754
+ s.capMesh.material?.dispose?.();
755
+ }
756
+ sectionRef.current = null;
757
+ }
758
+ if (!sectionEnabled) {
759
+ renderer.localClippingEnabled = false;
760
+ v.viewer.Render?.();
761
+ return;
762
+ }
763
+ const bbox = v.viewer.GetBoundingBox?.(() => true);
764
+ if (!bbox) return;
765
+ const plane = new THREE.Plane(new THREE.Vector3(0, 0, -1), 0);
766
+ const helpers = [];
767
+ const materialState = /* @__PURE__ */ new Map();
768
+ const applyToMaterial = (mat) => {
769
+ if (!mat || materialState.has(mat)) return;
770
+ materialState.set(mat, {
771
+ clippingPlanes: mat.clippingPlanes,
772
+ clipShadows: mat.clipShadows
773
+ });
774
+ mat.clippingPlanes = [plane];
775
+ mat.clipShadows = true;
776
+ mat.needsUpdate = true;
777
+ };
778
+ v.viewer.mainModel?.EnumerateMeshes?.((mesh) => {
779
+ const mat = mesh.material;
780
+ if (Array.isArray(mat)) for (const m of mat) applyToMaterial(m);
781
+ else applyToMaterial(mat);
782
+ const makeStencil = (side, op) => {
783
+ const m = new THREE.MeshBasicMaterial({
784
+ depthWrite: false,
785
+ depthTest: false,
786
+ colorWrite: false,
787
+ stencilWrite: true,
788
+ stencilFunc: THREE.AlwaysStencilFunc,
789
+ stencilFail: op,
790
+ stencilZFail: op,
791
+ stencilZPass: op,
792
+ side,
793
+ clippingPlanes: [plane]
794
+ });
795
+ const helper = new THREE.Mesh(mesh.geometry, m);
796
+ helper.matrixAutoUpdate = false;
797
+ helper.renderOrder = 1;
798
+ helper.userData.__sectionHelper = true;
799
+ mesh.add(helper);
800
+ helpers.push(helper);
801
+ };
802
+ makeStencil(THREE.BackSide, THREE.IncrementWrapStencilOp);
803
+ makeStencil(THREE.FrontSide, THREE.DecrementWrapStencilOp);
804
+ });
805
+ const dx = bbox.max.x - bbox.min.x;
806
+ const dy = bbox.max.y - bbox.min.y;
807
+ const dz = bbox.max.z - bbox.min.z;
808
+ const capSize = Math.max(dx, dy, dz) * 2 || 1;
809
+ const capGeom = new THREE.PlaneGeometry(capSize, capSize);
810
+ const capMat = new THREE.MeshPhongMaterial({
811
+ color: 10135219,
812
+ side: THREE.DoubleSide,
813
+ stencilWrite: true,
814
+ stencilRef: 0,
815
+ stencilFunc: THREE.NotEqualStencilFunc,
816
+ stencilFail: THREE.ReplaceStencilOp,
817
+ stencilZFail: THREE.ReplaceStencilOp,
818
+ stencilZPass: THREE.ReplaceStencilOp
819
+ });
820
+ const capMesh = new THREE.Mesh(capGeom, capMat);
821
+ capMesh.renderOrder = 2;
822
+ scene.add(capMesh);
823
+ renderer.localClippingEnabled = true;
824
+ sectionRef.current = { plane, capMesh, helpers, materialState, bbox };
825
+ v.viewer.Render?.();
826
+ teardown = () => {
827
+ };
828
+ })();
829
+ return () => {
830
+ cancelled = true;
831
+ if (teardown) teardown();
832
+ };
833
+ }, [sectionEnabled, loading, tree]);
834
+ useEffect(() => {
835
+ const v = viewerRef.current;
836
+ const s = sectionRef.current;
837
+ if (!v?.viewer || !s || !sectionEnabled) return;
838
+ try {
839
+ const bbox = s.bbox;
840
+ const axisIdx = sectionAxis === "x" ? 0 : sectionAxis === "y" ? 1 : 2;
841
+ const min = [bbox.min.x, bbox.min.y, bbox.min.z][axisIdx];
842
+ const max = [bbox.max.x, bbox.max.y, bbox.max.z][axisIdx];
843
+ const value = min + (max - min) * sectionPosition;
844
+ const dir = sectionFlip ? 1 : -1;
845
+ const nx = sectionAxis === "x" ? dir : 0;
846
+ const ny = sectionAxis === "y" ? dir : 0;
847
+ const nz = sectionAxis === "z" ? dir : 0;
848
+ s.plane.normal.set(nx, ny, nz);
849
+ s.plane.constant = -dir * value;
850
+ const cx = (bbox.min.x + bbox.max.x) / 2;
851
+ const cy = (bbox.min.y + bbox.max.y) / 2;
852
+ const cz = (bbox.min.z + bbox.max.z) / 2;
853
+ const center = { x: cx, y: cy, z: cz };
854
+ const dist = nx * center.x + ny * center.y + nz * center.z + s.plane.constant;
855
+ const px = center.x - nx * dist;
856
+ const py = center.y - ny * dist;
857
+ const pz = center.z - nz * dist;
858
+ s.capMesh.position.set(px, py, pz);
859
+ s.capMesh.lookAt(px + nx, py + ny, pz + nz);
860
+ try {
861
+ const m = /^#?([0-9a-f]{6})$/i.exec(sectionCapColor);
862
+ const n = m ? parseInt(m[1], 16) : 10135219;
863
+ s.capMesh.material.color.setHex(n);
864
+ } catch {
865
+ }
866
+ v.viewer.Render?.();
867
+ } catch (err) {
868
+ console.warn("[Preview] section update failed", err);
869
+ }
870
+ }, [sectionEnabled, sectionAxis, sectionFlip, sectionPosition, sectionCapColor]);
636
871
  useEffect(() => {
637
872
  if (!showHint || loading) return;
638
873
  const t = setTimeout(() => setShowHint(false), 5e3);
639
874
  return () => clearTimeout(t);
640
875
  }, [showHint, loading]);
641
- const handleDefaultDownload = () => {
642
- const a = document.createElement("a");
643
- a.href = url;
644
- a.download = filename;
645
- a.click();
876
+ const toggleNodeVisible = (node) => {
877
+ const ids = /* @__PURE__ */ new Set();
878
+ collectNodeIds(node, ids);
879
+ setHidden((prev) => {
880
+ const next = new Set(prev);
881
+ const anyVisible = [...ids].some((id) => !next.has(id));
882
+ for (const id of ids) {
883
+ if (anyVisible) next.add(id);
884
+ else next.delete(id);
885
+ }
886
+ return next;
887
+ });
646
888
  };
647
- const handleResetView = () => {
889
+ const toggleExpanded = (id) => {
890
+ setExpanded((prev) => ({ ...prev, [id]: !prev[id] }));
891
+ };
892
+ const fitNode = (node) => {
893
+ handleFit();
894
+ };
895
+ const handleFit = () => {
648
896
  try {
649
897
  const v = viewerRef.current;
650
- v?.viewer?.FitSphereToWindow?.(v?.GetBoundingSphere?.((m) => true), false);
651
- v?.Render?.();
898
+ const sphere = v?.GetBoundingSphere?.(() => true);
899
+ if (sphere) v.viewer.FitSphereToWindow(sphere, true);
900
+ v?.viewer?.Render?.();
652
901
  } catch {
653
902
  }
654
903
  };
904
+ const setCameraPreset = (preset) => {
905
+ const OV = ovRef.current;
906
+ const v = viewerRef.current;
907
+ if (!OV || !v?.viewer) return;
908
+ try {
909
+ const sphere = v.GetBoundingSphere?.(() => true);
910
+ if (!sphere) return;
911
+ const c = sphere.center;
912
+ const r = sphere.radius || 1;
913
+ const dist = r * 3;
914
+ const cx = c.x ?? 0, cy = c.y ?? 0, cz = c.z ?? 0;
915
+ let eye, up;
916
+ switch (preset) {
917
+ case "top":
918
+ eye = new OV.Coord3D(cx, cy, cz + dist);
919
+ up = new OV.Coord3D(0, 1, 0);
920
+ break;
921
+ case "front":
922
+ eye = new OV.Coord3D(cx, cy - dist, cz);
923
+ up = new OV.Coord3D(0, 0, 1);
924
+ break;
925
+ case "side":
926
+ eye = new OV.Coord3D(cx + dist, cy, cz);
927
+ up = new OV.Coord3D(0, 0, 1);
928
+ break;
929
+ case "iso":
930
+ default: {
931
+ const k = dist / Math.sqrt(3);
932
+ eye = new OV.Coord3D(cx + k, cy - k, cz + k);
933
+ up = new OV.Coord3D(0, 0, 1);
934
+ break;
935
+ }
936
+ }
937
+ const center = new OV.Coord3D(cx, cy, cz);
938
+ const cam = new OV.Camera(eye, center, up, 45);
939
+ v.viewer.SetCamera(cam);
940
+ v.viewer.AdjustClippingPlanesToSphere?.(sphere);
941
+ v.viewer.Render?.();
942
+ } catch {
943
+ }
944
+ };
945
+ const handleSnapshot = () => {
946
+ try {
947
+ const v = viewerRef.current;
948
+ const size = v?.viewer?.GetCanvasSize?.() ?? { width: 1280, height: 720 };
949
+ const dataUrl = v?.viewer?.GetImageAsDataUrl?.(size.width, size.height, false);
950
+ if (!dataUrl) return;
951
+ const a = document.createElement("a");
952
+ a.href = dataUrl;
953
+ a.download = `${filename.replace(/\.[^.]+$/, "")}-snapshot.png`;
954
+ a.click();
955
+ } catch {
956
+ }
957
+ };
958
+ const handleResetDisplay = () => {
959
+ setBgColor("#f5f6f8");
960
+ setShowEdges(true);
961
+ setEdgeColor("#000000");
962
+ setEdgeThreshold(1);
963
+ setSectionEnabled(false);
964
+ setSectionAxis("z");
965
+ setSectionFlip(false);
966
+ setSectionPosition(0.5);
967
+ setSectionCapColor("#9aa6b3");
968
+ };
969
+ const handleDefaultDownload = () => {
970
+ const a = document.createElement("a");
971
+ a.href = url;
972
+ a.download = filename;
973
+ a.click();
974
+ };
655
975
  const ext = (filename.split(".").pop() || "").toUpperCase();
656
- const btn = "px-2 py-1 rounded hover:bg-gray-200 transition-colors text-gray-600 flex items-center gap-1";
657
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
658
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0 text-xs", children: [
659
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
660
- /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-600", children: ext || "3D" }),
661
- /* @__PURE__ */ jsx("span", { className: "text-gray-400 truncate max-w-xs", children: filename })
662
- ] }),
663
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
664
- /* @__PURE__ */ jsx("button", { onClick: () => setShowHint((s) => !s), className: btn, title: "How to navigate", children: /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" }) }) }),
665
- /* @__PURE__ */ jsx("button", { onClick: handleResetView, className: btn, title: "Fit model to view", children: "Fit" }),
666
- /* @__PURE__ */ jsxs("button", { onClick: onDownload ?? handleDefaultDownload, className: btn, children: [
667
- /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" }) }),
668
- "Download"
669
- ] }),
670
- onEmail && /* @__PURE__ */ jsxs("button", { onClick: onEmail, className: btn, children: [
671
- /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" }) }),
672
- "Email"
673
- ] })
674
- ] })
976
+ const renderTreeNode = (node, depth = 0) => {
977
+ const hasChildren = node.children.length > 0;
978
+ const isExpanded = expanded[node.id] !== false;
979
+ const isVisible = !hidden.has(node.id);
980
+ return /* @__PURE__ */ jsxs("div", { children: [
981
+ /* @__PURE__ */ jsxs(
982
+ "div",
983
+ {
984
+ className: "group flex items-center gap-1 px-1.5 py-1 hover:bg-slate-700/50 cursor-default text-[12px] text-slate-200",
985
+ style: { paddingLeft: `${depth * 12 + 6}px` },
986
+ children: [
987
+ hasChildren ? /* @__PURE__ */ jsx(
988
+ "button",
989
+ {
990
+ onClick: () => toggleExpanded(node.id),
991
+ className: "h-4 w-4 shrink-0 flex items-center justify-center text-slate-400 hover:text-slate-100",
992
+ title: isExpanded ? "Collapse" : "Expand",
993
+ children: /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: isExpanded ? "M19.5 8.25l-7.5 7.5-7.5-7.5" : "M8.25 4.5l7.5 7.5-7.5 7.5" }) })
994
+ }
995
+ ) : /* @__PURE__ */ jsx("span", { className: "h-4 w-4 shrink-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "h-1 w-1 rounded-full bg-slate-500" }) }),
996
+ /* @__PURE__ */ jsx("span", { className: `flex-1 truncate ${isVisible ? "" : "opacity-40"}`, title: node.name, children: node.name }),
997
+ /* @__PURE__ */ jsx(
998
+ "button",
999
+ {
1000
+ onClick: () => fitNode(),
1001
+ className: "h-4 w-4 shrink-0 text-slate-500 hover:text-slate-100 opacity-0 group-hover:opacity-100 transition-opacity",
1002
+ title: "Fit to view",
1003
+ children: /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" }) })
1004
+ }
1005
+ ),
1006
+ /* @__PURE__ */ jsx(
1007
+ "button",
1008
+ {
1009
+ onClick: () => toggleNodeVisible(node),
1010
+ className: "h-4 w-4 shrink-0 text-slate-400 hover:text-slate-100",
1011
+ title: isVisible ? "Hide" : "Show",
1012
+ children: isVisible ? /* @__PURE__ */ jsxs("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
1013
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" }),
1014
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
1015
+ ] }) : /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88" }) })
1016
+ }
1017
+ )
1018
+ ]
1019
+ }
1020
+ ),
1021
+ isExpanded && hasChildren && /* @__PURE__ */ jsx("div", { children: node.children.map((c) => renderTreeNode(c, depth + 1)) })
1022
+ ] }, node.id);
1023
+ };
1024
+ const tBtn = "h-8 w-8 shrink-0 flex items-center justify-center rounded text-slate-300 hover:bg-slate-700 hover:text-white transition-colors";
1025
+ const tBtnActive = "h-8 w-8 shrink-0 flex items-center justify-center rounded bg-slate-700 text-white";
1026
+ const tBtnSep = "h-5 w-px bg-slate-700 mx-1";
1027
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full bg-slate-900", children: [
1028
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5 bg-slate-800 border-b border-slate-700 shrink-0", children: [
1029
+ /* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold tracking-wide text-slate-300 px-2 truncate max-w-xs", title: filename, children: filename }),
1030
+ /* @__PURE__ */ jsx("div", { className: tBtnSep }),
1031
+ /* @__PURE__ */ jsx("button", { onClick: handleFit, className: tBtn, title: "Fit to view", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" }) }) }),
1032
+ /* @__PURE__ */ jsx("div", { className: tBtnSep }),
1033
+ /* @__PURE__ */ jsx("button", { onClick: () => setCameraPreset("iso"), className: tBtn, title: "Isometric view", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold", children: "ISO" }) }),
1034
+ /* @__PURE__ */ jsx("button", { onClick: () => setCameraPreset("top"), className: tBtn, title: "Top view", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold", children: "TOP" }) }),
1035
+ /* @__PURE__ */ jsx("button", { onClick: () => setCameraPreset("front"), className: tBtn, title: "Front view", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold", children: "FRT" }) }),
1036
+ /* @__PURE__ */ jsx("button", { onClick: () => setCameraPreset("side"), className: tBtn, title: "Side view", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold", children: "SDE" }) }),
1037
+ /* @__PURE__ */ jsx("div", { className: tBtnSep }),
1038
+ /* @__PURE__ */ jsx("button", { onClick: handleSnapshot, className: tBtn, title: "Save snapshot as PNG", children: /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
1039
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316z" }),
1040
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zM18.75 10.5h.008v.008h-.008V10.5z" })
1041
+ ] }) }),
1042
+ /* @__PURE__ */ jsx("button", { onClick: () => setShowHint((s) => !s), className: tBtn, title: "How to navigate", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" }) }) }),
1043
+ /* @__PURE__ */ jsx("div", { className: "flex-1" }),
1044
+ /* @__PURE__ */ jsx("button", { onClick: () => setShowMeshes((s) => !s), className: showMeshes ? tBtnActive : tBtn, title: "Toggle meshes panel", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" }) }) }),
1045
+ /* @__PURE__ */ jsx("button", { onClick: () => setShowSettings((s) => !s), className: showSettings ? tBtnActive : tBtn, title: "Toggle display panel", children: /* @__PURE__ */ jsxs("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
1046
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" }),
1047
+ /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
1048
+ ] }) }),
1049
+ /* @__PURE__ */ jsx("button", { onClick: onDownload ?? handleDefaultDownload, className: tBtn, title: "Download original file", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" }) }) }),
1050
+ onEmail && /* @__PURE__ */ jsx("button", { onClick: onEmail, className: tBtn, title: "Email", children: /* @__PURE__ */ jsx("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" }) }) })
675
1051
  ] }),
676
- /* @__PURE__ */ jsxs("div", { className: "relative flex-1 bg-[#f5f6f8] min-h-0", children: [
677
- /* @__PURE__ */ jsx("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
678
- showHint && !loading && !error && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2 bg-gray-900/85 text-white text-[11px] px-3 py-1.5 rounded-full shadow-lg flex items-center gap-3 z-10 pointer-events-none", children: [
679
- /* @__PURE__ */ jsx("span", { children: "Drag to rotate" }),
680
- /* @__PURE__ */ jsx("span", { className: "text-white/40", children: "\u2022" }),
681
- /* @__PURE__ */ jsx("span", { children: "Right-click drag to pan" }),
682
- /* @__PURE__ */ jsx("span", { className: "text-white/40", children: "\u2022" }),
683
- /* @__PURE__ */ jsx("span", { children: "Scroll to zoom" })
1052
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex min-h-0", children: [
1053
+ showMeshes && /* @__PURE__ */ jsxs("div", { className: "w-60 shrink-0 bg-slate-800 border-r border-slate-700 flex flex-col", children: [
1054
+ /* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-slate-400 border-b border-slate-700", children: "Meshes" }),
1055
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto py-1", children: tree ? renderTreeNode(tree) : /* @__PURE__ */ jsx("div", { className: "px-3 py-3 text-[11px] text-slate-500 italic", children: loading ? "Reading model\u2026" : "No structure available" }) }),
1056
+ tree && /* @__PURE__ */ jsx("div", { className: "px-3 py-1.5 text-[10px] text-slate-500 border-t border-slate-700", children: hidden.size === 0 ? "All visible" : `${hidden.size} hidden` })
684
1057
  ] }),
685
- loading && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-white/80 text-sm text-gray-500 gap-2", children: [
686
- /* @__PURE__ */ jsxs("svg", { className: "h-6 w-6 text-blue-500 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
687
- /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.2" }),
688
- /* @__PURE__ */ jsx("path", { d: "M22 12a10 10 0 0 1-10 10", strokeLinecap: "round" })
1058
+ /* @__PURE__ */ jsxs("div", { className: "relative flex-1 min-w-0", style: { background: bgColor }, children: [
1059
+ /* @__PURE__ */ jsx("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
1060
+ showHint && !loading && !error && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2 bg-gray-900/85 text-white text-[11px] px-3 py-1.5 rounded-full shadow-lg flex items-center gap-3 z-10 pointer-events-none", children: [
1061
+ /* @__PURE__ */ jsx("span", { children: "Drag to rotate" }),
1062
+ /* @__PURE__ */ jsx("span", { className: "text-white/40", children: "\u2022" }),
1063
+ /* @__PURE__ */ jsx("span", { children: "Right-click drag to pan" }),
1064
+ /* @__PURE__ */ jsx("span", { className: "text-white/40", children: "\u2022" }),
1065
+ /* @__PURE__ */ jsx("span", { children: "Scroll to zoom" })
1066
+ ] }),
1067
+ loading && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-white/85 text-sm text-gray-600 gap-2", children: [
1068
+ /* @__PURE__ */ jsxs("svg", { className: "h-6 w-6 text-blue-500 animate-spin", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
1069
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", strokeOpacity: "0.2" }),
1070
+ /* @__PURE__ */ jsx("path", { d: "M22 12a10 10 0 0 1-10 10", strokeLinecap: "round" })
1071
+ ] }),
1072
+ /* @__PURE__ */ jsx("span", { children: "Loading 3D model\u2026" }),
1073
+ ext === "STP" || ext === "STEP" ? /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: "STEP files load OpenCascade WASM (~5 MB) on first use." }) : null
689
1074
  ] }),
690
- /* @__PURE__ */ jsx("span", { children: "Loading 3D model\u2026" }),
691
- ext === "STP" || ext === "STEP" ? /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400", children: "STEP files load OpenCascade WASM (~5 MB) on first use." }) : null
1075
+ error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-sm text-red-600 px-6 text-center bg-white/85", children: error })
692
1076
  ] }),
693
- error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-sm text-red-600 px-6 text-center", children: error })
1077
+ showSettings && /* @__PURE__ */ jsxs("div", { className: "w-60 shrink-0 bg-slate-800 border-l border-slate-700 flex flex-col", children: [
1078
+ /* @__PURE__ */ jsx("div", { className: "px-3 py-2 text-[11px] font-semibold uppercase tracking-wide text-slate-400 border-b border-slate-700", children: "Model Display" }),
1079
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-3 py-3 space-y-3 text-[12px] text-slate-200", children: [
1080
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
1081
+ /* @__PURE__ */ jsx("span", { children: "Background Color" }),
1082
+ /* @__PURE__ */ jsx("input", { type: "color", value: bgColor, onChange: (e) => setBgColor(e.target.value), className: "h-6 w-10 rounded border border-slate-600 bg-transparent" })
1083
+ ] }),
1084
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
1085
+ /* @__PURE__ */ jsx("span", { children: "Show Edges" }),
1086
+ /* @__PURE__ */ jsx(
1087
+ "button",
1088
+ {
1089
+ onClick: () => setShowEdges((s) => !s),
1090
+ className: `relative h-5 w-9 rounded-full transition-colors ${showEdges ? "bg-blue-500" : "bg-slate-600"}`,
1091
+ children: /* @__PURE__ */ jsx("span", { className: `absolute top-0.5 h-4 w-4 rounded-full bg-white transition-transform ${showEdges ? "translate-x-4" : "translate-x-0.5"}` })
1092
+ }
1093
+ )
1094
+ ] }),
1095
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
1096
+ /* @__PURE__ */ jsx("span", { className: showEdges ? "" : "opacity-40", children: "Edge Color" }),
1097
+ /* @__PURE__ */ jsx(
1098
+ "input",
1099
+ {
1100
+ type: "color",
1101
+ value: edgeColor,
1102
+ onChange: (e) => setEdgeColor(e.target.value),
1103
+ disabled: !showEdges,
1104
+ className: "h-6 w-10 rounded border border-slate-600 bg-transparent disabled:opacity-40"
1105
+ }
1106
+ )
1107
+ ] }),
1108
+ /* @__PURE__ */ jsxs("div", { className: showEdges ? "" : "opacity-40 pointer-events-none", children: [
1109
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 mb-1", children: [
1110
+ /* @__PURE__ */ jsx("span", { children: "Edge Threshold" }),
1111
+ /* @__PURE__ */ jsxs("span", { className: "text-slate-400 tabular-nums", children: [
1112
+ edgeThreshold,
1113
+ "\xB0"
1114
+ ] })
1115
+ ] }),
1116
+ /* @__PURE__ */ jsx(
1117
+ "input",
1118
+ {
1119
+ type: "range",
1120
+ min: 0,
1121
+ max: 45,
1122
+ step: 1,
1123
+ value: edgeThreshold,
1124
+ onChange: (e) => setEdgeThreshold(Number(e.target.value)),
1125
+ className: "w-full accent-blue-500"
1126
+ }
1127
+ )
1128
+ ] }),
1129
+ /* @__PURE__ */ jsxs("div", { className: "border-t border-slate-700 -mx-3 px-3 pt-3 mt-1", children: [
1130
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
1131
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: "Section View" }),
1132
+ /* @__PURE__ */ jsx(
1133
+ "button",
1134
+ {
1135
+ onClick: () => setSectionEnabled((s) => !s),
1136
+ className: `relative h-5 w-9 rounded-full transition-colors ${sectionEnabled ? "bg-blue-500" : "bg-slate-600"}`,
1137
+ children: /* @__PURE__ */ jsx("span", { className: `absolute top-0.5 h-4 w-4 rounded-full bg-white transition-transform ${sectionEnabled ? "translate-x-4" : "translate-x-0.5"}` })
1138
+ }
1139
+ )
1140
+ ] }),
1141
+ /* @__PURE__ */ jsxs("div", { className: sectionEnabled ? "mt-2 space-y-2" : "mt-2 space-y-2 opacity-40 pointer-events-none", children: [
1142
+ /* @__PURE__ */ jsxs("div", { children: [
1143
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 mb-1", children: [
1144
+ /* @__PURE__ */ jsx("span", { children: "Axis" }),
1145
+ /* @__PURE__ */ jsx(
1146
+ "button",
1147
+ {
1148
+ onClick: () => setSectionFlip((f) => !f),
1149
+ className: "text-[10px] text-slate-300 hover:text-white px-1.5 py-0.5 rounded bg-slate-700 hover:bg-slate-600",
1150
+ title: "Flip section direction",
1151
+ children: sectionFlip ? "\u2190 flipped" : "flip \u2192"
1152
+ }
1153
+ )
1154
+ ] }),
1155
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-1", children: ["x", "y", "z"].map((ax) => /* @__PURE__ */ jsx(
1156
+ "button",
1157
+ {
1158
+ onClick: () => setSectionAxis(ax),
1159
+ className: `py-1 rounded text-[11px] font-semibold ${sectionAxis === ax ? "bg-blue-500 text-white" : "bg-slate-700 text-slate-300 hover:bg-slate-600"}`,
1160
+ children: ax.toUpperCase()
1161
+ },
1162
+ ax
1163
+ )) })
1164
+ ] }),
1165
+ /* @__PURE__ */ jsxs("div", { children: [
1166
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 mb-1", children: [
1167
+ /* @__PURE__ */ jsx("span", { children: "Position" }),
1168
+ /* @__PURE__ */ jsxs("span", { className: "text-slate-400 tabular-nums", children: [
1169
+ Math.round(sectionPosition * 100),
1170
+ "%"
1171
+ ] })
1172
+ ] }),
1173
+ /* @__PURE__ */ jsx(
1174
+ "input",
1175
+ {
1176
+ type: "range",
1177
+ min: 0,
1178
+ max: 1,
1179
+ step: 0.01,
1180
+ value: sectionPosition,
1181
+ onChange: (e) => setSectionPosition(Number(e.target.value)),
1182
+ className: "w-full accent-blue-500"
1183
+ }
1184
+ )
1185
+ ] }),
1186
+ /* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
1187
+ /* @__PURE__ */ jsx("span", { children: "Cap Color" }),
1188
+ /* @__PURE__ */ jsx(
1189
+ "input",
1190
+ {
1191
+ type: "color",
1192
+ value: sectionCapColor,
1193
+ onChange: (e) => setSectionCapColor(e.target.value),
1194
+ className: "h-6 w-10 rounded border border-slate-600 bg-transparent"
1195
+ }
1196
+ )
1197
+ ] })
1198
+ ] })
1199
+ ] })
1200
+ ] }),
1201
+ /* @__PURE__ */ jsx("div", { className: "px-3 py-2 border-t border-slate-700", children: /* @__PURE__ */ jsx(
1202
+ "button",
1203
+ {
1204
+ onClick: handleResetDisplay,
1205
+ className: "w-full text-[11px] text-slate-300 bg-slate-700 hover:bg-slate-600 rounded py-1.5 transition-colors",
1206
+ children: "Reset to Default"
1207
+ }
1208
+ ) })
1209
+ ] })
694
1210
  ] })
695
1211
  ] });
696
1212
  }
@@ -744,5 +1260,5 @@ function ImagePanel({ url, filename, onDownload, onEmail }) {
744
1260
  }
745
1261
 
746
1262
  export { Preview, setPdfPreview };
747
- //# sourceMappingURL=chunk-CP5X55CA.js.map
748
- //# sourceMappingURL=chunk-CP5X55CA.js.map
1263
+ //# sourceMappingURL=chunk-RGYSM6P5.js.map
1264
+ //# sourceMappingURL=chunk-RGYSM6P5.js.map