@tscircuit/core 0.0.687 → 0.0.688

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 +20 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3328,7 +3328,9 @@ var Port = class extends PrimitiveComponent2 {
3328
3328
  } else if (labelHints.length > 0) {
3329
3329
  bestDisplayPinLabel = labelHints[0];
3330
3330
  }
3331
- const schematic_port = db.schematic_port.insert({
3331
+ const pinAttributes = this.parent?._parsedProps?.pinAttributes;
3332
+ const schematicPortInsertProps = {
3333
+ type: "schematic_port",
3332
3334
  schematic_component_id: this.parent?.schematic_component_id,
3333
3335
  center: portCenter,
3334
3336
  source_port_id: this.source_port_id,
@@ -3339,7 +3341,21 @@ var Port = class extends PrimitiveComponent2 {
3339
3341
  true_ccw_index: localPortInfo?.trueIndex,
3340
3342
  display_pin_label: bestDisplayPinLabel,
3341
3343
  is_connected: false
3342
- });
3344
+ };
3345
+ if (pinAttributes) {
3346
+ for (const alias of this.getNameAndAliases()) {
3347
+ if (pinAttributes[alias]) {
3348
+ const attributes = pinAttributes[alias];
3349
+ if (attributes.requiresPower) {
3350
+ schematicPortInsertProps.has_input_arrow = true;
3351
+ }
3352
+ if (attributes.providesPower) {
3353
+ schematicPortInsertProps.has_output_arrow = true;
3354
+ }
3355
+ }
3356
+ }
3357
+ }
3358
+ const schematic_port = db.schematic_port.insert(schematicPortInsertProps);
3343
3359
  this.schematic_port_id = schematic_port.schematic_port_id;
3344
3360
  }
3345
3361
  _getSubcircuitConnectivityKey() {
@@ -14073,7 +14089,7 @@ import { identity as identity6 } from "transformation-matrix";
14073
14089
  var package_default = {
14074
14090
  name: "@tscircuit/core",
14075
14091
  type: "module",
14076
- version: "0.0.686",
14092
+ version: "0.0.687",
14077
14093
  types: "dist/index.d.ts",
14078
14094
  main: "dist/index.js",
14079
14095
  module: "dist/index.js",
@@ -14130,7 +14146,7 @@ var package_default = {
14130
14146
  "circuit-json-to-bpc": "^0.0.13",
14131
14147
  "circuit-json-to-connectivity-map": "^0.0.22",
14132
14148
  "circuit-json-to-simple-3d": "^0.0.6",
14133
- "circuit-to-svg": "^0.0.182",
14149
+ "circuit-to-svg": "^0.0.185",
14134
14150
  concurrently: "^9.1.2",
14135
14151
  "connectivity-map": "^1.0.0",
14136
14152
  debug: "^4.3.6",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.687",
4
+ "version": "0.0.688",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -58,7 +58,7 @@
58
58
  "circuit-json-to-bpc": "^0.0.13",
59
59
  "circuit-json-to-connectivity-map": "^0.0.22",
60
60
  "circuit-json-to-simple-3d": "^0.0.6",
61
- "circuit-to-svg": "^0.0.182",
61
+ "circuit-to-svg": "^0.0.185",
62
62
  "concurrently": "^9.1.2",
63
63
  "connectivity-map": "^1.0.0",
64
64
  "debug": "^4.3.6",