@tscircuit/3d-viewer 0.0.442 → 0.0.443

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.
Files changed (2) hide show
  1. package/dist/index.js +325 -184
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -28200,6 +28200,12 @@ var AnyCadComponent = ({
28200
28200
  source_component_id: cad_component2.source_component_id
28201
28201
  })?.name;
28202
28202
  }, [circuitJson, cad_component2.source_component_id]);
28203
+ const isThroughHole = useMemo7(() => {
28204
+ const platedHoles = circuitJson.filter(
28205
+ (elm) => elm.type === "pcb_plated_hole" && elm.pcb_component_id === cad_component2.pcb_component_id
28206
+ );
28207
+ return platedHoles.length > 0;
28208
+ }, [circuitJson, cad_component2.pcb_component_id]);
28203
28209
  const url = cad_component2.model_obj_url ?? cad_component2.model_wrl_url ?? cad_component2.model_stl_url;
28204
28210
  const gltfUrl = cad_component2.model_glb_url ?? cad_component2.model_gltf_url;
28205
28211
  const rotationOffset = cad_component2.rotation ? tuple(
@@ -28275,7 +28281,10 @@ var AnyCadComponent = ({
28275
28281
  }
28276
28282
  );
28277
28283
  }
28278
- if (!visibility.smtModels) {
28284
+ if (isThroughHole && !visibility.throughHoleModels) {
28285
+ return null;
28286
+ }
28287
+ if (!isThroughHole && !visibility.smtModels) {
28279
28288
  return null;
28280
28289
  }
28281
28290
  return /* @__PURE__ */ jsxs2(Fragment3, { children: [
@@ -28309,7 +28318,7 @@ import * as THREE15 from "three";
28309
28318
  // package.json
28310
28319
  var package_default = {
28311
28320
  name: "@tscircuit/3d-viewer",
28312
- version: "0.0.441",
28321
+ version: "0.0.442",
28313
28322
  main: "./dist/index.js",
28314
28323
  module: "./dist/index.js",
28315
28324
  type: "module",
@@ -28338,6 +28347,7 @@ var package_default = {
28338
28347
  dependencies: {
28339
28348
  "@jscad/regl-renderer": "^2.6.12",
28340
28349
  "@jscad/stl-serializer": "^2.1.20",
28350
+ "react-hot-toast": "^2.6.0",
28341
28351
  three: "^0.165.0",
28342
28352
  "three-stdlib": "^2.36.0",
28343
28353
  "troika-three-text": "^0.52.4"
@@ -34547,6 +34557,11 @@ import { useEffect as useEffect25, useMemo as useMemo21, useRef as useRef11, use
34547
34557
  var hotkeyRegistry = /* @__PURE__ */ new Map();
34548
34558
  var subscribers = /* @__PURE__ */ new Set();
34549
34559
  var isListenerAttached = false;
34560
+ var lastMouseX = 0;
34561
+ var lastMouseY = 0;
34562
+ var viewerElement = null;
34563
+ var mouseTrackingAttached = false;
34564
+ var MAX_PARENT_DEPTH = 20;
34550
34565
  var parseShortcut = (shortcut) => {
34551
34566
  const parts = shortcut.toLowerCase().split("+");
34552
34567
  const key = parts[parts.length - 1];
@@ -34576,10 +34591,53 @@ var isEditableTarget = (target) => {
34576
34591
  if (editableTags.includes(tagName)) {
34577
34592
  return true;
34578
34593
  }
34579
- return Boolean(element.getAttribute?.("contenteditable"));
34594
+ const contentEditable = element.getAttribute?.("contenteditable");
34595
+ if (contentEditable === "true" || contentEditable === "") {
34596
+ return true;
34597
+ }
34598
+ let current2 = element.parentElement;
34599
+ for (let depth = 0; depth < MAX_PARENT_DEPTH && current2; depth++) {
34600
+ const tagName2 = current2.tagName;
34601
+ if (editableTags.includes(tagName2)) {
34602
+ return true;
34603
+ }
34604
+ const contentEditable2 = current2.getAttribute?.("contenteditable");
34605
+ if (contentEditable2 === "true" || contentEditable2 === "") {
34606
+ return true;
34607
+ }
34608
+ current2 = current2.parentElement;
34609
+ }
34610
+ return false;
34611
+ };
34612
+ var isInputFocused = () => {
34613
+ if (typeof document === "undefined") return false;
34614
+ const activeElement = document.activeElement;
34615
+ if (!activeElement) return false;
34616
+ const tagName = activeElement.tagName;
34617
+ if (tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT") {
34618
+ return true;
34619
+ }
34620
+ const contentEditable = activeElement.getAttribute("contenteditable");
34621
+ return contentEditable === "true" || contentEditable === "";
34622
+ };
34623
+ var isMouseOverViewer = () => {
34624
+ if (!viewerElement) return true;
34625
+ const rect = viewerElement.getBoundingClientRect();
34626
+ return lastMouseX >= rect.left && lastMouseX <= rect.right && lastMouseY >= rect.top && lastMouseY <= rect.bottom;
34627
+ };
34628
+ var attachMouseTracking = () => {
34629
+ if (mouseTrackingAttached || typeof window === "undefined") return;
34630
+ window.addEventListener("mousemove", (e) => {
34631
+ lastMouseX = e.clientX;
34632
+ lastMouseY = e.clientY;
34633
+ });
34634
+ mouseTrackingAttached = true;
34580
34635
  };
34581
34636
  var handleKeydown = (event) => {
34582
- if (isEditableTarget(event.target)) {
34637
+ if (isEditableTarget(event.target) || isInputFocused()) {
34638
+ return;
34639
+ }
34640
+ if (viewerElement && !isMouseOverViewer()) {
34583
34641
  return;
34584
34642
  }
34585
34643
  hotkeyRegistry.forEach((entry) => {
@@ -34645,6 +34703,29 @@ var useHotkeyRegistry = () => {
34645
34703
  useEffect25(() => subscribeToRegistry(setEntries), []);
34646
34704
  return entries;
34647
34705
  };
34706
+ var registerHotkeyViewer = (element) => {
34707
+ viewerElement = element;
34708
+ attachMouseTracking();
34709
+ };
34710
+
34711
+ // src/contexts/ToastContext.tsx
34712
+ import { Toaster, toast as hotToast } from "react-hot-toast";
34713
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
34714
+ var useToast = () => {
34715
+ return {
34716
+ showToast: (message, duration = 2e3) => {
34717
+ hotToast(message, { duration });
34718
+ }
34719
+ };
34720
+ };
34721
+ var ToastProvider = ({
34722
+ children
34723
+ }) => {
34724
+ return /* @__PURE__ */ jsxs7(Fragment5, { children: [
34725
+ children,
34726
+ /* @__PURE__ */ jsx18(Toaster, { position: "bottom-right" })
34727
+ ] });
34728
+ };
34648
34729
 
34649
34730
  // src/components/ContextMenu.tsx
34650
34731
  import { useState as useState34 } from "react";
@@ -34702,7 +34783,7 @@ function useComposedRefs(...refs) {
34702
34783
 
34703
34784
  // node_modules/@radix-ui/react-context/dist/index.mjs
34704
34785
  import * as React13 from "react";
34705
- import { jsx as jsx18 } from "react/jsx-runtime";
34786
+ import { jsx as jsx19 } from "react/jsx-runtime";
34706
34787
  function createContextScope(scopeName, createContextScopeDeps = []) {
34707
34788
  let defaultContexts = [];
34708
34789
  function createContext32(rootComponentName, defaultContext) {
@@ -34713,7 +34794,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
34713
34794
  const { scope, children, ...context } = props;
34714
34795
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
34715
34796
  const value = React13.useMemo(() => context, Object.values(context));
34716
- return /* @__PURE__ */ jsx18(Context.Provider, { value, children });
34797
+ return /* @__PURE__ */ jsx19(Context.Provider, { value, children });
34717
34798
  };
34718
34799
  Provider.displayName = rootComponentName + "Provider";
34719
34800
  function useContext22(consumerName, scope) {
@@ -34843,7 +34924,7 @@ import * as ReactDOM2 from "react-dom";
34843
34924
 
34844
34925
  // node_modules/@radix-ui/react-slot/dist/index.mjs
34845
34926
  import * as React16 from "react";
34846
- import { Fragment as Fragment23, jsx as jsx19 } from "react/jsx-runtime";
34927
+ import { Fragment as Fragment23, jsx as jsx20 } from "react/jsx-runtime";
34847
34928
  // @__NO_SIDE_EFFECTS__
34848
34929
  function createSlot(ownerName) {
34849
34930
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
@@ -34861,9 +34942,9 @@ function createSlot(ownerName) {
34861
34942
  return child;
34862
34943
  }
34863
34944
  });
34864
- return /* @__PURE__ */ jsx19(SlotClone, { ...slotProps, ref: forwardedRef, children: React16.isValidElement(newElement) ? React16.cloneElement(newElement, void 0, newChildren) : null });
34945
+ return /* @__PURE__ */ jsx20(SlotClone, { ...slotProps, ref: forwardedRef, children: React16.isValidElement(newElement) ? React16.cloneElement(newElement, void 0, newChildren) : null });
34865
34946
  }
34866
- return /* @__PURE__ */ jsx19(SlotClone, { ...slotProps, ref: forwardedRef, children });
34947
+ return /* @__PURE__ */ jsx20(SlotClone, { ...slotProps, ref: forwardedRef, children });
34867
34948
  });
34868
34949
  Slot2.displayName = `${ownerName}.Slot`;
34869
34950
  return Slot2;
@@ -34928,7 +35009,7 @@ function getElementRef(element) {
34928
35009
  }
34929
35010
 
34930
35011
  // node_modules/@radix-ui/react-primitive/dist/index.mjs
34931
- import { jsx as jsx20 } from "react/jsx-runtime";
35012
+ import { jsx as jsx21 } from "react/jsx-runtime";
34932
35013
  var NODES = [
34933
35014
  "a",
34934
35015
  "button",
@@ -34956,7 +35037,7 @@ var Primitive = NODES.reduce((primitive, node) => {
34956
35037
  if (typeof window !== "undefined") {
34957
35038
  window[Symbol.for("radix-ui")] = true;
34958
35039
  }
34959
- return /* @__PURE__ */ jsx20(Comp, { ...primitiveProps, ref: forwardedRef });
35040
+ return /* @__PURE__ */ jsx21(Comp, { ...primitiveProps, ref: forwardedRef });
34960
35041
  });
34961
35042
  Node2.displayName = `Primitive.${node}`;
34962
35043
  return { ...primitive, [node]: Node2 };
@@ -34970,9 +35051,9 @@ import * as React42 from "react";
34970
35051
 
34971
35052
  // node_modules/@radix-ui/react-collection/dist/index.mjs
34972
35053
  import React18 from "react";
34973
- import { jsx as jsx21 } from "react/jsx-runtime";
34974
- import React23 from "react";
34975
35054
  import { jsx as jsx22 } from "react/jsx-runtime";
35055
+ import React23 from "react";
35056
+ import { jsx as jsx23 } from "react/jsx-runtime";
34976
35057
  function createCollection(name) {
34977
35058
  const PROVIDER_NAME = name + "CollectionProvider";
34978
35059
  const [createCollectionContext, createCollectionScope3] = createContextScope(PROVIDER_NAME);
@@ -34984,7 +35065,7 @@ function createCollection(name) {
34984
35065
  const { scope, children } = props;
34985
35066
  const ref = React18.useRef(null);
34986
35067
  const itemMap = React18.useRef(/* @__PURE__ */ new Map()).current;
34987
- return /* @__PURE__ */ jsx21(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
35068
+ return /* @__PURE__ */ jsx22(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
34988
35069
  };
34989
35070
  CollectionProvider.displayName = PROVIDER_NAME;
34990
35071
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
@@ -34994,7 +35075,7 @@ function createCollection(name) {
34994
35075
  const { scope, children } = props;
34995
35076
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
34996
35077
  const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
34997
- return /* @__PURE__ */ jsx21(CollectionSlotImpl, { ref: composedRefs, children });
35078
+ return /* @__PURE__ */ jsx22(CollectionSlotImpl, { ref: composedRefs, children });
34998
35079
  }
34999
35080
  );
35000
35081
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
@@ -35011,7 +35092,7 @@ function createCollection(name) {
35011
35092
  context.itemMap.set(ref, { ref, ...itemData });
35012
35093
  return () => void context.itemMap.delete(ref);
35013
35094
  });
35014
- return /* @__PURE__ */ jsx21(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
35095
+ return /* @__PURE__ */ jsx22(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
35015
35096
  }
35016
35097
  );
35017
35098
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
@@ -35038,7 +35119,7 @@ function createCollection(name) {
35038
35119
 
35039
35120
  // node_modules/@radix-ui/react-direction/dist/index.mjs
35040
35121
  import * as React19 from "react";
35041
- import { jsx as jsx23 } from "react/jsx-runtime";
35122
+ import { jsx as jsx24 } from "react/jsx-runtime";
35042
35123
  var DirectionContext = React19.createContext(void 0);
35043
35124
  function useDirection(localDir) {
35044
35125
  const globalDir = React19.useContext(DirectionContext);
@@ -35074,7 +35155,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
35074
35155
  }
35075
35156
 
35076
35157
  // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
35077
- import { jsx as jsx24 } from "react/jsx-runtime";
35158
+ import { jsx as jsx25 } from "react/jsx-runtime";
35078
35159
  var DISMISSABLE_LAYER_NAME = "DismissableLayer";
35079
35160
  var CONTEXT_UPDATE = "dismissableLayer.update";
35080
35161
  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
@@ -35162,7 +35243,7 @@ var DismissableLayer = React24.forwardRef(
35162
35243
  document.addEventListener(CONTEXT_UPDATE, handleUpdate);
35163
35244
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
35164
35245
  }, []);
35165
- return /* @__PURE__ */ jsx24(
35246
+ return /* @__PURE__ */ jsx25(
35166
35247
  Primitive.div,
35167
35248
  {
35168
35249
  ...layerProps,
@@ -35196,7 +35277,7 @@ var DismissableLayerBranch = React24.forwardRef((props, forwardedRef) => {
35196
35277
  };
35197
35278
  }
35198
35279
  }, [context.branches]);
35199
- return /* @__PURE__ */ jsx24(Primitive.div, { ...props, ref: composedRefs });
35280
+ return /* @__PURE__ */ jsx25(Primitive.div, { ...props, ref: composedRefs });
35200
35281
  });
35201
35282
  DismissableLayerBranch.displayName = BRANCH_NAME;
35202
35283
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
@@ -35308,7 +35389,7 @@ function createFocusGuard() {
35308
35389
 
35309
35390
  // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
35310
35391
  import * as React26 from "react";
35311
- import { jsx as jsx25 } from "react/jsx-runtime";
35392
+ import { jsx as jsx26 } from "react/jsx-runtime";
35312
35393
  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
35313
35394
  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
35314
35395
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
@@ -35427,7 +35508,7 @@ var FocusScope = React26.forwardRef((props, forwardedRef) => {
35427
35508
  },
35428
35509
  [loop, trapped, focusScope.paused]
35429
35510
  );
35430
- return /* @__PURE__ */ jsx25(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
35511
+ return /* @__PURE__ */ jsx26(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
35431
35512
  });
35432
35513
  FocusScope.displayName = FOCUS_SCOPE_NAME;
35433
35514
  function focusFirst(candidates, { select = false } = {}) {
@@ -37417,11 +37498,11 @@ var arrow3 = (options, deps) => ({
37417
37498
 
37418
37499
  // node_modules/@radix-ui/react-arrow/dist/index.mjs
37419
37500
  import * as React29 from "react";
37420
- import { jsx as jsx26 } from "react/jsx-runtime";
37501
+ import { jsx as jsx27 } from "react/jsx-runtime";
37421
37502
  var NAME = "Arrow";
37422
37503
  var Arrow = React29.forwardRef((props, forwardedRef) => {
37423
37504
  const { children, width: width10 = 10, height: height10 = 5, ...arrowProps } = props;
37424
- return /* @__PURE__ */ jsx26(
37505
+ return /* @__PURE__ */ jsx27(
37425
37506
  Primitive.svg,
37426
37507
  {
37427
37508
  ...arrowProps,
@@ -37430,7 +37511,7 @@ var Arrow = React29.forwardRef((props, forwardedRef) => {
37430
37511
  height: height10,
37431
37512
  viewBox: "0 0 30 10",
37432
37513
  preserveAspectRatio: "none",
37433
- children: props.asChild ? children : /* @__PURE__ */ jsx26("polygon", { points: "0,0 30,0 15,10" })
37514
+ children: props.asChild ? children : /* @__PURE__ */ jsx27("polygon", { points: "0,0 30,0 15,10" })
37434
37515
  }
37435
37516
  );
37436
37517
  });
@@ -37475,14 +37556,14 @@ function useSize(element) {
37475
37556
  }
37476
37557
 
37477
37558
  // node_modules/@radix-ui/react-popper/dist/index.mjs
37478
- import { jsx as jsx27 } from "react/jsx-runtime";
37559
+ import { jsx as jsx28 } from "react/jsx-runtime";
37479
37560
  var POPPER_NAME = "Popper";
37480
37561
  var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
37481
37562
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
37482
37563
  var Popper = (props) => {
37483
37564
  const { __scopePopper, children } = props;
37484
37565
  const [anchor, setAnchor] = React31.useState(null);
37485
- return /* @__PURE__ */ jsx27(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
37566
+ return /* @__PURE__ */ jsx28(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
37486
37567
  };
37487
37568
  Popper.displayName = POPPER_NAME;
37488
37569
  var ANCHOR_NAME = "PopperAnchor";
@@ -37500,7 +37581,7 @@ var PopperAnchor = React31.forwardRef(
37500
37581
  context.onAnchorChange(anchorRef.current);
37501
37582
  }
37502
37583
  });
37503
- return virtualRef ? null : /* @__PURE__ */ jsx27(Primitive.div, { ...anchorProps, ref: composedRefs });
37584
+ return virtualRef ? null : /* @__PURE__ */ jsx28(Primitive.div, { ...anchorProps, ref: composedRefs });
37504
37585
  }
37505
37586
  );
37506
37587
  PopperAnchor.displayName = ANCHOR_NAME;
@@ -37593,7 +37674,7 @@ var PopperContent = React31.forwardRef(
37593
37674
  useLayoutEffect2(() => {
37594
37675
  if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
37595
37676
  }, [content]);
37596
- return /* @__PURE__ */ jsx27(
37677
+ return /* @__PURE__ */ jsx28(
37597
37678
  "div",
37598
37679
  {
37599
37680
  ref: refs.setFloating,
@@ -37617,7 +37698,7 @@ var PopperContent = React31.forwardRef(
37617
37698
  }
37618
37699
  },
37619
37700
  dir: props.dir,
37620
- children: /* @__PURE__ */ jsx27(
37701
+ children: /* @__PURE__ */ jsx28(
37621
37702
  PopperContentProvider,
37622
37703
  {
37623
37704
  scope: __scopePopper,
@@ -37626,7 +37707,7 @@ var PopperContent = React31.forwardRef(
37626
37707
  arrowX,
37627
37708
  arrowY,
37628
37709
  shouldHideArrow: cannotCenterArrow,
37629
- children: /* @__PURE__ */ jsx27(
37710
+ children: /* @__PURE__ */ jsx28(
37630
37711
  Primitive.div,
37631
37712
  {
37632
37713
  "data-side": placedSide,
@@ -37663,7 +37744,7 @@ var PopperArrow = React31.forwardRef(function PopperArrow2(props, forwardedRef)
37663
37744
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
37664
37745
  // doesn't report size as we'd expect on SVG elements.
37665
37746
  // it reports their bounding box which is effectively the largest path inside the SVG.
37666
- /* @__PURE__ */ jsx27(
37747
+ /* @__PURE__ */ jsx28(
37667
37748
  "span",
37668
37749
  {
37669
37750
  ref: contentContext.onArrowChange,
@@ -37686,7 +37767,7 @@ var PopperArrow = React31.forwardRef(function PopperArrow2(props, forwardedRef)
37686
37767
  }[contentContext.placedSide],
37687
37768
  visibility: contentContext.shouldHideArrow ? "hidden" : void 0
37688
37769
  },
37689
- children: /* @__PURE__ */ jsx27(
37770
+ children: /* @__PURE__ */ jsx28(
37690
37771
  Root,
37691
37772
  {
37692
37773
  ...arrowProps,
@@ -37749,14 +37830,14 @@ var Arrow2 = PopperArrow;
37749
37830
  // node_modules/@radix-ui/react-portal/dist/index.mjs
37750
37831
  import * as React32 from "react";
37751
37832
  import ReactDOM4 from "react-dom";
37752
- import { jsx as jsx28 } from "react/jsx-runtime";
37833
+ import { jsx as jsx29 } from "react/jsx-runtime";
37753
37834
  var PORTAL_NAME = "Portal";
37754
37835
  var Portal = React32.forwardRef((props, forwardedRef) => {
37755
37836
  const { container: containerProp, ...portalProps } = props;
37756
37837
  const [mounted, setMounted] = React32.useState(false);
37757
37838
  useLayoutEffect2(() => setMounted(true), []);
37758
37839
  const container = containerProp || mounted && globalThis?.document?.body;
37759
- return container ? ReactDOM4.createPortal(/* @__PURE__ */ jsx28(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
37840
+ return container ? ReactDOM4.createPortal(/* @__PURE__ */ jsx29(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
37760
37841
  });
37761
37842
  Portal.displayName = PORTAL_NAME;
37762
37843
 
@@ -37888,7 +37969,7 @@ function getElementRef2(element) {
37888
37969
 
37889
37970
  // node_modules/@radix-ui/react-roving-focus/dist/index.mjs
37890
37971
  import * as React34 from "react";
37891
- import { jsx as jsx29 } from "react/jsx-runtime";
37972
+ import { jsx as jsx30 } from "react/jsx-runtime";
37892
37973
  var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
37893
37974
  var EVENT_OPTIONS2 = { bubbles: false, cancelable: true };
37894
37975
  var GROUP_NAME = "RovingFocusGroup";
@@ -37900,7 +37981,7 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
37900
37981
  var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
37901
37982
  var RovingFocusGroup = React34.forwardRef(
37902
37983
  (props, forwardedRef) => {
37903
- return /* @__PURE__ */ jsx29(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx29(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx29(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
37984
+ return /* @__PURE__ */ jsx30(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx30(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx30(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
37904
37985
  }
37905
37986
  );
37906
37987
  RovingFocusGroup.displayName = GROUP_NAME;
@@ -37938,7 +38019,7 @@ var RovingFocusGroupImpl = React34.forwardRef((props, forwardedRef) => {
37938
38019
  return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
37939
38020
  }
37940
38021
  }, [handleEntryFocus]);
37941
- return /* @__PURE__ */ jsx29(
38022
+ return /* @__PURE__ */ jsx30(
37942
38023
  RovingFocusProvider,
37943
38024
  {
37944
38025
  scope: __scopeRovingFocusGroup,
@@ -37959,7 +38040,7 @@ var RovingFocusGroupImpl = React34.forwardRef((props, forwardedRef) => {
37959
38040
  () => setFocusableItemsCount((prevCount) => prevCount - 1),
37960
38041
  []
37961
38042
  ),
37962
- children: /* @__PURE__ */ jsx29(
38043
+ children: /* @__PURE__ */ jsx30(
37963
38044
  Primitive.div,
37964
38045
  {
37965
38046
  tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
@@ -38017,14 +38098,14 @@ var RovingFocusGroupItem = React34.forwardRef(
38017
38098
  return () => onFocusableItemRemove();
38018
38099
  }
38019
38100
  }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
38020
- return /* @__PURE__ */ jsx29(
38101
+ return /* @__PURE__ */ jsx30(
38021
38102
  Collection.ItemSlot,
38022
38103
  {
38023
38104
  scope: __scopeRovingFocusGroup,
38024
38105
  id,
38025
38106
  focusable,
38026
38107
  active,
38027
- children: /* @__PURE__ */ jsx29(
38108
+ children: /* @__PURE__ */ jsx30(
38028
38109
  Primitive.span,
38029
38110
  {
38030
38111
  tabIndex: isCurrentTabStop ? 0 : -1,
@@ -38935,7 +39016,7 @@ ReactRemoveScroll.classNames = RemoveScroll.classNames;
38935
39016
  var Combination_default = ReactRemoveScroll;
38936
39017
 
38937
39018
  // node_modules/@radix-ui/react-menu/dist/index.mjs
38938
- import { jsx as jsx30 } from "react/jsx-runtime";
39019
+ import { jsx as jsx31 } from "react/jsx-runtime";
38939
39020
  var SELECTION_KEYS = ["Enter", " "];
38940
39021
  var FIRST_KEYS = ["ArrowDown", "PageUp", "Home"];
38941
39022
  var LAST_KEYS = ["ArrowUp", "PageDown", "End"];
@@ -38980,7 +39061,7 @@ var Menu = (props) => {
38980
39061
  document.removeEventListener("pointermove", handlePointer, { capture: true });
38981
39062
  };
38982
39063
  }, []);
38983
- return /* @__PURE__ */ jsx30(Root2, { ...popperScope, children: /* @__PURE__ */ jsx30(
39064
+ return /* @__PURE__ */ jsx31(Root2, { ...popperScope, children: /* @__PURE__ */ jsx31(
38984
39065
  MenuProvider,
38985
39066
  {
38986
39067
  scope: __scopeMenu,
@@ -38988,7 +39069,7 @@ var Menu = (props) => {
38988
39069
  onOpenChange: handleOpenChange,
38989
39070
  content,
38990
39071
  onContentChange: setContent,
38991
- children: /* @__PURE__ */ jsx30(
39072
+ children: /* @__PURE__ */ jsx31(
38992
39073
  MenuRootProvider,
38993
39074
  {
38994
39075
  scope: __scopeMenu,
@@ -39008,7 +39089,7 @@ var MenuAnchor = React42.forwardRef(
39008
39089
  (props, forwardedRef) => {
39009
39090
  const { __scopeMenu, ...anchorProps } = props;
39010
39091
  const popperScope = usePopperScope(__scopeMenu);
39011
- return /* @__PURE__ */ jsx30(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
39092
+ return /* @__PURE__ */ jsx31(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
39012
39093
  }
39013
39094
  );
39014
39095
  MenuAnchor.displayName = ANCHOR_NAME2;
@@ -39019,7 +39100,7 @@ var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME2, {
39019
39100
  var MenuPortal = (props) => {
39020
39101
  const { __scopeMenu, forceMount, children, container } = props;
39021
39102
  const context = useMenuContext(PORTAL_NAME2, __scopeMenu);
39022
- return /* @__PURE__ */ jsx30(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx30(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx30(Portal, { asChild: true, container, children }) }) });
39103
+ return /* @__PURE__ */ jsx31(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx31(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx31(Portal, { asChild: true, container, children }) }) });
39023
39104
  };
39024
39105
  MenuPortal.displayName = PORTAL_NAME2;
39025
39106
  var CONTENT_NAME2 = "MenuContent";
@@ -39030,7 +39111,7 @@ var MenuContent = React42.forwardRef(
39030
39111
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
39031
39112
  const context = useMenuContext(CONTENT_NAME2, props.__scopeMenu);
39032
39113
  const rootContext = useMenuRootContext(CONTENT_NAME2, props.__scopeMenu);
39033
- return /* @__PURE__ */ jsx30(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx30(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx30(Collection2.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx30(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx30(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
39114
+ return /* @__PURE__ */ jsx31(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx31(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx31(Collection2.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx31(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx31(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
39034
39115
  }
39035
39116
  );
39036
39117
  var MenuRootContentModal = React42.forwardRef(
@@ -39042,7 +39123,7 @@ var MenuRootContentModal = React42.forwardRef(
39042
39123
  const content = ref.current;
39043
39124
  if (content) return hideOthers(content);
39044
39125
  }, []);
39045
- return /* @__PURE__ */ jsx30(
39126
+ return /* @__PURE__ */ jsx31(
39046
39127
  MenuContentImpl,
39047
39128
  {
39048
39129
  ...props,
@@ -39062,7 +39143,7 @@ var MenuRootContentModal = React42.forwardRef(
39062
39143
  );
39063
39144
  var MenuRootContentNonModal = React42.forwardRef((props, forwardedRef) => {
39064
39145
  const context = useMenuContext(CONTENT_NAME2, props.__scopeMenu);
39065
- return /* @__PURE__ */ jsx30(
39146
+ return /* @__PURE__ */ jsx31(
39066
39147
  MenuContentImpl,
39067
39148
  {
39068
39149
  ...props,
@@ -39134,7 +39215,7 @@ var MenuContentImpl = React42.forwardRef(
39134
39215
  const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
39135
39216
  return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
39136
39217
  }, []);
39137
- return /* @__PURE__ */ jsx30(
39218
+ return /* @__PURE__ */ jsx31(
39138
39219
  MenuContentProvider,
39139
39220
  {
39140
39221
  scope: __scopeMenu,
@@ -39163,7 +39244,7 @@ var MenuContentImpl = React42.forwardRef(
39163
39244
  onPointerGraceIntentChange: React42.useCallback((intent) => {
39164
39245
  pointerGraceIntentRef.current = intent;
39165
39246
  }, []),
39166
- children: /* @__PURE__ */ jsx30(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx30(
39247
+ children: /* @__PURE__ */ jsx31(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx31(
39167
39248
  FocusScope,
39168
39249
  {
39169
39250
  asChild: true,
@@ -39173,7 +39254,7 @@ var MenuContentImpl = React42.forwardRef(
39173
39254
  contentRef.current?.focus({ preventScroll: true });
39174
39255
  }),
39175
39256
  onUnmountAutoFocus: onCloseAutoFocus,
39176
- children: /* @__PURE__ */ jsx30(
39257
+ children: /* @__PURE__ */ jsx31(
39177
39258
  DismissableLayer,
39178
39259
  {
39179
39260
  asChild: true,
@@ -39183,7 +39264,7 @@ var MenuContentImpl = React42.forwardRef(
39183
39264
  onFocusOutside,
39184
39265
  onInteractOutside,
39185
39266
  onDismiss,
39186
- children: /* @__PURE__ */ jsx30(
39267
+ children: /* @__PURE__ */ jsx31(
39187
39268
  Root3,
39188
39269
  {
39189
39270
  asChild: true,
@@ -39197,7 +39278,7 @@ var MenuContentImpl = React42.forwardRef(
39197
39278
  if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
39198
39279
  }),
39199
39280
  preventScrollOnEntryFocus: true,
39200
- children: /* @__PURE__ */ jsx30(
39281
+ children: /* @__PURE__ */ jsx31(
39201
39282
  Content,
39202
39283
  {
39203
39284
  role: "menu",
@@ -39262,7 +39343,7 @@ var GROUP_NAME2 = "MenuGroup";
39262
39343
  var MenuGroup = React42.forwardRef(
39263
39344
  (props, forwardedRef) => {
39264
39345
  const { __scopeMenu, ...groupProps } = props;
39265
- return /* @__PURE__ */ jsx30(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
39346
+ return /* @__PURE__ */ jsx31(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
39266
39347
  }
39267
39348
  );
39268
39349
  MenuGroup.displayName = GROUP_NAME2;
@@ -39270,7 +39351,7 @@ var LABEL_NAME = "MenuLabel";
39270
39351
  var MenuLabel = React42.forwardRef(
39271
39352
  (props, forwardedRef) => {
39272
39353
  const { __scopeMenu, ...labelProps } = props;
39273
- return /* @__PURE__ */ jsx30(Primitive.div, { ...labelProps, ref: forwardedRef });
39354
+ return /* @__PURE__ */ jsx31(Primitive.div, { ...labelProps, ref: forwardedRef });
39274
39355
  }
39275
39356
  );
39276
39357
  MenuLabel.displayName = LABEL_NAME;
@@ -39297,7 +39378,7 @@ var MenuItem = React42.forwardRef(
39297
39378
  }
39298
39379
  }
39299
39380
  };
39300
- return /* @__PURE__ */ jsx30(
39381
+ return /* @__PURE__ */ jsx31(
39301
39382
  MenuItemImpl,
39302
39383
  {
39303
39384
  ...itemProps,
@@ -39339,13 +39420,13 @@ var MenuItemImpl = React42.forwardRef(
39339
39420
  setTextContent((menuItem.textContent ?? "").trim());
39340
39421
  }
39341
39422
  }, [itemProps.children]);
39342
- return /* @__PURE__ */ jsx30(
39423
+ return /* @__PURE__ */ jsx31(
39343
39424
  Collection2.ItemSlot,
39344
39425
  {
39345
39426
  scope: __scopeMenu,
39346
39427
  disabled,
39347
39428
  textValue: textValue ?? textContent,
39348
- children: /* @__PURE__ */ jsx30(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx30(
39429
+ children: /* @__PURE__ */ jsx31(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx31(
39349
39430
  Primitive.div,
39350
39431
  {
39351
39432
  role: "menuitem",
@@ -39384,7 +39465,7 @@ var CHECKBOX_ITEM_NAME = "MenuCheckboxItem";
39384
39465
  var MenuCheckboxItem = React42.forwardRef(
39385
39466
  (props, forwardedRef) => {
39386
39467
  const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
39387
- return /* @__PURE__ */ jsx30(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx30(
39468
+ return /* @__PURE__ */ jsx31(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx31(
39388
39469
  MenuItem,
39389
39470
  {
39390
39471
  role: "menuitemcheckbox",
@@ -39412,7 +39493,7 @@ var MenuRadioGroup = React42.forwardRef(
39412
39493
  (props, forwardedRef) => {
39413
39494
  const { value, onValueChange, ...groupProps } = props;
39414
39495
  const handleValueChange = useCallbackRef(onValueChange);
39415
- return /* @__PURE__ */ jsx30(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx30(MenuGroup, { ...groupProps, ref: forwardedRef }) });
39496
+ return /* @__PURE__ */ jsx31(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx31(MenuGroup, { ...groupProps, ref: forwardedRef }) });
39416
39497
  }
39417
39498
  );
39418
39499
  MenuRadioGroup.displayName = RADIO_GROUP_NAME;
@@ -39422,7 +39503,7 @@ var MenuRadioItem = React42.forwardRef(
39422
39503
  const { value, ...radioItemProps } = props;
39423
39504
  const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);
39424
39505
  const checked = value === context.value;
39425
- return /* @__PURE__ */ jsx30(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx30(
39506
+ return /* @__PURE__ */ jsx31(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx31(
39426
39507
  MenuItem,
39427
39508
  {
39428
39509
  role: "menuitemradio",
@@ -39449,11 +39530,11 @@ var MenuItemIndicator = React42.forwardRef(
39449
39530
  (props, forwardedRef) => {
39450
39531
  const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
39451
39532
  const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
39452
- return /* @__PURE__ */ jsx30(
39533
+ return /* @__PURE__ */ jsx31(
39453
39534
  Presence,
39454
39535
  {
39455
39536
  present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
39456
- children: /* @__PURE__ */ jsx30(
39537
+ children: /* @__PURE__ */ jsx31(
39457
39538
  Primitive.span,
39458
39539
  {
39459
39540
  ...itemIndicatorProps,
@@ -39470,7 +39551,7 @@ var SEPARATOR_NAME = "MenuSeparator";
39470
39551
  var MenuSeparator = React42.forwardRef(
39471
39552
  (props, forwardedRef) => {
39472
39553
  const { __scopeMenu, ...separatorProps } = props;
39473
- return /* @__PURE__ */ jsx30(
39554
+ return /* @__PURE__ */ jsx31(
39474
39555
  Primitive.div,
39475
39556
  {
39476
39557
  role: "separator",
@@ -39487,7 +39568,7 @@ var MenuArrow = React42.forwardRef(
39487
39568
  (props, forwardedRef) => {
39488
39569
  const { __scopeMenu, ...arrowProps } = props;
39489
39570
  const popperScope = usePopperScope(__scopeMenu);
39490
- return /* @__PURE__ */ jsx30(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
39571
+ return /* @__PURE__ */ jsx31(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
39491
39572
  }
39492
39573
  );
39493
39574
  MenuArrow.displayName = ARROW_NAME2;
@@ -39504,7 +39585,7 @@ var MenuSub = (props) => {
39504
39585
  if (parentMenuContext.open === false) handleOpenChange(false);
39505
39586
  return () => handleOpenChange(false);
39506
39587
  }, [parentMenuContext.open, handleOpenChange]);
39507
- return /* @__PURE__ */ jsx30(Root2, { ...popperScope, children: /* @__PURE__ */ jsx30(
39588
+ return /* @__PURE__ */ jsx31(Root2, { ...popperScope, children: /* @__PURE__ */ jsx31(
39508
39589
  MenuProvider,
39509
39590
  {
39510
39591
  scope: __scopeMenu,
@@ -39512,7 +39593,7 @@ var MenuSub = (props) => {
39512
39593
  onOpenChange: handleOpenChange,
39513
39594
  content,
39514
39595
  onContentChange: setContent,
39515
- children: /* @__PURE__ */ jsx30(
39596
+ children: /* @__PURE__ */ jsx31(
39516
39597
  MenuSubProvider,
39517
39598
  {
39518
39599
  scope: __scopeMenu,
@@ -39549,7 +39630,7 @@ var MenuSubTrigger = React42.forwardRef(
39549
39630
  onPointerGraceIntentChange(null);
39550
39631
  };
39551
39632
  }, [pointerGraceTimerRef, onPointerGraceIntentChange]);
39552
- return /* @__PURE__ */ jsx30(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx30(
39633
+ return /* @__PURE__ */ jsx31(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx31(
39553
39634
  MenuItemImpl,
39554
39635
  {
39555
39636
  id: subContext.triggerId,
@@ -39638,7 +39719,7 @@ var MenuSubContent = React42.forwardRef(
39638
39719
  const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
39639
39720
  const ref = React42.useRef(null);
39640
39721
  const composedRefs = useComposedRefs(forwardedRef, ref);
39641
- return /* @__PURE__ */ jsx30(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx30(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx30(Collection2.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx30(
39722
+ return /* @__PURE__ */ jsx31(Collection2.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx31(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx31(Collection2.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx31(
39642
39723
  MenuContentImpl,
39643
39724
  {
39644
39725
  id: subContext.contentId,
@@ -39749,7 +39830,7 @@ var SubTrigger = MenuSubTrigger;
39749
39830
  var SubContent = MenuSubContent;
39750
39831
 
39751
39832
  // node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs
39752
- import { jsx as jsx31 } from "react/jsx-runtime";
39833
+ import { jsx as jsx32 } from "react/jsx-runtime";
39753
39834
  var DROPDOWN_MENU_NAME = "DropdownMenu";
39754
39835
  var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(
39755
39836
  DROPDOWN_MENU_NAME,
@@ -39775,7 +39856,7 @@ var DropdownMenu = (props) => {
39775
39856
  onChange: onOpenChange,
39776
39857
  caller: DROPDOWN_MENU_NAME
39777
39858
  });
39778
- return /* @__PURE__ */ jsx31(
39859
+ return /* @__PURE__ */ jsx32(
39779
39860
  DropdownMenuProvider,
39780
39861
  {
39781
39862
  scope: __scopeDropdownMenu,
@@ -39786,7 +39867,7 @@ var DropdownMenu = (props) => {
39786
39867
  onOpenChange: setOpen,
39787
39868
  onOpenToggle: React43.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
39788
39869
  modal,
39789
- children: /* @__PURE__ */ jsx31(Root32, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
39870
+ children: /* @__PURE__ */ jsx32(Root32, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
39790
39871
  }
39791
39872
  );
39792
39873
  };
@@ -39797,7 +39878,7 @@ var DropdownMenuTrigger = React43.forwardRef(
39797
39878
  const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
39798
39879
  const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
39799
39880
  const menuScope = useMenuScope(__scopeDropdownMenu);
39800
- return /* @__PURE__ */ jsx31(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx31(
39881
+ return /* @__PURE__ */ jsx32(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx32(
39801
39882
  Primitive.button,
39802
39883
  {
39803
39884
  type: "button",
@@ -39831,7 +39912,7 @@ var PORTAL_NAME3 = "DropdownMenuPortal";
39831
39912
  var DropdownMenuPortal = (props) => {
39832
39913
  const { __scopeDropdownMenu, ...portalProps } = props;
39833
39914
  const menuScope = useMenuScope(__scopeDropdownMenu);
39834
- return /* @__PURE__ */ jsx31(Portal2, { ...menuScope, ...portalProps });
39915
+ return /* @__PURE__ */ jsx32(Portal2, { ...menuScope, ...portalProps });
39835
39916
  };
39836
39917
  DropdownMenuPortal.displayName = PORTAL_NAME3;
39837
39918
  var CONTENT_NAME3 = "DropdownMenuContent";
@@ -39841,7 +39922,7 @@ var DropdownMenuContent = React43.forwardRef(
39841
39922
  const context = useDropdownMenuContext(CONTENT_NAME3, __scopeDropdownMenu);
39842
39923
  const menuScope = useMenuScope(__scopeDropdownMenu);
39843
39924
  const hasInteractedOutsideRef = React43.useRef(false);
39844
- return /* @__PURE__ */ jsx31(
39925
+ return /* @__PURE__ */ jsx32(
39845
39926
  Content2,
39846
39927
  {
39847
39928
  id: context.contentId,
@@ -39881,7 +39962,7 @@ var DropdownMenuGroup = React43.forwardRef(
39881
39962
  (props, forwardedRef) => {
39882
39963
  const { __scopeDropdownMenu, ...groupProps } = props;
39883
39964
  const menuScope = useMenuScope(__scopeDropdownMenu);
39884
- return /* @__PURE__ */ jsx31(Group4, { ...menuScope, ...groupProps, ref: forwardedRef });
39965
+ return /* @__PURE__ */ jsx32(Group4, { ...menuScope, ...groupProps, ref: forwardedRef });
39885
39966
  }
39886
39967
  );
39887
39968
  DropdownMenuGroup.displayName = GROUP_NAME3;
@@ -39890,7 +39971,7 @@ var DropdownMenuLabel = React43.forwardRef(
39890
39971
  (props, forwardedRef) => {
39891
39972
  const { __scopeDropdownMenu, ...labelProps } = props;
39892
39973
  const menuScope = useMenuScope(__scopeDropdownMenu);
39893
- return /* @__PURE__ */ jsx31(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
39974
+ return /* @__PURE__ */ jsx32(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
39894
39975
  }
39895
39976
  );
39896
39977
  DropdownMenuLabel.displayName = LABEL_NAME2;
@@ -39899,7 +39980,7 @@ var DropdownMenuItem = React43.forwardRef(
39899
39980
  (props, forwardedRef) => {
39900
39981
  const { __scopeDropdownMenu, ...itemProps } = props;
39901
39982
  const menuScope = useMenuScope(__scopeDropdownMenu);
39902
- return /* @__PURE__ */ jsx31(Item2, { ...menuScope, ...itemProps, ref: forwardedRef });
39983
+ return /* @__PURE__ */ jsx32(Item2, { ...menuScope, ...itemProps, ref: forwardedRef });
39903
39984
  }
39904
39985
  );
39905
39986
  DropdownMenuItem.displayName = ITEM_NAME3;
@@ -39907,35 +39988,35 @@ var CHECKBOX_ITEM_NAME2 = "DropdownMenuCheckboxItem";
39907
39988
  var DropdownMenuCheckboxItem = React43.forwardRef((props, forwardedRef) => {
39908
39989
  const { __scopeDropdownMenu, ...checkboxItemProps } = props;
39909
39990
  const menuScope = useMenuScope(__scopeDropdownMenu);
39910
- return /* @__PURE__ */ jsx31(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
39991
+ return /* @__PURE__ */ jsx32(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
39911
39992
  });
39912
39993
  DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME2;
39913
39994
  var RADIO_GROUP_NAME2 = "DropdownMenuRadioGroup";
39914
39995
  var DropdownMenuRadioGroup = React43.forwardRef((props, forwardedRef) => {
39915
39996
  const { __scopeDropdownMenu, ...radioGroupProps } = props;
39916
39997
  const menuScope = useMenuScope(__scopeDropdownMenu);
39917
- return /* @__PURE__ */ jsx31(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
39998
+ return /* @__PURE__ */ jsx32(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
39918
39999
  });
39919
40000
  DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME2;
39920
40001
  var RADIO_ITEM_NAME2 = "DropdownMenuRadioItem";
39921
40002
  var DropdownMenuRadioItem = React43.forwardRef((props, forwardedRef) => {
39922
40003
  const { __scopeDropdownMenu, ...radioItemProps } = props;
39923
40004
  const menuScope = useMenuScope(__scopeDropdownMenu);
39924
- return /* @__PURE__ */ jsx31(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
40005
+ return /* @__PURE__ */ jsx32(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
39925
40006
  });
39926
40007
  DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME2;
39927
40008
  var INDICATOR_NAME = "DropdownMenuItemIndicator";
39928
40009
  var DropdownMenuItemIndicator = React43.forwardRef((props, forwardedRef) => {
39929
40010
  const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
39930
40011
  const menuScope = useMenuScope(__scopeDropdownMenu);
39931
- return /* @__PURE__ */ jsx31(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
40012
+ return /* @__PURE__ */ jsx32(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
39932
40013
  });
39933
40014
  DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
39934
40015
  var SEPARATOR_NAME2 = "DropdownMenuSeparator";
39935
40016
  var DropdownMenuSeparator = React43.forwardRef((props, forwardedRef) => {
39936
40017
  const { __scopeDropdownMenu, ...separatorProps } = props;
39937
40018
  const menuScope = useMenuScope(__scopeDropdownMenu);
39938
- return /* @__PURE__ */ jsx31(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
40019
+ return /* @__PURE__ */ jsx32(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
39939
40020
  });
39940
40021
  DropdownMenuSeparator.displayName = SEPARATOR_NAME2;
39941
40022
  var ARROW_NAME3 = "DropdownMenuArrow";
@@ -39943,7 +40024,7 @@ var DropdownMenuArrow = React43.forwardRef(
39943
40024
  (props, forwardedRef) => {
39944
40025
  const { __scopeDropdownMenu, ...arrowProps } = props;
39945
40026
  const menuScope = useMenuScope(__scopeDropdownMenu);
39946
- return /* @__PURE__ */ jsx31(Arrow22, { ...menuScope, ...arrowProps, ref: forwardedRef });
40027
+ return /* @__PURE__ */ jsx32(Arrow22, { ...menuScope, ...arrowProps, ref: forwardedRef });
39947
40028
  }
39948
40029
  );
39949
40030
  DropdownMenuArrow.displayName = ARROW_NAME3;
@@ -39956,20 +40037,20 @@ var DropdownMenuSub = (props) => {
39956
40037
  onChange: onOpenChange,
39957
40038
  caller: "DropdownMenuSub"
39958
40039
  });
39959
- return /* @__PURE__ */ jsx31(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
40040
+ return /* @__PURE__ */ jsx32(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
39960
40041
  };
39961
40042
  var SUB_TRIGGER_NAME2 = "DropdownMenuSubTrigger";
39962
40043
  var DropdownMenuSubTrigger = React43.forwardRef((props, forwardedRef) => {
39963
40044
  const { __scopeDropdownMenu, ...subTriggerProps } = props;
39964
40045
  const menuScope = useMenuScope(__scopeDropdownMenu);
39965
- return /* @__PURE__ */ jsx31(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
40046
+ return /* @__PURE__ */ jsx32(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
39966
40047
  });
39967
40048
  DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME2;
39968
40049
  var SUB_CONTENT_NAME2 = "DropdownMenuSubContent";
39969
40050
  var DropdownMenuSubContent = React43.forwardRef((props, forwardedRef) => {
39970
40051
  const { __scopeDropdownMenu, ...subContentProps } = props;
39971
40052
  const menuScope = useMenuScope(__scopeDropdownMenu);
39972
- return /* @__PURE__ */ jsx31(
40053
+ return /* @__PURE__ */ jsx32(
39973
40054
  SubContent,
39974
40055
  {
39975
40056
  ...menuScope,
@@ -40004,8 +40085,8 @@ var SubContent2 = DropdownMenuSubContent;
40004
40085
  import { useState as useState33 } from "react";
40005
40086
 
40006
40087
  // src/components/Icons.tsx
40007
- import { jsx as jsx32 } from "react/jsx-runtime";
40008
- var CheckIcon = () => /* @__PURE__ */ jsx32(
40088
+ import { jsx as jsx33 } from "react/jsx-runtime";
40089
+ var CheckIcon = () => /* @__PURE__ */ jsx33(
40009
40090
  "svg",
40010
40091
  {
40011
40092
  xmlns: "http://www.w3.org/2000/svg",
@@ -40017,10 +40098,10 @@ var CheckIcon = () => /* @__PURE__ */ jsx32(
40017
40098
  strokeWidth: "2",
40018
40099
  strokeLinecap: "round",
40019
40100
  strokeLinejoin: "round",
40020
- children: /* @__PURE__ */ jsx32("path", { d: "M20 6 9 17l-5-5" })
40101
+ children: /* @__PURE__ */ jsx33("path", { d: "M20 6 9 17l-5-5" })
40021
40102
  }
40022
40103
  );
40023
- var ChevronRightIcon = ({ isOpen }) => /* @__PURE__ */ jsx32(
40104
+ var ChevronRightIcon = ({ isOpen }) => /* @__PURE__ */ jsx33(
40024
40105
  "svg",
40025
40106
  {
40026
40107
  xmlns: "http://www.w3.org/2000/svg",
@@ -40037,10 +40118,10 @@ var ChevronRightIcon = ({ isOpen }) => /* @__PURE__ */ jsx32(
40037
40118
  transform: isOpen ? "rotate(90deg)" : "rotate(0deg)",
40038
40119
  opacity: 0.6
40039
40120
  },
40040
- children: /* @__PURE__ */ jsx32("path", { d: "m9 18 6-6-6-6" })
40121
+ children: /* @__PURE__ */ jsx33("path", { d: "m9 18 6-6-6-6" })
40041
40122
  }
40042
40123
  );
40043
- var DotIcon = () => /* @__PURE__ */ jsx32(
40124
+ var DotIcon = () => /* @__PURE__ */ jsx33(
40044
40125
  "svg",
40045
40126
  {
40046
40127
  xmlns: "http://www.w3.org/2000/svg",
@@ -40053,12 +40134,12 @@ var DotIcon = () => /* @__PURE__ */ jsx32(
40053
40134
  strokeLinecap: "round",
40054
40135
  strokeLinejoin: "round",
40055
40136
  className: "lucide lucide-dot-icon lucide-dot",
40056
- children: /* @__PURE__ */ jsx32("circle", { cx: "12.1", cy: "12.1", r: "4.5", fill: "white" })
40137
+ children: /* @__PURE__ */ jsx33("circle", { cx: "12.1", cy: "12.1", r: "4.5", fill: "white" })
40057
40138
  }
40058
40139
  );
40059
40140
 
40060
40141
  // src/components/AppearanceMenu.tsx
40061
- import { Fragment as Fragment9, jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
40142
+ import { Fragment as Fragment10, jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
40062
40143
  var itemStyles = {
40063
40144
  padding: "6px 8px",
40064
40145
  borderRadius: 6,
@@ -40109,10 +40190,10 @@ var AppearanceMenu = () => {
40109
40190
  const { visibility, setLayerVisibility } = useLayerVisibility();
40110
40191
  const [appearanceSubOpen, setAppearanceSubOpen] = useState33(false);
40111
40192
  const [hoveredItem, setHoveredItem] = useState33(null);
40112
- return /* @__PURE__ */ jsxs7(Fragment9, { children: [
40113
- /* @__PURE__ */ jsx33(Separator2, { style: separatorStyles }),
40114
- /* @__PURE__ */ jsxs7(Sub2, { onOpenChange: setAppearanceSubOpen, children: [
40115
- /* @__PURE__ */ jsxs7(
40193
+ return /* @__PURE__ */ jsxs8(Fragment10, { children: [
40194
+ /* @__PURE__ */ jsx34(Separator2, { style: separatorStyles }),
40195
+ /* @__PURE__ */ jsxs8(Sub2, { onOpenChange: setAppearanceSubOpen, children: [
40196
+ /* @__PURE__ */ jsxs8(
40116
40197
  SubTrigger2,
40117
40198
  {
40118
40199
  style: {
@@ -40124,8 +40205,8 @@ var AppearanceMenu = () => {
40124
40205
  onMouseLeave: () => setHoveredItem(null),
40125
40206
  onTouchStart: () => setHoveredItem("appearance"),
40126
40207
  children: [
40127
- /* @__PURE__ */ jsx33("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: "Appearance" }),
40128
- /* @__PURE__ */ jsx33(
40208
+ /* @__PURE__ */ jsx34("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: "Appearance" }),
40209
+ /* @__PURE__ */ jsx34(
40129
40210
  "div",
40130
40211
  {
40131
40212
  style: {
@@ -40134,20 +40215,20 @@ var AppearanceMenu = () => {
40134
40215
  alignItems: "flex-end",
40135
40216
  marginBottom: "-5px"
40136
40217
  },
40137
- children: /* @__PURE__ */ jsx33(ChevronRightIcon, { isOpen: appearanceSubOpen })
40218
+ children: /* @__PURE__ */ jsx34(ChevronRightIcon, { isOpen: appearanceSubOpen })
40138
40219
  }
40139
40220
  )
40140
40221
  ]
40141
40222
  }
40142
40223
  ),
40143
- /* @__PURE__ */ jsx33(Portal22, { children: /* @__PURE__ */ jsxs7(
40224
+ /* @__PURE__ */ jsx34(Portal22, { children: /* @__PURE__ */ jsxs8(
40144
40225
  SubContent2,
40145
40226
  {
40146
40227
  style: { ...contentStyles, marginLeft: -2 },
40147
40228
  collisionPadding: 10,
40148
40229
  avoidCollisions: true,
40149
40230
  children: [
40150
- /* @__PURE__ */ jsxs7(
40231
+ /* @__PURE__ */ jsxs8(
40151
40232
  Item22,
40152
40233
  {
40153
40234
  style: {
@@ -40163,12 +40244,12 @@ var AppearanceMenu = () => {
40163
40244
  onMouseLeave: () => setHoveredItem(null),
40164
40245
  onTouchStart: () => setHoveredItem("boardBody"),
40165
40246
  children: [
40166
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.boardBody && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40167
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "Board Body" })
40247
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.boardBody && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40248
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Board Body" })
40168
40249
  ]
40169
40250
  }
40170
40251
  ),
40171
- /* @__PURE__ */ jsxs7(
40252
+ /* @__PURE__ */ jsxs8(
40172
40253
  Item22,
40173
40254
  {
40174
40255
  style: {
@@ -40184,12 +40265,12 @@ var AppearanceMenu = () => {
40184
40265
  onMouseLeave: () => setHoveredItem(null),
40185
40266
  onTouchStart: () => setHoveredItem("topCopper"),
40186
40267
  children: [
40187
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.topCopper && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40188
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "Top Copper" })
40268
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.topCopper && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40269
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Top Copper" })
40189
40270
  ]
40190
40271
  }
40191
40272
  ),
40192
- /* @__PURE__ */ jsxs7(
40273
+ /* @__PURE__ */ jsxs8(
40193
40274
  Item22,
40194
40275
  {
40195
40276
  style: {
@@ -40205,12 +40286,12 @@ var AppearanceMenu = () => {
40205
40286
  onMouseLeave: () => setHoveredItem(null),
40206
40287
  onTouchStart: () => setHoveredItem("bottomCopper"),
40207
40288
  children: [
40208
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.bottomCopper && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40209
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "Bottom Copper" })
40289
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.bottomCopper && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40290
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Bottom Copper" })
40210
40291
  ]
40211
40292
  }
40212
40293
  ),
40213
- /* @__PURE__ */ jsxs7(
40294
+ /* @__PURE__ */ jsxs8(
40214
40295
  Item22,
40215
40296
  {
40216
40297
  style: {
@@ -40226,12 +40307,12 @@ var AppearanceMenu = () => {
40226
40307
  onMouseLeave: () => setHoveredItem(null),
40227
40308
  onTouchStart: () => setHoveredItem("topSilkscreen"),
40228
40309
  children: [
40229
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.topSilkscreen && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40230
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "Top Silkscreen" })
40310
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.topSilkscreen && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40311
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Top Silkscreen" })
40231
40312
  ]
40232
40313
  }
40233
40314
  ),
40234
- /* @__PURE__ */ jsxs7(
40315
+ /* @__PURE__ */ jsxs8(
40235
40316
  Item22,
40236
40317
  {
40237
40318
  style: {
@@ -40250,12 +40331,12 @@ var AppearanceMenu = () => {
40250
40331
  onMouseLeave: () => setHoveredItem(null),
40251
40332
  onTouchStart: () => setHoveredItem("bottomSilkscreen"),
40252
40333
  children: [
40253
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.bottomSilkscreen && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40254
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "Bottom Silkscreen" })
40334
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.bottomSilkscreen && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40335
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Bottom Silkscreen" })
40255
40336
  ]
40256
40337
  }
40257
40338
  ),
40258
- /* @__PURE__ */ jsxs7(
40339
+ /* @__PURE__ */ jsxs8(
40259
40340
  Item22,
40260
40341
  {
40261
40342
  style: {
@@ -40271,8 +40352,32 @@ var AppearanceMenu = () => {
40271
40352
  onMouseLeave: () => setHoveredItem(null),
40272
40353
  onTouchStart: () => setHoveredItem("smtModels"),
40273
40354
  children: [
40274
- /* @__PURE__ */ jsx33("span", { style: iconContainerStyles, children: visibility.smtModels && /* @__PURE__ */ jsx33(CheckIcon, {}) }),
40275
- /* @__PURE__ */ jsx33("span", { style: { display: "flex", alignItems: "center" }, children: "CAD Models" })
40355
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.smtModels && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40356
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Surface Mount Components" })
40357
+ ]
40358
+ }
40359
+ ),
40360
+ /* @__PURE__ */ jsxs8(
40361
+ Item22,
40362
+ {
40363
+ style: {
40364
+ ...itemStyles,
40365
+ backgroundColor: hoveredItem === "throughHoleModels" ? "#404040" : "transparent"
40366
+ },
40367
+ onSelect: (e) => e.preventDefault(),
40368
+ onPointerDown: (e) => {
40369
+ e.preventDefault();
40370
+ setLayerVisibility(
40371
+ "throughHoleModels",
40372
+ !visibility.throughHoleModels
40373
+ );
40374
+ },
40375
+ onMouseEnter: () => setHoveredItem("throughHoleModels"),
40376
+ onMouseLeave: () => setHoveredItem(null),
40377
+ onTouchStart: () => setHoveredItem("throughHoleModels"),
40378
+ children: [
40379
+ /* @__PURE__ */ jsx34("span", { style: iconContainerStyles, children: visibility.throughHoleModels && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40380
+ /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Through-Hole Components" })
40276
40381
  ]
40277
40382
  }
40278
40383
  )
@@ -40284,7 +40389,7 @@ var AppearanceMenu = () => {
40284
40389
  };
40285
40390
 
40286
40391
  // src/components/ContextMenu.tsx
40287
- import { jsx as jsx34, jsxs as jsxs8 } from "react/jsx-runtime";
40392
+ import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
40288
40393
  var cameraOptions = [
40289
40394
  "Custom",
40290
40395
  "Top Center Angled",
@@ -40368,7 +40473,7 @@ var ContextMenu = ({
40368
40473
  const { cameraType, setCameraType } = useCameraController();
40369
40474
  const [cameraSubOpen, setCameraSubOpen] = useState34(false);
40370
40475
  const [hoveredItem, setHoveredItem] = useState34(null);
40371
- return /* @__PURE__ */ jsx34(
40476
+ return /* @__PURE__ */ jsx35(
40372
40477
  "div",
40373
40478
  {
40374
40479
  ref: menuRef,
@@ -40379,9 +40484,9 @@ var ContextMenu = ({
40379
40484
  width: 0,
40380
40485
  height: 0
40381
40486
  },
40382
- children: /* @__PURE__ */ jsxs8(Root22, { open: true, modal: false, children: [
40383
- /* @__PURE__ */ jsx34(Trigger, { asChild: true, children: /* @__PURE__ */ jsx34("div", { style: { position: "absolute", width: 1, height: 1 } }) }),
40384
- /* @__PURE__ */ jsx34(Portal22, { children: /* @__PURE__ */ jsxs8(
40487
+ children: /* @__PURE__ */ jsxs9(Root22, { open: true, modal: false, children: [
40488
+ /* @__PURE__ */ jsx35(Trigger, { asChild: true, children: /* @__PURE__ */ jsx35("div", { style: { position: "absolute", width: 1, height: 1 } }) }),
40489
+ /* @__PURE__ */ jsx35(Portal22, { children: /* @__PURE__ */ jsxs9(
40385
40490
  Content22,
40386
40491
  {
40387
40492
  style: contentStyles2,
@@ -40390,8 +40495,8 @@ var ContextMenu = ({
40390
40495
  sideOffset: 0,
40391
40496
  align: "start",
40392
40497
  children: [
40393
- /* @__PURE__ */ jsxs8(Sub2, { onOpenChange: setCameraSubOpen, children: [
40394
- /* @__PURE__ */ jsxs8(
40498
+ /* @__PURE__ */ jsxs9(Sub2, { onOpenChange: setCameraSubOpen, children: [
40499
+ /* @__PURE__ */ jsxs9(
40395
40500
  SubTrigger2,
40396
40501
  {
40397
40502
  style: {
@@ -40403,14 +40508,14 @@ var ContextMenu = ({
40403
40508
  onMouseLeave: () => setHoveredItem(null),
40404
40509
  onTouchStart: () => setHoveredItem("camera"),
40405
40510
  children: [
40406
- /* @__PURE__ */ jsx34(
40511
+ /* @__PURE__ */ jsx35(
40407
40512
  "span",
40408
40513
  {
40409
40514
  style: { flex: 1, display: "flex", alignItems: "center" },
40410
40515
  children: "Camera Position"
40411
40516
  }
40412
40517
  ),
40413
- /* @__PURE__ */ jsxs8(
40518
+ /* @__PURE__ */ jsxs9(
40414
40519
  "div",
40415
40520
  {
40416
40521
  style: {
@@ -40420,21 +40525,21 @@ var ContextMenu = ({
40420
40525
  marginLeft: "auto"
40421
40526
  },
40422
40527
  children: [
40423
- /* @__PURE__ */ jsx34("span", { style: { opacity: 0.55, fontSize: 13 }, children: cameraPreset }),
40424
- /* @__PURE__ */ jsx34(ChevronRightIcon, { isOpen: cameraSubOpen })
40528
+ /* @__PURE__ */ jsx35("span", { style: { opacity: 0.55, fontSize: 13 }, children: cameraPreset }),
40529
+ /* @__PURE__ */ jsx35(ChevronRightIcon, { isOpen: cameraSubOpen })
40425
40530
  ]
40426
40531
  }
40427
40532
  )
40428
40533
  ]
40429
40534
  }
40430
40535
  ),
40431
- /* @__PURE__ */ jsx34(Portal22, { children: /* @__PURE__ */ jsx34(
40536
+ /* @__PURE__ */ jsx35(Portal22, { children: /* @__PURE__ */ jsx35(
40432
40537
  SubContent2,
40433
40538
  {
40434
40539
  style: { ...contentStyles2, marginLeft: -2 },
40435
40540
  collisionPadding: 10,
40436
40541
  avoidCollisions: true,
40437
- children: cameraOptions.map((option) => /* @__PURE__ */ jsxs8(
40542
+ children: cameraOptions.map((option) => /* @__PURE__ */ jsxs9(
40438
40543
  Item22,
40439
40544
  {
40440
40545
  style: {
@@ -40450,8 +40555,8 @@ var ContextMenu = ({
40450
40555
  onMouseLeave: () => setHoveredItem(null),
40451
40556
  onTouchStart: () => setHoveredItem(option),
40452
40557
  children: [
40453
- /* @__PURE__ */ jsx34("span", { style: iconContainerStyles2, children: cameraPreset === option && /* @__PURE__ */ jsx34(DotIcon, {}) }),
40454
- /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: option })
40558
+ /* @__PURE__ */ jsx35("span", { style: iconContainerStyles2, children: cameraPreset === option && /* @__PURE__ */ jsx35(DotIcon, {}) }),
40559
+ /* @__PURE__ */ jsx35("span", { style: { display: "flex", alignItems: "center" }, children: option })
40455
40560
  ]
40456
40561
  },
40457
40562
  option
@@ -40459,7 +40564,7 @@ var ContextMenu = ({
40459
40564
  }
40460
40565
  ) })
40461
40566
  ] }),
40462
- /* @__PURE__ */ jsxs8(
40567
+ /* @__PURE__ */ jsxs9(
40463
40568
  Item22,
40464
40569
  {
40465
40570
  style: {
@@ -40476,12 +40581,12 @@ var ContextMenu = ({
40476
40581
  onMouseLeave: () => setHoveredItem(null),
40477
40582
  onTouchStart: () => setHoveredItem("autorotate"),
40478
40583
  children: [
40479
- /* @__PURE__ */ jsx34("span", { style: iconContainerStyles2, children: autoRotate && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40480
- /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Auto rotate" })
40584
+ /* @__PURE__ */ jsx35("span", { style: iconContainerStyles2, children: autoRotate && /* @__PURE__ */ jsx35(CheckIcon, {}) }),
40585
+ /* @__PURE__ */ jsx35("span", { style: { display: "flex", alignItems: "center" }, children: "Auto rotate" })
40481
40586
  ]
40482
40587
  }
40483
40588
  ),
40484
- /* @__PURE__ */ jsxs8(
40589
+ /* @__PURE__ */ jsxs9(
40485
40590
  Item22,
40486
40591
  {
40487
40592
  style: {
@@ -40500,14 +40605,14 @@ var ContextMenu = ({
40500
40605
  onMouseLeave: () => setHoveredItem(null),
40501
40606
  onTouchStart: () => setHoveredItem("cameratype"),
40502
40607
  children: [
40503
- /* @__PURE__ */ jsx34("span", { style: iconContainerStyles2, children: cameraType === "orthographic" && /* @__PURE__ */ jsx34(CheckIcon, {}) }),
40504
- /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Orthographic Camera" })
40608
+ /* @__PURE__ */ jsx35("span", { style: iconContainerStyles2, children: cameraType === "orthographic" && /* @__PURE__ */ jsx35(CheckIcon, {}) }),
40609
+ /* @__PURE__ */ jsx35("span", { style: { display: "flex", alignItems: "center" }, children: "Orthographic Camera" })
40505
40610
  ]
40506
40611
  }
40507
40612
  ),
40508
- /* @__PURE__ */ jsx34(AppearanceMenu, {}),
40509
- /* @__PURE__ */ jsx34(Separator2, { style: separatorStyles2 }),
40510
- /* @__PURE__ */ jsx34(
40613
+ /* @__PURE__ */ jsx35(AppearanceMenu, {}),
40614
+ /* @__PURE__ */ jsx35(Separator2, { style: separatorStyles2 }),
40615
+ /* @__PURE__ */ jsx35(
40511
40616
  Item22,
40512
40617
  {
40513
40618
  style: {
@@ -40519,11 +40624,11 @@ var ContextMenu = ({
40519
40624
  onMouseEnter: () => setHoveredItem("download"),
40520
40625
  onMouseLeave: () => setHoveredItem(null),
40521
40626
  onTouchStart: () => setHoveredItem("download"),
40522
- children: /* @__PURE__ */ jsx34("span", { style: { display: "flex", alignItems: "center" }, children: "Download GLTF" })
40627
+ children: /* @__PURE__ */ jsx35("span", { style: { display: "flex", alignItems: "center" }, children: "Download GLTF" })
40523
40628
  }
40524
40629
  ),
40525
- /* @__PURE__ */ jsx34(Separator2, { style: separatorStyles2 }),
40526
- /* @__PURE__ */ jsxs8(
40630
+ /* @__PURE__ */ jsx35(Separator2, { style: separatorStyles2 }),
40631
+ /* @__PURE__ */ jsxs9(
40527
40632
  Item22,
40528
40633
  {
40529
40634
  style: {
@@ -40540,12 +40645,12 @@ var ContextMenu = ({
40540
40645
  onMouseLeave: () => setHoveredItem(null),
40541
40646
  onTouchStart: () => setHoveredItem("engine"),
40542
40647
  children: [
40543
- /* @__PURE__ */ jsxs8("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: [
40648
+ /* @__PURE__ */ jsxs9("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: [
40544
40649
  "Switch to ",
40545
40650
  engine === "jscad" ? "Manifold" : "JSCAD",
40546
40651
  " Engine"
40547
40652
  ] }),
40548
- /* @__PURE__ */ jsx34(
40653
+ /* @__PURE__ */ jsx35(
40549
40654
  "div",
40550
40655
  {
40551
40656
  style: {
@@ -40559,8 +40664,8 @@ var ContextMenu = ({
40559
40664
  ]
40560
40665
  }
40561
40666
  ),
40562
- /* @__PURE__ */ jsx34(Separator2, { style: separatorStyles2 }),
40563
- /* @__PURE__ */ jsxs8(
40667
+ /* @__PURE__ */ jsx35(Separator2, { style: separatorStyles2 }),
40668
+ /* @__PURE__ */ jsxs9(
40564
40669
  Item22,
40565
40670
  {
40566
40671
  style: {
@@ -40573,8 +40678,8 @@ var ContextMenu = ({
40573
40678
  onMouseLeave: () => setHoveredItem(null),
40574
40679
  onTouchStart: () => setHoveredItem("shortcuts"),
40575
40680
  children: [
40576
- /* @__PURE__ */ jsx34("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: "Keyboard Shortcuts" }),
40577
- /* @__PURE__ */ jsx34(
40681
+ /* @__PURE__ */ jsx35("span", { style: { flex: 1, display: "flex", alignItems: "center" }, children: "Keyboard Shortcuts" }),
40682
+ /* @__PURE__ */ jsx35(
40578
40683
  "div",
40579
40684
  {
40580
40685
  style: {
@@ -40588,8 +40693,8 @@ var ContextMenu = ({
40588
40693
  ]
40589
40694
  }
40590
40695
  ),
40591
- /* @__PURE__ */ jsx34(Separator2, { style: separatorStyles2 }),
40592
- /* @__PURE__ */ jsx34(
40696
+ /* @__PURE__ */ jsx35(Separator2, { style: separatorStyles2 }),
40697
+ /* @__PURE__ */ jsx35(
40593
40698
  "div",
40594
40699
  {
40595
40700
  style: {
@@ -40600,7 +40705,7 @@ var ContextMenu = ({
40600
40705
  paddingTop: 4,
40601
40706
  paddingBottom: 4
40602
40707
  },
40603
- children: /* @__PURE__ */ jsxs8(
40708
+ children: /* @__PURE__ */ jsxs9(
40604
40709
  "span",
40605
40710
  {
40606
40711
  style: {
@@ -40628,7 +40733,7 @@ var ContextMenu = ({
40628
40733
 
40629
40734
  // src/components/KeyboardShortcutsDialog.tsx
40630
40735
  import { useEffect as useEffect41, useMemo as useMemo27, useRef as useRef25, useState as useState35 } from "react";
40631
- import { jsx as jsx35, jsxs as jsxs9 } from "react/jsx-runtime";
40736
+ import { jsx as jsx36, jsxs as jsxs10 } from "react/jsx-runtime";
40632
40737
  var KeyboardShortcutsDialog = ({
40633
40738
  open,
40634
40739
  onClose
@@ -40667,7 +40772,7 @@ var KeyboardShortcutsDialog = ({
40667
40772
  if (!open) {
40668
40773
  return null;
40669
40774
  }
40670
- return /* @__PURE__ */ jsx35(
40775
+ return /* @__PURE__ */ jsx36(
40671
40776
  "div",
40672
40777
  {
40673
40778
  role: "dialog",
@@ -40682,7 +40787,7 @@ var KeyboardShortcutsDialog = ({
40682
40787
  zIndex: 9999
40683
40788
  },
40684
40789
  onClick: onClose,
40685
- children: /* @__PURE__ */ jsxs9(
40790
+ children: /* @__PURE__ */ jsxs10(
40686
40791
  "div",
40687
40792
  {
40688
40793
  style: {
@@ -40698,7 +40803,7 @@ var KeyboardShortcutsDialog = ({
40698
40803
  },
40699
40804
  onClick: (event) => event.stopPropagation(),
40700
40805
  children: [
40701
- /* @__PURE__ */ jsxs9(
40806
+ /* @__PURE__ */ jsxs10(
40702
40807
  "header",
40703
40808
  {
40704
40809
  style: {
@@ -40706,8 +40811,8 @@ var KeyboardShortcutsDialog = ({
40706
40811
  borderBottom: "1px solid rgba(255, 255, 255, 0.08)"
40707
40812
  },
40708
40813
  children: [
40709
- /* @__PURE__ */ jsxs9("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
40710
- /* @__PURE__ */ jsx35(
40814
+ /* @__PURE__ */ jsxs10("div", { style: { display: "flex", justifyContent: "space-between" }, children: [
40815
+ /* @__PURE__ */ jsx36(
40711
40816
  "h2",
40712
40817
  {
40713
40818
  style: {
@@ -40719,7 +40824,7 @@ var KeyboardShortcutsDialog = ({
40719
40824
  children: "Keyboard Shortcuts"
40720
40825
  }
40721
40826
  ),
40722
- /* @__PURE__ */ jsx35(
40827
+ /* @__PURE__ */ jsx36(
40723
40828
  "button",
40724
40829
  {
40725
40830
  type: "button",
@@ -40735,7 +40840,7 @@ var KeyboardShortcutsDialog = ({
40735
40840
  }
40736
40841
  )
40737
40842
  ] }),
40738
- /* @__PURE__ */ jsx35(
40843
+ /* @__PURE__ */ jsx36(
40739
40844
  "input",
40740
40845
  {
40741
40846
  ref: inputRef,
@@ -40758,7 +40863,7 @@ var KeyboardShortcutsDialog = ({
40758
40863
  ]
40759
40864
  }
40760
40865
  ),
40761
- /* @__PURE__ */ jsx35("div", { style: { overflowY: "auto" }, children: /* @__PURE__ */ jsxs9(
40866
+ /* @__PURE__ */ jsx36("div", { style: { overflowY: "auto" }, children: /* @__PURE__ */ jsxs10(
40762
40867
  "table",
40763
40868
  {
40764
40869
  style: {
@@ -40767,23 +40872,23 @@ var KeyboardShortcutsDialog = ({
40767
40872
  fontSize: "0.95rem"
40768
40873
  },
40769
40874
  children: [
40770
- /* @__PURE__ */ jsx35("thead", { children: /* @__PURE__ */ jsxs9("tr", { style: { textAlign: "left", color: "#a1a1b5" }, children: [
40771
- /* @__PURE__ */ jsx35("th", { style: { padding: "12px 24px", width: "25%" }, children: "Key" }),
40772
- /* @__PURE__ */ jsx35("th", { style: { padding: "12px 24px" }, children: "Description" })
40875
+ /* @__PURE__ */ jsx36("thead", { children: /* @__PURE__ */ jsxs10("tr", { style: { textAlign: "left", color: "#a1a1b5" }, children: [
40876
+ /* @__PURE__ */ jsx36("th", { style: { padding: "12px 24px", width: "25%" }, children: "Key" }),
40877
+ /* @__PURE__ */ jsx36("th", { style: { padding: "12px 24px" }, children: "Description" })
40773
40878
  ] }) }),
40774
- /* @__PURE__ */ jsx35("tbody", { children: filteredHotkeys.length === 0 ? /* @__PURE__ */ jsx35("tr", { children: /* @__PURE__ */ jsx35(
40879
+ /* @__PURE__ */ jsx36("tbody", { children: filteredHotkeys.length === 0 ? /* @__PURE__ */ jsx36("tr", { children: /* @__PURE__ */ jsx36(
40775
40880
  "td",
40776
40881
  {
40777
40882
  colSpan: 2,
40778
40883
  style: { padding: "24px", textAlign: "center" },
40779
40884
  children: "No shortcuts found"
40780
40885
  }
40781
- ) }) : filteredHotkeys.map((hotkey) => /* @__PURE__ */ jsxs9(
40886
+ ) }) : filteredHotkeys.map((hotkey) => /* @__PURE__ */ jsxs10(
40782
40887
  "tr",
40783
40888
  {
40784
40889
  style: { borderTop: "1px solid rgba(255, 255, 255, 0.05)" },
40785
40890
  children: [
40786
- /* @__PURE__ */ jsx35("td", { style: { padding: "12px 24px" }, children: /* @__PURE__ */ jsx35(
40891
+ /* @__PURE__ */ jsx36("td", { style: { padding: "12px 24px" }, children: /* @__PURE__ */ jsx36(
40787
40892
  "span",
40788
40893
  {
40789
40894
  style: {
@@ -40801,7 +40906,7 @@ var KeyboardShortcutsDialog = ({
40801
40906
  children: hotkey.shortcut
40802
40907
  }
40803
40908
  ) }),
40804
- /* @__PURE__ */ jsx35("td", { style: { padding: "12px 24px" }, children: hotkey.description })
40909
+ /* @__PURE__ */ jsx36("td", { style: { padding: "12px 24px" }, children: hotkey.description })
40805
40910
  ]
40806
40911
  },
40807
40912
  hotkey.id
@@ -40817,7 +40922,7 @@ var KeyboardShortcutsDialog = ({
40817
40922
  };
40818
40923
 
40819
40924
  // src/CadViewer.tsx
40820
- import { jsx as jsx36, jsxs as jsxs10 } from "react/jsx-runtime";
40925
+ import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
40821
40926
  var CadViewerInner = (props) => {
40822
40927
  const [engine, setEngine] = useState36("manifold");
40823
40928
  const containerRef = useRef26(null);
@@ -40833,6 +40938,7 @@ var CadViewerInner = (props) => {
40833
40938
  const [cameraPreset, setCameraPreset] = useState36("Custom");
40834
40939
  const { cameraType, setCameraType } = useCameraController();
40835
40940
  const { visibility, setLayerVisibility } = useLayerVisibility();
40941
+ const { showToast } = useToast();
40836
40942
  const cameraControllerRef = useRef26(null);
40837
40943
  const externalCameraControllerReady = props.onCameraControllerReady;
40838
40944
  const {
@@ -40895,6 +41001,41 @@ var CadViewerInner = (props) => {
40895
41001
  description: "Open keyboard shortcuts"
40896
41002
  }
40897
41003
  );
41004
+ useRegisteredHotkey(
41005
+ "toggle_smt_models",
41006
+ () => {
41007
+ const newVisibility = !visibility.smtModels;
41008
+ setLayerVisibility("smtModels", newVisibility);
41009
+ showToast(
41010
+ newVisibility ? "SMT components visible" : "SMT components hidden",
41011
+ 1500
41012
+ );
41013
+ },
41014
+ {
41015
+ shortcut: "shift+s",
41016
+ description: "Toggle surface mount components"
41017
+ }
41018
+ );
41019
+ useRegisteredHotkey(
41020
+ "toggle_through_hole_models",
41021
+ () => {
41022
+ const newVisibility = !visibility.throughHoleModels;
41023
+ setLayerVisibility("throughHoleModels", newVisibility);
41024
+ showToast(
41025
+ newVisibility ? "Through-hole components visible" : "Through-hole components hidden",
41026
+ 1500
41027
+ );
41028
+ },
41029
+ {
41030
+ shortcut: "shift+t",
41031
+ description: "Toggle through-hole components"
41032
+ }
41033
+ );
41034
+ useEffect42(() => {
41035
+ if (containerRef.current) {
41036
+ registerHotkeyViewer(containerRef.current);
41037
+ }
41038
+ }, []);
40898
41039
  useEffect42(() => {
40899
41040
  const stored = window.localStorage.getItem("cadViewerEngine");
40900
41041
  if (stored === "jscad" || stored === "manifold") {
@@ -40923,7 +41064,7 @@ var CadViewerInner = (props) => {
40923
41064
  window.localStorage.setItem("cadViewerCameraType", cameraType);
40924
41065
  }, [cameraType]);
40925
41066
  const viewerKey = props.circuitJson ? JSON.stringify(props.circuitJson) : void 0;
40926
- return /* @__PURE__ */ jsxs10(
41067
+ return /* @__PURE__ */ jsxs11(
40927
41068
  "div",
40928
41069
  {
40929
41070
  ref: containerRef,
@@ -40939,7 +41080,7 @@ var CadViewerInner = (props) => {
40939
41080
  },
40940
41081
  ...contextMenuEventHandlers,
40941
41082
  children: [
40942
- engine === "jscad" ? /* @__PURE__ */ jsx36(
41083
+ engine === "jscad" ? /* @__PURE__ */ jsx37(
40943
41084
  CadViewerJscad,
40944
41085
  {
40945
41086
  ...props,
@@ -40948,7 +41089,7 @@ var CadViewerInner = (props) => {
40948
41089
  onUserInteraction: handleUserInteraction,
40949
41090
  onCameraControllerReady: handleCameraControllerReady
40950
41091
  }
40951
- ) : /* @__PURE__ */ jsx36(
41092
+ ) : /* @__PURE__ */ jsx37(
40952
41093
  CadViewerManifold_default,
40953
41094
  {
40954
41095
  ...props,
@@ -40958,7 +41099,7 @@ var CadViewerInner = (props) => {
40958
41099
  onCameraControllerReady: handleCameraControllerReady
40959
41100
  }
40960
41101
  ),
40961
- /* @__PURE__ */ jsxs10(
41102
+ /* @__PURE__ */ jsxs11(
40962
41103
  "div",
40963
41104
  {
40964
41105
  style: {
@@ -40975,11 +41116,11 @@ var CadViewerInner = (props) => {
40975
41116
  },
40976
41117
  children: [
40977
41118
  "Engine: ",
40978
- /* @__PURE__ */ jsx36("b", { children: engine === "jscad" ? "JSCAD" : "Manifold" })
41119
+ /* @__PURE__ */ jsx37("b", { children: engine === "jscad" ? "JSCAD" : "Manifold" })
40979
41120
  ]
40980
41121
  }
40981
41122
  ),
40982
- menuVisible && /* @__PURE__ */ jsx36(
41123
+ menuVisible && /* @__PURE__ */ jsx37(
40983
41124
  ContextMenu,
40984
41125
  {
40985
41126
  menuRef,
@@ -41006,7 +41147,7 @@ var CadViewerInner = (props) => {
41006
41147
  }
41007
41148
  }
41008
41149
  ),
41009
- /* @__PURE__ */ jsx36(
41150
+ /* @__PURE__ */ jsx37(
41010
41151
  KeyboardShortcutsDialog,
41011
41152
  {
41012
41153
  open: isKeyboardShortcutsDialogOpen,
@@ -41024,12 +41165,12 @@ var CadViewer = (props) => {
41024
41165
  () => [5, -5, 5],
41025
41166
  []
41026
41167
  );
41027
- return /* @__PURE__ */ jsx36(
41168
+ return /* @__PURE__ */ jsx37(
41028
41169
  CameraControllerProvider,
41029
41170
  {
41030
41171
  defaultTarget,
41031
41172
  initialCameraPosition,
41032
- children: /* @__PURE__ */ jsx36(LayerVisibilityProvider, { children: /* @__PURE__ */ jsx36(CadViewerInner, { ...props }) })
41173
+ children: /* @__PURE__ */ jsx37(LayerVisibilityProvider, { children: /* @__PURE__ */ jsx37(ToastProvider, { children: /* @__PURE__ */ jsx37(CadViewerInner, { ...props }) }) })
41033
41174
  }
41034
41175
  );
41035
41176
  };