@tscircuit/schematic-viewer 2.0.90 → 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
@@ -2497,7 +2497,7 @@ import { useMemo as useMemo5 } from "react";
2497
2497
  // package.json
2498
2498
  var package_default = {
2499
2499
  name: "@tscircuit/schematic-viewer",
2500
- version: "2.0.89",
2500
+ version: "2.0.90",
2501
2501
  repository: {
2502
2502
  type: "git",
2503
2503
  url: "https://github.com/tscircuit/schematic-viewer"
@@ -2542,7 +2542,7 @@ var package_default = {
2542
2542
  "@radix-ui/react-dropdown-menu": "^2.1.16",
2543
2543
  "@tscircuit/circuit-json-util": "^0.0.108",
2544
2544
  "circuit-json": "^0.0.479",
2545
- "circuit-to-svg": "^0.0.410",
2545
+ "circuit-to-svg": "^0.0.416",
2546
2546
  debug: "^4.4.0",
2547
2547
  fflate: "^0.8.3",
2548
2548
  "performance-now": "^2.1.0",
@@ -2626,7 +2626,9 @@ var ViewMenu = ({
2626
2626
  showGrid,
2627
2627
  onToggleGrid,
2628
2628
  showPorts,
2629
- onTogglePorts
2629
+ onTogglePorts,
2630
+ showWarnings,
2631
+ onToggleWarnings
2630
2632
  }) => {
2631
2633
  const hasGroups = useMemo5(() => {
2632
2634
  if (!circuitJson || circuitJson.length === 0) return false;
@@ -2736,6 +2738,20 @@ var ViewMenu = ({
2736
2738
  ]
2737
2739
  }
2738
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
+ ),
2739
2755
  /* @__PURE__ */ jsx8(DropdownMenu2.Separator, { style: separatorStyles }),
2740
2756
  /* @__PURE__ */ jsxs6(
2741
2757
  "div",
@@ -2826,6 +2842,7 @@ var SchematicViewer = ({
2826
2842
  [onSchematicSheetChange]
2827
2843
  );
2828
2844
  const [showGridInternal, setShowGridInternal] = useState8(false);
2845
+ const [showWarnings, setShowWarnings] = useState8(false);
2829
2846
  const showGrid = debugGrid || showGridInternal;
2830
2847
  const [isInteractionEnabled, setIsInteractionEnabled] = useState8(
2831
2848
  !clickToInteractEnabled
@@ -3035,6 +3052,7 @@ var SchematicViewer = ({
3035
3052
  width: containerWidth,
3036
3053
  height: containerHeight || 720,
3037
3054
  drawPorts: showSchematicPortsInternal,
3055
+ shouldDrawWarnings: showWarnings,
3038
3056
  schematicSheetId: activeSheetId,
3039
3057
  grid: !showGrid ? void 0 : {
3040
3058
  cellSize: 1,
@@ -3049,6 +3067,7 @@ var SchematicViewer = ({
3049
3067
  containerWidth,
3050
3068
  containerHeight,
3051
3069
  showGrid,
3070
+ showWarnings,
3052
3071
  showSchematicPortsInternal,
3053
3072
  activeSheetId
3054
3073
  ]);
@@ -3219,6 +3238,8 @@ var SchematicViewer = ({
3219
3238
  );
3220
3239
  }
3221
3240
  },
3241
+ showWarnings,
3242
+ onToggleWarnings: setShowWarnings,
3222
3243
  showGrid,
3223
3244
  onToggleGrid: setShowGridInternal
3224
3245
  }