@elmethis/draw.io 0.1.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/LICENSE +21 -0
- package/README.md +34 -0
- package/dist/draw.io-config.json +260 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ikuma Yamashita
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `@elmethis/draw.io`
|
|
2
|
+
|
|
3
|
+
A [diagrams.net](https://www.diagrams.net/) editor configuration generated from
|
|
4
|
+
the design tokens published by `@elmethis/core`.
|
|
5
|
+
|
|
6
|
+
## Use In diagrams.net
|
|
7
|
+
|
|
8
|
+
1. Build `@elmethis/core`, then this package.
|
|
9
|
+
2. Open **Extras > Configuration** in diagrams.net.
|
|
10
|
+
3. Paste the contents of `dist/draw.io-config.json` into the JSON tab.
|
|
11
|
+
4. Apply the configuration and reload the editor.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
pnpm --filter @elmethis/core run build
|
|
15
|
+
pnpm --filter @elmethis/draw.io run build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The generated configuration uses explicit `light-dark()` color pairs with
|
|
19
|
+
simple adaptive colors, Elmethis color palettes and named color schemes, and
|
|
20
|
+
the Elmethis sans-serif fonts for shapes, connectors, standalone text, and SVG
|
|
21
|
+
font embedding.
|
|
22
|
+
|
|
23
|
+
## Package Export
|
|
24
|
+
|
|
25
|
+
The generated JSON is available from the package root or the explicit
|
|
26
|
+
`draw.io-config.json` subpath.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import config from "@elmethis/draw.io" with { type: "json" };
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The package intentionally does not set `override`, editor layout, libraries, or
|
|
33
|
+
keyboard behavior. Those are user and deployment preferences rather than
|
|
34
|
+
Elmethis design tokens.
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
{
|
|
2
|
+
"__README": [
|
|
3
|
+
"Generated by @elmethis/draw.io from @elmethis/core design tokens.",
|
|
4
|
+
"See https://www.drawio.com/docs/reference/configure-diagram-editor/"
|
|
5
|
+
],
|
|
6
|
+
"version": "elmethis-1",
|
|
7
|
+
"defaultAdaptiveColors": "simple",
|
|
8
|
+
"embedSvgFonts": true,
|
|
9
|
+
"customColorSchemes": [
|
|
10
|
+
[
|
|
11
|
+
{
|
|
12
|
+
"title": "Display Red",
|
|
13
|
+
"fill": "#ae6e6e",
|
|
14
|
+
"stroke": "#ae6e6e",
|
|
15
|
+
"font": "#ae6e6e"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "Display Orange",
|
|
19
|
+
"fill": "#b8816e",
|
|
20
|
+
"stroke": "#b8816e",
|
|
21
|
+
"font": "#b8816e"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "Display Yellow",
|
|
25
|
+
"fill": "#b09a66",
|
|
26
|
+
"stroke": "#b09a66",
|
|
27
|
+
"font": "#b09a66"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Display Green",
|
|
31
|
+
"fill": "#659878",
|
|
32
|
+
"stroke": "#659878",
|
|
33
|
+
"font": "#659878"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"title": "Display Cyan",
|
|
37
|
+
"fill": "#6091a0",
|
|
38
|
+
"stroke": "#6091a0",
|
|
39
|
+
"font": "#6091a0"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"title": "Display Blue",
|
|
43
|
+
"fill": "#68779f",
|
|
44
|
+
"stroke": "#68779f",
|
|
45
|
+
"font": "#68779f"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"title": "Display Purple",
|
|
49
|
+
"fill": "#8d799f",
|
|
50
|
+
"stroke": "#8d799f",
|
|
51
|
+
"font": "#8d799f"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": "Display Magenta",
|
|
55
|
+
"fill": "#b17396",
|
|
56
|
+
"stroke": "#b17396",
|
|
57
|
+
"font": "#b17396"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"title": "Display Red Surface",
|
|
61
|
+
"fill": "light-dark(#e9dddd, #291313)",
|
|
62
|
+
"stroke": "#ae6e6e",
|
|
63
|
+
"font": "#ae6e6e"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"title": "Display Orange Surface",
|
|
67
|
+
"fill": "light-dark(#ebdfdb, #3f251c)",
|
|
68
|
+
"stroke": "#b8816e",
|
|
69
|
+
"font": "#b8816e"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"title": "Display Yellow Surface",
|
|
73
|
+
"fill": "light-dark(#ebe6db, #332b19)",
|
|
74
|
+
"stroke": "#b09a66",
|
|
75
|
+
"font": "#b09a66"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"title": "Display Green Surface",
|
|
79
|
+
"fill": "light-dark(#dde9e2, #15281d)",
|
|
80
|
+
"stroke": "#659878",
|
|
81
|
+
"font": "#659878"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"title": "Display Cyan Surface",
|
|
85
|
+
"fill": "light-dark(#dde9e7, #203b37)",
|
|
86
|
+
"stroke": "#6091a0",
|
|
87
|
+
"font": "#6091a0"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"title": "Display Blue Surface",
|
|
91
|
+
"fill": "light-dark(#dde2e9, #242d3e)",
|
|
92
|
+
"stroke": "#68779f",
|
|
93
|
+
"font": "#68779f"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"title": "Display Purple Surface",
|
|
97
|
+
"fill": "light-dark(#e3dde9, #271836)",
|
|
98
|
+
"stroke": "#8d799f",
|
|
99
|
+
"font": "#8d799f"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"title": "Display Magenta Surface",
|
|
103
|
+
"fill": "light-dark(#eadce4, #3c1f2f)",
|
|
104
|
+
"stroke": "#b17396",
|
|
105
|
+
"font": "#b17396"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
],
|
|
109
|
+
"presetColors": [
|
|
110
|
+
"light-dark(#949ba7, #949ba7)",
|
|
111
|
+
"light-dark(#6c7483, #b0b5be)",
|
|
112
|
+
"light-dark(#555b67, #d7d9e1)",
|
|
113
|
+
null,
|
|
114
|
+
"light-dark(#bda68b, #bda68b)",
|
|
115
|
+
"light-dark(#a68c70, #c6b5a2)",
|
|
116
|
+
"light-dark(#8e7356, #cabfb2)",
|
|
117
|
+
null,
|
|
118
|
+
"light-dark(#d9d3cc, #31353a)",
|
|
119
|
+
"light-dark(#efecea, #393e46)",
|
|
120
|
+
"light-dark(#f7f5f4, #40444c)",
|
|
121
|
+
null
|
|
122
|
+
],
|
|
123
|
+
"defaultColors": [
|
|
124
|
+
"light-dark(#949ba7, #949ba7)",
|
|
125
|
+
"light-dark(#6c7483, #b0b5be)",
|
|
126
|
+
"light-dark(#555b67, #d7d9e1)",
|
|
127
|
+
"d7d9e1",
|
|
128
|
+
"b0b5be",
|
|
129
|
+
"949ba7",
|
|
130
|
+
"6c7483",
|
|
131
|
+
"555b67",
|
|
132
|
+
"40444c",
|
|
133
|
+
"393e46",
|
|
134
|
+
"31353a",
|
|
135
|
+
"242629",
|
|
136
|
+
"light-dark(#bda68b, #bda68b)",
|
|
137
|
+
"light-dark(#a68c70, #c6b5a2)",
|
|
138
|
+
"light-dark(#8e7356, #cabfb2)",
|
|
139
|
+
"f7f5f4",
|
|
140
|
+
"efecea",
|
|
141
|
+
"d9d3cc",
|
|
142
|
+
"cabfb2",
|
|
143
|
+
"c6b5a2",
|
|
144
|
+
"bda68b",
|
|
145
|
+
"a68c70",
|
|
146
|
+
"8e7356",
|
|
147
|
+
"6e583f",
|
|
148
|
+
"e9dddd",
|
|
149
|
+
"ae6e6e",
|
|
150
|
+
"291313",
|
|
151
|
+
"ebdfdb",
|
|
152
|
+
"b8816e",
|
|
153
|
+
"3f251c",
|
|
154
|
+
"ebe6db",
|
|
155
|
+
"b09a66",
|
|
156
|
+
"332b19",
|
|
157
|
+
"dde9e2",
|
|
158
|
+
"659878",
|
|
159
|
+
"15281d",
|
|
160
|
+
"dde9e7",
|
|
161
|
+
"6091a0",
|
|
162
|
+
"203b37",
|
|
163
|
+
"dde2e9",
|
|
164
|
+
"68779f",
|
|
165
|
+
"242d3e",
|
|
166
|
+
"e3dde9",
|
|
167
|
+
"8d799f",
|
|
168
|
+
"271836",
|
|
169
|
+
"eadce4",
|
|
170
|
+
"b17396",
|
|
171
|
+
"3c1f2f"
|
|
172
|
+
],
|
|
173
|
+
"colorNames": {
|
|
174
|
+
"242629": "Slate 900",
|
|
175
|
+
"271836": "Purple 900",
|
|
176
|
+
"291313": "Red 900",
|
|
177
|
+
"659878": "Green 500",
|
|
178
|
+
"D7D9E1": "Slate 100",
|
|
179
|
+
"B0B5BE": "Slate 200",
|
|
180
|
+
"949BA7": "Slate 300",
|
|
181
|
+
"6C7483": "Slate 400",
|
|
182
|
+
"555B67": "Slate 500",
|
|
183
|
+
"40444C": "Slate 600",
|
|
184
|
+
"393E46": "Slate 700",
|
|
185
|
+
"31353A": "Slate 800",
|
|
186
|
+
"F7F5F4": "Gold 100",
|
|
187
|
+
"EFECEA": "Gold 200",
|
|
188
|
+
"D9D3CC": "Gold 300",
|
|
189
|
+
"CABFB2": "Gold 400",
|
|
190
|
+
"C6B5A2": "Gold 500",
|
|
191
|
+
"BDA68B": "Gold 600",
|
|
192
|
+
"A68C70": "Gold 700",
|
|
193
|
+
"8E7356": "Gold 800",
|
|
194
|
+
"6E583F": "Gold 900",
|
|
195
|
+
"E9DDDD": "Red 100",
|
|
196
|
+
"AE6E6E": "Red 500",
|
|
197
|
+
"LIGHT-DARK(#E9DDDD, #291313)": "Red Surface",
|
|
198
|
+
"EBDFDB": "Orange 100",
|
|
199
|
+
"B8816E": "Orange 500",
|
|
200
|
+
"3F251C": "Orange 900",
|
|
201
|
+
"LIGHT-DARK(#EBDFDB, #3F251C)": "Orange Surface",
|
|
202
|
+
"EBE6DB": "Yellow 100",
|
|
203
|
+
"B09A66": "Yellow 500",
|
|
204
|
+
"332B19": "Yellow 900",
|
|
205
|
+
"LIGHT-DARK(#EBE6DB, #332B19)": "Yellow Surface",
|
|
206
|
+
"DDE9E2": "Green 100",
|
|
207
|
+
"15281D": "Green 900",
|
|
208
|
+
"LIGHT-DARK(#DDE9E2, #15281D)": "Green Surface",
|
|
209
|
+
"DDE9E7": "Cyan 100",
|
|
210
|
+
"6091A0": "Cyan 500",
|
|
211
|
+
"203B37": "Cyan 900",
|
|
212
|
+
"LIGHT-DARK(#DDE9E7, #203B37)": "Cyan Surface",
|
|
213
|
+
"DDE2E9": "Blue 100",
|
|
214
|
+
"68779F": "Blue 500",
|
|
215
|
+
"242D3E": "Blue 900",
|
|
216
|
+
"LIGHT-DARK(#DDE2E9, #242D3E)": "Blue Surface",
|
|
217
|
+
"E3DDE9": "Purple 100",
|
|
218
|
+
"8D799F": "Purple 500",
|
|
219
|
+
"LIGHT-DARK(#E3DDE9, #271836)": "Purple Surface",
|
|
220
|
+
"EADCE4": "Magenta 100",
|
|
221
|
+
"B17396": "Magenta 500",
|
|
222
|
+
"3C1F2F": "Magenta 900",
|
|
223
|
+
"LIGHT-DARK(#EADCE4, #3C1F2F)": "Magenta Surface",
|
|
224
|
+
"LIGHT-DARK(#949BA7, #949BA7)": "Neutral Weak",
|
|
225
|
+
"LIGHT-DARK(#6C7483, #B0B5BE)": "Neutral",
|
|
226
|
+
"LIGHT-DARK(#555B67, #D7D9E1)": "Neutral Strong",
|
|
227
|
+
"LIGHT-DARK(#BDA68B, #BDA68B)": "Primary Weak",
|
|
228
|
+
"LIGHT-DARK(#A68C70, #C6B5A2)": "Primary",
|
|
229
|
+
"LIGHT-DARK(#8E7356, #CABFB2)": "Primary Strong",
|
|
230
|
+
"LIGHT-DARK(#D9D3CC, #31353A)": "Surface Sunken",
|
|
231
|
+
"LIGHT-DARK(#EFECEA, #393E46)": "Surface Base",
|
|
232
|
+
"LIGHT-DARK(#F7F5F4, #40444C)": "Surface Raised"
|
|
233
|
+
},
|
|
234
|
+
"defaultFonts": [
|
|
235
|
+
{
|
|
236
|
+
"fontFamily": "DM Sans",
|
|
237
|
+
"fontUrl": "https://fonts.googleapis.com/css?family=DM+Sans"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"fontFamily": "Zen Kaku Gothic New",
|
|
241
|
+
"fontUrl": "https://fonts.googleapis.com/css?family=Zen+Kaku+Gothic+New"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"defaultTextStyle": "text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;fontFamily=DM Sans;fontSize=16;fontColor=light-dark(#6c7483, #b0b5be);fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DDM%2BSans;",
|
|
245
|
+
"defaultVertexStyle": {
|
|
246
|
+
"fontFamily": "DM Sans",
|
|
247
|
+
"fontSize": "16",
|
|
248
|
+
"fontColor": "light-dark(#6c7483, #b0b5be)",
|
|
249
|
+
"fontSource": "https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DDM%2BSans"
|
|
250
|
+
},
|
|
251
|
+
"defaultEdgeStyle": {
|
|
252
|
+
"fontFamily": "DM Sans",
|
|
253
|
+
"fontSize": "16",
|
|
254
|
+
"fontColor": "light-dark(#6c7483, #b0b5be)",
|
|
255
|
+
"fontSource": "https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DDM%2BSans",
|
|
256
|
+
"strokeColor": "light-dark(#6c7483, #b0b5be)",
|
|
257
|
+
"startFillColor": "light-dark(#6c7483, #b0b5be)",
|
|
258
|
+
"endFillColor": "light-dark(#6c7483, #b0b5be)"
|
|
259
|
+
}
|
|
260
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elmethis/draw.io",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "Ikuma Yamashita",
|
|
6
|
+
"url": "https://www.ikuma.cloud/"
|
|
7
|
+
},
|
|
8
|
+
"description": "diagrams.net configuration generated from the Elmethis design tokens.",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/46ki75/elmethis.git",
|
|
12
|
+
"directory": "packages/drawio"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/46ki75/elmethis/tree/main/packages/drawio#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/46ki75/elmethis/issues"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "./dist/draw.io-config.json",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/draw.io-config.json",
|
|
25
|
+
"./draw.io-config.json": "./dist/draw.io-config.json"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "26.1.1",
|
|
37
|
+
"prettier": "3.9.6",
|
|
38
|
+
"tsx": "^4.23.1",
|
|
39
|
+
"typescript": "5.9.3",
|
|
40
|
+
"@elmethis/core": "^0.23.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsx scripts/build-drawio-config.ts",
|
|
44
|
+
"build.types": "tsc --noEmit",
|
|
45
|
+
"fmt": "prettier --write ./scripts ./README.md",
|
|
46
|
+
"fmt.check": "prettier --check ./scripts ./README.md",
|
|
47
|
+
"check": "pnpm run fmt.check && pnpm run build.types && pnpm run build",
|
|
48
|
+
"check.ci": "pnpm run check"
|
|
49
|
+
}
|
|
50
|
+
}
|