@tscircuit/core 0.0.448 → 0.0.450
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 +1 -0
- package/dist/index.js +13 -6
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9847,6 +9847,7 @@ declare class Inductor extends NormalComponent<typeof inductorProps, PassivePort
|
|
|
9847
9847
|
}>;
|
|
9848
9848
|
sourceFtype: "simple_inductor";
|
|
9849
9849
|
};
|
|
9850
|
+
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
9850
9851
|
initPorts(): void;
|
|
9851
9852
|
doInitialSourceRender(): void;
|
|
9852
9853
|
}
|
package/dist/index.js
CHANGED
|
@@ -2349,6 +2349,7 @@ var SilkscreenText = class extends PrimitiveComponent2 {
|
|
|
2349
2349
|
var createPinrowSilkscreenText = ({
|
|
2350
2350
|
elm,
|
|
2351
2351
|
pinLabels,
|
|
2352
|
+
layer,
|
|
2352
2353
|
readableRotation,
|
|
2353
2354
|
anchorAlignment
|
|
2354
2355
|
}) => {
|
|
@@ -2356,13 +2357,14 @@ var createPinrowSilkscreenText = ({
|
|
|
2356
2357
|
let label = pinNum;
|
|
2357
2358
|
if (Array.isArray(pinLabels)) {
|
|
2358
2359
|
const index = parseInt(pinNum.replace(/[^\d]/g, ""), 10) - 1;
|
|
2359
|
-
label = pinLabels[index] ?? pinNum;
|
|
2360
|
+
label = String(pinLabels[index] ?? pinNum);
|
|
2360
2361
|
} else if (typeof pinLabels === "object") {
|
|
2361
|
-
label = pinLabels[pinNum]
|
|
2362
|
+
label = String(pinLabels[pinNum] ?? pinNum);
|
|
2362
2363
|
}
|
|
2363
2364
|
return new SilkscreenText({
|
|
2364
2365
|
anchorAlignment: anchorAlignment || "center",
|
|
2365
2366
|
text: label ?? pinNum,
|
|
2367
|
+
layer: layer || "top",
|
|
2366
2368
|
fontSize: elm.font_size + 0.2,
|
|
2367
2369
|
pcbX: isNaN(elm.anchor_position.x) ? 0 : elm.anchor_position.x,
|
|
2368
2370
|
pcbY: elm.anchor_position.y,
|
|
@@ -2479,6 +2481,7 @@ var createComponentsFromCircuitJson = ({
|
|
|
2479
2481
|
createPinrowSilkscreenText({
|
|
2480
2482
|
elm,
|
|
2481
2483
|
pinLabels,
|
|
2484
|
+
layer: elm.layer,
|
|
2482
2485
|
readableRotation: ccwRotation,
|
|
2483
2486
|
anchorAlignment: elm.anchor_alignment
|
|
2484
2487
|
})
|
|
@@ -8929,6 +8932,7 @@ var Resonator = class extends NormalComponent {
|
|
|
8929
8932
|
|
|
8930
8933
|
// lib/components/normal-components/Inductor.ts
|
|
8931
8934
|
import { inductorProps } from "@tscircuit/props";
|
|
8935
|
+
import { formatSiUnit as formatSiUnit4 } from "format-si-unit";
|
|
8932
8936
|
var Inductor = class extends NormalComponent {
|
|
8933
8937
|
get config() {
|
|
8934
8938
|
return {
|
|
@@ -8938,6 +8942,9 @@ var Inductor = class extends NormalComponent {
|
|
|
8938
8942
|
sourceFtype: FTYPE.simple_inductor
|
|
8939
8943
|
};
|
|
8940
8944
|
}
|
|
8945
|
+
_getSchematicSymbolDisplayValue() {
|
|
8946
|
+
return `${formatSiUnit4(this._parsedProps.inductance)}H`;
|
|
8947
|
+
}
|
|
8941
8948
|
initPorts() {
|
|
8942
8949
|
super.initPorts({
|
|
8943
8950
|
additionalAliases: {
|
|
@@ -9037,7 +9044,7 @@ var PushButton = class extends NormalComponent {
|
|
|
9037
9044
|
|
|
9038
9045
|
// lib/components/normal-components/Crystal.ts
|
|
9039
9046
|
import { crystalProps } from "@tscircuit/props";
|
|
9040
|
-
import { formatSiUnit as
|
|
9047
|
+
import { formatSiUnit as formatSiUnit5 } from "format-si-unit";
|
|
9041
9048
|
var Crystal = class extends NormalComponent {
|
|
9042
9049
|
// @ts-ignore
|
|
9043
9050
|
get config() {
|
|
@@ -9064,7 +9071,7 @@ var Crystal = class extends NormalComponent {
|
|
|
9064
9071
|
});
|
|
9065
9072
|
}
|
|
9066
9073
|
_getSchematicSymbolDisplayValue() {
|
|
9067
|
-
return `${
|
|
9074
|
+
return `${formatSiUnit5(this._parsedProps.frequency)}Hz`;
|
|
9068
9075
|
}
|
|
9069
9076
|
doInitialSourceRender() {
|
|
9070
9077
|
const { db } = this.root;
|
|
@@ -9316,7 +9323,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9316
9323
|
var package_default = {
|
|
9317
9324
|
name: "@tscircuit/core",
|
|
9318
9325
|
type: "module",
|
|
9319
|
-
version: "0.0.
|
|
9326
|
+
version: "0.0.449",
|
|
9320
9327
|
types: "dist/index.d.ts",
|
|
9321
9328
|
main: "dist/index.js",
|
|
9322
9329
|
module: "dist/index.js",
|
|
@@ -9342,7 +9349,7 @@ var package_default = {
|
|
|
9342
9349
|
"@tscircuit/capacity-autorouter": "^0.0.67",
|
|
9343
9350
|
"@tscircuit/checks": "^0.0.52",
|
|
9344
9351
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
9345
|
-
"@tscircuit/footprinter": "^0.0.
|
|
9352
|
+
"@tscircuit/footprinter": "^0.0.175",
|
|
9346
9353
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
9347
9354
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
9348
9355
|
"@tscircuit/layout": "^0.0.28",
|
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.450",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@tscircuit/capacity-autorouter": "^0.0.67",
|
|
28
28
|
"@tscircuit/checks": "^0.0.52",
|
|
29
29
|
"@tscircuit/circuit-json-util": "^0.0.47",
|
|
30
|
-
"@tscircuit/footprinter": "^0.0.
|
|
30
|
+
"@tscircuit/footprinter": "^0.0.175",
|
|
31
31
|
"@tscircuit/import-snippet": "^0.0.4",
|
|
32
32
|
"@tscircuit/infgrid-ijump-astar": "^0.0.33",
|
|
33
33
|
"@tscircuit/layout": "^0.0.28",
|