schematic-symbols 0.0.142 → 0.0.144
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 +36 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -913,21 +913,30 @@ var SymbolModifier = class {
|
|
913
913
|
}
|
914
914
|
};
|
915
915
|
var modifySymbol = (symbol5) => {
|
916
|
+
const primitives = symbol5.primitives ?? [
|
917
|
+
...Object.values(symbol5.paths ?? {}),
|
918
|
+
...Object.values(symbol5.texts ?? {}),
|
919
|
+
...Object.values(symbol5.circles ?? {}),
|
920
|
+
...Object.values(symbol5.rects ?? {})
|
921
|
+
];
|
922
|
+
const ports = symbol5.ports ?? Object.entries(symbol5.refblocks).flatMap(([key, refblock]) => {
|
923
|
+
return [{ ...refblock, labels: [key] }];
|
924
|
+
});
|
925
|
+
let center = symbol5.center ?? {
|
926
|
+
x: symbol5.bounds.centerX,
|
927
|
+
y: symbol5.bounds.centerY
|
928
|
+
};
|
929
|
+
if (ports.length === 2) {
|
930
|
+
center = {
|
931
|
+
x: (ports[0].x + ports[1].x) / 2,
|
932
|
+
y: (ports[0].y + ports[1].y) / 2
|
933
|
+
};
|
934
|
+
}
|
916
935
|
return new SymbolModifier({
|
917
936
|
...symbol5,
|
918
|
-
primitives
|
919
|
-
|
920
|
-
|
921
|
-
...Object.values(symbol5.circles ?? {}),
|
922
|
-
...Object.values(symbol5.rects ?? {})
|
923
|
-
],
|
924
|
-
ports: symbol5.ports ?? Object.entries(symbol5.refblocks).flatMap(([key, refblock]) => {
|
925
|
-
return [{ ...refblock, labels: [key] }];
|
926
|
-
}),
|
927
|
-
center: symbol5.center ?? {
|
928
|
-
x: symbol5.bounds.centerX,
|
929
|
-
y: symbol5.bounds.centerY
|
930
|
-
}
|
937
|
+
primitives,
|
938
|
+
ports,
|
939
|
+
center
|
931
940
|
});
|
932
941
|
};
|
933
942
|
|
@@ -7126,15 +7135,15 @@ var icled_default = {
|
|
7126
7135
|
type: "path",
|
7127
7136
|
points: [
|
7128
7137
|
{
|
7129
|
-
x:
|
7138
|
+
x: 0.1557438999999996,
|
7130
7139
|
y: 0.28545279999999806
|
7131
7140
|
},
|
7132
7141
|
{
|
7133
|
-
x:
|
7142
|
+
x: 0.2530861999999994,
|
7134
7143
|
y: 0.3023319999999998
|
7135
7144
|
},
|
7136
7145
|
{
|
7137
|
-
x:
|
7146
|
+
x: 0.21878339999999952,
|
7138
7147
|
y: 0.20956920000000068
|
7139
7148
|
}
|
7140
7149
|
],
|
@@ -7145,19 +7154,19 @@ var icled_default = {
|
|
7145
7154
|
type: "path",
|
7146
7155
|
points: [
|
7147
7156
|
{
|
7148
|
-
x:
|
7157
|
+
x: 0.08000449999999937,
|
7149
7158
|
y: 0.16590799999999817
|
7150
7159
|
},
|
7151
7160
|
{
|
7152
|
-
x:
|
7161
|
+
x: 0.09202799999999911,
|
7153
7162
|
y: 0.1748410000000007
|
7154
7163
|
},
|
7155
7164
|
{
|
7156
|
-
x:
|
7165
|
+
x: 0.2137844999999996,
|
7157
7166
|
y: 0.26529680000000155
|
7158
7167
|
},
|
7159
7168
|
{
|
7160
|
-
x:
|
7169
|
+
x: 0.2144144999999993,
|
7161
7170
|
y: 0.2662468000000011
|
7162
7171
|
}
|
7163
7172
|
],
|
@@ -7168,15 +7177,15 @@ var icled_default = {
|
|
7168
7177
|
type: "path",
|
7169
7178
|
points: [
|
7170
7179
|
{
|
7171
|
-
x: 0.021722400000000697,
|
7180
|
+
x: -0.021722400000000697,
|
7172
7181
|
y: 0.30658939999999646
|
7173
7182
|
},
|
7174
7183
|
{
|
7175
|
-
x:
|
7184
|
+
x: 0.07561989999999952,
|
7176
7185
|
y: 0.3234685999999982
|
7177
7186
|
},
|
7178
7187
|
{
|
7179
|
-
x:
|
7188
|
+
x: 0.04131709999999922,
|
7180
7189
|
y: 0.23070579999999907
|
7181
7190
|
}
|
7182
7191
|
],
|
@@ -7187,19 +7196,19 @@ var icled_default = {
|
|
7187
7196
|
type: "path",
|
7188
7197
|
points: [
|
7189
7198
|
{
|
7190
|
-
x: 0.09746180000000093,
|
7199
|
+
x: -0.09746180000000093,
|
7191
7200
|
y: 0.18704459999999656
|
7192
7201
|
},
|
7193
7202
|
{
|
7194
|
-
x: 0.08543830000000074,
|
7203
|
+
x: -0.08543830000000074,
|
7195
7204
|
y: 0.19597759999999909
|
7196
7205
|
},
|
7197
7206
|
{
|
7198
|
-
x:
|
7207
|
+
x: 0.0363181999999993,
|
7199
7208
|
y: 0.28643339999999995
|
7200
7209
|
},
|
7201
7210
|
{
|
7202
|
-
x:
|
7211
|
+
x: 0.03694819999999943,
|
7203
7212
|
y: 0.2873833999999995
|
7204
7213
|
}
|
7205
7214
|
],
|