@tscircuit/core 0.0.762 → 0.0.763
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 +6 -18
- package/dist/index.js +10 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -32494,16 +32494,8 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
|
|
|
32494
32494
|
get config(): {
|
|
32495
32495
|
componentName: string;
|
|
32496
32496
|
zodProps: zod.ZodObject<{
|
|
32497
|
-
|
|
32498
|
-
|
|
32499
|
-
y: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32500
|
-
}, "strip", zod.ZodTypeAny, {
|
|
32501
|
-
x: number;
|
|
32502
|
-
y: number;
|
|
32503
|
-
}, {
|
|
32504
|
-
x: string | number;
|
|
32505
|
-
y: string | number;
|
|
32506
|
-
}>;
|
|
32497
|
+
schX: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32498
|
+
schY: zod.ZodOptional<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
32507
32499
|
width: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32508
32500
|
height: zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>;
|
|
32509
32501
|
rotation: zod.ZodDefault<zod.ZodEffects<zod.ZodUnion<[zod.ZodString, zod.ZodNumber]>, number, string | number>>;
|
|
@@ -32513,25 +32505,21 @@ declare class SchematicRect extends PrimitiveComponent<typeof schematicRectProps
|
|
|
32513
32505
|
fillColor: zod.ZodOptional<zod.ZodString>;
|
|
32514
32506
|
isDashed: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
|
|
32515
32507
|
}, "strip", zod.ZodTypeAny, {
|
|
32516
|
-
center: {
|
|
32517
|
-
x: number;
|
|
32518
|
-
y: number;
|
|
32519
|
-
};
|
|
32520
32508
|
width: number;
|
|
32521
32509
|
height: number;
|
|
32522
32510
|
color: string;
|
|
32523
32511
|
isDashed: boolean;
|
|
32524
32512
|
isFilled: boolean;
|
|
32525
32513
|
rotation: number;
|
|
32514
|
+
schX?: number | undefined;
|
|
32515
|
+
schY?: number | undefined;
|
|
32526
32516
|
strokeWidth?: number | undefined;
|
|
32527
32517
|
fillColor?: string | undefined;
|
|
32528
32518
|
}, {
|
|
32529
|
-
center: {
|
|
32530
|
-
x: string | number;
|
|
32531
|
-
y: string | number;
|
|
32532
|
-
};
|
|
32533
32519
|
width: string | number;
|
|
32534
32520
|
height: string | number;
|
|
32521
|
+
schX?: string | number | undefined;
|
|
32522
|
+
schY?: string | number | undefined;
|
|
32535
32523
|
strokeWidth?: string | number | undefined;
|
|
32536
32524
|
color?: string | undefined;
|
|
32537
32525
|
isDashed?: boolean | undefined;
|
package/dist/index.js
CHANGED
|
@@ -7845,7 +7845,13 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
7845
7845
|
const width = Math.abs(bounds.maxX - bounds.minX);
|
|
7846
7846
|
const height = Math.abs(bounds.maxY - bounds.minY);
|
|
7847
7847
|
if (width === 0 && height === 0) return;
|
|
7848
|
+
const centerX = (bounds.minX + bounds.maxX) / 2;
|
|
7849
|
+
const centerY = (bounds.minY + bounds.maxY) / 2;
|
|
7848
7850
|
db.schematic_component.update(this.schematic_component_id, {
|
|
7851
|
+
center: {
|
|
7852
|
+
x: centerX,
|
|
7853
|
+
y: centerY
|
|
7854
|
+
},
|
|
7849
7855
|
size: {
|
|
7850
7856
|
width,
|
|
7851
7857
|
height
|
|
@@ -15492,8 +15498,8 @@ var SchematicRect = class extends PrimitiveComponent2 {
|
|
|
15492
15498
|
const schematic_component_id = this.getPrimitiveContainer()?.parent?.schematic_component_id;
|
|
15493
15499
|
const schematic_rect = db.schematic_rect.insert({
|
|
15494
15500
|
center: {
|
|
15495
|
-
x:
|
|
15496
|
-
y:
|
|
15501
|
+
x: globalPos.x,
|
|
15502
|
+
y: globalPos.y
|
|
15497
15503
|
},
|
|
15498
15504
|
width: props.width,
|
|
15499
15505
|
height: props.height,
|
|
@@ -15964,7 +15970,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
15964
15970
|
var package_default = {
|
|
15965
15971
|
name: "@tscircuit/core",
|
|
15966
15972
|
type: "module",
|
|
15967
|
-
version: "0.0.
|
|
15973
|
+
version: "0.0.762",
|
|
15968
15974
|
types: "dist/index.d.ts",
|
|
15969
15975
|
main: "dist/index.js",
|
|
15970
15976
|
module: "dist/index.js",
|
|
@@ -16003,7 +16009,7 @@ var package_default = {
|
|
|
16003
16009
|
"@tscircuit/matchpack": "^0.0.16",
|
|
16004
16010
|
"@tscircuit/math-utils": "^0.0.21",
|
|
16005
16011
|
"@tscircuit/miniflex": "^0.0.4",
|
|
16006
|
-
"@tscircuit/props": "0.0.
|
|
16012
|
+
"@tscircuit/props": "0.0.349",
|
|
16007
16013
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
16008
16014
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
16009
16015
|
"@tscircuit/schematic-trace-solver": "^0.0.40",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.763",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@tscircuit/matchpack": "^0.0.16",
|
|
41
41
|
"@tscircuit/math-utils": "^0.0.21",
|
|
42
42
|
"@tscircuit/miniflex": "^0.0.4",
|
|
43
|
-
"@tscircuit/props": "0.0.
|
|
43
|
+
"@tscircuit/props": "0.0.349",
|
|
44
44
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
45
45
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
46
46
|
"@tscircuit/schematic-trace-solver": "^0.0.40",
|