@tscircuit/core 0.0.777 → 0.0.778
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 +2 -0
- package/dist/index.js +15 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1176,6 +1176,7 @@ declare class NormalComponent<ZodProps extends z.ZodType = any, PortNames extend
|
|
|
1176
1176
|
*/
|
|
1177
1177
|
_getSchematicPortArrangement(): SchematicPortArrangement | null;
|
|
1178
1178
|
_getSchematicBoxDimensions(): SchematicBoxDimensions | null;
|
|
1179
|
+
getFootprinterString(): string | null;
|
|
1179
1180
|
doInitialCadModelRender(): void;
|
|
1180
1181
|
private _addCachebustToModelUrl;
|
|
1181
1182
|
private _getPartsEngineCacheKey;
|
|
@@ -12934,6 +12935,7 @@ declare class Led extends NormalComponent<typeof ledProps, PolarizedPassivePorts
|
|
|
12934
12935
|
};
|
|
12935
12936
|
initPorts(): void;
|
|
12936
12937
|
_getSchematicSymbolDisplayValue(): string | undefined;
|
|
12938
|
+
getFootprinterString(): string | null;
|
|
12937
12939
|
doInitialSourceRender(): void;
|
|
12938
12940
|
pos: Port;
|
|
12939
12941
|
anode: Port;
|
package/dist/index.js
CHANGED
|
@@ -8182,13 +8182,19 @@ var NormalComponent3 = class extends PrimitiveComponent2 {
|
|
|
8182
8182
|
});
|
|
8183
8183
|
return dimensions;
|
|
8184
8184
|
}
|
|
8185
|
+
getFootprinterString() {
|
|
8186
|
+
if (typeof this._parsedProps.footprint === "string") {
|
|
8187
|
+
return this._parsedProps.footprint;
|
|
8188
|
+
}
|
|
8189
|
+
return null;
|
|
8190
|
+
}
|
|
8185
8191
|
doInitialCadModelRender() {
|
|
8186
8192
|
if (this._isCadModelChild) return;
|
|
8187
8193
|
const { db } = this.root;
|
|
8188
8194
|
const { boardThickness = 0 } = this.root?._getBoard() ?? {};
|
|
8189
8195
|
const cadModelProp = this._parsedProps.cadModel;
|
|
8190
8196
|
const cadModel = cadModelProp === void 0 ? this._asyncFootprintCadModel : cadModelProp;
|
|
8191
|
-
const footprint = this.
|
|
8197
|
+
const footprint = this.getFootprinterString() ?? this._getImpliedFootprintString();
|
|
8192
8198
|
if (!this.pcb_component_id) return;
|
|
8193
8199
|
if (!cadModel && !footprint) return;
|
|
8194
8200
|
if (cadModel === null) return;
|
|
@@ -13857,6 +13863,13 @@ var Led = class extends NormalComponent3 {
|
|
|
13857
13863
|
_getSchematicSymbolDisplayValue() {
|
|
13858
13864
|
return this._parsedProps.schDisplayValue || this._parsedProps.color || void 0;
|
|
13859
13865
|
}
|
|
13866
|
+
getFootprinterString() {
|
|
13867
|
+
const baseFootprint = super.getFootprinterString();
|
|
13868
|
+
if (baseFootprint && this.props.color) {
|
|
13869
|
+
return `${baseFootprint}_color(${this.props.color})`;
|
|
13870
|
+
}
|
|
13871
|
+
return baseFootprint;
|
|
13872
|
+
}
|
|
13860
13873
|
doInitialSourceRender() {
|
|
13861
13874
|
const { db } = this.root;
|
|
13862
13875
|
const { _parsedProps: props } = this;
|
|
@@ -16205,7 +16218,7 @@ import { identity as identity6 } from "transformation-matrix";
|
|
|
16205
16218
|
var package_default = {
|
|
16206
16219
|
name: "@tscircuit/core",
|
|
16207
16220
|
type: "module",
|
|
16208
|
-
version: "0.0.
|
|
16221
|
+
version: "0.0.777",
|
|
16209
16222
|
types: "dist/index.d.ts",
|
|
16210
16223
|
main: "dist/index.js",
|
|
16211
16224
|
module: "dist/index.js",
|