@tscircuit/core 0.0.2112 → 0.0.2113

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 +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -118102,7 +118102,7 @@ function Group_getRoutingPhasePlans(group) {
118102
118102
  var package_default = {
118103
118103
  name: "@tscircuit/core",
118104
118104
  type: "module",
118105
- version: "0.0.2111",
118105
+ version: "0.0.2112",
118106
118106
  types: "dist/index.d.ts",
118107
118107
  main: "dist/index.js",
118108
118108
  module: "dist/index.js",
@@ -132014,7 +132014,7 @@ var resolveCircuitJsonSchematicSheetProperties = ({
132014
132014
  };
132015
132015
  };
132016
132016
 
132017
- // lib/utils/schematic/insertSchematicElementOutsideSheetWarnings.ts
132017
+ // lib/utils/schematic/warn-if-schematic-elements-outside-sheet.ts
132018
132018
  import {
132019
132019
  getSchematicElementBounds
132020
132020
  } from "@tscircuit/circuit-json-util";
@@ -132031,7 +132031,7 @@ var getSchematicElementId = (schematicElement) => {
132031
132031
  return schematicElement.schematic_trace_id;
132032
132032
  }
132033
132033
  };
132034
- var insertSchematicElementOutsideSheetWarnings = ({
132034
+ var warnIfSchematicElementsOutsideSheet = ({
132035
132035
  db: db2,
132036
132036
  schematicSheetId,
132037
132037
  schematicSheetName,
@@ -132133,6 +132133,18 @@ var SchematicSheet = class extends PrimitiveComponent2 {
132133
132133
  const resolvedSheetProperties = resolveCircuitJsonSchematicSheetProperties(
132134
132134
  this._parsedProps
132135
132135
  );
132136
+ const hasExplicitSheetDimensions = this._parsedProps.sheetWidth !== void 0 || this._parsedProps.sheetHeight !== void 0;
132137
+ if (hasExplicitSheetDimensions) {
132138
+ warnIfSchematicElementsOutsideSheet({
132139
+ db: db2,
132140
+ schematicSheetId: this.schematic_sheet_id,
132141
+ schematicSheetName: this.resolvedSchematicSheetDisplayName,
132142
+ schematicSheetCenter: { x: 0, y: 0 },
132143
+ sheetWidth: resolvedSheetProperties.sheetWidth,
132144
+ sheetHeight: resolvedSheetProperties.sheetHeight
132145
+ });
132146
+ return;
132147
+ }
132136
132148
  const schematicElements = [
132137
132149
  ...db2.schematic_component.list(),
132138
132150
  ...db2.schematic_port.list(),
@@ -132158,7 +132170,7 @@ var SchematicSheet = class extends PrimitiveComponent2 {
132158
132170
  });
132159
132171
  }
132160
132172
  }
132161
- insertSchematicElementOutsideSheetWarnings({
132173
+ warnIfSchematicElementsOutsideSheet({
132162
132174
  db: db2,
132163
132175
  schematicSheetId: this.schematic_sheet_id,
132164
132176
  schematicSheetName: this.resolvedSchematicSheetDisplayName,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.2112",
4
+ "version": "0.0.2113",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",