Skip to content

Commit f0ed799

Browse files
committed
docs: use a dual-context mermaid palette for the README diagrams
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
1 parent 90b54ee commit f0ed799

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ events in, `state` decides what happens, and `sink` fans the resulting effects
4747
out. Each is a thin seam you can adopt on its own, and none imports another.
4848

4949
<!--
50-
Canonical Crucible mermaid palette: molten ember/copper over deep steel/charcoal.
51-
These hexes are kept in sync with docs/src/styles/crucible.css and the central
52-
docs theme in docs/src/mermaid-theme.mjs (used by the docs site for every diagram).
53-
GitHub ignores the astro config, so each diagram below carries the same %%{init}%%.
50+
The docs site renders these diagrams via docs/src/mermaid-theme.mjs on its own
51+
dark background, so it can use the full dark brand palette. For the README on GitHub,
52+
viewers may be in light or dark mode, so the diagrams here use a dual-context variant:
53+
neutral steel fills (#8a929c) keep nodes legible on either background, while the same
54+
ember/copper accents (#d9620a, #c47a3d) preserve brand identity. The canonical brand
55+
hexes and the docs-site palette live in crucible.css and mermaid-theme.mjs.
5456
-->
5557
```mermaid
56-
%%{init: {'theme':'base','themeVariables':{'darkMode':true,'background':'#16191d','primaryColor':'#23272c','primaryBorderColor':'#d9620a','primaryTextColor':'#f4f6f8','lineColor':'#c47a3d','secondaryColor':'#353b42','secondaryBorderColor':'#c47a3d','tertiaryColor':'#1b1f24','tertiaryBorderColor':'#2b3036','mainBkg':'#23272c','nodeBorder':'#d9620a','nodeTextColor':'#f4f6f8','clusterBkg':'#1b1f24','clusterBorder':'#c47a3d','titleColor':'#f6a85b','edgeLabelBackground':'#23272c','labelColor':'#f4f6f8','altBackground':'#353b42','textColor':'#f4f6f8'}}}%%
58+
%%{init: {'theme':'base','themeVariables':{'background':'transparent','primaryColor':'#8a929c','primaryBorderColor':'#d9620a','primaryTextColor':'#16191d','lineColor':'#b06a28','defaultLinkColor':'#b06a28','titleColor':'#b5500c','mainBkg':'#8a929c','nodeBorder':'#d9620a','nodeTextColor':'#16191d','labelColor':'#16191d','edgeLabelBackground':'#c0c7cf','altBackground':'#aab1ba','clusterBkg':'#aab1ba','clusterBorder':'#d9620a'}}}%%
5759
flowchart LR
5860
streams[(external streams)] -->|source| engine[state engine]
5961
engine -->|sink| destinations[(destinations)]
@@ -66,7 +68,7 @@ folds an event into a new instance and emits effects as plain data, leaving
6668
persistence and dispatch to the host.
6769

6870
```mermaid
69-
%%{init: {'theme':'base','themeVariables':{'darkMode':true,'background':'#16191d','primaryColor':'#23272c','primaryBorderColor':'#d9620a','primaryTextColor':'#f4f6f8','lineColor':'#c47a3d','secondaryColor':'#353b42','secondaryBorderColor':'#c47a3d','tertiaryColor':'#1b1f24','tertiaryBorderColor':'#2b3036','mainBkg':'#23272c','nodeBorder':'#d9620a','nodeTextColor':'#f4f6f8','clusterBkg':'#1b1f24','clusterBorder':'#c47a3d','titleColor':'#f6a85b','edgeLabelBackground':'#23272c','labelColor':'#f4f6f8','altBackground':'#353b42','textColor':'#f4f6f8'}}}%%
71+
%%{init: {'theme':'base','themeVariables':{'background':'transparent','primaryColor':'#8a929c','primaryBorderColor':'#d9620a','primaryTextColor':'#16191d','lineColor':'#b06a28','defaultLinkColor':'#b06a28','titleColor':'#b5500c','mainBkg':'#8a929c','nodeBorder':'#d9620a','nodeTextColor':'#16191d','labelColor':'#16191d','edgeLabelBackground':'#c0c7cf','altBackground':'#aab1ba','clusterBkg':'#aab1ba','clusterBorder':'#d9620a'}}}%%
7072
stateDiagram-v2
7173
[*] --> Idle
7274
Idle --> Working: Start [guard]
@@ -82,7 +84,7 @@ Consumes external streams (Kafka, JetStream, Redis, CDC, and more) and drives a
8284
machine, with the ack tied to a durable transition so redelivery is safe.
8385

8486
```mermaid
85-
%%{init: {'theme':'base','themeVariables':{'darkMode':true,'background':'#16191d','primaryColor':'#23272c','primaryBorderColor':'#d9620a','primaryTextColor':'#f4f6f8','lineColor':'#c47a3d','secondaryColor':'#353b42','secondaryBorderColor':'#c47a3d','tertiaryColor':'#1b1f24','tertiaryBorderColor':'#2b3036','mainBkg':'#23272c','nodeBorder':'#d9620a','nodeTextColor':'#f4f6f8','clusterBkg':'#1b1f24','clusterBorder':'#c47a3d','titleColor':'#f6a85b','edgeLabelBackground':'#23272c','labelColor':'#f4f6f8','altBackground':'#353b42','textColor':'#f4f6f8'}}}%%
87+
%%{init: {'theme':'base','themeVariables':{'background':'transparent','primaryColor':'#8a929c','primaryBorderColor':'#d9620a','primaryTextColor':'#16191d','lineColor':'#b06a28','defaultLinkColor':'#b06a28','titleColor':'#b5500c','mainBkg':'#8a929c','nodeBorder':'#d9620a','nodeTextColor':'#16191d','labelColor':'#16191d','edgeLabelBackground':'#c0c7cf','altBackground':'#aab1ba','clusterBkg':'#aab1ba','clusterBorder':'#d9620a'}}}%%
8688
flowchart LR
8789
stream[(stream)] --> decode[decode / codec] --> route["route to (key, event)"] --> fire["Fire on instance"] --> commit[durable commit] --> ack[ack]
8890
```
@@ -93,7 +95,7 @@ Fans emitted effects out to many destinations through a `Manifold`,
9395
fire-and-forget; one outlet's failure never stops the rest.
9496

9597
```mermaid
96-
%%{init: {'theme':'base','themeVariables':{'darkMode':true,'background':'#16191d','primaryColor':'#23272c','primaryBorderColor':'#d9620a','primaryTextColor':'#f4f6f8','lineColor':'#c47a3d','secondaryColor':'#353b42','secondaryBorderColor':'#c47a3d','tertiaryColor':'#1b1f24','tertiaryBorderColor':'#2b3036','mainBkg':'#23272c','nodeBorder':'#d9620a','nodeTextColor':'#f4f6f8','clusterBkg':'#1b1f24','clusterBorder':'#c47a3d','titleColor':'#f6a85b','edgeLabelBackground':'#23272c','labelColor':'#f4f6f8','altBackground':'#353b42','textColor':'#f4f6f8'}}}%%
98+
%%{init: {'theme':'base','themeVariables':{'background':'transparent','primaryColor':'#8a929c','primaryBorderColor':'#d9620a','primaryTextColor':'#16191d','lineColor':'#b06a28','defaultLinkColor':'#b06a28','titleColor':'#b5500c','mainBkg':'#8a929c','nodeBorder':'#d9620a','nodeTextColor':'#16191d','labelColor':'#16191d','edgeLabelBackground':'#c0c7cf','altBackground':'#aab1ba','clusterBkg':'#aab1ba','clusterBorder':'#d9620a'}}}%%
9799
flowchart LR
98100
effect[emitted effect] --> manifold[Manifold]
99101
manifold --> a[destination A]

0 commit comments

Comments
 (0)