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

Mermaid Plugin: Render Inline Mermaid #1243

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 11 additions & 2 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig } from 'vitepress';
import { nav } from './themeConfig/nav.js';
import { rewrites } from './themeConfig/rewrites.js';
import { withMermaid } from "vitepress-plugin-mermaid";

export default defineConfig({
export default withMermaid({
/* --- FOR DEPLOYMENT TO GITHUB PAGES--- */
base: '/', // The base URL the site will be deployed at.
outDir: '../dist',
Expand Down Expand Up @@ -674,4 +674,13 @@ export default defineConfig({
},
],
},
// optionally, you can pass MermaidConfig
mermaid: {
// refer https://mermaid.js.org/config/setup/modules/mermaidAPI.html#mermaidapi-configuration-defaults for options
},
// optionally set additional config for plugin itself with MermaidPluginConfig
mermaidPlugin: {
// class: "mermaid my-class", // set additional css classes for parent container
},

});
32 changes: 29 additions & 3 deletions main/guides/orchestration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,32 @@ The Orchestration API handles asynchronous tasks and complex workflows, includin

The following sequence diagram provides a comprehensive overview of the Orchestration process within the Agoric platform. This example illustrates the interaction between various components, highlighting how the Orchestration library (`OrchLib`) facilitates cross-chain operations. This is a good first example to understand the flow of the Orchestration API, showing the steps involved in creating and managing cross-chain transactions.

<br/>
<img src="/reference/assets/sequence-diagrams/orchestration-workflow-1.svg" width="100%" />
<br/>
```mermaid
---
title: Orchestration Osmosis Transfer Example
config:
themeVariables:
fontSize: "32px"
---
sequenceDiagram
actor contract
contract->>OrchLib: provideOrchestration
OrchLib --> contract: orch
create participant orch
contract --> orch: getChain('osmosis')
orch->>AgoricNames: lookup('chain', 'osmosis')
AgoricNames-->>orch: ChainInfo for osmosis
orch --> contract: osmosis chain object
participant osmosis
contract->>osmosis: makeAccount()
osmosis --> contract: osmoAccount123
create participant osmoAccount123
contract->>osmoAccount123: getAddress()
contract->>osmoAccount123: getBalances()
contract->>osmoAccount123: send(amount, receiverAddress)
osmoAccount123-->>contract: Transaction Status
%% note Cross-Chain Operation
contract->>osmoAccount123: transferSteps(amount, transferMsg)
%% note Execute Steps Across Chains
osmoAccount123-->>contract: Transfer Complete
```

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
"eslint-plugin-prettier": "^5.2.1",
"glob": "7.1.7",
"import-meta-resolve": "^2.2.2",
"mermaid": "^11.3.0",
"prettier": "^3.3.3",
"ses": "^1.8.0",
"stylus": "^0.62.0",
"vitepress": "1.3.4"
"vitepress": "1.3.4",
"vitepress-plugin-mermaid": "^2.0.17"
},
"globals": {
"harden": "readonly"
Expand Down
Loading
Loading