@tscircuit/schematic-viewer 2.0.89 → 2.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2434,7 +2434,9 @@ var SchematicSheetSelector = ({
2434
2434
  alignItems: "center",
2435
2435
  gap: "6px",
2436
2436
  maxWidth: "220px",
2437
- padding: "8px 12px",
2437
+ height: "32px",
2438
+ boxSizing: "border-box",
2439
+ padding: "0 12px",
2438
2440
  backgroundColor: "#ffffff",
2439
2441
  color: "#000000",
2440
2442
  border: "none",
@@ -2495,7 +2497,7 @@ import { useMemo as useMemo5 } from "react";
2495
2497
  // package.json
2496
2498
  var package_default = {
2497
2499
  name: "@tscircuit/schematic-viewer",
2498
- version: "2.0.88",
2500
+ version: "2.0.90",
2499
2501
  repository: {
2500
2502
  type: "git",
2501
2503
  url: "https://github.com/tscircuit/schematic-viewer"
@@ -2540,7 +2542,7 @@ var package_default = {
2540
2542
  "@radix-ui/react-dropdown-menu": "^2.1.16",
2541
2543
  "@tscircuit/circuit-json-util": "^0.0.108",
2542
2544
  "circuit-json": "^0.0.479",
2543
- "circuit-to-svg": "^0.0.410",
2545
+ "circuit-to-svg": "^0.0.416",
2544
2546
  debug: "^4.4.0",
2545
2547
  fflate: "^0.8.3",
2546
2548
  "performance-now": "^2.1.0",
@@ -2624,7 +2626,9 @@ var ViewMenu = ({
2624
2626
  showGrid,
2625
2627
  onToggleGrid,
2626
2628
  showPorts,
2627
- onTogglePorts
2629
+ onTogglePorts,
2630
+ showWarnings,
2631
+ onToggleWarnings
2628
2632
  }) => {
2629
2633
  const hasGroups = useMemo5(() => {
2630
2634
  if (!circuitJson || circuitJson.length === 0) return false;
@@ -2734,6 +2738,20 @@ var ViewMenu = ({
2734
2738
  ]
2735
2739
  }
2736
2740
  ),
2741
+ /* @__PURE__ */ jsxs6(
2742
+ DropdownMenu2.CheckboxItem,
2743
+ {
2744
+ className: "sv-vm-item",
2745
+ style: itemStyles2,
2746
+ checked: showWarnings,
2747
+ onCheckedChange: onToggleWarnings,
2748
+ onSelect: (event) => event.preventDefault(),
2749
+ children: [
2750
+ /* @__PURE__ */ jsx8("span", { style: iconSlotStyles2, children: /* @__PURE__ */ jsx8(DropdownMenu2.ItemIndicator, { children: /* @__PURE__ */ jsx8(CheckIcon2, {}) }) }),
2751
+ /* @__PURE__ */ jsx8("span", { children: "Show Warnings" })
2752
+ ]
2753
+ }
2754
+ ),
2737
2755
  /* @__PURE__ */ jsx8(DropdownMenu2.Separator, { style: separatorStyles }),
2738
2756
  /* @__PURE__ */ jsxs6(
2739
2757
  "div",
@@ -2824,6 +2842,7 @@ var SchematicViewer = ({
2824
2842
  [onSchematicSheetChange]
2825
2843
  );
2826
2844
  const [showGridInternal, setShowGridInternal] = useState8(false);
2845
+ const [showWarnings, setShowWarnings] = useState8(false);
2827
2846
  const showGrid = debugGrid || showGridInternal;
2828
2847
  const [isInteractionEnabled, setIsInteractionEnabled] = useState8(
2829
2848
  !clickToInteractEnabled
@@ -3033,6 +3052,7 @@ var SchematicViewer = ({
3033
3052
  width: containerWidth,
3034
3053
  height: containerHeight || 720,
3035
3054
  drawPorts: showSchematicPortsInternal,
3055
+ shouldDrawWarnings: showWarnings,
3036
3056
  schematicSheetId: activeSheetId,
3037
3057
  grid: !showGrid ? void 0 : {
3038
3058
  cellSize: 1,
@@ -3047,6 +3067,7 @@ var SchematicViewer = ({
3047
3067
  containerWidth,
3048
3068
  containerHeight,
3049
3069
  showGrid,
3070
+ showWarnings,
3050
3071
  showSchematicPortsInternal,
3051
3072
  activeSheetId
3052
3073
  ]);
@@ -3217,6 +3238,8 @@ var SchematicViewer = ({
3217
3238
  );
3218
3239
  }
3219
3240
  },
3241
+ showWarnings,
3242
+ onToggleWarnings: setShowWarnings,
3220
3243
  showGrid,
3221
3244
  onToggleGrid: setShowGridInternal
3222
3245
  }