@littledragon_wxl/drawio-style-graph 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/LICENSE +21 -0
- package/README.md +175 -0
- package/README_zh.md +171 -0
- package/SKILL.md +419 -0
- package/data/SHAPE-INDEX-NOTICE.md +17 -0
- package/data/lobe-icons.json +878 -0
- package/data/shape-index.json.gz +0 -0
- package/package.json +43 -0
- package/references/autolayout.md +125 -0
- package/references/diagram-types.md +83 -0
- package/references/shapes.md +151 -0
- package/references/style-application-guide.md +120 -0
- package/references/style-diagram-matrix.md +159 -0
- package/references/style-extraction.md +255 -0
- package/references/style-presets.md +110 -0
- package/references/styles/style-1-flat-icon.md +79 -0
- package/references/styles/style-2-dark-terminal.md +80 -0
- package/references/styles/style-3-blueprint.md +84 -0
- package/references/styles/style-4-notion-clean.md +78 -0
- package/references/styles/style-5-glassmorphism.md +85 -0
- package/references/styles/style-6-claude-official.md +84 -0
- package/references/styles/style-7-openai.md +94 -0
- package/references/styles/style-8-dark-luxury.md +109 -0
- package/references/troubleshooting.md +63 -0
- package/scripts/aiicons.py +201 -0
- package/scripts/autolayout.py +341 -0
- package/scripts/encode_drawio_url.py +58 -0
- package/scripts/goimports.py +141 -0
- package/scripts/jsimports.py +162 -0
- package/scripts/pyclasses.py +156 -0
- package/scripts/pyimports.py +153 -0
- package/scripts/repair_png.py +37 -0
- package/scripts/rustimports.py +203 -0
- package/scripts/shapesearch.py +162 -0
- package/scripts/validate.py +137 -0
- package/styles/built-in/corporate.json +49 -0
- package/styles/built-in/default.json +49 -0
- package/styles/built-in/handdrawn.json +49 -0
- package/styles/schema-drawio.json +112 -0
- package/styles/schema.json +213 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Style 2: Dark Terminal
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 2. Neon-on-dark hacker aesthetic.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
Canvas background: `#0f0f1a` (set in mxGraphModel `background` attribute or as page background)
|
|
8
|
+
|
|
9
|
+
| Role | fillColor | strokeColor | Use for |
|
|
10
|
+
|------|-----------|-------------|---------|
|
|
11
|
+
| primary (AI/ML) | `#1e1b4b` | `#7c3aed` | AI/ML, LLM, model nodes |
|
|
12
|
+
| success (database) | `#052e16` | `#059669` | databases, storage |
|
|
13
|
+
| warning (queue) | `#1c1917` | `#ea580c` | queues, async messaging |
|
|
14
|
+
| accent (gateway/API) | `#1e3a5f` | `#3b82f6` | gateways, APIs, network |
|
|
15
|
+
| danger (error) | `#450a0a` | `#dc2626` | errors, alerts |
|
|
16
|
+
| secondary (security) | `#1e1b4b` | `#a855f7` | security, auth |
|
|
17
|
+
| neutral (external) | `#0f172a` | `#334155` | external systems |
|
|
18
|
+
|
|
19
|
+
## Typography → Draw.io Mapping
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
fontFamily=SF Mono,Fira Code,Cascadia Code,Courier New,Microsoft YaHei,SimHei,monospace
|
|
23
|
+
fontSize=13 (labels)
|
|
24
|
+
fontSize=11 (sub-labels)
|
|
25
|
+
fontSize=15 (titles)
|
|
26
|
+
fontStyle=1 (bold, for titles/section headers)
|
|
27
|
+
fontColor=#e2e8f0 (primary text — near white)
|
|
28
|
+
fontColor=#94a3b8 (secondary text — muted)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Shape Preferences
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
rounded=1 (rounded corners, 6px equivalent)
|
|
35
|
+
whiteSpace=wrap
|
|
36
|
+
html=1
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For AI/ML nodes (primary role): add `shadow=1;` for glow effect.
|
|
40
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
41
|
+
For queues: `rounded=1;whiteSpace=wrap;html=1;`
|
|
42
|
+
|
|
43
|
+
## Edge Style → Draw.io Mapping
|
|
44
|
+
|
|
45
|
+
Base edge style:
|
|
46
|
+
```
|
|
47
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Arrow colors (append to edge style):
|
|
51
|
+
| Flow Type | strokeColor | Additional |
|
|
52
|
+
|-----------|-------------|------------|
|
|
53
|
+
| Purple (AI/ML) | `#a855f7` | — |
|
|
54
|
+
| Orange (compute/API) | `#f97316` | — |
|
|
55
|
+
| Blue (network/gateway) | `#3b82f6` | — |
|
|
56
|
+
| Green (storage/DB) | `#10b981` | — |
|
|
57
|
+
| Gold (highlight) | `#eab308` | — |
|
|
58
|
+
| Async/event | `#94a3b8` | `dashed=1` |
|
|
59
|
+
|
|
60
|
+
## Extras
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
strokeWidth=1.5 (on all shapes)
|
|
64
|
+
shadow=1 (on primary nodes for glow)
|
|
65
|
+
sketch=0
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Complete Vertex Style Template
|
|
69
|
+
|
|
70
|
+
For an AI/ML node (primary role):
|
|
71
|
+
```
|
|
72
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#1e1b4b;strokeColor=#7c3aed;strokeWidth=1.5;fontFamily=SF Mono,Fira Code,Cascadia Code,Courier New,Microsoft YaHei,SimHei,monospace;fontSize=13;fontColor=#e2e8f0;shadow=1;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Page Background
|
|
76
|
+
|
|
77
|
+
Set in `<mxGraphModel>` or `<diagram>`:
|
|
78
|
+
```xml
|
|
79
|
+
<mxGraphModel background="#0f0f1a">
|
|
80
|
+
```
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Style 3: Blueprint
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 3. Engineering blueprint aesthetic.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
Canvas background: `#0a1628` (deep navy)
|
|
8
|
+
|
|
9
|
+
| Role | fillColor | strokeColor | Use for |
|
|
10
|
+
|------|-----------|-------------|---------|
|
|
11
|
+
| primary (service) | `#0d1f3c` | `#00b4d8` | services, components |
|
|
12
|
+
| success (database) | `#0d1f3c` | `#06d6a0` | databases, storage |
|
|
13
|
+
| warning (queue) | `#0d1f3c` | `#f77f00` | queues, alerts |
|
|
14
|
+
| accent (gateway/API) | `#0d1f3c` | `#48cae4` | gateways, APIs |
|
|
15
|
+
| danger (error) | `#0d1f3c` | `#f77f00` | errors (orange) |
|
|
16
|
+
| secondary (security) | `#0d1f3c` | `#00b4d8` | security |
|
|
17
|
+
| neutral (external) | `none` | `#48cae4` | external (dashed, no fill) |
|
|
18
|
+
|
|
19
|
+
## Typography → Draw.io Mapping
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
fontFamily=Courier New,Lucida Console,Microsoft YaHei,SimHei,monospace
|
|
23
|
+
fontSize=13 (labels)
|
|
24
|
+
fontSize=10 (annotations)
|
|
25
|
+
fontSize=16 (titles, bold)
|
|
26
|
+
fontStyle=1 (bold, for titles)
|
|
27
|
+
fontColor=#caf0f8 (primary text — light cyan)
|
|
28
|
+
fontColor=#90e0ef (secondary text)
|
|
29
|
+
fontColor=#00b4d8 (label accents)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Shape Preferences
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
rounded=0 (sharp corners, 2px equivalent for technical feel)
|
|
36
|
+
whiteSpace=wrap
|
|
37
|
+
html=1
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
41
|
+
For external/optional: `dashed=1;` on the vertex style
|
|
42
|
+
Note: draw.io does not natively support blueprint grid backgrounds. The dark navy canvas and cyan strokes evoke the blueprint feel without needing a grid pattern.
|
|
43
|
+
|
|
44
|
+
## Edge Style → Draw.io Mapping
|
|
45
|
+
|
|
46
|
+
Base edge style:
|
|
47
|
+
```
|
|
48
|
+
edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Arrow colors:
|
|
52
|
+
| Flow Type | strokeColor | Additional |
|
|
53
|
+
|-----------|-------------|------------|
|
|
54
|
+
| Primary flow | `#00b4d8` | — |
|
|
55
|
+
| Secondary | `#48cae4` | — |
|
|
56
|
+
| Read/retrieval | `#06d6a0` | — |
|
|
57
|
+
| Async/event | `#48cae4` | `dashed=1` |
|
|
58
|
+
| Alert/warning | `#f77f00` | — |
|
|
59
|
+
|
|
60
|
+
## Extras
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
strokeWidth=1 (thin lines for technical precision)
|
|
64
|
+
sketch=0
|
|
65
|
+
shadow=0
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Complete Vertex Style Template
|
|
69
|
+
|
|
70
|
+
For a service node (primary role):
|
|
71
|
+
```
|
|
72
|
+
rounded=0;whiteSpace=wrap;html=1;fillColor=#0d1f3c;strokeColor=#00b4d8;strokeWidth=1;fontFamily=Courier New,Lucida Console,Microsoft YaHei,SimHei,monospace;fontSize=13;fontColor=#caf0f8;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For an external node (neutral, dashed):
|
|
76
|
+
```
|
|
77
|
+
rounded=0;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#48cae4;strokeWidth=1;dashed=1;fontFamily=Courier New,Lucida Console,Microsoft YaHei,SimHei,monospace;fontSize=13;fontColor=#caf0f8;
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Page Background
|
|
81
|
+
|
|
82
|
+
```xml
|
|
83
|
+
<mxGraphModel background="#0a1628">
|
|
84
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Style 4: Notion Clean
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 4. Minimal, documentation-friendly.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
| Role | fillColor | strokeColor | Use for |
|
|
8
|
+
|------|-----------|-------------|---------|
|
|
9
|
+
| primary (service) | `#f9fafb` | `#e5e7eb` | services, main components |
|
|
10
|
+
| success (database) | `#f9fafb` | `#e5e7eb` | databases, storage |
|
|
11
|
+
| warning (queue) | `#f9fafb` | `#e5e7eb` | queues, decisions |
|
|
12
|
+
| accent (gateway/API) | `#f9fafb` | `#e5e7eb` | gateways, APIs |
|
|
13
|
+
| danger (error) | `#fef2f2` | `#fecaca` | errors, alerts |
|
|
14
|
+
| secondary (security) | `#f9fafb` | `#e5e7eb` | security, auth |
|
|
15
|
+
| neutral (external) | `#ffffff` | `#e5e7eb` | external systems |
|
|
16
|
+
|
|
17
|
+
Note: This style intentionally uses minimal color variation — all standard nodes share the same fill/stroke. Only error/alert nodes get a pink tint to stand out.
|
|
18
|
+
|
|
19
|
+
## Typography → Draw.io Mapping
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif
|
|
23
|
+
fontSize=14 (labels)
|
|
24
|
+
fontSize=11 (type labels, uppercase)
|
|
25
|
+
fontSize=18 (titles)
|
|
26
|
+
fontStyle=1 (bold, for titles)
|
|
27
|
+
fontColor=#111827 (primary text — near black)
|
|
28
|
+
fontColor=#374151 (secondary text — gray-700)
|
|
29
|
+
fontColor=#9ca3af (muted — for type labels like "DATABASE")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Shape Preferences
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
rounded=1 (rounded corners, 4px equivalent)
|
|
36
|
+
whiteSpace=wrap
|
|
37
|
+
html=1
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
41
|
+
Container sections: `swimlane;startSize=30;dashed=1;` with muted borders
|
|
42
|
+
|
|
43
|
+
## Edge Style → Draw.io Mapping
|
|
44
|
+
|
|
45
|
+
This style uses a SINGLE arrow color for all connections (clean, minimal).
|
|
46
|
+
|
|
47
|
+
Base edge style:
|
|
48
|
+
```
|
|
49
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#3b82f6;strokeWidth=1.5;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Secondary flows (gray):
|
|
53
|
+
```
|
|
54
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#d1d5db;strokeWidth=1;dashed=1;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Extras
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
strokeWidth=1 (on all shapes — thin borders)
|
|
61
|
+
sketch=0
|
|
62
|
+
shadow=0 (no shadows — flat design)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Complete Vertex Style Template
|
|
66
|
+
|
|
67
|
+
For a standard node:
|
|
68
|
+
```
|
|
69
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#f9fafb;strokeColor=#e5e7eb;strokeWidth=1;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=14;fontColor=#111827;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Design Principles
|
|
73
|
+
|
|
74
|
+
- No decorative icons — geometric shapes only
|
|
75
|
+
- Generous whitespace — 24px+ padding
|
|
76
|
+
- Single arrow color for all primary flows
|
|
77
|
+
- Type labels in UPPERCASE 11px (e.g., "SERVICE", "DATABASE")
|
|
78
|
+
- No gradients, no shadows, strictly flat
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Style 5: Glassmorphism
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 5. Frosted glass cards on dark background.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
Canvas background: `#0d1117` (dark, simulating the gradient base)
|
|
8
|
+
|
|
9
|
+
Note: True glassmorphism (backdrop-filter blur) is not natively supported in draw.io.
|
|
10
|
+
We simulate it with low-opacity fills, light borders, and shadow effects.
|
|
11
|
+
|
|
12
|
+
| Role | fillColor | strokeColor | Use for |
|
|
13
|
+
|------|-----------|-------------|---------|
|
|
14
|
+
| primary (service) | `#1a2332` | `#58a6ff` | services, main components (blue glow) |
|
|
15
|
+
| success (database) | `#1a2e1a` | `#3fb950` | databases, storage (green glow) |
|
|
16
|
+
| warning (queue) | `#2e1f1a` | `#f78166` | queues (orange glow) |
|
|
17
|
+
| accent (gateway/API) | `#1f1a2e` | `#bc8cff` | gateways, APIs (purple glow) |
|
|
18
|
+
| danger (error) | `#2e1a1a` | `#f85149` | errors, alerts |
|
|
19
|
+
| secondary (security) | `#1a2332` | `#58a6ff` | security |
|
|
20
|
+
| neutral (external) | `#161b22` | `#30363d` | external systems (muted) |
|
|
21
|
+
|
|
22
|
+
## Typography → Draw.io Mapping
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
fontFamily=Inter,-apple-system,SF Pro Display,PingFang SC,Microsoft YaHei,SimHei,sans-serif
|
|
26
|
+
fontSize=14 (labels)
|
|
27
|
+
fontSize=12 (sub-labels)
|
|
28
|
+
fontSize=20 (hero titles)
|
|
29
|
+
fontStyle=1 (bold, for titles)
|
|
30
|
+
fontStyle=0 (semi-bold equivalent for labels)
|
|
31
|
+
fontColor=#f0f6fc (primary text — near white)
|
|
32
|
+
fontColor=#8b949e (secondary text — muted)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Shape Preferences
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
rounded=1 (rounded corners, 12px equivalent)
|
|
39
|
+
whiteSpace=wrap
|
|
40
|
+
html=1
|
|
41
|
+
glass=1 (draw.io's built-in glass effect)
|
|
42
|
+
shadow=1 (simulates glow)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The `glass=1` style in draw.io creates a semi-transparent look that approximates the frosted glass effect.
|
|
46
|
+
|
|
47
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;glass=1;`
|
|
48
|
+
|
|
49
|
+
## Edge Style → Draw.io Mapping
|
|
50
|
+
|
|
51
|
+
Base edge style:
|
|
52
|
+
```
|
|
53
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Arrow colors (match source node's glow color):
|
|
57
|
+
| Flow Type | strokeColor | Additional |
|
|
58
|
+
|-----------|-------------|------------|
|
|
59
|
+
| Blue flow | `#58a6ff` | — |
|
|
60
|
+
| Purple flow | `#bc8cff` | — |
|
|
61
|
+
| Green flow | `#3fb950` | — |
|
|
62
|
+
| Orange flow | `#f78166` | — |
|
|
63
|
+
| Async/event | `#8b949e` | `dashed=1` |
|
|
64
|
+
|
|
65
|
+
## Extras
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
strokeWidth=1 (thin borders for glass cards)
|
|
69
|
+
glass=1 (on all shapes)
|
|
70
|
+
shadow=1 (on all shapes)
|
|
71
|
+
sketch=0
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Complete Vertex Style Template
|
|
75
|
+
|
|
76
|
+
For a service node (primary, blue glow):
|
|
77
|
+
```
|
|
78
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#1a2332;strokeColor=#58a6ff;strokeWidth=1;fontFamily=Inter,-apple-system,SF Pro Display,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=14;fontColor=#f0f6fc;glass=1;shadow=1;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Page Background
|
|
82
|
+
|
|
83
|
+
```xml
|
|
84
|
+
<mxGraphModel background="#0d1117">
|
|
85
|
+
```
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Style 6: Claude Official
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 6. Warm, approachable, Anthropic-style.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
| Role | fillColor | strokeColor | Use for |
|
|
8
|
+
|------|-----------|-------------|---------|
|
|
9
|
+
| primary (service) | `#9dd4c7` | `#4a4a4a` | services, agent/process (teal-green) |
|
|
10
|
+
| success (database) | `#e8e6e3` | `#4a4a4a` | databases, storage (light gray) |
|
|
11
|
+
| warning (queue) | `#f4e4c1` | `#4a4a4a` | queues, bus, infrastructure (beige) |
|
|
12
|
+
| accent (gateway/API) | `#a8c5e6` | `#4a4a4a` | gateways, APIs, input (soft blue) |
|
|
13
|
+
| danger (error) | `#f4c1c1` | `#4a4a4a` | errors, alerts (soft pink) |
|
|
14
|
+
| secondary (security) | `#9dd4c7` | `#4a4a4a` | security (reuse agent color) |
|
|
15
|
+
| neutral (external) | `#f8f6f3` | `#4a4a4a` | external systems (background cream) |
|
|
16
|
+
|
|
17
|
+
Note: All nodes share the same dark gray stroke (`#4a4a4a`), creating visual cohesion.
|
|
18
|
+
|
|
19
|
+
## Typography → Draw.io Mapping
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif
|
|
23
|
+
fontSize=16 (node labels, semi-bold)
|
|
24
|
+
fontSize=14 (descriptions)
|
|
25
|
+
fontSize=13 (arrow labels)
|
|
26
|
+
fontSize=18 (titles, bold)
|
|
27
|
+
fontStyle=1 (bold for labels and titles)
|
|
28
|
+
fontStyle=0 (regular for descriptions)
|
|
29
|
+
fontColor=#1a1a1a (primary text — near black)
|
|
30
|
+
fontColor=#6a6a6a (secondary text — medium gray)
|
|
31
|
+
fontColor=#5a5a5a (arrow labels)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Shape Preferences
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
rounded=1 (rounded corners, 12px equivalent)
|
|
38
|
+
whiteSpace=wrap
|
|
39
|
+
html=1
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
All boxes use `strokeWidth=2.5` for the thick, warm border look.
|
|
43
|
+
|
|
44
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
45
|
+
|
|
46
|
+
## Edge Style → Draw.io Mapping
|
|
47
|
+
|
|
48
|
+
Base edge style — all arrows use the same dark gray:
|
|
49
|
+
```
|
|
50
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#5a5a5a;strokeWidth=2;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Arrow semantics through dash patterns only:
|
|
54
|
+
| Flow Type | Additional |
|
|
55
|
+
|-----------|------------|
|
|
56
|
+
| Primary data flow | — (solid) |
|
|
57
|
+
| Memory write | `dashed=1` |
|
|
58
|
+
| Memory read | — (solid) |
|
|
59
|
+
| Control/trigger | `dashed=1` |
|
|
60
|
+
|
|
61
|
+
## Extras
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
strokeWidth=2.5 (thick warm borders on all shapes)
|
|
65
|
+
sketch=0
|
|
66
|
+
shadow=0
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Complete Vertex Style Template
|
|
70
|
+
|
|
71
|
+
For a service/agent node (primary, teal-green):
|
|
72
|
+
```
|
|
73
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#9dd4c7;strokeColor=#4a4a4a;strokeWidth=2.5;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=16;fontColor=#1a1a1a;fontStyle=1;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
For an input/source node (blue):
|
|
77
|
+
```
|
|
78
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#a8c5e6;strokeColor=#4a4a4a;strokeWidth=2.5;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=16;fontColor=#1a1a1a;fontStyle=1;
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For an infrastructure/bus node (beige):
|
|
82
|
+
```
|
|
83
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#f4e4c1;strokeColor=#4a4a4a;strokeWidth=2.5;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=16;fontColor=#1a1a1a;fontStyle=1;
|
|
84
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Style 7: OpenAI Official
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 7. Clean, minimal, precise.
|
|
4
|
+
|
|
5
|
+
## Color Palette → Draw.io Mapping
|
|
6
|
+
|
|
7
|
+
This style is extremely minimal — almost all nodes are white with light gray borders.
|
|
8
|
+
Color is reserved for accents only.
|
|
9
|
+
|
|
10
|
+
| Role | fillColor | strokeColor | Use for |
|
|
11
|
+
|------|-----------|-------------|---------|
|
|
12
|
+
| primary (service) | `#ffffff` | `#e5e5e5` | services, main components |
|
|
13
|
+
| success (database) | `#ffffff` | `#e5e5e5` | databases, storage |
|
|
14
|
+
| warning (queue) | `#ffffff` | `#e5e5e5` | queues |
|
|
15
|
+
| accent (gateway/API) | `#ffffff` | `#e5e5e5` | gateways, APIs |
|
|
16
|
+
| danger (error) | `#fef2f2` | `#fecaca` | errors, alerts |
|
|
17
|
+
| secondary (security) | `#ffffff` | `#e5e5e5` | security |
|
|
18
|
+
| neutral (external) | `#ffffff` | `#e5e5e5` | external systems |
|
|
19
|
+
|
|
20
|
+
**Accent colors** (used for left-border accent strip or edge colors):
|
|
21
|
+
- `#10a37f` — OpenAI brand green (primary accent)
|
|
22
|
+
- `#1d4ed8` — blue accent (links, secondary)
|
|
23
|
+
- `#f97316` — orange accent (warnings, highlights)
|
|
24
|
+
- `#71717a` — gray (default edges, neutral)
|
|
25
|
+
|
|
26
|
+
## Typography → Draw.io Mapping
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,PingFang SC,Microsoft YaHei,SimHei,sans-serif
|
|
30
|
+
fontSize=16 (node labels, semi-bold)
|
|
31
|
+
fontSize=13 (descriptions)
|
|
32
|
+
fontSize=12 (arrow labels)
|
|
33
|
+
fontStyle=1 (bold, for titles — font weight 600)
|
|
34
|
+
fontStyle=0 (medium equivalent for labels — font weight 500)
|
|
35
|
+
fontColor=#0d0d0d (primary text — near black)
|
|
36
|
+
fontColor=#6e6e80 (secondary text — muted gray)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Shape Preferences
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
rounded=1 (rounded corners, 8px equivalent)
|
|
43
|
+
whiteSpace=wrap
|
|
44
|
+
html=1
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
48
|
+
Note: In the original SVG style, accent nodes have a 4px colored left border. draw.io
|
|
49
|
+
doesn't support this directly, but you can achieve a similar effect by using
|
|
50
|
+
`verticalAlign=top;align=left;spacingLeft=8;` for left-aligned text with an accent
|
|
51
|
+
colored `strokeColor` on the container.
|
|
52
|
+
|
|
53
|
+
## Edge Style → Draw.io Mapping
|
|
54
|
+
|
|
55
|
+
Base edge style — thin, precise:
|
|
56
|
+
```
|
|
57
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=1.5;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Arrow colors:
|
|
61
|
+
| Flow Type | strokeColor | Usage |
|
|
62
|
+
|-----------|-------------|-------|
|
|
63
|
+
| Default connection | `#71717a` | most edges |
|
|
64
|
+
| Accent/green | `#10a37f` | primary data paths |
|
|
65
|
+
| Blue action | `#1d4ed8` | action/trigger |
|
|
66
|
+
| Orange warning | `#f97316` | edge cases, warnings |
|
|
67
|
+
|
|
68
|
+
## Extras
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
strokeWidth=1.5 (thin, precise borders on all shapes)
|
|
72
|
+
sketch=0
|
|
73
|
+
shadow=0
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Complete Vertex Style Template
|
|
77
|
+
|
|
78
|
+
For a standard node:
|
|
79
|
+
```
|
|
80
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#e5e5e5;strokeWidth=1.5;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=16;fontColor=#0d0d0d;fontStyle=1;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For an error/alert node:
|
|
84
|
+
```
|
|
85
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#fef2f2;strokeColor=#fecaca;strokeWidth=1.5;fontFamily=-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,PingFang SC,Microsoft YaHei,SimHei,sans-serif;fontSize=16;fontColor=#0d0d0d;fontStyle=1;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Design Principles
|
|
89
|
+
|
|
90
|
+
- No gradients, no shadows, no decorative elements
|
|
91
|
+
- White fill with light gray borders for all nodes
|
|
92
|
+
- Color appears only in edges and accent details
|
|
93
|
+
- Precision and clarity above all
|
|
94
|
+
- System font stack for maximum compatibility
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Style 8: Dark Luxury
|
|
2
|
+
|
|
3
|
+
Adapted from fireworks-tech-graph Style 8. Deep black canvas with champagne-gold accents.
|
|
4
|
+
Premium editorial aesthetic.
|
|
5
|
+
|
|
6
|
+
## Color Palette → Draw.io Mapping
|
|
7
|
+
|
|
8
|
+
Canvas background: `#0a0a0a` (deepest black, no blue tint)
|
|
9
|
+
|
|
10
|
+
Six semantic color buckets:
|
|
11
|
+
|
|
12
|
+
| Role | Bucket | fillColor | strokeColor | Use for |
|
|
13
|
+
|------|--------|-----------|-------------|---------|
|
|
14
|
+
| primary (service/API) | Service/API | `#111111` | `#a78bfa` | services, endpoints, APIs (soft violet) |
|
|
15
|
+
| success (database) | Data/Storage | `#111111` | `#38bdf8` | databases, tables, caches (sky blue) |
|
|
16
|
+
| warning (queue) | Infra/Config | `#111111` | `#fbbf24` | infra, pipelines, config (amber) |
|
|
17
|
+
| accent (gateway/API) | Service/API | `#111111` | `#a78bfa` | gateways (same as services) |
|
|
18
|
+
| danger (error) | Concept/Domain | `#111111` | `#f87171` | errors, concepts (soft rose) |
|
|
19
|
+
| secondary (logic) | Code/Logic | `#111111` | `#5a9e6f` | functions, modules, algorithms (sage) |
|
|
20
|
+
| neutral (external) | Meta/Doc | `#111111` | `#94a3b8` | external, docs, schemas (cool gray) |
|
|
21
|
+
|
|
22
|
+
**Gold accent**: `#d4a574` for titles, section headers, primary arrows.
|
|
23
|
+
**Bright gold**: `#e8c49a` for highlights.
|
|
24
|
+
**Dim gold**: `#c9a96e` for secondary accents.
|
|
25
|
+
|
|
26
|
+
## Typography → Draw.io Mapping
|
|
27
|
+
|
|
28
|
+
Dual-font strategy: Serif for titles, Sans-serif for body.
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
Title/Section font: fontFamily=Georgia,Times New Roman,serif
|
|
32
|
+
fontSize=21 (diagram title), fontSize=14 (section labels)
|
|
33
|
+
fontStyle=1 (bold)
|
|
34
|
+
fontColor=#f5f0eb or fontColor=#c9a96e (gold for sections)
|
|
35
|
+
|
|
36
|
+
Node label font: fontFamily=-apple-system,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif
|
|
37
|
+
fontSize=13-14, fontStyle=1 (semi-bold 600)
|
|
38
|
+
fontColor=<bucket's strokeColor> (use the bucket's color for the label)
|
|
39
|
+
|
|
40
|
+
Sub-label font: fontFamily=-apple-system,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif
|
|
41
|
+
fontSize=10-11, fontColor=#a39787 or fontColor=#6b5f53
|
|
42
|
+
|
|
43
|
+
Code/path font: fontFamily=Cascadia Code,SF Mono,Courier New,monospace
|
|
44
|
+
fontSize=10-11, fontColor=#a39787
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Rule**: Use serif only for diagram titles and section/cluster labels (≥14px). All node
|
|
48
|
+
names, edge labels, and fine print use sans-serif.
|
|
49
|
+
|
|
50
|
+
## Shape Preferences
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
rounded=1 (rounded corners, 6px equivalent)
|
|
54
|
+
whiteSpace=wrap
|
|
55
|
+
html=1
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
All nodes share: `fillColor=#111111`, `strokeWidth=1.5`, stroke color from bucket.
|
|
59
|
+
|
|
60
|
+
For databases: `shape=cylinder3;whiteSpace=wrap;html=1;`
|
|
61
|
+
For gold-bordered containers: `strokeColor=#c9a96e;dashed=1;`
|
|
62
|
+
|
|
63
|
+
## Edge Style → Draw.io Mapping
|
|
64
|
+
|
|
65
|
+
Base edge style:
|
|
66
|
+
```
|
|
67
|
+
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Arrow system:
|
|
71
|
+
| Flow Type | strokeColor | strokeWidth | Additional |
|
|
72
|
+
|-----------|-------------|-------------|------------|
|
|
73
|
+
| Primary/structural | `#d4a574` | 2 | — (gold) |
|
|
74
|
+
| Data flow | `#6ee7b7` | 1.5 | — (mint) |
|
|
75
|
+
| Control/trigger | `#fdba74` | 1.5 | — (amber-orange) |
|
|
76
|
+
| Reference/semantic | `#a39787` | 1 | `dashed=1` |
|
|
77
|
+
| Dependency | `#a78bfa` | 1 | `dashed=1` |
|
|
78
|
+
| Feedback/loop | `#d4a574` | 1.5 | `curved=1` |
|
|
79
|
+
|
|
80
|
+
## Extras
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
strokeWidth=1.5 (on all shapes)
|
|
84
|
+
sketch=0
|
|
85
|
+
shadow=0
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Complete Vertex Style Templates
|
|
89
|
+
|
|
90
|
+
For a service/API node (violet bucket):
|
|
91
|
+
```
|
|
92
|
+
rounded=1;whiteSpace=wrap;html=1;fillColor=#111111;strokeColor=#a78bfa;strokeWidth=1.5;fontFamily=-apple-system,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif;fontSize=13;fontColor=#a78bfa;fontStyle=1;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For a database node (sky blue bucket):
|
|
96
|
+
```
|
|
97
|
+
shape=cylinder3;whiteSpace=wrap;html=1;fillColor=#111111;strokeColor=#38bdf8;strokeWidth=1.5;fontFamily=-apple-system,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif;fontSize=13;fontColor=#38bdf8;fontStyle=1;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For a section title (serif, gold):
|
|
101
|
+
```
|
|
102
|
+
text;html=1;fontFamily=Georgia,Times New Roman,serif;fontSize=14;fontColor=#c9a96e;fontStyle=1;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Page Background
|
|
106
|
+
|
|
107
|
+
```xml
|
|
108
|
+
<mxGraphModel background="#0a0a0a">
|
|
109
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Troubleshooting — Common Mistakes
|
|
2
|
+
|
|
3
|
+
Read this when something looks wrong in the output (rendering, export, layout, edges) or when a CLI invocation fails. Most rows have a one-line fix.
|
|
4
|
+
|
|
5
|
+
| Mistake | Fix |
|
|
6
|
+
|---------|-----|
|
|
7
|
+
| Missing `id="0"` and `id="1"` root cells | Always include both at the top of `<root>` |
|
|
8
|
+
| Shapes not connected | `source` and `target` on edge must match existing shape `id` values |
|
|
9
|
+
| Self-closing edge `mxCell` (`<mxCell ... edge="1" />`) | Use the expanded form with `<mxGeometry relative="1" as="geometry" />` child — self-closing edges won't render |
|
|
10
|
+
| `--` inside XML comments | Illegal per XML spec — use single hyphens or rephrase |
|
|
11
|
+
| Special characters in `value` | Use XML entities: `&` `<` `>` `"` |
|
|
12
|
+
| Literal `\n` in label text | Use `
` for line breaks in `value` attributes |
|
|
13
|
+
| Overlapping shapes | Scale spacing with complexity (200–350px); leave routing corridors |
|
|
14
|
+
| Edges crossing through shapes | Add waypoints, distribute entry/exit points, or increase spacing |
|
|
15
|
+
| Arrowhead overlaps bend | Final edge segment before target must be ≥20px — increase spacing or add waypoints |
|
|
16
|
+
| Iteration loop never ends | After 5 rounds, suggest user open .drawio in draw.io desktop for fine-tuning |
|
|
17
|
+
| `command not found: draw.io` after `brew install --cask drawio` | Homebrew installs the binary as `drawio` (no dot). Use `drawio --version`, not `draw.io --version`. The dot-name only exists inside the `.app` bundle (`/Applications/draw.io.app/Contents/MacOS/draw.io`) and on Windows (`draw.io.exe`). |
|
|
18
|
+
| Export command not found on macOS | Try full path `/Applications/draw.io.app/Contents/MacOS/draw.io` |
|
|
19
|
+
| Vision returns "Unable to resize image — dimensions exceed the 2576x2576px limit" | The preview PNG is too large for Claude's vision API. Re-export with `--width 2000` instead of `-s 2` (the flag is `--width`; there is no short `-w` — passing `-w 2000` silently breaks input-file parsing and drawio errors with "input file/directory not found"). For very tall-narrow diagrams that still overshoot, use `--height 2000` instead. |
|
|
20
|
+
| Linux: blank/error output headlessly | Prefix command with `xvfb-run -a` |
|
|
21
|
+
| Linux: `--no-sandbox` placed before input file (parsed as filename) | Move `--no-sandbox` to the very end of the command (drawio-desktop#249, #1056) |
|
|
22
|
+
| Linux: `Failed to get 'appData' path` / `Home directory not accessible` | `export HOME=/tmp` before invoking drawio (drawio-desktop#127) |
|
|
23
|
+
| Linux server: segfault / EGL / MESA `failed to load driver` errors | Add `--disable-gpu` (suppresses Chromium GL init when no GPU available) |
|
|
24
|
+
| PDF export fails | Ensure Chromium is available (draw.io bundles it on desktop) |
|
|
25
|
+
| Background color wrong in CLI export | Known CLI bug; add `--transparent` flag or set background via style |
|
|
26
|
+
| Vision returns 400 "Could not process image" on draft PNG | Re-export the preview without `-e` (issue #8). Root cause is a truncated IEND chunk in `-e` PNGs, not the `zTXt` chunk itself — but skipping `-e` for the preview is the simplest fix. |
|
|
27
|
+
| Final `-e` PNG won't open in image viewers / vision APIs | Run `python3 <this-skill-dir>/scripts/repair_png.py <path>`. draw.io CLI emits `-e` PNGs with an 8-byte truncation at IEND. SVG/PDF unaffected. |
|
|
28
|
+
| WSL2: `drawio` / `draw.io` not found | The CLI lives on the Windows side. Use the Windows desktop exe via `/mnt/c`: `"/mnt/c/Program Files/draw.io/draw.io.exe"` (or per-user `"/mnt/c/Users/<you>/AppData/Local/Programs/draw.io/draw.io.exe"`). |
|
|
29
|
+
| WSL2: opening an exported file fails with a `/mnt/c/...`-style path | `cmd.exe` can't resolve WSL paths — convert first: `cmd.exe /c start "" "$(wslpath -w diagram.drawio.png)"`. The empty `""` after `start` is the (required) window title. |
|
|
30
|
+
| Browser URL opens to a blank/empty diagram (Windows/WSL2) | `cmd.exe`'s `start` treats `&` as a separator and drops everything after `#` — so the `#R…`/`#create=…` fragment (the whole diagram) is lost. Never pass the URL straight to `start`. Write a `.url` shortcut file and open *that* (see "WSL2 / Windows" below). |
|
|
31
|
+
|
|
32
|
+
## WSL2 / Windows specifics
|
|
33
|
+
|
|
34
|
+
**Locate the CLI.** Detect WSL2 with `grep -qi microsoft /proc/version`. On WSL2 the
|
|
35
|
+
export CLI is the Windows desktop exe, reached through `/mnt/c` (quote the path —
|
|
36
|
+
it contains a space):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
"/mnt/c/Program Files/draw.io/draw.io.exe" --version
|
|
40
|
+
# per-user install fallback:
|
|
41
|
+
"/mnt/c/Users/$USER/AppData/Local/Programs/draw.io/draw.io.exe" --version
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Open a file.** Convert the WSL path to a Windows path first; `cmd.exe` cannot
|
|
45
|
+
follow `/mnt/c/...`:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cmd.exe /c start "" "$(wslpath -w diagram.drawio.png)"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Open a browser-fallback URL.** `cmd.exe /c start` strips the URL fragment
|
|
52
|
+
(`&` ends the command, `#…` is dropped) — and the fragment carries the entire
|
|
53
|
+
diagram. Write a `.url` shortcut and open it instead, so the URL survives intact:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
URL=$(python3 <this-skill-dir>/scripts/encode_drawio_url.py --edit diagram.drawio)
|
|
57
|
+
TMP=$(mktemp --suffix=.url)
|
|
58
|
+
printf '[InternetShortcut]\r\nURL=%s\r\n' "$URL" > "$TMP"
|
|
59
|
+
cmd.exe /c start "" "$(wslpath -w "$TMP")"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
On native Windows the same `.url`-file trick applies (`start "" "%TEMP%\d.url"`).
|
|
63
|
+
On macOS/Linux just `open "$URL"` / `xdg-open "$URL"` — no workaround needed.
|