@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,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/Agents365-ai/drawio-skill/styles/schema.json",
|
|
4
|
+
"title": "drawio-skill preset",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["name", "version", "palette", "roles", "shapes", "font", "edges"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]*$" },
|
|
11
|
+
"version": { "type": "integer", "const": 1 },
|
|
12
|
+
"default": { "type": "boolean" },
|
|
13
|
+
"confidence": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
14
|
+
"source": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"type": { "type": "string", "enum": ["xml", "image", "built-in", "hand-authored"] },
|
|
19
|
+
"path": { "type": "string" },
|
|
20
|
+
"extracted_at": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"palette": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["primary", "success", "warning", "accent", "danger", "neutral", "secondary"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"primary": { "$ref": "#/$defs/colorPair" },
|
|
29
|
+
"success": { "$ref": "#/$defs/colorPair" },
|
|
30
|
+
"warning": { "$ref": "#/$defs/colorPair" },
|
|
31
|
+
"accent": { "$ref": "#/$defs/colorPair" },
|
|
32
|
+
"danger": { "$ref": "#/$defs/colorPair" },
|
|
33
|
+
"neutral": { "$ref": "#/$defs/colorPair" },
|
|
34
|
+
"secondary": { "$ref": "#/$defs/colorPair" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"roles": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"service": { "$ref": "#/$defs/slotName" },
|
|
42
|
+
"database": { "$ref": "#/$defs/slotName" },
|
|
43
|
+
"queue": { "$ref": "#/$defs/slotName" },
|
|
44
|
+
"gateway": { "$ref": "#/$defs/slotName" },
|
|
45
|
+
"error": { "$ref": "#/$defs/slotName" },
|
|
46
|
+
"external": { "$ref": "#/$defs/slotName" },
|
|
47
|
+
"security": { "$ref": "#/$defs/slotName" }
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"shapes": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": { "type": "string" },
|
|
53
|
+
"properties": {
|
|
54
|
+
"service": { "type": "string" },
|
|
55
|
+
"database": { "type": "string" },
|
|
56
|
+
"queue": { "type": "string" },
|
|
57
|
+
"decision": { "type": "string" },
|
|
58
|
+
"external": { "type": "string" },
|
|
59
|
+
"container": { "type": "string" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"font": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": ["fontFamily", "fontSize"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"fontFamily": { "type": "string" },
|
|
68
|
+
"fontSize": { "type": "integer", "minimum": 8, "maximum": 36 },
|
|
69
|
+
"titleFontSize": { "type": "integer", "minimum": 8, "maximum": 48 },
|
|
70
|
+
"titleBold": { "type": "boolean" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"edges": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["style", "arrow"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"style": { "type": "string" },
|
|
79
|
+
"arrow": { "type": "string" },
|
|
80
|
+
"dashedFor": { "type": "array", "items": { "type": "string" } }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"extras": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"sketch": { "type": "boolean" },
|
|
88
|
+
"globalStrokeWidth": { "type": "number", "minimum": 0.5, "maximum": 6 }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"$defs": {
|
|
93
|
+
"colorPair": {
|
|
94
|
+
"oneOf": [
|
|
95
|
+
{ "type": "null" },
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["fillColor", "strokeColor"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"fillColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
|
|
102
|
+
"strokeColor": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"slotName": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": ["primary", "success", "warning", "accent", "danger", "neutral", "secondary"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Agents365-ai/drawio-style-graph/styles/schema.json",
|
|
4
|
+
"title": "Draw.io Style Graph — Style Preset Schema",
|
|
5
|
+
"description": "Schema for visual style presets that map fireworks-tech-graph design tokens to draw.io-compatible style strings.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "version", "palette", "typography", "shapes", "edges"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Lowercase style name (e.g., 'flat-icon', 'dark-terminal').",
|
|
12
|
+
"pattern": "^[a-z0-9-]+$"
|
|
13
|
+
},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Semantic version of this style preset.",
|
|
17
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
18
|
+
},
|
|
19
|
+
"description": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Human-readable description of the style."
|
|
22
|
+
},
|
|
23
|
+
"canvas": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Canvas/page background settings.",
|
|
26
|
+
"required": ["background"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"background": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
31
|
+
"description": "Hex color for mxGraphModel background."
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"palette": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "Color palette — maps semantic roles to fillColor/strokeColor pairs.",
|
|
38
|
+
"required": ["primary", "success", "warning", "accent", "danger", "secondary", "neutral"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"primary": {
|
|
41
|
+
"$ref": "#/$defs/colorPair",
|
|
42
|
+
"description": "Services, main components."
|
|
43
|
+
},
|
|
44
|
+
"success": {
|
|
45
|
+
"$ref": "#/$defs/colorPair",
|
|
46
|
+
"description": "Databases, storage."
|
|
47
|
+
},
|
|
48
|
+
"warning": {
|
|
49
|
+
"$ref": "#/$defs/colorPair",
|
|
50
|
+
"description": "Queues, message buses, decisions."
|
|
51
|
+
},
|
|
52
|
+
"accent": {
|
|
53
|
+
"$ref": "#/$defs/colorPair",
|
|
54
|
+
"description": "Gateways, APIs, load balancers."
|
|
55
|
+
},
|
|
56
|
+
"danger": {
|
|
57
|
+
"$ref": "#/$defs/colorPair",
|
|
58
|
+
"description": "Errors, alerts."
|
|
59
|
+
},
|
|
60
|
+
"secondary": {
|
|
61
|
+
"$ref": "#/$defs/colorPair",
|
|
62
|
+
"description": "Security, authentication."
|
|
63
|
+
},
|
|
64
|
+
"neutral": {
|
|
65
|
+
"$ref": "#/$defs/colorPair",
|
|
66
|
+
"description": "External systems, neutral components."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"typography": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"description": "Font settings for vertex styles.",
|
|
73
|
+
"required": ["fontFamily", "fontSize", "fontColor"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"fontFamily": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "CSS font-family value."
|
|
78
|
+
},
|
|
79
|
+
"fontSize": {
|
|
80
|
+
"type": "integer",
|
|
81
|
+
"minimum": 8,
|
|
82
|
+
"maximum": 48,
|
|
83
|
+
"description": "Default font size for labels."
|
|
84
|
+
},
|
|
85
|
+
"titleFontSize": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 8,
|
|
88
|
+
"maximum": 72,
|
|
89
|
+
"description": "Font size for titles/section headers."
|
|
90
|
+
},
|
|
91
|
+
"subLabelFontSize": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"minimum": 6,
|
|
94
|
+
"maximum": 36,
|
|
95
|
+
"description": "Font size for sub-labels and annotations."
|
|
96
|
+
},
|
|
97
|
+
"fontColor": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
100
|
+
"description": "Primary text color."
|
|
101
|
+
},
|
|
102
|
+
"secondaryFontColor": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
105
|
+
"description": "Secondary/muted text color."
|
|
106
|
+
},
|
|
107
|
+
"titleFontFamily": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"description": "Optional separate font for titles (e.g., serif for Dark Luxury)."
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"shapes": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"description": "Shape style preferences.",
|
|
116
|
+
"required": ["rounded"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"rounded": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"enum": [0, 1],
|
|
121
|
+
"description": "0 = sharp corners, 1 = rounded corners."
|
|
122
|
+
},
|
|
123
|
+
"strokeWidth": {
|
|
124
|
+
"type": "number",
|
|
125
|
+
"minimum": 0.5,
|
|
126
|
+
"maximum": 10,
|
|
127
|
+
"description": "Default stroke width for vertex shapes."
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"edges": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"description": "Edge/connector style preferences.",
|
|
134
|
+
"required": ["baseStyle", "flows"],
|
|
135
|
+
"properties": {
|
|
136
|
+
"baseStyle": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"description": "Base edge style string (before color/dash routing properties)."
|
|
139
|
+
},
|
|
140
|
+
"edgeStrokeWidth": {
|
|
141
|
+
"type": "number",
|
|
142
|
+
"minimum": 0.5,
|
|
143
|
+
"maximum": 10,
|
|
144
|
+
"description": "Default stroke width for edges."
|
|
145
|
+
},
|
|
146
|
+
"flows": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "Flow-type to edge color/dash mapping.",
|
|
149
|
+
"patternProperties": {
|
|
150
|
+
"^[a-z-]+$": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"required": ["strokeColor"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"strokeColor": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
157
|
+
},
|
|
158
|
+
"dashed": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"default": false
|
|
161
|
+
},
|
|
162
|
+
"strokeWidth": {
|
|
163
|
+
"type": "number",
|
|
164
|
+
"minimum": 0.5
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"extras": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"description": "Additional style flags applied to all vertices/edges.",
|
|
175
|
+
"properties": {
|
|
176
|
+
"sketch": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"description": "Enable draw.io sketch mode (rough edges)."
|
|
179
|
+
},
|
|
180
|
+
"shadow": {
|
|
181
|
+
"type": "boolean",
|
|
182
|
+
"description": "Enable drop shadow on shapes."
|
|
183
|
+
},
|
|
184
|
+
"glass": {
|
|
185
|
+
"type": "boolean",
|
|
186
|
+
"description": "Enable glass effect (semi-transparent)."
|
|
187
|
+
},
|
|
188
|
+
"globalStrokeWidth": {
|
|
189
|
+
"type": "number",
|
|
190
|
+
"description": "Override stroke width for all vertices and edges."
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"$defs": {
|
|
196
|
+
"colorPair": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"required": ["fillColor", "strokeColor"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"fillColor": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"pattern": "^(#[0-9a-fA-F]{6}|none)$",
|
|
203
|
+
"description": "Hex fill color or 'none' for transparent."
|
|
204
|
+
},
|
|
205
|
+
"strokeColor": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"pattern": "^#[0-9a-fA-F]{6}$",
|
|
208
|
+
"description": "Hex stroke/border color."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|