schematic-symbols 0.0.139 → 0.0.141
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 +5 -1
- package/dist/index.js +200 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -331,6 +331,10 @@ declare const _default: {
|
|
331
331
|
height: number;
|
332
332
|
};
|
333
333
|
};
|
334
|
+
VCC_down: undefined;
|
335
|
+
VCC_left: undefined;
|
336
|
+
VCC_right: undefined;
|
337
|
+
VCC_up: undefined;
|
334
338
|
volt_meter_horz: undefined;
|
335
339
|
volt_meter_vert: undefined;
|
336
340
|
watt_hour_meter_horz: undefined;
|
@@ -357,7 +361,7 @@ declare const _default: {
|
|
357
361
|
zener_diode_vert: undefined;
|
358
362
|
};
|
359
363
|
|
360
|
-
type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "backward_diode" | "battery" | "boxresistor" | "boxresistor_small" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_normally_closed_switch" | "dpdt_switch" | "dpst_normally_closed_switch" | "dpst_switch" | "ferrite_bead" | "filled_diode" | "frequency_meter" | "fuse" | "
|
364
|
+
type BaseSymbolName = "ac_voltmeter" | "avalanche_diode" | "backward_diode" | "battery" | "boxresistor" | "boxresistor_small" | "capacitor" | "capacitor_polarized" | "constant_current_diode" | "crystal_4pin" | "crystal" | "darlington_pair_transistor" | "dc_ammeter" | "dc_voltmeter" | "diac" | "diode" | "dpdt_normally_closed_switch" | "dpdt_switch" | "dpst_normally_closed_switch" | "dpst_switch" | "ferrite_bead" | "filled_diode" | "frequency_meter" | "fuse" | "ground" | "ground2" | "gunn_diode" | "icled" | "igbt_transistor" | "illuminated_push_button_normally_open" | "inductor" | "laser_diode" | "led" | "light_dependent_resistor" | "mosfet_depletion_normally_on" | "mushroom_head_normally_open_momentary" | "n_channel_d_mosfet_transistor" | "n_channel_e_mosfet_transistor" | "njfet_transistor" | "npn_bipolar_transistor" | "opamp_no_power" | "opamp_with_power" | "p_channel_d_mosfet_transistor" | "p_channel_e_mosfet_transistor" | "photodiode" | "pjfet_transistor" | "pnp_bipolar_transistor" | "potentiometer" | "potentiometer2" | "potentiometer3" | "power_factor_meter" | "push_button_normally_closed_momentary" | "push_button_normally_open_momentary" | "rectifier_diode" | "resistor" | "resonator" | "schottky_diode" | "silicon_controlled_rectifier" | "solderjumper2_bridged12" | "solderjumper2" | "solderjumper3_bridged12" | "solderjumper3_bridged123" | "solderjumper3_bridged23" | "solderjumper3" | "spdt_normally_closed_switch" | "spdt_switch" | "spst_normally_closed_switch" | "spst_switch" | "step_recovery_diode" | "tachometer" | "tilted_ground" | "triac" | "tunnel_diode" | "unijunction_transistor" | "var_meter" | "varactor_diode" | "varistor" | "varmeter" | "VCC" | "volt_meter" | "watt_hour_meter" | "wattmeter" | "zener_diode";
|
361
365
|
|
362
366
|
/**
|
363
367
|
* Utility for easier autocomplete:
|
package/dist/index.js
CHANGED
@@ -44,10 +44,10 @@ function getBoundsOfPrimitives(primitives) {
|
|
44
44
|
function defineSymbol(symbol5) {
|
45
45
|
let size = symbol5.size;
|
46
46
|
if (!size) {
|
47
|
-
const
|
47
|
+
const bounds72 = getBoundsOfPrimitives(symbol5.primitives);
|
48
48
|
size = {
|
49
|
-
width:
|
50
|
-
height:
|
49
|
+
width: bounds72.maxX - bounds72.minX,
|
50
|
+
height: bounds72.maxY - bounds72.minY
|
51
51
|
};
|
52
52
|
}
|
53
53
|
return { ...symbol5, size };
|
@@ -494,14 +494,14 @@ var rotateRightFacingSymbol = (symbol5, opts) => {
|
|
494
494
|
...applyToPoint(transform2, port)
|
495
495
|
})
|
496
496
|
);
|
497
|
-
const
|
497
|
+
const bounds72 = getBoundsOfPrimitives(rotatedPrimitives);
|
498
498
|
return {
|
499
499
|
primitives: rotatedPrimitives,
|
500
500
|
center,
|
501
501
|
ports: rotatedPorts,
|
502
502
|
size: {
|
503
|
-
width:
|
504
|
-
height:
|
503
|
+
width: bounds72.maxX - bounds72.minX,
|
504
|
+
height: bounds72.maxY - bounds72.minY
|
505
505
|
},
|
506
506
|
...overrides
|
507
507
|
};
|
@@ -902,10 +902,10 @@ var SymbolModifier = class {
|
|
902
902
|
return this;
|
903
903
|
}
|
904
904
|
computeSize() {
|
905
|
-
const
|
905
|
+
const bounds72 = getBoundsOfPrimitives(this.symbol.primitives);
|
906
906
|
return {
|
907
|
-
width:
|
908
|
-
height:
|
907
|
+
width: bounds72.maxX - bounds72.minX,
|
908
|
+
height: bounds72.maxY - bounds72.minY
|
909
909
|
};
|
910
910
|
}
|
911
911
|
build() {
|
@@ -13322,16 +13322,7 @@ var pnp_bipolar_transistor_default = {
|
|
13322
13322
|
centerX: 13877787807814457e-32,
|
13323
13323
|
centerY: 11102230246251565e-32
|
13324
13324
|
},
|
13325
|
-
circles: {
|
13326
|
-
"path1-0": {
|
13327
|
-
type: "circle",
|
13328
|
-
x: 0.13862605550000007,
|
13329
|
-
y: 0.003454799999999203,
|
13330
|
-
radius: 0.28854213,
|
13331
|
-
color: "primary",
|
13332
|
-
fill: false
|
13333
|
-
}
|
13334
|
-
}
|
13325
|
+
circles: {}
|
13335
13326
|
};
|
13336
13327
|
|
13337
13328
|
// symbols/pnp_bipolar_transistor_horz.ts
|
@@ -21069,6 +21060,166 @@ var varmeter_vert_default = {
|
|
21069
21060
|
primitives: [...rotatedSymbol23.primitives, letter5]
|
21070
21061
|
};
|
21071
21062
|
|
21063
|
+
// assets/generated/VCC.json
|
21064
|
+
var VCC_default = {
|
21065
|
+
paths: {
|
21066
|
+
"path28-2": {
|
21067
|
+
type: "path",
|
21068
|
+
points: [
|
21069
|
+
{
|
21070
|
+
x: 0.2804083705,
|
21071
|
+
y: 0.0013661499999990667
|
21072
|
+
},
|
21073
|
+
{
|
21074
|
+
x: 0.012067670500000016,
|
21075
|
+
y: 0.15638615000000122
|
21076
|
+
}
|
21077
|
+
],
|
21078
|
+
color: "primary",
|
21079
|
+
fill: false
|
21080
|
+
},
|
21081
|
+
"path28-2-6": {
|
21082
|
+
type: "path",
|
21083
|
+
points: [
|
21084
|
+
{
|
21085
|
+
x: 0.2805724705000001,
|
21086
|
+
y: -0.001366150000000843
|
21087
|
+
},
|
21088
|
+
{
|
21089
|
+
x: 0.012231770500000572,
|
21090
|
+
y: -0.15638614999999945
|
21091
|
+
}
|
21092
|
+
],
|
21093
|
+
color: "primary",
|
21094
|
+
fill: false
|
21095
|
+
},
|
21096
|
+
"path29-3": {
|
21097
|
+
type: "path",
|
21098
|
+
points: [
|
21099
|
+
{
|
21100
|
+
x: 0.27894777049999986,
|
21101
|
+
y: -11550000001747662e-21
|
21102
|
+
},
|
21103
|
+
{
|
21104
|
+
x: -0.2891629295000002,
|
21105
|
+
y: -11550000001747662e-21
|
21106
|
+
}
|
21107
|
+
],
|
21108
|
+
color: "primary",
|
21109
|
+
fill: false
|
21110
|
+
}
|
21111
|
+
},
|
21112
|
+
texts: {
|
21113
|
+
right1: {
|
21114
|
+
type: "text",
|
21115
|
+
text: "{REF}",
|
21116
|
+
x: 0.3322337704999998,
|
21117
|
+
y: 0.004280050000000202
|
21118
|
+
}
|
21119
|
+
},
|
21120
|
+
refblocks: {
|
21121
|
+
left1: {
|
21122
|
+
x: -0.30407532950000027,
|
21123
|
+
y: 4801499999995684e-19
|
21124
|
+
}
|
21125
|
+
},
|
21126
|
+
bounds: {
|
21127
|
+
minX: -0.33223377050000025,
|
21128
|
+
maxX: 0.3322337704999998,
|
21129
|
+
minY: -0.15638614999999945,
|
21130
|
+
maxY: 0.15638615000000122,
|
21131
|
+
width: 0.664467541,
|
21132
|
+
height: 0.31277230000000067,
|
21133
|
+
centerX: -2220446049250313e-31,
|
21134
|
+
centerY: 8881784197001252e-31
|
21135
|
+
},
|
21136
|
+
circles: {}
|
21137
|
+
};
|
21138
|
+
|
21139
|
+
// symbols/VCC_down.ts
|
21140
|
+
var { paths: paths64, texts: texts80, bounds: bounds64, refblocks: refblocks64, circles: circles58 } = VCC_default;
|
21141
|
+
var VCC_down_default = modifySymbol({
|
21142
|
+
primitives: [
|
21143
|
+
...Object.values(paths64),
|
21144
|
+
...Object.values(circles58),
|
21145
|
+
{
|
21146
|
+
type: "text",
|
21147
|
+
text: "{REF}",
|
21148
|
+
x: 0.33,
|
21149
|
+
y: 0
|
21150
|
+
}
|
21151
|
+
],
|
21152
|
+
ports: [
|
21153
|
+
{ ...refblocks64.left1, labels: ["1"] }
|
21154
|
+
// TODO add more "standard" labels
|
21155
|
+
],
|
21156
|
+
size: { width: bounds64.width, height: bounds64.height },
|
21157
|
+
center: { x: bounds64.centerX, y: bounds64.centerY }
|
21158
|
+
}).rotateRightFacingSymbol("down").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_top").build();
|
21159
|
+
|
21160
|
+
// symbols/VCC_left.ts
|
21161
|
+
var { paths: paths65, texts: texts81, bounds: bounds65, refblocks: refblocks65, circles: circles59 } = VCC_default;
|
21162
|
+
var VCC_left_default = modifySymbol({
|
21163
|
+
primitives: [
|
21164
|
+
...Object.values(paths65),
|
21165
|
+
...Object.values(circles59),
|
21166
|
+
{
|
21167
|
+
type: "text",
|
21168
|
+
text: "{REF}",
|
21169
|
+
x: 0.35,
|
21170
|
+
y: 0
|
21171
|
+
}
|
21172
|
+
],
|
21173
|
+
ports: [
|
21174
|
+
{ ...refblocks65.left1, labels: ["1"] }
|
21175
|
+
// TODO add more "standard" labels
|
21176
|
+
],
|
21177
|
+
size: { width: bounds65.width, height: bounds65.height },
|
21178
|
+
center: { x: bounds65.centerX, y: bounds65.centerY }
|
21179
|
+
}).rotateRightFacingSymbol("left").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_right").build();
|
21180
|
+
|
21181
|
+
// symbols/VCC_right.ts
|
21182
|
+
var { paths: paths66, texts: texts82, bounds: bounds66, refblocks: refblocks66, circles: circles60 } = VCC_default;
|
21183
|
+
var VCC_right_default = modifySymbol({
|
21184
|
+
primitives: [
|
21185
|
+
...Object.values(paths66),
|
21186
|
+
...Object.values(circles60),
|
21187
|
+
{
|
21188
|
+
type: "text",
|
21189
|
+
text: "{REF}",
|
21190
|
+
x: 0.35,
|
21191
|
+
y: 0
|
21192
|
+
}
|
21193
|
+
],
|
21194
|
+
ports: [
|
21195
|
+
{ ...refblocks66.left1, labels: ["1"] }
|
21196
|
+
// TODO add more "standard" labels
|
21197
|
+
],
|
21198
|
+
size: { width: bounds66.width, height: bounds66.height },
|
21199
|
+
center: { x: bounds66.centerX, y: bounds66.centerY }
|
21200
|
+
}).rotateRightFacingSymbol("right").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_left").build();
|
21201
|
+
|
21202
|
+
// symbols/VCC_up.ts
|
21203
|
+
var { paths: paths67, texts: texts83, bounds: bounds67, refblocks: refblocks67, circles: circles61 } = VCC_default;
|
21204
|
+
var VCC_up_default = modifySymbol({
|
21205
|
+
primitives: [
|
21206
|
+
...Object.values(paths67),
|
21207
|
+
...Object.values(circles61),
|
21208
|
+
{
|
21209
|
+
type: "text",
|
21210
|
+
text: "{REF}",
|
21211
|
+
x: 0.33,
|
21212
|
+
y: 0
|
21213
|
+
}
|
21214
|
+
],
|
21215
|
+
ports: [
|
21216
|
+
{ ...refblocks67.left1, labels: ["1"] }
|
21217
|
+
// TODO add more "standard" labels
|
21218
|
+
],
|
21219
|
+
size: { width: bounds67.width, height: bounds67.height },
|
21220
|
+
center: { x: bounds67.centerX, y: bounds67.centerY }
|
21221
|
+
}).rotateRightFacingSymbol("up").labelPort("left", ["1"]).changeTextAnchor("{REF}", "middle_bottom").build();
|
21222
|
+
|
21072
21223
|
// assets/generated/volt_meter.json
|
21073
21224
|
var volt_meter_default = {
|
21074
21225
|
paths: {
|
@@ -21169,7 +21320,7 @@ var volt_meter_default = {
|
|
21169
21320
|
};
|
21170
21321
|
|
21171
21322
|
// symbols/volt_meter_horz.ts
|
21172
|
-
var { paths:
|
21323
|
+
var { paths: paths68, texts: texts84, bounds: bounds68, circles: circles62, refblocks: refblocks68 } = volt_meter_default;
|
21173
21324
|
var volt_meter_horz_default = modifySymbol(volt_meter_default).changeTextAnchor("{VAL}", "middle_top").labelPort("left1", ["1"]).labelPort("right1", ["2"]).changeTextAnchor("{REF}", "middle_bottom").build();
|
21174
21325
|
|
21175
21326
|
// symbols/volt_meter_vert.ts
|
@@ -21262,11 +21413,11 @@ var watt_hour_meter_default = {
|
|
21262
21413
|
};
|
21263
21414
|
|
21264
21415
|
// symbols/watt_hour_meter_horz.ts
|
21265
|
-
var { paths:
|
21416
|
+
var { paths: paths69, texts: texts85, bounds: bounds69, refblocks: refblocks69, circles: circles63 } = watt_hour_meter_default;
|
21266
21417
|
var watt_hour_meter_horz_default = defineSymbol({
|
21267
21418
|
primitives: [
|
21268
|
-
...Object.values(
|
21269
|
-
...Object.values(
|
21419
|
+
...Object.values(paths69),
|
21420
|
+
...Object.values(circles63),
|
21270
21421
|
{
|
21271
21422
|
type: "text",
|
21272
21423
|
text: "{REF}",
|
@@ -21281,16 +21432,16 @@ var watt_hour_meter_horz_default = defineSymbol({
|
|
21281
21432
|
y: 0.35,
|
21282
21433
|
anchor: "middle_bottom"
|
21283
21434
|
},
|
21284
|
-
{ ...
|
21435
|
+
{ ...texts85.left1, anchor: "center", y: 0.01, fontSize: 0.2 }
|
21285
21436
|
],
|
21286
21437
|
ports: [
|
21287
|
-
{ ...
|
21438
|
+
{ ...refblocks69.left1, labels: ["1"] },
|
21288
21439
|
// TODO add more "standard" labels
|
21289
|
-
{ ...
|
21440
|
+
{ ...refblocks69.right1, labels: ["2"] }
|
21290
21441
|
// TODO add more "standard" labels
|
21291
21442
|
],
|
21292
|
-
size: { width:
|
21293
|
-
center: { x:
|
21443
|
+
size: { width: bounds69.width, height: bounds69.height },
|
21444
|
+
center: { x: bounds69.centerX, y: bounds69.centerY }
|
21294
21445
|
});
|
21295
21446
|
|
21296
21447
|
// symbols/watt_hour_meter_vert.ts
|
@@ -21394,11 +21545,11 @@ var wattmeter_default = {
|
|
21394
21545
|
};
|
21395
21546
|
|
21396
21547
|
// symbols/wattmeter_horz.ts
|
21397
|
-
var { paths:
|
21548
|
+
var { paths: paths70, texts: texts86, bounds: bounds70, refblocks: refblocks70, circles: circles64 } = wattmeter_default;
|
21398
21549
|
var wattmeter_horz_default = defineSymbol({
|
21399
21550
|
primitives: [
|
21400
|
-
...Object.values(
|
21401
|
-
...Object.values(
|
21551
|
+
...Object.values(paths70),
|
21552
|
+
...Object.values(circles64),
|
21402
21553
|
{
|
21403
21554
|
type: "text",
|
21404
21555
|
text: "{REF}",
|
@@ -21413,16 +21564,16 @@ var wattmeter_horz_default = defineSymbol({
|
|
21413
21564
|
y: 0.35,
|
21414
21565
|
anchor: "middle_bottom"
|
21415
21566
|
},
|
21416
|
-
{ ...
|
21567
|
+
{ ...texts86.left1, anchor: "center", y: 0.01, fontSize: 0.3 }
|
21417
21568
|
],
|
21418
21569
|
ports: [
|
21419
|
-
{ ...
|
21570
|
+
{ ...refblocks70.left1, labels: ["1"] },
|
21420
21571
|
// TODO add more "standard" labels
|
21421
|
-
{ ...
|
21572
|
+
{ ...refblocks70.right1, labels: ["2"] }
|
21422
21573
|
// TODO add more "standard" labels
|
21423
21574
|
],
|
21424
|
-
size: { width:
|
21425
|
-
center: { x:
|
21575
|
+
size: { width: bounds70.width, height: bounds70.height },
|
21576
|
+
center: { x: bounds70.centerX, y: bounds70.centerY }
|
21426
21577
|
});
|
21427
21578
|
|
21428
21579
|
// symbols/wattmeter_vert.ts
|
@@ -21586,22 +21737,22 @@ var zener_diode_default = {
|
|
21586
21737
|
};
|
21587
21738
|
|
21588
21739
|
// symbols/zener_diode_horz.ts
|
21589
|
-
var { paths:
|
21740
|
+
var { paths: paths71, texts: texts87, bounds: bounds71, refblocks: refblocks71, circles: circles65 } = zener_diode_default;
|
21590
21741
|
var zener_diode_horz_default = defineSymbol({
|
21591
21742
|
primitives: [
|
21592
|
-
...Object.values(
|
21593
|
-
...Object.values(
|
21594
|
-
{ ...
|
21595
|
-
{ ...
|
21743
|
+
...Object.values(paths71),
|
21744
|
+
...Object.values(circles65),
|
21745
|
+
{ ...texts87.top1, anchor: "middle_bottom" },
|
21746
|
+
{ ...texts87.bottom1, anchor: "middle_top" }
|
21596
21747
|
],
|
21597
21748
|
ports: [
|
21598
|
-
{ ...
|
21749
|
+
{ ...refblocks71.left1, labels: ["1"] },
|
21599
21750
|
// TODO add more "standard" labels
|
21600
|
-
{ ...
|
21751
|
+
{ ...refblocks71.right1, labels: ["2"] }
|
21601
21752
|
// TODO add more "standard" labels
|
21602
21753
|
],
|
21603
|
-
size: { width:
|
21604
|
-
center: { x:
|
21754
|
+
size: { width: bounds71.width, height: bounds71.height },
|
21755
|
+
center: { x: bounds71.centerX, y: bounds71.centerY }
|
21605
21756
|
});
|
21606
21757
|
|
21607
21758
|
// symbols/zener_diode_vert.ts
|
@@ -21834,6 +21985,10 @@ var symbols_index_default = {
|
|
21834
21985
|
"varistor_vert": varistor_vert_default,
|
21835
21986
|
"varmeter_horz": varmeter_horz_default,
|
21836
21987
|
"varmeter_vert": varmeter_vert_default,
|
21988
|
+
"VCC_down": VCC_down_default,
|
21989
|
+
"VCC_left": VCC_left_default,
|
21990
|
+
"VCC_right": VCC_right_default,
|
21991
|
+
"VCC_up": VCC_up_default,
|
21837
21992
|
"volt_meter_horz": volt_meter_horz_default,
|
21838
21993
|
"volt_meter_vert": volt_meter_vert_default,
|
21839
21994
|
"watt_hour_meter_horz": watt_hour_meter_horz_default,
|