@tscircuit/core 0.0.962 → 0.0.964

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.d.ts CHANGED
@@ -22249,6 +22249,10 @@ declare class PcbNoteLine extends PrimitiveComponent<typeof pcbNoteLineProps> {
22249
22249
  width: number;
22250
22250
  height: number;
22251
22251
  };
22252
+ _moveCircuitJsonElements({ deltaX, deltaY, }: {
22253
+ deltaX: number;
22254
+ deltaY: number;
22255
+ }): void;
22252
22256
  }
22253
22257
 
22254
22258
  declare class PcbNoteRect extends PrimitiveComponent<typeof pcbNoteRectProps> {
@@ -22413,6 +22417,10 @@ declare class PcbNoteRect extends PrimitiveComponent<typeof pcbNoteRectProps> {
22413
22417
  width: number;
22414
22418
  height: number;
22415
22419
  };
22420
+ _moveCircuitJsonElements({ deltaX, deltaY, }: {
22421
+ deltaX: number;
22422
+ deltaY: number;
22423
+ }): void;
22416
22424
  }
22417
22425
 
22418
22426
  declare class PcbNoteText extends PrimitiveComponent<typeof pcbNoteTextProps> {
@@ -22570,6 +22578,10 @@ declare class PcbNoteText extends PrimitiveComponent<typeof pcbNoteTextProps> {
22570
22578
  width: number;
22571
22579
  height: number;
22572
22580
  };
22581
+ _moveCircuitJsonElements({ deltaX, deltaY, }: {
22582
+ deltaX: number;
22583
+ deltaY: number;
22584
+ }): void;
22573
22585
  }
22574
22586
 
22575
22587
  declare class PcbNotePath extends PrimitiveComponent<typeof pcbNotePathProps> {
package/dist/index.js CHANGED
@@ -18106,6 +18106,23 @@ var PcbNoteLine = class extends PrimitiveComponent2 {
18106
18106
  height: Math.abs(props.y2 - props.y1)
18107
18107
  };
18108
18108
  }
18109
+ _moveCircuitJsonElements({
18110
+ deltaX,
18111
+ deltaY
18112
+ }) {
18113
+ if (this.root?.pcbDisabled) return;
18114
+ const { db } = this.root;
18115
+ if (!this.pcb_note_line_id) return;
18116
+ const line = db.pcb_note_line.get(this.pcb_note_line_id);
18117
+ if (line) {
18118
+ db.pcb_note_line.update(this.pcb_note_line_id, {
18119
+ x1: line.x1 + deltaX,
18120
+ y1: line.y1 + deltaY,
18121
+ x2: line.x2 + deltaX,
18122
+ y2: line.y2 + deltaY
18123
+ });
18124
+ }
18125
+ }
18109
18126
  };
18110
18127
 
18111
18128
  // lib/components/primitive-components/PcbNoteRect.ts
@@ -18151,6 +18168,23 @@ var PcbNoteRect = class extends PrimitiveComponent2 {
18151
18168
  const height = typeof props.height === "string" ? parseFloat(props.height) : props.height;
18152
18169
  return { width, height };
18153
18170
  }
18171
+ _moveCircuitJsonElements({
18172
+ deltaX,
18173
+ deltaY
18174
+ }) {
18175
+ if (this.root?.pcbDisabled) return;
18176
+ const { db } = this.root;
18177
+ if (!this.pcb_note_rect_id) return;
18178
+ const rect = db.pcb_note_rect.get(this.pcb_note_rect_id);
18179
+ if (rect) {
18180
+ db.pcb_note_rect.update(this.pcb_note_rect_id, {
18181
+ center: {
18182
+ x: rect.center.x + deltaX,
18183
+ y: rect.center.y + deltaY
18184
+ }
18185
+ });
18186
+ }
18187
+ }
18154
18188
  };
18155
18189
 
18156
18190
  // lib/components/primitive-components/PcbNoteText.ts
@@ -18195,6 +18229,23 @@ var PcbNoteText = class extends PrimitiveComponent2 {
18195
18229
  const height = fontSize;
18196
18230
  return { width, height };
18197
18231
  }
18232
+ _moveCircuitJsonElements({
18233
+ deltaX,
18234
+ deltaY
18235
+ }) {
18236
+ if (this.root?.pcbDisabled) return;
18237
+ const { db } = this.root;
18238
+ if (!this.pcb_note_text_id) return;
18239
+ const text = db.pcb_note_text.get(this.pcb_note_text_id);
18240
+ if (text) {
18241
+ db.pcb_note_text.update(this.pcb_note_text_id, {
18242
+ anchor_position: {
18243
+ x: text.anchor_position.x + deltaX,
18244
+ y: text.anchor_position.y + deltaY
18245
+ }
18246
+ });
18247
+ }
18248
+ }
18198
18249
  };
18199
18250
 
18200
18251
  // lib/components/primitive-components/PcbNotePath.ts
@@ -20722,7 +20773,7 @@ import { identity as identity5 } from "transformation-matrix";
20722
20773
  var package_default = {
20723
20774
  name: "@tscircuit/core",
20724
20775
  type: "module",
20725
- version: "0.0.961",
20776
+ version: "0.0.963",
20726
20777
  types: "dist/index.d.ts",
20727
20778
  main: "dist/index.js",
20728
20779
  module: "dist/index.js",
@@ -20784,7 +20835,7 @@ var package_default = {
20784
20835
  "circuit-json-to-gltf": "^0.0.31",
20785
20836
  "circuit-json-to-simple-3d": "^0.0.9",
20786
20837
  "circuit-json-to-spice": "^0.0.33",
20787
- "circuit-to-svg": "^0.0.307",
20838
+ "circuit-to-svg": "^0.0.313",
20788
20839
  concurrently: "^9.1.2",
20789
20840
  "connectivity-map": "^1.0.0",
20790
20841
  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.962",
4
+ "version": "0.0.964",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -63,7 +63,7 @@
63
63
  "circuit-json-to-gltf": "^0.0.31",
64
64
  "circuit-json-to-simple-3d": "^0.0.9",
65
65
  "circuit-json-to-spice": "^0.0.33",
66
- "circuit-to-svg": "^0.0.307",
66
+ "circuit-to-svg": "^0.0.313",
67
67
  "concurrently": "^9.1.2",
68
68
  "connectivity-map": "^1.0.0",
69
69
  "debug": "^4.3.6",