Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update diagram support to correspond to Kroki v0.24.1 #56

Merged
merged 8 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions docs/architecture/workspace.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ workspace {
library -> this "Sends encoded diagram to"
}

container "Blockdiag Service" {
description "Renders diagrams from the `blockdiag` suite of generators, e.g. `blockdiag`, `seqdiag`, `actdiag`, `nwdiag`, etc."
url http://blockdiag.com

kroki_core -> this "Defers `blockdiag` diagrams to"
}

container "BPMN Service" {
description "Renders 'Business Process Model and Notation' diagrams using `bpmn-js`."
url https://bpmn.io/toolkit/bpmn-js
Expand Down
47 changes: 34 additions & 13 deletions src/Kroki.jl
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ DIAGRAM_TYPE_METADATA = Dict{Symbol, DiagramTypeMetadata}(
"C4 with PlantUML",
"https://github.com/plantuml-stdlib/C4-PlantUML",
),
:d2 => DiagramTypeMetadata("D2", "https://d2lang.com"),
:dbml => DiagramTypeMetadata("DBML", "https://dbml.org"),
:diagramsnet => DiagramTypeMetadata("diagrams.net", "https://diagrams.net"),
:ditaa => DiagramTypeMetadata("ditaa", "http://ditaa.sourceforge.net"),
:erd => DiagramTypeMetadata("erd", "https://github.com/BurntSushi/erd"),
Expand All @@ -251,10 +253,13 @@ DIAGRAM_TYPE_METADATA = Dict{Symbol, DiagramTypeMetadata}(
:structurizr => DiagramTypeMetadata("Structurizr", "https://structurizr.com"),
:svgbob =>
DiagramTypeMetadata("Svgbob", "https://ivanceras.github.io/content/Svgbob.html"),
:symbolator => DiagramTypeMetadata("Symbolator", "https://github.com/kevinpt/symbolator"),
:tikz => DiagramTypeMetadata("Symbolator", "https://github.com/pgf-tikz/pgf"),
:umlet => DiagramTypeMetadata("UMLet", "https://github.com/umlet/umlet"),
:vega => DiagramTypeMetadata("Vega", "https://vega.github.io/vega"),
:vegalite => DiagramTypeMetadata("Vega-Lite", "https://vega.github.io/vega-lite"),
:wavedrom => DiagramTypeMetadata("WaveDrom", "https://wavedrom.com"),
:wireviz => DiagramTypeMetadata("WireViz", "https://github.com/formatc1702/WireViz"),
)

"""
Expand Down Expand Up @@ -291,39 +296,55 @@ $(renderDiagramSupportAsMarkdown(LIMITED_DIAGRAM_SUPPORT))
"""
const LIMITED_DIAGRAM_SUPPORT = MIMEToDiagramTypeMap(
MIME"application/pdf"() => (
:blockdiag,
:seqdiag,
:actdiag,
:blockdiag,
:c4plantuml,
:erd,
:graphviz,
:nwdiag,
:packetdiag,
:plantuml,
:rackdiag,
:erd,
:graphviz,
:seqdiag,
:structurizr,
:tikz,
:vega,
:vegalite,
),
MIME"image/jpeg"() => (:c4plantuml, :erd, :graphviz, :plantuml, :structurizr, :umlet),
MIME"image/jpeg"() => (:erd, :graphviz, :tikz, :umlet),
MIME"image/png"() => (
:blockdiag,
:seqdiag,
:actdiag,
:nwdiag,
:diagramsnet,
:packetdiag,
:rackdiag,
:blockdiag,
:c4plantuml,
:diagramsnet,
:ditaa,
:erd,
:graphviz,
:mermaid,
:nwdiag,
:packetdiag,
:plantuml,
:rackdiag,
:seqdiag,
:structurizr,
:symbolator,
:tikz,
:umlet,
:vega,
:vegalite,
:wireviz,
),
MIME"image/svg+xml"() => (
:bpmn,
:bytefield,
:d2,
:dbml,
:excalidraw,
:nomnoml,
:pikchr,
:svgbob,
:wavedrom
),
MIME"image/svg+xml"() =>
(:bpmn, :bytefield, :excalidraw, :nomnoml, :pikchr, :svgbob, :wavedrom),
MIME"text/plain"() => (:c4plantuml, :plantuml, :structurizr),
MIME"text/plain; charset=utf-8"() => (:c4plantuml, :plantuml, :structurizr),
)
Expand Down
4 changes: 0 additions & 4 deletions support/docker-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ services:
core:
image: yuzutech/kroki:${KROKI_CONTAINER_IMAGE_TAG:-latest}
depends_on:
- blockdiag
- bpmn
- excalidraw
- mermaid
environment:
- KROKI_BLOCKDIAG_HOST=blockdiag
- KROKI_BPMN_HOST=bpmn
- KROKI_DIAGRAMSNET_HOST=diagramsnet
- KROKI_EXCALIDRAW_HOST=excalidraw
Expand All @@ -19,8 +17,6 @@ services:
- KROKI_SAFE_MODE=unsafe
ports:
- 8000:8000
blockdiag:
image: yuzutech/kroki-blockdiag:${KROKI_CONTAINER_IMAGE_TAG:-latest}
bpmn:
image: yuzutech/kroki-bpmn:${KROKI_CONTAINER_IMAGE_TAG:-latest}
diagramsnet:
Expand Down
Loading