Skip to content

Commit 61ce89b

Browse files
committed
docs: replace ASCII art diagrams with Mermaid across all docs
- native-access: plugin pipeline flow - auto-update: build → publish → app update flow - ci-cd: release pipeline with parallel runners - notification-windows: ToastContent model tree
1 parent a9ce965 commit 61ce89b

4 files changed

Lines changed: 80 additions & 77 deletions

File tree

docs/auto-update.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ Nucleus provides a complete auto-update solution compatible with the [electron-b
77

88
## How It Works
99

10-
```
11-
Build & Publish Check & Install
12-
┌─────────────┐ ┌─────────────────┐
13-
│ Gradle build │────────▶│ GitHub Release, │
14-
│ + YML files │ │ S3, or HTTP host │
15-
└─────────────┘ └────────┬────────┘
16-
17-
┌────────────▼────────────┐
18-
│ App fetches latest-*.yml │
19-
│ Compares versions │
20-
│ Downloads new installer │
21-
│ Verifies SHA-512 │
22-
│ Launches installer │
23-
└─────────────────────────┘
10+
```mermaid
11+
flowchart LR
12+
build["Gradle build\n+ YML files"] --> host["GitHub Release,\nS3, or HTTP host"]
13+
host --> app["App at runtime"]
14+
15+
subgraph app ["App at runtime"]
16+
direction TB
17+
fetch["Fetch latest-*.yml"] --> compare["Compare versions"]
18+
compare --> download["Download new installer"]
19+
download --> verify["Verify SHA-512"]
20+
verify --> launch["Launch installer"]
21+
end
22+
23+
style build fill:#0f3460,stroke:#16213e,color:#e0e0e0
24+
style host fill:#533483,stroke:#16213e,color:#e0e0e0
2425
```
2526

2627
!!! tip "Try it yourself"

docs/ci-cd.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,26 @@ Nucleus provides reusable composite actions and ready-to-use GitHub Actions work
1616

1717
A typical release pipeline has four stages:
1818

19-
```
20-
Tag push (v1.0.0)
21-
22-
23-
┌──────────────────────────────────┐
24-
│ Build (6 parallel runners) │
25-
│ Ubuntu amd64 / arm64 │
26-
│ Windows amd64 / arm64 │
27-
│ macOS arm64 / x64 │
28-
│ (macOS: + sandboxed .app ZIP) │
29-
└──────────┬───────────────────────┘
30-
31-
┌─────┴──────┐
32-
▼ ▼
33-
┌─────────────┐ ┌──────────┐
34-
│ macOS │ │ Windows │
35-
│ Universal │ │ MSIX │
36-
│ Binary │ │ Bundle │
37-
│ + Signing │ └────┬─────┘
38-
│ + Notarize │ │
39-
└──────┬──────┘ │
40-
│ │
41-
▼ ▼
42-
┌──────────────────────────────────┐
43-
│ Publish — GitHub Release │
44-
│ + Update YML metadata │
45-
└──────────────────────────────────┘
19+
```mermaid
20+
flowchart TB
21+
tag["Tag push (v1.0.0)"] --> build
22+
23+
subgraph build ["Build (6 parallel runners)"]
24+
direction LR
25+
ubuntu["Ubuntu\namd64 / arm64"]
26+
windows["Windows\namd64 / arm64"]
27+
macos["macOS\narm64 / x64"]
28+
end
29+
30+
build --> macos_sign["macOS Universal Binary\n+ Signing + Notarize"]
31+
build --> msix["Windows MSIX Bundle"]
32+
33+
macos_sign --> publish["Publish — GitHub Release\n+ Update YML metadata"]
34+
msix --> publish
35+
36+
style tag fill:#e94560,stroke:#16213e,color:#e0e0e0
37+
style build fill:#1a1a2e,stroke:#16213e,color:#e0e0e0
38+
style publish fill:#0f3460,stroke:#16213e,color:#e0e0e0
4639
```
4740

4841
## `setup-nucleus` Action

docs/native-access/index.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ Every now and then, no runtime library covers your exact native API need. Nucleu
99

1010
## How It Works
1111

12+
```mermaid
13+
flowchart TB
14+
A["Your Kotlin/Native code"] --> B["Gradle plugin"]
15+
B --> C["Your JVM code calls it like normal Kotlin"]
16+
17+
B@{ shape: rect }
18+
19+
style B fill:#0f3460,stroke:#16213e,color:#e0e0e0
1220
```
13-
Your Kotlin/Native code
14-
15-
16-
[ Gradle plugin ]
17-
│ analyzes sources via Kotlin PSI
18-
│ generates @CName bridge functions (native side)
19-
│ generates FFM MethodHandle proxies (JVM side)
20-
│ compiles → .so / .dylib / .dll
21-
│ bundles into JAR under kne/native/{os}-{arch}/
22-
23-
Your JVM code calls it like normal Kotlin
24-
```
21+
22+
The plugin:
23+
24+
1. Analyzes sources via **Kotlin PSI**
25+
2. Generates `@CName` bridge functions (native side)
26+
3. Generates FFM `MethodHandle` proxies (JVM side)
27+
4. Compiles to `.so` / `.dylib` / `.dll`
28+
5. Bundles into JAR under `kne/native/{os}-{arch}/`
2529

2630
The generated JVM proxies have **the exact same API** as your native classes — same names, same types, same method signatures. No wrapper types, no casting, no boilerplate.
2731

docs/runtime/notification-windows.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,30 +96,35 @@ Implement this interface to receive toast lifecycle events. All callbacks are di
9696

9797
The `ToastContent` data class maps the full [toast XML schema](https://learn.microsoft.com/en-us/windows/apps/develop/notifications/app-notifications/toast-schema):
9898

99-
```
100-
ToastContent
101-
├── visual: ToastVisual (required)
102-
│ └── binding: ToastBindingGeneric
103-
│ ├── children: List<ToastVisualChild>
104-
│ │ ├── AdaptiveText (up to 3 at top level)
105-
│ │ ├── AdaptiveImage (inline)
106-
│ │ ├── AdaptiveGroup (multi-column layout)
107-
│ │ └── AdaptiveProgressBar
108-
│ ├── appLogoOverride: ToastGenericAppLogo?
109-
│ ├── heroImage: ToastGenericHeroImage?
110-
│ └── attribution: ToastGenericAttributionText?
111-
├── actions: ToastActions?
112-
│ ├── inputs: List<ToastInput> (max 5)
113-
│ │ ├── ToastTextBox
114-
│ │ └── ToastSelectionBox
115-
│ ├── buttons: List<ToastButton> (max 5)
116-
│ └── contextMenuItems: List<ToastContextMenuItem>
117-
├── audio: ToastAudio?
118-
├── header: ToastHeader?
119-
├── launch: String
120-
├── activationType: ActivationType
121-
├── scenario: ToastScenario
122-
└── displayTimestamp: String?
99+
```mermaid
100+
graph TB
101+
TC["ToastContent"] --> visual["visual: ToastVisual ⚠️ required"]
102+
TC --> actions["actions: ToastActions?"]
103+
TC --> audio["audio: ToastAudio?"]
104+
TC --> header["header: ToastHeader?"]
105+
TC --> props["launch / activationType\nscenario / displayTimestamp"]
106+
107+
visual --> binding["binding: ToastBindingGeneric"]
108+
binding --> children["children: List&lt;ToastVisualChild&gt;"]
109+
binding --> appLogo["appLogoOverride?"]
110+
binding --> hero["heroImage?"]
111+
binding --> attribution["attribution?"]
112+
113+
children --> text["AdaptiveText (max 3)"]
114+
children --> image["AdaptiveImage"]
115+
children --> group["AdaptiveGroup"]
116+
children --> progress["AdaptiveProgressBar"]
117+
118+
actions --> inputs["inputs: List&lt;ToastInput&gt; (max 5)"]
119+
actions --> buttons["buttons: List&lt;ToastButton&gt; (max 5)"]
120+
actions --> ctx["contextMenuItems"]
121+
122+
inputs --> textbox["ToastTextBox"]
123+
inputs --> selbox["ToastSelectionBox"]
124+
125+
style TC fill:#0f3460,stroke:#16213e,color:#e0e0e0
126+
style visual fill:#533483,stroke:#16213e,color:#e0e0e0
127+
style actions fill:#533483,stroke:#16213e,color:#e0e0e0
123128
```
124129

125130
### Data Types

0 commit comments

Comments
 (0)