schematic-symbols 0.0.24 → 0.0.26
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/README.md +13 -4
- package/dist/index.d.ts +9 -1
- package/dist/index.js +657 -104
- package/dist/index.js.map +1 -1
- package/drawing/getSvg.ts +5 -1
- package/drawing/types.ts +3 -0
- package/package.json +10 -6
- package/symbols/capacitor_horz.ts +2 -2
- package/symbols/diode_horz.ts +2 -2
- package/symbols/led_horz.ts +1 -1
- package/symbols/led_vert.ts +19 -1
- package/symbols/photodiode_horz.ts +32 -0
- package/symbols/photodiode_vert.ts +13 -0
- package/symbols/potentiometer2_horz.ts +5 -1
- package/symbols/push_button_normally_closed_momentary_horz.ts +18 -0
- package/symbols/push_button_normally_closed_momentary_vert.ts +23 -0
- package/symbols/volt_meter_horz.ts +31 -0
- package/symbols/volt_meter_vert.ts +4 -0
package/dist/index.js
CHANGED
@@ -195,14 +195,14 @@ var capacitor_default = {
|
|
195
195
|
top1: {
|
196
196
|
type: "text",
|
197
197
|
text: "{REF}",
|
198
|
-
x:
|
199
|
-
y: -0.
|
198
|
+
x: 0,
|
199
|
+
y: -0.36
|
200
200
|
},
|
201
201
|
bottom1: {
|
202
202
|
type: "text",
|
203
203
|
text: "{VAL}",
|
204
|
-
x: 0
|
205
|
-
y: 0.
|
204
|
+
x: 0,
|
205
|
+
y: 0.36
|
206
206
|
}
|
207
207
|
},
|
208
208
|
refblocks: {
|
@@ -232,8 +232,8 @@ var { paths, bounds, refblocks, texts } = capacitor_default;
|
|
232
232
|
var capacitor_horz_default = defineSymbol({
|
233
233
|
primitives: [
|
234
234
|
...Object.values(paths),
|
235
|
-
{ ...texts.top1, anchor: "
|
236
|
-
{ ...texts.bottom1, anchor: "
|
235
|
+
{ ...texts.top1, anchor: "middle_bottom" },
|
236
|
+
{ ...texts.bottom1, anchor: "middle_top" }
|
237
237
|
],
|
238
238
|
ports: [
|
239
239
|
{ ...refblocks.left1, labels: ["1"] },
|
@@ -352,7 +352,7 @@ var diode_default = {
|
|
352
352
|
type: "text",
|
353
353
|
text: "{VAL}",
|
354
354
|
x: -0.0033669500000002017,
|
355
|
-
y: 0.
|
355
|
+
y: 0.22788159999999977
|
356
356
|
}
|
357
357
|
},
|
358
358
|
refblocks: {
|
@@ -382,8 +382,8 @@ var { paths: paths2, texts: texts2, bounds: bounds2, refblocks: refblocks2 } = d
|
|
382
382
|
var diode_horz_default = defineSymbol({
|
383
383
|
primitives: [
|
384
384
|
...Object.values(paths2),
|
385
|
-
{ ...texts2.top1, anchor: "
|
386
|
-
{ ...texts2.bottom1, anchor: "
|
385
|
+
{ ...texts2.top1, anchor: "middle_bottom" },
|
386
|
+
{ ...texts2.bottom1, anchor: "middle_top" }
|
387
387
|
],
|
388
388
|
ports: [
|
389
389
|
{ ...refblocks2.left1, labels: ["1"] },
|
@@ -693,14 +693,14 @@ var led_default = {
|
|
693
693
|
bottom1: {
|
694
694
|
type: "text",
|
695
695
|
text: "{VAL}",
|
696
|
-
x: -0.
|
697
|
-
y: 0.
|
696
|
+
x: -0.13003950000000042,
|
697
|
+
y: 0.3072088499999944
|
698
698
|
},
|
699
699
|
right1: {
|
700
700
|
type: "text",
|
701
701
|
text: "{REF}",
|
702
|
-
x: 0.
|
703
|
-
y: -0.
|
702
|
+
x: 0.15,
|
703
|
+
y: -0.1
|
704
704
|
}
|
705
705
|
},
|
706
706
|
refblocks: {
|
@@ -730,7 +730,7 @@ var { paths: paths4, texts: texts4, bounds: bounds4, refblocks: refblocks4 } = l
|
|
730
730
|
var led_horz_default = defineSymbol({
|
731
731
|
primitives: [
|
732
732
|
...Object.values(paths4),
|
733
|
-
{ ...texts4.bottom1, anchor: "
|
733
|
+
{ ...texts4.bottom1, anchor: "middle_right" },
|
734
734
|
{ ...texts4.right1, anchor: "middle_left" }
|
735
735
|
],
|
736
736
|
ports: [
|
@@ -742,7 +742,20 @@ var led_horz_default = defineSymbol({
|
|
742
742
|
});
|
743
743
|
|
744
744
|
// symbols/led_vert.ts
|
745
|
-
var
|
745
|
+
var rotated = rotateSymbol(led_horz_default);
|
746
|
+
var ref = rotated.primitives.find(
|
747
|
+
(p) => p.type === "text" && p.text === "{REF}"
|
748
|
+
);
|
749
|
+
var val = rotated.primitives.find(
|
750
|
+
(p) => p.type === "text" && p.text === "{VAL}"
|
751
|
+
);
|
752
|
+
ref.anchor = "middle_left";
|
753
|
+
val.anchor = "middle_right";
|
754
|
+
ref.x += 0.1;
|
755
|
+
ref.y += 0.017;
|
756
|
+
val.y = ref.y;
|
757
|
+
val.x = -0.3;
|
758
|
+
var led_vert_default = rotated;
|
746
759
|
|
747
760
|
// assets/generated/mosfet_depletion_normally_on.json
|
748
761
|
var mosfet_depletion_normally_on_default = {
|
@@ -1034,18 +1047,281 @@ var mosfet_depletion_normally_on_horz_default = defineSymbol({
|
|
1034
1047
|
});
|
1035
1048
|
|
1036
1049
|
// symbols/mosfet_depletion_normally_on_vert.ts
|
1037
|
-
var
|
1038
|
-
var
|
1050
|
+
var rotated2 = rotateSymbol(mosfet_depletion_normally_on_horz_default);
|
1051
|
+
var ref2 = rotated2.primitives.find(
|
1039
1052
|
(p) => p.type === "text" && p.text === "{REF}"
|
1040
1053
|
);
|
1041
|
-
var
|
1054
|
+
var val2 = rotated2.primitives.find(
|
1042
1055
|
(p) => p.type === "text" && p.text === "{VAL}"
|
1043
1056
|
);
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
var mosfet_depletion_normally_on_vert_default =
|
1057
|
+
ref2.anchor = "middle_top";
|
1058
|
+
val2.anchor = "middle_top";
|
1059
|
+
ref2.x = val2.x;
|
1060
|
+
val2.y += 0.15;
|
1061
|
+
var mosfet_depletion_normally_on_vert_default = rotated2;
|
1062
|
+
|
1063
|
+
// assets/generated/photodiode.json
|
1064
|
+
var photodiode_default = {
|
1065
|
+
paths: {
|
1066
|
+
path11: {
|
1067
|
+
type: "path",
|
1068
|
+
points: [
|
1069
|
+
{
|
1070
|
+
x: -0.5307178000000009,
|
1071
|
+
y: 0.15879225000000008
|
1072
|
+
},
|
1073
|
+
{
|
1074
|
+
x: -0.15214840000000018,
|
1075
|
+
y: 0.1614152499999999
|
1076
|
+
}
|
1077
|
+
],
|
1078
|
+
color: "primary",
|
1079
|
+
fill: false
|
1080
|
+
},
|
1081
|
+
path40: {
|
1082
|
+
type: "path",
|
1083
|
+
points: [
|
1084
|
+
{
|
1085
|
+
x: 0.12898409999999938,
|
1086
|
+
y: 0.14773104999999975
|
1087
|
+
},
|
1088
|
+
{
|
1089
|
+
x: -0.13559890000000085,
|
1090
|
+
y: 0.28002274999999943
|
1091
|
+
}
|
1092
|
+
],
|
1093
|
+
color: "primary",
|
1094
|
+
fill: false
|
1095
|
+
},
|
1096
|
+
path41: {
|
1097
|
+
type: "path",
|
1098
|
+
points: [
|
1099
|
+
{
|
1100
|
+
x: -0.13559890000000085,
|
1101
|
+
y: 0.015439350000000074
|
1102
|
+
},
|
1103
|
+
{
|
1104
|
+
x: 0.12898409999999938,
|
1105
|
+
y: 0.14773104999999975
|
1106
|
+
}
|
1107
|
+
],
|
1108
|
+
color: "primary",
|
1109
|
+
fill: false
|
1110
|
+
},
|
1111
|
+
path42: {
|
1112
|
+
type: "path",
|
1113
|
+
points: [
|
1114
|
+
{
|
1115
|
+
x: -0.13559890000000085,
|
1116
|
+
y: 0.2800227500000001
|
1117
|
+
},
|
1118
|
+
{
|
1119
|
+
x: -0.13559890000000085,
|
1120
|
+
y: 0.015439350000000074
|
1121
|
+
}
|
1122
|
+
],
|
1123
|
+
color: "primary",
|
1124
|
+
fill: false
|
1125
|
+
},
|
1126
|
+
path43: {
|
1127
|
+
type: "path",
|
1128
|
+
points: [
|
1129
|
+
{
|
1130
|
+
x: 0.12898409999999938,
|
1131
|
+
y: 0.015439350000000074
|
1132
|
+
},
|
1133
|
+
{
|
1134
|
+
x: 0.12898409999999938,
|
1135
|
+
y: 0.2800227500000001
|
1136
|
+
}
|
1137
|
+
],
|
1138
|
+
color: "primary",
|
1139
|
+
fill: false
|
1140
|
+
},
|
1141
|
+
path12: {
|
1142
|
+
type: "path",
|
1143
|
+
points: [
|
1144
|
+
{
|
1145
|
+
x: 0.13259069999999995,
|
1146
|
+
y: 0.14829984999999968
|
1147
|
+
},
|
1148
|
+
{
|
1149
|
+
x: 0.5307178000000006,
|
1150
|
+
y: 0.1587922499999994
|
1151
|
+
}
|
1152
|
+
],
|
1153
|
+
color: "primary",
|
1154
|
+
fill: false
|
1155
|
+
},
|
1156
|
+
"path25-0": {
|
1157
|
+
type: "path",
|
1158
|
+
points: [
|
1159
|
+
{
|
1160
|
+
x: 0.19516320000000031,
|
1161
|
+
y: -0.22938755000000044
|
1162
|
+
},
|
1163
|
+
{
|
1164
|
+
x: 0.15939019999999982,
|
1165
|
+
y: -0.13729605000000022
|
1166
|
+
},
|
1167
|
+
{
|
1168
|
+
x: 0.2571001999999991,
|
1169
|
+
y: -0.1526013500000003
|
1170
|
+
}
|
1171
|
+
],
|
1172
|
+
color: "primary",
|
1173
|
+
fill: true
|
1174
|
+
},
|
1175
|
+
"path78-6": {
|
1176
|
+
type: "path",
|
1177
|
+
points: [
|
1178
|
+
{
|
1179
|
+
x: 0.32731219999999994,
|
1180
|
+
y: -0.2800227500000003
|
1181
|
+
},
|
1182
|
+
{
|
1183
|
+
x: 0.3161811999999997,
|
1184
|
+
y: -0.2700010500000003
|
1185
|
+
},
|
1186
|
+
{
|
1187
|
+
x: 0.20345820000000003,
|
1188
|
+
y: -0.1685088500000005
|
1189
|
+
},
|
1190
|
+
{
|
1191
|
+
x: 0.2024082000000007,
|
1192
|
+
y: -0.16810885000000053
|
1193
|
+
}
|
1194
|
+
],
|
1195
|
+
color: "primary",
|
1196
|
+
fill: false
|
1197
|
+
},
|
1198
|
+
"path25-0-9": {
|
1199
|
+
type: "path",
|
1200
|
+
points: [
|
1201
|
+
{
|
1202
|
+
x: 0.3425051999999993,
|
1203
|
+
y: -0.20294964999999987
|
1204
|
+
},
|
1205
|
+
{
|
1206
|
+
x: 0.306732199999999,
|
1207
|
+
y: -0.11085814999999966
|
1208
|
+
},
|
1209
|
+
{
|
1210
|
+
x: 0.4044417999999992,
|
1211
|
+
y: -0.12616344999999973
|
1212
|
+
}
|
1213
|
+
],
|
1214
|
+
color: "primary",
|
1215
|
+
fill: true
|
1216
|
+
},
|
1217
|
+
"path78-6-5": {
|
1218
|
+
type: "path",
|
1219
|
+
points: [
|
1220
|
+
{
|
1221
|
+
x: 0.4746538,
|
1222
|
+
y: -0.25358484999999975
|
1223
|
+
},
|
1224
|
+
{
|
1225
|
+
x: 0.4635227999999998,
|
1226
|
+
y: -0.24356314999999973
|
1227
|
+
},
|
1228
|
+
{
|
1229
|
+
x: 0.3507997999999999,
|
1230
|
+
y: -0.14207094999999992
|
1231
|
+
},
|
1232
|
+
{
|
1233
|
+
x: 0.34974980000000055,
|
1234
|
+
y: -0.14167095000000018
|
1235
|
+
}
|
1236
|
+
],
|
1237
|
+
color: "primary",
|
1238
|
+
fill: false
|
1239
|
+
}
|
1240
|
+
},
|
1241
|
+
texts: {
|
1242
|
+
top1: {
|
1243
|
+
type: "text",
|
1244
|
+
text: "{REF}",
|
1245
|
+
x: -0.17652089999999987,
|
1246
|
+
y: -0.20318344999999938
|
1247
|
+
},
|
1248
|
+
bottom1: {
|
1249
|
+
type: "text",
|
1250
|
+
text: "{VAL}",
|
1251
|
+
x: -0.00984920000000078,
|
1252
|
+
y: 0.5911418500000005
|
1253
|
+
}
|
1254
|
+
},
|
1255
|
+
refblocks: {
|
1256
|
+
left1: {
|
1257
|
+
x: -0.5446331000000002,
|
1258
|
+
y: 0.15964505000000062
|
1259
|
+
},
|
1260
|
+
right1: {
|
1261
|
+
x: 0.5381637999999995,
|
1262
|
+
y: 0.15864865000000083
|
1263
|
+
}
|
1264
|
+
},
|
1265
|
+
bounds: {
|
1266
|
+
minX: -0.5307178000000009,
|
1267
|
+
maxX: 0.5307178000000006,
|
1268
|
+
minY: -0.2800227500000003,
|
1269
|
+
maxY: 0.2800227500000001,
|
1270
|
+
width: 1.0614356000000016,
|
1271
|
+
height: 1,
|
1272
|
+
centerX: -16653345369377348e-32,
|
1273
|
+
centerY: -11102230246251565e-32
|
1274
|
+
},
|
1275
|
+
circles: {
|
1276
|
+
path1: {
|
1277
|
+
type: "circle",
|
1278
|
+
x: -0.006997300000000539,
|
1279
|
+
y: 0.15166395000000055,
|
1280
|
+
radius: 0.28854213,
|
1281
|
+
color: "primary",
|
1282
|
+
fill: false
|
1283
|
+
}
|
1284
|
+
}
|
1285
|
+
};
|
1286
|
+
|
1287
|
+
// symbols/photodiode_horz.ts
|
1288
|
+
var { paths: paths6, texts: texts6, bounds: bounds6, refblocks: refblocks6, circles } = photodiode_default;
|
1289
|
+
var photodiode_horz_default = defineSymbol({
|
1290
|
+
primitives: [
|
1291
|
+
...Object.values(paths6),
|
1292
|
+
...Object.values(circles),
|
1293
|
+
{
|
1294
|
+
type: "text",
|
1295
|
+
text: "{REF}",
|
1296
|
+
x: -0.15,
|
1297
|
+
y: -0.20318344999999938,
|
1298
|
+
anchor: "middle_right"
|
1299
|
+
},
|
1300
|
+
{
|
1301
|
+
type: "text",
|
1302
|
+
text: "{VAL}",
|
1303
|
+
x: -0.00984920000000078,
|
1304
|
+
y: 0.5,
|
1305
|
+
anchor: "middle_top"
|
1306
|
+
}
|
1307
|
+
],
|
1308
|
+
ports: [
|
1309
|
+
{ ...refblocks6.left1, labels: ["1"] },
|
1310
|
+
// TODO add more "standard" labels
|
1311
|
+
{ ...refblocks6.right1, labels: ["2"] }
|
1312
|
+
// TODO add more "standard" labels
|
1313
|
+
],
|
1314
|
+
size: { width: bounds6.width, height: bounds6.height },
|
1315
|
+
center: { x: bounds6.centerX, y: bounds6.centerY }
|
1316
|
+
});
|
1317
|
+
|
1318
|
+
// symbols/photodiode_vert.ts
|
1319
|
+
var rotatedSymbol = rotateSymbol(photodiode_horz_default);
|
1320
|
+
var texts7 = rotatedSymbol.primitives.filter((p) => p.type === "text");
|
1321
|
+
var ref3 = texts7.find((t) => t.text === "{REF}");
|
1322
|
+
ref3.y = 0;
|
1323
|
+
ref3.anchor = "middle_left";
|
1324
|
+
var photodiode_vert_default = rotatedSymbol;
|
1049
1325
|
|
1050
1326
|
// assets/generated/potentiometer.json
|
1051
1327
|
var potentiometer_default = {
|
@@ -1055,11 +1331,11 @@ var potentiometer_default = {
|
|
1055
1331
|
points: [
|
1056
1332
|
{
|
1057
1333
|
x: -0.5291669499999998,
|
1058
|
-
y: 0.
|
1334
|
+
y: 0.14345965000000027
|
1059
1335
|
},
|
1060
1336
|
{
|
1061
|
-
x: -0.
|
1062
|
-
y: 0.
|
1337
|
+
x: -0.2645836500000003,
|
1338
|
+
y: 0.14345965000000027
|
1063
1339
|
}
|
1064
1340
|
],
|
1065
1341
|
color: "primary",
|
@@ -1069,12 +1345,12 @@ var potentiometer_default = {
|
|
1069
1345
|
type: "path",
|
1070
1346
|
points: [
|
1071
1347
|
{
|
1072
|
-
x: 0.
|
1073
|
-
y: 0.
|
1348
|
+
x: 0.26458334999999944,
|
1349
|
+
y: 0.14345965000000027
|
1074
1350
|
},
|
1075
1351
|
{
|
1076
|
-
x: 0.
|
1077
|
-
y: 0.
|
1352
|
+
x: 0.5291669499999998,
|
1353
|
+
y: 0.14345965000000027
|
1078
1354
|
}
|
1079
1355
|
],
|
1080
1356
|
color: "primary",
|
@@ -1084,28 +1360,28 @@ var potentiometer_default = {
|
|
1084
1360
|
type: "path",
|
1085
1361
|
points: [
|
1086
1362
|
{
|
1087
|
-
x:
|
1088
|
-
y: 0.
|
1363
|
+
x: 12499999997306332e-22,
|
1364
|
+
y: 0.01116785000000009
|
1089
1365
|
},
|
1090
1366
|
{
|
1091
1367
|
x: 0.26458424999999997,
|
1092
|
-
y: 0.
|
1368
|
+
y: 0.01116785000000009
|
1093
1369
|
},
|
1094
1370
|
{
|
1095
1371
|
x: 0.26458424999999997,
|
1096
|
-
y: 0.
|
1372
|
+
y: 0.2757512500000001
|
1097
1373
|
},
|
1098
1374
|
{
|
1099
|
-
x: -0.
|
1100
|
-
y: 0.
|
1375
|
+
x: -0.26458274999999953,
|
1376
|
+
y: 0.2757512500000001
|
1101
1377
|
},
|
1102
1378
|
{
|
1103
|
-
x: -0.
|
1104
|
-
y: 0.
|
1379
|
+
x: -0.26458274999999953,
|
1380
|
+
y: 0.01116785000000009
|
1105
1381
|
},
|
1106
1382
|
{
|
1107
|
-
x:
|
1108
|
-
y: 0.
|
1383
|
+
x: 12500000010629009e-22,
|
1384
|
+
y: 0.01116785000000009
|
1109
1385
|
}
|
1110
1386
|
],
|
1111
1387
|
color: "primary",
|
@@ -1115,7 +1391,7 @@ var potentiometer_default = {
|
|
1115
1391
|
type: "path",
|
1116
1392
|
points: [
|
1117
1393
|
{
|
1118
|
-
x: 0.
|
1394
|
+
x: 0.06517084999999967,
|
1119
1395
|
y: -0.10588935
|
1120
1396
|
},
|
1121
1397
|
{
|
@@ -1123,7 +1399,7 @@ var potentiometer_default = {
|
|
1123
1399
|
y: -0.10588935
|
1124
1400
|
},
|
1125
1401
|
{
|
1126
|
-
x: -
|
1402
|
+
x: -6345000000052003e-20,
|
1127
1403
|
y: 0.00700125000000007
|
1128
1404
|
}
|
1129
1405
|
],
|
@@ -1135,11 +1411,11 @@ var potentiometer_default = {
|
|
1135
1411
|
points: [
|
1136
1412
|
{
|
1137
1413
|
x: 25875000000041837e-20,
|
1138
|
-
y: -0.
|
1414
|
+
y: -0.2757512500000001
|
1139
1415
|
},
|
1140
1416
|
{
|
1141
1417
|
x: 25875000000041837e-20,
|
1142
|
-
y: -0.
|
1418
|
+
y: -0.060545250000000106
|
1143
1419
|
}
|
1144
1420
|
],
|
1145
1421
|
color: "primary",
|
@@ -1151,58 +1427,58 @@ var potentiometer_default = {
|
|
1151
1427
|
type: "text",
|
1152
1428
|
text: "{VAL}",
|
1153
1429
|
x: -0.007583050000000924,
|
1154
|
-
y: 0.
|
1430
|
+
y: 0.4315381500000006
|
1155
1431
|
},
|
1156
1432
|
right1: {
|
1157
1433
|
type: "text",
|
1158
1434
|
text: "{REF}",
|
1159
1435
|
x: 0.12478014999999942,
|
1160
|
-
y: -0.
|
1436
|
+
y: -0.09260654999999884
|
1161
1437
|
}
|
1162
1438
|
},
|
1163
1439
|
refblocks: {
|
1164
1440
|
left1: {
|
1165
1441
|
x: -0.5449899500000002,
|
1166
|
-
y: 0.
|
1442
|
+
y: 0.1443124500000008
|
1167
1443
|
},
|
1168
1444
|
right1: {
|
1169
|
-
x: 0.
|
1445
|
+
x: 0.5378069499999996,
|
1170
1446
|
y: 0.14331605000000103
|
1171
1447
|
}
|
1172
1448
|
},
|
1173
1449
|
bounds: {
|
1174
1450
|
minX: -0.5291669499999998,
|
1175
|
-
maxX: 0.
|
1176
|
-
minY: -0.
|
1177
|
-
maxY: 0.
|
1178
|
-
width: 1.
|
1179
|
-
height: 0.
|
1180
|
-
centerX:
|
1451
|
+
maxX: 0.5291669499999998,
|
1452
|
+
minY: -0.2757512500000001,
|
1453
|
+
maxY: 0.2757512500000001,
|
1454
|
+
width: 1.0583338999999996,
|
1455
|
+
height: 0.5515025000000002,
|
1456
|
+
centerX: 0,
|
1181
1457
|
centerY: 0
|
1182
1458
|
}
|
1183
1459
|
};
|
1184
1460
|
|
1185
1461
|
// symbols/potentiometer_horz.ts
|
1186
|
-
var { paths:
|
1462
|
+
var { paths: paths7, texts: texts8, bounds: bounds7, refblocks: refblocks7 } = potentiometer_default;
|
1187
1463
|
var potentiometer_horz_default = defineSymbol({
|
1188
1464
|
primitives: [
|
1189
|
-
...Object.values(
|
1190
|
-
{ ...
|
1191
|
-
{ ...
|
1465
|
+
...Object.values(paths7),
|
1466
|
+
{ ...texts8.bottom1, y: 0.35, anchor: "middle_top" },
|
1467
|
+
{ ...texts8.right1, anchor: "middle_left" }
|
1192
1468
|
],
|
1193
1469
|
ports: [
|
1194
|
-
{ ...
|
1470
|
+
{ ...refblocks7.left1, labels: ["1"] },
|
1195
1471
|
// TODO add more "standard" labels
|
1196
|
-
{ ...
|
1472
|
+
{ ...refblocks7.right1, labels: ["2"] }
|
1197
1473
|
// TODO add more "standard" labels
|
1198
1474
|
],
|
1199
|
-
size: { width:
|
1200
|
-
center: { x:
|
1475
|
+
size: { width: bounds7.width + 0.05, height: bounds7.height },
|
1476
|
+
center: { x: bounds7.centerX, y: bounds7.centerY }
|
1201
1477
|
});
|
1202
1478
|
|
1203
1479
|
// symbols/potentiometer_vert.ts
|
1204
|
-
var
|
1205
|
-
var potentiometer_vert_default =
|
1480
|
+
var rotated3 = rotateSymbol(potentiometer_horz_default);
|
1481
|
+
var potentiometer_vert_default = rotated3;
|
1206
1482
|
|
1207
1483
|
// assets/generated/potentiometer2.json
|
1208
1484
|
var potentiometer2_default = {
|
@@ -1326,14 +1602,14 @@ var potentiometer2_default = {
|
|
1326
1602
|
top1: {
|
1327
1603
|
type: "text",
|
1328
1604
|
text: "{REF}",
|
1329
|
-
x: 0.
|
1330
|
-
y: -0.
|
1605
|
+
x: -0.02811516999999933,
|
1606
|
+
y: -0.2509376800000009
|
1331
1607
|
},
|
1332
1608
|
bottom1: {
|
1333
1609
|
type: "text",
|
1334
1610
|
text: "{VAL}",
|
1335
|
-
x:
|
1336
|
-
y: 0.
|
1611
|
+
x: 0,
|
1612
|
+
y: 0.25857531999999983
|
1337
1613
|
}
|
1338
1614
|
},
|
1339
1615
|
refblocks: {
|
@@ -1359,22 +1635,160 @@ var potentiometer2_default = {
|
|
1359
1635
|
};
|
1360
1636
|
|
1361
1637
|
// symbols/potentiometer2_horz.ts
|
1362
|
-
var { paths:
|
1638
|
+
var { paths: paths8, texts: texts9, bounds: bounds8, refblocks: refblocks8 } = potentiometer2_default;
|
1363
1639
|
var potentiometer2_horz_default = defineSymbol({
|
1364
|
-
primitives: [
|
1640
|
+
primitives: [
|
1641
|
+
...Object.values(paths8),
|
1642
|
+
{ ...texts9.bottom1, anchor: "middle_right" },
|
1643
|
+
{ ...texts9.top1, anchor: "middle_left" }
|
1644
|
+
],
|
1365
1645
|
ports: [
|
1366
|
-
{ ...
|
1646
|
+
{ ...refblocks8.left1, labels: ["1"] },
|
1367
1647
|
// TODO add more "standard" labels
|
1368
|
-
{ ...
|
1648
|
+
{ ...refblocks8.right1, labels: ["2"] }
|
1369
1649
|
// TODO add more "standard" labels
|
1370
1650
|
],
|
1371
|
-
size: { width:
|
1372
|
-
center: { x:
|
1651
|
+
size: { width: bounds8.width, height: bounds8.height },
|
1652
|
+
center: { x: bounds8.centerX, y: bounds8.centerY }
|
1373
1653
|
});
|
1374
1654
|
|
1375
1655
|
// symbols/potentiometer2_vert.ts
|
1376
1656
|
var potentiometer2_vert_default = rotateSymbol(potentiometer2_horz_default);
|
1377
1657
|
|
1658
|
+
// assets/generated/push_button_normally_closed_momentary.json
|
1659
|
+
var push_button_normally_closed_momentary_default = {
|
1660
|
+
paths: {
|
1661
|
+
"path12-1-8-6-9": {
|
1662
|
+
type: "path",
|
1663
|
+
points: [
|
1664
|
+
{
|
1665
|
+
x: 0.00978914999999958,
|
1666
|
+
y: -0.06036500000000089
|
1667
|
+
},
|
1668
|
+
{
|
1669
|
+
x: 0.00978914999999958,
|
1670
|
+
y: 0.05484799999999801
|
1671
|
+
}
|
1672
|
+
],
|
1673
|
+
color: "primary",
|
1674
|
+
fill: false
|
1675
|
+
},
|
1676
|
+
"path12-1-5-6": {
|
1677
|
+
type: "path",
|
1678
|
+
points: [
|
1679
|
+
{
|
1680
|
+
x: -0.4877753500000006,
|
1681
|
+
y: 0.036569000000000074
|
1682
|
+
},
|
1683
|
+
{
|
1684
|
+
x: -0.17346905000000135,
|
1685
|
+
y: 0.036569000000000074
|
1686
|
+
}
|
1687
|
+
],
|
1688
|
+
color: "primary",
|
1689
|
+
fill: false
|
1690
|
+
},
|
1691
|
+
"path12-1-8-0": {
|
1692
|
+
type: "path",
|
1693
|
+
points: [
|
1694
|
+
{
|
1695
|
+
x: -0.1755235500000003,
|
1696
|
+
y: 0.060364999999999114
|
1697
|
+
},
|
1698
|
+
{
|
1699
|
+
x: 0.19505664999999972,
|
1700
|
+
y: 0.060364999999999114
|
1701
|
+
}
|
1702
|
+
],
|
1703
|
+
color: "primary",
|
1704
|
+
fill: false
|
1705
|
+
},
|
1706
|
+
"path12-1-0": {
|
1707
|
+
type: "path",
|
1708
|
+
points: [
|
1709
|
+
{
|
1710
|
+
x: 0.19513044999999973,
|
1711
|
+
y: 0.0361799999999981
|
1712
|
+
},
|
1713
|
+
{
|
1714
|
+
x: 0.4877753499999997,
|
1715
|
+
y: 0.0361799999999981
|
1716
|
+
}
|
1717
|
+
],
|
1718
|
+
color: "primary",
|
1719
|
+
fill: false
|
1720
|
+
}
|
1721
|
+
},
|
1722
|
+
texts: {
|
1723
|
+
top1: {
|
1724
|
+
type: "text",
|
1725
|
+
text: "{REF}",
|
1726
|
+
x: 0,
|
1727
|
+
y: -0.24084600000000123
|
1728
|
+
},
|
1729
|
+
bottom1: {
|
1730
|
+
type: "text",
|
1731
|
+
text: "{VAL}",
|
1732
|
+
x: 0,
|
1733
|
+
y: 0.2741959999999981
|
1734
|
+
}
|
1735
|
+
},
|
1736
|
+
refblocks: {
|
1737
|
+
left1: {
|
1738
|
+
x: -0.4721668500000007,
|
1739
|
+
y: 0.03654200000000074
|
1740
|
+
},
|
1741
|
+
right1: {
|
1742
|
+
x: 0.47143025000000005,
|
1743
|
+
y: 0.036566999999999794
|
1744
|
+
}
|
1745
|
+
},
|
1746
|
+
bounds: {
|
1747
|
+
minX: -0.4877753500000006,
|
1748
|
+
maxX: 0.4877753499999997,
|
1749
|
+
minY: -0.06036500000000089,
|
1750
|
+
maxY: 0.060364999999999114,
|
1751
|
+
width: 0.9755507000000003,
|
1752
|
+
height: 0.12073,
|
1753
|
+
centerX: -4440892098500626e-31,
|
1754
|
+
centerY: -8881784197001252e-31
|
1755
|
+
}
|
1756
|
+
};
|
1757
|
+
|
1758
|
+
// symbols/push_button_normally_closed_momentary_horz.ts
|
1759
|
+
var { paths: paths9, texts: texts10, bounds: bounds9, refblocks: refblocks9 } = push_button_normally_closed_momentary_default;
|
1760
|
+
var push_button_normally_closed_momentary_horz_default = defineSymbol({
|
1761
|
+
primitives: [
|
1762
|
+
...Object.values(paths9),
|
1763
|
+
{ ...texts10.top1, anchor: "middle_bottom" },
|
1764
|
+
{ ...texts10.bottom1, anchor: "middle_top" }
|
1765
|
+
],
|
1766
|
+
ports: [
|
1767
|
+
{ ...refblocks9.left1, labels: ["1"] },
|
1768
|
+
// TODO add more "standard" labels
|
1769
|
+
{ ...refblocks9.right1, labels: ["2"] }
|
1770
|
+
// TODO add more "standard" labels
|
1771
|
+
],
|
1772
|
+
size: { width: bounds9.width, height: bounds9.height },
|
1773
|
+
center: { x: bounds9.centerX, y: bounds9.centerY }
|
1774
|
+
});
|
1775
|
+
|
1776
|
+
// symbols/push_button_normally_closed_momentary_vert.ts
|
1777
|
+
var rotated4 = rotateSymbol(push_button_normally_closed_momentary_horz_default);
|
1778
|
+
var ref4 = rotated4.primitives.find(
|
1779
|
+
(p) => p.type === "text" && p.text === "{REF}"
|
1780
|
+
);
|
1781
|
+
var val3 = rotated4.primitives.find(
|
1782
|
+
(p) => p.type === "text" && p.text === "{VAL}"
|
1783
|
+
);
|
1784
|
+
ref4.anchor = "middle_left";
|
1785
|
+
val3.anchor = "middle_right";
|
1786
|
+
ref4.x = ref4.x - 0.03;
|
1787
|
+
ref4.y = ref4.y;
|
1788
|
+
val3.x = val3.x;
|
1789
|
+
val3.y = 0;
|
1790
|
+
var push_button_normally_closed_momentary_vert_default = rotated4;
|
1791
|
+
|
1378
1792
|
// assets/generated/push_button_normally_open_momentary.json
|
1379
1793
|
var push_button_normally_open_momentary_default = {
|
1380
1794
|
paths: {
|
@@ -1476,38 +1890,38 @@ var push_button_normally_open_momentary_default = {
|
|
1476
1890
|
};
|
1477
1891
|
|
1478
1892
|
// symbols/push_button_normally_open_momentary_horz.ts
|
1479
|
-
var { paths:
|
1893
|
+
var { paths: paths10, texts: texts11, bounds: bounds10, refblocks: refblocks10 } = push_button_normally_open_momentary_default;
|
1480
1894
|
var push_button_normally_open_momentary_horz_default = defineSymbol({
|
1481
1895
|
primitives: [
|
1482
|
-
...Object.values(
|
1483
|
-
{ ...
|
1484
|
-
{ ...
|
1896
|
+
...Object.values(paths10),
|
1897
|
+
{ ...texts11.top1, anchor: "middle_bottom" },
|
1898
|
+
{ ...texts11.bottom1, anchor: "middle_top" }
|
1485
1899
|
],
|
1486
1900
|
ports: [
|
1487
|
-
{ ...
|
1901
|
+
{ ...refblocks10.left1, labels: ["1"] },
|
1488
1902
|
// TODO add more "standard" labels
|
1489
|
-
{ ...
|
1903
|
+
{ ...refblocks10.right1, labels: ["2"] }
|
1490
1904
|
// TODO add more "standard" labels
|
1491
1905
|
],
|
1492
|
-
size: { width:
|
1493
|
-
center: { x:
|
1906
|
+
size: { width: bounds10.width, height: bounds10.height },
|
1907
|
+
center: { x: bounds10.centerX, y: bounds10.centerY }
|
1494
1908
|
});
|
1495
1909
|
|
1496
1910
|
// symbols/push_button_normally_open_momentary_vert.ts
|
1497
|
-
var
|
1498
|
-
var
|
1911
|
+
var rotated5 = rotateSymbol(push_button_normally_open_momentary_horz_default);
|
1912
|
+
var ref5 = rotated5.primitives.find(
|
1499
1913
|
(p) => p.type === "text" && p.text === "{REF}"
|
1500
1914
|
);
|
1501
|
-
var
|
1915
|
+
var val4 = rotated5.primitives.find(
|
1502
1916
|
(p) => p.type === "text" && p.text === "{VAL}"
|
1503
1917
|
);
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
var push_button_normally_open_momentary_vert_default =
|
1918
|
+
ref5.anchor = "middle_left";
|
1919
|
+
val4.anchor = "middle_right";
|
1920
|
+
ref5.x = ref5.x + 0.1;
|
1921
|
+
ref5.y = ref5.y;
|
1922
|
+
val4.x = val4.x;
|
1923
|
+
val4.y = 0;
|
1924
|
+
var push_button_normally_open_momentary_vert_default = rotated5;
|
1511
1925
|
|
1512
1926
|
// assets/generated/varistor.json
|
1513
1927
|
var varistor_default = {
|
@@ -1608,13 +2022,13 @@ var varistor_default = {
|
|
1608
2022
|
top1: {
|
1609
2023
|
type: "text",
|
1610
2024
|
text: "{REF}",
|
1611
|
-
x:
|
2025
|
+
x: 0,
|
1612
2026
|
y: -0.2470063999999983
|
1613
2027
|
},
|
1614
2028
|
bottom1: {
|
1615
2029
|
type: "text",
|
1616
2030
|
text: "{VAL}",
|
1617
|
-
x: 0
|
2031
|
+
x: 0,
|
1618
2032
|
y: 0.256324600000001
|
1619
2033
|
}
|
1620
2034
|
},
|
@@ -1641,31 +2055,164 @@ var varistor_default = {
|
|
1641
2055
|
};
|
1642
2056
|
|
1643
2057
|
// symbols/varistor_horz.ts
|
1644
|
-
var { paths:
|
2058
|
+
var { paths: paths11, texts: texts12, bounds: bounds11, refblocks: refblocks11 } = varistor_default;
|
1645
2059
|
var varistor_horz_default = defineSymbol({
|
1646
2060
|
primitives: [
|
1647
|
-
...Object.values(
|
1648
|
-
{ ...
|
1649
|
-
{ ...
|
2061
|
+
...Object.values(paths11),
|
2062
|
+
{ ...texts12.top1, anchor: "middle_left" },
|
2063
|
+
{ ...texts12.bottom1, anchor: "middle_right" }
|
1650
2064
|
],
|
1651
2065
|
ports: [
|
1652
2066
|
{
|
1653
|
-
...
|
2067
|
+
...refblocks11.left1,
|
1654
2068
|
labels: ["1", "-"]
|
1655
2069
|
},
|
1656
2070
|
{
|
1657
|
-
...
|
2071
|
+
...refblocks11.right1,
|
1658
2072
|
labels: ["2", "+"]
|
1659
2073
|
}
|
1660
2074
|
],
|
1661
|
-
size: { width:
|
2075
|
+
size: { width: bounds11.width, height: bounds11.height },
|
1662
2076
|
//{ width: 1, height: 0.24 },
|
1663
|
-
center: { x:
|
2077
|
+
center: { x: bounds11.centerX, y: bounds11.centerY }
|
1664
2078
|
});
|
1665
2079
|
|
1666
2080
|
// symbols/varistor_vert.ts
|
1667
2081
|
var varistor_vert_default = rotateSymbol(varistor_horz_default, {});
|
1668
2082
|
|
2083
|
+
// assets/generated/volt_meter.json
|
2084
|
+
var volt_meter_default = {
|
2085
|
+
paths: {
|
2086
|
+
path11: {
|
2087
|
+
type: "path",
|
2088
|
+
points: [
|
2089
|
+
{
|
2090
|
+
x: -0.5307178,
|
2091
|
+
y: 0.002520349999999949
|
2092
|
+
},
|
2093
|
+
{
|
2094
|
+
x: -0.3042887999999997,
|
2095
|
+
y: 0.002520349999999949
|
2096
|
+
}
|
2097
|
+
],
|
2098
|
+
color: "primary",
|
2099
|
+
fill: false
|
2100
|
+
},
|
2101
|
+
"path11-5-5": {
|
2102
|
+
type: "path",
|
2103
|
+
points: [
|
2104
|
+
{
|
2105
|
+
x: 0.09442299999999992,
|
2106
|
+
y: -0.0957435499999999
|
2107
|
+
},
|
2108
|
+
{
|
2109
|
+
x: -0.004364400000000712,
|
2110
|
+
y: 0.0957435499999999
|
2111
|
+
},
|
2112
|
+
{
|
2113
|
+
x: -0.1110211000000012,
|
2114
|
+
y: -0.0957435499999999
|
2115
|
+
}
|
2116
|
+
],
|
2117
|
+
color: "primary",
|
2118
|
+
fill: false
|
2119
|
+
},
|
2120
|
+
path12: {
|
2121
|
+
type: "path",
|
2122
|
+
points: [
|
2123
|
+
{
|
2124
|
+
x: 0.2899773000000003,
|
2125
|
+
y: 0.002520349999999949
|
2126
|
+
},
|
2127
|
+
{
|
2128
|
+
x: 0.5307178000000001,
|
2129
|
+
y: 0.002520349999999949
|
2130
|
+
}
|
2131
|
+
],
|
2132
|
+
color: "primary",
|
2133
|
+
fill: false
|
2134
|
+
}
|
2135
|
+
},
|
2136
|
+
texts: {
|
2137
|
+
top1: {
|
2138
|
+
type: "text",
|
2139
|
+
text: "{REF}",
|
2140
|
+
x: -0.17652089999999898,
|
2141
|
+
y: -0.3594553499999995
|
2142
|
+
},
|
2143
|
+
bottom1: {
|
2144
|
+
type: "text",
|
2145
|
+
text: "{VAL}",
|
2146
|
+
x: -0.009849199999999891,
|
2147
|
+
y: 0.4348699500000004
|
2148
|
+
}
|
2149
|
+
},
|
2150
|
+
refblocks: {
|
2151
|
+
left1: {
|
2152
|
+
x: -0.5446330999999993,
|
2153
|
+
y: 0.003373150000000491
|
2154
|
+
},
|
2155
|
+
right1: {
|
2156
|
+
x: 0.5381638000000004,
|
2157
|
+
y: 0.0023767500000007047
|
2158
|
+
}
|
2159
|
+
},
|
2160
|
+
bounds: {
|
2161
|
+
minX: -0.5307178,
|
2162
|
+
maxX: 0.5307178000000001,
|
2163
|
+
minY: -0.0957435499999999,
|
2164
|
+
maxY: 0.0957435499999999,
|
2165
|
+
width: 1.0614356000000003,
|
2166
|
+
height: 1,
|
2167
|
+
centerX: 5551115123125783e-32,
|
2168
|
+
centerY: 0
|
2169
|
+
},
|
2170
|
+
circles: {
|
2171
|
+
path1: {
|
2172
|
+
type: "circle",
|
2173
|
+
x: -0.006997299999999651,
|
2174
|
+
y: -0.004607949999999583,
|
2175
|
+
radius: 0.28854213,
|
2176
|
+
color: "primary",
|
2177
|
+
fill: false
|
2178
|
+
}
|
2179
|
+
}
|
2180
|
+
};
|
2181
|
+
|
2182
|
+
// symbols/volt_meter_horz.ts
|
2183
|
+
var { paths: paths12, texts: texts13, bounds: bounds12, circles: circles2, refblocks: refblocks12 } = volt_meter_default;
|
2184
|
+
var volt_meter_horz_default = defineSymbol({
|
2185
|
+
primitives: [
|
2186
|
+
...Object.values(paths12),
|
2187
|
+
...Object.values(circles2),
|
2188
|
+
{
|
2189
|
+
type: "text",
|
2190
|
+
text: "{REF}",
|
2191
|
+
x: 0,
|
2192
|
+
y: -0.3594553499999995,
|
2193
|
+
anchor: "middle_bottom"
|
2194
|
+
},
|
2195
|
+
{
|
2196
|
+
type: "text",
|
2197
|
+
text: "{VAL}",
|
2198
|
+
x: 0,
|
2199
|
+
y: 0.35,
|
2200
|
+
anchor: "middle_top"
|
2201
|
+
}
|
2202
|
+
],
|
2203
|
+
ports: [
|
2204
|
+
{ ...refblocks12.left1, labels: ["1"] },
|
2205
|
+
// TODO add more "standard" labels
|
2206
|
+
{ ...refblocks12.right1, labels: ["2"] }
|
2207
|
+
// TODO add more "standard" labels
|
2208
|
+
],
|
2209
|
+
size: { width: bounds12.width, height: bounds12.height },
|
2210
|
+
center: { x: bounds12.centerX, y: bounds12.centerY }
|
2211
|
+
});
|
2212
|
+
|
2213
|
+
// symbols/volt_meter_vert.ts
|
2214
|
+
var volt_meter_vert_default = rotateSymbol(volt_meter_horz_default);
|
2215
|
+
|
1669
2216
|
// generated/symbols-index.ts
|
1670
2217
|
var symbols_index_default = {
|
1671
2218
|
"boxresistor_horz": boxresistor_horz_default,
|
@@ -1680,14 +2227,20 @@ var symbols_index_default = {
|
|
1680
2227
|
"led_vert": led_vert_default,
|
1681
2228
|
"mosfet_depletion_normally_on_horz": mosfet_depletion_normally_on_horz_default,
|
1682
2229
|
"mosfet_depletion_normally_on_vert": mosfet_depletion_normally_on_vert_default,
|
2230
|
+
"photodiode_horz": photodiode_horz_default,
|
2231
|
+
"photodiode_vert": photodiode_vert_default,
|
1683
2232
|
"potentiometer_horz": potentiometer_horz_default,
|
1684
2233
|
"potentiometer_vert": potentiometer_vert_default,
|
1685
2234
|
"potentiometer2_horz": potentiometer2_horz_default,
|
1686
2235
|
"potentiometer2_vert": potentiometer2_vert_default,
|
2236
|
+
"push_button_normally_closed_momentary_horz": push_button_normally_closed_momentary_horz_default,
|
2237
|
+
"push_button_normally_closed_momentary_vert": push_button_normally_closed_momentary_vert_default,
|
1687
2238
|
"push_button_normally_open_momentary_horz": push_button_normally_open_momentary_horz_default,
|
1688
2239
|
"push_button_normally_open_momentary_vert": push_button_normally_open_momentary_vert_default,
|
1689
2240
|
"varistor_horz": varistor_horz_default,
|
1690
|
-
"varistor_vert": varistor_vert_default
|
2241
|
+
"varistor_vert": varistor_vert_default,
|
2242
|
+
"volt_meter_horz": volt_meter_horz_default,
|
2243
|
+
"volt_meter_vert": volt_meter_vert_default
|
1691
2244
|
};
|
1692
2245
|
|
1693
2246
|
// drawing/mapColor.ts
|
@@ -1786,7 +2339,7 @@ function getInnerSvg(symbol, options = {}) {
|
|
1786
2339
|
const textElements = createTextElement(primitive);
|
1787
2340
|
return textElements.text + (debug ? textElements.anchor : "");
|
1788
2341
|
case "circle":
|
1789
|
-
return `<circle cx="${primitive.x}" cy="${primitive.y}" r="${primitive.radius}" fill="${mapColor("
|
2342
|
+
return `<circle cx="${primitive.x}" cy="${primitive.y}" r="${primitive.radius}" fill="${primitive.fill ? mapColor(primitive.color) : "none"}" ${!primitive.fill ? `stroke="${mapColor(primitive.color)}" stroke-width="0.02"` : ""} />`;
|
1790
2343
|
case "box":
|
1791
2344
|
return `<rect x="${primitive.x}" y="${primitive.y}" width="${primitive.width}" height="${primitive.height}" fill="${mapColor("primary")}" />`;
|
1792
2345
|
default:
|