feat: Adds hydronic system pressure calculator.
Some checks are pending
CI / macOS (debug, 16.2) (push) Waiting to run
CI / macOS (release, 16.2) (push) Waiting to run
CI / ubuntu (push) Successful in 6m58s

This commit is contained in:
2025-03-07 15:15:28 -05:00
parent bdbe89e101
commit 159031a023
15 changed files with 358 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ public struct SVGSize: Sendable {
public enum SVGType: Sendable, CaseIterable {
case calculator
case checkCircle
case circleGauge
case droplets
case exclamation
case funnel
@@ -63,6 +64,7 @@ public enum SVGType: Sendable, CaseIterable {
switch self {
case .calculator: return calculatorSvg(size: size)
case .checkCircle: return checkCircleSvg(size: size)
case .circleGauge: return circleGaugeSvg(size: size)
case .droplets: return dropletsSvg(size: size)
case .exclamation: return exclamationSvg(size: size)
case .funnel: return funnelSvg(size: size)
@@ -84,6 +86,16 @@ public enum SVGType: Sendable, CaseIterable {
// swiftlint:disable line_length
private func circleGaugeSvg(size: SVGSize) -> HTMLRaw {
HTMLRaw("""
<svg xmlns="http://www.w3.org/2000/svg" width="\(size.width)" height="\(size.height)" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-gauge">
<path d="M15.6 2.7a10 10 0 1 0 5.7 5.7"/>
<circle cx="12" cy="12" r="2"/>
<path d="M13.4 10.6 19 5"/>
</svg>
""")
}
private func scaleSvg(size: SVGSize) -> HTMLRaw {
HTMLRaw("""
<svg xmlns="http://www.w3.org/2000/svg" width="\(size.width)" height="\(size.height)" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-scale">