mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 16:27:41 +01:00
Compare commits
693 Commits
v0.256.1
...
fix/fixed-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8f578fa8b | ||
|
|
97f214934d | ||
|
|
34dfc63ce2 | ||
|
|
b46927e510 | ||
|
|
1828a392c8 | ||
|
|
3ab6c373a0 | ||
|
|
ba2c4b526f | ||
|
|
bde3f01e0b | ||
|
|
50630b3aaf | ||
|
|
e28426a871 | ||
|
|
eb158561d3 | ||
|
|
410ae434fa | ||
|
|
0801b89e4d | ||
|
|
a1d17eedc9 | ||
|
|
7481dd0a3f | ||
|
|
f9e93824f1 | ||
|
|
4ba4cf2f35 | ||
|
|
6b29716aa9 | ||
|
|
97bbe1d6b2 | ||
|
|
608da04bdf | ||
|
|
961404d5cc | ||
|
|
f3100b8af1 | ||
|
|
0df4e2991c | ||
|
|
2b8242fa14 | ||
|
|
27c667556b | ||
|
|
31c3fefc17 | ||
|
|
389fed8770 | ||
|
|
58c2e108c3 | ||
|
|
d5fe5a0ef4 | ||
|
|
db30ab89f4 | ||
|
|
fa7120cbe0 | ||
|
|
419d47019c | ||
|
|
655111e4aa | ||
|
|
ea0ac2f92b | ||
|
|
1a5ee439ef | ||
|
|
5947ca82d5 | ||
|
|
edf46adc9e | ||
|
|
94782f53c1 | ||
|
|
79bbfa958e | ||
|
|
970fc3d4be | ||
|
|
f12b0de177 | ||
|
|
67cbce66e9 | ||
|
|
b927275150 | ||
|
|
ea89735f67 | ||
|
|
53c61c0f48 | ||
|
|
4213367a37 | ||
|
|
bc22d17fa9 | ||
|
|
7773135308 | ||
|
|
4f740348cd | ||
|
|
ca50dd8bc8 | ||
|
|
6b19d52ab0 | ||
|
|
7fc3467761 | ||
|
|
ee575f6ae9 | ||
|
|
212b488dae | ||
|
|
4f038d5fe8 | ||
|
|
5ca6bc3385 | ||
|
|
15e4b6b69d | ||
|
|
407b55f57c | ||
|
|
6fc7297199 | ||
|
|
c21df35283 | ||
|
|
775359260c | ||
|
|
eaeef9ae37 | ||
|
|
636f966a98 | ||
|
|
1d5c725b58 | ||
|
|
d9a011994a | ||
|
|
c6c645ca7f | ||
|
|
91391eea7b | ||
|
|
49070b4d1f | ||
|
|
ae43473aa6 | ||
|
|
392bc961aa | ||
|
|
f238fe1b18 | ||
|
|
4d91fbb588 | ||
|
|
d939a7005d | ||
|
|
2c55c2ab93 | ||
|
|
cb60e31162 | ||
|
|
09cebe178d | ||
|
|
0f3fd12f16 | ||
|
|
4b0d17ad24 | ||
|
|
30fe706dd6 | ||
|
|
d6178fa471 | ||
|
|
855cb4985d | ||
|
|
9f99ea510f | ||
|
|
e2ee0c77e7 | ||
|
|
d041d5c2d2 | ||
|
|
8700418260 | ||
|
|
30077f913f | ||
|
|
bc09d5f283 | ||
|
|
88c757f540 | ||
|
|
f93beca595 | ||
|
|
b1777430b9 | ||
|
|
d30698cb38 | ||
|
|
d2f7a0931d | ||
|
|
98bbcc4b06 | ||
|
|
c253cb821b | ||
|
|
484dc38b0a | ||
|
|
11b95f883a | ||
|
|
b8cd54f1b2 | ||
|
|
98b3b6fae7 | ||
|
|
3ca465ee11 | ||
|
|
dcd19cedc9 | ||
|
|
8cea9feecc | ||
|
|
e80d98040f | ||
|
|
a1641a372b | ||
|
|
757bf0fb85 | ||
|
|
dd3aed1ecd | ||
|
|
4d98681f05 | ||
|
|
bde9e1cb6b | ||
|
|
a5e07c28bd | ||
|
|
2a68b12cbe | ||
|
|
493382b4fd | ||
|
|
6588971ead | ||
|
|
13cea45e8b | ||
|
|
5dfcfc8d1a | ||
|
|
db24b1d517 | ||
|
|
e1202b545e | ||
|
|
2e1a5cf6ea | ||
|
|
f49ecd73a5 | ||
|
|
a72cbc2d49 | ||
|
|
d4976890e5 | ||
|
|
8c8d1d3338 | ||
|
|
542507f835 | ||
|
|
c6a4908ed0 | ||
|
|
b6e71c6c7a | ||
|
|
7de43440ee | ||
|
|
c8d5260d54 | ||
|
|
0c912bd7ff | ||
|
|
3f24597a65 | ||
|
|
590d59ac5f | ||
|
|
85d427d846 | ||
|
|
478a624162 | ||
|
|
f0afdd4614 | ||
|
|
38e7431189 | ||
|
|
19dd912381 | ||
|
|
f70d5f5169 | ||
|
|
30e0d55b4a | ||
|
|
36a5a8b9ac | ||
|
|
e20e7a43ba | ||
|
|
e8ab1bc15b | ||
|
|
ef090c7dd4 | ||
|
|
65e49e2684 | ||
|
|
0ca2099113 | ||
|
|
9c99fd809c | ||
|
|
cd0d4e1f8a | ||
|
|
e1668804c9 | ||
|
|
efcede62e7 | ||
|
|
3c3f548ec1 | ||
|
|
0160bbe539 | ||
|
|
7837a04438 | ||
|
|
944e428630 | ||
|
|
aa4b1f06b4 | ||
|
|
b1087d3da0 | ||
|
|
fd8d69a129 | ||
|
|
379df75eda | ||
|
|
25707c7c47 | ||
|
|
cbb4ed985c | ||
|
|
d7d1074a60 | ||
|
|
79c2333b7f | ||
|
|
e3f78d73d8 | ||
|
|
e391973a70 | ||
|
|
5a2e3a20ee | ||
|
|
6e65118cd3 | ||
|
|
10c3662ff1 | ||
|
|
c7c6b479fc | ||
|
|
442e477a9a | ||
|
|
777166c06d | ||
|
|
8be94e7f86 | ||
|
|
07dd0bfdb1 | ||
|
|
3271972d97 | ||
|
|
915e8b5b6d | ||
|
|
6c32e47bea | ||
|
|
d4d90f0d4e | ||
|
|
3cf67355b4 | ||
|
|
66bc180c84 | ||
|
|
3c6a8c5118 | ||
|
|
8a088af570 | ||
|
|
cf5d6fc887 | ||
|
|
6052c88831 | ||
|
|
6272f4fd1f | ||
|
|
89070bfa44 | ||
|
|
4cae01a2f5 | ||
|
|
c2cc325f40 | ||
|
|
3143b24dff | ||
|
|
f0625d085e | ||
|
|
beddaa7cbb | ||
|
|
158212c130 | ||
|
|
1d5edc507d | ||
|
|
6f44a5d624 | ||
|
|
1c12bae0f5 | ||
|
|
fdcb73cb7a | ||
|
|
f2f685bd65 | ||
|
|
18d18361e8 | ||
|
|
45c3c00d1d | ||
|
|
45bc8c08da | ||
|
|
6676cdd513 | ||
|
|
eb93f112bd | ||
|
|
54a58881da | ||
|
|
568d0b2fa3 | ||
|
|
2d1be858c8 | ||
|
|
fa6ddf923f | ||
|
|
658b94e65a | ||
|
|
137ab5c885 | ||
|
|
83284d842a | ||
|
|
8993b0b174 | ||
|
|
1b2b66f1f3 | ||
|
|
0186afc0e6 | ||
|
|
36c68bd901 | ||
|
|
e8abed3fa7 | ||
|
|
b4af645560 | ||
|
|
8f65b7e6f4 | ||
|
|
3c3e3508ec | ||
|
|
01e5fd74e6 | ||
|
|
7c62c7c662 | ||
|
|
e92d5e2d40 | ||
|
|
3975020fd2 | ||
|
|
43dfe362b6 | ||
|
|
58524b25ee | ||
|
|
34805df73f | ||
|
|
7cb867782d | ||
|
|
63deb3e4f9 | ||
|
|
4dcc340301 | ||
|
|
8bd401fa8c | ||
|
|
338fc70f6d | ||
|
|
7ca1fabc12 | ||
|
|
0d2c6c457e | ||
|
|
2539470978 | ||
|
|
12b412aa87 | ||
|
|
c8b00be37e | ||
|
|
291b11fbd1 | ||
|
|
4635141dfa | ||
|
|
c761ec7b5e | ||
|
|
bbd877a3ba | ||
|
|
e830fb16e0 | ||
|
|
7625cab264 | ||
|
|
7726b7e7ff | ||
|
|
bca0eeaf09 | ||
|
|
8125a21a7e | ||
|
|
077242cfa0 | ||
|
|
ce79418c66 | ||
|
|
80350b2cb1 | ||
|
|
172f397019 | ||
|
|
a463d8a5c7 | ||
|
|
fbd5225aad | ||
|
|
acd4a879f2 | ||
|
|
e11fa135a0 | ||
|
|
f980863f6c | ||
|
|
07230a442f | ||
|
|
a34919f0af | ||
|
|
f4d451de80 | ||
|
|
1e887bc30f | ||
|
|
1442b9a35b | ||
|
|
41fd856578 | ||
|
|
621b60b19d | ||
|
|
b77e372f3e | ||
|
|
d4891a7307 | ||
|
|
199987276b | ||
|
|
5647b34594 | ||
|
|
439e463430 | ||
|
|
22921304a7 | ||
|
|
220abb1510 | ||
|
|
91ce9221e8 | ||
|
|
904d74fe4a | ||
|
|
f507644488 | ||
|
|
501b65a7a1 | ||
|
|
14862fb0dc | ||
|
|
2963369c8d | ||
|
|
1e20d5087a | ||
|
|
4b312b369f | ||
|
|
afbef743de | ||
|
|
864fdeca84 | ||
|
|
541add925c | ||
|
|
2e7df30267 | ||
|
|
0a578c8803 | ||
|
|
b227caee98 | ||
|
|
72b74fbdb4 | ||
|
|
01d36ad363 | ||
|
|
548cb9cdf5 | ||
|
|
79430da42e | ||
|
|
0620843f4c | ||
|
|
34d063302a | ||
|
|
0abc3389db | ||
|
|
ebb8ec66af | ||
|
|
f55ced97a5 | ||
|
|
8458345535 | ||
|
|
66d6c2fe4b | ||
|
|
053808685c | ||
|
|
4f2a6b70d8 | ||
|
|
d8004e471a | ||
|
|
e2b46eac8e | ||
|
|
1b3173b17b | ||
|
|
d5f4275055 | ||
|
|
6abae7cc14 | ||
|
|
f32ffcd2a2 | ||
|
|
824bb897cf | ||
|
|
2843a76e28 | ||
|
|
155ff3319a | ||
|
|
34dddb811b | ||
|
|
5fead67bf3 | ||
|
|
48dc9372db | ||
|
|
747446fc76 | ||
|
|
5862ea735e | ||
|
|
3a8a349771 | ||
|
|
70bc2245c7 | ||
|
|
89f6b6357d | ||
|
|
354af456d3 | ||
|
|
e50582e93e | ||
|
|
65deefa53c | ||
|
|
54ef137b49 | ||
|
|
d4df542117 | ||
|
|
8c1e56a7bf | ||
|
|
dff2172173 | ||
|
|
e8ccd3df7e | ||
|
|
b593355537 | ||
|
|
09420cbca5 | ||
|
|
45e82a51b8 | ||
|
|
305e282e19 | ||
|
|
ad7ae84987 | ||
|
|
df100bde73 | ||
|
|
0724851934 | ||
|
|
34cf88d209 | ||
|
|
6322d1df66 | ||
|
|
8a414b3249 | ||
|
|
58f614acca | ||
|
|
d598ad7190 | ||
|
|
439ee3f707 | ||
|
|
c2c85fbd5c | ||
|
|
59aa7bc824 | ||
|
|
0beb50ebca | ||
|
|
649b440d9d | ||
|
|
a74e8f3863 | ||
|
|
46318b1605 | ||
|
|
4bf91a3c51 | ||
|
|
3cde4f2a41 | ||
|
|
d75c7613b2 | ||
|
|
d17e81d712 | ||
|
|
3b4a19efcf | ||
|
|
94bbdb4e06 | ||
|
|
4b87cdb55f | ||
|
|
52de557ec1 | ||
|
|
642fa718f6 | ||
|
|
215f0767d7 | ||
|
|
a0befaf186 | ||
|
|
167f563f6d | ||
|
|
0ee6b84a06 | ||
|
|
9a65837e45 | ||
|
|
4c6587612a | ||
|
|
4aa36db1cb | ||
|
|
01401a3c97 | ||
|
|
d1e528fd95 | ||
|
|
5f5be9ec1e | ||
|
|
c66cda28da | ||
|
|
e565116a4a | ||
|
|
cf50c9f849 | ||
|
|
9fa47227a7 | ||
|
|
547111ed5b | ||
|
|
0d6aa9feaa | ||
|
|
3a0f2b3fa8 | ||
|
|
712e6bf6e4 | ||
|
|
58319dd447 | ||
|
|
cf89b8eeac | ||
|
|
a8c6add82b | ||
|
|
d000e4904d | ||
|
|
c99d6cbf4a | ||
|
|
0b1fb8ff1f | ||
|
|
dcde43e97e | ||
|
|
96da23cc88 | ||
|
|
78182c3573 | ||
|
|
02f8f5a1c1 | ||
|
|
16ee591f49 | ||
|
|
5378156833 | ||
|
|
7b76078792 | ||
|
|
e2af1af4f9 | ||
|
|
c9513d0bf4 | ||
|
|
6fbd5ee06a | ||
|
|
d8773827fb | ||
|
|
bc1843f767 | ||
|
|
07aefe3b88 | ||
|
|
76d449a974 | ||
|
|
dd39fa328c | ||
|
|
0cf568c38b | ||
|
|
a8b8dfc58e | ||
|
|
41dde6b574 | ||
|
|
ae35ca256c | ||
|
|
38142f24a5 | ||
|
|
b16f70993a | ||
|
|
ad1accb2e3 | ||
|
|
d255c6ac4e | ||
|
|
d67ef7b0ca | ||
|
|
198ccb8430 | ||
|
|
ce1b5bdefa | ||
|
|
45aa928369 | ||
|
|
93dc356fa1 | ||
|
|
a0aa132682 | ||
|
|
1a4dd64862 | ||
|
|
3481f70ad7 | ||
|
|
024f21e896 | ||
|
|
c30ccd472e | ||
|
|
28ec03ebc8 | ||
|
|
ab3a31367a | ||
|
|
148bae88d8 | ||
|
|
ca4a38ba85 | ||
|
|
f297765a13 | ||
|
|
4657ccbfff | ||
|
|
db222d4591 | ||
|
|
bafad1c625 | ||
|
|
7f1e95c6e7 | ||
|
|
ca7a87112c | ||
|
|
d542da0a1c | ||
|
|
6fa51d2a22 | ||
|
|
ca53b06af2 | ||
|
|
b5dc96d2c2 | ||
|
|
5e5fe0085f | ||
|
|
0c2a8d774f | ||
|
|
804906dcd8 | ||
|
|
d575743d3a | ||
|
|
42c1faed75 | ||
|
|
42b494f853 | ||
|
|
9bf8a653a3 | ||
|
|
01cff578e5 | ||
|
|
a0b1305258 | ||
|
|
0cfdfa2181 | ||
|
|
a2e8ea32d2 | ||
|
|
8a7e6ba343 | ||
|
|
7a9233f4a7 | ||
|
|
71aef25812 | ||
|
|
33189a81ac | ||
|
|
e3923f87c2 | ||
|
|
08c040a57d | ||
|
|
981c3309ce | ||
|
|
2e0af66d8a | ||
|
|
a789c91213 | ||
|
|
91c95600f3 | ||
|
|
99acf4102c | ||
|
|
86f2dc12f4 | ||
|
|
b9fdde2d09 | ||
|
|
5c494962e1 | ||
|
|
772c5be034 | ||
|
|
ee3483eb1b | ||
|
|
9182c51962 | ||
|
|
eb035fe370 | ||
|
|
b96e6acd2e | ||
|
|
7b62649c39 | ||
|
|
10aff6cf7b | ||
|
|
cfa8924025 | ||
|
|
713e9b8a09 | ||
|
|
8ab6f80e4f | ||
|
|
a5221c236a | ||
|
|
cdd32b5294 | ||
|
|
54c8d4078d | ||
|
|
3302870983 | ||
|
|
0f25ee86a0 | ||
|
|
28686b5bd5 | ||
|
|
8cc143915c | ||
|
|
06372db723 | ||
|
|
114fb08556 | ||
|
|
3bad7f6ced | ||
|
|
e450afe408 | ||
|
|
6fcfc820ca | ||
|
|
55f264bea6 | ||
|
|
675158df16 | ||
|
|
042393a931 | ||
|
|
551635003c | ||
|
|
5c7119f6d1 | ||
|
|
7bfdb2f54a | ||
|
|
e3abcdbcc6 | ||
|
|
62d350140e | ||
|
|
ad90ee7582 | ||
|
|
b0e825cb57 | ||
|
|
d4cbe899fb | ||
|
|
be3ccc8ece | ||
|
|
e56b09d400 | ||
|
|
7e936c8803 | ||
|
|
c9ffa4033f | ||
|
|
32a6187d69 | ||
|
|
2bf20db4bf | ||
|
|
4473df5ad5 | ||
|
|
bc5efd7f0d | ||
|
|
05f209cb04 | ||
|
|
ef89510a47 | ||
|
|
b72cea6399 | ||
|
|
d2152b3cdd | ||
|
|
ea43df6431 | ||
|
|
4042a366e8 | ||
|
|
5e0ba7e897 | ||
|
|
6b4f575992 | ||
|
|
92784de9c5 | ||
|
|
314ee3b255 | ||
|
|
ee7add11bf | ||
|
|
001d0a51fb | ||
|
|
fd4308e755 | ||
|
|
59893119b5 | ||
|
|
faff6a8269 | ||
|
|
3fe74beeb0 | ||
|
|
f8aafd63b9 | ||
|
|
f0422f415c | ||
|
|
14a196d89c | ||
|
|
87a89b30da | ||
|
|
3180910b23 | ||
|
|
46a4041cc7 | ||
|
|
e3166c65df | ||
|
|
d9d7e245a3 | ||
|
|
e19a9cc43a | ||
|
|
5ecfd61397 | ||
|
|
5366782da0 | ||
|
|
262f9e8865 | ||
|
|
7af26002a0 | ||
|
|
e71a776acc | ||
|
|
0a69fb9e52 | ||
|
|
3648e02992 | ||
|
|
64504da1cd | ||
|
|
e166ba4e80 | ||
|
|
1123214b13 | ||
|
|
4140ba5612 | ||
|
|
019f38281c | ||
|
|
633595d1c1 | ||
|
|
df58c3ff2f | ||
|
|
e7abba5273 | ||
|
|
2693da38d3 | ||
|
|
ab59a1ec36 | ||
|
|
315c020279 | ||
|
|
494f7953c8 | ||
|
|
a5ea3a5368 | ||
|
|
6486f76c55 | ||
|
|
e32db96f1f | ||
|
|
73f70c885a | ||
|
|
14c7ea8e13 | ||
|
|
9fc7653dc1 | ||
|
|
2b007e7962 | ||
|
|
bb1e470f3a | ||
|
|
4a1e6bbfa5 | ||
|
|
e5ee997566 | ||
|
|
27c0a136cd | ||
|
|
84b3c46b65 | ||
|
|
1a09e7fb39 | ||
|
|
75e9724072 | ||
|
|
fbaccc7d9f | ||
|
|
c24bc4d7ef | ||
|
|
5c8c8f4362 | ||
|
|
ffd2a62941 | ||
|
|
e77959e1a6 | ||
|
|
149ee36e61 | ||
|
|
88bf60b5d7 | ||
|
|
1e5df716a4 | ||
|
|
fc0ea760e5 | ||
|
|
c85275899a | ||
|
|
288edde1ea | ||
|
|
207ff6c487 | ||
|
|
a1a9a4d839 | ||
|
|
c5804ad9a5 | ||
|
|
c72fb4a28b | ||
|
|
da5ad547b5 | ||
|
|
66cfe527b3 | ||
|
|
d1866225ba | ||
|
|
372735999f | ||
|
|
f3a33346dd | ||
|
|
3373acf596 | ||
|
|
73d5bfc318 | ||
|
|
ddbc074aa3 | ||
|
|
8f4d6b1651 | ||
|
|
d8b08f8fda | ||
|
|
fddacb6260 | ||
|
|
3d0c8691c9 | ||
|
|
47998b05aa | ||
|
|
9a9e051343 | ||
|
|
6c6c8448fa | ||
|
|
49445aad3a | ||
|
|
70656eb4f0 | ||
|
|
930f862547 | ||
|
|
931b7f5376 | ||
|
|
81e44bdc40 | ||
|
|
e6e90944b9 | ||
|
|
f6fd369bfe | ||
|
|
bbf183fe48 | ||
|
|
4f5642b872 | ||
|
|
1dce6a141a | ||
|
|
dbfce919fc | ||
|
|
52adb78df8 | ||
|
|
c5cfbed28c | ||
|
|
1e4fd13852 | ||
|
|
0a0fd1cf6c | ||
|
|
487d03fc4d | ||
|
|
950160ad5a | ||
|
|
b6f5898aee | ||
|
|
a9c1dca801 | ||
|
|
c05c7e333f | ||
|
|
dff42fe326 | ||
|
|
c1f642e20f | ||
|
|
cf9565b69c | ||
|
|
4cc4468d2f | ||
|
|
fd9ab8f17a | ||
|
|
c9101f0f39 | ||
|
|
614ef1a1d5 | ||
|
|
1a441812ac | ||
|
|
4a33e90c65 | ||
|
|
062a64a078 | ||
|
|
95a1ea7255 | ||
|
|
a0a5bc8fc2 | ||
|
|
698eded89b | ||
|
|
a70b713572 | ||
|
|
34530ad805 | ||
|
|
f73aed151a | ||
|
|
2bd7748562 | ||
|
|
da8a6c5a1b | ||
|
|
5736028dfa | ||
|
|
45d2063340 | ||
|
|
f71d3ffd1d | ||
|
|
b8c3a5fa0b | ||
|
|
a4076db69b | ||
|
|
55cb681461 | ||
|
|
09d9bb747d | ||
|
|
42f9cdceca | ||
|
|
c652723b32 | ||
|
|
a44328d8be | ||
|
|
376568239f | ||
|
|
92d05b5fca | ||
|
|
27b5b7eaad | ||
|
|
4de1355e54 | ||
|
|
c8d94bf3e1 | ||
|
|
a128d1c3c1 | ||
|
|
e145cb05e2 | ||
|
|
759ff562fd | ||
|
|
ae2899a09e | ||
|
|
8b7ea73aa3 | ||
|
|
1bdeae5364 | ||
|
|
0e307087f6 | ||
|
|
a46114b3e7 | ||
|
|
fcafe0e7b7 | ||
|
|
5312982b8f | ||
|
|
3a13fab009 | ||
|
|
30a69ee670 | ||
|
|
5f442122ab | ||
|
|
e78d910a83 | ||
|
|
ccc8dc2b34 | ||
|
|
96bcca0e08 | ||
|
|
d95b14a70b | ||
|
|
a852a43ef4 | ||
|
|
4953a95e36 | ||
|
|
cad1b95b69 | ||
|
|
92f3fb0f90 | ||
|
|
6e8895d075 | ||
|
|
a1b2ce5b7b | ||
|
|
4a54e87e84 | ||
|
|
d8bdbff9c6 | ||
|
|
70cffa8dd2 | ||
|
|
8cff59627b | ||
|
|
b684a0083b | ||
|
|
9fb4b0b161 | ||
|
|
9ec40ae506 | ||
|
|
890514de6c | ||
|
|
9463b2e445 | ||
|
|
0221022e24 | ||
|
|
751f7cb1e3 | ||
|
|
4c90b84236 | ||
|
|
01be733532 | ||
|
|
4ffa38e013 | ||
|
|
0a38dccdae | ||
|
|
3391b5b717 | ||
|
|
5c145f4e72 | ||
|
|
74429a8e92 | ||
|
|
1e99499dc8 | ||
|
|
724a43e3f0 | ||
|
|
fb79059fca | ||
|
|
9a54838538 | ||
|
|
c7438c0c10 | ||
|
|
667ae303f8 | ||
|
|
dc1d17181f | ||
|
|
26abdb904d | ||
|
|
cf0264745e | ||
|
|
510a5ec3b9 | ||
|
|
e1bc19be4e | ||
|
|
062894e113 | ||
|
|
eaa99b35f6 | ||
|
|
7c22ccfab4 | ||
|
|
e0e171db81 | ||
|
|
3b11552e5e | ||
|
|
d8b455b614 | ||
|
|
79eecc89f6 | ||
|
|
b943430a08 | ||
|
|
cebb0ee84b | ||
|
|
210c56807e | ||
|
|
c2a8f31176 | ||
|
|
a3f70d5b8b | ||
|
|
c97c6ed9e4 | ||
|
|
e9d69c6948 | ||
|
|
270c935cd4 | ||
|
|
b7377d21eb | ||
|
|
7ccf155ad4 | ||
|
|
c696d1e907 | ||
|
|
a8cf24e75a | ||
|
|
4e2773bd2d | ||
|
|
7c8f898893 | ||
|
|
c3951d36c7 | ||
|
|
f958310d91 | ||
|
|
d00cbebcc4 |
17
.cspell/custom-words.txt
Normal file
17
.cspell/custom-words.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Custom words
|
||||||
|
fullscreen
|
||||||
|
gamepad
|
||||||
|
gantt
|
||||||
|
kanban
|
||||||
|
pilcrow
|
||||||
|
squircle
|
||||||
|
strikethrough
|
||||||
|
touchpad
|
||||||
|
ungroup
|
||||||
|
pilcrow
|
||||||
|
toc
|
||||||
|
|
||||||
|
# Brands
|
||||||
|
codepen
|
||||||
|
codesandbox
|
||||||
|
dribbble
|
||||||
@@ -4,3 +4,7 @@ coverage
|
|||||||
lib
|
lib
|
||||||
tests
|
tests
|
||||||
node_modules
|
node_modules
|
||||||
|
.eslintrc.js
|
||||||
|
docs/images
|
||||||
|
docs/**/examples/
|
||||||
|
packages/lucide-react/dynamicIconImports.js
|
||||||
|
|||||||
55
.eslintrc.js
55
.eslintrc.js
@@ -1,25 +1,23 @@
|
|||||||
|
const DEFAULT_ATTRS = require('./tools/build-icons/render/default-attrs.json');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
root: true,
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
extends: ['airbnb-base', 'prettier'],
|
extends: ['airbnb-base', 'prettier'],
|
||||||
plugins: ['import', 'prettier'],
|
plugins: ['import', '@html-eslint'],
|
||||||
rules: {
|
rules: {
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
'no-param-reassign': 'off',
|
'no-param-reassign': 'off',
|
||||||
'no-shadow': 'off',
|
'no-shadow': 'off',
|
||||||
'no-use-before-define': 'off',
|
'no-use-before-define': 'off',
|
||||||
'prettier/prettier': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
singleQuote: true,
|
|
||||||
trailingComma: 'all',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'import/no-extraneous-dependencies': [
|
'import/no-extraneous-dependencies': [
|
||||||
'error',
|
'error',
|
||||||
{ devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] },
|
{
|
||||||
|
devDependencies: ['**/*.test.js', '**/*.spec.js', '**/scripts/**'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'import/extensions': [
|
'import/extensions': [
|
||||||
'error',
|
'error',
|
||||||
@@ -33,8 +31,45 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
project: ['./site/tsconfig.json', './packages/*/tsconfig.json'],
|
project: ['./docs/tsconfig.json', './packages/*/tsconfig.json'],
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
},
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['./icons/*.svg'],
|
||||||
|
parser: '@html-eslint/parser',
|
||||||
|
rules: {
|
||||||
|
'@html-eslint/require-doctype': 'off',
|
||||||
|
'@html-eslint/no-duplicate-attrs': 'error',
|
||||||
|
'@html-eslint/no-inline-styles': 'error',
|
||||||
|
'@html-eslint/require-attrs': [
|
||||||
|
'error',
|
||||||
|
...Object.entries(DEFAULT_ATTRS).map(([attr, value]) => ({
|
||||||
|
tag: 'svg',
|
||||||
|
attr,
|
||||||
|
value: String(value),
|
||||||
|
})),
|
||||||
|
],
|
||||||
|
'@html-eslint/indent': ['error', 2],
|
||||||
|
'@html-eslint/no-multiple-empty-lines': ['error', { max: 0 }],
|
||||||
|
'@html-eslint/no-extra-spacing-attrs': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
enforceBeforeSelfClose: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@html-eslint/require-closing-tags': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
selfClosing: 'always',
|
||||||
|
allowSelfClosingCustom: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@html-eslint/element-newline': 'error',
|
||||||
|
'@html-eslint/no-trailing-spaces': 'error',
|
||||||
|
'@html-eslint/quotes': 'error',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
49
.github/ISSUE_TEMPLATE/01_icon_request.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/01_icon_request.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: Icon request
|
||||||
|
description: Suggest a new icon for this project
|
||||||
|
labels: ['🙌 icon request']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before submitting an icon request check if it has already been requested. If there is an open request, please add a 👍.
|
||||||
|
|
||||||
|
**Important note**: No new brand logos are allowed, see https://github.com/lucide-icons/lucide/issues/670.
|
||||||
|
Existing brand icons will also be phased out. For brand icons, consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
|
||||||
|
- type: input
|
||||||
|
id: name
|
||||||
|
attributes:
|
||||||
|
label: Icon name
|
||||||
|
description: What should this icon depict? For multiple icons, provide a comma-separated list.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: use-cases
|
||||||
|
attributes:
|
||||||
|
label: Use cases
|
||||||
|
description: Why do you need this icon? Include at least two real-life use cases per requested icon, avoiding generic descriptions like "it's a car icon".
|
||||||
|
placeholder: e.g. I need a star icon to use in my rating system.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: design-ideas
|
||||||
|
attributes:
|
||||||
|
label: Design ideas
|
||||||
|
description: What should this icon look like? Provide simple, minimalistic icon examples from other sets or your own drafts to help us visualize your request.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: Checklist
|
||||||
|
description: Please review the following checklist before submitting your request.
|
||||||
|
options:
|
||||||
|
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
|
||||||
|
required: true
|
||||||
|
- label: I have searched existing icons to make sure it does not already exist and I didn't find any.
|
||||||
|
required: true
|
||||||
|
- label: I am not requesting a brand logo and the art is not protected by copyright.
|
||||||
|
required: true
|
||||||
|
- label: I am not requesting an icon that includes religious, political imagery or hate symbols.
|
||||||
|
required: true
|
||||||
|
- label: I have provided appropriate use cases for the icon(s) requested.
|
||||||
|
required: true
|
||||||
103
.github/ISSUE_TEMPLATE/02_bug_report.yml
vendored
Normal file
103
.github/ISSUE_TEMPLATE/02_bug_report.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
name: Bug report
|
||||||
|
description: Create a report to help us improve
|
||||||
|
labels: ['🐛 bug']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
|
||||||
|
- type: checkboxes
|
||||||
|
id: packages
|
||||||
|
attributes:
|
||||||
|
label: Package
|
||||||
|
description: Which Lucide packages are affected? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: lucide
|
||||||
|
- label: lucide-angular
|
||||||
|
- label: lucide-flutter
|
||||||
|
- label: lucide-preact
|
||||||
|
- label: lucide-react
|
||||||
|
- label: lucide-react-native
|
||||||
|
- label: lucide-solid
|
||||||
|
- label: lucide-svelte
|
||||||
|
- label: lucide-vue
|
||||||
|
- label: lucide-vue-next
|
||||||
|
- label: Figma plugin
|
||||||
|
- label: source/main
|
||||||
|
- label: other/not relevant
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: What version of Lucide are you running?
|
||||||
|
placeholder: e.g. 0.289.1
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: can-reproduce-in-latest-version
|
||||||
|
attributes:
|
||||||
|
label: Can you reproduce this in the latest version?
|
||||||
|
description: i.e. after running `npm install lucide-react@latest`
|
||||||
|
options:
|
||||||
|
- label: 'Yes'
|
||||||
|
- label: 'No'
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: browsers
|
||||||
|
attributes:
|
||||||
|
label: Browser
|
||||||
|
description: In which browser(s) are you experiencing the issue? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: Chrome/Chromium
|
||||||
|
- label: Firefox
|
||||||
|
- label: Safari
|
||||||
|
- label: Edge
|
||||||
|
- label: iOS Safari
|
||||||
|
- label: Opera
|
||||||
|
- label: Other/not relevant
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: operating-systems
|
||||||
|
attributes:
|
||||||
|
label: Operating system
|
||||||
|
description: In which operating systems a you experiencing the issue? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: Windows
|
||||||
|
- label: Linux
|
||||||
|
- label: macOS
|
||||||
|
- label: ChromeOS
|
||||||
|
- label: iOS
|
||||||
|
- label: Android
|
||||||
|
- label: Other/not relevant
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
|
||||||
|
placeholder: e.g. When I do X, Y happens instead of Z
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps-to-reproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: Please provide a detailed guide on how this issue can be reproduced or a live example with a working reproduction on Codesandbox, JSFiddle or similar.
|
||||||
|
placeholder: |
|
||||||
|
1. Import `check` icon
|
||||||
|
2. Add to a React component/view
|
||||||
|
3. Run the react app
|
||||||
|
4. Notice that the `check` isn't rendering correctly which seems a encoding problem
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: Checklist
|
||||||
|
description: Please review the following checklist before submitting your issue.
|
||||||
|
options:
|
||||||
|
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
|
||||||
|
required: true
|
||||||
65
.github/ISSUE_TEMPLATE/03_bug_report_site.yml
vendored
Normal file
65
.github/ISSUE_TEMPLATE/03_bug_report_site.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
name: lucide.dev bug report
|
||||||
|
description: Help us improve the Lucide site
|
||||||
|
labels: ['🐛 bug', '🌍 site']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
|
||||||
|
- type: checkboxes
|
||||||
|
id: browsers
|
||||||
|
attributes:
|
||||||
|
label: Browser
|
||||||
|
description: In which browser(s) are you experiencing the issue? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: Chrome/Chromium
|
||||||
|
- label: Firefox
|
||||||
|
- label: Safari
|
||||||
|
- label: Edge
|
||||||
|
- label: iOS Safari
|
||||||
|
- label: Opera
|
||||||
|
- label: Other/not relevant
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: operating-systems
|
||||||
|
attributes:
|
||||||
|
label: Operating system
|
||||||
|
description: In which operating systems are you experiencing the issue? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: Windows
|
||||||
|
- label: Linux
|
||||||
|
- label: macOS
|
||||||
|
- label: ChromeOS
|
||||||
|
- label: iOS
|
||||||
|
- label: Android
|
||||||
|
- label: Other/not relevant
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
|
||||||
|
placeholder: e.g. When I do X, Y happens instead of Z
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: stepsToReproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: Please provide a detailed guide on how this issue can be reproduced.
|
||||||
|
placeholder: |
|
||||||
|
1. I click on an icon
|
||||||
|
2. I click on `Copy SVG` in the drawer
|
||||||
|
3. I paste from the clipboard
|
||||||
|
4. A base64 encoded data URI is inserted.
|
||||||
|
...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: Checklist
|
||||||
|
description: Please review the following checklist before submitting your issue.
|
||||||
|
options:
|
||||||
|
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
|
||||||
|
required: true
|
||||||
53
.github/ISSUE_TEMPLATE/04_feature_request.yml
vendored
Normal file
53
.github/ISSUE_TEMPLATE/04_feature_request.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
name: Feature request
|
||||||
|
description: Share with us your ideas on how Lucide could be improved upon.
|
||||||
|
labels: ['💡 idea']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Before submitting a new feature request, please search to see if someone has filed a similar request before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
|
||||||
|
- type: checkboxes
|
||||||
|
id: packages
|
||||||
|
attributes:
|
||||||
|
label: Package
|
||||||
|
description: Which Lucide project do you wish this feature were added to? You may select more than one.
|
||||||
|
options:
|
||||||
|
- label: lucide
|
||||||
|
- label: lucide-angular
|
||||||
|
- label: lucide-flutter
|
||||||
|
- label: lucide-preact
|
||||||
|
- label: lucide-react
|
||||||
|
- label: lucide-react-native
|
||||||
|
- label: lucide-solid
|
||||||
|
- label: lucide-svelte
|
||||||
|
- label: lucide-vue
|
||||||
|
- label: lucide-vue-next
|
||||||
|
- label: Figma plugin
|
||||||
|
- label: all JS packages
|
||||||
|
- label: site
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Try to describe in detail the feature you wish existed.
|
||||||
|
placeholder: e.g. I want to be able to set extra CSS classes on icon components.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: use-cases
|
||||||
|
attributes:
|
||||||
|
label: Use cases
|
||||||
|
description: Why do you need this feature? Provide real-life use cases as to why this feature will be useful for others.
|
||||||
|
placeholder: e.g. I could use the extra classes to add animation or global custom styling to some icons.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: checklist
|
||||||
|
attributes:
|
||||||
|
label: Checklist
|
||||||
|
description: Please check the following items before submitting your issue.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues to make sure this bug has not already been reported.
|
||||||
|
required: true
|
||||||
68
.github/ISSUE_TEMPLATE/bug_report.md
vendored
68
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,68 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
labels: "🐛 bug"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
* Version:
|
|
||||||
* Are you running from source/main:
|
|
||||||
* Are you using a released build:
|
|
||||||
* Operating system:
|
|
||||||
* Bits:
|
|
||||||
|
|
||||||
## Step to reproduce
|
|
||||||
|
|
||||||
*(Type here)*
|
|
||||||
|
|
||||||
### Actual behavior
|
|
||||||
|
|
||||||
## Any message or error
|
|
||||||
|
|
||||||
*(Type here)*
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
* Links
|
|
||||||
* Screenshots
|
|
||||||
|
|
||||||
|
|
||||||
Here is what a great bug report would look like:
|
|
||||||
|
|
||||||
```
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
Version: Release v3.1.0
|
|
||||||
Running from: Import using webpack
|
|
||||||
Operating system: Mac OSX
|
|
||||||
Bits: 64 bits
|
|
||||||
|
|
||||||
## Step to reproduce
|
|
||||||
|
|
||||||
- Import `check` icon
|
|
||||||
- Add to a React component/view
|
|
||||||
- Run the react app
|
|
||||||
- Notice that the `check` isn't rendering correctly which seems a encoding problem
|
|
||||||
|
|
||||||
### Actual behavior:
|
|
||||||
|
|
||||||
- Import `check` icon
|
|
||||||
- Add to a React component/view
|
|
||||||
- Run the react app
|
|
||||||
- Check is displayed with correct encoding (e.g UTF-8)
|
|
||||||
|
|
||||||
## Any message or error
|
|
||||||
|
|
||||||
No console output
|
|
||||||
...
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
No resources
|
|
||||||
...
|
|
||||||
```
|
|
||||||
18
.github/ISSUE_TEMPLATE/icon_request.md
vendored
18
.github/ISSUE_TEMPLATE/icon_request.md
vendored
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
name: Icon request
|
|
||||||
about: Suggest an new icon for this project
|
|
||||||
labels: "🙌 icon request"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a 👍.
|
|
||||||
A note about brand logos and related material : We follow the decision from Feather Icons (https://github.com/feathericons/feather/issues/763) to deprecate icons relating to brands.
|
|
||||||
You will find some in the set, but we won't add any new ones. https://simpleicons.org has 24x24 SVG icons for this purpose.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Icon Request
|
|
||||||
|
|
||||||
* Icon name:
|
|
||||||
* Use case:
|
|
||||||
* _Screenshots_ of similar icons:
|
|
||||||
15
.github/PULL_REQUEST_TEMPLATE/new-icon.md
vendored
15
.github/PULL_REQUEST_TEMPLATE/new-icon.md
vendored
@@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
name: New icon
|
|
||||||
about: Add a new icon to the library
|
|
||||||
labels: "🎨 <icon"
|
|
||||||
---
|
|
||||||
|
|
||||||
<!-- Thanks for submitting an icon! Please make sure you read the icon design guide
|
|
||||||
at https://github.com/lucide-icons/lucide/blob/main/docs/icon-design-guide.md beforehand,
|
|
||||||
and please fill everything below. -->
|
|
||||||
|
|
||||||
- **Name of the icon** : <!-- `icon` -->
|
|
||||||
- **Tags (alternative names for this icon)** (add them in as a separate json file using the same icon name) :
|
|
||||||
- **What is the purpose of this icon?** : <!-- Shows that one can click it to... / Is used to denote or label... -->
|
|
||||||
- **100% scale preview** : <!-- upload an image -->
|
|
||||||
- **Have you considered alternative possibilities** for its naming or design? :
|
|
||||||
22
.github/actions/build-and-test.yml
vendored
22
.github/actions/build-and-test.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: "Build and Test"
|
name: 'Build and Test'
|
||||||
description: "Builds and test a package"
|
description: 'Builds and test a package'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
name:
|
name:
|
||||||
@@ -7,32 +7,32 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
- uses: pnpm/action-setup@v2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
id: pnpm-install
|
id: pnpm-install
|
||||||
with:
|
with:
|
||||||
version: 7
|
version: 8
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- name: Get pnpm store directory
|
||||||
id: pnpm-cache
|
id: pnpm-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
name: Setup pnpm cache
|
name: Setup pnpm cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||||
key: ${{ runner.os }}-lucide-preact-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-lucide-preact-pnpm-store-
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --filter lucide-preact
|
run: pnpm install --filter lucide-preact
|
||||||
|
|||||||
22
.github/actions/check-icons.yml
vendored
22
.github/actions/check-icons.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: "Check icons"
|
name: 'Check icons'
|
||||||
description: "Cross-checks icon and category references in JSON descriptors"
|
description: 'Cross-checks icon and category references in JSON descriptors'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
name:
|
name:
|
||||||
@@ -7,32 +7,32 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
- uses: pnpm/action-setup@v2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
id: pnpm-install
|
id: pnpm-install
|
||||||
with:
|
with:
|
||||||
version: 7
|
version: 8
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- name: Get pnpm store directory
|
||||||
id: pnpm-cache
|
id: pnpm-cache
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
name: Setup pnpm cache
|
name: Setup pnpm cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||||
key: ${{ runner.os }}-lucide-preact-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-lucide-preact-pnpm-store-
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --filter .
|
run: pnpm install --filter .
|
||||||
|
|||||||
66
.github/labeler.yml
vendored
66
.github/labeler.yml
vendored
@@ -1,62 +1,92 @@
|
|||||||
# For changed dependencies
|
# For changed dependencies
|
||||||
📦 dependencies:
|
📦 dependencies:
|
||||||
- pnpm-lock.yaml
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
# For changes in documentation
|
# For changes in documentation
|
||||||
📖 documentation:
|
📖 documentation:
|
||||||
- docs/*.md
|
- changed-files:
|
||||||
- docs/**/*.md
|
- any-glob-to-any-file:
|
||||||
|
- docs/*.md
|
||||||
|
- docs/**/*.md
|
||||||
|
|
||||||
# For changes in the site, but not markdown files
|
# For changes in the site, but not markdown files
|
||||||
🌍 site:
|
🌍 site:
|
||||||
- 'docs/**'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'docs/**'
|
||||||
|
|
||||||
# For changes in the metadata
|
# For changes in the metadata
|
||||||
🫧 metadata:
|
🫧 metadata:
|
||||||
- 'icons/*.json'
|
- changed-files:
|
||||||
- categories/*
|
- any-glob-to-any-file:
|
||||||
|
- 'icons/*.json'
|
||||||
|
- categories/*
|
||||||
|
|
||||||
# For changes or added icons
|
# For changes or added icons
|
||||||
🎨 icon:
|
🎨 icon:
|
||||||
- 'icons/*.svg'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'icons/*.svg'
|
||||||
|
|
||||||
# For changes in the lucide package
|
# For changes in the lucide package
|
||||||
🧳 lucide package:
|
🧳 lucide package:
|
||||||
- 'packages/lucide/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide/*'
|
||||||
|
|
||||||
# For changes in the lucide React package
|
# For changes in the lucide React package
|
||||||
⚛️ react package:
|
⚛️ react package:
|
||||||
- 'packages/lucide-react/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-react/*'
|
||||||
|
|
||||||
# For changes in the lucide React Native package
|
# For changes in the lucide React Native package
|
||||||
⚛️ react native package:
|
⚛️ react native package:
|
||||||
- 'packages/lucide-react-native/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-react-native/*'
|
||||||
|
|
||||||
# For changes in the lucide vue packages
|
# For changes in the lucide vue packages
|
||||||
💎 vue package:
|
💎 vue package:
|
||||||
- 'packages/lucide-vue/*'
|
- changed-files:
|
||||||
- 'packages/lucide-vue-next/*'
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-vue/*'
|
||||||
|
- 'packages/lucide-vue-next/*'
|
||||||
|
|
||||||
# For changes in the lucide angular package
|
# For changes in the lucide angular package
|
||||||
🅰️ angular package:
|
🅰️ angular package:
|
||||||
- 'packages/lucide-angular/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-angular/*'
|
||||||
|
|
||||||
# For changes in the lucide preact package
|
# For changes in the lucide preact package
|
||||||
⚛️ preact package:
|
⚛️ preact package:
|
||||||
- 'packages/lucide-preact/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-preact/*'
|
||||||
|
|
||||||
# For changes in the lucide svelte package
|
# For changes in the lucide svelte package
|
||||||
🧣 svelte package:
|
🧣 svelte package:
|
||||||
- 'packages/lucide-svelte/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-svelte/*'
|
||||||
|
|
||||||
# For changes in the lucide solid package
|
# For changes in the lucide solid package
|
||||||
🪝 solid package:
|
🪝 solid package:
|
||||||
- 'packages/lucide-solid/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-solid/*'
|
||||||
|
|
||||||
# For changes in the lucide static package
|
# For changes in the lucide static package
|
||||||
🪨 static package:
|
🪨 static package:
|
||||||
- 'packages/lucide-static/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-static/*'
|
||||||
|
|
||||||
# For changes in the lucide flutter package
|
# For changes in the lucide flutter package
|
||||||
🏹 flutter package:
|
🏹 flutter package:
|
||||||
- 'packages/lucide-flutter/*'
|
- changed-files:
|
||||||
|
- any-glob-to-any-file:
|
||||||
|
- 'packages/lucide-flutter/*'
|
||||||
|
|||||||
55
.github/pull_request_template.md
vendored
Normal file
55
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<!-- Thank you for contributing! -->
|
||||||
|
|
||||||
|
<!-- Insert `closes #issueNumber` here if merging this PR will resolve an existing issue -->
|
||||||
|
|
||||||
|
## What is the purpose of this pull request?
|
||||||
|
<!-- Please choose one of the following, and put an "x" next to it. -->
|
||||||
|
- [ ] New Icon
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] New Feature
|
||||||
|
- [ ] Documentation update
|
||||||
|
- [ ] Other:
|
||||||
|
|
||||||
|
### Description
|
||||||
|
<!-- Please insert your description here and provide info about the "what" this PR is contribution -->
|
||||||
|
|
||||||
|
### Icon use case <!-- ONLY for new icons, remove this part if not icon PR -->
|
||||||
|
<!-- What is the purpose of this icon? For each icon added, please insert at least two real life use cases (the more the better). Text like "it's a car icon" is not accepted. -->
|
||||||
|
|
||||||
|
### Alternative icon designs <!-- ONLY for new icons, remove this part if not icon PR -->
|
||||||
|
<!-- If you have any alternative icon designs, please attach them here. -->
|
||||||
|
|
||||||
|
## Icon Design Checklist <!-- ONLY for new icons, remove this part if not icon PR -->
|
||||||
|
|
||||||
|
### Concept <!-- ONLY for new icons -->
|
||||||
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
|
- [ ] I have provided valid use cases for each icon.
|
||||||
|
- [ ] I have not added any a brand or logo icon.
|
||||||
|
- [ ] I have not used any hate symbols.
|
||||||
|
- [ ] I have not included any religious or political imagery.
|
||||||
|
|
||||||
|
### Author, credits & license<!-- ONLY for new icons. -->
|
||||||
|
<!-- Please choose one of the following, and put an "x" next to it. -->
|
||||||
|
- [ ] The icons are solely my own creation.
|
||||||
|
- [ ] The icons were originally created in #<issueNumber> by @<githubUser>
|
||||||
|
- [ ] I've based them on the following Lucide icons: <!-- provide the list of icons -->
|
||||||
|
- [ ] I've based them on the following design: <!-- provide source URL and license permitting use -->
|
||||||
|
|
||||||
|
### Naming <!-- ONLY for new icons -->
|
||||||
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
|
- [ ] I've read and followed the [naming conventions](https://lucide.dev/guide/design/icon-design-guide#naming-conventions)
|
||||||
|
- [ ] I've named icons by what they are rather than their use case.
|
||||||
|
- [ ] I've provided meta JSON files in `icons/[iconName].json`.
|
||||||
|
|
||||||
|
### Design <!-- ONLY for new icons -->
|
||||||
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
|
- [ ] I've read and followed the [icon design guidelines](https://lucide.dev/guide/design/icon-design-guide)
|
||||||
|
- [ ] I've made sure that the icons look sharp on low DPI displays.
|
||||||
|
- [ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
|
||||||
|
- [ ] I've made sure that the icons are visually centered.
|
||||||
|
- [ ] I've correctly optimized all icons to three points of precision.
|
||||||
|
|
||||||
|
## Before Submitting <!-- For every PR! -->
|
||||||
|
<!-- All of these requirements must be fulfilled. -->
|
||||||
|
- [ ] I've read the [Contribution Guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
||||||
|
- [ ] I've checked if there was an existing PR that solves the same issue.
|
||||||
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
@@ -10,64 +10,45 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
VERSION: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Fetch tags
|
- name: Fetch tags
|
||||||
run: git fetch --all --tags
|
run: git fetch --all --tags
|
||||||
|
|
||||||
- name: Get latest tag
|
- name: Get latest tag
|
||||||
id: latest-tag
|
id: latest-tag
|
||||||
run: echo "::set-output name=LATEST_TAG::$(git describe --tags `git rev-list --tags --max-count=1`)"
|
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Check if we can patch
|
- name: Check if we can patch
|
||||||
run: .github/workflows/version-up.sh --minor
|
run: .github/workflows/version-up.sh --minor
|
||||||
|
|
||||||
- name: Create new version
|
- name: Create new version
|
||||||
id: new-version
|
id: new-version
|
||||||
run: echo "::set-output name=NEW_VERSION::$(.github/workflows/version-up.sh --minor)"
|
run: echo "NEW_VERSION=$(.github/workflows/version-up.sh --minor)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create change log
|
- name: Create change log
|
||||||
id: change-log
|
id: change-log
|
||||||
run: |
|
run: |
|
||||||
CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
|
CHANGE_LOG=$(pnpm run generate:changelog --old-tag=${{ steps.latest-tag.outputs.LATEST_TAG }})
|
||||||
CHANGE_LOG="${CHANGE_LOG//'%'/'%25'}"
|
CHANGE_LOG=$(tail -n +5 <<< $CHANGE_LOG)
|
||||||
CHANGE_LOG="${CHANGE_LOG//$'\n'/'%0A'}"
|
|
||||||
CHANGE_LOG="${CHANGE_LOG//$'\r'/'%0D'}"
|
|
||||||
echo $CHANGE_LOG
|
echo $CHANGE_LOG
|
||||||
echo "::set-output name=CHANGE_LOG::$CHANGE_LOG"
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||||
|
echo "CHANGE_LOG<<$EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "$CHANGE_LOG" >> $GITHUB_OUTPUT
|
||||||
|
echo "$EOF" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_API_KEY: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -76,11 +57,17 @@ jobs:
|
|||||||
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
|
echo '${{ steps.new-version.outputs.NEW_VERSION }}'
|
||||||
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
|
echo '${{ steps.change-log.outputs.CHANGE_LOG }}'
|
||||||
|
|
||||||
- name: Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
tag_name: ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
|
name: New icons ${{ steps.new-version.outputs.NEW_VERSION }}
|
||||||
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
|
body: ${{ steps.change-log.outputs.CHANGE_LOG }}
|
||||||
|
|
||||||
|
start-release:
|
||||||
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
needs: create-release
|
||||||
|
uses: './.github/workflows/release.yml'
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
version: ${{ needs.create-release.outputs.VERSION }}
|
||||||
|
|||||||
35
.github/workflows/close-issue-with-banned-phrases.yml
vendored
Normal file
35
.github/workflows/close-issue-with-banned-phrases.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: Close Issue with Banned Phrases
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
block_phrases:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Check for blocked phrases in issue title
|
||||||
|
run: |
|
||||||
|
ISSUE_TITLE=$(jq -r '.issue.title' "$GITHUB_EVENT_PATH")
|
||||||
|
BLOCKED_PHRASES=("twitter" "whatsapp" "logo" "google" "tiktok" "facebook" "slack" "discord" "bluesky")
|
||||||
|
|
||||||
|
# Check title and body for blocked phrases
|
||||||
|
for PHRASE in "${BLOCKED_PHRASES[@]}"
|
||||||
|
do
|
||||||
|
if echo "$ISSUE_TITLE" | grep -i "$PHRASE"; then
|
||||||
|
gh issue close ${{ github.event.issue.number }} --reason "not planned" --comment "This looks like a duplicate, use the [search](https://github.com/lucide-icons/lucide/issues?q=is%3Aissue+$PHRASE) to find similar issues.
|
||||||
|
|
||||||
|
Read more about brand guideline rules at [We're not accepting new Brand icons #670](https://github.com/lucide-icons/lucide/issues/670).
|
||||||
|
|
||||||
|
Always happy to help on [Discord](https://discord.gg/EH6nSts)."
|
||||||
|
gh issue lock ${{ github.event.issue.number }} --reason spam
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
10
.github/workflows/close-stale-prs.yml
vendored
10
.github/workflows/close-stale-prs.yml
vendored
@@ -1,18 +1,20 @@
|
|||||||
name: Close stale issues and PR
|
name: Close stale issues and PR
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "45 1 * * *"
|
- cron: '45 1 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-pr-message: This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
|
stale-pr-message: This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
|
||||||
close-pr-message: This PR was closed because it has been stalled for 5 days with no activity.
|
close-pr-message: This PR was closed because it has been stalled for 5 days with no activity.
|
||||||
close-pr-label: 🧶 stale
|
close-pr-label: 🧶 stale
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
days-before-close: 5
|
days-before-issue-stale: -1
|
||||||
days-before-pr-close: -1
|
days-before-close: -1
|
||||||
|
|||||||
6
.github/workflows/labeler.yml
vendored
6
.github/workflows/labeler.yml
vendored
@@ -1,6 +1,6 @@
|
|||||||
name: "Pull Request Labeler"
|
name: 'Pull Request Labeler'
|
||||||
on:
|
on:
|
||||||
- pull_request_target
|
- pull_request_target
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
@@ -9,4 +9,4 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@v4
|
- uses: actions/labeler@v5
|
||||||
|
|||||||
23
.github/workflows/linting.yml
vendored
Normal file
23
.github/workflows/linting.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Linting
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linting:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Run Linter
|
||||||
|
run: pnpm lint
|
||||||
46
.github/workflows/lucide-angular.yml
vendored
46
.github/workflows/lucide-angular.yml
vendored
@@ -4,42 +4,38 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-angular/**
|
- packages/lucide-angular/**
|
||||||
|
- tools/build-icons/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-angular:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-angular build
|
run: pnpm --filter lucide-angular build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-angular test
|
run: pnpm --filter lucide-angular test
|
||||||
|
|||||||
43
.github/workflows/lucide-font.yml
vendored
43
.github/workflows/lucide-font.yml
vendored
@@ -4,52 +4,31 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- icons/**
|
- icons/**
|
||||||
|
- tools/build-font/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-font:
|
lucide-font:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ericfennis/lucide-font:latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3.4.1
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-lucide-font-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-lucide-font-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --filter outline-svg
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Outline svg Icons
|
- name: Outline svg Icons
|
||||||
run: pnpm build:outline-icons
|
run: pnpm build:outline-icons
|
||||||
|
|
||||||
- name: Create directory
|
- name: Create font in ./lucide-font
|
||||||
run: mkdir lucide-font
|
run: pnpm build:font
|
||||||
|
|
||||||
- name: Build font
|
- name: 'Upload to Artifacts'
|
||||||
run: fontcustom compile "./outlined" -h -n "lucide" -o ./lucide-font -F
|
uses: actions/upload-artifact@v3
|
||||||
|
|
||||||
- name: "Upload to Artifacts"
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: lucide-font
|
name: lucide-font
|
||||||
path: lucide-font
|
path: lucide-font
|
||||||
|
|||||||
36
.github/workflows/lucide-preact.yml
vendored
36
.github/workflows/lucide-preact.yml
vendored
@@ -4,42 +4,24 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-preact/**
|
- packages/lucide-preact/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-preact:
|
lucide-preact:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-preact build
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-preact test
|
run: pnpm --filter lucide-preact test
|
||||||
|
|||||||
36
.github/workflows/lucide-react-native.yml
vendored
36
.github/workflows/lucide-react-native.yml
vendored
@@ -4,42 +4,24 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-react-native/**
|
- packages/lucide-react-native/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-react-native:
|
lucide-react-native:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-react-native build
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-react-native test
|
run: pnpm --filter lucide-react-native test
|
||||||
|
|||||||
49
.github/workflows/lucide-react.yml
vendored
49
.github/workflows/lucide-react.yml
vendored
@@ -4,42 +4,41 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-react/**
|
- packages/lucide-react/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
|
- scripts/generateNextJSAliases.mjs
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-react:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-react build
|
run: pnpm --filter lucide-react build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-react test
|
run: pnpm --filter lucide-react test
|
||||||
|
|||||||
24
.github/workflows/lucide-shared.yml
vendored
Normal file
24
.github/workflows/lucide-shared.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: Lucide Shared Checks
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- packages/shared/**
|
||||||
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: pnpm --filter lucide-react test
|
||||||
48
.github/workflows/lucide-solid.yml
vendored
48
.github/workflows/lucide-solid.yml
vendored
@@ -4,42 +4,40 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-solid/**
|
- packages/lucide-solid/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-solid:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-solid build
|
run: pnpm --filter lucide-solid build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-solid test
|
run: pnpm --filter lucide-solid test
|
||||||
|
|||||||
31
.github/workflows/lucide-static.yml
vendored
31
.github/workflows/lucide-static.yml
vendored
@@ -4,39 +4,22 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-static/**
|
- packages/lucide-static/**
|
||||||
|
- tools/build-icons/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-static:
|
lucide-static:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-static build
|
run: pnpm --filter lucide-static build
|
||||||
|
|||||||
48
.github/workflows/lucide-svelte.yml
vendored
48
.github/workflows/lucide-svelte.yml
vendored
@@ -4,42 +4,40 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-svelte/**
|
- packages/lucide-svelte/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-svelte:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-svelte build
|
run: pnpm --filter lucide-svelte build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-svelte test
|
run: pnpm --filter lucide-svelte test
|
||||||
|
|||||||
48
.github/workflows/lucide-vue-next.yml
vendored
48
.github/workflows/lucide-vue-next.yml
vendored
@@ -4,42 +4,40 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-vue-next/**
|
- packages/lucide-vue-next/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-vue-next:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-vue-next build
|
run: pnpm --filter lucide-vue-next build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-vue-next test
|
run: pnpm --filter lucide-vue-next test
|
||||||
|
|||||||
48
.github/workflows/lucide-vue.yml
vendored
48
.github/workflows/lucide-vue.yml
vendored
@@ -4,42 +4,40 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide-vue/**
|
- packages/lucide-vue/**
|
||||||
|
- packages/shared/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide-vue:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide-vue build
|
run: pnpm --filter lucide-vue build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide-vue test
|
run: pnpm --filter lucide-vue test
|
||||||
|
|||||||
47
.github/workflows/lucide.yml
vendored
47
.github/workflows/lucide.yml
vendored
@@ -4,42 +4,39 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- packages/lucide/**
|
- packages/lucide/**
|
||||||
|
- tools/build-icons/**
|
||||||
|
- tools/rollup-plugins/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lucide:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide build
|
run: pnpm --filter lucide build
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v3.8.1
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide test
|
run: pnpm --filter lucide test
|
||||||
|
|||||||
211
.github/workflows/pull-request.yml
vendored
211
.github/workflows/pull-request.yml
vendored
@@ -3,138 +3,121 @@ name: Add Changed Icons comment
|
|||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- 'icons/*.svg'
|
- 'icons/*'
|
||||||
|
branches:
|
||||||
permissions:
|
- main
|
||||||
pull-requests: write
|
- fix-icon-preview
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-changed-icons-comment:
|
lint-filenames:
|
||||||
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v35
|
uses: tj-actions/changed-files@v41
|
||||||
|
with:
|
||||||
|
files: icons/*
|
||||||
|
- name: Generate annotations
|
||||||
|
run: node ./scripts/lintFilenames.mjs
|
||||||
|
env:
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
|
||||||
|
lint-contributors:
|
||||||
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v41
|
||||||
|
with:
|
||||||
|
files: icons/*
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- name: Install simple-git (safer and faster than installing all deps)
|
||||||
|
run: npm install simple-git
|
||||||
|
- name: Generate annotations
|
||||||
|
run: node ./scripts/updateContributors.mjs
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
FETCH_DEPTH: ${{ github.event.pull_request.commits }}
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
- name: Generate annotations
|
||||||
|
env:
|
||||||
|
ANNOTATION_SEVERITY: notice
|
||||||
|
ANNOTATION_TITLE: Contributors have changed!
|
||||||
|
ANNOTATION_DESCRIPTION: Don't add people who have only performed automatic optimizations.
|
||||||
|
run: |
|
||||||
|
git diff --unified=0 -- icons/*.json | # diff icon metadata (unified=0 gives the correct chunk line number)
|
||||||
|
perl -ne '/^(\+|- |@)/ && print' | # get chunks (lines that start with "+++", "@@", "+ ", "- ")
|
||||||
|
perl -pe 's/\n/%0A/' | # url encode line breaks (\n -> %0A)
|
||||||
|
perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | # split chunks(one chunk per line)
|
||||||
|
perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A\4/"
|
||||||
|
# Example for the previous substitution
|
||||||
|
# input: +++ b/icons/accessibility.json%0A@@ -2,0 +3 @@%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
||||||
|
# output: ::$ANNOTATION_SEVERITY file=icons/accessibility.json,line=2,endLine=3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
||||||
|
|
||||||
|
lint-aliases:
|
||||||
|
name: Check Uniqueness of Aliases
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Check Uniqueness of Aliases
|
||||||
|
run: "! cat <(printf \"%s\\n\" icons/*.json | while read -r name; do basename \"$name\" .json; done) <(jq -cr 'select(.aliases) | .aliases[] | if type==\"string\" then . else .name end' icons/*.json) | sort | uniq -c | grep -ve '^\\s*1 '"
|
||||||
|
|
||||||
|
generate-changed-icons-comment:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v41
|
||||||
with:
|
with:
|
||||||
files: icons/*.svg
|
files: icons/*.svg
|
||||||
- name: Generate cohesion check random
|
|
||||||
id: generate-cohesion-check-random
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in $(printf "%s\\n" icons/*.svg | shuf | head -n$(awk -F' ' '{print NF}' <<< '${{ steps.changed-files.outputs.all_changed_files }}')); do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Generate cohesion check squares
|
|
||||||
id: generate-cohesion-check-squares
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in $(printf "%s\\n" icons/*square*.svg | shuf | head -n$(awk -F' ' '{print NF}' <<< '${{ steps.changed-files.outputs.all_changed_files }}')); do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Generate 1px stroke-width
|
|
||||||
id: generate-1px-stroke-width
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/1/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Generate 2px stroke-width
|
|
||||||
id: generate-2px-stroke-width
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Generate 3px stroke-width
|
|
||||||
id: generate-3px-stroke-width
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/3/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Generate X-rays
|
|
||||||
id: generate-x-rays
|
|
||||||
run: |
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
|
|
||||||
cat "$file" | # get file content
|
|
||||||
tr '\n' ' ' | # remove line breaks
|
|
||||||
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
|
|
||||||
base64 -w 0 | # encode svg
|
|
||||||
sed "s|.*|<img width=\"400\" title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/$(basename ${file//\.svg/})/&.svg\"/> |"
|
|
||||||
done | tr '\n' ' ' >> $GITHUB_OUTPUT
|
|
||||||
echo >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
- name: Find Comment
|
- name: Find Comment
|
||||||
uses: peter-evans/find-comment@v2
|
uses: peter-evans/find-comment@v2
|
||||||
id: fc
|
id: pr-comment
|
||||||
with:
|
with:
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
comment-author: 'github-actions[bot]'
|
comment-author: 'github-actions[bot]'
|
||||||
body-includes: Added or changed icons
|
body-includes: Added or changed icons
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
- name: Install svgson for code preview (safer and faster than installing all deps)
|
||||||
|
run: npm install svgson
|
||||||
|
|
||||||
|
- name: Generate comment markup
|
||||||
|
run: node ./scripts/generateChangedIconsCommentMarkup.mjs >> comment-markup.md
|
||||||
|
id: comment-markup
|
||||||
|
env:
|
||||||
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
|
||||||
- name: Create or update comment
|
- name: Create or update comment
|
||||||
uses: peter-evans/create-or-update-comment@v2
|
uses: peter-evans/create-or-update-comment@v3
|
||||||
with:
|
with:
|
||||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
comment-id: ${{ steps.pr-comment.outputs.comment-id }}
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
body: |
|
body-path: ./comment-markup.md
|
||||||
### Added or changed icons
|
|
||||||
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
|
|
||||||
<details>
|
|
||||||
<summary>Preview cohesion</summary>
|
|
||||||
${{ steps.generate-cohesion-check-squares.outputs.body }}<br/>
|
|
||||||
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
|
|
||||||
${{ steps.generate-cohesion-check-random.outputs.body }}<br/>
|
|
||||||
</details>
|
|
||||||
<details>
|
|
||||||
<summary>Preview stroke widths</summary>
|
|
||||||
${{ steps.generate-1px-stroke-width.outputs.body }}<br/>
|
|
||||||
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
|
|
||||||
${{ steps.generate-3px-stroke-width.outputs.body }}<br/>
|
|
||||||
</details>
|
|
||||||
<details>
|
|
||||||
<summary>Icon X-rays</summary>
|
|
||||||
${{ steps.generate-x-rays.outputs.body }}
|
|
||||||
</details>
|
|
||||||
edit-mode: replace
|
edit-mode: replace
|
||||||
|
|||||||
730
.github/workflows/release.yml
vendored
730
.github/workflows/release.yml
vendored
@@ -5,6 +5,13 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
description: Version
|
||||||
|
type: string
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
@@ -12,8 +19,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-build:
|
pre-release:
|
||||||
if: github.repository == 'lucide-icons/lucide' && contains('["locness3","ericfennis", "johnletey", "karsa-mistmere"]', github.actor)
|
if: github.repository == 'lucide-icons/lucide' && contains('["ericfennis", "karsa-mistmere"]', github.actor)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
@@ -23,544 +30,76 @@ jobs:
|
|||||||
id: get_version
|
id: get_version
|
||||||
run: |
|
run: |
|
||||||
echo $VERSION_REF
|
echo $VERSION_REF
|
||||||
echo ::set-output name=VERSION::${VERSION_REF/refs\/tags\/\v}
|
echo "VERSION=${VERSION_REF/refs\/tags\/\v}" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
VERSION_REF: ${{ github.event.inputs.version || github.ref }}
|
VERSION_REF: ${{ inputs.version || github.event.inputs.version || github.ref }}
|
||||||
|
|
||||||
lucide:
|
release:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pre-build
|
needs: pre-release
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
package:
|
||||||
|
[
|
||||||
|
'lucide',
|
||||||
|
'lucide-react',
|
||||||
|
'lucide-react-native',
|
||||||
|
'lucide-vue',
|
||||||
|
'lucide-vue-next',
|
||||||
|
'lucide-angular',
|
||||||
|
'lucide-preact',
|
||||||
|
'lucide-solid',
|
||||||
|
'lucide-svelte',
|
||||||
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ inputs.NPM_TOKEN || secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- name: Set new version
|
||||||
run: pnpm --filter lucide version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
run: pnpm --filter ${{ matrix.package }} version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm --filter lucide build
|
run: pnpm --filter ${{ matrix.package }} build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm --filter lucide test
|
run: pnpm --filter ${{ matrix.package }} test
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: pnpm --filter lucide publish --no-git-checks
|
run: pnpm --filter ${{ matrix.package }} publish --no-git-checks --ignore-scripts
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-package-json
|
|
||||||
path: packages/lucide/package.json
|
|
||||||
|
|
||||||
lucide-react:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-react version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-react build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-react test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-react publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-react-package-json
|
|
||||||
path: packages/lucide-react/package.json
|
|
||||||
|
|
||||||
lucide-react-native:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-react-native version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-react-native build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-react-native test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-react-native publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-react-native-package-json
|
|
||||||
path: packages/lucide-react-native/package.json
|
|
||||||
|
|
||||||
lucide-vue:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set new version
|
|
||||||
run: pnpm --filter lucide-vue version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-vue build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-vue test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-vue publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-vue-package-json
|
|
||||||
path: packages/lucide-vue/package.json
|
|
||||||
|
|
||||||
lucide-vue-next:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set new version
|
|
||||||
run: pnpm --filter lucide-vue-next version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-vue-next build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-vue-next test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-vue-next publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-vue-next-package-json
|
|
||||||
path: packages/lucide-vue-next/package.json
|
|
||||||
|
|
||||||
lucide-angular:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-angular version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-angular build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-angular test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-angular publish --no-git-checks --ignore-scripts
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-angular-package-json
|
|
||||||
path: packages/lucide-angular/package.json
|
|
||||||
|
|
||||||
lucide-preact:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-preact version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-preact build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-preact test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-preact publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-preact-package-json
|
|
||||||
path: packages/lucide-preact/package.json
|
|
||||||
|
|
||||||
lucide-solid:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-solid version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-solid build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-solid test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-solid publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-solid-package-json
|
|
||||||
path: packages/lucide-solid/package.json
|
|
||||||
|
|
||||||
lucide-svelte:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: pre-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 16
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Set Auth Token
|
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set package.json version lucide
|
|
||||||
run: pnpm --filter lucide-svelte version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter lucide-svelte build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter lucide-svelte test
|
|
||||||
|
|
||||||
- name: Publish
|
|
||||||
run: pnpm --filter lucide-svelte publish --no-git-checks
|
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-svelte-package-json
|
|
||||||
path: packages/lucide-svelte/package.json
|
|
||||||
|
|
||||||
lucide-static:
|
lucide-static:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [pre-build, lucide-font]
|
needs: [pre-release, lucide-font]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Set Auth Token
|
- name: Set Auth Token
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Set new version
|
- name: Set new version
|
||||||
run: pnpm --filter lucide-static version --new-version ${{ needs.pre-build.outputs.VERSION }} --no-git-tag-version
|
run: pnpm --filter lucide-static version --new-version ${{ needs.pre-release.outputs.VERSION }} --no-git-tag-version
|
||||||
|
|
||||||
- name: Move Font
|
- name: Move Font
|
||||||
run: cp -r lucide-font packages/lucide-static/font
|
run: cp -r lucide-font packages/lucide-static/font
|
||||||
@@ -571,185 +110,50 @@ jobs:
|
|||||||
- name: Publish
|
- name: Publish
|
||||||
run: pnpm --filter lucide-static publish --no-git-checks
|
run: pnpm --filter lucide-static publish --no-git-checks
|
||||||
|
|
||||||
- name: Upload package.json
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-static-package-json
|
|
||||||
path: packages/lucide-static/package.json
|
|
||||||
|
|
||||||
lucide-font:
|
lucide-font:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pre-build
|
needs: pre-release
|
||||||
container: ericfennis/lucide-font:latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3.4.1
|
- uses: pnpm/action-setup@v2
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 18
|
||||||
|
cache: 'pnpm'
|
||||||
- uses: pnpm/action-setup@v2.0.1
|
|
||||||
name: Install pnpm
|
|
||||||
id: pnpm-install
|
|
||||||
with:
|
|
||||||
version: 7
|
|
||||||
run_install: false
|
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
|
||||||
id: pnpm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
name: Setup pnpm cache
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pnpm-store-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --filter outline-svg
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Outline svg Icons
|
- name: Outline svg Icons
|
||||||
run: pnpm build:outline-icons
|
run: pnpm build:outline-icons
|
||||||
|
|
||||||
- name: Create directory
|
- name: Create font in ./lucide-font
|
||||||
run: mkdir lucide-font
|
run: pnpm build:font
|
||||||
|
|
||||||
- name: Build font
|
- name: 'Upload to Artifacts'
|
||||||
run: fontcustom compile "./outlined" -h -n "lucide" -o ./lucide-font -F
|
uses: actions/upload-artifact@v3
|
||||||
|
|
||||||
- name: "Upload to Artifacts"
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
with:
|
||||||
name: lucide-font
|
name: lucide-font
|
||||||
path: lucide-font
|
path: lucide-font
|
||||||
|
|
||||||
lucide-flutter:
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [pre-build, lucide-font]
|
|
||||||
container:
|
|
||||||
image: cirrusci/flutter:latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/.pub-cache
|
|
||||||
key: ${{ runner.os }}-pub-${{ hashFiles('~/.pub-cache') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pub-
|
|
||||||
|
|
||||||
- name: Setup credentials
|
|
||||||
run: |
|
|
||||||
mkdir -p ~/.pub-cache
|
|
||||||
cat <<EOF > ~/.pub-cache/credentials.json
|
|
||||||
{
|
|
||||||
"accessToken": "${{ secrets.GOOGLE_OAUTH_ACCESS_TOKEN }}",
|
|
||||||
"refreshToken": "${{ secrets.GOOGLE_OAUTH_REFRESH_TOKEN }}",
|
|
||||||
"idToken": "${{ secrets.GOOGLE_OAUTH_ID_TOKEN }}",
|
|
||||||
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token",
|
|
||||||
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
|
|
||||||
"expiration": 1629835569218
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Get packages
|
|
||||||
run: flutter pub get
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: List lucide-font folder
|
|
||||||
run: ls lucide-font
|
|
||||||
|
|
||||||
- name: Copy assets from lucide-font directory
|
|
||||||
run: |
|
|
||||||
mkdir packages/lucide-flutter/assets
|
|
||||||
cp lucide-font/lucide.ttf packages/lucide-flutter/assets/lucide.ttf
|
|
||||||
cp lucide-font/lucide-preview.html packages/lucide-flutter/assets/lucide-preview.html
|
|
||||||
|
|
||||||
- name: Generate exports file
|
|
||||||
run: |
|
|
||||||
dart tool/generate_fonts.dart assets/lucide-preview.html
|
|
||||||
flutter format .
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: flutter test
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: Copy License
|
|
||||||
run: cp ../../LICENSE ./LICENSE
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: Update yaml
|
|
||||||
run: sed -E 's/(version:)[^\n]*/\1 ${{ needs.pre-build.outputs.VERSION }}/;' pubspec.yaml > pubspec && mv pubspec pubspec.yaml
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: Flutter publish
|
|
||||||
run: flutter pub publish -f
|
|
||||||
working-directory: packages/lucide-flutter
|
|
||||||
|
|
||||||
- name: Upload pubspec.yaml
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: lucide-flutter-pubspec-yaml
|
|
||||||
path: packages/lucide-flutter/pubspec.yaml
|
|
||||||
|
|
||||||
post-release:
|
post-release:
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
if: github.repository == 'lucide-icons/lucide'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs: [pre-release, lucide-font]
|
||||||
[
|
|
||||||
pre-build,
|
|
||||||
lucide,
|
|
||||||
lucide-react,
|
|
||||||
lucide-react-native,
|
|
||||||
lucide-vue,
|
|
||||||
lucide-vue-next,
|
|
||||||
lucide-angular,
|
|
||||||
lucide-svelte,
|
|
||||||
lucide-preact,
|
|
||||||
lucide-flutter,
|
|
||||||
lucide-font,
|
|
||||||
]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Commit package files
|
|
||||||
run: |
|
|
||||||
mv lucide-package-json/package.json packages/lucide/package.json
|
|
||||||
mv lucide-react-package-json/package.json packages/lucide-react/package.json
|
|
||||||
mv lucide-react-native-package-json/package.json packages/lucide-react-native/package.json
|
|
||||||
mv lucide-vue-package-json/package.json packages/lucide-vue/package.json
|
|
||||||
mv lucide-preact-package-json/package.json packages/lucide-preact/package.json
|
|
||||||
mv lucide-svelte-package-json/package.json packages/lucide-svelte/package.json
|
|
||||||
mv lucide-vue-next-package-json/package.json packages/lucide-vue-next/package.json
|
|
||||||
mv lucide-angular-package-json/package.json packages/lucide-angular/package.json
|
|
||||||
mv lucide-flutter-pubspec-yaml/pubspec.yaml packages/lucide-flutter/pubspec.yaml
|
|
||||||
|
|
||||||
- name: Commit package.jsons
|
|
||||||
run: |
|
|
||||||
git add packages/*/package.json packages/lucide-flutter/pubspec.yaml
|
|
||||||
git -c user.name="Lucide Bot" -c user.email="lucide-bot@users.noreply.github.com" \
|
|
||||||
commit -m ":package: Bump lucide package versions to ${{ needs.pre-build.outputs.VERSION }}" --no-verify --quiet
|
|
||||||
git remote set-url --push origin https://lucide-bot:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git
|
|
||||||
git push origin HEAD:main
|
|
||||||
|
|
||||||
- name: Zip font and icons
|
- name: Zip font and icons
|
||||||
run: |
|
run: |
|
||||||
zip -r lucide-font-${{ needs.pre-build.outputs.VERSION }}.zip lucide-font
|
zip -r lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip lucide-font
|
||||||
zip -r lucide-icons-${{ needs.pre-build.outputs.VERSION }}.zip icons
|
zip -r lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip icons
|
||||||
|
|
||||||
- name: Release zip and fonts
|
- name: Release zip and fonts
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ needs.pre-build.outputs.VERSION }}
|
tag_name: ${{ needs.pre-release.outputs.VERSION }}
|
||||||
files: |
|
files: |
|
||||||
lucide-font-${{ needs.pre-build.outputs.VERSION }}.zip
|
lucide-font-${{ needs.pre-release.outputs.VERSION }}.zip
|
||||||
lucide-icons-${{ needs.pre-build.outputs.VERSION }}.zip
|
lucide-icons-${{ needs.pre-release.outputs.VERSION }}.zip
|
||||||
|
|||||||
13
.gitignore
vendored
13
.gitignore
vendored
@@ -16,7 +16,17 @@ outlined
|
|||||||
packages/**/src/icons/*.js
|
packages/**/src/icons/*.js
|
||||||
packages/**/src/icons/*.ts
|
packages/**/src/icons/*.ts
|
||||||
packages/**/src/icons/*.tsx
|
packages/**/src/icons/*.tsx
|
||||||
|
packages/**/src/aliases/*.ts
|
||||||
packages/**/src/aliases.ts
|
packages/**/src/aliases.ts
|
||||||
|
!packages/**/src/aliases/index.ts
|
||||||
|
packages/**/src/dynamicIconImports.ts
|
||||||
|
packages/**/DynamicIcon.d.ts
|
||||||
|
packages/**/dynamicIconImports.js
|
||||||
|
packages/**/dynamicIconImports.d.ts
|
||||||
|
packages/**/dynamicIconImports.js.map
|
||||||
|
packages/**/dynamic.d.ts
|
||||||
|
packages/**/dynamic.mjs.map
|
||||||
|
packages/**/dynamic.mjs
|
||||||
packages/**/LICENSE
|
packages/**/LICENSE
|
||||||
categories.json
|
categories.json
|
||||||
tags.json
|
tags.json
|
||||||
@@ -30,7 +40,10 @@ docs/.vitepress/data/iconNodes
|
|||||||
docs/.vitepress/data/iconMetaData.ts
|
docs/.vitepress/data/iconMetaData.ts
|
||||||
docs/.vitepress/data/releaseMetaData.json
|
docs/.vitepress/data/releaseMetaData.json
|
||||||
docs/.vitepress/data/releaseMetaData
|
docs/.vitepress/data/releaseMetaData
|
||||||
|
docs/.vitepress/data/categoriesData.json
|
||||||
docs/.vitepress/data/iconDetails
|
docs/.vitepress/data/iconDetails
|
||||||
docs/.vitepress/data/relatedIcons.json
|
docs/.vitepress/data/relatedIcons.json
|
||||||
docs/.vercel
|
docs/.vercel
|
||||||
docs/.nitro
|
docs/.nitro
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ stats
|
|||||||
node_modules
|
node_modules
|
||||||
tests
|
tests
|
||||||
scripts
|
scripts
|
||||||
site
|
|
||||||
src
|
src
|
||||||
build
|
build
|
||||||
babel.config.js
|
babel.config.js
|
||||||
|
|||||||
23
.prettierignore
Normal file
23
.prettierignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
# docs examples
|
||||||
|
docs/**/examples/
|
||||||
|
docs/.vitepress/.temp
|
||||||
|
docs/.vitepress/cache
|
||||||
|
docs/.vitepress/data
|
||||||
|
docs/.nitro
|
||||||
|
|
||||||
|
# lucide-angular
|
||||||
|
packages/lucide-angular/.angular/cache
|
||||||
|
|
||||||
|
# lucide-static
|
||||||
|
packages/lucide-static/icons
|
||||||
|
packages/lucide-static/lib
|
||||||
|
packages/lucide-static/sprite.svg
|
||||||
|
packages/lucide-static/tags.json
|
||||||
|
packages/lucide-static/icon-nodes.json
|
||||||
|
packages/lucide-static/font
|
||||||
|
|
||||||
|
# lucide-svelte
|
||||||
|
packages/lucide-svelte/src/icons/*.svelte
|
||||||
|
packages/lucide-svelte/.svelte-kit
|
||||||
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"cSpell.words": [
|
"cSpell.words": ["devs", "preact", "Preact"],
|
||||||
"devs",
|
"eslint.enable": true,
|
||||||
"preact",
|
"eslint.validate": ["javascript", "svg"],
|
||||||
"Preact"
|
"svg.preview.background": "transparent"
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
2
.vscode/svg.code-snippets
vendored
2
.vscode/svg.code-snippets
vendored
@@ -49,7 +49,7 @@
|
|||||||
"circle",
|
"circle",
|
||||||
"<circle"
|
"<circle"
|
||||||
],
|
],
|
||||||
"body": "<circle cx=\"${2:12}\" cy=\"${3:$2}\" r=\"${1|10,2,.5|}\" />"
|
"body": "<circle cx=\"${2:12}\" cy=\"${3:$2}\" r=\"${1|10,2,.5\" fill=\"currentColor|}\" />"
|
||||||
},
|
},
|
||||||
"Ellipse": {
|
"Ellipse": {
|
||||||
"scope": "xml",
|
"scope": "xml",
|
||||||
|
|||||||
@@ -33,12 +33,14 @@ Here you can find instructions on how to implement the guidelines with different
|
|||||||
|
|
||||||
#### [Adobe Illustrator Guide](https://lucide.dev/docs/illustrator-guide)
|
#### [Adobe Illustrator Guide](https://lucide.dev/docs/illustrator-guide)
|
||||||
|
|
||||||
You can also [download an Adobe Illustrator template](https://lucide.dev/templates/illustrator-template.ai).
|
You can also [download an Adobe Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/public/templates/illustrator_template.ai).
|
||||||
|
|
||||||
#### [Inkscape Guide](https://lucide.dev/docs/inkscape-guide)
|
#### [Inkscape Guide](https://lucide.dev/docs/inkscape-guide)
|
||||||
|
|
||||||
#### [Figma Guide](https://lucide.dev/docs/figma-guide)
|
#### [Figma Guide](https://lucide.dev/docs/figma-guide)
|
||||||
|
|
||||||
|
#### [Affinity Designer Guide](https://lucide.dev/guide/design/affinity-designer-guide)
|
||||||
|
|
||||||
### Submitting Multiple Icons
|
### Submitting Multiple Icons
|
||||||
|
|
||||||
If you want submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keep the thread clean and scoped.
|
If you want submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keep the thread clean and scoped.
|
||||||
@@ -50,7 +52,7 @@ Seperate them by two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
|
|||||||
|
|
||||||
Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a :+1:.
|
Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a :+1:.
|
||||||
|
|
||||||
If the icon has not already been requested, [create an issue](https://github.com/lucide-icons/lucide/issues/new?title=Icon%20Request:) with a title of `Icon request: <icon name>` and add as much information as possible.
|
If the icon has not already been requested, [create an icon request issue](https://github.com/lucide-icons/lucide/issues/new?assignees=&labels=%F0%9F%99%8C+icon+request&projects=&template=01_icon_request.yml) and add as much information as possible.
|
||||||
|
|
||||||
### Icon Requests from Feather
|
### Icon Requests from Feather
|
||||||
|
|
||||||
@@ -70,10 +72,10 @@ pnpm install # Install dependencies, including the workspace packages
|
|||||||
|
|
||||||
### Packages -> PNPM Workspaces
|
### Packages -> PNPM Workspaces
|
||||||
|
|
||||||
To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/enhttps://lucide.dev/docs/workspaces).
|
To distribute different packages we use [PNPM workspaces](https://pnpm.io/workspaces). Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces).
|
||||||
|
|
||||||
The configured directory for workspaces is the [packages](./packages) directory, located in the root directory. There you will find all the current packages from lucide.
|
The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide.
|
||||||
There are more workspaces defined, see [`pnpm-workspace.yaml`](./pnpm-workspace.yaml).
|
There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml).
|
||||||
|
|
||||||
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
|
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
|
||||||
|
|
||||||
@@ -125,7 +127,7 @@ When adding new features to for example the icon component for a framework. It i
|
|||||||
|
|
||||||
### Local Testing
|
### Local Testing
|
||||||
|
|
||||||
To test changes in a local project, you can use `yarn link`, `npm link` or `pnpm link` to link the package. Before you do this make sure you builded the package first.
|
To test changes in a local project, you can use `yarn link`, `npm link`, `bun link` or `pnpm link` to link the package. Before you do this make sure you builded the package first.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# in packages/lucide-react
|
# in packages/lucide-react
|
||||||
@@ -144,16 +146,19 @@ Root directories
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
lucide
|
lucide
|
||||||
|
|
|
||||||
├── docs
|
├── docs
|
||||||
|
│ ├── guide
|
||||||
├── icons
|
├── icons
|
||||||
├── packages
|
├── packages
|
||||||
├── scripts
|
└── scripts
|
||||||
└── site
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docs
|
### Docs
|
||||||
|
|
||||||
|
The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory.
|
||||||
|
|
||||||
|
### Guides
|
||||||
|
|
||||||
Detailed documentation about: installation, guides, packages, design guides etc.
|
Detailed documentation about: installation, guides, packages, design guides etc.
|
||||||
|
|
||||||
### Icons
|
### Icons
|
||||||
@@ -170,10 +175,6 @@ Includes all the (npm) packages of lucide.
|
|||||||
|
|
||||||
Includes usefully scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
|
Includes usefully scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
|
||||||
|
|
||||||
### site
|
|
||||||
|
|
||||||
The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory.
|
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
The documentation files are located in the [docs](https://github.com/lucide-icons/lucide/tree/main/docs) directory. All these markdown files will be loaded in the build of the lucide.dev website.
|
The documentation files are located in the [docs](https://github.com/lucide-icons/lucide/tree/main/docs) directory. All these markdown files will be loaded in the build of the lucide.dev website.
|
||||||
|
|||||||
289
README.md
289
README.md
@@ -1,186 +1,46 @@
|
|||||||
<p align=center><img width="480" src="https://lucide.dev/lucide-logo-repo.svg" alt="Lucide Logo"></p>
|
<p align="center">
|
||||||
|
<a href="https://github.com/lucide-icons/lucide#gh-light-mode-only">
|
||||||
|
<img src="https://lucide.dev/lucide-logo-repo.svg#gh-light-mode-only" alt="Lucide - Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons." width="480">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/lucide-icons/lucide#gh-dark-mode-only">
|
||||||
|
<img src="https://lucide.dev/lucide-logo-repo-dark.svg#gh-dark-mode-only" alt="Lucide - Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons." width="480">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/lucide" alt="license"></a>
|
<a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/lucide" alt="license"></a>
|
||||||
<a href="https://www.npmjs.com/package/lucide"><img src="https://img.shields.io/npm/v/lucide" alt="npm package"></a>
|
<a href="https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons"><img src="https://img.shields.io/badge/Figma-F24E1E?logo=figma&logoColor=white" alt="figma installs"></a>
|
||||||
<a href="https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons"><img src="https://img.shields.io/endpoint?logo=figma&label=installs&url=https://yuanqing.github.io/figma-plugins-stats/plugin/939567362549682242/installs.json" alt="figma installs"></a>
|
|
||||||
<a href="https://github.com/lucide-icons/lucide/actions/workflows/release.yml"><img src="https://github.com/lucide-icons/lucide/actions/workflows/release.yml/badge.svg" alt="build status"></a>
|
<a href="https://github.com/lucide-icons/lucide/actions/workflows/release.yml"><img src="https://github.com/lucide-icons/lucide/actions/workflows/release.yml/badge.svg" alt="build status"></a>
|
||||||
<a href="https://discord.gg/EH6nSts"><img src="https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA" alt="discord chat"></a>
|
<a href="https://discord.gg/EH6nSts"><img src="https://img.shields.io/discord/723074157486800936?label=chat&logo=discord&logoColor=%23ffffff&colorB=%237289DA" alt="discord chat"></a>
|
||||||
</p>
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://lucide.dev/icons/">Icons</a>
|
||||||
|
·
|
||||||
|
<a href="https://lucide.dev/guide/">Guide</a>
|
||||||
|
·
|
||||||
|
<a href="https://lucide.dev/packages">Packages</a>
|
||||||
|
·
|
||||||
|
<a href="https://lucide.dev/license">License</a>
|
||||||
|
·
|
||||||
|
<a href="https://lucide.dev/showcase">Showcase</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
# Lucide
|
# Lucide
|
||||||
|
|
||||||
Community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons.
|
Lucide is an open-source icon library that provides 1000+ vector (svg) files for displaying icons and symbols in digital and non-digital projects. The library aims to make it easier for designers and developers to incorporate icons into their projects by providing several official [packages](https://lucide.dev/packages) to make it easier to use these icons in your project.
|
||||||
|
|
||||||
It began after growing disaffection with the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
|
## Packages
|
||||||
|
|
||||||
Lucide is trying to expand the icon set as much as possible while staying faithful to the original simplistic design language. We do this as a community of devs and designers and hope that you'll join us!
|
| Logo | Package | Version | Downloads | Links |
|
||||||
|
| ---- | ------- | ------- | --------- | ----- |
|
||||||
### Why choose Lucide over Feather Icons
|
| <img src="https://lucide.dev/framework-logos/js.svg" alt="JS logo" width="48"> | **`lucide`** | [](https://www.npmjs.com/package/lucide) |  | [Docs](https://lucide.dev/guide/packages/lucide) · [Source](./packages/lucide) |
|
||||||
|
| <img src="https://lucide.dev/framework-logos/react.svg" alt="React logo" width="48"> | **`lucide-react`** | [](https://www.npmjs.com/package/lucide-react) |  | [Docs](https://lucide.dev/guide/packages/lucide-react) · [Source](./packages/lucide-react) |
|
||||||
- More icons to work with: Lucide already has hundreds of icons more than Feather does.
|
| <img src="https://lucide.dev/framework-logos/vue.svg" alt="Vue logo" width="48"> | **`lucide-vue-next`** | [](https://www.npmjs.com/package/lucide-vue-next) |  | [Docs](https://lucide.dev/guide/packages/lucide-vue-next) · [Source](./packages/lucide-vue-next) |
|
||||||
- Official librairies and integrations with popular frameworks and design tools.
|
| <img src="https://lucide.dev/framework-logos/svelte.svg" alt="Svelte logo" width="48"> | **`lucide-svelte`** | [](https://www.npmjs.com/package/lucide-svelte) |  | [Docs](https://lucide.dev/guide/packages/lucide-svelte) · [Source](./packages/lucide-svelte) |
|
||||||
- Well maintained code base.
|
| <img src="https://lucide.dev/framework-logos/solid.svg" alt="Solid logo" width="48"> | **`lucide-solid`** | [](https://www.npmjs.com/package/lucide-solid) |  | [Docs](https://lucide.dev/guide/packages/lucide-solid) · [Source](./packages/lucide-solid) |
|
||||||
- Active community, regularly growing and improving the set.
|
| <img src="https://lucide.dev/framework-logos/preact.svg" alt="Preact logo" width="48"> | **`lucide-preact`** | [](https://www.npmjs.com/package/lucide-preact) |  | [Docs](https://lucide.dev/guide/packages/lucide-preact) · [Source](./packages/lucide-preact) |
|
||||||
|
| <img src="https://lucide.dev/framework-logos/react-native.svg" alt="React Native logo" width="48"> | **`lucide-react-native`** | [](https://www.npmjs.com/package/lucide-react-native) |  | [Docs](https://lucide.dev/guide/packages/lucide-react-native) · [Source](./packages/lucide-react-native) |
|
||||||
## Table of Contents
|
| <img src="https://lucide.dev/framework-logos/angular.svg" alt="Angular logo" width="48"> | **`lucide-angular`** | [](https://www.npmjs.com/package/lucide-angular) |  | [Docs](https://lucide.dev/guide/packages/lucide-angular) · [Source](./packages/lucide-angular) |
|
||||||
|
| <img src="https://lucide.dev/framework-logos/svg.svg" alt="SVG logo" width="48"> | **`lucide-static`** | [](https://www.npmjs.com/package/lucide-static) |  | [Docs](https://lucide.dev/guide/packages/lucide-static) · [Source](./packages/lucide-static) |
|
||||||
- [Usage](#usage)
|
|
||||||
- [Web](#web)
|
|
||||||
- [React](#react)
|
|
||||||
- [React Native](#react-native)
|
|
||||||
- [Vue 2](#vue-2)
|
|
||||||
- [Vue 3](#vue-3)
|
|
||||||
- [Angular](#angular)
|
|
||||||
- [Preact](#preact)
|
|
||||||
- [Static (svg sprite, font, icons ..)](#static-svg-sprite-font-icons-)
|
|
||||||
- [Figma](#figma)
|
|
||||||
- [Laravel](#laravel)
|
|
||||||
- [Flutter](#flutter)
|
|
||||||
- [Svelte](#svelte)
|
|
||||||
- [Solid](#solid)
|
|
||||||
- [Hyva](#hyva)
|
|
||||||
- [Eleventy](#eleventy)
|
|
||||||
- [Contributing](#contributing)
|
|
||||||
- [Community](#community)
|
|
||||||
- [License](#license)
|
|
||||||
- [Credits](#credits)
|
|
||||||
- [Sponsors](#sponsors)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
At its core, Lucide is a collection of [SVG](https://svgontheweb.com/#svg) files. This means that you can use Lucide icons in all the same ways you can use SVGs (e.g. `img`, `background-image`, `inline`, `object`, `embed`, `iframe`). Here's a helpful article detailing the many ways SVGs can be used on the web: [SVG on the Web – Implementation Options](https://svgontheweb.com/#implementation)
|
|
||||||
|
|
||||||
The following are additional ways you can use Lucide.
|
|
||||||
With the Javascript library you can easily incorporate the icon you want in your webpage.
|
|
||||||
|
|
||||||
### Web
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for web applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide#lucide).
|
|
||||||
|
|
||||||
### React
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for react applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-react
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-react
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react#lucide-react).
|
|
||||||
|
|
||||||
### React Native
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for React Native applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-react-native
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-react-native
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-react-native#lucide-react-native).
|
|
||||||
|
|
||||||
### Vue 2
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for vue applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-vue
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-vue
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue#lucide-vue).
|
|
||||||
|
|
||||||
### Vue 3
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for vue applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-vue-next
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-vue-next
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-vue-next#lucide-vue-next).
|
|
||||||
|
|
||||||
### Angular
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-angular
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-angular
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-angular#lucide-angular).
|
|
||||||
|
|
||||||
### Preact
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for preact applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-preact
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-preact
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-preact#lucide-preact).
|
|
||||||
|
|
||||||
### Static (svg sprite, font, icons ..)
|
|
||||||
|
|
||||||
Assets:
|
|
||||||
[Font Files](https://github.com/lucide-icons/lucide/releases/tag/latest)
|
|
||||||
[SVG Files](https://github.com/lucide-icons/lucide/releases/tag/latest)
|
|
||||||
[SVG Sprite](https://cdn.jsdelivr.net/npm/lucide-static@latest/sprite.svg)
|
|
||||||
|
|
||||||
NPM package
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-static
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-static
|
|
||||||
```
|
|
||||||
|
|
||||||
### Figma
|
### Figma
|
||||||
|
|
||||||
@@ -190,78 +50,6 @@ Visit [Figma community page](https://www.figma.com/community/plugin/939567362549
|
|||||||
|
|
||||||
<img width="420" src="https://www.figma.com/community/plugin/939567362549682242/thumbnail" alt="Figma Lucide Cover">
|
<img width="420" src="https://www.figma.com/community/plugin/939567362549682242/thumbnail" alt="Figma Lucide Cover">
|
||||||
|
|
||||||
### Laravel
|
|
||||||
|
|
||||||
Implementation of Lucide icon's using `blade-icons` for Laravel based projects.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
composer require mallardduck/blade-lucide-icons
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/mallardduck/blade-lucide-icons/blob/main/README.md).
|
|
||||||
|
|
||||||
### Flutter
|
|
||||||
|
|
||||||
Implementation of Lucide icon library for Flutter applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
flutter pub add lucide_icons
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [pub.dev](https://pub.dev/packages/lucide_icons).
|
|
||||||
|
|
||||||
### Svelte
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for Svelte applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-svelte
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-svelte
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-svelte#lucide-svelte).
|
|
||||||
|
|
||||||
### Solid
|
|
||||||
|
|
||||||
Implementation of the lucide icon library for solid applications.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
yarn add lucide-solid
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install lucide-solid
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/lucide-icons/lucide/tree/main/packages/lucide-solid#lucide-solid).
|
|
||||||
|
|
||||||
### Hyva
|
|
||||||
|
|
||||||
Implementation of Lucide icon's using Hyvä's svg php viewmodal to render icons for Magento 2 Hyva theme based projects.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
composer require siteation/magento2-hyva-icons-lucide
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/Siteation/magento2-hyva-icons-lucide/blob/main/README.md).
|
|
||||||
|
|
||||||
### Eleventy
|
|
||||||
|
|
||||||
Using this plugin, Eleventy projects can incorporate Lucide icons. it makes it simple to use Lucide icons into your themes via shortcodes, improving your website's overall usability and visual appeal.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm install @grimlink/eleventy-plugin-lucide-icons
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details, see the [documentation](https://github.com/GrimLink/eleventy-plugin-lucide-icons/blob/main/README.md).
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
For more info on how to contribute please see the [contribution guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
|
||||||
@@ -274,7 +62,7 @@ Join the community on our [Discord](https://discord.gg/EH6nSts) server!
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Lucide is totally free for commercial use and personally use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE).
|
Lucide is totally free for commercial use and personal use, this software is licensed under the [ISC License](https://github.com/lucide-icons/lucide/blob/main/LICENSE).
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
@@ -286,5 +74,12 @@ Thank you to all the people who contributed to Lucide!
|
|||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
|
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
|
||||||
<img src="./site/public/vercel.svg" alt="Powered by Vercel" width="200" />
|
<img src="docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="docs/public/digitalocean.svg" width="200" alt="DigitalOcean Referral Badge" /></a>
|
||||||
|
|
||||||
|
### Awesome backers 🍺
|
||||||
|
|
||||||
|
<a href="https://www.scipress.io?utm_source=lucide"><img src="docs/public/sponsors/scipress.svg" width="180" alt="Scipress sponsor badge" /></a>
|
||||||
|
<a href="https://github.com/pdfme/pdfme"><img src="docs/public/sponsors/pdfme.svg" width="180" alt="pdfme sponsor badge" /></a>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Charts",
|
"title": "Charts",
|
||||||
"icon": "pie-chart"
|
"icon": "chart-pie"
|
||||||
}
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../category.schema.json",
|
|
||||||
"title": "Currency",
|
|
||||||
"icon": "dollar-sign"
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Coding & development",
|
"title": "Coding & development",
|
||||||
"icon": "code-2"
|
"icon": "code-xml"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "File icons",
|
"title": "File icons",
|
||||||
"icon": "layout"
|
"icon": "panels-top-left"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Money",
|
"title": "Finance",
|
||||||
"icon": "piggy-bank"
|
"icon": "piggy-bank"
|
||||||
}
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../category.schema.json",
|
|
||||||
"title": "Furniture",
|
|
||||||
"icon": "rocking-chair"
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Home",
|
"title": "Home",
|
||||||
"icon": "home"
|
"icon": "house"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Layout",
|
"title": "Layout",
|
||||||
"icon": "layout"
|
"icon": "panels-top-left"
|
||||||
}
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../category.schema.json",
|
|
||||||
"title": "Maps",
|
|
||||||
"icon": "map"
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Maths",
|
"title": "Mathematics",
|
||||||
"icon": "divide"
|
"icon": "divide"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Multimedia",
|
"title": "Multimedia",
|
||||||
"icon": "play-circle"
|
"icon": "circle-play"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Notifications",
|
"title": "Notification",
|
||||||
"icon": "alert-triangle"
|
"icon": "triangle-alert"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../category.schema.json",
|
"$schema": "../category.schema.json",
|
||||||
"title": "Transportation",
|
"title": "Transportation",
|
||||||
"icon": "train"
|
"icon": "train-front"
|
||||||
}
|
}
|
||||||
@@ -12,8 +12,10 @@
|
|||||||
},
|
},
|
||||||
"title": "Lucide Icons category schema",
|
"title": "Lucide Icons category schema",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["$schema", "icon", "title"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"title": {
|
"$schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
@@ -22,13 +24,12 @@
|
|||||||
"icon": {
|
"icon": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"weight": {
|
"weight": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
|
||||||
"title",
|
|
||||||
"icon"
|
|
||||||
],
|
|
||||||
"description": "A JSON Schema for categories defined by Lucide Icons."
|
"description": "A JSON Schema for categories defined by Lucide Icons."
|
||||||
}
|
}
|
||||||
|
|||||||
10
cspell.json
Normal file
10
cspell.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"dictionaries": ["en-us", "custom-words"],
|
||||||
|
"dictionaryDefinitions": [
|
||||||
|
{
|
||||||
|
"name": "custom-words",
|
||||||
|
"path": "./.cspell/custom-words.txt",
|
||||||
|
"addWords": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
import { eventHandler, setResponseHeader } from 'h3'
|
import iconMetaData from '../../data/iconMetaData';
|
||||||
import iconMetaData from '../../data/iconMetaData'
|
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
|
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
||||||
|
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
Object.entries(iconMetaData).map(([name, { categories }]) => [ name, categories ])
|
Object.entries(iconMetaData).map(([name, { categories }]) => [name, categories]),
|
||||||
)
|
);
|
||||||
})
|
});
|
||||||
|
|||||||
40
docs/.vitepress/api/figma/data.ts
Normal file
40
docs/.vitepress/api/figma/data.ts
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
import iconNodes from '../../data/iconNodes/index.ts';
|
||||||
|
import { IconNodeWithKeys } from '../../theme/types';
|
||||||
|
import iconMetaData from '../../data/iconMetaData';
|
||||||
|
import releaseMeta from '../../data/releaseMetaData.json';
|
||||||
|
import categories from '../../data/categoriesData.json';
|
||||||
|
|
||||||
|
const dataResponse = {
|
||||||
|
icons: Object.entries(iconNodes).reduce((acc, [name, iconNode]) => {
|
||||||
|
const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs }]) => {
|
||||||
|
return [name, attrs];
|
||||||
|
});
|
||||||
|
|
||||||
|
acc[name] = {
|
||||||
|
iconNode: newIconNode,
|
||||||
|
aliases: (iconMetaData[name]?.aliases ?? []).map((alias) =>
|
||||||
|
typeof alias === 'string' ? alias : alias.name,
|
||||||
|
),
|
||||||
|
tags: iconMetaData[name].tags ?? [],
|
||||||
|
categories: iconMetaData[name].categories ?? [],
|
||||||
|
...releaseMeta[name],
|
||||||
|
};
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
aliases: Object.entries(iconNodes).reduce((acc, [name]) => {
|
||||||
|
for (const alias of iconMetaData[name]?.aliases ?? []) {
|
||||||
|
acc[typeof alias === 'string' ? alias : alias.name] = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {}),
|
||||||
|
categories,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default eventHandler((event) => {
|
||||||
|
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
||||||
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
||||||
|
|
||||||
|
return dataResponse;
|
||||||
|
});
|
||||||
@@ -1,41 +1,56 @@
|
|||||||
import { eventHandler, setResponseHeader, defaultContentType } from 'h3'
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
||||||
import { renderToString, renderToStaticMarkup } from 'react-dom/server'
|
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
||||||
import { createElement } from 'react'
|
import { createElement } from 'react';
|
||||||
import SvgPreview from '../../lib/SvgPreview/index.tsx';
|
import SvgPreview from '../../lib/SvgPreview/index.tsx';
|
||||||
import iconNodes from '../../data/iconNodes'
|
import iconNodes from '../../data/iconNodes';
|
||||||
import createLucideIcon from 'lucide-react/src/createLucideIcon'
|
import createLucideIcon from 'lucide-react/src/createLucideIcon';
|
||||||
import Backdrop from '../../lib/SvgPreview/Backdrop.tsx';
|
import Backdrop from '../../lib/SvgPreview/Backdrop.tsx';
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
const { params } = event.context
|
const { params } = event.context;
|
||||||
|
|
||||||
const [name, svgData] = params.data.split('/');
|
const pathData = params.data.split('/');
|
||||||
const data = svgData.slice(0, -4);
|
const data = pathData.at(-1).slice(0, -4);
|
||||||
|
const [name] = pathData;
|
||||||
|
|
||||||
const src = Buffer.from(data, 'base64').toString('utf8');
|
const src = Buffer.from(data, 'base64')
|
||||||
|
.toString('utf8')
|
||||||
|
.replaceAll('\n', '')
|
||||||
|
.replace(/<svg[^>]*>|<\/svg>/g, '');
|
||||||
|
|
||||||
const children = []
|
const children = [];
|
||||||
|
|
||||||
if (name in iconNodes) {
|
// Finds the longest matching icon to be use as the backdrop.
|
||||||
const iconNode = iconNodes[name]
|
// For `square-dashed-bottom-code` it suggests `square-dashed-bottom-code`.
|
||||||
|
// For `square-dashed-bottom-i-dont-exist` it suggests `square-dashed-bottom`.
|
||||||
|
const backdropName = name
|
||||||
|
.split('-')
|
||||||
|
.map((_, idx, arr) => arr.slice(0, idx + 1).join('-'))
|
||||||
|
.reverse()
|
||||||
|
.find((groupName) => groupName in iconNodes);
|
||||||
|
if (!(name in iconNodes) && backdropName) {
|
||||||
|
const iconNode = iconNodes[backdropName];
|
||||||
|
|
||||||
const LucideIcon = createLucideIcon(name, iconNode)
|
const LucideIcon = createLucideIcon(backdropName, iconNode);
|
||||||
const svg = renderToStaticMarkup(createElement(LucideIcon))
|
const svg = renderToStaticMarkup(createElement(LucideIcon));
|
||||||
const backdropString = svg.replace(/<svg[^>]*>|<\/svg>/g, '');
|
const backdropString = svg.replaceAll('\n', '').replace(/<svg[^>]*>|<\/svg>/g, '');
|
||||||
|
|
||||||
children.push(createElement(Backdrop, { backdropString, src }))
|
children.push(
|
||||||
|
createElement(Backdrop, {
|
||||||
|
backdropString,
|
||||||
|
src,
|
||||||
|
color: '#777',
|
||||||
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const svg = Buffer.from(
|
const svg = Buffer.from(
|
||||||
// We can't use jsx here, is not supported here by nitro.
|
// We can't use jsx here, is not supported here by nitro.
|
||||||
renderToString(createElement(SvgPreview, {src, showGrid: true}, children)).replace(
|
renderToString(createElement(SvgPreview, { src, showGrid: true }, children)),
|
||||||
/>/,
|
|
||||||
'><style>@media screen and (prefers-color-scheme: dark) { svg { stroke: #fff } }</style>'
|
|
||||||
)
|
|
||||||
).toString('utf8');
|
).toString('utf8');
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml')
|
defaultContentType(event, 'image/svg+xml');
|
||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
|
|
||||||
return svg
|
return svg;
|
||||||
})
|
});
|
||||||
|
|||||||
37
docs/.vitepress/api/gh-icon/diff/[...data].get.ts
Normal file
37
docs/.vitepress/api/gh-icon/diff/[...data].get.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
||||||
|
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
|
||||||
|
import { createElement } from 'react';
|
||||||
|
import Diff from '../../../lib/SvgPreview/Diff.tsx';
|
||||||
|
import iconNodes from '../../../data/iconNodes';
|
||||||
|
import createLucideIcon from 'lucide-react/src/createLucideIcon';
|
||||||
|
|
||||||
|
export default eventHandler((event) => {
|
||||||
|
const { params } = event.context;
|
||||||
|
|
||||||
|
const pathData = params.data.split('/');
|
||||||
|
const data = pathData.at(-1).slice(0, -4);
|
||||||
|
const [name] = pathData;
|
||||||
|
|
||||||
|
const newSrc = Buffer.from(data, 'base64')
|
||||||
|
.toString('utf8')
|
||||||
|
.replaceAll('\n', '')
|
||||||
|
.replace(/<svg[^>]*>|<\/svg>/g, '');
|
||||||
|
|
||||||
|
const children = [];
|
||||||
|
|
||||||
|
const oldSrc = iconNodes[name]
|
||||||
|
? renderToStaticMarkup(createElement(createLucideIcon(name, iconNodes[name])))
|
||||||
|
.replaceAll('\n', '')
|
||||||
|
.replace(/<svg[^>]*>|<\/svg>/g, '')
|
||||||
|
: '';
|
||||||
|
|
||||||
|
const svg = Buffer.from(
|
||||||
|
// We can't use jsx here, is not supported here by nitro.
|
||||||
|
renderToString(createElement(Diff, { oldSrc, newSrc, showGrid: true }, children)),
|
||||||
|
).toString('utf8');
|
||||||
|
|
||||||
|
defaultContentType(event, 'image/svg+xml');
|
||||||
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
|
|
||||||
|
return svg;
|
||||||
|
});
|
||||||
73
docs/.vitepress/api/gh-icon/dpi/[...data].get.ts
Normal file
73
docs/.vitepress/api/gh-icon/dpi/[...data].get.ts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
||||||
|
import { Resvg, initWasm } from '@resvg/resvg-wasm';
|
||||||
|
import wasm from './loadWasm';
|
||||||
|
|
||||||
|
var initializedResvg = initWasm(wasm);
|
||||||
|
|
||||||
|
export default eventHandler(async (event) => {
|
||||||
|
const { params = {} } = event.context;
|
||||||
|
await initializedResvg;
|
||||||
|
|
||||||
|
const imageSize = 96;
|
||||||
|
const [iconSizeString, svgData] = params.data.split('/');
|
||||||
|
const iconSize = parseInt(iconSizeString, 10);
|
||||||
|
const data = svgData.slice(0, -4);
|
||||||
|
|
||||||
|
const src = Buffer.from(data, 'base64').toString('utf8');
|
||||||
|
const svg = (src.includes('<svg') ? src : `<svg>${src}</svg>`)
|
||||||
|
.replace(/(\r\n|\n|\r)/gm, '')
|
||||||
|
.replace(
|
||||||
|
/<svg[^>]*/,
|
||||||
|
`<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="${iconSize}"
|
||||||
|
height="${iconSize}"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="#fff"
|
||||||
|
stroke-width="2"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
`,
|
||||||
|
);
|
||||||
|
|
||||||
|
const resvg = new Resvg(svg, { background: '#000' });
|
||||||
|
const pngData = resvg.render();
|
||||||
|
const pngBuffer = Buffer.from(pngData.asPng());
|
||||||
|
|
||||||
|
defaultContentType(event, 'image/svg+xml');
|
||||||
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
|
|
||||||
|
return `
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="${imageSize}" height="${imageSize}" viewBox="0 0 ${imageSize} ${imageSize}">
|
||||||
|
<style>
|
||||||
|
@media screen and (prefers-color-scheme: light) {
|
||||||
|
#fallback-background { fill: transparent; }
|
||||||
|
}
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
#fallback-background { fill: transparent; }
|
||||||
|
rect { fill: #fff; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<mask id="mask">
|
||||||
|
<image
|
||||||
|
width="${imageSize}"
|
||||||
|
height="${imageSize}"
|
||||||
|
href="data:image/png;base64,${pngBuffer.toString('base64')}"
|
||||||
|
image-rendering="pixelated"
|
||||||
|
/>
|
||||||
|
</mask>
|
||||||
|
<rect
|
||||||
|
id="fallback-background"
|
||||||
|
width="${imageSize}"
|
||||||
|
height="${imageSize}" ry="${imageSize / 24}"
|
||||||
|
fill="#fff"
|
||||||
|
/>
|
||||||
|
<rect
|
||||||
|
width="${imageSize}"
|
||||||
|
height="${imageSize}"
|
||||||
|
fill="#000"
|
||||||
|
mask="url(#mask)"
|
||||||
|
/>
|
||||||
|
</svg>`;
|
||||||
|
});
|
||||||
15
docs/.vitepress/api/gh-icon/dpi/loadWasm.ts
Normal file
15
docs/.vitepress/api/gh-icon/dpi/loadWasm.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import fs from 'fs';
|
||||||
|
import module from 'node:module';
|
||||||
|
/* WASM_IMPORT */
|
||||||
|
|
||||||
|
let wasm;
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
const require = module.createRequire(import.meta.url);
|
||||||
|
|
||||||
|
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
|
||||||
|
} else {
|
||||||
|
wasm = resvg_wasm;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default wasm;
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
import { eventHandler, setResponseHeader, defaultContentType } from 'h3'
|
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
|
||||||
import { renderToString } from 'react-dom/server'
|
import { renderToString } from 'react-dom/server';
|
||||||
import { createElement } from 'react'
|
import { createElement } from 'react';
|
||||||
import SvgPreview from '../../../lib/SvgPreview/index.tsx';
|
import SvgPreview from '../../../lib/SvgPreview/index.tsx';
|
||||||
import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon'
|
import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon';
|
||||||
import { parseSync } from 'svgson';
|
import { parseSync } from 'svgson';
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
const { params } = event.context
|
const { params } = event.context;
|
||||||
|
|
||||||
const [strokeWidth, svgData] = params.data.split('/');
|
const [strokeWidth, svgData] = params.data.split('/');
|
||||||
const data = svgData.slice(0, -4);
|
const data = svgData.slice(0, -4);
|
||||||
@@ -16,20 +16,29 @@ export default eventHandler((event) => {
|
|||||||
const Icon = createLucideIcon(
|
const Icon = createLucideIcon(
|
||||||
'icon',
|
'icon',
|
||||||
parseSync(src.includes('<svg') ? src : `<svg>${src}</svg>`).children.map(
|
parseSync(src.includes('<svg') ? src : `<svg>${src}</svg>`).children.map(
|
||||||
({ name, attributes }) => [name, attributes]
|
({ name, attributes }) => [name, attributes],
|
||||||
) as IconNode
|
) as IconNode,
|
||||||
);
|
);
|
||||||
|
|
||||||
const svg = Buffer.from(
|
const svg = Buffer.from(
|
||||||
// We can't use jsx here, is not supported here by nitro.
|
// We can't use jsx here, is not supported here by nitro.
|
||||||
renderToString(createElement(Icon, { strokeWidth })).replace(
|
renderToString(createElement(Icon, { strokeWidth }))
|
||||||
|
.replace(/fill\="none"/, 'fill="#fff"')
|
||||||
|
.replace(
|
||||||
/>/,
|
/>/,
|
||||||
'><style>@media screen and (prefers-color-scheme: dark) { svg { stroke: #fff } }</style>'
|
`><style>
|
||||||
)
|
@media screen and (prefers-color-scheme: light) {
|
||||||
|
svg { fill: transparent !important; }
|
||||||
|
}
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
svg { stroke: #fff; fill: transparent !important; }
|
||||||
|
}
|
||||||
|
</style>`,
|
||||||
|
),
|
||||||
).toString('utf8');
|
).toString('utf8');
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml')
|
defaultContentType(event, 'image/svg+xml');
|
||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
|
|
||||||
return svg
|
return svg;
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
import { eventHandler, getQuery, setResponseHeader } from 'h3'
|
import { eventHandler, getQuery, setResponseHeader } from 'h3';
|
||||||
import iconNodes from '../../data/iconNodes'
|
import iconNodes from '../../data/iconNodes';
|
||||||
import { IconNodeWithKeys } from '../../theme/types'
|
import { IconNodeWithKeys } from '../../theme/types';
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
const query = getQuery(event)
|
const query = getQuery(event);
|
||||||
|
|
||||||
const withUniqueKeys = query.withUniqueKeys === 'true'
|
const withUniqueKeys = query.withUniqueKeys === 'true';
|
||||||
|
|
||||||
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
|
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
||||||
|
|
||||||
if (withUniqueKeys) {
|
if (withUniqueKeys) {
|
||||||
return iconNodes
|
return iconNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.entries(iconNodes).reduce((acc, [name, iconNode]) => {
|
return Object.entries(iconNodes).reduce((acc, [name, iconNode]) => {
|
||||||
if (withUniqueKeys) {
|
if (withUniqueKeys) {
|
||||||
return [name, iconNode]
|
return [name, iconNode];
|
||||||
}
|
}
|
||||||
|
|
||||||
const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs}]) => {
|
const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs }]) => {
|
||||||
return [name, attrs]
|
return [name, attrs];
|
||||||
})
|
});
|
||||||
|
|
||||||
acc[name] = newIconNode
|
acc[name] = newIconNode;
|
||||||
|
|
||||||
return acc
|
return acc;
|
||||||
}, {})
|
}, {});
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
import { eventHandler, getQuery, setResponseHeader, createError } from 'h3'
|
import { eventHandler, getQuery, setResponseHeader, createError } from 'h3';
|
||||||
import iconNodes from '../../data/iconNodes'
|
import iconNodes from '../../data/iconNodes';
|
||||||
import createLucideIcon from 'lucide-react/src/createLucideIcon'
|
import createLucideIcon from 'lucide-react/src/createLucideIcon';
|
||||||
import { renderToString } from 'react-dom/server'
|
import { renderToString } from 'react-dom/server';
|
||||||
import { createElement } from 'react'
|
import { createElement } from 'react';
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
const { params } = event.context
|
const { params } = event.context;
|
||||||
|
|
||||||
const iconNode = iconNodes[params.iconName]
|
const iconNode = iconNodes[params.iconName];
|
||||||
|
|
||||||
if (iconNode == null) {
|
if (iconNode == null) {
|
||||||
const error = createError({
|
const error = createError({
|
||||||
statusCode: 404,
|
statusCode: 404,
|
||||||
message: `Icon "${params.iconName}" not found`,
|
message: `Icon "${params.iconName}" not found`,
|
||||||
})
|
});
|
||||||
|
|
||||||
return sendError(event, error)
|
return sendError(event, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
const width = getQuery(event).width || undefined
|
const width = getQuery(event).width || undefined;
|
||||||
const height = getQuery(event).height || undefined
|
const height = getQuery(event).height || undefined;
|
||||||
const color = getQuery(event).color || undefined
|
const color = getQuery(event).color || undefined;
|
||||||
const strokeWidth = getQuery(event).strokeWidth || undefined
|
const strokeWidth = getQuery(event).strokeWidth || undefined;
|
||||||
|
|
||||||
const LucideIcon = createLucideIcon(params.iconName, iconNode)
|
const LucideIcon = createLucideIcon(params.iconName, iconNode);
|
||||||
|
|
||||||
const svg = Buffer.from(
|
const svg = Buffer.from(
|
||||||
renderToString(
|
renderToString(
|
||||||
@@ -32,14 +32,13 @@ export default eventHandler((event) => {
|
|||||||
height,
|
height,
|
||||||
color: color ? `#${color}` : undefined,
|
color: color ? `#${color}` : undefined,
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
}
|
}),
|
||||||
))
|
),
|
||||||
).toString('utf8');
|
).toString('utf8');
|
||||||
|
|
||||||
defaultContentType(event, 'image/svg+xml')
|
defaultContentType(event, 'image/svg+xml');
|
||||||
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
|
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
||||||
|
|
||||||
return svg
|
return svg;
|
||||||
|
});
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import { eventHandler, setResponseHeader } from 'h3'
|
import iconMetaData from '../../data/iconMetaData';
|
||||||
import iconMetaData from '../../data/iconMetaData'
|
|
||||||
|
|
||||||
export default eventHandler((event) => {
|
export default eventHandler((event) => {
|
||||||
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400')
|
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
|
||||||
setResponseHeader(event, 'Access-Control-Allow-Origin', '*')
|
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');
|
||||||
|
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(Object.entries(iconMetaData).map(([name, { tags }]) => [name, tags]));
|
||||||
Object.entries(iconMetaData).map(([name, { tags }]) => [ name, tags ])
|
});
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export default eventHandler(() => {
|
export default eventHandler(() => {
|
||||||
return { nitro: 'Is Awesome! asda' }
|
return { nitro: 'Is Awesome! asda' };
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url';
|
||||||
import path from 'path';
|
import { defineConfig } from 'vitepress';
|
||||||
import { defineConfig } from 'vitepress'
|
|
||||||
import { createWriteStream } from 'node:fs'
|
|
||||||
import { resolve } from 'node:path'
|
|
||||||
import { SitemapStream } from 'sitemap'
|
|
||||||
import sidebar from './sidebar';
|
import sidebar from './sidebar';
|
||||||
import fs from 'fs';
|
|
||||||
|
|
||||||
const links = []
|
const title = 'Lucide';
|
||||||
|
const socialTitle = 'Lucide Icons';
|
||||||
|
const description = 'Beautiful & consistent icon toolkit made by the community.';
|
||||||
const title = "Lucide";
|
|
||||||
const socialTitle = "Lucide Icons";
|
|
||||||
const description = "Beautiful & consistent icon toolkit made by the community."
|
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
// https://vitepress.dev/reference/site-config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -20,138 +12,168 @@ export default defineConfig({
|
|||||||
description,
|
description,
|
||||||
cleanUrls: true,
|
cleanUrls: true,
|
||||||
outDir: '.vercel/output/static',
|
outDir: '.vercel/output/static',
|
||||||
|
srcExclude: ['**/README.md'],
|
||||||
vite: {
|
vite: {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
{
|
{
|
||||||
find: /^.*\/VPIconAlignLeft\.vue$/,
|
find: /^.*\/VPIconAlignLeft\.vue$/,
|
||||||
replacement: fileURLToPath(
|
replacement: fileURLToPath(
|
||||||
new URL('./theme/components/overrides/VPIconAlignLeft.vue', import.meta.url)
|
new URL('./theme/components/overrides/VPIconAlignLeft.vue', import.meta.url),
|
||||||
)
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: /^.*\/VPFooter\.vue$/,
|
find: /^.*\/VPFooter\.vue$/,
|
||||||
replacement: fileURLToPath(
|
replacement: fileURLToPath(
|
||||||
new URL('./theme/components/overrides/VPFooter.vue', import.meta.url)
|
new URL('./theme/components/overrides/VPFooter.vue', import.meta.url),
|
||||||
)
|
),
|
||||||
}
|
},
|
||||||
]
|
{
|
||||||
|
find: '~/.vitepress',
|
||||||
|
replacement: fileURLToPath(new URL('./', import.meta.url)),
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
head: [
|
head: [
|
||||||
[ 'script', {
|
[
|
||||||
src: 'https://plausible.io/js/script.js',
|
'script',
|
||||||
|
{
|
||||||
|
src: 'https://analytics.lucide.dev/js/script.js',
|
||||||
'data-domain': 'lucide.dev',
|
'data-domain': 'lucide.dev',
|
||||||
defer: ''
|
defer: '',
|
||||||
}],
|
},
|
||||||
[ 'meta', {
|
],
|
||||||
property:"og:locale",
|
[
|
||||||
content:"en_US"
|
'meta',
|
||||||
}],
|
{
|
||||||
[ 'meta', {
|
property: 'og:locale',
|
||||||
property:"og:type",
|
content: 'en_US',
|
||||||
content:"website"
|
},
|
||||||
}],
|
],
|
||||||
[ 'meta', {
|
[
|
||||||
property:"og:site_name",
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'og:type',
|
||||||
|
content: 'website',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'og:site_name',
|
||||||
content: title,
|
content: title,
|
||||||
}],
|
},
|
||||||
[ 'meta', {
|
],
|
||||||
property:"og:title",
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'og:title',
|
||||||
content: socialTitle,
|
content: socialTitle,
|
||||||
}],
|
},
|
||||||
[ 'meta', {
|
],
|
||||||
property:"og:description",
|
[
|
||||||
content: description
|
'meta',
|
||||||
}],
|
{
|
||||||
[ 'meta', {
|
property: 'og:description',
|
||||||
property:"og:url",
|
content: description,
|
||||||
content:"https://lucide.dev"
|
},
|
||||||
}],
|
],
|
||||||
[ 'meta', {
|
[
|
||||||
property:"og:image",
|
'meta',
|
||||||
content: "https://lucide.dev/og.png"
|
{
|
||||||
}],
|
property: 'og:url',
|
||||||
[ 'meta', {
|
content: 'https://lucide.dev',
|
||||||
property:"og:image:width",
|
},
|
||||||
content:"1200"
|
],
|
||||||
}],
|
[
|
||||||
[ 'meta', {
|
'meta',
|
||||||
property:"og:image:height",
|
{
|
||||||
content:"630"
|
property: 'og:image',
|
||||||
}],
|
content: 'https://lucide.dev/og.png',
|
||||||
[ 'meta', {
|
},
|
||||||
property:"og:image:type",
|
],
|
||||||
content:"image/png"
|
[
|
||||||
}],
|
'meta',
|
||||||
[ 'meta', {
|
{
|
||||||
property:"twitter:card",
|
property: 'og:image:width',
|
||||||
content:"summary_large_image"
|
content: '1200',
|
||||||
}],
|
},
|
||||||
[ 'meta', {
|
],
|
||||||
property:"twitter:title",
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'og:image:height',
|
||||||
|
content: '630',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'og:image:type',
|
||||||
|
content: 'image/png',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'twitter:card',
|
||||||
|
content: 'summary_large_image',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'twitter:title',
|
||||||
content: socialTitle,
|
content: socialTitle,
|
||||||
}],
|
},
|
||||||
[ 'meta', {
|
],
|
||||||
property:"twitter:description",
|
[
|
||||||
content: description
|
'meta',
|
||||||
}],
|
{
|
||||||
[ 'meta', {
|
property: 'twitter:description',
|
||||||
property:"twitter:image",
|
content: description,
|
||||||
content:"https://lucide.dev/og.png"
|
},
|
||||||
}],
|
],
|
||||||
|
[
|
||||||
|
'meta',
|
||||||
|
{
|
||||||
|
property: 'twitter:image',
|
||||||
|
content: 'https://lucide.dev/og.png',
|
||||||
|
},
|
||||||
|
],
|
||||||
],
|
],
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
// https://vitepress.dev/reference/default-theme-config
|
// https://vitepress.dev/reference/default-theme-config
|
||||||
logo: {
|
logo: {
|
||||||
light: '/logo.light.svg',
|
light: '/logo.light.svg',
|
||||||
dark: '/logo.dark.svg'
|
dark: '/logo.dark.svg',
|
||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
{ text: 'Icons', link: '/icons/' },
|
{ text: 'Icons', link: '/icons/' },
|
||||||
{ text: 'Guide', link: '/guide/' },
|
{ text: 'Guide', link: '/guide/' },
|
||||||
{ text: 'Packages', link: '/packages' },
|
{ text: 'Packages', link: '/packages' },
|
||||||
|
{ text: 'Showcase', link: '/showcase' },
|
||||||
{ text: 'License', link: '/license' },
|
{ text: 'License', link: '/license' },
|
||||||
],
|
],
|
||||||
sidebar,
|
sidebar,
|
||||||
socialLinks: [
|
socialLinks: [
|
||||||
{ icon: 'github', link: 'https://github.com/lucide-icons/lucide' },
|
{ icon: 'github', link: 'https://github.com/lucide-icons/lucide' },
|
||||||
{ icon: 'discord', link: 'https://discord.gg/EH6nSts' }
|
{ icon: 'discord', link: 'https://discord.gg/EH6nSts' },
|
||||||
],
|
],
|
||||||
footer: {
|
footer: {
|
||||||
message: 'Released under the ISC License.',
|
message: 'Released under the ISC License.',
|
||||||
copyright: `Copyright © ${new Date().getFullYear()} Lucide Contributors`
|
copyright: `Copyright © ${new Date().getFullYear()} Lucide Contributors`,
|
||||||
},
|
},
|
||||||
editLink: {
|
editLink: {
|
||||||
pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path'
|
pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path',
|
||||||
|
},
|
||||||
|
carbonAds: {
|
||||||
|
code: 'CWYIC53U',
|
||||||
|
placement: 'lucidedev',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
transformHtml: (_, id, { pageData }) => {
|
sitemap: {
|
||||||
if (/[\\/]404\.html$/.test(id)) {
|
hostname: 'https://lucide.dev/',
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pageData.relativePath.startsWith('icons/')) {
|
|
||||||
links.push({
|
|
||||||
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
|
|
||||||
lastmod: pageData?.params?.changedRelease?.date
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
links.push({
|
|
||||||
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
|
|
||||||
lastmod: pageData.lastUpdated
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
buildEnd: async ({ outDir }) => {
|
});
|
||||||
const sitemap = new SitemapStream({
|
|
||||||
hostname: 'https://lucide.dev/'
|
|
||||||
})
|
|
||||||
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))
|
|
||||||
sitemap.pipe(writeStream)
|
|
||||||
links.forEach((link) => sitemap.write(link))
|
|
||||||
sitemap.end()
|
|
||||||
await new Promise((r) => writeStream.on('finish', r))
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
174
docs/.vitepress/data/categoriesData.json
Normal file
174
docs/.vitepress/data/categoriesData.json
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "accessibility",
|
||||||
|
"title": "Accessibility"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "account",
|
||||||
|
"title": "Accounts & access"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "animals",
|
||||||
|
"title": "Animals"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "arrows",
|
||||||
|
"title": "Arrows"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "brands",
|
||||||
|
"title": "Brands"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "buildings",
|
||||||
|
"title": "Buildings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "charts",
|
||||||
|
"title": "Charts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "communication",
|
||||||
|
"title": "Communication"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connectivity",
|
||||||
|
"title": "Connectivity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cursors",
|
||||||
|
"title": "Cursors"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "design",
|
||||||
|
"title": "Design"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "development",
|
||||||
|
"title": "Coding & development"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "devices",
|
||||||
|
"title": "Devices"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "emoji",
|
||||||
|
"title": "Emoji"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "files",
|
||||||
|
"title": "File icons"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "finance",
|
||||||
|
"title": "Finance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "food-beverage",
|
||||||
|
"title": "Food & beverage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gaming",
|
||||||
|
"title": "Gaming"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "home",
|
||||||
|
"title": "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "layout",
|
||||||
|
"title": "Layout"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "mail",
|
||||||
|
"title": "Mail"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "math",
|
||||||
|
"title": "Mathematics"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "medical",
|
||||||
|
"title": "Medical"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "multimedia",
|
||||||
|
"title": "Multimedia"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nature",
|
||||||
|
"title": "Nature"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "navigation",
|
||||||
|
"title": "Navigation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "notifications",
|
||||||
|
"title": "Notification"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "people",
|
||||||
|
"title": "People"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "photography",
|
||||||
|
"title": "Photography"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "science",
|
||||||
|
"title": "Science"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "seasons",
|
||||||
|
"title": "Seasons"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "security",
|
||||||
|
"title": "Security"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shapes",
|
||||||
|
"title": "Shapes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shopping",
|
||||||
|
"title": "Shopping"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "social",
|
||||||
|
"title": "Social"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sports",
|
||||||
|
"title": "Sports"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sustainability",
|
||||||
|
"title": "Sustainability"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "text",
|
||||||
|
"title": "Text formatting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "time",
|
||||||
|
"title": "Time & calendar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "tools",
|
||||||
|
"title": "Tools"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "transportation",
|
||||||
|
"title": "Transportation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "travel",
|
||||||
|
"title": "Travel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "weather",
|
||||||
|
"title": "Weather"
|
||||||
|
}
|
||||||
|
]
|
||||||
50
docs/.vitepress/data/companiesData.json
Normal file
50
docs/.vitepress/data/companiesData.json
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Vercel",
|
||||||
|
"url": "https://vercel.com",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/vercel-light.svg",
|
||||||
|
"dark": "/company-logos/vercel-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Supabase",
|
||||||
|
"url": "https://supabase.com",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/supabase-light.svg",
|
||||||
|
"dark": "/company-logos/supabase-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Obsidian",
|
||||||
|
"url": "https://obsidian.md",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/obsidian-light.svg",
|
||||||
|
"dark": "/company-logos/obsidian-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Open Collective",
|
||||||
|
"url": "https://opencollective.com",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/open-collective-light.svg",
|
||||||
|
"dark": "/company-logos/open-collective-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Super",
|
||||||
|
"url": "https://super.so",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/super-light.svg",
|
||||||
|
"dark": "/company-logos/super-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Noodle",
|
||||||
|
"url": "https://noodle.run/",
|
||||||
|
"image": {
|
||||||
|
"light": "/company-logos/noodle-light.svg",
|
||||||
|
"dark": "/company-logos/noodle-dark.svg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
26
docs/.vitepress/data/componentLibrariesData.json
Normal file
26
docs/.vitepress/data/componentLibrariesData.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Shadcn/ui",
|
||||||
|
"url": "https://ui.shadcn.com/",
|
||||||
|
"image": {
|
||||||
|
"light": "/library-logos/shadcn-ui-light.svg",
|
||||||
|
"dark": "/library-logos/shadcn-ui-dark.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tamagui",
|
||||||
|
"url": "https://tamagui.dev/",
|
||||||
|
"image": {
|
||||||
|
"light": "/library-logos/tamagui.svg",
|
||||||
|
"dark": "/library-logos/tamagui.svg"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Reflex",
|
||||||
|
"url": "https://reflex.dev",
|
||||||
|
"image": {
|
||||||
|
"light": "/library-logos/reflex-light.svg",
|
||||||
|
"dark": "/library-logos/reflex-dark.svg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -3,87 +3,144 @@
|
|||||||
"order": 0,
|
"order": 0,
|
||||||
"icon": "js",
|
"icon": "js",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide", "href": "https://www.npmjs.com/package/lucide" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide", "href": "https://www.npmjs.com/package/lucide" }
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-react": {
|
"lucide-react": {
|
||||||
"order": 1,
|
"order": 1,
|
||||||
"icon": "react",
|
"icon": "react",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-react", "href": "https://www.npmjs.com/package/lucide-react" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-react", "href": "https://www.npmjs.com/package/lucide-react" }
|
"alt": "npm",
|
||||||
]
|
"src": "https://img.shields.io/npm/v/lucide-react",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-react"
|
||||||
},
|
},
|
||||||
"lucide-vue": {
|
{
|
||||||
"order": 2,
|
"alt": "npm",
|
||||||
"icon": "vue",
|
"src": "https://img.shields.io/npm/dw/lucide-react",
|
||||||
"shields": [
|
"href": "https://www.npmjs.com/package/lucide-react"
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-vue", "href": "https://www.npmjs.com/package/lucide-vue" },
|
}
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-vue", "href": "https://www.npmjs.com/package/lucide-vue" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-vue-next": {
|
"lucide-vue-next": {
|
||||||
"order": 3,
|
"order": 2,
|
||||||
"icon": "vue-next",
|
"icon": "vue-next",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-vue-next", "href": "https://www.npmjs.com/package/lucide-vue-next" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-vue-next", "href": "https://www.npmjs.com/package/lucide-vue-next" }
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide-vue-next",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-vue-next"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide-vue-next",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-vue-next"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-svelte": {
|
"lucide-svelte": {
|
||||||
"order": 4,
|
"order": 3,
|
||||||
"icon": "svelte",
|
"icon": "svelte",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-svelte", "href": "https://www.npmjs.com/package/lucide-svelte" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-svelte", "href": "https://www.npmjs.com/package/lucide-svelte" }
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide-svelte",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-svelte"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide-svelte",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-svelte"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-solid": {
|
"lucide-solid": {
|
||||||
"order": 4,
|
"order": 4,
|
||||||
"icon": "solid",
|
"icon": "solid",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-solid", "href": "https://www.npmjs.com/package/lucide-solid" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-solid", "href": "https://www.npmjs.com/package/lucide-solid" }
|
"alt": "npm",
|
||||||
]
|
"src": "https://img.shields.io/npm/v/lucide-solid",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-solid"
|
||||||
},
|
},
|
||||||
"lucide-preact": {
|
{
|
||||||
"order": 5,
|
"alt": "npm",
|
||||||
"icon": "preact",
|
"src": "https://img.shields.io/npm/dw/lucide-solid",
|
||||||
"shields": [
|
"href": "https://www.npmjs.com/package/lucide-solid"
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-preact", "href": "https://www.npmjs.com/package/lucide-preact" },
|
}
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-preact", "href": "https://www.npmjs.com/package/lucide-preact" }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-react-native": {
|
"lucide-react-native": {
|
||||||
"order": 6,
|
"order": 5,
|
||||||
"icon": "react-native",
|
"icon": "react-native",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-react-native", "href": "https://www.npmjs.com/package/lucide-react-native" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-react-native", "href": "https://www.npmjs.com/package/lucide-react-native" }
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide-react-native",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-react-native"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide-react-native",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-react-native"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-angular": {
|
"lucide-angular": {
|
||||||
"order": 7,
|
"order": 6,
|
||||||
"icon": "angular",
|
"icon": "angular",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-angular", "href": "https://www.npmjs.com/package/lucide-angular" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-angular", "href": "https://www.npmjs.com/package/lucide-angular" }
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide-angular",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-angular"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide-angular",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-angular"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lucide-preact": {
|
||||||
|
"order": 7,
|
||||||
|
"icon": "preact",
|
||||||
|
"shields": [
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/v/lucide-preact",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-preact"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "npm",
|
||||||
|
"src": "https://img.shields.io/npm/dw/lucide-preact",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-preact"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lucide-static": {
|
"lucide-static": {
|
||||||
"order": 8,
|
"order": 8,
|
||||||
"icon": "svg",
|
"icon": "svg",
|
||||||
"shields": [
|
"shields": [
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-static", "href": "https://www.npmjs.com/package/lucide-static" },
|
{
|
||||||
{ "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-static", "href": "https://www.npmjs.com/package/lucide-static" }
|
"alt": "npm",
|
||||||
]
|
"src": "https://img.shields.io/npm/v/lucide-static",
|
||||||
|
"href": "https://www.npmjs.com/package/lucide-static"
|
||||||
},
|
},
|
||||||
"lucide-flutter": {
|
{
|
||||||
"order": 9,
|
"alt": "npm",
|
||||||
"icon": "flutter",
|
"src": "https://img.shields.io/npm/dw/lucide-static",
|
||||||
"shields": [
|
"href": "https://www.npmjs.com/package/lucide-static"
|
||||||
{ "alt": "flutter", "src": "https://img.shields.io/pub/v/lucide_icons", "href": "https://img.shields.io/pub/v/lucide_icons" }
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,5 +76,24 @@
|
|||||||
],
|
],
|
||||||
"source": "https://github.com/swisnl/nuxt-lucide-icons",
|
"source": "https://github.com/swisnl/nuxt-lucide-icons",
|
||||||
"documentation": "https://github.com/swisnl/nuxt-lucide-icons/blob/main/README.md"
|
"documentation": "https://github.com/swisnl/nuxt-lucide-icons/blob/main/README.md"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "lucide-lustre",
|
||||||
|
"description": "A library providing https://lucide.dev icons to lustre",
|
||||||
|
"icon": "/framework-logos/lustre.webp",
|
||||||
|
"shields": [
|
||||||
|
{
|
||||||
|
"alt": "Latest Stable Version",
|
||||||
|
"src": "https://img.shields.io/hexpm/v/lucide_lustre",
|
||||||
|
"href": "https://hex.pm/packages/lucide_lustre"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alt": "Total Downloads",
|
||||||
|
"src": "https://img.shields.io/hexpm/dw/lucide_lustre",
|
||||||
|
"href": "https://hex.pm/packages/lucide_lustre"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": "https://github.com/dinkelspiel/lucide_lustre",
|
||||||
|
"documentation": "https://github.com/dinkelspiel/lucide_lustre/blob/master/README.md"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
48
docs/.vitepress/data/teamData.json
Normal file
48
docs/.vitepress/data/teamData.json
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Eric Fennis",
|
||||||
|
"title": "Creator of Lucide & Software engineer @nedap",
|
||||||
|
"image": "https://github.com/ericfennis.png?size=192",
|
||||||
|
"sponsor": "https://github.com/sponsors/ericfennis",
|
||||||
|
"socialLinks": [
|
||||||
|
{
|
||||||
|
"icon": "github",
|
||||||
|
"link": "https://github.com/ericfennis"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "x",
|
||||||
|
"link": "https://x.com/ericfennis"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Karsa Rigó",
|
||||||
|
"title": "Maintainer of Lucide & Software engineer @sztaki",
|
||||||
|
"image": "https://github.com/karsa-mistmere.png?size=192",
|
||||||
|
"socialLinks": [
|
||||||
|
{
|
||||||
|
"icon": "github",
|
||||||
|
"link": "https://github.com/karsa-mistmere"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "linkedin",
|
||||||
|
"link": "https://www.linkedin.com/in/karsamistmere"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jakob Guddas",
|
||||||
|
"title": "Maintainer of Lucide & Software engineer @LEGO",
|
||||||
|
"image": "https://github.com/jguddas.png?size=192",
|
||||||
|
"socialLinks": [
|
||||||
|
{
|
||||||
|
"icon": "github",
|
||||||
|
"link": "https://github.com/jguddas"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon": "linkedin",
|
||||||
|
"link": "https://www.linkedin.com/in/jguddas"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,71 +1,96 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
interface BackdropProps {
|
interface BackdropProps {
|
||||||
src: string
|
src: string;
|
||||||
backdropString: string
|
color?: string;
|
||||||
|
outline?: boolean;
|
||||||
|
backdropString: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Backdrop = ({ src, backdropString }: BackdropProps): JSX.Element => {
|
const Backdrop = ({
|
||||||
|
src,
|
||||||
|
color = 'red',
|
||||||
|
outline = true,
|
||||||
|
backdropString,
|
||||||
|
}: BackdropProps): JSX.Element => {
|
||||||
|
const id = React.useId();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<defs xmlns="http://www.w3.org/2000/svg">
|
<defs xmlns="http://www.w3.org/2000/svg">
|
||||||
<pattern
|
<pattern
|
||||||
id="pattern"
|
id={`pattern-${id}`}
|
||||||
width=".1"
|
width=".1"
|
||||||
height=".1"
|
height=".1"
|
||||||
patternUnits="userSpaceOnUse"
|
patternUnits="userSpaceOnUse"
|
||||||
patternTransform="rotate(45 50 50)"
|
patternTransform="rotate(45 50 50)"
|
||||||
>
|
>
|
||||||
<line stroke="red" strokeWidth={0.1} y2={1} />
|
<line
|
||||||
<line stroke="red" strokeWidth={0.1} y2={1} />
|
stroke={color}
|
||||||
|
strokeWidth={0.1}
|
||||||
|
y2={1}
|
||||||
|
/>
|
||||||
|
<line
|
||||||
|
stroke={color}
|
||||||
|
strokeWidth={0.1}
|
||||||
|
y2={1}
|
||||||
|
/>
|
||||||
</pattern>
|
</pattern>
|
||||||
</defs>
|
</defs>
|
||||||
<mask id="svg-preview-backdrop-mask-outline" maskUnits="userSpaceOnUse">
|
<mask
|
||||||
<g stroke="#fff" dangerouslySetInnerHTML={{ __html: backdropString }} />
|
id={`svg-preview-backdrop-mask-${id}`}
|
||||||
<g dangerouslySetInnerHTML={{ __html: src }} strokeWidth={2.05} />
|
maskUnits="userSpaceOnUse"
|
||||||
</mask>
|
>
|
||||||
<mask id="svg-preview-backdrop-mask-fill" maskUnits="userSpaceOnUse">
|
|
||||||
<g stroke="#fff" dangerouslySetInnerHTML={{ __html: backdropString }} />
|
|
||||||
<g dangerouslySetInnerHTML={{ __html: src }} strokeWidth={2.05} />
|
|
||||||
<g strokeWidth={1.75} dangerouslySetInnerHTML={{ __html: backdropString }} />
|
|
||||||
</mask>
|
|
||||||
<g
|
<g
|
||||||
strokeWidth={2.25}
|
stroke="#fff"
|
||||||
stroke="url(#pattern)"
|
dangerouslySetInnerHTML={{ __html: backdropString }}
|
||||||
mask={'url(#svg-preview-backdrop-mask-outline)'}
|
/>
|
||||||
|
<g dangerouslySetInnerHTML={{ __html: src }} />
|
||||||
|
</mask>
|
||||||
|
<mask
|
||||||
|
id={`svg-preview-backdrop-mask-outline-${id}`}
|
||||||
|
maskUnits="userSpaceOnUse"
|
||||||
>
|
>
|
||||||
<rect
|
<rect
|
||||||
x="0"
|
x="0"
|
||||||
y="0"
|
y="0"
|
||||||
width="24"
|
width="24"
|
||||||
height="24"
|
height="24"
|
||||||
fill="url(#pattern)"
|
fill="#fff"
|
||||||
opacity={0.5}
|
|
||||||
stroke="none"
|
stroke="none"
|
||||||
/>
|
/>
|
||||||
|
<g
|
||||||
|
strokeWidth={1.75}
|
||||||
|
dangerouslySetInnerHTML={{ __html: backdropString }}
|
||||||
|
/>
|
||||||
|
</mask>
|
||||||
|
<g mask={`url(#svg-preview-backdrop-mask-${id})`}>
|
||||||
|
<rect
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
opacity={0.5}
|
||||||
|
fill={`url(#pattern-${id})`}
|
||||||
|
stroke="none"
|
||||||
|
/>
|
||||||
|
<g
|
||||||
|
stroke={color}
|
||||||
|
strokeWidth={2.25}
|
||||||
|
opacity={0.75}
|
||||||
|
dangerouslySetInnerHTML={{ __html: src }}
|
||||||
|
/>
|
||||||
|
{outline && (
|
||||||
|
<g
|
||||||
|
stroke={color}
|
||||||
|
strokeWidth={2.25}
|
||||||
|
opacity={0.75}
|
||||||
|
mask={`url(#svg-preview-backdrop-mask-outline-${id})`}
|
||||||
|
dangerouslySetInnerHTML={{ __html: backdropString }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</g>
|
</g>
|
||||||
<rect
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
fill="url(#pattern)"
|
|
||||||
stroke="none"
|
|
||||||
mask={'url(#svg-preview-backdrop-mask-fill)'}
|
|
||||||
/>
|
|
||||||
<rect
|
|
||||||
x="0"
|
|
||||||
y="0"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
fill="red"
|
|
||||||
opacity={0.5}
|
|
||||||
stroke="none"
|
|
||||||
mask={'url(#svg-preview-backdrop-mask-fill)'}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
export default Backdrop;
|
export default Backdrop;
|
||||||
|
|||||||
71
docs/.vitepress/lib/SvgPreview/Diff.tsx
Normal file
71
docs/.vitepress/lib/SvgPreview/Diff.tsx
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Backdrop from './Backdrop.tsx';
|
||||||
|
import { darkModeCss, Grid } from './index.tsx';
|
||||||
|
|
||||||
|
const SvgPreview = React.forwardRef<
|
||||||
|
SVGSVGElement,
|
||||||
|
{
|
||||||
|
oldSrc: string;
|
||||||
|
newSrc: string;
|
||||||
|
} & React.SVGProps<SVGSVGElement>
|
||||||
|
>(({ oldSrc, newSrc, children, ...props }, ref) => {
|
||||||
|
return (
|
||||||
|
<svg
|
||||||
|
ref={ref}
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width={24}
|
||||||
|
height={24}
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth={2}
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
<style>{darkModeCss}</style>
|
||||||
|
<Grid
|
||||||
|
strokeWidth={0.1}
|
||||||
|
stroke="#777"
|
||||||
|
strokeOpacity={0.3}
|
||||||
|
radius={1}
|
||||||
|
/>
|
||||||
|
<mask
|
||||||
|
id="gray"
|
||||||
|
maskUnits="userSpaceOnUse"
|
||||||
|
>
|
||||||
|
<rect
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
fill="#000"
|
||||||
|
stroke="none"
|
||||||
|
/>
|
||||||
|
<g
|
||||||
|
stroke="#fff"
|
||||||
|
dangerouslySetInnerHTML={{ __html: oldSrc }}
|
||||||
|
/>
|
||||||
|
</mask>
|
||||||
|
<Backdrop
|
||||||
|
src=""
|
||||||
|
outline={false}
|
||||||
|
backdropString={`<g mask="url('#gray')">${newSrc}</g>`}
|
||||||
|
color="#777"
|
||||||
|
/>
|
||||||
|
<Backdrop
|
||||||
|
src={oldSrc}
|
||||||
|
backdropString={newSrc}
|
||||||
|
color="lime"
|
||||||
|
/>
|
||||||
|
<Backdrop
|
||||||
|
src={newSrc}
|
||||||
|
backdropString={oldSrc}
|
||||||
|
color="red"
|
||||||
|
/>
|
||||||
|
{children}
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
export default SvgPreview;
|
||||||
@@ -2,16 +2,37 @@ import React from 'react';
|
|||||||
import { PathProps, Path } from './types';
|
import { PathProps, Path } from './types';
|
||||||
import { getPaths, assert } from './utils';
|
import { getPaths, assert } from './utils';
|
||||||
|
|
||||||
const Grid = ({
|
export const darkModeCss = `
|
||||||
|
@media screen and (prefers-color-scheme: light) {
|
||||||
|
.svg-preview-grid-rect { fill: none }
|
||||||
|
}
|
||||||
|
@media screen and (prefers-color-scheme: dark) {
|
||||||
|
.svg-preview-grid-rect { fill: none }
|
||||||
|
.svg
|
||||||
|
.svg-preview-grid-group,
|
||||||
|
.svg-preview-radii-group,
|
||||||
|
.svg-preview-shadow-mask-group,
|
||||||
|
.svg-preview-shadow-group {
|
||||||
|
stroke: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const Grid = ({
|
||||||
radius,
|
radius,
|
||||||
fill,
|
fill = '#fff',
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
strokeWidth: number;
|
strokeWidth: number;
|
||||||
radius: number;
|
radius: number;
|
||||||
} & PathProps<'stroke', 'strokeWidth'>) => (
|
} & PathProps<'stroke', 'strokeWidth'>) => (
|
||||||
<g className="svg-preview-grid-group" strokeLinecap="butt" {...props}>
|
<g
|
||||||
|
className="svg-preview-grid-group"
|
||||||
|
strokeLinecap="butt"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
<rect
|
<rect
|
||||||
|
className="svg-preview-grid-rect"
|
||||||
width={24 - props.strokeWidth}
|
width={24 - props.strokeWidth}
|
||||||
height={24 - props.strokeWidth}
|
height={24 - props.strokeWidth}
|
||||||
x={props.strokeWidth / 2}
|
x={props.strokeWidth / 2}
|
||||||
@@ -20,11 +41,29 @@ const Grid = ({
|
|||||||
fill={fill}
|
fill={fill}
|
||||||
/>
|
/>
|
||||||
<path
|
<path
|
||||||
|
strokeDasharray={'0 0.1 ' + '0.1 0.15 '.repeat(11) + '0 0.15'}
|
||||||
|
strokeWidth={0.1}
|
||||||
d={
|
d={
|
||||||
props.d ||
|
props.d ||
|
||||||
new Array(Math.floor(24 - 1))
|
new Array(Math.floor(24 - 1))
|
||||||
.fill(null)
|
.fill(null)
|
||||||
.flatMap((_, i) => [
|
.map((_, i) => i)
|
||||||
|
.filter((i) => i % 3 !== 2)
|
||||||
|
.flatMap((i) => [
|
||||||
|
`M${props.strokeWidth} ${i + 1}h${24 - props.strokeWidth * 2}`,
|
||||||
|
`M${i + 1} ${props.strokeWidth}v${24 - props.strokeWidth * 2}`,
|
||||||
|
])
|
||||||
|
.join('')
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
d={
|
||||||
|
props.d ||
|
||||||
|
new Array(Math.floor(24 - 1))
|
||||||
|
.fill(null)
|
||||||
|
.map((_, i) => i)
|
||||||
|
.filter((i) => i % 3 === 2)
|
||||||
|
.flatMap((i) => [
|
||||||
`M${props.strokeWidth} ${i + 1}h${24 - props.strokeWidth * 2}`,
|
`M${props.strokeWidth} ${i + 1}h${24 - props.strokeWidth * 2}`,
|
||||||
`M${i + 1} ${props.strokeWidth}v${24 - props.strokeWidth * 2}`,
|
`M${i + 1} ${props.strokeWidth}v${24 - props.strokeWidth * 2}`,
|
||||||
])
|
])
|
||||||
@@ -43,15 +82,21 @@ const Shadow = ({
|
|||||||
paths: Path[];
|
paths: Path[];
|
||||||
} & PathProps<'stroke' | 'strokeWidth' | 'strokeOpacity', 'd'>) => {
|
} & PathProps<'stroke' | 'strokeWidth' | 'strokeOpacity', 'd'>) => {
|
||||||
const groupedPaths = Object.entries(
|
const groupedPaths = Object.entries(
|
||||||
paths.reduce((groups, val) => {
|
paths.reduce(
|
||||||
|
(groups, val) => {
|
||||||
const key = val.c.id;
|
const key = val.c.id;
|
||||||
groups[key] = [...(groups[key] || []), val];
|
groups[key] = [...(groups[key] || []), val];
|
||||||
return groups;
|
return groups;
|
||||||
}, {} as Record<number, Path[]>)
|
},
|
||||||
|
{} as Record<number, Path[]>,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<g className="svg-preview-shadow-mask-group" {...props}>
|
<g
|
||||||
|
className="svg-preview-shadow-mask-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{groupedPaths.map(([id, paths]) => (
|
{groupedPaths.map(([id, paths]) => (
|
||||||
<mask
|
<mask
|
||||||
id={`svg-preview-shadow-mask-${id}`}
|
id={`svg-preview-shadow-mask-${id}`}
|
||||||
@@ -60,7 +105,15 @@ const Shadow = ({
|
|||||||
strokeWidth={props.strokeWidth}
|
strokeWidth={props.strokeWidth}
|
||||||
stroke="#000"
|
stroke="#000"
|
||||||
>
|
>
|
||||||
<rect x={0} y={0} width={24} height={24} fill="#fff" stroke="none" rx={radius} />
|
<rect
|
||||||
|
x={0}
|
||||||
|
y={0}
|
||||||
|
width={24}
|
||||||
|
height={24}
|
||||||
|
fill="#fff"
|
||||||
|
stroke="none"
|
||||||
|
rx={radius}
|
||||||
|
/>
|
||||||
<path
|
<path
|
||||||
d={paths
|
d={paths
|
||||||
.flatMap(({ prev, next }) => [
|
.flatMap(({ prev, next }) => [
|
||||||
@@ -73,9 +126,16 @@ const Shadow = ({
|
|||||||
</mask>
|
</mask>
|
||||||
))}
|
))}
|
||||||
</g>
|
</g>
|
||||||
<g className="svg-preview-shadow-group" {...props}>
|
<g
|
||||||
|
className="svg-preview-shadow-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{paths.map(({ d, c: { id } }, i) => (
|
{paths.map(({ d, c: { id } }, i) => (
|
||||||
<path key={i} mask={`url(#svg-preview-shadow-mask-${id})`} d={d} />
|
<path
|
||||||
|
key={i}
|
||||||
|
mask={`url(#svg-preview-shadow-mask-${id})`}
|
||||||
|
d={d}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
<path
|
<path
|
||||||
d={paths
|
d={paths
|
||||||
@@ -93,9 +153,16 @@ const ColoredPath = ({
|
|||||||
paths,
|
paths,
|
||||||
...props
|
...props
|
||||||
}: { paths: Path[]; colors: string[] } & PathProps<never, 'd' | 'stroke'>) => (
|
}: { paths: Path[]; colors: string[] } & PathProps<never, 'd' | 'stroke'>) => (
|
||||||
<g className="svg-preview-colored-path-group" {...props}>
|
<g
|
||||||
|
className="svg-preview-colored-path-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{paths.map(({ d, c }, i) => (
|
{paths.map(({ d, c }, i) => (
|
||||||
<path key={i} d={d} stroke={colors[(c.name === 'path' ? i : c.id) % colors.length]} />
|
<path
|
||||||
|
key={i}
|
||||||
|
d={d}
|
||||||
|
stroke={colors[(c.name === 'path' ? i : c.id) % colors.length]}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</g>
|
</g>
|
||||||
);
|
);
|
||||||
@@ -137,7 +204,15 @@ const ControlPath = ({
|
|||||||
key={i}
|
key={i}
|
||||||
maskUnits="userSpaceOnUse"
|
maskUnits="userSpaceOnUse"
|
||||||
>
|
>
|
||||||
<rect x="0" y="0" width="24" height="24" fill="#fff" stroke="none" rx={radius} />
|
<rect
|
||||||
|
x="0"
|
||||||
|
y="0"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
fill="#fff"
|
||||||
|
stroke="none"
|
||||||
|
rx={radius}
|
||||||
|
/>
|
||||||
<path d={`M${prev.x} ${prev.y}h.01`} />
|
<path d={`M${prev.x} ${prev.y}h.01`} />
|
||||||
<path d={`M${next.x} ${next.y}h.01`} />
|
<path d={`M${next.x} ${next.y}h.01`} />
|
||||||
</mask>
|
</mask>
|
||||||
@@ -145,7 +220,10 @@ const ControlPath = ({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</g>
|
</g>
|
||||||
<g className="svg-preview-control-path-group" {...props}>
|
<g
|
||||||
|
className="svg-preview-control-path-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{controlPaths.map(({ d, showMarker }, i) => (
|
{controlPaths.map(({ d, showMarker }, i) => (
|
||||||
<path
|
<path
|
||||||
key={i}
|
key={i}
|
||||||
@@ -154,18 +232,33 @@ const ControlPath = ({
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</g>
|
</g>
|
||||||
<g className="svg-preview-control-path-marker-group" {...props}>
|
<g
|
||||||
|
className="svg-preview-control-path-marker-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
<path
|
<path
|
||||||
d={controlPaths
|
d={controlPaths
|
||||||
.flatMap(({ prev, next, showMarker }) =>
|
.flatMap(({ prev, next, showMarker }) =>
|
||||||
showMarker ? [`M${prev.x} ${prev.y}h.01`, `M${next.x} ${next.y}h.01`] : []
|
showMarker ? [`M${prev.x} ${prev.y}h.01`, `M${next.x} ${next.y}h.01`] : [],
|
||||||
)
|
)
|
||||||
.join('')}
|
.join('')}
|
||||||
/>
|
/>
|
||||||
{controlPaths.map(({ d, prev, next, startMarker, endMarker }, i) => (
|
{controlPaths.map(({ d, prev, next, startMarker, endMarker }, i) => (
|
||||||
<React.Fragment key={i}>
|
<React.Fragment key={i}>
|
||||||
{startMarker && <circle cx={prev.x} cy={prev.y} r={pointSize / 2} />}
|
{startMarker && (
|
||||||
{endMarker && <circle cx={next.x} cy={next.y} r={pointSize / 2} />}
|
<circle
|
||||||
|
cx={prev.x}
|
||||||
|
cy={prev.y}
|
||||||
|
r={pointSize / 2}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{endMarker && (
|
||||||
|
<circle
|
||||||
|
cx={next.x}
|
||||||
|
cy={next.y}
|
||||||
|
r={pointSize / 2}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
</g>
|
</g>
|
||||||
@@ -181,19 +274,74 @@ const Radii = ({
|
|||||||
any
|
any
|
||||||
>) => {
|
>) => {
|
||||||
return (
|
return (
|
||||||
<g className="svg-preview-radii-group" {...props}>
|
<g
|
||||||
{paths
|
className="svg-preview-radii-group"
|
||||||
.filter(({ circle }) => circle)
|
{...props}
|
||||||
.map(({ c, prev, next, circle: { x, y, r } }) =>
|
>
|
||||||
c.name === 'circle' ? (
|
{paths.map(
|
||||||
<path d={`M${x} ${y}h.01`} />
|
({ c, prev, next, circle }, i) =>
|
||||||
) : (
|
circle && (
|
||||||
<>
|
<React.Fragment key={i}>
|
||||||
<path d={`M${prev.x} ${prev.y} ${x} ${y} ${next.x} ${next.y}`} />
|
{c.name !== 'circle' && (
|
||||||
<circle cy={y} cx={x} r={r} />
|
<path d={`M${prev.x} ${prev.y} ${circle.x} ${circle.y} ${next.x} ${next.y}`} />
|
||||||
</>
|
|
||||||
)
|
|
||||||
)}
|
)}
|
||||||
|
<circle
|
||||||
|
cy={circle.y}
|
||||||
|
cx={circle.x}
|
||||||
|
r={0.25}
|
||||||
|
strokeDasharray="0"
|
||||||
|
stroke={
|
||||||
|
(Math.round(circle.x * 100) / 100) % 1 !== 0 ||
|
||||||
|
(Math.round(circle.y * 100) / 100) % 1 !== 0
|
||||||
|
? 'red'
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cy={circle.y}
|
||||||
|
cx={circle.x}
|
||||||
|
r={circle.r}
|
||||||
|
stroke={(Math.round(circle.r * 1000) / 1000) % 1 !== 0 ? 'red' : undefined}
|
||||||
|
/>
|
||||||
|
</React.Fragment>
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</g>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const Handles = ({
|
||||||
|
paths,
|
||||||
|
...props
|
||||||
|
}: { paths: Path[] } & PathProps<
|
||||||
|
'strokeWidth' | 'stroke' | 'strokeDasharray' | 'strokeOpacity',
|
||||||
|
any
|
||||||
|
>) => {
|
||||||
|
return (
|
||||||
|
<g
|
||||||
|
className="svg-preview-handles-group"
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
|
{paths.map(({ c, prev, next, cp1, cp2 }) => (
|
||||||
|
<>
|
||||||
|
{cp1 && <path d={`M${prev.x} ${prev.y} ${cp1.x} ${cp1.y}`} />}
|
||||||
|
{cp1 && (
|
||||||
|
<circle
|
||||||
|
cy={cp1.y}
|
||||||
|
cx={cp1.x}
|
||||||
|
r={0.25}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{cp2 && <path d={`M${next.x} ${next.y} ${cp2.x} ${cp2.y}`} />}
|
||||||
|
{cp2 && (
|
||||||
|
<circle
|
||||||
|
cy={cp2.y}
|
||||||
|
cx={cp2.x}
|
||||||
|
r={0.25}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
</g>
|
</g>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -207,14 +355,6 @@ const SvgPreview = React.forwardRef<
|
|||||||
>(({ src, children, showGrid = false, ...props }, ref) => {
|
>(({ src, children, showGrid = false, ...props }, ref) => {
|
||||||
const paths = typeof src === 'string' ? getPaths(src) : src;
|
const paths = typeof src === 'string' ? getPaths(src) : src;
|
||||||
|
|
||||||
const darkModeCss = `@media screen and (prefers-color-scheme: dark) {
|
|
||||||
.svg-preview-grid-group,
|
|
||||||
.svg-preview-radii-group,
|
|
||||||
.svg-preview-shadow-mask-group,
|
|
||||||
.svg-preview-shadow-group {
|
|
||||||
stroke: #fff;
|
|
||||||
}
|
|
||||||
}`;
|
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
ref={ref}
|
ref={ref}
|
||||||
@@ -230,8 +370,27 @@ const SvgPreview = React.forwardRef<
|
|||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<style>{darkModeCss}</style>
|
<style>{darkModeCss}</style>
|
||||||
{showGrid && <Grid strokeWidth={0.1} stroke="#777" strokeOpacity={0.3} radius={1} />}
|
{showGrid && (
|
||||||
<Shadow paths={paths} strokeWidth={4} stroke="#777" radius={1} strokeOpacity={0.15} />
|
<Grid
|
||||||
|
strokeWidth={0.1}
|
||||||
|
stroke="#777"
|
||||||
|
strokeOpacity={0.3}
|
||||||
|
radius={1}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<Shadow
|
||||||
|
paths={paths}
|
||||||
|
strokeWidth={4}
|
||||||
|
stroke="#777"
|
||||||
|
radius={1}
|
||||||
|
strokeOpacity={0.15}
|
||||||
|
/>
|
||||||
|
<Handles
|
||||||
|
paths={paths}
|
||||||
|
strokeWidth={0.12}
|
||||||
|
stroke="#777"
|
||||||
|
strokeOpacity={0.6}
|
||||||
|
/>
|
||||||
<ColoredPath
|
<ColoredPath
|
||||||
paths={paths}
|
paths={paths}
|
||||||
colors={[
|
colors={[
|
||||||
@@ -256,7 +415,19 @@ const SvgPreview = React.forwardRef<
|
|||||||
stroke="#777"
|
stroke="#777"
|
||||||
strokeOpacity={0.3}
|
strokeOpacity={0.3}
|
||||||
/>
|
/>
|
||||||
<ControlPath radius={1} paths={paths} pointSize={1} stroke="#fff" strokeWidth={0.125} />
|
<ControlPath
|
||||||
|
radius={1}
|
||||||
|
paths={paths}
|
||||||
|
pointSize={1}
|
||||||
|
stroke="#fff"
|
||||||
|
strokeWidth={0.125}
|
||||||
|
/>
|
||||||
|
<Handles
|
||||||
|
paths={paths}
|
||||||
|
strokeWidth={0.12}
|
||||||
|
stroke="#FFF"
|
||||||
|
strokeOpacity={0.3}
|
||||||
|
/>
|
||||||
{children}
|
{children}
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,13 +8,15 @@ export type Path = {
|
|||||||
prev: Point;
|
prev: Point;
|
||||||
next: Point;
|
next: Point;
|
||||||
isStart: boolean;
|
isStart: boolean;
|
||||||
circle: { x: number; y: number; r: number };
|
circle?: { x: number; y: number; r: number };
|
||||||
|
cp1?: Point;
|
||||||
|
cp2?: Point;
|
||||||
c: ReturnType<typeof getCommands>[number];
|
c: ReturnType<typeof getCommands>[number];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type PathProps<
|
export type PathProps<
|
||||||
RequiredProps extends keyof SVGProps<SVGPathElement | SVGRectElement | SVGCircleElement>,
|
RequiredProps extends keyof SVGProps<SVGPathElement | SVGRectElement | SVGCircleElement>,
|
||||||
NeverProps extends keyof SVGProps<SVGPathElement | SVGRectElement | SVGCircleElement>
|
NeverProps extends keyof SVGProps<SVGPathElement | SVGRectElement | SVGCircleElement>,
|
||||||
> = Required<Pick<React.SVGProps<SVGElement & SVGRectElement & SVGCircleElement>, RequiredProps>> &
|
> = Required<Pick<React.SVGProps<SVGElement & SVGRectElement & SVGCircleElement>, RequiredProps>> &
|
||||||
Omit<
|
Omit<
|
||||||
React.SVGProps<SVGPathElement & SVGRectElement & SVGCircleElement>,
|
React.SVGProps<SVGPathElement & SVGRectElement & SVGCircleElement>,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const getCommands = (src: string) =>
|
|||||||
getNodes(src)
|
getNodes(src)
|
||||||
.map(convertToPathNode)
|
.map(convertToPathNode)
|
||||||
.flatMap(({ d, name }, idx) =>
|
.flatMap(({ d, name }, idx) =>
|
||||||
new SVGPathData(d).toAbs().commands.map((c, cIdx) => ({ ...c, id: idx, idx: cIdx, name }))
|
new SVGPathData(d).toAbs().commands.map((c, cIdx) => ({ ...c, id: idx, idx: cIdx, name })),
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getPaths = (src: string) => {
|
export const getPaths = (src: string) => {
|
||||||
@@ -60,10 +60,10 @@ export const getPaths = (src: string) => {
|
|||||||
let prev: Point | undefined = undefined;
|
let prev: Point | undefined = undefined;
|
||||||
let start: Point | undefined = undefined;
|
let start: Point | undefined = undefined;
|
||||||
const addPath = (
|
const addPath = (
|
||||||
c: typeof commands[number],
|
c: (typeof commands)[number],
|
||||||
next: Point,
|
next: Point,
|
||||||
d?: string,
|
d?: string,
|
||||||
circle?: Path['circle']
|
extras?: { circle?: Path['circle']; cp1?: Path['cp1']; cp2?: Path['cp2'] },
|
||||||
) => {
|
) => {
|
||||||
assert(prev);
|
assert(prev);
|
||||||
paths.push({
|
paths.push({
|
||||||
@@ -71,7 +71,7 @@ export const getPaths = (src: string) => {
|
|||||||
d: d || `M ${prev.x} ${prev.y} L ${next.x} ${next.y}`,
|
d: d || `M ${prev.x} ${prev.y} L ${next.x} ${next.y}`,
|
||||||
prev,
|
prev,
|
||||||
next,
|
next,
|
||||||
circle,
|
...extras,
|
||||||
isStart: start === prev,
|
isStart: start === prev,
|
||||||
});
|
});
|
||||||
prev = next;
|
prev = next;
|
||||||
@@ -110,7 +110,10 @@ export const getPaths = (src: string) => {
|
|||||||
}
|
}
|
||||||
case SVGPathData.CURVE_TO: {
|
case SVGPathData.CURVE_TO: {
|
||||||
assert(prev);
|
assert(prev);
|
||||||
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`);
|
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`, {
|
||||||
|
cp1: { x: c.x1, y: c.y1 },
|
||||||
|
cp2: { x: c.x2, y: c.y2 },
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SVGPathData.SMOOTH_CURVE_TO: {
|
case SVGPathData.SMOOTH_CURVE_TO: {
|
||||||
@@ -146,20 +149,27 @@ export const getPaths = (src: string) => {
|
|||||||
y1: prev.y - reflectedCp1.y,
|
y1: prev.y - reflectedCp1.y,
|
||||||
x2: c.x2,
|
x2: c.x2,
|
||||||
y2: c.y2,
|
y2: c.y2,
|
||||||
})}`
|
})}`,
|
||||||
|
{
|
||||||
|
cp1: { x: prev.x - reflectedCp1.x, y: prev.y - reflectedCp1.y },
|
||||||
|
cp2: { x: c.x2, y: c.y2 },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SVGPathData.QUAD_TO: {
|
case SVGPathData.QUAD_TO: {
|
||||||
assert(prev);
|
assert(prev);
|
||||||
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`);
|
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`, {
|
||||||
|
cp1: { x: c.x1, y: c.y1 },
|
||||||
|
cp2: { x: c.x1, y: c.y1 },
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SVGPathData.SMOOTH_QUAD_TO: {
|
case SVGPathData.SMOOTH_QUAD_TO: {
|
||||||
assert(prev);
|
assert(prev);
|
||||||
const backTrackCP = (
|
const backTrackCP = (
|
||||||
index: number,
|
index: number,
|
||||||
currentPoint: { x: number; y: number }
|
currentPoint: { x: number; y: number },
|
||||||
): { x: number; y: number } => {
|
): { x: number; y: number } => {
|
||||||
const previousCommand = commands[index - 1];
|
const previousCommand = commands[index - 1];
|
||||||
if (!previousCommand) {
|
if (!previousCommand) {
|
||||||
@@ -197,7 +207,11 @@ export const getPaths = (src: string) => {
|
|||||||
y: c.y,
|
y: c.y,
|
||||||
x1: prevCP.x,
|
x1: prevCP.x,
|
||||||
y1: prevCP.y,
|
y1: prevCP.y,
|
||||||
})}`
|
})}`,
|
||||||
|
{
|
||||||
|
cp1: { x: prevCP.x, y: prevCP.y },
|
||||||
|
cp2: { x: prevCP.x, y: prevCP.y },
|
||||||
|
},
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -212,13 +226,13 @@ export const getPaths = (src: string) => {
|
|||||||
c.lArcFlag,
|
c.lArcFlag,
|
||||||
c.sweepFlag,
|
c.sweepFlag,
|
||||||
c.x,
|
c.x,
|
||||||
c.y
|
c.y,
|
||||||
);
|
);
|
||||||
addPath(
|
addPath(
|
||||||
c,
|
c,
|
||||||
c,
|
c,
|
||||||
`M ${prev.x} ${prev.y} A${c.rX} ${c.rY} ${c.xRot} ${c.lArcFlag} ${c.sweepFlag} ${c.x} ${c.y}`,
|
`M ${prev.x} ${prev.y} A${c.rX} ${c.rY} ${c.xRot} ${c.lArcFlag} ${c.sweepFlag} ${c.x} ${c.y}`,
|
||||||
c.rX === c.rY ? { ...center, r: c.rX } : undefined
|
{ circle: c.rX === c.rY ? { ...center, r: c.rX } : undefined },
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -239,7 +253,7 @@ export const arcEllipseCenter = (
|
|||||||
fa: number,
|
fa: number,
|
||||||
fs: number,
|
fs: number,
|
||||||
x2: number,
|
x2: number,
|
||||||
y2: number
|
y2: number,
|
||||||
) => {
|
) => {
|
||||||
const phi = (a * Math.PI) / 180;
|
const phi = (a * Math.PI) / 180;
|
||||||
|
|
||||||
@@ -266,7 +280,7 @@ export const arcEllipseCenter = (
|
|||||||
sign *
|
sign *
|
||||||
Math.sqrt(
|
Math.sqrt(
|
||||||
Math.max(rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p, 0) /
|
Math.max(rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p, 0) /
|
||||||
(rx * rx * y1p * y1p + ry * ry * x1p * x1p)
|
(rx * rx * y1p * y1p + ry * ry * x1p * x1p),
|
||||||
);
|
);
|
||||||
|
|
||||||
const V2 = [(rx * y1p) / ry, (-ry * x1p) / rx];
|
const V2 = [(rx * y1p) / ry, (-ry * x1p) / rx];
|
||||||
|
|||||||
@@ -1,28 +1,34 @@
|
|||||||
import fs from "fs";
|
import fs from 'fs';
|
||||||
import path from "path";
|
import path from 'path';
|
||||||
import {Category, IconEntity} from "../theme/types";
|
import { Category, IconEntity } from '../theme/types';
|
||||||
|
|
||||||
const directory = path.join(process.cwd(), "../categories");
|
const directory = path.join(process.cwd(), '../categories');
|
||||||
|
|
||||||
export function getAllCategoryFiles(): Category[] {
|
export function getAllCategoryFiles(): Category[] {
|
||||||
const fileNames = fs.readdirSync(directory).filter((file) => path.extname(file) === '.json');
|
const fileNames = fs.readdirSync(directory).filter((file) => path.extname(file) === '.json');
|
||||||
|
|
||||||
return fileNames.map((fileName) => {
|
return fileNames.map((fileName) => {
|
||||||
const name = path.basename(fileName, '.json')
|
const name = path.basename(fileName, '.json');
|
||||||
const fileContent = fs.readFileSync(path.join(directory, fileName), 'utf8')
|
const fileContent = fs.readFileSync(path.join(directory, fileName), 'utf8');
|
||||||
|
|
||||||
const parsedFileContent = JSON.parse(fileContent)
|
const parsedFileContent = JSON.parse(fileContent);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
title: parsedFileContent.title,
|
title: parsedFileContent.title,
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function mapCategoryIconCount(categories: Category[], icons: { categories: IconEntity['categories'] }[]) {
|
export function mapCategoryIconCount(
|
||||||
|
categories: Category[],
|
||||||
|
icons: { categories: IconEntity['categories'] }[],
|
||||||
|
) {
|
||||||
return categories.map((category) => ({
|
return categories.map((category) => ({
|
||||||
...category,
|
...category,
|
||||||
iconCount: icons.reduce((acc, curr) => (curr.categories.includes(category.name) ? ++acc : acc), 0)
|
iconCount: icons.reduce(
|
||||||
}))
|
(acc, curr) => (curr.categories.includes(category.name) ? ++acc : acc),
|
||||||
|
0,
|
||||||
|
),
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
160
docs/.vitepress/lib/codeExamples/createCodeExamples.ts
Normal file
160
docs/.vitepress/lib/codeExamples/createCodeExamples.ts
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
import { bundledLanguages, type ThemeRegistration } from 'shikiji';
|
||||||
|
import { getHighlighter } from 'shikiji';
|
||||||
|
|
||||||
|
type CodeExampleType = {
|
||||||
|
title: string;
|
||||||
|
language: string;
|
||||||
|
code: string;
|
||||||
|
}[];
|
||||||
|
|
||||||
|
const getIconCodes = (): CodeExampleType => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
language: 'js',
|
||||||
|
title: 'Vanilla',
|
||||||
|
code: `\
|
||||||
|
import { createIcons, icons } from 'lucide';
|
||||||
|
|
||||||
|
createIcons({ icons });
|
||||||
|
|
||||||
|
document.body.append('<i data-lucide="$Name"></i>');\
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'React',
|
||||||
|
code: `import { $PascalCase } from 'lucide-react';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<$PascalCase />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'vue',
|
||||||
|
title: 'Vue',
|
||||||
|
code: `<script setup>
|
||||||
|
import { $PascalCase } from 'lucide-vue-next';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<$PascalCase />
|
||||||
|
</template>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'svelte',
|
||||||
|
title: 'Svelte',
|
||||||
|
code: `<script>
|
||||||
|
import { $PascalCase } from 'lucide-svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<$PascalCase />
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Preact',
|
||||||
|
code: `import { $PascalCase } from 'lucide-preact';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<$PascalCase />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Solid',
|
||||||
|
code: `import { $PascalCase } from 'lucide-solid';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<$PascalCase />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Angular',
|
||||||
|
code: `// app.module.ts
|
||||||
|
import { LucideAngularModule, $PascalCase } from 'lucide-angular';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
LucideAngularModule.pick({ $PascalCase })
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
// app.component.html
|
||||||
|
<lucide-icon name="$Name"></lucide-icon>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'html',
|
||||||
|
title: 'Icon Font',
|
||||||
|
code: `<style>
|
||||||
|
@import ('~lucide-static/font/Lucide.css');
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="icon-$Name"></div>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ThemeOptions =
|
||||||
|
| ThemeRegistration
|
||||||
|
| { light: ThemeRegistration; dark: ThemeRegistration };
|
||||||
|
|
||||||
|
const highLightCode = async (code: string, lang: string, active?: boolean) => {
|
||||||
|
const highlighter = await getHighlighter({
|
||||||
|
themes: ['github-light', 'github-dark'],
|
||||||
|
langs: Object.keys(bundledLanguages),
|
||||||
|
});
|
||||||
|
|
||||||
|
const highlightedCode = highlighter
|
||||||
|
.codeToHtml(code, {
|
||||||
|
lang,
|
||||||
|
themes: {
|
||||||
|
light: 'github-light',
|
||||||
|
dark: 'github-dark',
|
||||||
|
},
|
||||||
|
defaultColor: false,
|
||||||
|
})
|
||||||
|
.replace('shiki-themes', 'shiki-themes vp-code');
|
||||||
|
|
||||||
|
return `<div class="language-${lang} ${active ? 'active' : ''}">
|
||||||
|
<button title="Copy Code" class="copy"></button>
|
||||||
|
<span class="lang">${lang}</span>
|
||||||
|
${highlightedCode}
|
||||||
|
</div>`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default async function createCodeExamples() {
|
||||||
|
const codes = getIconCodes();
|
||||||
|
|
||||||
|
const codeExamplePromises = codes.map(async ({ title, language, code }, index) => {
|
||||||
|
const isFirst = index === 0;
|
||||||
|
|
||||||
|
const codeString = await highLightCode(code, language, isFirst);
|
||||||
|
|
||||||
|
return {
|
||||||
|
title,
|
||||||
|
language: language,
|
||||||
|
code: codeString,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return Promise.all(codeExamplePromises);
|
||||||
|
}
|
||||||
161
docs/.vitepress/lib/codeExamples/createLabCodeExamples.ts
Normal file
161
docs/.vitepress/lib/codeExamples/createLabCodeExamples.ts
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
import { bundledLanguages, type ThemeRegistration } from 'shikiji';
|
||||||
|
import { getHighlighter } from 'shikiji';
|
||||||
|
|
||||||
|
type CodeExampleType = {
|
||||||
|
title: string;
|
||||||
|
language: string;
|
||||||
|
code: string;
|
||||||
|
}[];
|
||||||
|
|
||||||
|
const getIconCodes = (): CodeExampleType => {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
language: 'js',
|
||||||
|
title: 'Vanilla',
|
||||||
|
code: `\
|
||||||
|
import { createIcons, icons } from 'lucide';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
|
||||||
|
createIcons({
|
||||||
|
icons: {
|
||||||
|
$CamelCase
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.body.append('<i data-lucide="$Name"></i>');\
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'React',
|
||||||
|
code: `import { Icon } from 'lucide-react';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<Icon iconNode={$CamelCase} />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'vue',
|
||||||
|
title: 'Vue',
|
||||||
|
code: `<script setup>
|
||||||
|
import { Icon } from 'lucide-vue-next';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Icon :iconNode="$CamelCase" />
|
||||||
|
</template>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'svelte',
|
||||||
|
title: 'Svelte',
|
||||||
|
code: `<script>
|
||||||
|
import { Icon } from 'lucide-svelte';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Icon iconNode={$CamelCase} />
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Preact',
|
||||||
|
code: `import { Icon } from 'lucide-preact';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<Icon iconNode={$CamelCase} />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Solid',
|
||||||
|
code: `import { Icon } from 'lucide-solid';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
return (
|
||||||
|
<Icon iconNode={$CamelCase} />
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
language: 'tsx',
|
||||||
|
title: 'Angular',
|
||||||
|
code: `// app.module.ts
|
||||||
|
import { LucideAngularModule } from 'lucide-angular';
|
||||||
|
import { $CamelCase } from '@lucide/lab';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
LucideAngularModule.pick({ $CamelCase })
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
// app.component.html
|
||||||
|
<lucide-icon name="$CamelCase"></lucide-icon>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ThemeOptions =
|
||||||
|
| ThemeRegistration
|
||||||
|
| { light: ThemeRegistration; dark: ThemeRegistration };
|
||||||
|
|
||||||
|
const highLightCode = async (code: string, lang: string, active?: boolean) => {
|
||||||
|
const highlighter = await getHighlighter({
|
||||||
|
themes: ['github-light', 'github-dark'],
|
||||||
|
langs: Object.keys(bundledLanguages),
|
||||||
|
});
|
||||||
|
|
||||||
|
const highlightedCode = highlighter
|
||||||
|
.codeToHtml(code, {
|
||||||
|
lang,
|
||||||
|
themes: {
|
||||||
|
light: 'github-light',
|
||||||
|
dark: 'github-dark',
|
||||||
|
},
|
||||||
|
defaultColor: false,
|
||||||
|
})
|
||||||
|
.replace('shiki-themes', 'shiki-themes vp-code');
|
||||||
|
|
||||||
|
return `<div class="language-${lang} ${active ? 'active' : ''}">
|
||||||
|
<button title="Copy Code" class="copy"></button>
|
||||||
|
<span class="lang">${lang}</span>
|
||||||
|
${highlightedCode}
|
||||||
|
</div>`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default async function createCodeExamples() {
|
||||||
|
const codes = getIconCodes();
|
||||||
|
|
||||||
|
const codeExamplePromises = codes.map(async ({ title, language, code }, index) => {
|
||||||
|
const isFirst = index === 0;
|
||||||
|
|
||||||
|
const codeString = await highLightCode(code, language, isFirst);
|
||||||
|
|
||||||
|
return {
|
||||||
|
title,
|
||||||
|
language: language,
|
||||||
|
code: codeString,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return Promise.all(codeExamplePromises);
|
||||||
|
}
|
||||||
32
docs/.vitepress/lib/codeExamples/highLightCode.ts
Normal file
32
docs/.vitepress/lib/codeExamples/highLightCode.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import { bundledLanguages, type ThemeRegistration } from 'shikiji';
|
||||||
|
import { getHighlighter } from 'shikiji';
|
||||||
|
|
||||||
|
export type ThemeOptions =
|
||||||
|
| ThemeRegistration
|
||||||
|
| { light: ThemeRegistration; dark: ThemeRegistration };
|
||||||
|
|
||||||
|
const highLightCode = async (code: string, lang: string, active?: boolean) => {
|
||||||
|
const highlighter = await getHighlighter({
|
||||||
|
themes: ['github-light', 'github-dark'],
|
||||||
|
langs: Object.keys(bundledLanguages),
|
||||||
|
});
|
||||||
|
|
||||||
|
const highlightedCode = highlighter
|
||||||
|
.codeToHtml(code, {
|
||||||
|
lang,
|
||||||
|
themes: {
|
||||||
|
light: 'github-light',
|
||||||
|
dark: 'github-dark',
|
||||||
|
},
|
||||||
|
defaultColor: false,
|
||||||
|
})
|
||||||
|
.replace('shiki-themes', 'shiki-themes vp-code');
|
||||||
|
|
||||||
|
return `<div class="language-${lang} ${active ? 'active' : ''}">
|
||||||
|
<button title="Copy Code" class="copy"></button>
|
||||||
|
<span class="lang">${lang}</span>
|
||||||
|
${highlightedCode}
|
||||||
|
</div>`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default highLightCode;
|
||||||
5
docs/.vitepress/lib/codeExamples/types.ts
Normal file
5
docs/.vitepress/lib/codeExamples/types.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
export type CodeExampleType = {
|
||||||
|
title: string;
|
||||||
|
language: string;
|
||||||
|
code: string;
|
||||||
|
}[];
|
||||||
@@ -1,218 +0,0 @@
|
|||||||
import {
|
|
||||||
BUNDLED_LANGUAGES,
|
|
||||||
type IThemeRegistration
|
|
||||||
} from 'shiki'
|
|
||||||
import {
|
|
||||||
getHighlighter,
|
|
||||||
} from 'shiki-processor'
|
|
||||||
|
|
||||||
type CodeExampleType = {
|
|
||||||
title: string,
|
|
||||||
lang: string,
|
|
||||||
codes: {
|
|
||||||
language?: string,
|
|
||||||
code: string,
|
|
||||||
metastring?: string,
|
|
||||||
}[],
|
|
||||||
}[]
|
|
||||||
|
|
||||||
const getIconCodes = (): CodeExampleType => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
lang: 'html',
|
|
||||||
title: 'HTML',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'html',
|
|
||||||
code: `<i data-lucide-name="Name"></i>
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'tsx',
|
|
||||||
title: 'React',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'tsx',
|
|
||||||
code: `import { PascalCase } from 'lucide-react';
|
|
||||||
|
|
||||||
const App = () => {
|
|
||||||
return (
|
|
||||||
<PascalCase />
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
`,
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'vue',
|
|
||||||
title: 'Vue 3',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'vue',
|
|
||||||
code: `<script setup>
|
|
||||||
import { PascalCase } from 'lucide-vue-next';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<PascalCase />
|
|
||||||
</template>
|
|
||||||
`,
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'svelte',
|
|
||||||
title: 'Svelte',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'svelte',
|
|
||||||
code: `<script>
|
|
||||||
import { PascalCase } from 'lucide-svelte';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<PascalCase />
|
|
||||||
`,
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'preact',
|
|
||||||
title: 'Preact',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'tsx',
|
|
||||||
code: `import { PascalCase } from 'lucide-preact';
|
|
||||||
|
|
||||||
const App = () => {
|
|
||||||
return (
|
|
||||||
<PascalCase />
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
`,
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'solid',
|
|
||||||
title: 'Solid',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'tsx',
|
|
||||||
code: `import { PascalCase } from 'lucide-solid';
|
|
||||||
|
|
||||||
const App = () => {
|
|
||||||
return (
|
|
||||||
<PascalCase />
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
`,
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'angular',
|
|
||||||
title: 'Angular',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'tsx',
|
|
||||||
code: `// app.module.ts
|
|
||||||
import { LucideAngularModule, PascalCase } from 'lucide-angular';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
LucideAngularModule.pick({ PascalCase })
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
// app.component.html
|
|
||||||
<lucide-icon name="Name"></lucide-icon>
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'html',
|
|
||||||
title: 'Icon Font',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'html',
|
|
||||||
code: `<style>
|
|
||||||
@import ('~lucide-static/font/Lucide.css');
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="icon-Name"></div>
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
lang: 'dart',
|
|
||||||
title: 'Flutter',
|
|
||||||
codes: [
|
|
||||||
{
|
|
||||||
language: 'dart',
|
|
||||||
code: `Icon(LucideIcons.Name);
|
|
||||||
`,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ThemeOptions =
|
|
||||||
| IThemeRegistration
|
|
||||||
| { light: IThemeRegistration; dark: IThemeRegistration }
|
|
||||||
|
|
||||||
const highLightCode = async (code: string, lang: string, active?: boolean) => {
|
|
||||||
const highlighter = await getHighlighter({
|
|
||||||
themes: ['material-theme-palenight'],
|
|
||||||
langs: [...BUNDLED_LANGUAGES],
|
|
||||||
processors: []
|
|
||||||
})
|
|
||||||
|
|
||||||
const highlightedCode = highlighter.codeToHtml(code, {
|
|
||||||
lang,
|
|
||||||
// lineOptions,
|
|
||||||
theme: 'material-theme-palenight'
|
|
||||||
}).replace('background-color: #292D3E', '')
|
|
||||||
|
|
||||||
return `<div class="language-${lang} ${active ? 'active' : ''}">
|
|
||||||
<button title="Copy Code" class="copy"></button>
|
|
||||||
<span class="lang">${lang}</span>
|
|
||||||
${highlightedCode}
|
|
||||||
</div>`
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default async function createCodeExamples() {
|
|
||||||
const codes = getIconCodes();
|
|
||||||
|
|
||||||
const codeExamplePromises = codes.map(async (codeTemplate, index) => {
|
|
||||||
const { title, lang, codes } = codeTemplate;
|
|
||||||
const isFirst = index === 0;
|
|
||||||
|
|
||||||
const code = await highLightCode(codes[0].code, codes[0].language || lang, isFirst);
|
|
||||||
|
|
||||||
return {
|
|
||||||
title,
|
|
||||||
language: codes[0].language || lang,
|
|
||||||
code,
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
return Promise.all(codeExamplePromises);
|
|
||||||
}
|
|
||||||
@@ -1,38 +1,36 @@
|
|||||||
import { promises as fs, constants } from 'fs';
|
import { promises as fs, constants } from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import yaml from 'js-yaml'
|
|
||||||
import { PackageItem } from '../theme/types';
|
import { PackageItem } from '../theme/types';
|
||||||
|
|
||||||
const fileExist = (filePath) => fs.access(filePath, constants.F_OK).then(() => true).catch(() => false)
|
const fileExist = (filePath) =>
|
||||||
|
fs
|
||||||
|
.access(filePath, constants.F_OK)
|
||||||
|
.then(() => true)
|
||||||
|
.catch(() => false);
|
||||||
|
|
||||||
const fetchPackages = async (): Promise<PackageItem[]> => {
|
const fetchPackages = async (): Promise<PackageItem[]> => {
|
||||||
const docsDir = path.resolve(process.cwd(), '../packages');
|
const docsDir = path.resolve(process.cwd(), '../packages');
|
||||||
const fileNames = await (await fs.readdir(docsDir)).map(filename => ({filename, directory: docsDir}))
|
const fileNames = await (
|
||||||
|
await fs.readdir(docsDir)
|
||||||
|
).map((filename) => ({ filename, directory: docsDir }));
|
||||||
|
|
||||||
const packageJsons = await Promise.all(fileNames.map( async ({filename, directory}) => {
|
const packageJsons = await Promise.all(
|
||||||
const filePath = path.resolve(directory, filename)
|
fileNames.map(async ({ filename, directory }) => {
|
||||||
|
const filePath = path.resolve(directory, filename);
|
||||||
const fileStat = await fs.lstat(filePath);
|
const fileStat = await fs.lstat(filePath);
|
||||||
|
|
||||||
if(!fileStat.isDirectory()) return null;
|
if (!fileStat.isDirectory()) return null;
|
||||||
|
|
||||||
const jsonFilePath = path.resolve(filePath, 'package.json')
|
const jsonFilePath = path.resolve(filePath, 'package.json');
|
||||||
if (await fileExist(jsonFilePath)) {
|
if (await fileExist(jsonFilePath)) {
|
||||||
return JSON.parse(
|
return JSON.parse(await fs.readFile(jsonFilePath, 'utf-8'));
|
||||||
await fs.readFile(jsonFilePath, 'utf-8')
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ymlFilePath = path.resolve(filePath, 'pubspec.yaml')
|
return null;
|
||||||
if(await fileExist(ymlFilePath)) {
|
}),
|
||||||
return yaml.load(
|
|
||||||
await fs.readFile(ymlFilePath, 'utf-8')
|
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
return null
|
return packageJsons;
|
||||||
}))
|
};
|
||||||
|
|
||||||
return packageJsons
|
|
||||||
}
|
|
||||||
|
|
||||||
export default fetchPackages;
|
export default fetchPackages;
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
export type IconContent = [icon: string, src:string];
|
export type IconContent = [icon: string, src: string];
|
||||||
|
|
||||||
async function generateZip(icons: IconContent[]) {
|
async function generateZip(icons: IconContent[]) {
|
||||||
const JSZip = (await import('jszip')).default
|
const JSZip = (await import('jszip')).default;
|
||||||
|
|
||||||
const zip = new JSZip();
|
const zip = new JSZip();
|
||||||
|
|
||||||
const addingZipPromises = icons.map(([name, src]) =>
|
const addingZipPromises = icons.map(([name, src]) => zip.file(`${name}.svg`, src));
|
||||||
zip.file(`${name}.svg`, src),
|
|
||||||
);
|
|
||||||
|
|
||||||
await Promise.all(addingZipPromises)
|
await Promise.all(addingZipPromises);
|
||||||
|
|
||||||
return zip.generateAsync({ type: 'blob' });
|
return zip.generateAsync({ type: 'blob' });
|
||||||
}
|
}
|
||||||
|
|
||||||
export default generateZip
|
export default generateZip;
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
import { createLucideIcon } from "lucide-react/src/lucide-react"
|
import { createLucideIcon } from 'lucide-react/src/lucide-react';
|
||||||
import { type LucideProps, type IconNode } from "lucide-react/src/createLucideIcon"
|
import { type LucideProps, type IconNode } from 'lucide-react/src/createLucideIcon';
|
||||||
import { IconEntity } from "../theme/types"
|
import { IconEntity } from '../theme/types';
|
||||||
import { renderToStaticMarkup } from 'react-dom/server';
|
import { renderToStaticMarkup } from 'react-dom/server';
|
||||||
import { IconContent } from "./generateZip";
|
import { IconContent } from './generateZip';
|
||||||
|
|
||||||
const getFallbackZip = (icons: IconEntity[], params: LucideProps) => {
|
const getFallbackZip = (icons: IconEntity[], params: LucideProps) => {
|
||||||
return icons
|
return icons.map<IconContent>((icon) => {
|
||||||
.map<IconContent>((icon) => {
|
const Icon = createLucideIcon(icon.name, icon.iconNode as IconNode);
|
||||||
const Icon = createLucideIcon(icon.name, icon.iconNode as IconNode)
|
const src = renderToStaticMarkup(<Icon {...params} />);
|
||||||
const src = renderToStaticMarkup(<Icon {...params} />)
|
return [icon.name, src];
|
||||||
return [icon.name, src]
|
});
|
||||||
})
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
export default getFallbackZip;
|
||||||
export default getFallbackZip
|
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
import fs from "fs";
|
import fs from 'fs';
|
||||||
import path from "path";
|
import path from 'path';
|
||||||
import { IconNodeWithKeys } from "../theme/types";
|
import { IconNodeWithKeys } from '../theme/types';
|
||||||
import iconNodes from '../data/iconNodes'
|
import iconNodes from '../data/iconNodes';
|
||||||
import releaseMeta from "../data/releaseMetaData.json";
|
import releaseMeta from '../data/releaseMetaData.json';
|
||||||
|
|
||||||
const DATE_OF_FORK = '2020-06-08T16:39:52+0100';
|
const DATE_OF_FORK = '2020-06-08T16:39:52+0100';
|
||||||
|
|
||||||
const directory = path.join(process.cwd(), "../icons");
|
const directory = path.join(process.cwd(), '../icons');
|
||||||
|
|
||||||
export interface GetDataOptions {
|
export interface GetDataOptions {
|
||||||
withChildKeys?: boolean
|
withChildKeys?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getData(name: string) {
|
export async function getData(name: string) {
|
||||||
const jsonPath = path.join(directory, `${name}.json`);
|
const jsonPath = path.join(directory, `${name}.json`);
|
||||||
const jsonContent = fs.readFileSync(jsonPath, "utf8");
|
const jsonContent = fs.readFileSync(jsonPath, 'utf8');
|
||||||
const { tags, categories, contributors } = JSON.parse(jsonContent);
|
const { tags, categories, contributors } = JSON.parse(jsonContent);
|
||||||
|
|
||||||
const iconNode = iconNodes[name]
|
const iconNode = iconNodes[name];
|
||||||
|
|
||||||
const releaseData = releaseMeta?.[name] ?? {
|
const releaseData = releaseMeta?.[name] ?? {
|
||||||
"createdRelease": {
|
createdRelease: {
|
||||||
"version": "0.0.0",
|
version: '0.0.0',
|
||||||
"date": DATE_OF_FORK
|
date: DATE_OF_FORK,
|
||||||
},
|
},
|
||||||
"changedRelease": {
|
changedRelease: {
|
||||||
"version": "0.0.0",
|
version: '0.0.0',
|
||||||
"date": DATE_OF_FORK
|
date: DATE_OF_FORK,
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
@@ -36,11 +36,11 @@ export async function getData(name: string) {
|
|||||||
categories,
|
categories,
|
||||||
iconNode,
|
iconNode,
|
||||||
contributors,
|
contributors,
|
||||||
...releaseData
|
...releaseData,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAllData(): Promise<{ name: string, iconNode: IconNodeWithKeys}[]> {
|
export async function getAllData(): Promise<{ name: string; iconNode: IconNodeWithKeys }[]> {
|
||||||
const names = Object.keys(iconNodes);
|
const names = Object.keys(iconNodes);
|
||||||
|
|
||||||
return Promise.all(names.map((name) => getData(name)));
|
return Promise.all(names.map((name) => getData(name)));
|
||||||
|
|||||||
@@ -1,118 +1,135 @@
|
|||||||
import { DefaultTheme, UserConfig } from "vitepress"
|
import { DefaultTheme, UserConfig } from 'vitepress';
|
||||||
|
|
||||||
const sidebar: UserConfig<DefaultTheme.Config>['themeConfig']['sidebar'] = {
|
const sidebar: UserConfig<DefaultTheme.Config>['themeConfig']['sidebar'] = {
|
||||||
'guide':[
|
guide: [
|
||||||
{
|
{
|
||||||
text: 'Introduction',
|
text: 'Introduction',
|
||||||
items: [
|
items: [
|
||||||
{ text: 'What is lucide?', link: '/guide/' },
|
{ text: 'What is lucide?', link: '/guide/' },
|
||||||
{ text: 'Installation', link: '/guide/installation' },
|
{ text: 'Installation', link: '/guide/installation' },
|
||||||
{ text: 'Comparison', link: '/guide/comparison' }
|
{ text: 'Comparison', link: '/guide/comparison' },
|
||||||
]
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Basics',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: 'Color',
|
||||||
|
link: '/guide/basics/color',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Sizing',
|
||||||
|
link: '/guide/basics/sizing',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Stroke width',
|
||||||
|
link: '/guide/basics/stroke-width',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// TODO: Add this section
|
||||||
|
{
|
||||||
|
text: 'Advanced',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: 'Accessibility',
|
||||||
|
link: '/guide/advanced/accessibility',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Global styling',
|
||||||
|
link: '/guide/advanced/global-styling',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// text: 'Using Icons',
|
// text: 'Animations',
|
||||||
// items: [
|
// },
|
||||||
|
{
|
||||||
|
text: 'Filled icons',
|
||||||
|
link: '/guide/advanced/filled-icons',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Aliased Names',
|
||||||
|
link: '/guide/advanced/aliased-names',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// text: 'How to use icons',
|
// text: 'Combining icons',
|
||||||
// link: 'how-to-use-icons'
|
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// text: 'Styling icons',
|
// text: 'Dynamic imports'
|
||||||
// link: 'styling-icons'
|
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// text: 'Accessibility',
|
// text: 'Auto importing'
|
||||||
// link: 'accessibility'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// text: 'What should I use',
|
|
||||||
// link: 'what-should-i-use'
|
|
||||||
// },
|
|
||||||
|
|
||||||
// ]
|
|
||||||
// },
|
// },
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: 'Packages',
|
text: 'Packages',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: 'Lucide',
|
text: 'Lucide',
|
||||||
link: '/guide/packages/lucide'
|
link: '/guide/packages/lucide',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide React',
|
text: 'Lucide React',
|
||||||
link: '/guide/packages/lucide-react'
|
link: '/guide/packages/lucide-react',
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Lucide React Native',
|
|
||||||
link: '/guide/packages/lucide-react-native'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Vue',
|
text: 'Lucide Vue',
|
||||||
link: '/guide/packages/lucide-vue'
|
link: '/guide/packages/lucide-vue-next',
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Lucide Vue Next (Vue 3)',
|
|
||||||
link: '/guide/packages/lucide-vue-next'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Svelte',
|
text: 'Lucide Svelte',
|
||||||
link: '/guide/packages/lucide-svelte'
|
link: '/guide/packages/lucide-svelte',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Solid',
|
text: 'Lucide Solid',
|
||||||
link: '/guide/packages/lucide-solid'
|
link: '/guide/packages/lucide-solid',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Preact',
|
text: 'Lucide React Native',
|
||||||
link: '/guide/packages/lucide-preact'
|
link: '/guide/packages/lucide-react-native',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Angular',
|
text: 'Lucide Angular',
|
||||||
link: '/guide/packages/lucide-angular'
|
link: '/guide/packages/lucide-angular',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Lucide Preact',
|
||||||
|
link: '/guide/packages/lucide-preact',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Lucide Static',
|
text: 'Lucide Static',
|
||||||
link: '/guide/packages/lucide-static'
|
link: '/guide/packages/lucide-static',
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
text: 'Lucide Flutter',
|
|
||||||
link: '/guide/packages/lucide-flutter'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Contributing',
|
text: 'Contributing',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: 'Icon Design Principles',
|
text: 'Icon Design Principles',
|
||||||
link: '/guide/design/icon-design-guide'
|
link: '/guide/design/icon-design-guide',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Designing in Illustrator',
|
text: 'Designing in Illustrator',
|
||||||
link: '/guide/design/illustrator-guide'
|
link: '/guide/design/illustrator-guide',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Designing in InkScape',
|
text: 'Designing in InkScape',
|
||||||
link: '/guide/design/inkscape-guide'
|
link: '/guide/design/inkscape-guide',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Designing in Figma',
|
text: 'Designing in Figma',
|
||||||
link: '/guide/design/figma-guide'
|
link: '/guide/design/figma-guide',
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
|
text: 'Designing in Affinity Designer',
|
||||||
|
link: '/guide/design/affinity-designer-guide',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'icons': [
|
},
|
||||||
{ text: '', link: '/' },
|
|
||||||
// { text: 'Categorized', link: '/icons/categorized' },
|
|
||||||
// {
|
|
||||||
// text: 'Categories',
|
|
||||||
// items: [
|
|
||||||
// ...(getAllCategoryFiles().map((category) => ({ text: category, link: `/icons/category/${category}` })))
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
],
|
],
|
||||||
}
|
// This should be here to keep the sidebar shown on the icons page
|
||||||
|
icons: [{ text: '', link: '/' }],
|
||||||
|
};
|
||||||
|
|
||||||
export default sidebar
|
export default sidebar;
|
||||||
|
|||||||
@@ -7,5 +7,6 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.container {
|
.container {
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
|
padding-top: 33px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
import { useRouter } from 'vitepress';
|
import { useRouter } from 'vitepress';
|
||||||
|
|
||||||
const { go } = useRouter()
|
const { go } = useRouter()
|
||||||
@@ -8,9 +7,16 @@ const props = defineProps<{
|
|||||||
href?: string
|
href?: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
const isExternal = computed(() => props.href?.startsWith('http') ?? false)
|
||||||
|
|
||||||
const component = computed(() => props.href ? 'a' : 'div')
|
const component = computed(() => props.href ? 'a' : 'div')
|
||||||
|
const target = computed(() => isExternal.value ? '_blank' : undefined)
|
||||||
|
const rel = computed(() => isExternal.value ? 'noreferrer noopener' : undefined)
|
||||||
|
|
||||||
|
const onClick = computed(() => {
|
||||||
|
if(!props.href || isExternal) return
|
||||||
|
return go(props.href)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -18,14 +24,16 @@ const component = computed(() => props.href ? 'a' : 'div')
|
|||||||
:is="component"
|
:is="component"
|
||||||
:href="href"
|
:href="href"
|
||||||
class="badge"
|
class="badge"
|
||||||
@click="props?.href ? go(href) : undefined"
|
:target="target"
|
||||||
|
:rel="rel"
|
||||||
|
@click="onClick"
|
||||||
>
|
>
|
||||||
<slot/>
|
<slot/>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.badge, a.badge {
|
.badge, a.badge, .vp-doc a.badge {
|
||||||
display: block;
|
display: block;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -36,6 +44,7 @@ const component = computed(() => props.href ? 'a' : 'div')
|
|||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background-color: var(--vp-c-bg-alt);
|
background-color: var(--vp-c-bg-alt);
|
||||||
color: var(--vp-c-text-1);
|
color: var(--vp-c-text-1);
|
||||||
|
text-decoration: none;
|
||||||
/* width: 56px;
|
/* width: 56px;
|
||||||
height: 56px; */
|
height: 56px; */
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -59,4 +68,6 @@ const component = computed(() => props.href ? 'a' : 'div')
|
|||||||
/* color: var(--vp-button-alt-active-text);
|
/* color: var(--vp-button-alt-active-text);
|
||||||
background-color: var(--vp-button-alt-active-bg); */
|
background-color: var(--vp-button-alt-active-bg); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp)
|
|||||||
.menu {
|
.menu {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.menu-items {
|
ul.menu-items {
|
||||||
--menu-offset: 44px;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -103,7 +102,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp)
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
min-width: 128px;
|
min-width: 128px;
|
||||||
border: 1px solid var(--vp-c-divider);
|
border: 1px solid var(--vp-c-divider);
|
||||||
background-color: var(--vp-c-bg);
|
background-color: var(--vp-c-bg-elv);
|
||||||
box-shadow: var(--vp-shadow-3);
|
box-shadow: var(--vp-shadow-3);
|
||||||
transition: background-color 0.5s;
|
transition: background-color 0.5s;
|
||||||
max-height: calc(100vh - var(--vp-nav-height));
|
max-height: calc(100vh - var(--vp-nav-height));
|
||||||
@@ -124,11 +123,12 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp)
|
|||||||
color: var(--vp-c-text-1);
|
color: var(--vp-c-text-1);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: background-color .25s,color .25s;
|
transition: background-color .25s,color .25s;
|
||||||
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item:hover {
|
.menu-item:hover {
|
||||||
color: var(--vp-c-brand);
|
color: var(--vp-c-brand);
|
||||||
background-color: var(--vp-c-bg-elv-mute);
|
background-color: var(--vp-c-default-soft);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item:active {
|
.menu-item:active {
|
||||||
@@ -170,11 +170,11 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu-items.bottom {
|
.menu-items.bottom {
|
||||||
top: var(--menu-offset);
|
top: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-items.top {
|
.menu-items.top {
|
||||||
bottom: var(--menu-offset);
|
bottom: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-up-button.top::before {
|
.arrow-up-button.top::before {
|
||||||
|
|||||||
56
docs/.vitepress/theme/components/base/Card.vue
Normal file
56
docs/.vitepress/theme/components/base/Card.vue
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
href?: string;
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const isExternal = computed(() => {
|
||||||
|
return props.href?.startsWith('http') ?? false
|
||||||
|
})
|
||||||
|
|
||||||
|
const component = computed(() => {
|
||||||
|
return props.href ? 'a' : 'div'
|
||||||
|
})
|
||||||
|
|
||||||
|
const rel = computed(() => {
|
||||||
|
return isExternal.value ? 'noreferrer noopener' : undefined
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<component
|
||||||
|
:is="component"
|
||||||
|
:href="href"
|
||||||
|
:rel="rel"
|
||||||
|
class="card"
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</component>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.card {
|
||||||
|
border: 1px solid var(--vp-c-bg-soft);
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: var(--vp-c-bg-soft);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 24px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card[href] {
|
||||||
|
display: block;
|
||||||
|
border: 1px solid var(--vp-c-bg-soft);
|
||||||
|
border-radius: 12px;
|
||||||
|
height: 100%;
|
||||||
|
background-color: var(--vp-c-bg-soft);
|
||||||
|
transition: border-color .25s,background-color .25s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card[href]:hover {
|
||||||
|
border-color: var(--vp-c-brand-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
36
docs/.vitepress/theme/components/base/CardGrid.vue
Normal file
36
docs/.vitepress/theme/components/base/CardGrid.vue
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<div class="card-grid-flex">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.card-grid-flex {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: space-evenly;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-grid-flex > * {
|
||||||
|
flex-basis: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 960px) {
|
||||||
|
.card-grid-flex > * {
|
||||||
|
flex-basis: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1280px) {
|
||||||
|
.card-grid-flex > * {
|
||||||
|
flex-basis: 33.33%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
90
docs/.vitepress/theme/components/base/Checkbox.vue
Normal file
90
docs/.vitepress/theme/components/base/Checkbox.vue
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
label: string
|
||||||
|
id: string
|
||||||
|
value: string
|
||||||
|
modelValue: string | string[]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits(['change', 'input', 'update:modelValue'])
|
||||||
|
|
||||||
|
const model = computed({
|
||||||
|
get: () => {
|
||||||
|
if (Array.isArray(props.modelValue)) {
|
||||||
|
return props.modelValue.includes(props.value)
|
||||||
|
}
|
||||||
|
return props.modelValue === props.value
|
||||||
|
|
||||||
|
},
|
||||||
|
set: (value: string) => {
|
||||||
|
if (Array.isArray(props.modelValue)) {
|
||||||
|
const newValue = [...props.modelValue]
|
||||||
|
const index = newValue.indexOf(props.value)
|
||||||
|
if (value) {
|
||||||
|
if (index === -1) {
|
||||||
|
newValue.push(props.value)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (index !== -1) {
|
||||||
|
newValue.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emit('update:modelValue', newValue)
|
||||||
|
} else {
|
||||||
|
emit('update:modelValue', value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="checkbox-wrapper">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
class="checkbox"
|
||||||
|
ref="input"
|
||||||
|
:id="id"
|
||||||
|
v-model="model"
|
||||||
|
v-bind="$attrs"
|
||||||
|
/>
|
||||||
|
<label :for="id" class="checkbox-label">
|
||||||
|
{{ label }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.checkbox-wrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-label {
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--vt-c-text-1);
|
||||||
|
transition: color .5s;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1px solid var(--vp-input-border-color);
|
||||||
|
background-color: var(--vp-input-switch-bg-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox:checked {
|
||||||
|
border-color: transparent;
|
||||||
|
background: url("data:image/svg+xml,%3Csvg width='12px' height='12px' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
|
||||||
|
center no-repeat var(--vp-c-brand);;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, defineProps, onMounted } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
groups: string[] | undefined,
|
groups: string[] | undefined,
|
||||||
groupName: string,
|
groupName: string,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const value = computed({
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.color-picker {
|
.color-picker {
|
||||||
background: var(--color-picker-bg, var(--vp-c-bg-soft));
|
background: var(--color-picker-bg, var(--vp-c-bg-alt));
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
color: var(--vp-c-text-2);
|
color: var(--vp-c-text-2);
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
@@ -71,10 +71,10 @@ const value = computed({
|
|||||||
.color-input-text {
|
.color-input-text {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 8px;
|
padding: 0 0 0 8px;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--vp-c-text-2);
|
color: var(--vp-c-text-1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const SearchIcon = createLucideIcon('search', search)
|
|||||||
background: var(--vp-c-bg-soft);
|
background: var(--vp-c-bg-soft);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
color: var(--vp-c-text-2);
|
color: var(--vp-c-text-2);
|
||||||
padding: 12px 16px;
|
padding: 11px 16px;
|
||||||
height: auto;
|
height: auto;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
/* box-shadow: var(--vp-shadow-4), var(--vp-shadow-2); */
|
/* box-shadow: var(--vp-shadow-4), var(--vp-shadow-2); */
|
||||||
|
|||||||
33
docs/.vitepress/theme/components/base/GridSection.vue
Normal file
33
docs/.vitepress/theme/components/base/GridSection.vue
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import CardGrid from './CardGrid.vue';
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
title: string,
|
||||||
|
headingLevel: 1 | 2 | 3 | 4 | 5 | 6,
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const headingElement = computed(() => `h${props.headingLevel}`)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<section>
|
||||||
|
<component :is="headingElement" class="name">{{ title }}</component>
|
||||||
|
<CardGrid>
|
||||||
|
<slot />
|
||||||
|
</CardGrid>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.name {
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
margin-bottom: 96px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user