logoalt Hacker News

oj-hn-dot-comtoday at 5:17 PM1 replyview on HN

This is really neat. I just added beautiful-mermaid [0] support to Orange Juice [1] because there is no way to display images on this site, even from an extension (due to their aggressive CSP lockouts). But I can render text->SVG and mermaid doesn't look awful just typed out, but anyone who has the extension installed is leveled up. Is there something like this running as a library that I can also add?

[0] https://github.com/lukilabs/beautiful-mermaid

[1] https://oj-hn.com


Replies

oj-hn-dot-comtoday at 9:39 PM

  <mermaid>
  flowchart TD

  %% Power Side (240V)
  subgraph Power Circuit (240V)
    Breaker["240V Breaker / GFCI"]
    Fuses["Fuse Block"]
    Contactor["4-Pole Contactor"]
    Pump1["Pump 1 (240V)"]
    Pump2["Pump 2 (240V)"]

    Breaker --> Fuses
    Fuses --> Contactor
    Contactor --> Pump1
    Contactor --> Pump2
  end

  %% Control Side (120V)
  subgraph Control Circuit (120V)
    Hot120["120V Control Hot (tap)"]
    AirButton["Spa Air Button"]
    AirSwitch["Air Switch"]
    Coil["Contactor Coil (A1/A2)"]

    Hot120 --> AirSwitch
    AirButton -. air tube .-> AirSwitch
    AirSwitch --> Coil
  end

  %% Mechanical Link
  Coil -. magnetic pull .-> Contactor
  </mermaid>