schematic-symbols 0.0.121 → 0.0.122

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. package/package.json +2 -5
  2. package/drawing/arc.ts +0 -31
  3. package/drawing/arrow.ts +0 -41
  4. package/drawing/box.ts +0 -5
  5. package/drawing/circle.ts +0 -7
  6. package/drawing/cubicBezierCurveArc.ts +0 -28
  7. package/drawing/defineSymbol.ts +0 -16
  8. package/drawing/getSvg.ts +0 -199
  9. package/drawing/index.ts +0 -10
  10. package/drawing/mapColor.ts +0 -10
  11. package/drawing/modify-symbol/modify-symbol.ts +0 -97
  12. package/drawing/ninePointAnchorToSvgAnchor.ts +0 -11
  13. package/drawing/path.ts +0 -5
  14. package/drawing/pathToSvgD.ts +0 -22
  15. package/drawing/resizeSymbol.ts +0 -67
  16. package/drawing/rotateSymbol.ts +0 -324
  17. package/drawing/svgPathToPoints.ts +0 -109
  18. package/drawing/text.ts +0 -8
  19. package/drawing/typeguards.ts +0 -155
  20. package/drawing/types.ts +0 -93
  21. package/drawing/utils/getBoundsOfPrimitives.ts +0 -51
  22. package/drawing/utils/makeYUpPositive.ts +0 -46
  23. package/index.ts +0 -24
  24. package/symbols/SPDT_switch_horz.ts +0 -22
  25. package/symbols/SPDT_switch_vert.ts +0 -20
  26. package/symbols/SPST_switch_horz.ts +0 -12
  27. package/symbols/SPST_switch_vert.ts +0 -20
  28. package/symbols/ac_voltmeter_horz.ts +0 -31
  29. package/symbols/ac_voltmeter_vert.ts +0 -8
  30. package/symbols/avalanche_diode_horz.ts +0 -19
  31. package/symbols/avalanche_diode_vert.ts +0 -10
  32. package/symbols/battery_horz.ts +0 -20
  33. package/symbols/battery_vert.ts +0 -6
  34. package/symbols/boxresistor_down.ts +0 -33
  35. package/symbols/boxresistor_left.ts +0 -33
  36. package/symbols/boxresistor_right.ts +0 -33
  37. package/symbols/boxresistor_up.ts +0 -33
  38. package/symbols/capacitor_down.ts +0 -34
  39. package/symbols/capacitor_left.ts +0 -11
  40. package/symbols/capacitor_polarized_down.ts +0 -34
  41. package/symbols/capacitor_polarized_left.ts +0 -10
  42. package/symbols/capacitor_polarized_right.ts +0 -10
  43. package/symbols/capacitor_polarized_up.ts +0 -34
  44. package/symbols/capacitor_right.ts +0 -10
  45. package/symbols/capacitor_up.ts +0 -34
  46. package/symbols/constant_current_diode_horz.ts +0 -9
  47. package/symbols/constant_current_diode_vert.ts +0 -11
  48. package/symbols/crystal_4pin_horz.ts +0 -11
  49. package/symbols/crystal_4pin_vert.ts +0 -10
  50. package/symbols/crystal_horz.ts +0 -9
  51. package/symbols/crystal_vert.ts +0 -10
  52. package/symbols/darlington_pair_transistor_horz.ts +0 -10
  53. package/symbols/darlington_pair_transistor_vert.ts +0 -12
  54. package/symbols/dc_ammeter_horz.ts +0 -32
  55. package/symbols/dc_ammeter_vert.ts +0 -51
  56. package/symbols/dc_voltmeter_horz.ts +0 -31
  57. package/symbols/dc_voltmeter_vert.ts +0 -19
  58. package/symbols/diac_horz.ts +0 -9
  59. package/symbols/diac_vert.ts +0 -16
  60. package/symbols/diode_down.ts +0 -4
  61. package/symbols/diode_left.ts +0 -4
  62. package/symbols/diode_right.ts +0 -9
  63. package/symbols/diode_up.ts +0 -4
  64. package/symbols/dpdt_normally_closed_switch_down.ts +0 -22
  65. package/symbols/dpdt_normally_closed_switch_left.ts +0 -23
  66. package/symbols/dpdt_normally_closed_switch_right.ts +0 -13
  67. package/symbols/dpdt_normally_closed_switch_up.ts +0 -22
  68. package/symbols/dpdt_switch_down.ts +0 -22
  69. package/symbols/dpdt_switch_left.ts +0 -23
  70. package/symbols/dpdt_switch_right.ts +0 -13
  71. package/symbols/dpdt_switch_up.ts +0 -22
  72. package/symbols/dpst_normally_closed_switch_down.ts +0 -22
  73. package/symbols/dpst_normally_closed_switch_left.ts +0 -23
  74. package/symbols/dpst_normally_closed_switch_right.ts +0 -11
  75. package/symbols/dpst_normally_closed_switch_up.ts +0 -22
  76. package/symbols/dpst_switch_down.ts +0 -21
  77. package/symbols/dpst_switch_left.ts +0 -23
  78. package/symbols/dpst_switch_right.ts +0 -11
  79. package/symbols/dpst_switch_up.ts +0 -22
  80. package/symbols/filled_diode_horz.ts +0 -9
  81. package/symbols/filled_diode_vert.ts +0 -4
  82. package/symbols/frequency_meter_horz.ts +0 -32
  83. package/symbols/frequency_meter_vert.ts +0 -19
  84. package/symbols/fuse_horz.ts +0 -24
  85. package/symbols/fuse_vert.ts +0 -4
  86. package/symbols/ground_horz.ts +0 -37
  87. package/symbols/ground_vert.ts +0 -4
  88. package/symbols/gunn_diode_horz.ts +0 -11
  89. package/symbols/gunn_diode_vert.ts +0 -11
  90. package/symbols/icled_down.ts +0 -4
  91. package/symbols/icled_left.ts +0 -4
  92. package/symbols/icled_right.ts +0 -11
  93. package/symbols/icled_up.ts +0 -27
  94. package/symbols/igbt_transistor_horz.ts +0 -10
  95. package/symbols/igbt_transistor_vert.ts +0 -21
  96. package/symbols/illuminated_push_button_normally_open_horz.ts +0 -9
  97. package/symbols/illuminated_push_button_normally_open_vert.ts +0 -20
  98. package/symbols/inductor_down.ts +0 -4
  99. package/symbols/inductor_left.ts +0 -4
  100. package/symbols/inductor_right.ts +0 -20
  101. package/symbols/inductor_up.ts +0 -4
  102. package/symbols/laser_diode_horz.ts +0 -10
  103. package/symbols/laser_diode_vert.ts +0 -13
  104. package/symbols/led_down.ts +0 -4
  105. package/symbols/led_left.ts +0 -4
  106. package/symbols/led_right.ts +0 -20
  107. package/symbols/led_up.ts +0 -27
  108. package/symbols/light_dependent_resistor_horz.ts +0 -20
  109. package/symbols/light_dependent_resistor_vert.ts +0 -20
  110. package/symbols/mosfet_depletion_normally_on_horz.ts +0 -19
  111. package/symbols/mosfet_depletion_normally_on_vert.ts +0 -21
  112. package/symbols/mushroom_head_normally_open_momentary_horz.ts +0 -20
  113. package/symbols/mushroom_head_normally_open_momentary_vert.ts +0 -23
  114. package/symbols/n_channel_d_mosfet_transistor_horz.ts +0 -20
  115. package/symbols/n_channel_d_mosfet_transistor_vert.ts +0 -20
  116. package/symbols/n_channel_e_mosfet_transistor_horz.ts +0 -21
  117. package/symbols/n_channel_e_mosfet_transistor_vert.ts +0 -20
  118. package/symbols/njfet_transistor_horz.ts +0 -20
  119. package/symbols/njfet_transistor_vert.ts +0 -20
  120. package/symbols/npn_bipolar_transistor_horz.ts +0 -11
  121. package/symbols/npn_bipolar_transistor_vert.ts +0 -21
  122. package/symbols/opamp_no_power_down.ts +0 -4
  123. package/symbols/opamp_no_power_left.ts +0 -4
  124. package/symbols/opamp_no_power_right.ts +0 -10
  125. package/symbols/opamp_no_power_up.ts +0 -4
  126. package/symbols/opamp_with_power_down.ts +0 -4
  127. package/symbols/opamp_with_power_left.ts +0 -4
  128. package/symbols/opamp_with_power_right.ts +0 -12
  129. package/symbols/opamp_with_power_up.ts +0 -4
  130. package/symbols/p_channel_d_mosfet_transistor_horz.ts +0 -20
  131. package/symbols/p_channel_d_mosfet_transistor_vert.ts +0 -20
  132. package/symbols/p_channel_e_mosfet_transistor_horz.ts +0 -20
  133. package/symbols/p_channel_e_mosfet_transistor_vert.ts +0 -20
  134. package/symbols/photodiode_horz.ts +0 -9
  135. package/symbols/photodiode_vert.ts +0 -13
  136. package/symbols/pjfet_transistor_horz.ts +0 -20
  137. package/symbols/pjfet_transistor_vert.ts +0 -20
  138. package/symbols/pnp_bipolar_transistor_horz.ts +0 -10
  139. package/symbols/pnp_bipolar_transistor_vert.ts +0 -20
  140. package/symbols/potentiometer2_horz.ts +0 -18
  141. package/symbols/potentiometer2_vert.ts +0 -14
  142. package/symbols/potentiometer3_down.ts +0 -4
  143. package/symbols/potentiometer3_left.ts +0 -4
  144. package/symbols/potentiometer3_right.ts +0 -10
  145. package/symbols/potentiometer3_up.ts +0 -4
  146. package/symbols/potentiometer_horz.ts +0 -18
  147. package/symbols/potentiometer_vert.ts +0 -6
  148. package/symbols/power_factor_meter_horz.ts +0 -42
  149. package/symbols/power_factor_meter_vert.ts +0 -19
  150. package/symbols/push_button_normally_closed_momentary_horz.ts +0 -20
  151. package/symbols/push_button_normally_closed_momentary_vert.ts +0 -4
  152. package/symbols/push_button_normally_open_momentary_horz.ts +0 -20
  153. package/symbols/push_button_normally_open_momentary_vert.ts +0 -4
  154. package/symbols/rectifier_diode_horz.ts +0 -21
  155. package/symbols/rectifier_diode_vert.ts +0 -17
  156. package/symbols/resonator_horz.ts +0 -34
  157. package/symbols/resonator_vert.ts +0 -4
  158. package/symbols/schottky_diode_horz.ts +0 -10
  159. package/symbols/schottky_diode_vert.ts +0 -18
  160. package/symbols/silicon_controlled_rectifier_horz.ts +0 -13
  161. package/symbols/silicon_controlled_rectifier_vert.ts +0 -15
  162. package/symbols/spdt_normally_closed_switch_down.ts +0 -22
  163. package/symbols/spdt_normally_closed_switch_left.ts +0 -22
  164. package/symbols/spdt_normally_closed_switch_right.ts +0 -10
  165. package/symbols/spdt_normally_closed_switch_up.ts +0 -22
  166. package/symbols/spst_normally_closed_switch_down.ts +0 -22
  167. package/symbols/spst_normally_closed_switch_left.ts +0 -22
  168. package/symbols/spst_normally_closed_switch_right.ts +0 -12
  169. package/symbols/spst_normally_closed_switch_up.ts +0 -22
  170. package/symbols/step_recovery_diode_horz.ts +0 -11
  171. package/symbols/step_recovery_diode_vert.ts +0 -4
  172. package/symbols/tachometer_horz.ts +0 -32
  173. package/symbols/tachometer_vert.ts +0 -19
  174. package/symbols/triac_horz.ts +0 -13
  175. package/symbols/triac_vert.ts +0 -16
  176. package/symbols/tunnel_diode_horz.ts +0 -19
  177. package/symbols/tunnel_diode_vert.ts +0 -18
  178. package/symbols/unijunction_transistor_horz.ts +0 -20
  179. package/symbols/unijunction_transistor_vert.ts +0 -19
  180. package/symbols/var_meter_horz.ts +0 -30
  181. package/symbols/var_meter_vert.ts +0 -4
  182. package/symbols/varactor_diode_horz.ts +0 -19
  183. package/symbols/varactor_diode_vert.ts +0 -18
  184. package/symbols/varistor_horz.ts +0 -24
  185. package/symbols/varistor_vert.ts +0 -4
  186. package/symbols/varmeter_horz.ts +0 -32
  187. package/symbols/varmeter_vert.ts +0 -19
  188. package/symbols/volt_meter_horz.ts +0 -10
  189. package/symbols/volt_meter_vert.ts +0 -4
  190. package/symbols/watt_hour_meter_horz.ts +0 -32
  191. package/symbols/watt_hour_meter_vert.ts +0 -19
  192. package/symbols/wattmeter_horz.ts +0 -32
  193. package/symbols/wattmeter_vert.ts +0 -19
  194. package/symbols/zener_diode_horz.ts +0 -19
  195. package/symbols/zener_diode_vert.ts +0 -17
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import opamp_no_power_right from "./opamp_no_power_right"
3
-
4
- export default rotateSymbol(opamp_no_power_right, "left")
@@ -1,10 +0,0 @@
1
- import svgJson from "assets/generated/opamp_no_power.json"
2
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
-
4
- export default modifySymbol(svgJson)
5
- .labelPort("left1", ["1", "inp1"])
6
- .labelPort("left2", ["2", "inp2"])
7
- .labelPort("right1", ["3", "out"])
8
- .changeTextAnchor("{REF}", "middle_bottom")
9
- .changeTextAnchor("{VAL}", "middle_top")
10
- .build()
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import opamp_no_power_right from "./opamp_no_power_right"
3
-
4
- export default rotateSymbol(opamp_no_power_right, "up")
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import opamp_with_power_right from "./opamp_with_power_right"
3
-
4
- export default rotateSymbol(opamp_with_power_right, "down")
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import opamp_with_power_right from "./opamp_with_power_right"
3
-
4
- export default rotateSymbol(opamp_with_power_right, "left")
@@ -1,12 +0,0 @@
1
- import svgJson from "assets/generated/opamp_with_power.json"
2
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
-
4
- export default modifySymbol(svgJson)
5
- .labelPort("left1", ["1", "inp1"])
6
- .labelPort("left2", ["2", "inp2"])
7
- .labelPort("right1", ["3", "out"])
8
- .labelPort("top2", ["4", "V+"])
9
- .labelPort("bottom1", ["5", "V-"])
10
- .changeTextAnchor("{REF}", "middle_bottom")
11
- .changeTextAnchor("{VAL}", "middle_top")
12
- .build()
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import opamp_with_power_right from "./opamp_with_power_right"
3
-
4
- export default rotateSymbol(opamp_with_power_right, "up")
@@ -1,20 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/p_channel_d_mosfet_transistor.json"
3
-
4
- const { paths, texts, bounds, refblocks, circles } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- ...Object.values(circles),
10
- { ...texts.top1, anchor: "middle_right", x: 0 },
11
- { ...texts.bottom1, anchor: "middle_right", x: 0 },
12
- ] as any,
13
- ports: [
14
- { ...refblocks.top1, labels: ["1", "drain"] }, // TODO add more "standard" labels
15
- { ...refblocks.bottom1, labels: ["2", "source"] }, // TODO add more "standard" labels
16
- { ...refblocks.left1, labels: ["3", "gate"] }, // TODO add more "standard" labels
17
- ],
18
- size: { width: bounds.width, height: bounds.height },
19
- center: { x: bounds.centerX, y: bounds.centerY },
20
- })
@@ -1,20 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import p_channel_d_mosfet_transistor_horz from "./p_channel_d_mosfet_transistor_horz"
3
-
4
- const rotatedSymbol = rotateSymbol(p_channel_d_mosfet_transistor_horz)
5
-
6
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")!
7
-
8
- const val = texts.find((t) => t.text === "{VAL}")!
9
-
10
- val.x = -0.35
11
- val.y = 0
12
- val.anchor = "middle_right"
13
-
14
- const ref = texts.find((t) => t.text === "{REF}")!
15
-
16
- ref.y = 0
17
- ref.x = 0.35
18
- ref.anchor = "middle_left"
19
-
20
- export default rotatedSymbol
@@ -1,20 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/p_channel_e_mosfet_transistor.json"
3
-
4
- const { paths, texts, bounds, refblocks, circles } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- ...Object.values(circles),
10
- { ...texts.top1, anchor: "middle_right", x: 0 },
11
- { ...texts.bottom1, anchor: "middle_right", x: 0 },
12
- ] as any,
13
- ports: [
14
- { ...refblocks.top1, labels: ["1", "drain"] }, // TODO add more "standard" labels
15
- { ...refblocks.bottom1, labels: ["2", "source"] }, // TODO add more "standard" labels
16
- { ...refblocks.left1, labels: ["3", "gate"] }, // TODO add more "standard" labels
17
- ],
18
- size: { width: bounds.width, height: bounds.height },
19
- center: { x: bounds.centerX, y: bounds.centerY },
20
- })
@@ -1,20 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import p_channel_e_mosfet_transistor_horz from "./p_channel_e_mosfet_transistor_horz"
3
-
4
- const rotatedSymbol = rotateSymbol(p_channel_e_mosfet_transistor_horz)
5
-
6
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")!
7
-
8
- const val = texts.find((t) => t.text === "{VAL}")!
9
-
10
- val.x = -0.35
11
- val.y = 0
12
- val.anchor = "middle_right"
13
-
14
- const ref = texts.find((t) => t.text === "{REF}")!
15
-
16
- ref.y = 0
17
- ref.x = 0.35
18
- ref.anchor = "middle_left"
19
-
20
- export default rotatedSymbol
@@ -1,9 +0,0 @@
1
- import svgJson from "assets/generated/photodiode.json"
2
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
-
4
- export default modifySymbol(svgJson)
5
- .changeTextAnchor("{VAL}", "middle_top")
6
- .labelPort("left1", ["1"])
7
- .labelPort("right1", ["2"])
8
- .changeTextAnchor("{REF}", "middle_bottom")
9
- .build()
@@ -1,13 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import photodiode_horz from "./photodiode_horz"
3
-
4
- const rotatedSymbol = rotateSymbol(photodiode_horz)
5
-
6
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")
7
-
8
- const ref = texts.find((t) => t.text === "{REF}")!
9
-
10
- ref.y = 0
11
- ref.anchor = "middle_left"
12
-
13
- export default rotatedSymbol
@@ -1,20 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/pjfet_transistor.json"
3
-
4
- const { paths, texts, bounds, refblocks, circles } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- ...Object.values(circles),
10
- { ...texts.top1, anchor: "middle_right", x: 0 },
11
- { ...texts.bottom1, anchor: "middle_right" },
12
- ] as any,
13
- ports: [
14
- { ...refblocks.top1, labels: ["1", "drain"] }, // TODO add more "standard" labels
15
- { ...refblocks.bottom1, labels: ["2", "source"] }, // TODO add more "standard" labels
16
- { ...refblocks.left1, labels: ["3", "gate"] }, // TODO add more "standard" labels
17
- ],
18
- size: { width: bounds.width, height: bounds.height },
19
- center: { x: bounds.centerX, y: bounds.centerY },
20
- })
@@ -1,20 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import pjfet_transistor_horz from "./pjfet_transistor_horz"
3
-
4
- const rotatedSymbol = rotateSymbol(pjfet_transistor_horz)
5
-
6
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")!
7
-
8
- const val = texts.find((t) => t.text === "{VAL}")!
9
-
10
- val.x = -0.35
11
- val.y = 0
12
- val.anchor = "middle_right"
13
-
14
- const ref = texts.find((t) => t.text === "{REF}")!
15
-
16
- ref.y = 0
17
- ref.x = 0.35
18
- ref.anchor = "middle_left"
19
-
20
- export default rotatedSymbol
@@ -1,10 +0,0 @@
1
- import svgJson from "assets/generated/pnp_bipolar_transistor.json"
2
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
-
4
- export default modifySymbol(svgJson)
5
- .changeTextAnchor("{VAL}", "middle_right")
6
- .labelPort("left1", ["3"])
7
- .labelPort("bottom1", ["2"])
8
- .labelPort("top1", ["1"])
9
- .changeTextAnchor("{REF}", "middle_right")
10
- .build()
@@ -1,20 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import pnp_bipolar_transistor_horz from "./pnp_bipolar_transistor_horz"
3
- import svgJson from "assets/generated/pnp_bipolar_transistor.json"
4
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
5
-
6
- const rotatedSymbol = rotateSymbol(pnp_bipolar_transistor_horz)
7
-
8
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")
9
-
10
- const ref = texts.find((t) => t.text === "{REF}")!
11
-
12
- ref.anchor = "middle_left"
13
- export default modifySymbol(svgJson)
14
- .rotateRightFacingSymbol("down")
15
- .changeTextAnchor("{VAL}", "middle_right")
16
- .labelPort("left1", ["3"])
17
- .labelPort("bottom1", ["2"])
18
- .labelPort("top1", ["1"])
19
- .changeTextAnchor("{REF}", "middle_left")
20
- .build()
@@ -1,18 +0,0 @@
1
- import svgJson from "assets/generated/potentiometer2.json"
2
- import { defineSymbol } from "drawing/defineSymbol"
3
-
4
- const { paths, texts, bounds, refblocks } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- { ...texts.bottom1, anchor: "middle_top" },
10
- { ...texts.top1, anchor: "middle_bottom" },
11
- ] as any,
12
- ports: [
13
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
14
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
15
- ],
16
- size: { width: bounds.width, height: bounds.height },
17
- center: { x: bounds.centerX, y: bounds.centerY },
18
- })
@@ -1,14 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import potentiometer2_horz from "./potentiometer2_horz"
3
-
4
- const rotated = rotateSymbol(potentiometer2_horz)
5
-
6
- const texts = rotated.primitives.filter((p) => p.type === "text")!
7
-
8
- const val = texts.find((t) => t.text === "{VAL}")!
9
- val.anchor = "middle_right"
10
-
11
- const ref = texts.find((t) => t.text === "{REF}")!
12
- ref.anchor = "middle_left"
13
-
14
- export default rotated
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import potentiometer3_right from "./potentiometer3_right"
3
-
4
- export default rotateSymbol(potentiometer3_right, "down")
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import potentiometer3_right from "./potentiometer3_right"
3
-
4
- export default rotateSymbol(potentiometer3_right, "left")
@@ -1,10 +0,0 @@
1
- import svgJson from "assets/generated/potentiometer3.json"
2
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
3
-
4
- export default modifySymbol(svgJson)
5
- .labelPort("left", ["1"])
6
- .labelPort("right", ["3"])
7
- .labelPort("bottom", ["2"])
8
- .changeTextAnchor("{REF}", "middle_bottom")
9
- .changeTextAnchor("{VAL}", "middle_top")
10
- .build()
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import potentiometer3_right from "./potentiometer3_right"
3
-
4
- export default rotateSymbol(potentiometer3_right, "up")
@@ -1,18 +0,0 @@
1
- import svgJson from "assets/generated/potentiometer.json"
2
- import { defineSymbol } from "drawing/defineSymbol"
3
-
4
- const { paths, texts, bounds, refblocks } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- { ...texts.bottom1, y: 0.35, anchor: "middle_top" },
10
- { ...texts.top1, anchor: "middle_left" },
11
- ] as any,
12
- ports: [
13
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
14
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
15
- ],
16
- size: { width: bounds.width + 0.05, height: bounds.height },
17
- center: { x: bounds.centerX, y: bounds.centerY },
18
- })
@@ -1,6 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import potentiometer_horz from "./potentiometer_horz"
3
-
4
- const rotated = rotateSymbol(potentiometer_horz)
5
-
6
- export default rotated
@@ -1,42 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/power_factor_meter.json"
3
- import { ninePointAnchorToSvgAnchor } from "drawing/ninePointAnchorToSvgAnchor"
4
-
5
- const { paths, texts, bounds, refblocks, circles } = svgJson
6
-
7
- export default defineSymbol({
8
- primitives: [
9
- ...Object.values(paths),
10
- ...Object.values(circles),
11
- // { ...texts.top1, anchor: "middle_left" },
12
- {
13
- type: "text",
14
- text: "{REF}",
15
- x: -0.15,
16
- y: -0.42330070000000064,
17
- anchor: "middle_top",
18
- },
19
- // { ...texts.bottom1, anchor: "middle_left" },
20
- {
21
- type: "text",
22
- text: "{VAL}",
23
- x: -0.15,
24
- y: 0.42330070000000064,
25
- anchor: "middle_bottom",
26
- },
27
- // { ...texts.left1, anchor: "middle_left" },
28
- {
29
- type: "text",
30
- text: "COS φ",
31
- x: 0,
32
- y: 0.014279000000000375,
33
- anchor: "center",
34
- },
35
- ] as any,
36
- ports: [
37
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
38
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
39
- ],
40
- size: { width: bounds.width, height: bounds.height },
41
- center: { x: bounds.centerX, y: bounds.centerY },
42
- })
@@ -1,19 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import power_factor_meter_horz from "./power_factor_meter_horz"
3
- import { text } from "drawing/text"
4
-
5
- const rotatedSymbol = rotateSymbol(power_factor_meter_horz)
6
- const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")
7
- const ref = texts.find((t) => t.text === "{REF}")!
8
- const val = texts.find((t) => t.text === "{VAL}")!
9
- const text_cos = texts.find((t) => t.text === "COS φ")!
10
- ref.x = 0.35
11
- ref.y = 0
12
- ref.anchor = "middle_left"
13
- val.anchor = "middle_right"
14
- val.x = -0.35
15
- val.y = 0
16
- text_cos.x = 0
17
- text_cos.y = 0
18
- text_cos.anchor = "center"
19
- export default rotatedSymbol
@@ -1,20 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/push_button_normally_closed_momentary.json"
3
- import { Primitive } from "drawing/types"
4
-
5
- const { paths, texts, bounds, refblocks, circles } = svgJson
6
-
7
- export default defineSymbol({
8
- primitives: [
9
- ...Object.values(paths),
10
- ...Object.values(circles),
11
- { ...texts.top1, anchor: "middle_left" },
12
- { ...texts.bottom1, anchor: "middle_left" },
13
- ] as Primitive[],
14
- ports: [
15
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
16
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
17
- ],
18
- size: { width: bounds.width, height: bounds.height },
19
- center: { x: bounds.centerX, y: bounds.centerY },
20
- })
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import push_button_normally_closed_momentary_horz from "./push_button_normally_closed_momentary_horz"
3
-
4
- export default rotateSymbol(push_button_normally_closed_momentary_horz, "up")
@@ -1,20 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/push_button_normally_open_momentary.json"
3
- import { Primitive } from "drawing/types"
4
-
5
- const { paths, texts, bounds, refblocks, circles } = svgJson
6
-
7
- export default defineSymbol({
8
- primitives: [
9
- ...Object.values(paths),
10
- ...Object.values(circles),
11
- { ...texts.top1, anchor: "middle_left" },
12
- { ...texts.bottom1, anchor: "middle_left" },
13
- ] as Primitive[],
14
- ports: [
15
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
16
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
17
- ],
18
- size: { width: bounds.width, height: bounds.height },
19
- center: { x: bounds.centerX, y: bounds.centerY },
20
- })
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import push_button_normally_open_momentary_horz from "./push_button_normally_open_momentary_horz"
3
-
4
- export default rotateSymbol(push_button_normally_open_momentary_horz, "up")
@@ -1,21 +0,0 @@
1
- import svgJson from "assets/generated/rectifier_diode.json"
2
- import { defineSymbol } from "drawing/defineSymbol"
3
-
4
- const { paths, texts, bounds, refblocks, circles } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- ...Object.values(circles),
10
- { ...texts.top1, anchor: "middle_right" },
11
- { ...texts.bottom1, anchor: "middle_right" },
12
- ] as any,
13
- ports: [
14
- { ...refblocks.top1, labels: ["1"] }, // TODO add more "standard" labels
15
- { ...refblocks.bottom1, labels: ["2"] }, // TODO add more "standard" labels
16
- { ...refblocks.left1, labels: ["3"] }, // TODO add more "standard" labels
17
- { ...refblocks.right1, labels: ["4"] }, // TODO add more "standard" labels
18
- ],
19
- size: { width: bounds.width, height: bounds.height },
20
- center: { x: bounds.centerX, y: bounds.centerY },
21
- })
@@ -1,17 +0,0 @@
1
- import type { TextPrimitive } from "drawing"
2
- import { rotateSymbol } from "drawing/rotateSymbol"
3
- import rectifier_diode_horz from "./rectifier_diode_horz"
4
-
5
- const rotated = rotateSymbol(rectifier_diode_horz)
6
-
7
- const ref = rotated.primitives.find(
8
- (p) => p.type === "text" && p.text === "{REF}",
9
- )! as TextPrimitive
10
- const val = rotated.primitives.find(
11
- (p) => p.type === "text" && p.text === "{VAL}",
12
- )! as TextPrimitive
13
-
14
- ref.anchor = "middle_left"
15
- val.anchor = "middle_right"
16
-
17
- export default rotated
@@ -1,34 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/resonator.json"
3
-
4
- const { paths, texts, bounds, refblocks, circles } = svgJson
5
-
6
- export default defineSymbol({
7
- primitives: [
8
- ...Object.values(paths),
9
- ...Object.values(circles),
10
- // { ...texts.top1, anchor: "middle_left" },
11
- // { ...texts.bottom1, anchor: "middle_left" },
12
- {
13
- type: "text",
14
- text: "{REF}",
15
- x: 0.01596175000000022,
16
- y: -0.5308501500000009,
17
- anchor: "middle_top",
18
- },
19
- {
20
- type: "text",
21
- text: "{VAL}",
22
- x: 0.013116750000000454,
23
- y: 0.5408501499999989,
24
- anchor: "middle_bottom",
25
- },
26
- ] as any,
27
- ports: [
28
- { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
29
- { ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
30
- { ...refblocks.right2, labels: ["3"] }, // TODO add more "standard" labels
31
- ],
32
- size: { width: bounds.width, height: bounds.height },
33
- center: { x: bounds.centerX, y: bounds.centerY },
34
- })
@@ -1,4 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import resonator_horz from "./resonator_horz"
3
-
4
- export default rotateSymbol(resonator_horz)
@@ -1,10 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/schottky_diode.json"
3
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
4
-
5
- export default modifySymbol(svgJson)
6
- .labelPort("left1", ["1", "pos"])
7
- .labelPort("right1", ["2", "neg"])
8
- .changeTextAnchor("{VAL}", "middle_top")
9
- .changeTextAnchor("{REF}", "middle_bottom")
10
- .build()
@@ -1,18 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import schottky_diode_horz from "./schottky_diode_horz"
3
-
4
- import type { TextPrimitive } from "drawing"
5
-
6
- const rotated = rotateSymbol(schottky_diode_horz)
7
-
8
- const ref = rotated.primitives.find(
9
- (p) => p.type === "text" && p.text === "{REF}",
10
- )! as TextPrimitive
11
- const val = rotated.primitives.find(
12
- (p) => p.type === "text" && p.text === "{VAL}",
13
- )! as TextPrimitive
14
-
15
- ref.anchor = "middle_left"
16
- val.anchor = "middle_right"
17
-
18
- export default rotated
@@ -1,13 +0,0 @@
1
- import { defineSymbol } from "drawing/defineSymbol"
2
- import svgJson from "assets/generated/silicon_controlled_rectifier.json"
3
- import { TextPrimitive } from "drawing/types"
4
- import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
5
-
6
- const { paths, texts, bounds, refblocks, circles } = svgJson
7
- export default modifySymbol(svgJson)
8
- .changeTextAnchor("{VAL}", "middle_top")
9
- .labelPort("left1", ["1"])
10
- .labelPort("right1", ["2"])
11
- .labelPort("bottom1", ["3"])
12
- .changeTextAnchor("{REF}", "middle_bottom")
13
- .build()
@@ -1,15 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import silicon_controlled_rectifier_horz from "./silicon_controlled_rectifier_horz"
3
-
4
- const rotatedSymbol = rotateSymbol(silicon_controlled_rectifier_horz)
5
-
6
- const texts = rotatedSymbol.primitives.filter(
7
- (primitive) => primitive.type === "text",
8
- )
9
-
10
- const ref = texts.find((text) => text.text === "{REF}")!
11
-
12
- ref.y = 0
13
- ref.anchor = "middle_left"
14
-
15
- export default rotatedSymbol
@@ -1,22 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import spdt_normally_closed_switch_right from "./spdt_normally_closed_switch_right"
3
- import type { TextPrimitive } from "drawing"
4
-
5
- const rotated = rotateSymbol(spdt_normally_closed_switch_right, "down")
6
-
7
- const ref = rotated.primitives.find(
8
- (p) => p.type === "text" && p.text === "{REF}",
9
- )! as TextPrimitive
10
- const val = rotated.primitives.find(
11
- (p) => p.type === "text" && p.text === "{VAL}",
12
- )! as TextPrimitive
13
-
14
- ref.anchor = "middle_bottom"
15
- val.anchor = "middle_top"
16
-
17
- ref.x = 0.44
18
- ref.y += 0.28
19
- val.y -= 0.28
20
- val.x = 0.44
21
-
22
- export default rotated
@@ -1,22 +0,0 @@
1
- import { rotateSymbol } from "drawing/rotateSymbol"
2
- import spdt_normally_closed_switch_right from "./spdt_normally_closed_switch_right"
3
- import type { TextPrimitive } from "drawing"
4
-
5
- const rotated = rotateSymbol(spdt_normally_closed_switch_right, "left")
6
-
7
- const ref = rotated.primitives.find(
8
- (p) => p.type === "text" && p.text === "{REF}",
9
- )! as TextPrimitive
10
- const val = rotated.primitives.find(
11
- (p) => p.type === "text" && p.text === "{VAL}",
12
- )! as TextPrimitive
13
-
14
- ref.anchor = "middle_bottom"
15
- val.anchor = "middle_top"
16
-
17
- ref.x = 0
18
- ref.y += 0.625
19
- val.y -= 0.695
20
- val.x = 0
21
-
22
- export default rotated