From 1a0f47beb3fa027b03e6c7bc0f96cb9ea4b82a18 Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Sat, 19 Jul 2025 23:18:20 +0200 Subject: [PATCH] improved imports + fixed default color --- src/core/draw/participant.typ | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/src/core/draw/participant.typ b/src/core/draw/participant.typ index 483a731..c8d78e6 100644 --- a/src/core/draw/participant.typ +++ b/src/core/draw/participant.typ @@ -3,38 +3,28 @@ #import "/src/consts.typ": * #import "/src/core/utils.typ": get-ctx, get-style, is-elmt, set-ctx -#import "participant/default.typ" as shape-default -#import "participant/actor.typ" as shape-actor -#import "participant/boundary.typ" as shape-boundary -#import "participant/control.typ" as shape-control -#import "participant/entity.typ" as shape-entity -#import "participant/database.typ" as shape-database -#import "participant/collections.typ" as shape-collections -#import "participant/queue.typ" as shape-queue -#import "participant/custom.typ" as shape-custom - #let shapes = { - let from-module(mod) = { - let p = "participant/default.typ" + let from-module(path) = { + import path as mod return (mod.name: ( get-size: mod.get-size, render: mod.render, default-style: mod.default-style )) } - from-module(shape-default) - from-module(shape-actor) - from-module(shape-boundary) - from-module(shape-control) - from-module(shape-entity) - from-module(shape-database) - from-module(shape-collections) - from-module(shape-queue) - from-module(shape-custom) + from-module("participant/default.typ") + from-module("participant/actor.typ") + from-module("participant/boundary.typ") + from-module("participant/control.typ") + from-module("participant/entity.typ") + from-module("participant/database.typ") + from-module("participant/collections.typ") + from-module("participant/queue.typ") + from-module("participant/custom.typ") } #let participant-default-style = ( - fill: auto, + fill: rgb("#E2E2F0"), stroke: black + .5pt, from-start: true, show-bottom: true,