Hi, I am trying to make a similar diagram as in the picture, with 2 pairs of nested circles, with an arrow between each pair of same-level circles. With native Typst, I was able to make the nested circles, but don't know how to draw the arrows (diagram on top of 2nd picture). With Fletcher package I was able to draw all elements, but nested nodes sit on top of text of parent node (diagram on the bottom of 2nd picture).
I would love to hear any advice to achieve my goal, using one of those methods or another 🙏
Here is the code for the 2 Typst diagrams:
#let lang_colors = (
gleam: rgb("#f0a8ec"),
js: rgb(245, 234, 113),
)
#set align(center + horizon)
#set par(justify: false)
#set text(weight: "bold")
#let c1(fill, content) = circle(
radius: 3cm,
stroke: white + 3pt,
fill: fill,
content,
)
#let c2(fill, content) = circle(
radius: 1.5cm,
stroke: white + 3pt,
fill: fill,
content,
)
#let circles1 = c1(lang_colors.gleam, [
#c2(lang_colors.gleam, [Gleam])
API Cypress en Gleam
])
#let circles2 = c1(lang_colors.js, [
#c2(lang_colors.js, [JavaScript])
API Cypress en JavaScript
])
#grid(
columns: 2,
circles1, circles2,
)
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
#diagram(
node-stroke: 3pt + white,
node-shape: circle,
node-fill: luma(200),
node((0, 0), "Gleam", fill:lang_colors.gleam, name: <n1>),
node("API Cypress en Gleam", fill:lang_colors.gleam, name: <n2>, enclose: (<n1>,)),
node((1, 0), "JavaScript", fill:lang_colors.js, name: <n3>),
node("API Cypress en JavaScript", fill:lang_colors.js, name: <n4>, enclose: (<n3>,)),
edge(<n1>, <n3>, "->"),
edge(<n2>, <n4>, "->"),
)