@tscircuit/core 0.0.273 → 0.0.275
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/LICENSE +21 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -0
- package/package.json +2 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 tscircuit Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -919,6 +919,7 @@ interface SimpleRouteJson {
|
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps> extends NormalComponent<Props> implements ISubcircuit {
|
|
922
|
+
subcircuit_id?: string;
|
|
922
923
|
_asyncAutoroutingResult: {
|
|
923
924
|
output_simple_route_json?: SimpleRouteJson;
|
|
924
925
|
output_pcb_traces?: PcbTrace[];
|
|
@@ -927,6 +928,8 @@ declare class Group<Props extends z.ZodType<any, any, any> = typeof groupProps>
|
|
|
927
928
|
zodProps: Props;
|
|
928
929
|
componentName: string;
|
|
929
930
|
};
|
|
931
|
+
doInitialSourceRender(): void;
|
|
932
|
+
doInitialPcbComponentRender(): void;
|
|
930
933
|
doInitialCreateTraceHintsFromProps(): void;
|
|
931
934
|
_getSimpleRouteJsonFromPcbTraces(): SimpleRouteJson;
|
|
932
935
|
doInitialSourceAddConnectivityMapKey(): void;
|
package/dist/index.js
CHANGED
|
@@ -3588,6 +3588,7 @@ var getSimpleRouteJsonFromTracesAndDb = ({
|
|
|
3588
3588
|
// lib/components/primitive-components/Group/Group.ts
|
|
3589
3589
|
import Debug5 from "debug";
|
|
3590
3590
|
var Group = class extends NormalComponent {
|
|
3591
|
+
subcircuit_id;
|
|
3591
3592
|
_asyncAutoroutingResult = null;
|
|
3592
3593
|
get config() {
|
|
3593
3594
|
return {
|
|
@@ -3595,6 +3596,30 @@ var Group = class extends NormalComponent {
|
|
|
3595
3596
|
componentName: "Group"
|
|
3596
3597
|
};
|
|
3597
3598
|
}
|
|
3599
|
+
doInitialSourceRender() {
|
|
3600
|
+
const { db } = this.root;
|
|
3601
|
+
const source_group = db.source_group.insert({
|
|
3602
|
+
name: this._parsedProps.name
|
|
3603
|
+
// TODO add subcircuit_id
|
|
3604
|
+
});
|
|
3605
|
+
this.subcircuit_id = `subcircuit_${source_group.source_group_id}`;
|
|
3606
|
+
this.source_group_id = source_group.source_group_id;
|
|
3607
|
+
}
|
|
3608
|
+
doInitialPcbComponentRender() {
|
|
3609
|
+
if (this.root?.pcbDisabled) return;
|
|
3610
|
+
const { db } = this.root;
|
|
3611
|
+
const { _parsedProps: props } = this;
|
|
3612
|
+
const pcb_group = db.pcb_group.insert({
|
|
3613
|
+
is_subcircuit: this.isSubcircuit,
|
|
3614
|
+
subcircuit_id: this.subcircuit_id,
|
|
3615
|
+
name: this._parsedProps.name,
|
|
3616
|
+
center: this._getGlobalPcbPositionBeforeLayout(),
|
|
3617
|
+
width: 0,
|
|
3618
|
+
height: 0,
|
|
3619
|
+
pcb_component_ids: [],
|
|
3620
|
+
source_group_id: this.source_group_id
|
|
3621
|
+
});
|
|
3622
|
+
}
|
|
3598
3623
|
doInitialCreateTraceHintsFromProps() {
|
|
3599
3624
|
const { _parsedProps: props } = this;
|
|
3600
3625
|
const { db } = this.root;
|
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.275",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@tscircuit/props": "^0.0.130",
|
|
58
58
|
"@tscircuit/schematic-autolayout": "^0.0.6",
|
|
59
59
|
"@tscircuit/soup-util": "^0.0.41",
|
|
60
|
-
"circuit-json": "^0.0.
|
|
60
|
+
"circuit-json": "^0.0.132",
|
|
61
61
|
"circuit-json-to-connectivity-map": "^0.0.17",
|
|
62
62
|
"format-si-unit": "^0.0.2",
|
|
63
63
|
"nanoid": "^5.0.7",
|