@tscircuit/core 0.0.751 → 0.0.753
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 +29 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1849,6 +1849,8 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1849
1849
|
if (this.root?.pcbDisabled) return;
|
|
1850
1850
|
const { db } = this.root;
|
|
1851
1851
|
const { _parsedProps: props } = this;
|
|
1852
|
+
const isCoveredWithSolderMask = props.coveredWithSolderMask ?? false;
|
|
1853
|
+
const shouldCreateSolderPaste = !isCoveredWithSolderMask;
|
|
1852
1854
|
if (!props.portHints) return;
|
|
1853
1855
|
const subcircuit = this.getSubcircuit();
|
|
1854
1856
|
const position = this._getGlobalPcbPositionBeforeLayout();
|
|
@@ -1873,22 +1875,23 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1873
1875
|
shape: "circle",
|
|
1874
1876
|
radius: props.radius,
|
|
1875
1877
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1876
|
-
is_covered_with_solder_mask:
|
|
1878
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1877
1879
|
x: position.x,
|
|
1878
1880
|
y: position.y,
|
|
1879
1881
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0
|
|
1880
1882
|
});
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1883
|
+
if (shouldCreateSolderPaste)
|
|
1884
|
+
db.pcb_solder_paste.insert({
|
|
1885
|
+
layer: pcb_smtpad.layer,
|
|
1886
|
+
shape: "circle",
|
|
1887
|
+
radius: pcb_smtpad.radius * 0.7,
|
|
1888
|
+
x: pcb_smtpad.x,
|
|
1889
|
+
y: pcb_smtpad.y,
|
|
1890
|
+
pcb_component_id: pcb_smtpad.pcb_component_id,
|
|
1891
|
+
pcb_smtpad_id: pcb_smtpad.pcb_smtpad_id,
|
|
1892
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
1893
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1894
|
+
});
|
|
1892
1895
|
} else if (props.shape === "rect") {
|
|
1893
1896
|
pcb_smtpad = isAxisAligned || isRotated90Degrees ? db.pcb_smtpad.insert({
|
|
1894
1897
|
pcb_component_id,
|
|
@@ -1899,7 +1902,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1899
1902
|
width: isRotated90Degrees ? props.height : props.width,
|
|
1900
1903
|
height: isRotated90Degrees ? props.width : props.height,
|
|
1901
1904
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1902
|
-
is_covered_with_solder_mask:
|
|
1905
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1903
1906
|
x: position.x,
|
|
1904
1907
|
y: position.y,
|
|
1905
1908
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
@@ -1914,11 +1917,11 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1914
1917
|
y: position.y,
|
|
1915
1918
|
ccw_rotation: finalRotationDegrees,
|
|
1916
1919
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1917
|
-
is_covered_with_solder_mask:
|
|
1920
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1918
1921
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
1919
1922
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1920
1923
|
});
|
|
1921
|
-
if (pcb_smtpad.shape === "rect")
|
|
1924
|
+
if (shouldCreateSolderPaste && pcb_smtpad.shape === "rect")
|
|
1922
1925
|
db.pcb_solder_paste.insert({
|
|
1923
1926
|
layer: maybeFlipLayer(props.layer ?? "top"),
|
|
1924
1927
|
shape: "rect",
|
|
@@ -1931,7 +1934,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1931
1934
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
1932
1935
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1933
1936
|
});
|
|
1934
|
-
if (pcb_smtpad.shape === "rotated_rect")
|
|
1937
|
+
if (shouldCreateSolderPaste && pcb_smtpad.shape === "rotated_rect")
|
|
1935
1938
|
db.pcb_solder_paste.insert({
|
|
1936
1939
|
layer: maybeFlipLayer(props.layer ?? "top"),
|
|
1937
1940
|
shape: "rotated_rect",
|
|
@@ -1957,7 +1960,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1957
1960
|
y: p.y + position.y
|
|
1958
1961
|
})),
|
|
1959
1962
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1960
|
-
is_covered_with_solder_mask:
|
|
1963
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1961
1964
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
1962
1965
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1963
1966
|
});
|
|
@@ -1974,7 +1977,7 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
1974
1977
|
height: props.height,
|
|
1975
1978
|
width: props.width,
|
|
1976
1979
|
port_hints: props.portHints.map((ph) => ph.toString()),
|
|
1977
|
-
is_covered_with_solder_mask:
|
|
1980
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
1978
1981
|
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
1979
1982
|
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
1980
1983
|
});
|
|
@@ -2085,10 +2088,12 @@ var SmtPad = class extends PrimitiveComponent2 {
|
|
|
2085
2088
|
y: newCenter.y
|
|
2086
2089
|
});
|
|
2087
2090
|
const solderPaste = db.pcb_solder_paste.list().find((elm) => elm.pcb_smtpad_id === this.pcb_smtpad_id);
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2091
|
+
if (solderPaste) {
|
|
2092
|
+
db.pcb_solder_paste.update(solderPaste.pcb_solder_paste_id, {
|
|
2093
|
+
x: newCenter.x,
|
|
2094
|
+
y: newCenter.y
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2092
2097
|
this.matchedPort?._setPositionFromLayout(newCenter);
|
|
2093
2098
|
}
|
|
2094
2099
|
};
|
|
@@ -6915,7 +6920,7 @@ function isValidPinLabel(pin, label) {
|
|
|
6915
6920
|
import { isValidElement as isReactElement } from "react";
|
|
6916
6921
|
|
|
6917
6922
|
// lib/components/base-components/NormalComponent/utils/isFoorprintUrl.ts
|
|
6918
|
-
var isFootprintUrl = (s) => s.startsWith("http://") || s.startsWith("https://");
|
|
6923
|
+
var isFootprintUrl = (s) => s.startsWith("http://") || s.startsWith("https://") || s.startsWith("/");
|
|
6919
6924
|
|
|
6920
6925
|
// lib/components/base-components/NormalComponent/utils/parseLibraryFootprintRef.ts
|
|
6921
6926
|
var parseLibraryFootprintRef = (s) => {
|
|
@@ -15778,7 +15783,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
15778
15783
|
var package_default = {
|
|
15779
15784
|
name: "@tscircuit/core",
|
|
15780
15785
|
type: "module",
|
|
15781
|
-
version: "0.0.
|
|
15786
|
+
version: "0.0.752",
|
|
15782
15787
|
types: "dist/index.d.ts",
|
|
15783
15788
|
main: "dist/index.js",
|
|
15784
15789
|
module: "dist/index.js",
|