Compare commits
1027 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cc35e56d9 | ||
|
|
8d71c5bff3 | ||
|
|
43d5bc5224 | ||
|
|
77dc3c28f3 | ||
|
|
49a5e26155 | ||
|
|
e9faddc96f | ||
|
|
a79b993fbd | ||
|
|
fcb4139d68 | ||
|
|
f2b6f12fcb | ||
|
|
de3da8acf8 | ||
|
|
bccaac3c24 | ||
|
|
7da60e252a | ||
|
|
7bfdd4ab79 | ||
|
|
5f37eebf87 | ||
|
|
015676648b | ||
|
|
b1ac5422b8 | ||
|
|
9c1359b5d4 | ||
|
|
761cc038e4 | ||
|
|
0ecb194a45 | ||
|
|
700fabd970 | ||
|
|
12eb271873 | ||
|
|
65cff92b52 | ||
|
|
61b587f2b5 | ||
|
|
abdf02d9c5 | ||
|
|
77dc221578 | ||
|
|
2ca71a31c6 | ||
|
|
df64f26fa5 | ||
|
|
8218833448 | ||
|
|
4deacc6471 | ||
|
|
7b92b594c5 | ||
|
|
bf2e645daa | ||
|
|
3a15a1fcf3 | ||
|
|
14a21b1051 | ||
|
|
78e16e7210 | ||
|
|
b7e06e89cb | ||
|
|
4efd9449d6 | ||
|
|
a670e1c7cd | ||
|
|
3d51e9a084 | ||
|
|
e92efc3e20 | ||
|
|
da4d56f44d | ||
|
|
56fc8f9a6d | ||
|
|
6bd2d1105e | ||
|
|
3573a63dfd | ||
|
|
1cbc29f96a | ||
|
|
58d9854b79 | ||
|
|
34cdb22ae8 | ||
|
|
9151d37754 | ||
|
|
a0561ec0f7 | ||
|
|
2a594255a4 | ||
|
|
8e5ffd45db | ||
|
|
132b805ff3 | ||
|
|
cbe5392d5f | ||
|
|
ced4296fae | ||
|
|
e7b168ca09 | ||
|
|
bdbcacb3ee | ||
|
|
9e1cdb7017 | ||
|
|
7e8ac47cdf | ||
|
|
8dd43a635b | ||
|
|
0f0f06d6aa | ||
|
|
bd5aa6652d | ||
|
|
313be6bfd1 | ||
|
|
57cb165d55 | ||
|
|
589b3170b1 | ||
|
|
c5c6c35799 | ||
|
|
3e94d66b29 | ||
|
|
2a4dcb0f24 | ||
|
|
b32b5035b8 | ||
|
|
d7c80a844c | ||
|
|
4cc501feaf | ||
|
|
39db7af384 | ||
|
|
7869123930 | ||
|
|
d50f1304c5 | ||
|
|
ec26b46f76 | ||
|
|
e76e01df46 | ||
|
|
0963c69a2b | ||
|
|
4206bef69b | ||
|
|
fde2528df1 | ||
|
|
51ed969702 | ||
|
|
b73ee4a841 | ||
|
|
967ad751b4 | ||
|
|
7ca22198b3 | ||
|
|
28283725e0 | ||
|
|
8f17d9f3ca | ||
|
|
ff4598cc84 | ||
|
|
715374711c | ||
|
|
7f84100c22 | ||
|
|
7ff57561c2 | ||
|
|
4084293d46 | ||
|
|
76b1b2dfd6 | ||
|
|
13eab72944 | ||
|
|
490937a271 | ||
|
|
3d84a63145 | ||
|
|
118d40d3c6 | ||
|
|
49427ed00d | ||
|
|
199dd66c8b | ||
|
|
9f28b570d5 | ||
|
|
19b8c412fa | ||
|
|
89c337fe31 | ||
|
|
36df9897cc | ||
|
|
7875a57af0 | ||
|
|
4bf572e71f | ||
|
|
6b37f517c9 | ||
|
|
c5ca279227 | ||
|
|
71d91d2a8e | ||
|
|
ad4ed78b76 | ||
|
|
1df63a0716 | ||
|
|
1c76730528 | ||
|
|
be67c21bea | ||
|
|
e435e09b6d | ||
|
|
2cd4764cbd | ||
|
|
f6297e8be3 | ||
|
|
f28784583f | ||
|
|
0fb10cce85 | ||
|
|
4d67618390 | ||
|
|
4cc657d818 | ||
|
|
7e43d855f2 | ||
|
|
8c5e19a9b7 | ||
|
|
35bc9a48c0 | ||
|
|
56c3d7359c | ||
|
|
0ed81a4c07 | ||
|
|
39aed8afb8 | ||
|
|
3ad8d5039e | ||
|
|
ce9e01c2c2 | ||
|
|
fabff3a32c | ||
|
|
cc1d4df640 | ||
|
|
d8ebb596e5 | ||
|
|
1c39526afb | ||
|
|
9bd6b6b12b | ||
|
|
c8af048473 | ||
|
|
71947f0c5e | ||
|
|
57cf3956a2 | ||
|
|
bed0bee507 | ||
|
|
0a2bce9d78 | ||
|
|
3c132aeb3c | ||
|
|
32a777b997 | ||
|
|
c4b4cb0e6d | ||
|
|
204e9ad1ea | ||
|
|
ee98dcb58b | ||
|
|
d8ada044ce | ||
|
|
45a85644ca | ||
|
|
e68a51399a | ||
|
|
1b63898e8b | ||
|
|
a54a709c65 | ||
|
|
f078ae8f19 | ||
|
|
571efea41e | ||
|
|
83b3c8a1d9 | ||
|
|
303a138107 | ||
|
|
a0cbacd6c6 | ||
|
|
740857065c | ||
|
|
37acecddca | ||
|
|
86a305ce7c | ||
|
|
2c84ff0c62 | ||
|
|
b0cc1cb760 | ||
|
|
f6918f4bc1 | ||
|
|
5d433c7788 | ||
|
|
64298ff10d | ||
|
|
b258b67f1b | ||
|
|
5194b085a3 | ||
|
|
b52d9dccc4 | ||
|
|
3720645775 | ||
|
|
b200e933b6 | ||
|
|
6074dac1d5 | ||
|
|
d032ae36d1 | ||
|
|
df514c0fbe | ||
|
|
86679f6398 | ||
|
|
f907a97358 | ||
|
|
73608972c6 | ||
|
|
45018f9747 | ||
|
|
5e867d8558 | ||
|
|
cbab1b2c71 | ||
|
|
f9105e5433 | ||
|
|
d611e4662d | ||
|
|
16c57f1fb6 | ||
|
|
d89b007c9e | ||
|
|
4969644374 | ||
|
|
f481bf7c09 | ||
|
|
ace3860226 | ||
|
|
9a7ea1f888 | ||
|
|
ead30618f8 | ||
|
|
95ed1aeaf1 | ||
|
|
12155eaabb | ||
|
|
aabab32413 | ||
|
|
a9415e59c0 | ||
|
|
9dcdaf20c2 | ||
|
|
3cbb5e108e | ||
|
|
163e6d580f | ||
|
|
0cd0db7e53 | ||
|
|
0a2fbfec45 | ||
|
|
56a1cfbc98 | ||
|
|
361ca69f42 | ||
|
|
0db7c3bbd4 | ||
|
|
a5fa723db1 | ||
|
|
342327b14a | ||
|
|
a9db439a26 | ||
|
|
00dae69e9b | ||
|
|
d8c2a25a34 | ||
|
|
9b2df7646b | ||
|
|
1cb234a368 | ||
|
|
9f414cd7d3 | ||
|
|
48f87a25d5 | ||
|
|
8b88e23594 | ||
|
|
c78b18c5e8 | ||
|
|
5330207f12 | ||
|
|
4486212fa9 | ||
|
|
b985a265b0 | ||
|
|
1eef1f25fe | ||
|
|
d06c20ae52 | ||
|
|
8d500252c6 | ||
|
|
51a2a6d736 | ||
|
|
bb9f7a79d0 | ||
|
|
14720a07c6 | ||
|
|
1f82dc8fa9 | ||
|
|
11f8c58739 | ||
|
|
8523232899 | ||
|
|
5ddfc8338e | ||
|
|
c2ad19261b | ||
|
|
0b64e43432 | ||
|
|
9a230b302d | ||
|
|
df57e3bc60 | ||
|
|
ef48ac12e5 | ||
|
|
869f012734 | ||
|
|
fd01257bdf | ||
|
|
bc35557ebd | ||
|
|
d632ad5b49 | ||
|
|
a6eebe4ebd | ||
|
|
936ff5daae | ||
|
|
6dfc5f70e9 | ||
|
|
393276c9e2 | ||
|
|
e767d8b0cc | ||
|
|
0adb515873 | ||
|
|
a22d5d16ef | ||
|
|
0037dc2231 | ||
|
|
c4ee54beba | ||
|
|
c5ff2a0104 | ||
|
|
12a08f9bb7 | ||
|
|
b0662b4b1c | ||
|
|
612a13ad99 | ||
|
|
035e1dfdac | ||
|
|
fb9ec3da12 | ||
|
|
d10ba49228 | ||
|
|
696c32c5a8 | ||
|
|
bebd53468c | ||
|
|
ec8074ff16 | ||
|
|
e1e2fe14be | ||
|
|
11d069821f | ||
|
|
516f26d765 | ||
|
|
db2b0a738a | ||
|
|
7ba810057e | ||
|
|
d3ce9a629d | ||
|
|
7157869fe8 | ||
|
|
94e62ebe48 | ||
|
|
fa44f15776 | ||
|
|
2b49145d24 | ||
|
|
1542dccf54 | ||
|
|
42977a921b | ||
|
|
8ff16ace6d | ||
|
|
c9a0a98fee | ||
|
|
c7f3431798 | ||
|
|
7c738fa01e | ||
|
|
e16bc903d4 | ||
|
|
a6e669c0ec | ||
|
|
db5d8f4362 | ||
|
|
d4d51af0e2 | ||
|
|
2d6178c7e8 | ||
|
|
4c00e289ed | ||
|
|
8df081c2ec | ||
|
|
5ac86b8c98 | ||
|
|
b76ce678df | ||
|
|
d2335b1e15 | ||
|
|
e1dbf1bd66 | ||
|
|
3ff14a94c6 | ||
|
|
40fee5ffcc | ||
|
|
eee9c549ab | ||
|
|
4da12bfd5d | ||
|
|
2fca2c4d4f | ||
|
|
a095f91d37 | ||
|
|
47a9076474 | ||
|
|
124e97f0a7 | ||
|
|
78d6037272 | ||
|
|
10c385e60f | ||
|
|
13ab7ec214 | ||
|
|
acce767c88 | ||
|
|
1034966ab4 | ||
|
|
667062031e | ||
|
|
ce3665f2d8 | ||
|
|
180ca53ac5 | ||
|
|
6a5937bd8c | ||
|
|
db9020fde2 | ||
|
|
b880c99be3 | ||
|
|
7c9ffab987 | ||
|
|
e3c96176d0 | ||
|
|
6057f8d57e | ||
|
|
f483e75e08 | ||
|
|
5161ebf368 | ||
|
|
5f82f0649f | ||
|
|
41994fe7fb | ||
|
|
ef4303810f | ||
|
|
34f9a196ea | ||
|
|
b7c7c0866f | ||
|
|
433b474ead | ||
|
|
0f0cf183f9 | ||
|
|
6b32ae67e3 | ||
|
|
6c4be388a2 | ||
|
|
e10fef4b3d | ||
|
|
494b06b3d0 | ||
|
|
ac1e51a736 | ||
|
|
0e6270ac88 | ||
|
|
5dbe5821dc | ||
|
|
61688bc2ac | ||
|
|
5de442010b | ||
|
|
df0c1328c5 | ||
|
|
bbc58c4e0c | ||
|
|
75668d1f1b | ||
|
|
a53c13073e | ||
|
|
4f65b9135c | ||
|
|
8b372a3d3e | ||
|
|
b8683300b4 | ||
|
|
70a4995bf8 | ||
|
|
36b11b91bb | ||
|
|
080a7721d0 | ||
|
|
841a8ac149 | ||
|
|
e0723f10d9 | ||
|
|
fff664e35f | ||
|
|
0f49f36dcd | ||
|
|
cb0388fef9 | ||
|
|
cf49796b0b | ||
|
|
904e5912b0 | ||
|
|
7edfbc3a1e | ||
|
|
db0b9b6b69 | ||
|
|
b37b48922d | ||
|
|
fd951a2acc | ||
|
|
eb542299fe | ||
|
|
0c2614e6c4 | ||
|
|
b74a53c4c5 | ||
|
|
a6fa96f61e | ||
|
|
ad4a6f9cbe | ||
|
|
14476a19aa | ||
|
|
0128ce7efe | ||
|
|
9d98c00dd6 | ||
|
|
37266b88e8 | ||
|
|
e95aef43dc | ||
|
|
0fb7535cee | ||
|
|
86492ed76f | ||
|
|
86cfff1ec7 | ||
|
|
445afd1320 | ||
|
|
3846de3d9d | ||
|
|
6616b9347e | ||
|
|
d5b9c8dee7 | ||
|
|
5862e4d69b | ||
|
|
f61c702f7b | ||
|
|
0cabb00499 | ||
|
|
93513b6a74 | ||
|
|
a06df5c6c5 | ||
|
|
1daa949534 | ||
|
|
0fd3e29ec9 | ||
|
|
a8a73ee9cc | ||
|
|
e17dcb4a6f | ||
|
|
9b1ec67e69 | ||
|
|
c21139af1f | ||
|
|
4b44230d20 | ||
|
|
b3db378790 | ||
|
|
6a8d0cbea8 | ||
|
|
b079e7978d | ||
|
|
66218b8996 | ||
|
|
7039262404 | ||
|
|
9be05949fc | ||
|
|
7ba2b2591f | ||
|
|
3bcb910be8 | ||
|
|
6f953a3e03 | ||
|
|
d02396334e | ||
|
|
adeb19c2b2 | ||
|
|
1d21f493c3 | ||
|
|
c94b34c563 | ||
|
|
95e0274384 | ||
|
|
7323c9ee2d | ||
|
|
a3efe63b59 | ||
|
|
e09dcd1d9d | ||
|
|
ba3f6f87f5 | ||
|
|
30578016b0 | ||
|
|
9cfdd02b91 | ||
|
|
d28681d44c | ||
|
|
e5cda31e78 | ||
|
|
6a8cb28c6a | ||
|
|
2a12814fa1 | ||
|
|
d1a2f714de | ||
|
|
7957f2ff11 | ||
|
|
2ce33ff530 | ||
|
|
7bb83a8dd5 | ||
|
|
adcb93abfd | ||
|
|
e8376c69c3 | ||
|
|
cc00aca737 | ||
|
|
4712ae95b0 | ||
|
|
91861ccf02 | ||
|
|
8086d0571f | ||
|
|
7c8b50aab0 | ||
|
|
581997444e | ||
|
|
d768b613a3 | ||
|
|
67d19eb324 | ||
|
|
cbcc021209 | ||
|
|
7251f468e5 | ||
|
|
c28872572a | ||
|
|
5d52386670 | ||
|
|
6386b97262 | ||
|
|
a6638ef05c | ||
|
|
9acf663f33 | ||
|
|
9c24904021 | ||
|
|
94f8fafc6b | ||
|
|
c595dd7224 | ||
|
|
27ec83d858 | ||
|
|
68253334b5 | ||
|
|
ccb0e1ac83 | ||
|
|
3a4a2fd7e1 | ||
|
|
de6a09ca7d | ||
|
|
68ab42c22e | ||
|
|
5cf2357976 | ||
|
|
f88cca3e29 | ||
|
|
5fcd5937e6 | ||
|
|
08cdae43b7 | ||
|
|
62b21bd380 | ||
|
|
848726bd23 | ||
|
|
1d05a71b39 | ||
|
|
a50b78590f | ||
|
|
246e713c6e | ||
|
|
3eb349c31e | ||
|
|
32d1d03d11 | ||
|
|
1923be429a | ||
|
|
7921e87c49 | ||
|
|
9770eb9976 | ||
|
|
3d3dcf9e1d | ||
|
|
f0c1e952ac | ||
|
|
c0977e0cb3 | ||
|
|
4ab2d359ec | ||
|
|
fdec580314 | ||
|
|
eeed27ffcf | ||
|
|
0ef55b1f34 | ||
|
|
d9236f9ffa | ||
|
|
0a6f446e2d | ||
|
|
3ad7a987a2 | ||
|
|
25ba650161 | ||
|
|
d32c579896 | ||
|
|
e1f6caabdc | ||
|
|
11ccef2287 | ||
|
|
4f9fbb8806 | ||
|
|
5a6ea08db8 | ||
|
|
c07ca0f56f | ||
|
|
575aedf453 | ||
|
|
38c43ee93f | ||
|
|
22878b4e27 | ||
|
|
ee12892ae0 | ||
|
|
333f02120f | ||
|
|
cf6f3093ff | ||
|
|
7b71cd925d | ||
|
|
13bed67f4a | ||
|
|
a5c465c636 | ||
|
|
582ee42e4d | ||
|
|
e9d97ee9fa | ||
|
|
ba34c0d12a | ||
|
|
ccb05122ec | ||
|
|
84b0a557a7 | ||
|
|
1386b5f8e0 | ||
|
|
c32d4f9888 | ||
|
|
99842902cc | ||
|
|
3d807ebe55 | ||
|
|
087075a9fd | ||
|
|
96cac8180e | ||
|
|
53b9f5590b | ||
|
|
e9775843e6 | ||
|
|
806633fc33 | ||
|
|
76f3140f05 | ||
|
|
5abd6faa7a | ||
|
|
696e2c2193 | ||
|
|
248ff4f3c1 | ||
|
|
98a9c25ada | ||
|
|
5f67d3c109 | ||
|
|
d44ae0dce8 | ||
|
|
3ca45b5192 | ||
|
|
c344d54190 | ||
|
|
ec9d9ab28c | ||
|
|
eb21eff4cf | ||
|
|
2c67c9ee7d | ||
|
|
13c83bf297 | ||
|
|
67407a5693 | ||
|
|
3dcf5abb9b | ||
|
|
41d85a15a9 | ||
|
|
14f33029c3 | ||
|
|
8902833ee3 | ||
|
|
6eb67d0467 | ||
|
|
af8147a22b | ||
|
|
1451553617 | ||
|
|
372288cfa4 | ||
|
|
249444899f | ||
|
|
a8cd6201ce | ||
|
|
33f9124cc9 | ||
|
|
7b3020bf35 | ||
|
|
aeee8f74e5 | ||
|
|
082444f2a7 | ||
|
|
31c371f828 | ||
|
|
fc8bab640b | ||
|
|
2862b0235c | ||
|
|
bcbb01fcf2 | ||
|
|
16fa806db5 | ||
|
|
5c592b2b30 | ||
|
|
a1ca14caf8 | ||
|
|
7a2367f4a5 | ||
|
|
6017ab1dab | ||
|
|
2f9db0fe54 | ||
|
|
4dbf3817a6 | ||
|
|
34e3a39688 | ||
|
|
a23a855655 | ||
|
|
059f2e6df9 | ||
|
|
984d00b725 | ||
|
|
6d8027cb39 | ||
|
|
d68aa05a0b | ||
|
|
6abc544d01 | ||
|
|
ad53734aff | ||
|
|
453c79fa4e | ||
|
|
947ac1cac5 | ||
|
|
963db909d8 | ||
|
|
f54e5cb076 | ||
|
|
13c4526f2a | ||
|
|
0433d0242f | ||
|
|
5d41354145 | ||
|
|
95fcaeb454 | ||
|
|
db08cff1a1 | ||
|
|
6e426630f4 | ||
|
|
92e5207e3a | ||
|
|
c0d1f97c89 | ||
|
|
7f8dd7841e | ||
|
|
36fa2e3313 | ||
|
|
17498e8e69 | ||
|
|
58209181bf | ||
|
|
2c3af49f76 | ||
|
|
ebc65133ed | ||
|
|
51e2e53649 | ||
|
|
c03a795a59 | ||
|
|
c5d0dce864 | ||
|
|
3908e54ba1 | ||
|
|
393626f619 | ||
|
|
88d05a75a9 | ||
|
|
777794d488 | ||
|
|
e43b55549b | ||
|
|
67ce45c437 | ||
|
|
f61874e665 | ||
|
|
d760761bba | ||
|
|
01e3bb7810 | ||
|
|
4ea889951b | ||
|
|
e412bda820 | ||
|
|
b1e81af397 | ||
|
|
6fc485143f | ||
|
|
96609ba479 | ||
|
|
78895e05f5 | ||
|
|
6e3b2caed4 | ||
|
|
01e5af9b23 | ||
|
|
ef6a79114d | ||
|
|
527e288732 | ||
|
|
2967fb8afd | ||
|
|
7a1793c3db | ||
|
|
4f797de139 | ||
|
|
1f8a13bd22 | ||
|
|
b9f3042e1f | ||
|
|
35fa5f11f8 | ||
|
|
d0593e8907 | ||
|
|
6a5347dfd2 | ||
|
|
c995b5a8db | ||
|
|
45b03c068a | ||
|
|
4cabb017cb | ||
|
|
00e398948e | ||
|
|
712717e587 | ||
|
|
67c7bf3cc9 | ||
|
|
8bb711a911 | ||
|
|
de69850d03 | ||
|
|
17a1f12463 | ||
|
|
35da5a2ca6 | ||
|
|
42d4c1c4fa | ||
|
|
f5cd3d745e | ||
|
|
b140fbc03d | ||
|
|
58e5721642 | ||
|
|
01fb2aad90 | ||
|
|
472bc08353 | ||
|
|
1bb771992f | ||
|
|
941abeeeff | ||
|
|
fb1630511a | ||
|
|
0af1a464a5 | ||
|
|
5600485f4d | ||
|
|
a67a204cd1 | ||
|
|
3b3f278d1e | ||
|
|
a2903a26ba | ||
|
|
9ee56128e3 | ||
|
|
ec21cf5bef | ||
|
|
df7a82e9c3 | ||
|
|
71cd8e9157 | ||
|
|
686d1aceda | ||
|
|
3dad5ef491 | ||
|
|
e9335b1f6f | ||
|
|
874d99e78f | ||
|
|
cfc03593fa | ||
|
|
af3f311232 | ||
|
|
8b77da7400 | ||
|
|
33d13c4649 | ||
|
|
374eb9158e | ||
|
|
f0a7f8d402 | ||
|
|
8d158944b5 | ||
|
|
b598067245 | ||
|
|
42e345f095 | ||
|
|
541dc831e6 | ||
|
|
75e819f6ae | ||
|
|
e23e7f9c72 | ||
|
|
9cbdfd876b | ||
|
|
e3c64e1ead | ||
|
|
4bc6981ca7 | ||
|
|
127b57416f | ||
|
|
0c0f29f295 | ||
|
|
12e1636981 | ||
|
|
6ef13b00db | ||
|
|
88e7b56c86 | ||
|
|
0a282027a6 | ||
|
|
0f14a90a9b | ||
|
|
beab364ac9 | ||
|
|
499d8aadbe | ||
|
|
ee480d992b | ||
|
|
1a309d74f9 | ||
|
|
e09053bb27 | ||
|
|
053c4adb10 | ||
|
|
bc528c5cac | ||
|
|
df3fc91704 | ||
|
|
d3c68d00d8 | ||
|
|
d4b82958c4 | ||
|
|
215692ae8b | ||
|
|
7cf537827e | ||
|
|
b7eef76204 | ||
|
|
bffcc306f4 | ||
|
|
0bea618803 | ||
|
|
13e98f12fc | ||
|
|
f1f2fe39bb | ||
|
|
a0d57b782d | ||
|
|
9ad8c1d1c1 | ||
|
|
18ef3153db | ||
|
|
65bd321f4a | ||
|
|
5cdcfda4a1 | ||
|
|
e307e5bde5 | ||
|
|
32568cc32b | ||
|
|
e279ca2c88 | ||
|
|
9f164a5a54 | ||
|
|
c2b367f8d5 | ||
|
|
3081976587 | ||
|
|
3260b7ce8e | ||
|
|
e3d373c38f | ||
|
|
ee1afbe910 | ||
|
|
15beef8963 | ||
|
|
2ef05e3d4e | ||
|
|
3320b94d77 | ||
|
|
afd6b86f22 | ||
|
|
057dd6a94a | ||
|
|
ddb756ee96 | ||
|
|
7d257d43f3 | ||
|
|
ad33093ec0 | ||
|
|
dc456d2749 | ||
|
|
4826f0735a | ||
|
|
1f742452a4 | ||
|
|
d453aca9a2 | ||
|
|
e1a22a7dc1 | ||
|
|
2c9b019074 | ||
|
|
637b614410 | ||
|
|
28ae66a804 | ||
|
|
d8ad810681 | ||
|
|
9c1ea2c679 | ||
|
|
33c4d4563a | ||
|
|
9bdae8777f | ||
|
|
3e9e015945 | ||
|
|
31226fbf89 | ||
|
|
8a876a1053 | ||
|
|
a41d076929 | ||
|
|
535e83cdca | ||
|
|
8b3992ff06 | ||
|
|
009e26974d | ||
|
|
665861b92c | ||
|
|
d75c6e77f3 | ||
|
|
34770e590d | ||
|
|
4b4137a8e1 | ||
|
|
1400abb6a9 | ||
|
|
9320111dac | ||
|
|
97d977bd08 | ||
|
|
0f679c26f8 | ||
|
|
52b1aa6608 | ||
|
|
88ab29e6a1 | ||
|
|
80447bdee9 | ||
|
|
11356d1646 | ||
|
|
94155bdd59 | ||
|
|
1d450ba778 | ||
|
|
1c176e8a61 | ||
|
|
f99ce83da2 | ||
|
|
4b50352885 | ||
|
|
00972173ac | ||
|
|
9278e91dfc | ||
|
|
8b992cb779 | ||
|
|
80050fa6e1 | ||
|
|
3b5acf019b | ||
|
|
a315e6ed1e | ||
|
|
f16041225c | ||
|
|
11eae1593a | ||
|
|
e27d4c4ab5 | ||
|
|
6c93cdf22d | ||
|
|
9a73497fc6 | ||
|
|
832b3bb33d | ||
|
|
c04db6548e | ||
|
|
ff123086bf | ||
|
|
200f54f63c | ||
|
|
a806bd1f08 | ||
|
|
ab1d14eee6 | ||
|
|
7b7ffc49d7 | ||
|
|
65a1499956 | ||
|
|
1e5b887be9 | ||
|
|
d7f3f1177d | ||
|
|
40420bd58f | ||
|
|
a42021f1e0 | ||
|
|
0017562573 | ||
|
|
15b1ad3aaa | ||
|
|
4cadfa6b1f | ||
|
|
a155ceca2e | ||
|
|
13e25131da | ||
|
|
6b3d543630 | ||
|
|
77ec896fa2 | ||
|
|
12a47c17e1 | ||
|
|
995c8a621a | ||
|
|
a506a06688 | ||
|
|
fcb4af670c | ||
|
|
2328c2a832 | ||
|
|
11651cd3b4 | ||
|
|
170bdbcd36 | ||
|
|
916476aeb8 | ||
|
|
e3d15ca868 | ||
|
|
9a339342aa | ||
|
|
9e96c21605 | ||
|
|
86b45b8d95 | ||
|
|
b0a1dc025f | ||
|
|
3aaba8525f | ||
|
|
7520c3feaa | ||
|
|
ae3e7cfdd2 | ||
|
|
c8eca13e07 | ||
|
|
1b176b8ed5 | ||
|
|
e92341ef9a | ||
|
|
fb6bdcab8a | ||
|
|
183bdfe632 | ||
|
|
9827958a09 | ||
|
|
657cc55551 | ||
|
|
9caae03c3d | ||
|
|
2b063e9deb | ||
|
|
a864d92173 | ||
|
|
98a6034dcc | ||
|
|
d73fe4ccd3 | ||
|
|
09d386818a | ||
|
|
62544d7754 | ||
|
|
d40df8a1ff | ||
|
|
468d857225 | ||
|
|
2612bdfc1e | ||
|
|
ea2076c138 | ||
|
|
d39757c360 | ||
|
|
e5abb02a7d | ||
|
|
5f73799ce4 | ||
|
|
dd2d298537 | ||
|
|
ee67013b3d | ||
|
|
4a4644d710 | ||
|
|
5aad7f81e9 | ||
|
|
21886f2277 | ||
|
|
404a223ac8 | ||
|
|
d87e864c41 | ||
|
|
f93017fba3 | ||
|
|
b04793443d | ||
|
|
800eba7a48 | ||
|
|
fb81cb9367 | ||
|
|
1ad311cadf | ||
|
|
584b166a1e | ||
|
|
c70f55a94b | ||
|
|
3185644a6a | ||
|
|
0cc5117c2b | ||
|
|
4ca131d3ee | ||
|
|
e1d661f623 | ||
|
|
a3a945bd45 | ||
|
|
2964882536 | ||
|
|
fda8fb3d2a | ||
|
|
6e1cf2f8e7 | ||
|
|
f40e164085 | ||
|
|
281c5c7c7b | ||
|
|
b717e696a3 | ||
|
|
36e2672a13 | ||
|
|
665d4a3748 | ||
|
|
cd23d0b4f3 | ||
|
|
a6b026d9b0 | ||
|
|
985af2a0df | ||
|
|
0b92faf27e | ||
|
|
a4b3a17c93 | ||
|
|
bbe220bab1 | ||
|
|
4ca90751e6 | ||
|
|
2597e00f45 | ||
|
|
a29468615d | ||
|
|
9843ff54e1 | ||
|
|
aa6a4b64b6 | ||
|
|
1dd08046d8 | ||
|
|
4e68d5349f | ||
|
|
2f9b1e5792 | ||
|
|
517b9ce3e8 | ||
|
|
f651e38c1d | ||
|
|
adb15a71a8 | ||
|
|
6d344a90cb | ||
|
|
81296ac128 | ||
|
|
dc307ddb84 | ||
|
|
eebb8128d3 | ||
|
|
3266e152e2 | ||
|
|
68d2cfe6ed | ||
|
|
98cf51a8e6 | ||
|
|
fc0c7f5c11 | ||
|
|
0557ac3280 | ||
|
|
4163db7a0d | ||
|
|
0c55d543f1 | ||
|
|
432a4e9ccf | ||
|
|
f7c4c7ec6a | ||
|
|
2f9a22f41a | ||
|
|
2605718c0a | ||
|
|
6d699751ae | ||
|
|
51728d1ced | ||
|
|
6aab0a3da3 | ||
|
|
fc130ff843 | ||
|
|
d954314e9b | ||
|
|
517352b7ce | ||
|
|
583e15c5ca | ||
|
|
c39f9c28a7 | ||
|
|
f2c359f8f4 | ||
|
|
22e4cc99b3 | ||
|
|
342dae0237 | ||
|
|
851281b2f3 | ||
|
|
98beb4e8e4 | ||
|
|
f13848d9f8 | ||
|
|
f2de180f9a | ||
|
|
273d5edb3e | ||
|
|
4a2ae51a61 | ||
|
|
f0291806ef | ||
|
|
0e3bc4ad8f | ||
|
|
717a2844b3 | ||
|
|
cbd71108d2 | ||
|
|
3a159b3967 | ||
|
|
5e5aa7b6ab | ||
|
|
68c05a71f9 | ||
|
|
73556f8403 | ||
|
|
ecfabb3866 | ||
|
|
7967ad51f4 | ||
|
|
5cf2a5d876 | ||
|
|
158d6c159b | ||
|
|
630d6c6777 | ||
|
|
2156e3defd | ||
|
|
521d69f238 | ||
|
|
d4677bc293 | ||
|
|
12325b96f3 | ||
|
|
6d4cbc7fb9 | ||
|
|
8565c1a9ce | ||
|
|
e94db5997f | ||
|
|
764c5a1519 | ||
|
|
7fb6a83138 | ||
|
|
a13f4b3b9e | ||
|
|
e12a24570a | ||
|
|
d82bf27d41 | ||
|
|
b4be30ed70 | ||
|
|
eb49c6e9c9 | ||
|
|
41b0af3048 | ||
|
|
d94c54df09 | ||
|
|
8a7bc1e167 | ||
|
|
c92eb1bf23 | ||
|
|
37d0d8dece | ||
|
|
d82c0ee920 | ||
|
|
8ba9d9f4cc | ||
|
|
4da3254493 | ||
|
|
2d3013e226 | ||
|
|
5e7b071efd | ||
|
|
5eb45ecb28 | ||
|
|
6d076498e9 | ||
|
|
6beb5b14bd | ||
|
|
c2ca168aa3 | ||
|
|
e676036a4e | ||
|
|
0b570f9921 | ||
|
|
94b280377d | ||
|
|
5a687c0cd5 | ||
|
|
7b3045d973 | ||
|
|
4d4506894e | ||
|
|
c5ff0df2b0 | ||
|
|
6ae395cafb | ||
|
|
21e15c87a2 | ||
|
|
20f9111cdd | ||
|
|
126f767675 | ||
|
|
3f2bc3e6b4 | ||
|
|
87c639d204 | ||
|
|
66287f3883 | ||
|
|
bd3329cdc9 | ||
|
|
2262189624 | ||
|
|
cc524125fd | ||
|
|
e5e545467f | ||
|
|
4011a81a1d | ||
|
|
b7d7c3108a | ||
|
|
f19dbdb400 | ||
|
|
1aecac107b | ||
|
|
c0393c1786 | ||
|
|
547100a835 | ||
|
|
e5e69f39d0 | ||
|
|
4106a13b94 | ||
|
|
9b38f8cc09 | ||
|
|
435d8aa52c | ||
|
|
cf28d565c1 | ||
|
|
8bce6e0945 | ||
|
|
569f00e5a3 | ||
|
|
3d05c598bf | ||
|
|
06ec8c204c | ||
|
|
cc692b9ef7 | ||
|
|
21f085b0e4 | ||
|
|
7918050127 | ||
|
|
f4698875aa | ||
|
|
a697e88c18 | ||
|
|
49e94bc089 | ||
|
|
8c79a9f358 | ||
|
|
544b9d1083 | ||
|
|
c474ecd447 | ||
|
|
2b12bd690e | ||
|
|
d9c9d6849f | ||
|
|
efddc211fc | ||
|
|
bdd1371445 | ||
|
|
d119243ad2 | ||
|
|
005a6718f4 | ||
|
|
63d088710d | ||
|
|
00cb3deca0 | ||
|
|
29059d1caa | ||
|
|
1f8b2b5b0f | ||
|
|
a19920729f | ||
|
|
bd6e302705 | ||
|
|
7daf32f91a | ||
|
|
bd18755b48 | ||
|
|
73ba8ed623 | ||
|
|
5f4e711254 | ||
|
|
9e5b239ea3 | ||
|
|
b951910ea7 | ||
|
|
e8086c65ee | ||
|
|
920e672d17 | ||
|
|
002bf97331 | ||
|
|
fe565234bd | ||
|
|
5057d4473a | ||
|
|
a8af665f3a | ||
|
|
34de2bd295 | ||
|
|
389549d93d | ||
|
|
405c71460a | ||
|
|
ae17be05a6 | ||
|
|
41617bd556 | ||
|
|
6512abd33b | ||
|
|
27ea709d79 | ||
|
|
107ba13367 | ||
|
|
75c7b0d01c | ||
|
|
9c5adcc933 | ||
|
|
d01e5b639c | ||
|
|
2a4a7cc792 | ||
|
|
b55df5acbf | ||
|
|
f455a9cffb | ||
|
|
b92738f8ef | ||
|
|
ba7858e3b0 | ||
|
|
f6e92879ba | ||
|
|
d07ce0de32 | ||
|
|
1244ee7ba9 | ||
|
|
28707f6663 | ||
|
|
16eb4a2aad | ||
|
|
f233bb277c | ||
|
|
43d690807a | ||
|
|
5f022b3209 | ||
|
|
4658473546 | ||
|
|
f749c0bce4 | ||
|
|
003231aa39 | ||
|
|
4660b2494f | ||
|
|
8eb5f4581b | ||
|
|
fb08ee3b13 | ||
|
|
855dddf89c | ||
|
|
3500988610 | ||
|
|
b48f3255c6 | ||
|
|
fcaef62bff | ||
|
|
c4a717702c | ||
|
|
b111357b45 | ||
|
|
03bceb7ef2 | ||
|
|
41ae69a057 | ||
|
|
c8127c617f | ||
|
|
e200b9cc63 | ||
|
|
49aaad3e56 | ||
|
|
f4b0b9c164 | ||
|
|
92af79f01b | ||
|
|
304e8fc284 | ||
|
|
324b32ed6f | ||
|
|
c7d747efc1 | ||
|
|
6f1a19ab47 | ||
|
|
723ef9d8d8 | ||
|
|
e07680e348 | ||
|
|
41a95164e3 | ||
|
|
b1f2d87d74 | ||
|
|
e36445de70 | ||
|
|
85cebd62ae | ||
|
|
c039a3458c | ||
|
|
998cc14c15 | ||
|
|
42435a96b3 | ||
|
|
d123cdfbbb | ||
|
|
18dab17236 | ||
|
|
cd14f12fd1 | ||
|
|
7139550a24 | ||
|
|
4365c76453 | ||
|
|
b0cec93211 | ||
|
|
e9f23154ec | ||
|
|
4566365f3c | ||
|
|
748d5f4ab5 | ||
|
|
5996f4083d | ||
|
|
115cf5e56a | ||
|
|
f68f6a91a8 | ||
|
|
bc2b3d5f4a | ||
|
|
e34d97bb24 | ||
|
|
9b7975e75f | ||
|
|
7934d0df16 | ||
|
|
a9fc3a6fa4 | ||
|
|
b500a99b8e | ||
|
|
bf817e2da0 | ||
|
|
4d49cf545f | ||
|
|
c145127332 | ||
|
|
3542b09602 | ||
|
|
057385aed6 | ||
|
|
000f39ced0 | ||
|
|
872e5f8676 | ||
|
|
d314ea56f6 | ||
|
|
f99fbc06fc | ||
|
|
bc6ed3ac18 | ||
|
|
280f37cefe |
1
.github/FUNDING.yml
vendored
|
|
@ -1,2 +1 @@
|
|||
github: ThaUnknown
|
||||
ko_fi: thaunknown_
|
||||
|
|
|
|||
7
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -12,17 +12,17 @@ body:
|
|||
options:
|
||||
- label: >-
|
||||
I have searched the [issue
|
||||
tracker](https://github.com/ThaUnknown/miru/issues) for a bug report
|
||||
tracker](https://github.com/hayase-app/ui/issues) for a bug report
|
||||
that matches the one I want to file, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched the [frequently asked
|
||||
questions](https://github.com/ThaUnknown/miru/blob/master/docs/faq.md)
|
||||
questions](https://hayase.watch/faq) for a solution to my problem,
|
||||
for a solution that fixes this problem, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have checked that I'm using the [latest
|
||||
stable](https://github.com/ThaUnknown/miru/releases/latest) version
|
||||
stable](https://github.com/hayase-app/ui/releases/latest) version
|
||||
of the app.
|
||||
required: true
|
||||
- type: input
|
||||
|
|
@ -43,6 +43,7 @@ body:
|
|||
- Windows
|
||||
- Linux
|
||||
- MacOS
|
||||
- Android
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
|
|
|||
6
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
|
|
@ -12,17 +12,17 @@ body:
|
|||
options:
|
||||
- label: >-
|
||||
I have searched the [issue
|
||||
tracker](https://github.com/ThaUnknown/miru/issues) for a bug report
|
||||
tracker](https://github.com/hayase-app/ui/issues) for a bug report
|
||||
that matches the one I want to file, without success.
|
||||
required: true
|
||||
- label: >-
|
||||
I have searched the [features
|
||||
list](https://github.com/ThaUnknown/miru#features) for this feature,
|
||||
list](https://hayase.watch/features) for this feature,
|
||||
and I couldn't find it.
|
||||
required: true
|
||||
- label: >-
|
||||
I have checked that I'm using the [latest
|
||||
stable](https://github.com/ThaUnknown/miru/releases/latest) version
|
||||
stable](https://github.com/hayase-app/ui/releases/latest) version
|
||||
of the app.
|
||||
required: true
|
||||
- type: textarea
|
||||
|
|
|
|||
34
.github/pnp.yml.broken
vendored
|
|
@ -1,34 +0,0 @@
|
|||
name: Build/release
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install PNPM
|
||||
uses: pnpm/action-setup@v2.2.2
|
||||
with:
|
||||
version: 7
|
||||
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: pnpm run publish
|
||||
39
.github/workflows/check.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
name: Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.19
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Sync
|
||||
run: pnpm run sync
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Check GQL
|
||||
run: pnpm run gql:check
|
||||
|
||||
- name: Check Svelte and TypeScript
|
||||
run: pnpm run check
|
||||
28
.github/workflows/main.yml
vendored
|
|
@ -1,28 +0,0 @@
|
|||
name: Build/release
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npm run publish
|
||||
28
.gitignore
vendored
|
|
@ -1,10 +1,26 @@
|
|||
# OS Specific
|
||||
node_modules
|
||||
|
||||
# Output
|
||||
.output
|
||||
.vercel
|
||||
/.svelte-kit
|
||||
/build
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Build output
|
||||
dist/
|
||||
# Env
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
!.env.test
|
||||
ideas.todo
|
||||
|
||||
# Dependencies
|
||||
node_modules/
|
||||
# Vite
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
|
||||
package-lock.json
|
||||
*.mkv
|
||||
*.webm
|
||||
*src/routes/test/**
|
||||
|
|
|
|||
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
engine-strict=true
|
||||
13
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"usernamehw.errorlens",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"GraphQL.vscode-graphql-syntax",
|
||||
"bierner.comment-tagged-templates",
|
||||
"YoavBls.pretty-ts-errors",
|
||||
"svelte.svelte-vscode", // 109.5.2 or older NOT NEWER
|
||||
"ardenivanov.svelte-intellisense",
|
||||
"Gruntfuggly.todo-tree",
|
||||
"bradlc.vscode-tailwindcss"
|
||||
]
|
||||
}
|
||||
39
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Chromium",
|
||||
"port": 8412,
|
||||
"request": "launch",
|
||||
"type": "chrome",
|
||||
"url": "http://localhost:7344/",
|
||||
"webRoot": "${workspaceFolder}/src",
|
||||
"timeout": 60000,
|
||||
"presentation": {
|
||||
"hidden": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug Renderer Process",
|
||||
"port": 9222,
|
||||
"request": "attach",
|
||||
"type": "chrome",
|
||||
"webRoot": "${workspaceFolder}/src",
|
||||
"timeout": 60000,
|
||||
"presentation": {
|
||||
"hidden": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Attach",
|
||||
"configurations": [
|
||||
"Launch Chromium"
|
||||
],
|
||||
"presentation": {
|
||||
"order": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
43
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "always"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.linkedEditing": true,
|
||||
"editor.tabSize": 2,
|
||||
"eslint.format.enable": true,
|
||||
"eslint.probe": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"svelte",
|
||||
"html"
|
||||
],
|
||||
"eslint.useESLintClass": true,
|
||||
"eslint.useFlatConfig": true,
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"svelte",
|
||||
"html"
|
||||
],
|
||||
"javascript.preferences.importModuleSpecifierEnding": "minimal",
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"javascript.suggest.autoImports": true,
|
||||
"javascript.updateImportsOnFileMove.enabled": "always",
|
||||
"javascript.validate.enable": true,
|
||||
"extensions.ignoreRecommendations": false,
|
||||
"svelte.plugin.svelte.format.config.singleQuote": true,
|
||||
"svelte.plugin.svelte.format.enable": false,
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"typescript.experimental.expandableHover": true,
|
||||
"typescript.preferences.importModuleSpecifierEnding": "minimal",
|
||||
"typescript.preferences.quoteStyle": "single",
|
||||
"typescript.suggest.autoImports": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.updateImportsOnFileMove.enabled": "always",
|
||||
"typescript.validate.enable": true
|
||||
}
|
||||
166
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
# Contributing Guidelines
|
||||
|
||||
*Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!* :octocat:
|
||||
|
||||
### Contents
|
||||
|
||||
* [Opening an Issue](#inbox_tray-opening-an-issue)
|
||||
* [Feature Requests](#love_letter-feature-requests)
|
||||
* [Triaging Issues](#mag-triaging-issues)
|
||||
* [Submitting Pull Requests](#repeat-submitting-pull-requests)
|
||||
* [Writing Commit Messages](#memo-writing-commit-messages)
|
||||
* [Code Review](#white_check_mark-code-review)
|
||||
* [Coding Style](#nail_care-coding-style)
|
||||
* [Certificate of Origin](#medal_sports-certificate-of-origin)
|
||||
* [Credits](#pray-credits)
|
||||
|
||||
> **This guide serves to set clear expectations for everyone involved with the project so that we can improve it together while also creating a welcoming space for everyone to participate. Following these guidelines will help ensure a positive experience for contributors and maintainers.**
|
||||
|
||||
## :inbox\_tray: Opening an Issue
|
||||
|
||||
Before [creating an issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue), check if you are using the latest version of the project. If you are not up-to-date, see if updating fixes your issue first.
|
||||
|
||||
### :lock: Reporting Security Issues
|
||||
|
||||
Review our [Security Policy](./SECURITY.md). **Do not** file a public issue for security vulnerabilities.
|
||||
|
||||
### :beetle: Bug Reports and Other Issues
|
||||
|
||||
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report. :v:
|
||||
|
||||
In short, since you are most likely a developer, **provide a ticket that you would like to receive**.
|
||||
|
||||
* **Review the documentation and [Support Guide](./SUPPORT.md)** before opening a new issue.
|
||||
|
||||
* **Do not open a duplicate issue!** Search through existing issues to see if your issue has previously been reported. If your issue exists, comment with any additional information you have. You may simply note "I have this problem too", which helps prioritize the most common problems and requests.
|
||||
|
||||
* **Prefer using [reactions](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/)**, not comments, if you simply want to "+1" an existing issue.
|
||||
|
||||
* **Fully complete the provided issue template.** The bug report template requests all the information we need to quickly and efficiently address your issue. Be clear, concise, and descriptive. Provide as much information as you can, including steps to reproduce, stack traces, compiler errors, library versions, OS versions, and screenshots (if applicable).
|
||||
|
||||
* **Use [GitHub-flavored Markdown](https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax).** Especially put code blocks and console outputs in backticks (\`\`\`). This improves readability.
|
||||
|
||||
## :love\_letter: Feature Requests
|
||||
|
||||
Feature requests are welcome! While we will consider all requests, we cannot guarantee your request will be accepted. We want to avoid [feature creep](https://en.wikipedia.org/wiki/Feature_creep). Your idea may be great, but also out-of-scope for the project. If accepted, we cannot make any commitments regarding the timeline for implementation and release. However, you are welcome to submit a pull request to help!
|
||||
|
||||
* **Do not open a duplicate feature request.** Search for existing feature requests first. If you find your feature (or one very similar) previously requested, comment on that issue.
|
||||
|
||||
* **Fully complete the provided issue template.** The feature request template asks for all necessary information for us to begin a productive conversation.
|
||||
|
||||
* Be precise about the proposed outcome of the feature and how it relates to existing features. Include implementation details if possible.
|
||||
|
||||
## :mag: Triaging Issues
|
||||
|
||||
You can triage issues which may include reproducing bug reports or asking for additional information, such as version numbers or reproduction instructions. Any help you can provide to quickly resolve an issue is very much appreciated!
|
||||
|
||||
## :repeat: Submitting Pull Requests
|
||||
|
||||
We **love** pull requests! Before [forking the repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) and [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests) for non-trivial changes, it is usually best to first open an issue to discuss the changes, or discuss your intended approach for solving the problem in the comments for an existing issue.
|
||||
|
||||
For most contributions, after your first pull request is accepted and merged, you will be [invited to the project](https://help.github.com/en/github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository) and given **push access**. :tada:
|
||||
|
||||
*Note: All contributions will be licensed under the project's license.*
|
||||
|
||||
* **Smaller is better.** Submit **one** pull request per bug fix or feature. A pull request should contain isolated changes pertaining to a single bug fix or feature implementation. **Do not** refactor or reformat code that is unrelated to your change. It is better to **submit many small pull requests** rather than a single large one. Enormous pull requests will take enormous amounts of time to review, or may be rejected altogether.
|
||||
|
||||
* **Coordinate bigger changes.** For large and non-trivial changes, open an issue to discuss a strategy with the maintainers. Otherwise, you risk doing a lot of work for nothing!
|
||||
|
||||
* **Prioritize understanding over cleverness.** Write code clearly and concisely. Remember that source code usually gets written once and read often. Ensure the code is clear to the reader. The purpose and logic should be obvious to a reasonably skilled developer, otherwise you should add a comment that explains it.
|
||||
|
||||
* **Follow existing coding style and conventions.** Keep your code consistent with the style, formatting, and conventions in the rest of the code base. When possible, these will be enforced with a linter. Consistency makes it easier to review and modify in the future.
|
||||
|
||||
* **Include test coverage.** Add unit tests or UI tests when possible. Follow existing patterns for implementing tests.
|
||||
|
||||
* **Update the example project** if one exists to exercise any new functionality you have added.
|
||||
|
||||
* **Add documentation.** Document your changes with code doc comments or in existing guides.
|
||||
|
||||
* **Use the repo's default branch.** Branch from and [submit your pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to the repo's default branch. Usually this is `main`, but it could be `dev`, `develop`, or `master`.
|
||||
|
||||
* **[Resolve any merge conflicts](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)** that occur.
|
||||
|
||||
* **Promptly address any CI failures**. If your pull request fails to build or pass tests, please push another commit to fix it.
|
||||
|
||||
* When writing comments, use properly constructed sentences, including punctuation.
|
||||
|
||||
* Use spaces, not tabs.
|
||||
|
||||
## :memo: Writing Commit Messages
|
||||
|
||||
Please [write a great commit message](https://chris.beams.io/posts/git-commit/).
|
||||
|
||||
1. Separate subject from body with a blank line
|
||||
2. Limit the subject line to 50 characters
|
||||
3. Capitalize the subject line
|
||||
4. Do not end the subject line with a period
|
||||
5. Use the imperative mood in the subject line (example: "Fix networking issue")
|
||||
6. Wrap the body at about 72 characters
|
||||
7. Use the body to explain **why**, *not what and how* (the code shows that!)
|
||||
8. If applicable, prefix the title with the relevant component name in a semantic way. (examples: "fix: typo", "feat: add avatar")
|
||||
|
||||
```
|
||||
docs: Short summary of changes in 50 chars or less
|
||||
|
||||
Add a more detailed explanation here, if necessary. Possibly give
|
||||
some background about the issue being fixed, etc. The body of the
|
||||
commit message can be several paragraphs. Further paragraphs come
|
||||
after blank lines and please do proper word-wrap.
|
||||
|
||||
Wrap it to about 72 characters or so. In some contexts,
|
||||
the first line is treated as the subject of the commit and the
|
||||
rest of the text as the body. The blank line separating the summary
|
||||
from the body is critical (unless you omit the body entirely);
|
||||
various tools like `log`, `shortlog` and `rebase` can get confused
|
||||
if you run the two together.
|
||||
|
||||
Explain the problem that this commit is solving. Focus on why you
|
||||
are making this change as opposed to how or what. The code explains
|
||||
how or what. Reviewers and your future self can read the patch,
|
||||
but might not understand why a particular solution was implemented.
|
||||
Are there side effects or other unintuitive consequences of this
|
||||
change? Here's the place to explain them.
|
||||
|
||||
- Bullet points are okay, too
|
||||
|
||||
- A hyphen or asterisk should be used for the bullet, preceded
|
||||
by a single space, with blank lines in between
|
||||
|
||||
Note the fixed or relevant GitHub issues at the end:
|
||||
|
||||
Resolves: #123
|
||||
See also: #456, #789
|
||||
```
|
||||
|
||||
## :white\_check\_mark: Code Review
|
||||
|
||||
* **Review the code, not the author.** Look for and suggest improvements without disparaging or insulting the author. Provide actionable feedback and explain your reasoning.
|
||||
|
||||
* **You are not your code.** When your code is critiqued, questioned, or constructively criticized, remember that you are not your code. Do not take code review personally.
|
||||
|
||||
* **Always do your best.** No one writes bugs on purpose. Do your best, and learn from your mistakes.
|
||||
|
||||
* Kindly note any violations to the guidelines specified in this document.
|
||||
|
||||
## :nail\_care: Coding Style
|
||||
|
||||
Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance.
|
||||
|
||||
For example, if all private properties are prefixed with an underscore `_`, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like `thisIsMyNewMethod`, then do not diverge from that by writing `this_is_my_new_method`. You get the idea. If in doubt, please ask or search the codebase for something similar.
|
||||
|
||||
When possible, style and format will be enforced with a linter.
|
||||
|
||||
## :medal\_sports: Certificate of Origin
|
||||
|
||||
*Developer's Certificate of Origin 1.1*
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
> 1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
|
||||
> 2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
|
||||
> 3. The contribution was provided directly to me by some other person who certified (1), (2) or (3) and I have not modified it.
|
||||
> 4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the source license(s) involved.
|
||||
|
||||
## [No Brown M\&M's](https://en.wikipedia.org/wiki/Van_Halen#Contract_riders)
|
||||
|
||||
If you are reading this, bravo dear user and (hopefully) contributor for making it this far! You are awesome. :100:
|
||||
699
LICENSE
|
|
@ -1,674 +1,47 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
Business Source License 1.1
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
Terms
|
||||
|
||||
Preamble
|
||||
The Licensor hereby grants you the right to copy, modify, create derivative
|
||||
works, redistribute, and make non-production use of the Licensed Work. The
|
||||
Licensor may make an Additional Use Grant, above, permitting limited
|
||||
production use.
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
Effective on the Change Date, or the fourth anniversary of the first publicly
|
||||
available distribution of a specific version of the Licensed Work under this
|
||||
License, whichever comes first, the Licensor hereby grants you rights under
|
||||
the terms of the Change License, and the rights granted in the paragraph
|
||||
above terminate.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
If your use of the Licensed Work does not comply with the requirements
|
||||
currently in effect as described in this License, you must purchase a
|
||||
commercial license from the Licensor, its affiliated entities, or authorized
|
||||
resellers, or you must refrain from using the Licensed Work.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
All copies of the original and modified Licensed Work, and derivative works
|
||||
of the Licensed Work, are subject to this License. This License applies
|
||||
separately for each version of the Licensed Work and the Change Date may vary
|
||||
for each version of the Licensed Work released by Licensor.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
You must conspicuously display this License on each original or modified copy
|
||||
of the Licensed Work. If you receive the Licensed Work in original or
|
||||
modified form from a third party, the terms and conditions set forth in this
|
||||
License apply to your use of that work.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
Any use of the Licensed Work in violation of this License will automatically
|
||||
terminate your rights under this License for the current and all other
|
||||
versions of the Licensed Work.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
This License does not grant you any right in any trademark or logo of
|
||||
Licensor or its affiliates (provided that you may use a trademark or logo of
|
||||
Licensor as expressly required by this License).
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
||||
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
||||
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
||||
TITLE.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
Change Date: 2029-04-01
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license GPL-3.0.
|
||||
|
|
|
|||
235
README.md
|
|
@ -1,133 +1,158 @@
|
|||
<h1 align="center">
|
||||
<a href="https://github.com/ThaUnknown/miru">
|
||||
<img src="./docs/logo.png" width="200">
|
||||
<p align="center">
|
||||
<a href="https://github.com/hayase-app/ui">
|
||||
<img src="./static/logo_white.svg" width="300">
|
||||
</a>
|
||||
</h1>
|
||||
</p>
|
||||
<h1 align="center"><b>Hayase</b></h1>
|
||||
|
||||
<h4 align="center"><b>Stream anime torrents, real-time with no waiting for downloads</b></h4>
|
||||
<h4 align="center"><b>Stream anime torrents instantly, real-time with no waiting for downloads to finish! 🍿</b></h4>
|
||||
|
||||
<p align="center">
|
||||
<a href="#about">About</a> •
|
||||
<a href="#features">Features</a> •
|
||||
<a href="./docs/faq.md">Frequently Asked Questions</a> •
|
||||
<a href="#building-and-development">Building and Development</a> •
|
||||
<a href="https://github.com/ThaUnknown/miru/releases/latest">Download</a>
|
||||
<a href="https://hayase.watch/#about">About</a> •
|
||||
<a href="https://hayase.watch/features/">Features</a> •
|
||||
<a href="https://hayase.watch/faq/">Frequently Asked Questions</a> •
|
||||
<a href="https://hayase.watch/download/">Download</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<img src="./docs/show.gif" alt="chat"><br>
|
||||
<a href="https://discord.gg/Z87Nh7c4Ac">
|
||||
<img src="https://img.shields.io/discord/953341991134064651?style=flat-square" alt="chat">
|
||||
</a>
|
||||
<a href="https://github.com/ThaUnknown/miru/releases/latest">
|
||||
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/ThaUnknown/miru/total?style=flat-square">
|
||||
<a href="https://hayase.watch/download/">
|
||||
<img alt="Download" src="https://img.shields.io/github/downloads/hayase-app/ui/total?style=flat-square">
|
||||
</a>
|
||||
|
||||
</p>
|
||||
|
||||
## **About**
|
||||
A pure JS BitTorrent streaming environment, with a built-in list manager. Imagine qBit + Taiga + MPV, all in a single package, but streamed real-time. Completly ad free with no tracking/data collection.
|
||||
https://github.com/user-attachments/assets/bbbe2966-b773-4ebb-9d69-08248ae77ae4
|
||||
|
||||
This app is meant to feel look, work and perform like a streaming website/app, while providing all the advantages of torrenting, like file downloads, higher download speeds, better video quality and quicker releases.
|
||||
<p align="center">Formerly known as Miru.</p>
|
||||
|
||||
Unlike qBit's sequential, seeking into undownloaded data will prioritise downloading that data, instead of flat out closing MPV.
|
||||
## **Features**
|
||||
### **Anime:**
|
||||
- full AniList integration
|
||||
- filter anime by name, genre, season, year, format, status
|
||||
- view anime on your planning and watching list
|
||||
- add and remove anime from your planning list
|
||||
- automatically mark episodes as complete as you watch them
|
||||
- view trailers/previews for anime
|
||||
- score anime
|
||||
- view anime relations
|
||||
- automatically find torrents for desired episodes
|
||||
- automatically detect what anime a torrent is
|
||||
- view latest releases on any custom RSS
|
||||
- airing schedule
|
||||
- find anime by image [just paste an image into the app]
|
||||
### **Video:**
|
||||
- full subtitle support
|
||||
- support for softcoded subtitles
|
||||
- support for external subtitle files
|
||||
- support for VTT, SSA, ASS, SUB, TXT subtitles
|
||||
- subtitle display in PiP
|
||||
- keybinds for all functions:
|
||||
- **,** - seek 1 frame backwards
|
||||
- **.** - seek 1 frame forwards
|
||||
- **S** - seek forwards 90 seconds [skip opening]
|
||||
- **R** - seek backwards 90 seconds
|
||||
- **→** - seek forwards 2 seconds
|
||||
- **←** - seek backwards 2 seconds
|
||||
- **↑** - increase volume
|
||||
- **↓** - decrease volume
|
||||
- **M** - mute volume
|
||||
- **C** - cycle through subtitle tracks
|
||||
- **N** - play next episode [if available]
|
||||
- **F** - toggle fullscreen
|
||||
- **P** - toggle picture in picture
|
||||
- **[** - increase playback speed
|
||||
- **]** - decrease playback speed
|
||||
- **\\** - reset playback speed to 1
|
||||
- **I** - view video stats for nerds
|
||||
- **`** - open keybinds UI
|
||||
- editable keybinds **`** allows drag dropping any key
|
||||
- miniplayer
|
||||
- media session display
|
||||
- media keys support
|
||||
- Discord rich pressence
|
||||
- preview thumbnails
|
||||
- pause on lost focus
|
||||
- autoplay next episode
|
||||
- multi-audio support
|
||||
- torrent download progress on the seek bar
|
||||
### **Torrent:**
|
||||
- select downloads folder
|
||||
- specify download/upload speeds
|
||||
- support for most popular BEP's
|
||||
- support for custom torrent RSS feeds for latest releases
|
||||
- change what resolution to find torrents in
|
||||
- stream real-time with no waiting for downloads
|
||||
## ✨ About
|
||||
|
||||
## **Linux Installation**
|
||||
**Hayase** is a modern app for streaming anime torrents in real-time, with no waiting for downloads to finish.
|
||||
|
||||
### Arch
|
||||
It is meant to feel look, work and perform like a premium streaming service, but with all the benefits of both streaming and torrenting, like file downloads, higher download speeds, better video quality, instant access to new releases, and features you won’t find on typical streaming sites.
|
||||
|
||||
If you use paru:
|
||||
```bash
|
||||
paru -S miru-bin
|
||||
```
|
||||
## 🌟 Highlights
|
||||
|
||||
If you use yay:
|
||||
* 📚 **Anime list integration:** Sync with AniList, Kitsu, ~~MAL~~, or use local storage.
|
||||
* ⚡ **Instant torrent streaming:** Watch as you download, with extension support for custom sources.
|
||||
* 📴 **Offline viewing:** Enjoy already-downloaded torrents anytime.
|
||||
* 🎬 **Advanced video player:** Full support for all subtitle formats, softcoded and external tracks, and more.
|
||||
* 👥 **Social features:** Connect with friends, join discussions, and watch together.
|
||||
|
||||
```bash
|
||||
yay -S miru-bin
|
||||
```
|
||||
***
|
||||
|
||||
### Debian/Ubuntu
|
||||
## 🏆 Features
|
||||
|
||||
- Download the `linux-Miru-version.deb` from the [releases](https://github.com/ThaUnknown/miru/releases/latest) page.
|
||||
- Install the deb file with package manager.
|
||||
```bash
|
||||
apt install linux-Miru-*.deb
|
||||
```
|
||||
### 🎞️ Anime Management
|
||||
|
||||
* Effortlessly manage your anime list with support for AniList, Kitsu, ~~MAL~~, and local storage.
|
||||
* Automatically track watched episodes.
|
||||
* See what you’re behind on, and discover sequels you’ve missed.
|
||||
* Keep up to date and browse upcoming episodes with airing calendars.
|
||||
* Edit entries (score, progress, status, favorite, etc.) even while offline.
|
||||
* Search by image, name, genre, year, season, and more.
|
||||
* View trailers, OP/ED themes, and detailed episode lists with thumbnails, descriptions and filler indicators.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/viewanime.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### 🤝 Social & Community
|
||||
|
||||
* Instantly see which friends are following an anime or episode.
|
||||
* See friends profiles and watch progress in the episodes list.
|
||||
* Track your friends’ watch progress in real time.
|
||||
* Join episode discussions and forums, even offline.
|
||||
* Global app chat.
|
||||
* Discord rich pressence.
|
||||
* Host or join Watch Together lobbies with synced playback and chat.
|
||||
|
||||
### 🎥 Video Experience
|
||||
|
||||
* Full subtitle support.
|
||||
* Softcoded, external and manually added subtitles.
|
||||
* VTT, SSA, ASS, SUB, TXT formats.
|
||||
* Subtitle display in PiP.
|
||||
* Override default dialog styles.
|
||||
* Override default fonts for Asian languages \[fix for bad torrents].
|
||||
* Picture In Picture.
|
||||
* PiP on lost visiblity.
|
||||
* Pause on lost visibility.
|
||||
* Specify preferred language for video and subtitle tracks.
|
||||
* Remove video compression artifacts.
|
||||
* Miniplayer.
|
||||
* Media Session display.
|
||||
* Media Keys support.
|
||||
* Discord rich pressence.
|
||||
* Seek and preview thumbnails.
|
||||
* Autoplay next episode.
|
||||
* Skip intro/outro, manually or automatically.
|
||||
* Skip filler episodes automatically.
|
||||
* Change playback rate.
|
||||
* Browse playlist.
|
||||
* Multi-track support for video, audio and subtitles.
|
||||
* Editable keybinds for all player functions.
|
||||
* Exponential volume \[better control at lower volumes].
|
||||
* External player support.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/videoplayer.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### 🧲 Torrents
|
||||
|
||||
* Stream torrents instantly, no waiting for full downloads.
|
||||
* Download only what you need for playback.
|
||||
* Choose your downloads folder and set speed/connection limits.
|
||||
* Support for custom extensions, sources, and trackers.
|
||||
* Specify download/upload speeds, ports and connections.
|
||||
* Support for most popular BEP's.
|
||||
* Persist torrents, cache progress, and rescan instantly.
|
||||
* View detailed torrent and peer info.
|
||||
* Batch downloads.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/modal.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
### ⚙️ Performance & Security
|
||||
|
||||
* Highly secure.
|
||||
* Operates on a Zero Trust model.
|
||||
* Protects data integrity and settings from external attacks.
|
||||
* Protects from attacks via malicious torrent extensions.
|
||||
* Uses up to date best security practices for native apps.
|
||||
* Insanely performant.
|
||||
* Fully hardware/GPU accelerated.
|
||||
* GPU based shaders, animations and paints.
|
||||
* Very low resource utilisation.
|
||||
* Only loads code as required by user navigation.
|
||||
* Unloads code not in use.
|
||||
* Doesn't render unnecessary UI updates.
|
||||
* Disables rendering when not visible.
|
||||
* Doesn't render any UI when immersed in fullscreen video.
|
||||
* Minimise to tray.
|
||||
* In-app changelog.
|
||||
* Custom themes.
|
||||
|
||||
<p align="center">
|
||||
<img src='https://raw.githubusercontent.com/hayase-app/website/main/static/simple.webp' width='400px'></img>
|
||||
</p>
|
||||
|
||||
## **Building and Development**
|
||||
|
||||
Dependencies:
|
||||
- Node 16 or above
|
||||
- PNPM
|
||||
Requires `Node 20` or above and `pnpm`. VSCode is recommended.
|
||||
|
||||
To build/develop, in the root folder of the repo you need to first run:
|
||||
```bash
|
||||
pnpm install
|
||||
```js
|
||||
pnpm i // to install
|
||||
pnpm run dev // to develop
|
||||
pnpm run build // to build
|
||||
pnpm run sync && pnpm run lint && pnpm run gql:check && pnpm run check // to test
|
||||
```
|
||||
|
||||
To build for your OS just run:
|
||||
```bash
|
||||
pnpm run build
|
||||
```
|
||||
***
|
||||
|
||||
To run the development server run:
|
||||
```bash
|
||||
pnpm start
|
||||
```
|
||||
<h2 align="center">
|
||||
<b>Enjoy streaming anime the way it should be! 🍿</b>
|
||||
</h2>
|
||||
|
|
|
|||
13
SECURITY.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Security Policy
|
||||
|
||||
If you discover a security issue, please bring it to our attention right away!
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please **DO NOT** file a public issue to report a security vulberability, instead send your report privately to **casistaken@gmail.com**. This will help ensure that any vulnerabilities that are found can be [disclosed responsibly](https://en.wikipedia.org/wiki/Responsible_disclosure) to any affected parties.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Project versions that are currently being supported with security updates vary per project.
|
||||
Please see specific project repositories for details.
|
||||
If nothing is specified, only the latest major versions are supported.
|
||||
31
SUPPORT.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Support and Help
|
||||
|
||||
Need help getting started or using a project? Here's how.
|
||||
|
||||
## How to get help
|
||||
|
||||
Generally, we do not use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on [Stack Overflow](https://stackoverflow.com) instead. By doing so, you are more likely to quickly solve your problem, and you will allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.
|
||||
|
||||
Please seek support in the following ways:
|
||||
|
||||
1. :book: **Read the documentation and other guides** for the project to see if you can figure it out on your own. These should be located in a root `docs/` directory. If there is an example project, explore that to learn how it works to see if you can answer your question.
|
||||
|
||||
2. :bulb: **Search for answers and ask questions on [Stack Overflow](https://stackoverflow.com).** This is the most appropriate place for debugging issues specific to your use of the project, or figuring out how to use the project in a specific way.
|
||||
|
||||
3. :memo: As a **last resort**, you may open an issue on GitHub to ask for help. However, please clearly explain what you are trying to do, and list what you have already attempted to solve the problem. Provide code samples, but **do not** attach your entire project for someone else to debug. Review our [contributing guidelines](./CONTRIBUTING.md).
|
||||
|
||||
## What NOT to do
|
||||
|
||||
Please **do not** do any the following:
|
||||
|
||||
1. :x: Do not reach out to the author or contributor on Twitter (or other social media) by tweeting or sending a direct message.
|
||||
|
||||
2. :x: Do not email the author or contributor.
|
||||
|
||||
3. :x: Do not open duplicate issues or litter an existing issue with +1's.
|
||||
|
||||
These are not appropriate avenues for seeking help or support with an open-source project. Please follow the guidelines in the previous section. Public questions get public answers, which benefits everyone in the community. ✌️
|
||||
|
||||
## Customer Support
|
||||
|
||||
I do not provide any sort of "customer support" for open-source projects. However, I am available for hire.
|
||||
BIN
assets/Molot-webfont.woff
Normal file
5
assets/logo.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="430" height="430" viewBox="0 0 113.50625 113.50625" fill="currentColor">
|
||||
<path d="M89.693749 72.830671v-19.84375l-18.520833-10.31875-14.552084-8.202083-33.072916 18.520833v19.84375l33.072916-18.520833ZM23.547916 47.695254l23.547916-13.229167L23.547916 21.23692Z" />
|
||||
<path d="m23.547916 77.990044 33.072916 18.52084 33.072917-18.52084-18.520833-10.318746-14.552084 8.202083-14.552083-8.202083S23.547916 78.122337 23.547916 77.990044z" />
|
||||
<path d="m56.620832 59.601503 10.054167 5.55625v.000001l-10.054167 5.55625-10.054166-5.55625v-.000001z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 617 B |
5
assets/logo_cropped.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="250" height="284.50003" viewBox="0 0 66.145833 75.273966" fill="currentColor">
|
||||
<path d="M66.145833 51.593751v-19.84375c-11.042319-6.141466-22.077514-12.295645-33.072917-18.520833C22.048611 19.402779 11.024305 25.57639 0 31.750001v19.84375c11.024305-6.173611 22.048611-12.347222 33.072916-18.520833 11.024306 6.173611 22.048611 12.347222 33.072917 18.520833ZM0 26.458334c7.849305-4.409722 15.698611-8.819445 23.547916-13.229167C15.698611 8.819445 7.849305 4.409722 0 0v26.458334Z"/>
|
||||
<path d="M0 56.753124c11.024305 6.173613 22.048611 12.347227 33.072916 18.52084 11.024306-6.173613 22.048611-12.347227 33.072917-18.52084L47.625 46.434378c-4.850695 2.734028-9.701389 5.468055-14.552084 8.202083-4.850694-2.734028-9.701389-5.468055-14.552083-8.202083C12.352694 49.88272 6.229007 53.417285 0 56.753124Z"/>
|
||||
<path d="M33.072916 38.364583c3.351389 1.852084 6.70278 3.704166 10.054167 5.556251-3.35139 1.852082-6.702778 3.704167-10.054167 5.55625-3.351388-1.852084-6.702779-3.704166-10.054166-5.556251 3.35139-1.852082 6.702777-3.704167 10.054166-5.55625z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/twemoji.woff2
Normal file
|
|
@ -1,14 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
build/icon.icns
BIN
build/icon.png
|
Before Width: | Height: | Size: 14 KiB |
|
|
@ -1,30 +0,0 @@
|
|||
const { notarize } = require('electron-notarize')
|
||||
const path = require('path')
|
||||
|
||||
exports.default = async function notarizing (context) {
|
||||
if (context.electronPlatformName !== 'darwin' || process.env.CSC_IDENTITY_AUTO_DISCOVERY === 'false') {
|
||||
console.log('Skipping notarization')
|
||||
return
|
||||
}
|
||||
console.log('Notarizing...')
|
||||
|
||||
const appBundleId = context.packager.appInfo.info._configuration.appId
|
||||
const appName = context.packager.appInfo.productFilename
|
||||
const appPath = path.normalize(path.join(context.appOutDir, `${appName}.app`))
|
||||
const appleId = process.env.APPLE_ID
|
||||
const appleIdPassword = process.env.APPLE_ID_PASSWORD
|
||||
if (!appleId) {
|
||||
console.warn('Not notarizing: Missing APPLE_ID environment variable')
|
||||
return
|
||||
}
|
||||
if (!appleIdPassword) {
|
||||
console.warn('Not notarizing: Missing APPLE_ID_PASSWORD environment variable')
|
||||
return
|
||||
}
|
||||
return notarize({
|
||||
appBundleId,
|
||||
appPath,
|
||||
appleId,
|
||||
appleIdPassword
|
||||
})
|
||||
}
|
||||
14
components.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$schema": "https://shadcn-svelte.com/schema.json",
|
||||
"style": "new-york",
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.ts",
|
||||
"css": "src\\app.css",
|
||||
"baseColor": "zinc"
|
||||
},
|
||||
"aliases": {
|
||||
"components": "$lib/components",
|
||||
"utils": "$lib/utils"
|
||||
},
|
||||
"typescript": true
|
||||
}
|
||||
46
docs/faq.md
|
|
@ -1,46 +0,0 @@
|
|||
## **Won't this kill swarm health?**
|
||||
Depends. On average no. The app is always seeding 1 torrent as long as it's open. Additionally the upload speed is forced to be x1.5 that of the download speed. Those 2 things combined will already make this app seed more than the average leecher which removes the torrent the moment it's downloaded.
|
||||
|
||||
## **Can I close the miniplayer?**
|
||||
No. See above. The miniplayer provides feedback that something is happening in the background. Closing it would make the user feel like the app is lagging [because it's maxing out your internet in the background by torrenting] when nothing is happening.
|
||||
|
||||
## **Can I reduce the upload speed?**
|
||||
No. See above. This app is also meant to seed the torrents the user downloads, if you want freeleech go to some private tracker.
|
||||
|
||||
## **Is this safe?**
|
||||
I recommend you read the [guide about basics of piracy.](https://thewiki.moe/guides/torrenting)
|
||||
|
||||
## **Will this replace streaming sites?**
|
||||
Not really. The underlying source of video are still torrents, which aren't always seeded, so anime that's a few years old might not play back smoothly.
|
||||
|
||||
## **Can I log in with MAL?**
|
||||
No. You can however migrate MAL to AL, see [this guide.](https://anilist.co/forum/thread/3393)
|
||||
|
||||
## **Why is anime X not playing?**
|
||||
One of four reasons:
|
||||
- the anime isn't seeded
|
||||
- your download speed isn't fast enough
|
||||
- your ISP blocks Nyaa, see [this tutorial](https://thewiki.moe/en/tutorials/unblock) for a fix
|
||||
- the app couldn't find a matching torrent for the anime
|
||||
- you can POTENTIALLY fix this by disabling `Trusted Only` in `RSS Settings`, but this might cause false-positives when finding torrents, so I'd also disable `Auto-play torrents`, and pick torrents manually.
|
||||
|
||||
## **Will you make an android version?**
|
||||
No. This app cannot be ported to android in any way.
|
||||
|
||||
## **Can I play my own torrents?**
|
||||
Yes. For the home menu you can specify a different RSS feed to check when the app looks for new releases. Additionally you can just paste a torrent file/magnet link anywhere when using the app, and it will auto-detect what anime is playing.
|
||||
|
||||
## **Can I change what tracker torrents are found from?**
|
||||
Not really. No other tracker has the kind of API/search functionality that Nyaa does, which the app uses to the fullest extent to make sure it finds the torrents it's looking for without false-positives.
|
||||
|
||||
## **How is this different from sequential qBit?**
|
||||
Unlike qBit's sequential, this will prioritise downloading torrent pieces directly needed for playback, which with the user seeking isn't always just sequential.
|
||||
|
||||
## **Why Electron?**
|
||||
Electron has node.js integration, which can use TCP/UDP, that is the only reason. Browsers can't access TCP/UDP which means they can't access the global BT swarm.
|
||||
> Can't you make this just use WebRTC?
|
||||
|
||||
Yes. A BitTorrent implementation which uses WebRTC exists, but it's not yet adopted by any clients, and libtorrent [the library which qBit and others use] is still working/just added support for WebRTC, which means there's no swarm. This will hopefully change in the future.
|
||||
|
||||
## **Where codec support?**
|
||||
This uses the browser's built in video player, which uses a cut down version of FFMPEG, which lacks a support for a LOT of containers and codecs because of licensing. Since Electron is just Chromium IN THEORY it is possible to re-compile FFMPEG with support for more containers and codecs, but people seem to be going out of their way to make sure you can't find how to do that. PR pls?
|
||||
BIN
docs/logo.png
|
Before Width: | Height: | Size: 14 KiB |
BIN
docs/show.gif
|
Before Width: | Height: | Size: 7 MiB |
27
eslint.config.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import config from 'eslint-config-standard-universal'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
import svelteConfig from './svelte.config.js'
|
||||
|
||||
export default tseslint.config(
|
||||
...config(),
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
svelteConfig
|
||||
}
|
||||
},
|
||||
ignores: ['build/', '.svelte-kit/', 'node_modules/'],
|
||||
rules: {
|
||||
'@typescript-eslint/prefer-nullish-coalescing': [
|
||||
'error',
|
||||
{
|
||||
ignoreConditionalTests: true,
|
||||
ignoreMixedLogicalExpressions: false,
|
||||
ignorePrimitives: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
16
generateALIntrospection.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { writeFileSync } from 'node:fs'
|
||||
|
||||
import { getIntrospectedSchema, minifyIntrospectionQuery } from '@urql/introspection'
|
||||
import { getIntrospectionQuery, type IntrospectionQuery } from 'graphql'
|
||||
|
||||
const res = await fetch('https://graphql.anilist.co', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
variables: {},
|
||||
query: getIntrospectionQuery({ descriptions: false })
|
||||
})
|
||||
})
|
||||
const { data } = (await res.json()) as { data: IntrospectionQuery }
|
||||
const minified = minifyIntrospectionQuery(getIntrospectedSchema(data), { includeScalars: false, includeEnums: true, includeInputs: true, includeDirectives: true })
|
||||
writeFileSync('./src/lib/modules/anilist/schema.json', JSON.stringify(minified))
|
||||
230
package.json
|
|
@ -1,131 +1,101 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "2.10.3",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"main": "src/index.js",
|
||||
"homepage": "https://github.com/ThaUnknown/miru#readme",
|
||||
"scripts": {
|
||||
"start": "SET NODE_ENV=development & concurrently \"pnpm run web:watch\" \"pnpm run electron:start\"",
|
||||
"web:watch": "vite",
|
||||
"electron:start": "electron src",
|
||||
"build": "vite build && electron-builder",
|
||||
"publish": "vite build && electron-builder -p always"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||
"builtin-modules": "^3.2.0",
|
||||
"concurrently": "^7.0.0",
|
||||
"electron": "^18.2.1",
|
||||
"electron-builder": "^22.14.13",
|
||||
"electron-notarize": "^1.1.1",
|
||||
"svelte": "^3.47.0",
|
||||
"vite": "^3.0.0",
|
||||
"vite-plugin-commonjs-externals": "^0.1.1"
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"bundle.js",
|
||||
"bundle.map.js"
|
||||
],
|
||||
"env": [
|
||||
"browser",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"electronDownload": {
|
||||
"mirror": "https://github.com/aa910d571134/feb7c2e1a10f/releases/download/",
|
||||
"version": "18.2.1",
|
||||
"customDir": "2ffc48f0b43f"
|
||||
},
|
||||
"protocols": {
|
||||
"name": "miru",
|
||||
"schemes": [
|
||||
"miru"
|
||||
]
|
||||
},
|
||||
"publish": [
|
||||
{
|
||||
"provider": "github",
|
||||
"owner": "ThaUnknown",
|
||||
"repo": "miru"
|
||||
}
|
||||
],
|
||||
"afterSign": "./build/notarize.js",
|
||||
"appId": "com.github.thaunknown.miru",
|
||||
"productName": "Miru",
|
||||
"files": [
|
||||
"src/*",
|
||||
"src/main/*",
|
||||
"src/renderer/dist/**/*"
|
||||
],
|
||||
"mac": {
|
||||
"artifactName": "${os}-${name}-${version}.${ext}",
|
||||
"category": "public.app-category.video",
|
||||
"icon": "build/icon.icns",
|
||||
"target": [
|
||||
{
|
||||
"arch": "x64",
|
||||
"target": "dmg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"artifactName": "${os}-${name}-${version}.${ext}",
|
||||
"target": "nsis"
|
||||
},
|
||||
"linux": {
|
||||
"artifactName": "${os}-${arch}-${name}-${version}.${ext}",
|
||||
"category": "Video;Anime",
|
||||
"description": "Bittorrent streaming software for cats",
|
||||
"desktop": {
|
||||
"Name": "Miru",
|
||||
"Comment": "Bittorrent streaming software for cats",
|
||||
"Keywords": "miru;anime",
|
||||
"Type": "Application",
|
||||
"MimeType": "x-scheme-handler/miru;"
|
||||
},
|
||||
"target": [
|
||||
{
|
||||
"arch": "x64",
|
||||
"target": "AppImage"
|
||||
},
|
||||
{
|
||||
"arch": "x64",
|
||||
"target": "deb"
|
||||
},
|
||||
{
|
||||
"arch": "arm64",
|
||||
"target": "AppImage"
|
||||
},
|
||||
{
|
||||
"arch": "arm64",
|
||||
"target": "deb"
|
||||
}
|
||||
],
|
||||
"mimeTypes": [
|
||||
"x-scheme-handler/miru"
|
||||
]
|
||||
},
|
||||
"nsis": {
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"oneClick": false
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"anitomyscript": "^2.0.4",
|
||||
"browser-event-target-emitter": "^1.0.0",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"electron-log": "^4.4.6",
|
||||
"electron-updater": "^4.6.5",
|
||||
"jassub": "^1.1.8",
|
||||
"matroska-subtitles": "github:ThaUnknown/matroska-subtitles#patch",
|
||||
"mime": "^3.0.0",
|
||||
"pump": "^3.0.0",
|
||||
"quartermoon": "^1.2.1",
|
||||
"range-parser": "^1.2.1",
|
||||
"svelte-keybinds": "^1.0.4",
|
||||
"svelte-miniplayer": "^1.0.2",
|
||||
"webtorrent": "^1.8.14"
|
||||
}
|
||||
}
|
||||
"name": "ui",
|
||||
"version": "6.4.159",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.15.5",
|
||||
"scripts": {
|
||||
"dev": "vite dev --open",
|
||||
"build": "vite build && scopy ./build/index.html ./build/offline.html",
|
||||
"preview": "vite preview",
|
||||
"sync": "svelte-kit sync",
|
||||
"check": "svelte-check --threshold error --tsconfig ./tsconfig.web.json",
|
||||
"check:watch": "svelte-check -threshold error --tsconfig ./tsconfig.web.json --watch",
|
||||
"test": "pnpm run sync && pnpm run lint && pnpm run gql:check && pnpm run check",
|
||||
"lint": "eslint --quiet -c eslint.config.js",
|
||||
"lint:fix": "eslint --quiet -c eslint.config.js --fix",
|
||||
"gql:turbo": "node ./node_modules/gql.tada/bin/cli.js turbo -c ./tsconfig.web.json",
|
||||
"gql:check": "node ./node_modules/gql.tada/bin/cli.js check -c ./tsconfig.web.json",
|
||||
"gql:generate": "node --experimental-strip-types ./generateALIntrospection.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gql.tada/svelte-support": "^1.0.1",
|
||||
"@sveltejs/adapter-static": "^3.0.9",
|
||||
"@sveltejs/kit": "^2.37.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@urql/introspection": "^1.2.1",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"bits-ui": "^0.22.0",
|
||||
"cmdk-sv": "^0.0.19",
|
||||
"eslint-config-standard-universal": "^1.0.9",
|
||||
"gql.tada": "^1.8.13",
|
||||
"hayase-extensions": "github:hayase-app/extensions",
|
||||
"jassub": "^1.8.6",
|
||||
"jiti": "^2.5.1",
|
||||
"ms": "^2.1.3",
|
||||
"native": "github:hayase-app/native",
|
||||
"rollup-plugin-license": "^3.6.0",
|
||||
"simple-copy": "^2.2.1",
|
||||
"svelte": "^4.2.19",
|
||||
"svelte-check": "^4.3.1",
|
||||
"svelte-radix": "^1.1.1",
|
||||
"svelte-sonner": "^0.3.28",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "^5.9.2",
|
||||
"vaul-svelte": "^0.3.2",
|
||||
"vite": "^5.4.11",
|
||||
"vite-plugin-devtools-json": "^1.0.0",
|
||||
"vite-plugin-static-copy": "^3.1.2"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@cloudflare/speedtest": "^1.6.0",
|
||||
"@dagrejs/dagre": "^1.1.5",
|
||||
"@fontsource-variable/nunito": "^5.2.6",
|
||||
"@fontsource/geist-mono": "^5.2.6",
|
||||
"@prgm/sveltekit-progress-bar": "2.0.0",
|
||||
"@thaunknown/web-irc": "^1.0.3",
|
||||
"@urql/core": "^6.0.1",
|
||||
"@urql/exchange-auth": "^3.0.0",
|
||||
"@urql/exchange-graphcache": "^8.1.0",
|
||||
"@urql/exchange-refocus": "^2.0.0",
|
||||
"@urql/exchange-request-policy": "^2.0.0",
|
||||
"@urql/exchange-retry": "^2.0.0",
|
||||
"@urql/svelte": "^5.0.0",
|
||||
"@xyflow/svelte": "^0.1.36",
|
||||
"abslink": "^1.1.2",
|
||||
"anitomyscript": "github:thaunknown/anitomyscript",
|
||||
"bittorrent-tracker": "10.0.12",
|
||||
"bottleneck": "^2.19.5",
|
||||
"clsx": "^2.1.1",
|
||||
"cobe": "0.6.3",
|
||||
"date-fns": "^4.1.0",
|
||||
"debug": "^4.4.1",
|
||||
"doc999tor-fast-geoip": "^1.1.360",
|
||||
"dompurify": "^3.2.6",
|
||||
"events": "^3.3.0",
|
||||
"idb-keyval": "^6.2.2",
|
||||
"js-levenshtein": "^1.1.6",
|
||||
"lucide-svelte": "^0.542.0",
|
||||
"marked": "^16.2.1",
|
||||
"overtype": "^1.2.3",
|
||||
"p2pt": "github:ThaUnknown/p2pt#modernise",
|
||||
"semver": "^7.7.2",
|
||||
"simple-store-svelte": "^1.0.6",
|
||||
"svelte-headless-table": "^0.18.3",
|
||||
"svelte-keybinds": "^1.0.9",
|
||||
"svelte-persisted-store": "^0.12.0",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"tailwind-variants": "^1.0.0",
|
||||
"uint8-util": "^2.2.5",
|
||||
"urql": "^5.0.1",
|
||||
"video-deband": "^1.0.9",
|
||||
"wonka": "^6.3.5",
|
||||
"workbox-core": "^7.3.0",
|
||||
"workbox-precaching": "^7.3.0",
|
||||
"workbox-routing": "^7.3.0",
|
||||
"workbox-strategies": "^7.3.0"
|
||||
}
|
||||
}
|
||||
5835
pnpm-lock.yaml
Normal file
6
postcss.config.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
}
|
||||
496
src/app.css
Normal file
|
|
@ -0,0 +1,496 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
:root {
|
||||
color-scheme: only dark;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
||||
/* miniplayer thing, required to work with :hover */
|
||||
.paused-show {
|
||||
--padding-right: unset !important;
|
||||
--padding-left: unset !important;
|
||||
}
|
||||
|
||||
.custom-draggable {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
.custom-not-draggable {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.font-mono {
|
||||
font-family: "Geist Mono", ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace !important;
|
||||
}
|
||||
|
||||
.exclude-transition {
|
||||
view-transition-class: disabled;
|
||||
}
|
||||
|
||||
::view-transition-group(.disabled) {
|
||||
animation-duration: 0s !important;
|
||||
}
|
||||
|
||||
@supports not (overflow: clip) {
|
||||
.overflow-clip {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.overflow-x-clip {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.overflow-y-clip {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.text-contrast {
|
||||
--accessible-color: calc(((((var(--red) * 299) + (var(--green) * 587) + (var(--blue) * 114)) / 1000) - 128) * -1000);
|
||||
|
||||
color: rgb(var(--accessible-color),
|
||||
var(--accessible-color),
|
||||
var(--accessible-color));
|
||||
fill: rgb(var(--accessible-color),
|
||||
var(--accessible-color),
|
||||
var(--accessible-color));
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 240 10% 3.9%;
|
||||
|
||||
--muted: 240 4.8% 95.9%;
|
||||
--muted-foreground: 240 3.8% 46.1%;
|
||||
|
||||
--popover: 0 0% 100%;
|
||||
--popover-foreground: 240 10% 3.9%;
|
||||
|
||||
--card: 0 0% 100%;
|
||||
--card-foreground: 240 10% 3.9%;
|
||||
|
||||
--border: 240 5.9% 90%;
|
||||
--input: 240 5.9% 90%;
|
||||
|
||||
--primary: 240 5.9% 10%;
|
||||
--primary-foreground: 0 0% 98%;
|
||||
|
||||
--secondary: 240 4.8% 95.9%;
|
||||
--secondary-foreground: 240 5.9% 10%;
|
||||
|
||||
--accent: 240 4.8% 95.9%;
|
||||
--accent-foreground: 240 5.9% 10%;
|
||||
|
||||
--destructive: 0 72.2% 50.6%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
--ring: 240 10% 3.9%;
|
||||
|
||||
--radius: 0.5rem;
|
||||
|
||||
--custom: #fff;
|
||||
}
|
||||
|
||||
html.dark {
|
||||
--background: 240 10% 3.9%;
|
||||
--foreground: 0 0% 98%;
|
||||
|
||||
--muted: 240 3.7% 15.9%;
|
||||
--muted-foreground: 240 5% 64.9%;
|
||||
|
||||
--popover: 240 10% 3.9%;
|
||||
--popover-foreground: 0 0% 98%;
|
||||
|
||||
--card: 240 10% 3.9%;
|
||||
--card-foreground: 0 0% 98%;
|
||||
|
||||
--border: 240 3.7% 15.9%;
|
||||
--input: 240 3.7% 15.9%;
|
||||
|
||||
--primary: 0 0% 98%;
|
||||
--primary-foreground: 240 5.9% 10%;
|
||||
|
||||
--secondary: 240 3.7% 15.9%;
|
||||
--secondary-foreground: 0 0% 98%;
|
||||
|
||||
--accent: 240 3.7% 15.9%;
|
||||
--accent-foreground: 0 0% 98%;
|
||||
|
||||
--destructive: 0 62.8% 30.6%;
|
||||
--destructive-foreground: 0 0% 98%;
|
||||
|
||||
--ring: 240 4.9% 83.9%;
|
||||
|
||||
--custom: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
|
||||
/* @font-face {
|
||||
font-family: 'molotregular';
|
||||
src: url('/Molot-webfont-subset.woff') format('woff');
|
||||
} */
|
||||
|
||||
@font-face {
|
||||
font-family: "Twemoji";
|
||||
src: url("/twemoji-subset.woff2") format("woff2");
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100vh !important;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
scroll-behavior: smooth;
|
||||
overscroll-behavior: none;
|
||||
user-select: none;
|
||||
font-family: 'Nunito Variable'
|
||||
}
|
||||
|
||||
img,
|
||||
a {
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
#episodeListTarget:fullscreen {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes load-in {
|
||||
from {
|
||||
transform: translate3d(0, 1.2rem, 0) scale(0.95);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: none
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes hearbeat {
|
||||
from {
|
||||
transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(1) scaleY(1);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(var(--tw-translate-x), var(--tw-translate-y), 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(0.85) scaleY(0.85);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-bg {
|
||||
/* this is very hacky, but removes jagged edges */
|
||||
background: repeating-linear-gradient(40deg, #1114 0, #5554 1px, #5554 5px, #1114 6px, #1114 10px);
|
||||
/* repeating-linear-gradient(40deg, #5554 0 5px, #1114 0 10px); */
|
||||
}
|
||||
|
||||
*:focus-visible {
|
||||
outline: none;
|
||||
border-image: fill 0 linear-gradient(#8885, #8885);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.details span+span::before {
|
||||
content: '•';
|
||||
padding: 0 .3rem;
|
||||
font-size: .4rem;
|
||||
align-self: center;
|
||||
white-space: normal;
|
||||
color: #737373 !important;
|
||||
}
|
||||
|
||||
a[href],
|
||||
button,
|
||||
fieldset,
|
||||
input,
|
||||
optgroup,
|
||||
option,
|
||||
select,
|
||||
textarea,
|
||||
details,
|
||||
[tabindex],
|
||||
[contenteditable] {
|
||||
&:active:not([disabled], [type='range'], .no-scale, [tabindex="-1"]) {
|
||||
transition: all 0.1s ease-in-out;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
|
||||
.scale-parent:has(.no-scale:active) {
|
||||
transition: all 0.1s ease-in-out;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.overflow-y-scroll,
|
||||
.overflow-y-auto,
|
||||
.overflow-x-scroll,
|
||||
.overflow-x-auto,
|
||||
.overflow-auto,
|
||||
.overflow-scroll {
|
||||
will-change: scroll-position;
|
||||
}
|
||||
|
||||
.bg-url {
|
||||
background-image: var(--bg);
|
||||
}
|
||||
|
||||
|
||||
.sr-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.text-contrast-filter {
|
||||
filter: invert(1) grayscale(1) brightness(1.2) contrast(9000);
|
||||
mix-blend-mode: luminosity;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
background-color: inherit;
|
||||
background-clip: text;
|
||||
color: transparent
|
||||
}
|
||||
|
||||
.svelte-keybinds {
|
||||
background: black !important;
|
||||
}
|
||||
|
||||
.svelte-progress-bar {
|
||||
height: 2px !important;
|
||||
}
|
||||
|
||||
.svelte-progress-bar-leader {
|
||||
height: 4px !important;
|
||||
}
|
||||
|
||||
/* animated SVG icons */
|
||||
.animated-icon:not(:hover):not(:focus-visible):not(:active) .target-animated-icon {
|
||||
animation: none !important;
|
||||
transform: translateX(0) translateX(0) translateZ(0) translate(0, 0) !important;
|
||||
}
|
||||
|
||||
/* Backplate related things */
|
||||
|
||||
body {
|
||||
perspective: 3000px;
|
||||
}
|
||||
|
||||
#root:has(+ .backplate-spin) {
|
||||
animation: idle-spin 120s linear infinite;
|
||||
}
|
||||
|
||||
.backplate-spin {
|
||||
animation: idle-spin-y-flip 120s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
#root:has(+ .backplate-fly) {
|
||||
animation: idle-fly 0.8s forwards cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
#root {
|
||||
transition: transform 0.5s;
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(0deg) rotateX(0deg);
|
||||
}
|
||||
|
||||
::view-transition-old(my-root),
|
||||
::view-transition-new(my-root) {
|
||||
animation-duration: 200ms;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
|
||||
::view-transition-old(my-root) {
|
||||
animation-name: fade-out;
|
||||
}
|
||||
|
||||
::view-transition-new(my-root) {
|
||||
animation-name: fade-in;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
|
||||
::view-transition-group(*),
|
||||
::view-transition-old(*),
|
||||
::view-transition-new(*) {
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* @media (max-width: 768px) {
|
||||
|
||||
::view-transition-old(*),
|
||||
::view-transition-new(*) {
|
||||
animation-duration: 600ms !important;
|
||||
animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
|
||||
}
|
||||
|
||||
::view-transition-old(*) {
|
||||
animation-name: slide-out-left !important;
|
||||
}
|
||||
|
||||
::view-transition-new(*) {
|
||||
animation-name: slide-in-right !important;
|
||||
}
|
||||
} */
|
||||
|
||||
/* @keyframes slide-in-right {
|
||||
from {
|
||||
transform: translateX(40%);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slide-out-left {
|
||||
from {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-10%);
|
||||
}
|
||||
} */
|
||||
|
||||
@keyframes fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@keyframes idle-fly {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(0deg) rotateX(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes idle-spin {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(180deg) rotateX(15deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(360deg) rotateX(-15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes idle-spin-y-flip {
|
||||
0% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(-180deg) rotateX(15deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(0deg) rotateX(-15deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: perspective(100vw) translate3d(0, 0, -66vw) rotateY(180deg) rotateX(15deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes marquee {
|
||||
from {
|
||||
transform: translateX(-30%);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(-130%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes bg-grid-animate {
|
||||
from {
|
||||
background-position: 0 100%;
|
||||
}
|
||||
|
||||
to {
|
||||
background-position: 100% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-marquee {
|
||||
animation: marquee 80s infinite linear;
|
||||
}
|
||||
|
||||
.bg-striped {
|
||||
background: repeating-linear-gradient(45deg,
|
||||
#202020,
|
||||
#202020 6px,
|
||||
#2a2a2a 6px,
|
||||
#2a2a2a 12px);
|
||||
background-attachment: fixed;
|
||||
background-size: 119px;
|
||||
}
|
||||
|
||||
.bg-striped-muted {
|
||||
background: repeating-linear-gradient(45deg,
|
||||
#1e1e1e,
|
||||
#1e1e1e 6px,
|
||||
#161616 6px,
|
||||
#161616 12px);
|
||||
background-attachment: fixed;
|
||||
background-size: 119px;
|
||||
}
|
||||
|
||||
/* .font-molot {
|
||||
font-family: 'molotregular';
|
||||
} */
|
||||
|
||||
.font-twemoji {
|
||||
font-family: 'Twemoji';
|
||||
}
|
||||
|
||||
.backface-visible {
|
||||
backface-visibility: visible;
|
||||
}
|
||||
|
||||
.backface-hidden {
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.preserve-3d {
|
||||
transform-style: preserve-3d;
|
||||
}
|
||||
55
src/app.d.ts
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// See https://kit.svelte.dev/docs/types#app
|
||||
import type { Search } from '$lib/modules/anilist/queries'
|
||||
import type { VariablesOf } from 'gql.tada'
|
||||
import type { CompositionEventHandler } from 'svelte/elements'
|
||||
|
||||
export interface Track {
|
||||
selected: boolean
|
||||
enabled: boolean
|
||||
id: string
|
||||
kind: string
|
||||
label: string
|
||||
language: string
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
|
||||
interface PageState {
|
||||
search?: VariablesOf<typeof Search>
|
||||
image?: File | string
|
||||
}
|
||||
// interface Platform {}
|
||||
}
|
||||
|
||||
interface HTMLMediaElement {
|
||||
videoTracks?: Track[]
|
||||
audioTracks?: Track[]
|
||||
}
|
||||
|
||||
interface ScreenOrientation {
|
||||
lock: (orientation: 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary') => Promise<void>
|
||||
}
|
||||
|
||||
interface Navigator {
|
||||
userAgentData?: {
|
||||
getHighEntropyValues?: (keys: string[]) => Promise<Record<string, string>>
|
||||
}
|
||||
}
|
||||
|
||||
declare namespace svelteHTML {
|
||||
interface HTMLAttributes<T> {
|
||||
'on:navigate'?: CompositionEventHandler<T>
|
||||
}
|
||||
}
|
||||
|
||||
// declare module '*.svelte' {
|
||||
// export default SvelteComponentTyped
|
||||
// }
|
||||
}
|
||||
|
||||
export {}
|
||||
17
src/app.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!doctype html>
|
||||
<html lang="en" class="dark bg-black" style="color-scheme: dark;">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Hayase</title>
|
||||
<link rel="preconnect" href="https://graphql.anilist.co/">
|
||||
<link rel="preconnect" href="https://www.youtube-nocookie.com">
|
||||
<link rel="icon" href="%sveltekit.assets%/logo_white_fit.svg" />
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="off" class="!bg-black !relative" data-vaul-drawer-wrapper>
|
||||
%sveltekit.body%
|
||||
</body>
|
||||
|
||||
</html>
|
||||
171
src/index.js
|
|
@ -1,171 +0,0 @@
|
|||
const { app, BrowserWindow, protocol, shell, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
require('./main/misc.js')
|
||||
|
||||
if (process.defaultApp) {
|
||||
if (process.argv.length >= 2) {
|
||||
app.setAsDefaultProtocolClient('miru', process.execPath, [path.resolve(process.argv[1])])
|
||||
}
|
||||
} else {
|
||||
app.setAsDefaultProtocolClient('miru')
|
||||
}
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit()
|
||||
} else {
|
||||
app.on('second-instance', (event, commandLine, workingDirectory) => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||
mainWindow.focus()
|
||||
}
|
||||
// There's probably a better way to do this instead of a for loop and split[1][0]
|
||||
// but for now it works as a way to fix multiple OS's commandLine differences
|
||||
for (const line of commandLine) {
|
||||
handleProtocol(line)
|
||||
}
|
||||
})
|
||||
}
|
||||
app.on('open-url', (event, url) => {
|
||||
event.preventDefault()
|
||||
handleProtocol(url)
|
||||
})
|
||||
|
||||
// schema: miru://key/value
|
||||
const protocolMap = {
|
||||
auth: sendToken,
|
||||
anime: openAnime,
|
||||
w2g: joinLobby
|
||||
}
|
||||
const protocolRx = /miru:\/\/([a-z0-9]+)\/(.+)/i
|
||||
function handleProtocol (text) {
|
||||
const match = text.match(protocolRx)
|
||||
if (match) protocolMap[match[1]]?.(match[2])
|
||||
}
|
||||
|
||||
function joinLobby (link) {
|
||||
mainWindow.webContents.send('w2glink', link)
|
||||
}
|
||||
|
||||
function sendToken (line) {
|
||||
let token = line.split('access_token=')[1].split('&token_type')[0]
|
||||
if (token) {
|
||||
if (token.endsWith('/')) token = token.slice(0, -1)
|
||||
mainWindow.webContents.send('altoken', token)
|
||||
}
|
||||
}
|
||||
|
||||
function openAnime (id) {
|
||||
if (!isNaN(id)) mainWindow.webContents.send('open-anime', id)
|
||||
}
|
||||
|
||||
ipcMain.on('open', (event, url) => {
|
||||
shell.openExternal(url)
|
||||
})
|
||||
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
let mainWindow
|
||||
|
||||
function UpsertKeyValue (obj, keyToChange, value) {
|
||||
const keyToChangeLower = keyToChange.toLowerCase()
|
||||
for (const key of Object.keys(obj)) {
|
||||
if (key.toLowerCase() === keyToChangeLower) {
|
||||
// Reassign old key
|
||||
obj[key] = value
|
||||
// Done
|
||||
return
|
||||
}
|
||||
}
|
||||
// Insert at end instead
|
||||
obj[keyToChange] = value
|
||||
}
|
||||
|
||||
function createWindow () {
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1600,
|
||||
height: 900,
|
||||
frame: false,
|
||||
backgroundColor: '#191c20',
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
enableBlinkFeatures: 'FontAccess, AudioVideoTracks',
|
||||
backgroundThrottling: false,
|
||||
nodeIntegrationInWorker: true,
|
||||
preload: path.join(__dirname, '/preload.js')
|
||||
},
|
||||
icon: path.join(__dirname, '/renderer/public/logo.ico'),
|
||||
show: false
|
||||
})
|
||||
mainWindow.setMenuBarVisibility(false)
|
||||
|
||||
protocol.registerHttpProtocol('miru', (req, cb) => {
|
||||
const token = req.url.slice(7)
|
||||
if (process.env.NODE_ENV !== 'development ') {
|
||||
mainWindow.loadURL(path.join(__dirname, '/renderer/dist/index.html' + token))
|
||||
} else {
|
||||
mainWindow.loadURL('http://localhost:5173/' + token)
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
|
||||
const { responseHeaders } = details
|
||||
if (!responseHeaders['access-control-allow-credentials']) UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Origin', ['*'])
|
||||
if (!responseHeaders['access-control-allow-credentials']) UpsertKeyValue(responseHeaders, 'Access-Control-Allow-Headers', ['*'])
|
||||
const headers = { responseHeaders }
|
||||
callback(headers)
|
||||
})
|
||||
|
||||
// This block of code is intended for development purpose only.
|
||||
// Delete this entire block of code when you are ready to package the application.
|
||||
if (process.env.NODE_ENV !== 'development ') {
|
||||
// Load production build
|
||||
mainWindow.loadFile(path.join(__dirname, '/renderer/dist/index.html'))
|
||||
} else {
|
||||
// Load vite dev server page
|
||||
console.log('Development mode')
|
||||
mainWindow.loadURL('http://localhost:5173/')
|
||||
mainWindow.webContents.openDevTools()
|
||||
}
|
||||
|
||||
// Emitted when the window is closed.
|
||||
mainWindow.on('closed', () => {
|
||||
// Dereference the window object, usually you would store windows
|
||||
// in an array if your app supports multi windows, this is the time
|
||||
// when you should delete the corresponding element.
|
||||
mainWindow = null
|
||||
})
|
||||
|
||||
mainWindow.webContents.on('render-process-gone', (e, { reason }) => {
|
||||
if (reason === 'crashed') {
|
||||
app.relaunch()
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
// Emitted when the window is ready to be shown
|
||||
// This helps in showing the window gracefully.
|
||||
mainWindow.once('ready-to-show', () => {
|
||||
mainWindow.show()
|
||||
})
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.on('ready', createWindow)
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', () => {
|
||||
// On macOS it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
// On macOS it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (mainWindow === null) createWindow()
|
||||
})
|
||||
92
src/lib/components/Backplate.svelte
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<script lang='ts'>
|
||||
import { activityState, idleState, isPlaying, lockedState } from '$lib/modules/idle'
|
||||
import { settings } from '$lib/modules/settings'
|
||||
import { sleep } from '$lib/utils'
|
||||
|
||||
let plate: HTMLDivElement
|
||||
export let root: HTMLDivElement
|
||||
|
||||
let visibilityState: DocumentVisibilityState
|
||||
|
||||
let isAnimating = false
|
||||
let isSpinning = false
|
||||
let isFlying = false
|
||||
let showBackplate = false
|
||||
let timeout: number
|
||||
|
||||
// WE LOVE RACE CONDITIONS WOOOO YEAAH MY SANITY
|
||||
|
||||
async function start () {
|
||||
if (isAnimating) return
|
||||
isAnimating = true
|
||||
isFlying = true
|
||||
await sleep(800)
|
||||
if (!isFlying) return
|
||||
showBackplate = true
|
||||
isSpinning = true
|
||||
isFlying = false
|
||||
}
|
||||
|
||||
async function reset () {
|
||||
if (!isAnimating) return
|
||||
root.style.transform = getComputedStyle(root).transform
|
||||
plate.style.transform = getComputedStyle(plate).transform
|
||||
isSpinning = isFlying = false
|
||||
await sleep(10)
|
||||
root.style.transform = plate.style.transform = ''
|
||||
await sleep(490)
|
||||
isAnimating = showBackplate = isSpinning = isFlying = false
|
||||
}
|
||||
|
||||
$: active = $lockedState === 'locked' || visibilityState === 'hidden' || ($idleState === 'active' && $activityState === 'active') || $isPlaying
|
||||
|
||||
function checkIdleState (active: boolean, idleAnimation: boolean) {
|
||||
clearTimeout(timeout)
|
||||
if (!idleAnimation || active) return reset()
|
||||
|
||||
timeout = setTimeout(start, 120_000)
|
||||
}
|
||||
|
||||
$: checkIdleState(active, $settings.idleAnimation)
|
||||
|
||||
// MOLOT font was commented out in app.css since this feature was shelved
|
||||
</script>
|
||||
|
||||
<svelte:document bind:visibilityState />
|
||||
|
||||
<div class='preserve-3d absolute w-full h-full overflow-clip flip backface-hidden backplate bg-black flex-col justify-center pointer-events-none hidden'
|
||||
bind:this={plate}
|
||||
class:!flex={showBackplate}
|
||||
class:backplate-fly={isFlying}
|
||||
class:backplate-spin={isSpinning}>
|
||||
{#each Array.from({ length: 6 }) as _, i (i)}
|
||||
<div class='flex flex-row w-full font-molot font-bold leading-[0.8] ml-[--ml-offset] -rotate-12 text-white mt-64' style:--ml-offset='calc((-1 * {(i) * 600}px) - 10vw)'>
|
||||
{#each Array.from({ length: 4 }) as _, i (i)}
|
||||
<div>
|
||||
<div class='bg-striped'>
|
||||
<div class='text-[24rem] tracking-wide animate-marquee bg-black mix-blend-multiply'>
|
||||
HAYASE.06
|
||||
</div>
|
||||
</div>
|
||||
<div class='bg-striped-muted'>
|
||||
<div class='flex pl-1 animate-marquee bg-black mix-blend-multiply'>
|
||||
<div class='rounded py-2 px-3 mt-1 mb-[2.5px] mr-2 ml-1 text-black bg-white flex items-center leading-[0.9]'>
|
||||
TORRENTING<br />MADE<br />SIMPLE
|
||||
</div>
|
||||
<div class='text-[5.44rem] bg-striped-muted tracking-wider'>
|
||||
MAGNET://SIMPLICITY TOPS EVERYTHING
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.backplate {
|
||||
transition: transform 0.5s;
|
||||
transform: perspective(100vw) translate3d(0, 0, 0vw) rotateY(180deg) rotateX(0deg);
|
||||
}
|
||||
</style>
|
||||
111
src/lib/components/EntryEditor.svelte
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<script lang='ts'>
|
||||
import { PencilLine } from './icons/animated'
|
||||
|
||||
import { Button } from '$lib/components/ui/button'
|
||||
import * as Dialog from '$lib/components/ui/dialog'
|
||||
import { Input } from '$lib/components/ui/input'
|
||||
import * as Select from '$lib/components/ui/select'
|
||||
import { banner, cover, title, type Media } from '$lib/modules/anilist'
|
||||
import { list, progress as _progress, score as _score, repeat as _repeat, authAggregator, lists } from '$lib/modules/auth'
|
||||
import { dragScroll } from '$lib/modules/navigate'
|
||||
import { breakpoints } from '$lib/utils'
|
||||
|
||||
export let media: Media
|
||||
|
||||
const STATUS_LABELS = {
|
||||
CURRENT: 'Watching',
|
||||
PLANNING: 'Plan to Watch',
|
||||
COMPLETED: 'Completed',
|
||||
PAUSED: 'Paused',
|
||||
DROPPED: 'Dropped',
|
||||
REPEATING: 'Re-Watching'
|
||||
}
|
||||
|
||||
let status = { value: list(media) ?? 'CURRENT', label: STATUS_LABELS[list(media) ?? 'CURRENT'] }
|
||||
let score = { value: Number(_score(media) ?? 0), label: '' + (_score(media) ?? 0) }
|
||||
|
||||
let progress = _progress(media) ?? 0
|
||||
let repeat = _repeat(media) ?? 0
|
||||
|
||||
function deleteEntry () {
|
||||
authAggregator.delete(media)
|
||||
}
|
||||
|
||||
function saveEntry () {
|
||||
authAggregator.entry({ id: media.id, score: Number(score.value) * 10, repeat: Number(repeat), progress: Number(progress), status: status.value, lists: lists(media)?.filter(({ enabled }) => enabled).map(({ name }) => name) })
|
||||
}
|
||||
</script>
|
||||
|
||||
<Dialog.Root portal='#root'>
|
||||
<Dialog.Trigger let:builder asChild>
|
||||
<Button size='icon' class='rounded-l-none bg-custom-400 select:!bg-custom-700 shrink-0 text-contrast animated-icon' builders={[builder]}>
|
||||
<PencilLine class='size-4' />
|
||||
</Button>
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Content class='flex justify-center max-h-[80%] max-w-3xl p-0'>
|
||||
<div class='flex flex-col sm:flex-row w-full overflow-y-auto' use:dragScroll>
|
||||
<div class='relative w-full h-[150px] sm:w-[260px] sm:h-[400px] shrink-0'>
|
||||
<img alt='images' loading='lazy' decoding='async' class='object-cover w-full h-full sm:rounded-l-lg overflow-clip' style:background={media.coverImage?.color ?? '#000'} src={$breakpoints.sm ? cover(media) : banner(media)} />
|
||||
</div>
|
||||
<form class='flex flex-col w-full rounded-r-lg h-full'>
|
||||
<div class='pt-4 px-5 w-full'>
|
||||
<h3 class='text-xl leading-6 font-semibold z-30 text-white sm:line-clamp-1 line-clamp-2'>{title(media)}</h3>
|
||||
</div>
|
||||
<div class='px-5 py-3 grid grid-cols-1 sm:grid-cols-2 gap-5 w-full'>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Status</div>
|
||||
<Select.Root bind:selected={status}>
|
||||
<Select.Trigger>
|
||||
<Select.Value placeholder='Status' />
|
||||
</Select.Trigger>
|
||||
<Select.Content sameWidth={true}>
|
||||
<Select.Item value='CURRENT'>Watching</Select.Item>
|
||||
<Select.Item value='PLANNING'>Plan to Watch</Select.Item>
|
||||
<Select.Item value='COMPLETED'>Completed</Select.Item>
|
||||
<Select.Item value='PAUSED'>Paused</Select.Item>
|
||||
<Select.Item value='DROPPED'>Dropped</Select.Item>
|
||||
<Select.Item value='REPEATING'>Re-Watching</Select.Item>
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Score</div>
|
||||
<Select.Root bind:selected={score}>
|
||||
<Select.Trigger>
|
||||
<Select.Value placeholder='Score' />
|
||||
</Select.Trigger>
|
||||
<Select.Content sameWidth={true}>
|
||||
<Select.Item value='0' />
|
||||
<Select.Item value='1' />
|
||||
<Select.Item value='2' />
|
||||
<Select.Item value='3' />
|
||||
<Select.Item value='4' />
|
||||
<Select.Item value='5' />
|
||||
<Select.Item value='6' />
|
||||
<Select.Item value='7' />
|
||||
<Select.Item value='8' />
|
||||
<Select.Item value='9' />
|
||||
<Select.Item value='10' />
|
||||
</Select.Content>
|
||||
</Select.Root>
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Progress</div>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*.?[0-9]*' min='0' max='Infinity' bind:value={progress} />
|
||||
</div>
|
||||
<div class='mt-1 flex flex-col'>
|
||||
<div class='font-bold text-muted-foreground text-sm mb-2'>Rewatched Times</div>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*.?[0-9]*' min='0' max='Infinity' bind:value={repeat} />
|
||||
</div>
|
||||
</div>
|
||||
<div class='px-4 py-3 gap-3 mt-auto flex flex-col sm:flex-row-reverse sm:px-6'>
|
||||
<Dialog.Close let:builder asChild>
|
||||
<Button on:click={saveEntry} builders={[builder]}>Save Changes</Button>
|
||||
<Button variant='secondary' builders={[builder]}>Cancel</Button>
|
||||
<Button variant='destructive' on:click={deleteEntry} builders={[builder]}>Delete</Button>
|
||||
</Dialog.Close>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
140
src/lib/components/EpisodesList.svelte
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<script lang='ts'>
|
||||
import Play from 'lucide-svelte/icons/play'
|
||||
|
||||
import Pagination from './Pagination.svelte'
|
||||
import { ChevronLeft, ChevronRight } from './icons/animated'
|
||||
import { Button } from './ui/button'
|
||||
import { Load } from './ui/img'
|
||||
import { playEp } from './ui/player/mediahandler.svelte'
|
||||
import { Profile } from './ui/profile'
|
||||
|
||||
import type { EpisodesResponse } from '$lib/modules/anizip/types'
|
||||
|
||||
import { episodes as _episodes, notes, type Media } from '$lib/modules/anilist'
|
||||
import { authAggregator, list, progress } from '$lib/modules/auth'
|
||||
import { makeEpisodeList } from '$lib/modules/extensions'
|
||||
import { click, dragScroll } from '$lib/modules/navigate'
|
||||
import { liveAnimeProgress } from '$lib/modules/watchProgress'
|
||||
import { breakpoints, cn, since } from '$lib/utils'
|
||||
|
||||
export let eps: EpisodesResponse | null
|
||||
export let media: Media
|
||||
|
||||
$: episodeCount = _episodes(media) ?? eps?.episodeCount ?? 0
|
||||
|
||||
$: episodeList = media && makeEpisodeList(media, eps)
|
||||
|
||||
const perPage = 16
|
||||
|
||||
function getPage (page: number, list = episodeList) {
|
||||
return list.slice((page - 1) * perPage, page * perPage)
|
||||
}
|
||||
|
||||
$: completed = list(media) === 'COMPLETED'
|
||||
$: _progress = completed ? 0 : progress(media) ?? 0
|
||||
|
||||
$: currentPage = Math.floor((!completed ? _progress : 0) / perPage) + 1
|
||||
|
||||
function play (episode: number) {
|
||||
$playEp(media, episode)
|
||||
}
|
||||
|
||||
export let following = authAggregator.following(media.id)
|
||||
|
||||
$: followerEntries = $following?.data?.Page?.mediaList?.filter(e => e?.user?.id !== authAggregator.id()) ?? []
|
||||
|
||||
$: watchProgress = liveAnimeProgress(media.id)
|
||||
</script>
|
||||
|
||||
<Pagination count={episodeCount} {perPage} bind:currentPage let:pages let:hasNext let:hasPrev let:range let:setPage siblingCount={1}>
|
||||
<div class='overflow-y-auto pt-3 -ml-14 pl-14 -mr-3 pr-3 pointer-events-none -mb-3 pb-3' use:dragScroll>
|
||||
<div class='grid grid-cols-1 sm:grid-cols-[repeat(auto-fit,minmax(500px,1fr))] place-items-center gap-x-4 gap-y-7 justify-center align-middle pointer-events-auto'>
|
||||
{#each getPage(currentPage, episodeList) as { episode, image, title, summary, airingAt, airdate, filler, length } (episode)}
|
||||
{@const watched = _progress >= episode && !completed}
|
||||
{@const target = _progress + 1 === episode}
|
||||
<div class={!target ? 'px-3 w-full' : 'contents'}>
|
||||
<div use:click={() => play(episode)}
|
||||
class={cn(
|
||||
'select:scale-[1.05] select:shadow-lg scale-100 transition-[transform,box-shadow] duration-200 shrink-0 ease-out focus-visible:ring-ring focus-visible:ring-1 rounded-md bg-neutral-950 text-secondary-foreground select:bg-neutral-900 flex w-full max-h-28 cursor-pointer relative overflow-hidden group',
|
||||
target && 'ring-custom ring-1',
|
||||
filler && '!ring-yellow-400 ring-1'
|
||||
)}>
|
||||
{#if image}
|
||||
<div class='w-52 shrink-0 relative'>
|
||||
<Load src={image} class={cn('object-cover h-full w-full', watched && 'opacity-20')} />
|
||||
{#if length ?? media.duration}
|
||||
<div class='absolute bottom-1 left-1 bg-neutral-900/80 text-secondary-foreground text-[9.6px] px-1 py-0.5 rounded'>
|
||||
{length ?? media.duration}m
|
||||
</div>
|
||||
{/if}
|
||||
<div class='absolute flex items-center justify-center w-full h-full bg-black group-select:bg-opacity-50 bg-opacity-0 duration-200 text-white transition-[background] ease-out top-0'>
|
||||
<Play class='size-6 scale-75 opacity-0 group-select:opacity-100 group-select:scale-100 duration-200 transition-[transform,opacity] ease-out' fill='currentColor' />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class='flex-grow py-3 px-4 flex flex-col'>
|
||||
<div class='font-bold mb-2 line-clamp-1 shrink-0 text-[12.8px]'>
|
||||
{episode}. {title?.en ?? 'Episode ' + episode}
|
||||
</div>
|
||||
{#if watched || completed}
|
||||
<div class='mb-2 h-0.5 overflow-hidden w-full bg-custom shrink-0' />
|
||||
{:else if $watchProgress?.episode === episode}
|
||||
<div class='w-full bg-neutral-800 mb-2'>
|
||||
<div class='h-0.5 overflow-hidden bg-custom shrink-0' style:width={$watchProgress.progress + '%'} />
|
||||
</div>
|
||||
{/if}
|
||||
<div class='text-[9.6px] text-muted-foreground overflow-hidden'>
|
||||
{notes(summary ?? '')}
|
||||
</div>
|
||||
<div class='flex w-full justify-between mt-auto'>
|
||||
{#if airingAt ?? airdate}
|
||||
<div class='text-[9.6px] pt-2'>
|
||||
{since(new Date(airingAt ?? airdate ?? 0))}
|
||||
</div>
|
||||
{/if}
|
||||
<div class='-space-x-1 ml-auto inline-flex pt-1 pr-0.5'>
|
||||
{#each followerEntries.filter(e => e?.progress === episode) as followerEntry, i (followerEntry?.user?.id ?? i)}
|
||||
{#if followerEntry?.user}
|
||||
<Profile user={followerEntry.user} class='ring-2 ring-neutral-950 size-4 bg-neutral-950' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{#if filler}
|
||||
<div class='rounded-tl bg-yellow-400 py-1 px-2 text-primary-foreground absolute bottom-0 right-0 text-[9.6px] font-bold'>Filler</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<div class='flex flex-row items-center justify-between w-full py-3'>
|
||||
<p class='text-center text-[13px] text-muted-foreground hidden md:block'>
|
||||
Showing <span class='font-bold'>{range.start + 1}</span> to <span class='font-bold'>{range.end}</span> of <span class='font-bold'>{episodeCount}</span> episodes
|
||||
</p>
|
||||
<div class='w-full md:w-auto gap-2 flex items-center'>
|
||||
<Button size='icon' variant='ghost' class='animated-icon' on:click={() => setPage(currentPage - 1)} disabled={!hasPrev}>
|
||||
<ChevronLeft class='size-4' />
|
||||
</Button>
|
||||
{#if $breakpoints.md}
|
||||
{#each pages as { page, type } (page)}
|
||||
{#if type === 'ellipsis'}
|
||||
<span class='h-9 w-9 text-center'>...</span>
|
||||
{:else}
|
||||
<Button size='icon' variant={page === currentPage ? 'outline' : 'ghost'} on:click={() => setPage(page)}>
|
||||
{page}
|
||||
</Button>
|
||||
{/if}
|
||||
{/each}
|
||||
{:else}
|
||||
<p class='text-center text-[13px] text-muted-foreground w-full block md:hidden'>
|
||||
Showing <span class='font-bold'>{range.start + 1}</span> to <span class='font-bold'>{range.end}</span> of <span class='font-bold'>{episodeCount}</span> episodes
|
||||
</p>
|
||||
{/if}
|
||||
<Button size='icon' variant='ghost' class='animated-icon' on:click={() => setPage(currentPage + 1)} disabled={!hasNext}>
|
||||
<ChevronRight class='size-4' />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Pagination>
|
||||
38
src/lib/components/KeepAlive.svelte
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<script lang='ts' context='module'>
|
||||
import type { ComponentType, SvelteComponent } from 'svelte'
|
||||
|
||||
const keep = new Map<string, { component: SvelteComponent, node: HTMLElement}>()
|
||||
|
||||
export function register (id: string, Component: ComponentType) {
|
||||
if (keep.has(id)) throw new Error(`KeepAlive: duplicate id ${id}`)
|
||||
const wrapper = document.createDocumentFragment() as unknown as HTMLElement
|
||||
|
||||
const instance = new Component({ target: wrapper })
|
||||
|
||||
keep.set(id, { component: instance, node: wrapper.children[0] as HTMLElement })
|
||||
}
|
||||
|
||||
export function unregister (id: string) {
|
||||
const entry = keep.get(id)
|
||||
if (entry) {
|
||||
entry.component.$destroy()
|
||||
entry.node.remove()
|
||||
keep.delete(id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
export let id: string
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLDivElement> & { id: string }
|
||||
|
||||
function mount (node: HTMLDivElement) {
|
||||
const entry = keep.get(id)
|
||||
if (entry) node.appendChild(entry.node)
|
||||
}
|
||||
</script>
|
||||
|
||||
<div use:mount {...$$restProps} />
|
||||
53
src/lib/components/Online.svelte
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<script lang='ts'>
|
||||
import CloudOff from 'lucide-svelte/icons/cloud-off'
|
||||
|
||||
import online from '$lib/modules/online'
|
||||
|
||||
let hideFirst = false
|
||||
$: if (!$online && !hideFirst) {
|
||||
hideFirst = true
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $online && hideFirst}
|
||||
<div class='bg-green-600 text-white justify-center items-center flex flex-row online overflow-hidden relative z-40 px-4 shrink-0'>
|
||||
Back online
|
||||
</div>
|
||||
{:else if !$online}
|
||||
<div class='bg-neutral-950 text-white justify-center items-center flex flex-row top-0 offline overflow-hidden relative z-40 px-4 shrink-0'>
|
||||
<CloudOff size={16} class='me-2' />
|
||||
Offline
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.online {
|
||||
animation: hide 300ms forwards 2s;
|
||||
}
|
||||
@keyframes hide {
|
||||
from {
|
||||
height: 24px;
|
||||
}
|
||||
to {
|
||||
height: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
.offline {
|
||||
height: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
animation: show 300ms forwards 2s;
|
||||
}
|
||||
@keyframes show {
|
||||
from {
|
||||
height: 0;
|
||||
}
|
||||
to {
|
||||
height: 24px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
53
src/lib/components/Pagination.svelte
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<script lang='ts'>
|
||||
export let currentPage = 1
|
||||
export let count = 0
|
||||
export let perPage = 15
|
||||
export let siblingCount = 1
|
||||
|
||||
let pages: Array<{
|
||||
page: number
|
||||
type: string
|
||||
}> = []
|
||||
|
||||
$: {
|
||||
const edgeSize = 4 * siblingCount
|
||||
const totalPages = Math.ceil(count / perPage)
|
||||
const startPage = Math.max(1, totalPages - currentPage < edgeSize ? totalPages - edgeSize : currentPage - siblingCount)
|
||||
const endPage = Math.min(totalPages, currentPage < edgeSize ? 1 + edgeSize : currentPage + siblingCount)
|
||||
const paginationItems = []
|
||||
|
||||
if (startPage > 1) {
|
||||
paginationItems.push({ page: 1, type: 'page' })
|
||||
if (startPage > 2) {
|
||||
paginationItems.push({ page: startPage - 1, type: 'ellipsis' })
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = startPage; i <= endPage; i++) {
|
||||
paginationItems.push({ page: i, type: 'page' })
|
||||
}
|
||||
|
||||
if (endPage < totalPages) {
|
||||
if (endPage < totalPages - 1) {
|
||||
paginationItems.push({ page: endPage + 1, type: 'ellipsis' })
|
||||
}
|
||||
paginationItems.push({ page: totalPages, type: 'page' })
|
||||
}
|
||||
|
||||
pages = paginationItems
|
||||
}
|
||||
|
||||
$: range = {
|
||||
start: (currentPage - 1) * perPage,
|
||||
end: Math.min(currentPage * perPage, count)
|
||||
}
|
||||
|
||||
$: hasNext = currentPage < Math.ceil(count / perPage)
|
||||
$: hasPrev = currentPage > 1
|
||||
|
||||
function setPage (page: number) {
|
||||
currentPage = Math.min(Math.max(1, page), Math.ceil(count / perPage))
|
||||
}
|
||||
</script>
|
||||
|
||||
<slot {pages} {range} {hasNext} {hasPrev} {setPage} />
|
||||
335
src/lib/components/SearchModal.svelte
Normal file
|
|
@ -0,0 +1,335 @@
|
|||
<script lang='ts' context='module'>
|
||||
import BadgeCheck from 'lucide-svelte/icons/badge-check'
|
||||
import Download from 'svelte-radix/Download.svelte'
|
||||
import File from 'svelte-radix/File.svelte'
|
||||
import MagnifyingGlass from 'svelte-radix/MagnifyingGlass.svelte'
|
||||
|
||||
import { SingleCombo } from './ui/combobox'
|
||||
import { Input } from './ui/input'
|
||||
|
||||
import type { AnitomyResult } from 'anitomyscript'
|
||||
import type { TorrentResult } from 'hayase-extensions'
|
||||
|
||||
import * as Dialog from '$lib/components/ui/dialog'
|
||||
import { title } from '$lib/modules/anilist'
|
||||
import { extensions } from '$lib/modules/extensions/extensions'
|
||||
import { click, dragScroll } from '$lib/modules/navigate'
|
||||
import { settings, videoResolutions } from '$lib/modules/settings'
|
||||
import { cn, colors, fastPrettyBytes, since } from '$lib/utils'
|
||||
|
||||
const termMapping: Record<string, {text: string, color: string}> = {}
|
||||
termMapping['5.1'] = termMapping['5.1CH'] = { text: '5.1', color: '#f67255' }
|
||||
termMapping['TRUEHD5.1'] = { text: 'TrueHD 5.1', color: '#f67255' }
|
||||
termMapping.AAC = termMapping.AACX2 = termMapping.AACX3 = termMapping.AACX4 = { text: 'AAC', color: '#f67255' }
|
||||
termMapping.AC3 = { text: 'AC3', color: '#f67255' }
|
||||
termMapping.EAC3 = termMapping['E-AC-3'] = { text: 'EAC3', color: '#f67255' }
|
||||
termMapping.FLAC = termMapping.FLACX2 = termMapping.FLACX3 = termMapping.FLACX4 = { text: 'FLAC', color: '#f67255' }
|
||||
termMapping.VORBIS = { text: 'Vorbis', color: '#f67255' }
|
||||
termMapping.DUALAUDIO = termMapping['DUAL AUDIO'] = { text: 'Dual Audio', color: '#ffcb3b' }
|
||||
termMapping['10BIT'] = termMapping['10BITS'] = termMapping['10-BIT'] = termMapping['10-BITS'] = termMapping.HI10 = termMapping.HI10P = { text: '10 Bit', color: '#0c8ce9' }
|
||||
termMapping.HI444 = termMapping.HI444P = termMapping.HI444PP = { text: 'HI444', color: '#0c8ce9' }
|
||||
termMapping.HEVC = termMapping.H265 = termMapping['H.265'] = termMapping.X265 = { text: 'HEVC', color: '#0c8ce9' }
|
||||
termMapping.AV1 = { text: 'AV1', color: '#0c8ce9' }
|
||||
termMapping.BD = termMapping.BDRIP = termMapping.BLURAY = termMapping['BLU-RAY'] = { text: 'BD', color: '#ab1b31' }
|
||||
termMapping.DVD5 = termMapping.DVD9 = termMapping['DVD-R2J'] = termMapping.DVDRIP = termMapping.DVD = termMapping['DVD-RIP'] = termMapping.R2DVD = termMapping.R2J = termMapping.R2JDVD = termMapping.R2JDVDRIP = { text: 'DVD', color: '#ab1b31' }
|
||||
termMapping.MULTISUB = termMapping['MULTI-SUB'] = termMapping['MULTI SUB'] = termMapping.MULTISUBS = termMapping['MULTI-SUBS'] = termMapping['MULTI SUBS'] = { text: 'Multi Sub', color: '#ffcb3b' }
|
||||
// termMapping.HDTV = termMapping.HDTVRIP = termMapping.TVRIP = termMapping['TV-RIP'] = { text: 'TV', color: '#ab1b31' }
|
||||
// termMapping.WEBCAST = termMapping.WEBRIP = { text: 'WEB', color: '#ab1b31' }
|
||||
|
||||
function sanitiseTerms ({ video_term: video, audio_term: audio, video_resolution: resolution, source, subtitles }: AnitomyResult) {
|
||||
const terms = [...new Set([...video ?? [], ...audio ?? [], ...source ?? [], ...subtitles ?? []].map(term => termMapping[term.toUpperCase() ?? '']).filter(t => t))] as Array<{text: string, color: string}>
|
||||
if (resolution.length) terms.unshift({ text: resolution[0]!, color: '#c6ec58' })
|
||||
|
||||
return terms
|
||||
}
|
||||
|
||||
function simplifyFilename ({ video_term: video, audio_term: audio, video_resolution: resolution, file_name: name, release_group: group, file_checksum: checksum }: AnitomyResult) {
|
||||
let simpleName = name[0]!
|
||||
if (group.length) simpleName = simpleName.replace(group[0]!, '')
|
||||
if (resolution.length) simpleName = simpleName.replace(resolution[0]!, '')
|
||||
if (checksum.length) simpleName = simpleName.replace(checksum[0]!, '')
|
||||
for (const term of video ?? []) simpleName = simpleName.replace(term, '')
|
||||
for (const term of audio ?? []) simpleName = simpleName.replace(term, '')
|
||||
return simpleName.replace(/[[{(]\s*[\]})]/g, '').replace(/\s+/g, ' ').trim()
|
||||
}
|
||||
|
||||
function getGroup ({ release_group: group, file_name: name }: AnitomyResult) {
|
||||
return group[0] && group[0].length < 20 ? group[0] : /^(?!\[[^\]]*\]).*-(\w+)(?=\s\(|\.\w+$|$)/.exec(name[0] ?? '')?.[1] ?? 'No Group'
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import Folder from 'lucide-svelte/icons/folder'
|
||||
import { getContext } from 'svelte'
|
||||
|
||||
import ProgressButton from './ui/button/progress-button.svelte'
|
||||
import { Banner } from './ui/img'
|
||||
|
||||
import { beforeNavigate, goto } from '$app/navigation'
|
||||
import { searchStore } from '$lib'
|
||||
import { saved } from '$lib/modules/extensions'
|
||||
import { server } from '$lib/modules/torrent'
|
||||
|
||||
$: open = !!$searchStore?.media
|
||||
|
||||
$: searchResult = !!$searchStore?.media && extensions.getResultsFromExtensions({ media: $searchStore.media, episode: $searchStore.episode, resolution: $settings.searchQuality })
|
||||
|
||||
function close (state = false) {
|
||||
if (!state) {
|
||||
searchStore.set(undefined)
|
||||
open = false
|
||||
inputText = ''
|
||||
}
|
||||
}
|
||||
|
||||
let inputText = ''
|
||||
|
||||
function play (result: Pick<TorrentResult, 'hash'>) {
|
||||
server.play(result.hash, $searchStore!.media, $searchStore!.episode)
|
||||
goto('/app/player/')
|
||||
close()
|
||||
}
|
||||
|
||||
async function playBest () {
|
||||
if (!searchResult) return
|
||||
const best = filterAndSortResults((await searchResult).results, inputText, await $downloaded)[0]
|
||||
|
||||
if (best) play(best)
|
||||
}
|
||||
|
||||
function filterAndSortResults (results: Array<TorrentResult & { parseObject: AnitomyResult, extension: Set<string> }>, searchText: string, downloaded: Set<string>) {
|
||||
const preference = $settings.lookupPreference
|
||||
return results
|
||||
.filter(({ title }) => title.toLowerCase().includes(searchText.toLowerCase()))
|
||||
.sort((a, b) => {
|
||||
// pre-emtively sort by deal breaker conditions
|
||||
// the higher the rank the worse the result... don't ask
|
||||
function getRank (res: typeof results[0]) {
|
||||
if (res.accuracy === 'low') return 3
|
||||
if (downloaded.has(res.hash)) return 0
|
||||
if (res.seeders <= 15) return 2
|
||||
if ((res.type === 'best' || res.type === 'alt') && preference === 'quality') return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
const rankA = getRank(a)
|
||||
const rankB = getRank(b)
|
||||
if (rankA !== rankB) return rankA - rankB
|
||||
if (rankA === 1) {
|
||||
const scoreA = a.accuracy === 'high' ? 1 : 0
|
||||
const scoreB = b.accuracy === 'high' ? 1 : 0
|
||||
const diff = scoreB - scoreA
|
||||
if (diff !== 0) return diff
|
||||
|
||||
// sort by preference, quality is sorted in rank, so quality and seeders is both as seeders here.
|
||||
if (preference === 'size') return a.size - b.size
|
||||
return b.seeders - a.seeders
|
||||
}
|
||||
return 0
|
||||
})
|
||||
}
|
||||
|
||||
let animating = false
|
||||
|
||||
async function startAnimation (searchRes: typeof searchResult) {
|
||||
if (!$settings.searchAutoSelect) return
|
||||
animating = false
|
||||
const results = await searchRes
|
||||
if (searchRes === searchResult && results && results.results.length) animating = true
|
||||
}
|
||||
|
||||
function stopAnimation () {
|
||||
animating = false
|
||||
}
|
||||
|
||||
const torrentRx = /(^magnet:){1}|(^[A-F\d]{8,40}$){1}|(.*\.torrent$){1}/i
|
||||
|
||||
function findTorrentIdentifiers (hash: string) {
|
||||
if (torrentRx.test(hash)) {
|
||||
play({ hash })
|
||||
}
|
||||
}
|
||||
|
||||
$: findTorrentIdentifiers(inputText)
|
||||
|
||||
$: searchResult && startAnimation(searchResult)
|
||||
|
||||
const downloaded = server.downloaded
|
||||
|
||||
const stop = getContext<() => void>('stop-progress-bar')
|
||||
|
||||
beforeNavigate(({ cancel }) => {
|
||||
if (open) {
|
||||
cancel()
|
||||
close()
|
||||
stop()
|
||||
}
|
||||
})
|
||||
|
||||
$: ({ r, g, b } = colors($searchStore?.media.coverImage?.color ?? undefined))
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open onOpenChange={close} portal='#episodeListTarget'>
|
||||
<Dialog.Content class='bg-black h-full max-w-5xl w-full max-h-[calc(100%-1rem)] border-b-0 !rounded-b-none mt-2 p-0 items-center flex-col flex lg:rounded-t-xl overflow-clip z-[100] gap-0'>
|
||||
<!-- this hacky thing is required for dialog root focus trap... pitiful -->
|
||||
<div class='size-0' tabindex='0' />
|
||||
{#if $searchStore}
|
||||
<div class='absolute top-0 left-0 w-full h-full max-h-36 overflow-hidden flex items-end'>
|
||||
<Banner media={$searchStore.media} class='object-cover w-full h-full absolute bottom-[0.5px] left-0 -z-10 opacity-40' />
|
||||
<div class='w-full h-[70%] bg-gradient-to-t from-black/80 to-transparent' />
|
||||
</div>
|
||||
<div class='gap-4 w-full relative h-full flex flex-col pt-8' style:--custom={$searchStore.media.coverImage?.color ?? '#fff'} style:--red={r} style:--green={g} style:--blue={b}>
|
||||
<div class='px-4 sm:px-6 space-y-4'>
|
||||
<div class='font-weight-bold text-2xl font-bold text-ellipsis text-nowrap overflow-hidden'>{title($searchStore.media)}</div>
|
||||
<div class='flex items-center relative scale-parent'>
|
||||
<Input
|
||||
class='pl-9 bg-background select:bg-accent select:text-accent-foreground shadow-sm no-scale placeholder:opacity-50'
|
||||
placeholder='Filter by text, or paste a magnet link or torrent file here to specify a torrent manually'
|
||||
bind:value={inputText} />
|
||||
<MagnifyingGlass class='h-4 w-4 shrink-0 opacity-50 absolute left-3 text-muted-foreground z-10 pointer-events-none' />
|
||||
</div>
|
||||
<div class='flex items-center gap-4 justify-around flex-wrap'>
|
||||
<div class='flex items-center space-x-2 grow'>
|
||||
<span>Episode</span>
|
||||
<Input type='number' inputmode='numeric' pattern='[0-9]*' min='0' max='65536' bind:value={$searchStore.episode} class='w-32 shrink-0 bg-background grow' />
|
||||
</div>
|
||||
<div class='flex items-center space-x-2 grow'>
|
||||
<span>Resolution</span>
|
||||
<SingleCombo bind:value={$settings.searchQuality} items={videoResolutions} portal='#episodeListTarget' class='w-32 shrink-0 grow border-border border' />
|
||||
</div>
|
||||
</div>
|
||||
<ProgressButton
|
||||
onclick={playBest}
|
||||
size='default'
|
||||
class='w-full font-bold bg-custom select:bg-custom-600 text-contrast'
|
||||
bind:animating>
|
||||
Auto Select Torrent
|
||||
</ProgressButton>
|
||||
</div>
|
||||
<div class='h-full overflow-y-auto px-4 sm:px-6 pt-2' role='menu' tabindex='-1' on:keydown={stopAnimation} on:focusin={stopAnimation} on:pointerenter={stopAnimation} on:pointermove={stopAnimation} use:dragScroll style:--custom={$searchStore.media.coverImage?.color ?? '#fff'} style:--red={r} style:--green={g} style:--blue={b}>
|
||||
{#await Promise.all([searchResult, $downloaded])}
|
||||
{#each Array.from({ length: 12 }) as _, i (i)}
|
||||
<div class='p-3 h-[106px] flex cursor-pointer mb-2 relative rounded-md overflow-hidden bg-neutral-950 flex-col justify-between [content-visibility:auto] [contain-intrinsic-height:auto_106px]'>
|
||||
<div class='h-4 w-40 bg-primary/5 animate-pulse rounded mt-2' />
|
||||
<div class='bg-primary/5 animate-pulse rounded h-2 w-28 mt-1' />
|
||||
<div class='flex justify-between mb-1'>
|
||||
<div class='flex gap-2'>
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
</div>
|
||||
<div class='mt-2 bg-primary/5 animate-pulse rounded h-2 w-20' />
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{:then [search, downloaded]}
|
||||
{@const media = $searchStore.media}
|
||||
{#if search && media}
|
||||
{@const { results, errors } = search}
|
||||
{#each filterAndSortResults(results, inputText, downloaded) as result (result.hash)}
|
||||
<div class='p-3 flex cursor-pointer mb-2 relative rounded-md overflow-hidden bg-neutral-950 group/card select:ring-1 select:ring-custom select:bg-neutral-900 select:scale-[1.02] select:shadow-lg scale-100 transition-all [content-visibility:auto] [contain-intrinsic-height:auto_106px]' class:opacity-40={result.accuracy === 'low'} use:click={() => play(result)} title={result.parseObject.file_name[0]}>
|
||||
<div class='size-20 relative shrink-0 flex items-center justify-center text-xs px-1 text-wrap break-all font-bold text-center overflow-clip'>
|
||||
{#if result.accuracy === 'high' || result.accuracy === 'medium'}
|
||||
<BadgeCheck class={cn('absolute top-0 left-0 mix-blend-difference', result.accuracy === 'high' ? 'text-[#53da33]' : 'text-muted-foreground/20')} fill='currentColor' color='#000' size='1.2rem' />
|
||||
{/if}
|
||||
{#if downloaded.has(result.hash)}
|
||||
<Download class='text-[#53da33] size-12 opacity-80' stroke-width='0.5' color='currentColor' stroke='currentColor' />
|
||||
{:else if result.type}
|
||||
<Folder class='text-yellow-300 size-12 opacity-80' fill='currentColor' />
|
||||
{:else}
|
||||
<File class='text-muted-foreground size-12 opacity-80' />
|
||||
{/if}
|
||||
</div>
|
||||
<div class='flex pl-2 flex-col justify-between w-full h-20 relative min-w-0 text-[.7rem]'>
|
||||
<div class='flex w-full items-center'>
|
||||
<div class='text-xl font-bold text-nowrap group-select/card:text-custom transition-colors'>{getGroup(result.parseObject)}</div>
|
||||
<div class='ml-auto flex gap-2 self-start'>
|
||||
{#each result.extension as id (id)}
|
||||
{#if $saved[id]}
|
||||
<img src={$saved[id].icon} alt={id} class='size-4' title='Provided by {id}' decoding='async' loading='lazy' />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<div class='text-muted-foreground text-ellipsis text-nowrap overflow-hidden'>{simplifyFilename(result.parseObject)}</div>
|
||||
<div class='flex flex-row leading-none'>
|
||||
<div class='details text-light flex'>
|
||||
{#if result.type === 'best'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #1d2d1e; border-color: #53da33 !important; color: #53da33'>
|
||||
Best Release
|
||||
</span>
|
||||
{:else if result.type === 'alt'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #391d20; border-color: #c52d2d !important; color: #c52d2d'>
|
||||
Alt Release
|
||||
</span>
|
||||
{:else if result.type === 'batch'}
|
||||
<span class='rounded px-3 py-1 mr-0.5 border text-nowrap flex items-center' style='background: #1d2031; border-color: #2d5ec5 !important; color: #2d5ec5'>
|
||||
Batch
|
||||
</span>
|
||||
{/if}
|
||||
<span class={cn('text-nowrap flex items-center', result.seeders > 20 ? 'text-green-600' : result.seeders < 5 ? 'text-red-600' : 'text-yellow-600')}>{result.seeders} Seeders</span>
|
||||
<span class='text-nowrap flex items-center text-white/80'>{fastPrettyBytes(result.size)}</span>
|
||||
<span class='text-nowrap flex items-center text-white/80'>{since(new Date(result.date))}</span>
|
||||
</div>
|
||||
<div class='flex ml-auto flex-row-reverse'>
|
||||
{#each sanitiseTerms(result.parseObject) as { text, color }, i (i)}
|
||||
<div class='rounded px-3 py-1 ml-2 text-nowrap font-bold flex items-center' style:background={color}>
|
||||
<div class='text-contrast-filter'>
|
||||
{text}
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-3 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
No results found.<br />Try specifying a torrent manually by pasting a magnet link or torrent file into the filter bar.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{#each errors as error, i (i)}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-2xl text-center '>
|
||||
Extensions {error.extension} encountered an error
|
||||
</div>
|
||||
<div class='text-md text-center text-muted-foreground whitespace-pre-wrap'>
|
||||
{error.error.stack}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
{:catch error}
|
||||
<div class='p-5 flex items-center justify-center w-full h-80'>
|
||||
<div>
|
||||
<div class='mb-3 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground whitespace-pre-wrap'>
|
||||
{error.message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</Dialog.Content>
|
||||
</Dialog.Root>
|
||||
|
||||
<style>
|
||||
.banner {
|
||||
background: linear-gradient(90deg, #000 32%, rgba(0, 0, 0, 0.9) 100%);
|
||||
}
|
||||
.banner-2 {
|
||||
background: linear-gradient(#000d 0%, #000d 90%, #000 100%);
|
||||
}
|
||||
</style>
|
||||
20
src/lib/components/SettingCard.svelte
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<script lang='ts'>
|
||||
import { Label } from '$lib/components/ui/label'
|
||||
import { cn } from '$lib/utils'
|
||||
export let title = ''
|
||||
export let description = ''
|
||||
|
||||
const id = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER).toString() + title
|
||||
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div class={cn('flex flex-col md:flex-row md:items-center justify-between bg-neutral-950 rounded-md px-6 py-4 gap-3', className)}>
|
||||
<Label for={id} class='space-1 block leading-[unset] grow'>
|
||||
<div class='font-bold'>{title}</div>
|
||||
<div class='text-muted-foreground text-xs whitespace-pre-wrap block'>{description}</div>
|
||||
</Label>
|
||||
<slot {id} />
|
||||
</div>
|
||||
34
src/lib/components/SettingsNav.svelte
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<script lang='ts'>
|
||||
import { cubicInOut } from 'svelte/easing'
|
||||
import { crossfade } from 'svelte/transition'
|
||||
|
||||
import { Button } from './ui/button'
|
||||
|
||||
import { page } from '$app/stores'
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
let className: string | undefined | null = ''
|
||||
export let items: Array<{ href: string, title: string }>
|
||||
export { className as class }
|
||||
|
||||
const [send, receive] = crossfade({
|
||||
duration: 150,
|
||||
easing: cubicInOut
|
||||
})
|
||||
|
||||
const key = 'active-settings-tab'
|
||||
</script>
|
||||
|
||||
<nav class={cn('md:flex grid grid-cols-2 md:flex-row lg:flex-col gap-y-1 gap-x-2 pb-2 sm:pb-0', className)}>
|
||||
{#each items as { href, title }, i (i)}
|
||||
{@const isActive = $page.url.pathname === href}
|
||||
<Button {href} variant='ghost' data-sveltekit-noscroll class='relative font-semibold justify-start last:odd:col-span-2'>
|
||||
{#if isActive}
|
||||
<div class='bg-white absolute inset-0 rounded-md' in:send={{ key }} out:receive={{ key }} />
|
||||
{/if}
|
||||
<div class='relative text-white transition-colors duration-300' class:!text-black={isActive}>
|
||||
{title}
|
||||
</div>
|
||||
</Button>
|
||||
{/each}
|
||||
</nav>
|
||||
69
src/lib/components/Shadow.svelte
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<script lang='ts'>
|
||||
import dompurify from 'dompurify'
|
||||
import { marked } from 'marked'
|
||||
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
pedantic: false
|
||||
})
|
||||
|
||||
export let html = ''
|
||||
let root: ShadowRoot | undefined
|
||||
|
||||
const style = new CSSStyleSheet()
|
||||
|
||||
style.replaceSync(/* css */`
|
||||
p, details {
|
||||
margin-block-start: .5em;
|
||||
margin-block-end: .5em;
|
||||
}
|
||||
img, video {
|
||||
max-width: 100%;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
summary {
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
background: #0003;
|
||||
display: inline-block;
|
||||
padding: 0.4em 0.8em;
|
||||
border-radius: 0.5em;
|
||||
margin-block-end: .5em;
|
||||
}
|
||||
`)
|
||||
|
||||
function sanitize (html: string) {
|
||||
return dompurify.sanitize(html, { ALLOWED_TAGS: ['a', 'b', 'blockquote', 'br', 'center', 'del', 'div', 'em', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'code', 'span', 'strike', 'strong', 'ul', 'details', 'summary'], ALLOWED_ATTR: ['align', 'height', 'href', 'src', 'target', 'width', 'rel'] })
|
||||
}
|
||||
|
||||
// i mean holy shit anilist, could you have made it any harder on yourself
|
||||
function shadow (node: HTMLDivElement, html: string) {
|
||||
root ??= node.attachShadow({ mode: 'closed' })
|
||||
root.adoptedStyleSheets = [style]
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
html = html.replace(/(http)(:([\/|.|\w|\s|-])*\.(?:jpg|.jpeg|gif|png|mp4|webm))/gi, '$1s$2')
|
||||
.replace(/img\s?(\d+%?)?\s?\((.[\S]+)\)/gi, "<img width='$1' src='$2'>")
|
||||
.replace(/(^|>| )@([A-Za-z0-9]+)/gm, "$1<a href='#'>@$2</a>")
|
||||
.replace(/youtube\s?\([^]*?([-_0-9A-Za-z]{10,15})[^]*?\)/gi, 'youtube ($1)')
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
.replace(/webm\s?\(h?([A-Za-z0-9-._~:\/?#\[\]@!$&()*+,;=%]+)\)/gi, 'webmv(`$1`)')
|
||||
.replace(/~{3}([^]*?)~{3}/gm, '+++$1+++')
|
||||
.replace(/~!([^]*?)!~/gm, '<details><summary>Spoiler, click to view</summary>$1</details>')
|
||||
html = sanitize(marked.parse(html, { async: false }))
|
||||
.replace(/\+{3}([^]*?)\+{3}/gm, '<center>$1</center>')
|
||||
.replace(/youtube\s?\(([-_0-9A-Za-z]{10,15})\)/gi, `<iframe style='width: 500px; height: 200px; max-width: 100%; border: none;'title='youtube-embed' allow='autoplay' allowfullscreen
|
||||
src='https://www.youtube-nocookie.com/embed/$1?enablejsapi=1&autoplay=0&controls=1&mute=0&disablekb=1&loop=1&playlist=$1&cc_lang_pref=ja' />`)
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
.replace(/webmv\s?\(<code>([A-Za-z0-9-._~:\/?#\[\]@!$&()*+,;=%]+)<\/code>\)/gi, "<video muted loop controls><source src='h$1' type='video/webm'>Your browser does not support the video tag.</video>")
|
||||
// t = t.replace(/(?:<a href="https?:\/\/anilist.co\/(anime|manga)\/)([0-9]+).*?>(?:https?:\/\/anilist.co\/(?:anime|manga)\/[0-9]+).*?<\/a>/gm, '<span class="media-embed" data-media-type="$1" data-media-id="$2"></span>')
|
||||
|
||||
root.innerHTML = html
|
||||
}
|
||||
|
||||
let className: string | undefined | null
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<div use:shadow={html} class={className} />
|
||||
33
src/lib/components/StatusDot.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { tv, type VariantProps } from 'tailwind-variants'
|
||||
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
const dotvariants = tv({
|
||||
base: 'inline-flex w-[0.55rem] h-[0.55rem] me-1 bg-blue-600 rounded-full',
|
||||
variants: {
|
||||
variant: {
|
||||
CURRENT: 'bg-[rgb(61,180,242)]',
|
||||
PLANNING: 'bg-[rgb(247,154,99)]',
|
||||
COMPLETED: 'bg-[rgb(123,213,85)]',
|
||||
PAUSED: 'bg-[rgb(250,122,122)]',
|
||||
REPEATING: 'bg-[#3baeea]',
|
||||
DROPPED: 'bg-[rgb(232,93,117)]'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'CURRENT'
|
||||
}
|
||||
})
|
||||
|
||||
export let variant: VariantProps<typeof dotvariants>['variant'] = 'CURRENT'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLSpanElement> & { variant: VariantProps<typeof dotvariants>['variant']}
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<span class={cn(dotvariants({ variant }), className)} />
|
||||
11
src/lib/components/icons/Anilist.svelte
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<svg xmlns='http://www.w3.org/2000/svg' width='41' height='30' fill='none' viewBox='0 0 41 30' {...$$props}>
|
||||
<g clip-path='url(#clip0_312_151)'>
|
||||
<path fill='#00A8FF' d='M27.825 21.773V2.977c0-1.077-.613-1.672-1.725-1.672h-3.795c-1.111 0-1.725.595-1.725 1.672v8.927c0 .251 2.5 1.418 2.565 1.665 1.904 7.21.414 12.982-1.392 13.251 2.952.142 3.277 1.517 1.078.578.337-3.848 1.65-3.84 5.422-.142.032.032.774 1.539.82 1.539h8.91c1.113 0 1.726-.594 1.726-1.672v-3.677c0-1.078-.614-1.672-1.725-1.672H27.825z' />
|
||||
<path fill='#fff' d='M12.07 1.306l-9.966 27.49h7.743l1.687-4.756h8.433l1.649 4.755h7.705l-9.929-27.49H12.07zm1.227 16.642l2.415-7.615 2.645 7.615h-5.06z' />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id='clip0_312_151'>
|
||||
<path fill='#fff' d='M0 0H40V29H0z' transform='translate(.957 .5)' />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 831 B |
13
src/lib/components/icons/Hub.svelte
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M240-44q-48.5 0-82.25-33.75T124-160q0-48.5 33.75-82.25T240-276q14 0 24.25 2.25t21.25 7.25L353-351q-25.5-29-34.25-63.25T314-482.5L216-515q-17 23.5-41 37.25T120-464q-48.5 0-82.25-33.75T4-580q0-48.5 33.75-82.25T120-696q48.5 0 82.25 33.75T236-580v5.5l97.5 34q16.5-31 47.25-54t68.25-30V-728q-39.5-12.5-62.25-43T364-840q0-48.5 33.75-82.25T480-956q48.5 0 82.25 33.75T596-840q0 38.5-23.25 69T511-728v103.5q37.5 7 68 30t47.5 54l97.5-34v-5.5q0-48.5 33.75-82.25T840-696q48.5 0 82.25 33.75T956-580q0 48.5-33.75 82.25T840-464q-31 0-55.5-13.75T744-515l-98 32.5q4 34.5-5 68.25T607-351l67.5 84q11-5 21.25-7t24.25-2q48.5 0 82.25 33.75T836-160q0 48.5-33.75 82.25T720-44q-48.5 0-82.25-33.75T604-160q0-19.5 5.75-36.25T626-228l-67-84.5q-36.5 20-79.25 20.25T400.5-312.5L334-228q10.5 15 16.25 31.75T356-160q0 48.5-33.75 82.25T240-44ZM120-539q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm120 420q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm240-680q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm0 431.5q38.5 0 65.5-27t27-65.5q0-38.5-27-65.5t-65.5-27q-38.5 0-65.5 27t-27 65.5q0 38.5 27 65.5t65.5 27ZM720-119q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12Zm120-420q17 0 29-12t12-29q0-17-12-29t-29-12q-17 0-29 12t-12 29q0 17 12 29t29 12ZM480-840ZM120-580Zm360 120Zm360-120ZM240-160Zm480 0Z' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='hub' {...$$props} {iconNode} viewBox='0 -960 960 960'>
|
||||
<slot />
|
||||
</Icon>
|
||||
8
src/lib/components/icons/Kitsu.svelte
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<svg width='224' height='224' viewBox='0 0 224 224' {...$$props}>
|
||||
<g fill='none' fill-rule='evenodd'>
|
||||
<g fill='#E75E45'>
|
||||
<path d='M152.7 48.5c-6.8-2.5-14.1-4.1-21.8-4.4-12.7-.6-24.8 2.2-35.4 7.6-.6.3-1.3.6-2 1v36.4c0 .5 0 2.4-.3 4-.7 3.7-2.9 7-6 9.1-2.6 1.8-5.6 2.6-8.8 2.5-.6 0-1.3-.1-1.9-.2-1.6-.3-3.3-.9-3.8-1.1-1.4-.5-21.8-8.4-31.6-12.2-1.2-.5-2.2-.9-3-1.2-11.7 9.9-24 21.7-35.5 35.6-.1.1-.6.7-.7.8-1.5 2.1-1.6 5.1 0 7.4 1.2 1.7 3.1 2.7 5 2.8 1.3.1 2.7-.3 3.9-1.1.1-.1.2-.2.4-.3 12.2-8.8 25.6-15.9 39.8-21.6 1-.5 2.2-.8 3.3-.7 1.6.1 3.1.7 4.3 1.9 2.3 2.3 2.4 6 .5 8.5-.8 1.2-1.5 2.4-2.2 3.6-7.6 12.4-13.7 25.9-18.3 40-.1.4-.2.7-.3 1.1v.1c-.4 1.7-.1 3.5 1 5 1.2 1.7 3.1 2.7 5.1 2.8 1.4.1 2.7-.3 3.9-1.1.5-.4 1-.8 1.4-1.3.1-.2.3-.4.4-.6 5-7.1 10.5-13.8 16.4-20 26.3-28.2 61.2-48.1 100.3-55.9.3-.1.6-.1.9-.1 2.2.1 3.9 2 3.8 4.2-.1 1.9-1.4 3.3-3.2 3.7-36.3 7.7-101.7 50.8-78.8 113.4.4 1 .7 1.6 1.2 2.5 1.2 1.7 3.1 2.7 5 2.8 1.1 0 4.2-.3 6.1-3.7 3.7-7 10.7-14.8 30.9-23.2 56.3-23.3 65.6-56.6 66.6-77.7v-1.2c.9-31.4-18.6-58.8-46.6-69.2zm-56.5 165C91 198 91.5 183 97.6 168.7c11.7 18.9 32.1 20.5 32.1 20.5-20.9 8.7-29.1 17.3-33.5 24.3z' />
|
||||
<path d='M1.1 50.6c.1.2.3.4.4.5 5.3 7.2 11.3 13.5 17.8 19.1.1.1.2.1.2.2 4.2 3.6 12.2 8.8 18 10.9 0 0 36.1 13.9 38 14.7.7.3 1.7.6 2.2.7 1.6.3 3.3 0 4.8-1s2.4-2.5 2.7-4.1c.1-.6.2-1.6.2-2.3V48.5c.1-6.2-1.9-15.6-3.7-20.8 0-.1-.1-.2-.1-.3-2.8-8.1-6.6-16-11.4-23.5l-.3-.6-.1-.1c-2-2.8-6-3.5-8.9-1.5-.5.3-.8.7-1.2 1.1-.3.4-.5.7-.8 1.1-6.4 9.3-9 20.6-7.3 31.7-3.3 1.7-6.8 4-7.2 4.3-.4.3-3.9 2.7-6.6 5.2-9.7-5.5-21.3-7.2-32.2-4.6-.4.1-.9.2-1.3.3-.5.2-1 .4-1.4.7-2.9 2-3.7 5.9-1.8 8.9v.2zm63.5-40.1c3.4 5.7 6.3 11.6 8.6 17.8-4.6.8-9.1 2-13.5 3.6-.6-7.5 1.1-14.9 4.9-21.4zM31.5 51.3c-3.2 3.5-5.9 7.3-8.3 11.3-4.9-4.3-9.4-9.2-13.5-14.4 7.5-1.3 15-.2 21.8 3.1z' />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
1
src/lib/components/icons/Logo.svelte
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg name='logo' {...$$props} on:click xml:space='preserve' viewBox='0 0 66.145833 66.145833'><path fill='currentColor' d='M.00000117 61.5156237V4.6302097l66.145831 37.041664v19.84375l-47.624995-26.72291v16.40416zm66.145831-30.42707-23.547916-13.229174 23.547916-13.22917Z' /></svg>
|
||||
|
After Width: | Height: | Size: 283 B |
18
src/lib/components/icons/MyAnimeList.svelte
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { fill: 'currentColor', d: 'M8.273 7.247v8.423l-2.103-.003v-5.216l-2.03 2.404l-1.989-2.458l-.02 5.285H.001L0 7.247h2.203l1.865 2.545l2.015-2.546zm8.628 2.069l.025 6.335h-2.365l-.008-2.871h-2.8c.07.499.21 1.266.417 1.779c.155.381.298.751.583 1.128l-1.705 1.125c-.349-.636-.622-1.337-.878-2.082a9.3 9.3 0 0 1-.507-2.179c-.085-.75-.097-1.471.107-2.212a3.9 3.9 0 0 1 1.161-1.866c.313-.293.749-.5 1.1-.687s.743-.264 1.107-.359a7.4 7.4 0 0 1 1.191-.183c.398-.034 1.107-.066 2.39-.028l.545 1.749H14.51c-.593.008-.878.001-1.341.209a2.24 2.24 0 0 0-1.278 1.92l2.663.033l.038-1.81zm3.992-2.099v6.627l3.107.032l-.43 1.775h-4.807V7.187z' }]]
|
||||
|
||||
let className = ''
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<Icon name='myanimelist' class={cn(className, 'bg-[#3557a5] rounded px-[2px] text-white')} color='none' {...$$restProps} {iconNode} strokeWidth='1' viewBox='0 0 24 24'>
|
||||
<slot />
|
||||
</Icon>
|
||||
12
src/lib/components/icons/PictureInPicture.svelte
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3' }], ['rect', { width: '10', height: '7', x: '12', y: '13', rx: '2', fill: 'currentColor' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='picture-in-picture' {...$$props} {iconNode}>
|
||||
<slot />
|
||||
</Icon>
|
||||
12
src/lib/components/icons/PictureInPictureExit.svelte
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [['path', { d: 'M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4' }], ['rect', { width: '10', height: '7', x: '12', y: '13', rx: '2', fill: 'currentColor' }]]
|
||||
</script>
|
||||
|
||||
<Icon name='picture-in-picture-exit' {...$$props} {iconNode}>
|
||||
<slot />
|
||||
</Icon>
|
||||
14
src/lib/components/icons/Play.svelte
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [
|
||||
['path', { 'fill-rule': 'evenodd', 'clip-rule': 'evenodd', d: 'M22.99 11.7773C22.9219 10.8388 22.4205 9.92777 21.4859 9.39398L7.48782 1.39936C5.48785 0.25713 3 1.70127 3 4.00443V19.9937C3 22.2968 5.48785 23.741 7.48781 22.5988L21.4859 14.6041C22.4205 14.0703 22.9219 13.1593 22.99 12.2208C23.0226 12.0751 23.0226 11.9231 22.99 11.7773Z' }]
|
||||
]
|
||||
</script>
|
||||
|
||||
<Icon name='play' {...$$props} {iconNode} viewBox='0 0 24 24' strokeWidth='0'>
|
||||
<slot />
|
||||
</Icon>
|
||||
15
src/lib/components/icons/Subtitles.svelte
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script lang='ts'>
|
||||
import Icon from 'lucide-svelte/dist/Icon.svelte'
|
||||
|
||||
import type { SvelteHTMLElements, SVGAttributes } from 'svelte/elements'
|
||||
|
||||
type Attrs = SVGAttributes<SVGSVGElement>
|
||||
const iconNode: Array<[elementName: keyof SvelteHTMLElements, attrs: Attrs]> = [
|
||||
['path', { fill: 'none', d: 'M0 0h24v24H0z' }],
|
||||
['path', { d: 'M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z' }]
|
||||
]
|
||||
</script>
|
||||
|
||||
<Icon name='subtitles' {...$$props} {iconNode} viewBox='0 0 24 24' strokeWidth='0'>
|
||||
<slot />
|
||||
</Icon>
|
||||
43
src/lib/components/icons/animated/bolt.svelte
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible [transform-origin:center] target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'
|
||||
/><circle cx='12' cy='12' r='4' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: screw-rotate 1s ease 3;
|
||||
}
|
||||
|
||||
@keyframes screw-rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
47
src/lib/components/icons/animated/bookmark.svelte
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
68
src/lib/components/icons/animated/calendar.svelte
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
|
||||
const DOTS = [
|
||||
{ cx: 8, cy: 14 },
|
||||
{ cx: 12, cy: 14 },
|
||||
{ cx: 16, cy: 14 },
|
||||
{ cx: 8, cy: 18 },
|
||||
{ cx: 12, cy: 18 },
|
||||
{ cx: 16, cy: 18 }
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 2v4' />
|
||||
<path d='M16 2v4' />
|
||||
<rect width='18' height='18' x='3' y='4' rx='2' />
|
||||
<path d='M3 10h18' />
|
||||
{#each DOTS as dot, index (index)}
|
||||
<circle
|
||||
cx={dot.cx}
|
||||
cy={dot.cy}
|
||||
r='1'
|
||||
fill={color}
|
||||
stroke='none'
|
||||
class='target-animated-icon'
|
||||
style='animation-delay: {index * 0.17}s'
|
||||
/>
|
||||
{/each}
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: pulse 0.8s;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.3;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
33
src/lib/components/icons/animated/chevronleft.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m15 18-6-6 6-6' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transition: transform 0.2s ease-in;
|
||||
transform: translateX(-3px);
|
||||
}
|
||||
</style>
|
||||
33
src/lib/components/icons/animated/chevronright.svelte
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='m9 18 6-6-6-6' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transition: transform 0.2s ease-in;
|
||||
transform: translateX(3px);
|
||||
}
|
||||
</style>
|
||||
76
src/lib/components/icons/animated/clapperboard.svelte
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<g class='target-animated-icon clapperboard-outer'>
|
||||
<g class='target-animated-icon clapperboard-inner'>
|
||||
<path d='M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z' />
|
||||
<path d='m6.2 5.3 3.1 3.9' />
|
||||
<path d='m12.4 3.4 3.1 4' />
|
||||
</g>
|
||||
<path d='M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.clapperboard-outer {
|
||||
transform-origin: 4px 20px;
|
||||
}
|
||||
|
||||
.clapperboard-inner {
|
||||
transform-origin: 3px 11px;
|
||||
}
|
||||
|
||||
.target-animated-icon {
|
||||
animation: clapperboardOuter 0.8s ease-in-out;
|
||||
}
|
||||
|
||||
.target-animated-icon {
|
||||
animation: clapperboardInner 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes clapperboardOuter {
|
||||
0%,
|
||||
50% {
|
||||
transform: rotate(-10deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes clapperboardInner {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
30% {
|
||||
transform: rotate(-10deg);
|
||||
}
|
||||
60% {
|
||||
transform: rotate(16deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
37
src/lib/components/icons/animated/download.svelte
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' />
|
||||
<g>
|
||||
<polyline points='7 10 12 15 17 10' class='target-animated-icon' />
|
||||
<line x1='12' x2='12' y1='15' y2='3' class='target-animated-icon' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform: translateY(2px);
|
||||
transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
||||
}
|
||||
</style>
|
||||
50
src/lib/components/icons/animated/fileimage.svelte
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z' />
|
||||
<path d='M14 2v4a2 2 0 0 0 2 2h4' />
|
||||
<circle cx='10' cy='12' r='2' />
|
||||
<path d='m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
43
src/lib/components/icons/animated/foldersync.svelte
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5'
|
||||
/>
|
||||
<g class='target-animated-icon'>
|
||||
<path d='M12 10v4h4' />
|
||||
<path d='m12 14 1.535-1.605a5 5 0 0 1 8 1.5' />
|
||||
<path d='M22 22v-4h-4' />
|
||||
<path d='m22 18-1.535 1.605a5 5 0 0 1-8-1.5' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: center;
|
||||
transform-box: fill-box;
|
||||
transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
transform: rotate(-50deg);
|
||||
}
|
||||
</style>
|
||||
60
src/lib/components/icons/animated/heart.svelte
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: number | string = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'
|
||||
class='target-animated-icon'
|
||||
/>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: center;
|
||||
animation: heartBeat 1.2s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes heartBeat {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
16.67% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
33.33% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
66.67% {
|
||||
transform: scale(1);
|
||||
}
|
||||
83.33% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
52
src/lib/components/icons/animated/home.svelte
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path
|
||||
d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'
|
||||
/>
|
||||
<path d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
stroke-dasharray: 22;
|
||||
stroke-dashoffset: 0;
|
||||
animation: doorAnimation 0.6s ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes doorAnimation {
|
||||
0% {
|
||||
stroke-dashoffset: 22;
|
||||
opacity: 0;
|
||||
}
|
||||
15% {
|
||||
stroke-dashoffset: 22;
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
stroke-dashoffset: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
19
src/lib/components/icons/animated/index.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export { default as Home } from './home.svelte'
|
||||
export { default as Search } from './search.svelte'
|
||||
export { default as Calendar } from './calendar.svelte'
|
||||
export { default as Users } from './users.svelte'
|
||||
export { default as Download } from './download.svelte'
|
||||
export { default as Bolt } from './bolt.svelte'
|
||||
export { default as LogIn } from './login.svelte'
|
||||
export { default as Messages } from './messages.svelte'
|
||||
export { default as PencilLine } from './pencilline.svelte'
|
||||
export { default as Heart } from './heart.svelte'
|
||||
export { default as Bookmark } from './bookmark.svelte'
|
||||
export { default as Clapperboard } from './clapperboard.svelte'
|
||||
export { default as ChevronRight } from './chevronright.svelte'
|
||||
export { default as ChevronLeft } from './chevronleft.svelte'
|
||||
export { default as Trash } from './trash.svelte'
|
||||
export { default as FileImage } from './fileimage.svelte'
|
||||
export { default as Minimize } from './minimize.svelte'
|
||||
export { default as Maximize } from './maximize.svelte'
|
||||
export { default as FolderSync } from './foldersync.svelte'
|
||||
37
src/lib/components/icons/animated/login.svelte
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible -rotate-90')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' />
|
||||
<g>
|
||||
<polyline points='7 10 12 15 17 10' class='target-animated-icon' />
|
||||
<line x1='12' x2='12' y1='15' y2='3' class='target-animated-icon' />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform: translateY(2px);
|
||||
transition: transform 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
||||
}
|
||||
</style>
|
||||
55
src/lib/components/icons/animated/maximize.svelte
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: string | number = 24
|
||||
export let strokeWidth: string | number = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 3H5a2 2 0 0 0-2 2v3' class='top-left target-animated-icon' />
|
||||
<path d='M21 8V5a2 2 0 0 0-2-2h-3' class='top-right target-animated-icon' />
|
||||
<path d='M3 16v3a2 2 0 0 0 2 2h3' class='bottom-left target-animated-icon' />
|
||||
<path d='M16 21h3a2 2 0 0 0 2-2v-3' class='bottom-right target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
path {
|
||||
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.bottom-right {
|
||||
transform: translate(2px, 2px);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
transform: translate(-2px, 2px);
|
||||
}
|
||||
|
||||
.top-right {
|
||||
transform: translate(2px, -2px);
|
||||
}
|
||||
|
||||
.top-left {
|
||||
transform: translate(-2px, -2px);
|
||||
}
|
||||
|
||||
svg {
|
||||
overflow: visible;
|
||||
}
|
||||
</style>
|
||||
48
src/lib/components/icons/animated/messages.svelte
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z' />
|
||||
<path d='M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: primaryAnimation 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes primaryAnimation {
|
||||
0% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
20% {
|
||||
transform: scale(1.05) rotate(-7deg);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1.05) rotate(7deg);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
51
src/lib/components/icons/animated/minimize.svelte
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size: string | number = 24
|
||||
export let strokeWidth: string | number = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M8 3v3a2 2 0 0 1-2 2H3' class='top-left target-animated-icon' />
|
||||
<path d='M21 8h-3a2 2 0 0 1-2-2V3' class='top-right target-animated-icon' />
|
||||
<path d='M3 16h3a2 2 0 0 1 2 2v3' class='bottom-left target-animated-icon' />
|
||||
<path d='M16 21v-3a2 2 0 0 1 2-2h3' class='bottom-right target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
path {
|
||||
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.bottom-right {
|
||||
transform: translate(-1px, -1px);
|
||||
}
|
||||
|
||||
.top-left {
|
||||
transform: translate(1px, 1px);
|
||||
}
|
||||
|
||||
.bottom-left {
|
||||
transform: translate(1px, -1px);
|
||||
}
|
||||
|
||||
.top-right {
|
||||
transform: translate(-1px, 1px);
|
||||
}
|
||||
</style>
|
||||
51
src/lib/components/icons/animated/pencilline.svelte
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M12 20h9' />
|
||||
<path
|
||||
d='M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z'
|
||||
class='target-animated-icon'
|
||||
/>
|
||||
<path d='m15 5 3 3' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
transform-origin: 16.376px 3.622px;
|
||||
animation: penWiggle 0.5s ease-in-out 2;
|
||||
}
|
||||
|
||||
@keyframes penWiggle {
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(0deg) translate(0px, 0px);
|
||||
}
|
||||
25% {
|
||||
transform: rotate(-0.5deg) translate(-1px, 1.5px);
|
||||
}
|
||||
75% {
|
||||
transform: rotate(0.5deg) translate(1.5px, -1px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
46
src/lib/components/icons/animated/search.svelte
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible target-animated-icon')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<circle cx='11' cy='11' r='8' />
|
||||
<path d='m21 21-4.3-4.3' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: search-bounce 1s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes search-bounce {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateX(0) translateY(0);
|
||||
}
|
||||
25% {
|
||||
transform: translateX(0) translateY(-4px);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-3px) translateY(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
41
src/lib/components/icons/animated/trash.svelte
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible [transform-origin:center]')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<g class='target-animated-icon'>
|
||||
<path d='M3 6h18' />
|
||||
<path d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2' />
|
||||
</g>
|
||||
<path d='M19 8v12c0 1-1 2-2 2H7c-1 0-2-1-2-2V8' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
g.target-animated-icon {
|
||||
transform: translateY(-1px);
|
||||
transition: transform 0.2s ease-in;
|
||||
}
|
||||
path.target-animated-icon {
|
||||
transform: translateY(1px);
|
||||
transition: transform 0.2s ease-in;
|
||||
}
|
||||
</style>
|
||||
47
src/lib/components/icons/animated/users.svelte
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<script lang='ts'>
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export let color = 'currentColor'
|
||||
export let size = 24
|
||||
export let strokeWidth = 2
|
||||
let className = ''
|
||||
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox='0 0 24 24'
|
||||
fill='none'
|
||||
stroke={color}
|
||||
stroke-width={strokeWidth}
|
||||
stroke-linecap='round'
|
||||
stroke-linejoin='round'
|
||||
class={cn(className, 'overflow-visible')}
|
||||
{...$$restProps}
|
||||
>
|
||||
<path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2' />
|
||||
<circle cx='9' cy='7' r='4' />
|
||||
<path d='M22 21v-2a4 4 0 0 0-3-3.87' class='target-animated-icon' />
|
||||
<path d='M16 3.13a4 4 0 0 1 0 7.75' class='target-animated-icon' />
|
||||
</svg>
|
||||
|
||||
<style>
|
||||
.target-animated-icon {
|
||||
animation: users-slide 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
|
||||
}
|
||||
|
||||
@keyframes users-slide {
|
||||
0% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateX(-6px);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
17
src/lib/components/ui/avatar/avatar-fallback.svelte
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.FallbackProps
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Fallback
|
||||
class={cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</AvatarPrimitive.Fallback>
|
||||
19
src/lib/components/ui/avatar/avatar-image.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.ImageProps & { alt: string | undefined | null, src: string | undefined | null }
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export let src: $$Props['src']
|
||||
export let alt: $$Props['alt']
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Image
|
||||
{src}
|
||||
{alt}
|
||||
class={cn('aspect-square h-full w-full object-cover', className)}
|
||||
{...$$restProps}
|
||||
/>
|
||||
19
src/lib/components/ui/avatar/avatar.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { Avatar as AvatarPrimitive } from 'bits-ui'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = AvatarPrimitive.Props
|
||||
|
||||
let className: $$Props['class'] = undefined
|
||||
export let delayMs: $$Props['delayMs'] = 0
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<AvatarPrimitive.Root
|
||||
{delayMs}
|
||||
class={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</AvatarPrimitive.Root>
|
||||
13
src/lib/components/ui/avatar/index.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import Fallback from './avatar-fallback.svelte'
|
||||
import Image from './avatar-image.svelte'
|
||||
import Root from './avatar.svelte'
|
||||
|
||||
export {
|
||||
Root,
|
||||
Image,
|
||||
Fallback,
|
||||
//
|
||||
Root as Avatar,
|
||||
Image as AvatarImage,
|
||||
Fallback as AvatarFallback
|
||||
}
|
||||
19
src/lib/components/ui/badge/badge.svelte
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<script lang='ts'>
|
||||
import { type Variant, badgeVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
let className: string | undefined | null = ''
|
||||
export let href: string | undefined = ''
|
||||
export let variant: Variant = 'default'
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<svelte:element
|
||||
this={href ? 'a' : 'span'}
|
||||
{href}
|
||||
class={cn(badgeVariants({ variant, className }))}
|
||||
{...$$restProps}
|
||||
>
|
||||
<slot />
|
||||
</svelte:element>
|
||||
22
src/lib/components/ui/badge/index.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
|
||||
export { default as Badge } from './badge.svelte'
|
||||
export const badgeVariants = tv({
|
||||
base: 'focus:ring-ring inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2',
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground border-transparent shadow',
|
||||
secondary: 'bg-secondary text-secondary-foreground border-transparent',
|
||||
destructive: 'bg-destructive text-destructive-foreground border-transparent shadow',
|
||||
outline: 'text-foreground',
|
||||
success: 'bg-[#21b959] text-primary-foreground border-transparent shadow',
|
||||
warning: 'bg-[#eab308] text-primary-foreground border-transparent shadow',
|
||||
error: 'bg-[#bf2c2c] text-primary-foreground border-transparent shadow'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'default'
|
||||
}
|
||||
})
|
||||
|
||||
export type Variant = VariantProps<typeof badgeVariants>['variant']
|
||||
49
src/lib/components/ui/banner/banner-image.svelte
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<script lang='ts' context='module'>
|
||||
import { writable } from 'simple-store-svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
export const bannerSrc = writable<Media | null>(null)
|
||||
|
||||
export const hideBanner = writable(false)
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import { Banner } from '../img'
|
||||
|
||||
import type { HTMLAttributes } from 'svelte/elements'
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLImageElement>
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class } // TODO: needs nice animations, should update to coverimage on mobile width
|
||||
</script>
|
||||
|
||||
{#if $bannerSrc}
|
||||
<div class={cn('object-cover w-screen absolute top-0 left-0 h-full overflow-hidden pointer-events-none bg-black banner', className)}>
|
||||
{#key $bannerSrc.id}
|
||||
<Banner media={$bannerSrc} class='min-w-[100vw] w-screen h-[23rem] object-cover {$hideBanner ? 'opacity-10' : 'opacity-100'} transition-opacity duration-500 banner-gr relative' />
|
||||
{/key}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
:global(div.banner-gr::after) {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; bottom: 0;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
background: linear-gradient(1turn, rgb(3, 3, 3) 8.98%, rgba(0, 0, 0, 0) 100%);
|
||||
}
|
||||
.banner::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; top: 0;
|
||||
width: 100%; height: 23rem;
|
||||
z-index: 0;
|
||||
background: rgba(0, 0, 0, .4);
|
||||
}
|
||||
</style>
|
||||
50
src/lib/components/ui/banner/banner.svelte
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<script lang='ts' context='module'>
|
||||
import { client, currentSeason, currentYear } from '$lib/modules/anilist'
|
||||
|
||||
const query = client.search({ sort: ['POPULARITY_DESC'], perPage: 15, season: currentSeason, seasonYear: currentYear, statusNot: ['NOT_YET_RELEASED'] }, true)
|
||||
query.subscribe(() => undefined) // this is hacky as shit, but prevents query from re-running
|
||||
</script>
|
||||
|
||||
<script lang='ts'>
|
||||
import { onDestroy } from 'svelte'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
import FullBanner from './full-banner.svelte'
|
||||
import SkeletonBanner from './skeleton-banner.svelte'
|
||||
|
||||
onDestroy(() => {
|
||||
query.pause()
|
||||
})
|
||||
|
||||
if (get(query.isPaused$)) query.resume()
|
||||
</script>
|
||||
|
||||
<div class='w-full h-[400px] relative'>
|
||||
<!-- really shit and hacky way of fixing scroll position jumping when banner changes height -->
|
||||
<div class='absolute top-0 transparent h-full opacity-0'>.</div>
|
||||
{#if $query.fetching}
|
||||
<SkeletonBanner />
|
||||
{/if}
|
||||
{#if $query.error}
|
||||
<div class='p-5 flex items-center justify-center w-full h-72'>
|
||||
<div>
|
||||
<div class='mb-1 font-bold text-4xl text-center '>
|
||||
Ooops!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
Looks like something went wrong!
|
||||
</div>
|
||||
<div class='text-lg text-center text-muted-foreground'>
|
||||
{$query.error.message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if $query.data}
|
||||
{#if $query.data.Page?.media}
|
||||
<FullBanner mediaList={$query.data.Page.media} />
|
||||
{:else}
|
||||
<SkeletonBanner />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
138
src/lib/components/ui/banner/full-banner.svelte
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
<script lang='ts'>
|
||||
import { onDestroy } from 'svelte'
|
||||
|
||||
import { BookmarkButton, FavoriteButton, PlayButton } from '../button/extra'
|
||||
|
||||
import { bannerSrc } from './banner-image.svelte'
|
||||
|
||||
import { desc, duration, format, season, title, type Media } from '$lib/modules/anilist'
|
||||
import { of } from '$lib/modules/auth'
|
||||
import { click } from '$lib/modules/navigate'
|
||||
export let mediaList: Array<Media | null>
|
||||
|
||||
function shuffle <T extends unknown[]> (array: T): T {
|
||||
let currentIndex = array.length
|
||||
let randomIndex
|
||||
|
||||
while (currentIndex > 0) {
|
||||
randomIndex = Math.floor(Math.random() * currentIndex--);
|
||||
|
||||
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]]
|
||||
}
|
||||
|
||||
return array
|
||||
}
|
||||
|
||||
function shuffleAndFilter (media: Array<Media | null>) {
|
||||
return shuffle(media).filter(media => media?.bannerImage ?? media?.trailer?.id).slice(0, 5) as Media[]
|
||||
}
|
||||
|
||||
const shuffled = shuffleAndFilter(mediaList)
|
||||
|
||||
// TODO: this assertion is incorrect!
|
||||
let current = shuffled[0]!
|
||||
|
||||
const initial = bannerSrc.value
|
||||
|
||||
$: bannerSrc.value = current
|
||||
|
||||
onDestroy(() => {
|
||||
bannerSrc.value = initial
|
||||
})
|
||||
|
||||
function currentIndex () {
|
||||
return shuffled.indexOf(current)
|
||||
}
|
||||
|
||||
function schedule (index: number) {
|
||||
return setTimeout(() => {
|
||||
current = shuffled[index % shuffled.length]!
|
||||
timeout = schedule(index + 1)
|
||||
}, 15000)
|
||||
}
|
||||
|
||||
let timeout = schedule(currentIndex() + 1)
|
||||
|
||||
function setCurrent (media: Media) {
|
||||
if (current === media) return
|
||||
clearTimeout(timeout)
|
||||
current = media
|
||||
timeout = schedule(currentIndex() + 1)
|
||||
}
|
||||
function tabindex (node: HTMLElement) {
|
||||
node.tabIndex = -1
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class='pl-5 pb-5 justify-end flex flex-col h-full max-w-full'>
|
||||
{#key current}
|
||||
<a class='text-white font-black text-4xl line-clamp-1 w-[900px] max-w-full leading-tight fade-in hover:text-neutral-300 hover:underline cursor-pointer' href='/app/anime/{current.id}'>
|
||||
{title(current)}
|
||||
</a>
|
||||
<div class='details text-white capitalize pt-3 pb-2 flex w-[600px] max-w-full text-xs fade-in'>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{format(current)}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{of(current) ?? duration(current) ?? 'N/A'}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{season(current)}
|
||||
</span>
|
||||
</div>
|
||||
<div class='text-muted-foreground line-clamp-2 w-[600px] max-w-full text-sm fade-in'>
|
||||
{desc(current)}
|
||||
</div>
|
||||
<div class='details text-white text-capitalize py-3 flex w-[600px] max-w-full text-xs fade-in'>
|
||||
{#each current.genres ?? [] as genre (genre)}
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{genre}
|
||||
</span>
|
||||
{/each}
|
||||
</div>
|
||||
<div class='flex flex-row pb-2 w-[230px] max-w-full'>
|
||||
<PlayButton media={current} class='grow' />
|
||||
<FavoriteButton media={current} class='ml-2' />
|
||||
<BookmarkButton media={current} class='ml-2' />
|
||||
</div>
|
||||
{/key}
|
||||
<div class='flex'>
|
||||
{#each shuffled as media (media.id)}
|
||||
{@const active = current === media}
|
||||
<div class='pt-2 pb-1' class:cursor-pointer={!active} use:click={() => setCurrent(media)} use:tabindex>
|
||||
<div class='bg-neutral-800 mr-2 progress-badge overflow-clip rounded' class:active style='height: 4px;' style:width={active ? '3rem' : '1.5rem'}>
|
||||
<div class='progress-content h-full transform-gpu w-full' class:bg-white={active} />
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.progress-badge {
|
||||
transition: width .7s ease;
|
||||
}
|
||||
.progress-badge.active .progress-content {
|
||||
animation: fill 15s linear;
|
||||
}
|
||||
|
||||
@keyframes fill {
|
||||
from {
|
||||
transform: translate3d(-100%, var(--tw-translate-y), 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0%, var(--tw-translate-y), 0);
|
||||
}
|
||||
}
|
||||
.details span + span::before {
|
||||
content: '•';
|
||||
padding: 0 .5rem;
|
||||
font-size: .6rem;
|
||||
align-self: center;
|
||||
white-space: normal;
|
||||
color: #737373 !important;
|
||||
}
|
||||
.fade-in {
|
||||
animation: fade-in ease .8s;
|
||||
}
|
||||
</style>
|
||||
3
src/lib/components/ui/banner/index.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { default as BannerImage } from './banner-image.svelte'
|
||||
export { default as Banner } from './banner.svelte'
|
||||
export * from './banner-image.svelte'
|
||||
11
src/lib/components/ui/banner/skeleton-banner.svelte
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<div class='pl-5 pb-5 justify-end flex flex-col h-full max-w-full'>
|
||||
<div class='bg-primary/5 animate-pulse rounded w-[500px] h-6 mb-1' />
|
||||
<div class='my-5 h-1.5 w-[250px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='h-2.5 w-[450px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[350px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[300px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='h-2.5 w-[250px] bg-primary/5 animate-pulse rounded mb-2' />
|
||||
<div class='my-3 h-1.5 w-[150px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='mb-4 h-6 w-[160px] bg-primary/5 animate-pulse rounded' />
|
||||
<div class='mb-3' />
|
||||
</div>
|
||||
32
src/lib/components/ui/button/bookmark.svelte
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<script lang='ts'>
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Bookmark } from '$lib/components/icons/animated'
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { list, authAggregator, lists } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
async function toggleBookmark () {
|
||||
if (!list(media)) {
|
||||
await authAggregator.entry({ id: media.id, status: 'PLANNING', lists: lists(media)?.filter(({ enabled }) => enabled).map(({ name }) => name) })
|
||||
} else {
|
||||
await authAggregator.delete(media)
|
||||
}
|
||||
++key
|
||||
}
|
||||
let key = 1
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'animated-icon')} on:click={clickwrap(toggleBookmark)} on:keydown={keywrap(toggleBookmark)}>
|
||||
<Bookmark fill={key && list(media) ? 'currentColor' : 'transparent'} size={iconSizes[size]} />
|
||||
</Button>
|
||||
26
src/lib/components/ui/button/button.svelte
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<script lang='ts'>
|
||||
import { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
import { type Props, buttonVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = Props
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export let variant: $$Props['variant'] = 'default'
|
||||
export let size: $$Props['size'] = 'default'
|
||||
export let builders: $$Props['builders'] = []
|
||||
export { className as class }
|
||||
</script>
|
||||
|
||||
<ButtonPrimitive.Root
|
||||
{builders}
|
||||
class={cn(buttonVariants({ variant, size, className }))}
|
||||
type='button'
|
||||
{...$$restProps}
|
||||
on:click
|
||||
on:pointerdown
|
||||
on:keydown>
|
||||
<slot />
|
||||
</ButtonPrimitive.Root>
|
||||
11
src/lib/components/ui/button/extra.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import Bookmark from './bookmark.svelte'
|
||||
import Favorite from './favorite.svelte'
|
||||
import Play from './play.svelte'
|
||||
import Transition from './transition.svelte'
|
||||
|
||||
export {
|
||||
Play as PlayButton,
|
||||
Favorite as FavoriteButton,
|
||||
Bookmark as BookmarkButton,
|
||||
Transition as TransitionButton
|
||||
}
|
||||
28
src/lib/components/ui/button/favorite.svelte
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<script lang='ts'>
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Heart } from '$lib/components/icons/animated'
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { authAggregator, fav } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
let key = 1
|
||||
|
||||
async function toggleFav () {
|
||||
await authAggregator.toggleFav(media.id)
|
||||
++key
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'animated-icon')} on:click={clickwrap(toggleFav)} on:keydown={keywrap(toggleFav)} on:click={() => ++key}>
|
||||
<Heart fill={key && fav(media) ? 'currentColor' : 'transparent'} size={iconSizes[size]} />
|
||||
</Button>
|
||||
61
src/lib/components/ui/button/index.ts
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import { type VariantProps, tv } from 'tailwind-variants'
|
||||
|
||||
import Root from './button.svelte'
|
||||
|
||||
import type { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: 'bg-transparent focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50',
|
||||
variants: {
|
||||
variant: {
|
||||
default: 'bg-primary text-primary-foreground select:bg-neutral-500 shadow',
|
||||
destructive: 'bg-destructive text-destructive-foreground select:bg-destructive/90 shadow-sm',
|
||||
outline: 'border-input bg-background select:bg-accent select:text-accent-foreground border shadow-sm',
|
||||
secondary: 'bg-secondary text-secondary-foreground select:bg-secondary/70 shadow-sm',
|
||||
ghost: 'select:bg-secondary-foreground/30 select:text-accent-foreground',
|
||||
link: 'text-primary underline-offset-4 select:underline'
|
||||
},
|
||||
size: {
|
||||
default: 'h-9 px-4 py-2',
|
||||
sm: 'h-8 rounded-md px-3 text-xs',
|
||||
xs: 'h-[1.6rem] rounded-sm px-2 text-xs',
|
||||
lg: 'h-10 rounded-md px-8',
|
||||
icon: 'h-9 w-9',
|
||||
'icon-sm': 'h-[1.6rem] w-[1.6rem] rounded-sm text-xs'
|
||||
}
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'default',
|
||||
size: 'default'
|
||||
}
|
||||
})
|
||||
|
||||
const iconSizes = {
|
||||
xs: '0.6rem',
|
||||
sm: '0.7rem',
|
||||
default: '0.8rem',
|
||||
lg: '1.2rem',
|
||||
icon: '1rem',
|
||||
'icon-sm': '0.7rem'
|
||||
}
|
||||
|
||||
type Variant = VariantProps<typeof buttonVariants>['variant']
|
||||
type Size = VariantProps<typeof buttonVariants>['size']
|
||||
|
||||
type Props = ButtonPrimitive.Props & {
|
||||
variant?: Variant
|
||||
size?: Size
|
||||
}
|
||||
|
||||
type Events = ButtonPrimitive.Events
|
||||
|
||||
export {
|
||||
Root,
|
||||
type Props,
|
||||
type Events,
|
||||
Root as Button,
|
||||
type Props as ButtonProps,
|
||||
type Events as ButtonEvents,
|
||||
buttonVariants,
|
||||
iconSizes
|
||||
}
|
||||
35
src/lib/components/ui/button/play.svelte
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<script lang='ts'>
|
||||
import Play from 'lucide-svelte/icons/play'
|
||||
|
||||
import { playEp } from '../player/mediahandler.svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist'
|
||||
|
||||
import { Button, iconSizes, type Props } from '$lib/components/ui/button'
|
||||
import { list, progress } from '$lib/modules/auth'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { media: Media }
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
export let media: Media
|
||||
export let size: NonNullable<$$Props['size']> = 'xs'
|
||||
function play () {
|
||||
const episode = (progress(media) ?? 0) + 1
|
||||
$playEp(media, episode)
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button class={cn(className, 'font-bold flex items-center justify-center')} {size} on:click={clickwrap(play)} on:keydown={keywrap(play)}>
|
||||
<Play fill='currentColor' class='mr-2' size={iconSizes[size]} />
|
||||
{@const status = list(media)}
|
||||
{#if status === 'COMPLETED'}
|
||||
Rewatch
|
||||
{:else if status === 'CURRENT' || status === 'REPEATING' || status === 'PAUSED'}
|
||||
Continue
|
||||
{:else}
|
||||
Watch Now
|
||||
{/if}
|
||||
</Button>
|
||||
61
src/lib/components/ui/button/progress-button.svelte
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<script lang='ts'>
|
||||
import { Button as ButtonPrimitive } from 'bits-ui'
|
||||
|
||||
import { type Props, buttonVariants } from './index.js'
|
||||
|
||||
import { cn } from '$lib/utils.js'
|
||||
|
||||
type $$Props = Props & { duration?: number, autoStart?: boolean, onclick: () => void, animating?: boolean }
|
||||
|
||||
export let duration = 5000 // timeout duration in ms
|
||||
export let autoStart = false
|
||||
export let variant: Props['variant'] = 'default'
|
||||
export let size: NonNullable<$$Props['size']> = 'xs'
|
||||
export let onclick: () => void
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
|
||||
export let animating = false
|
||||
|
||||
function startAnimation () {
|
||||
animating = true
|
||||
}
|
||||
|
||||
function stopAnimation () {
|
||||
animating = false
|
||||
}
|
||||
|
||||
if (autoStart) startAnimation()
|
||||
|
||||
function handleAnimationEnd () {
|
||||
animating = false
|
||||
onclick()
|
||||
}
|
||||
</script>
|
||||
|
||||
<ButtonPrimitive.Root
|
||||
class={cn(
|
||||
'relative overflow-hidden',
|
||||
buttonVariants({ variant, size, className })
|
||||
)}
|
||||
type='button'
|
||||
on:click={stopAnimation}
|
||||
on:click={onclick}>
|
||||
<slot />
|
||||
<div
|
||||
class='absolute inset-0 bg-black/20 pointer-events-none translate-x-full'
|
||||
class:animate-progress={animating}
|
||||
style='animation-duration: {duration}ms;'
|
||||
on:animationend={handleAnimationEnd} />
|
||||
</ButtonPrimitive.Root>
|
||||
|
||||
<style>
|
||||
@keyframes progressBar {
|
||||
from { transform: translateX(0%); }
|
||||
to { transform: translateX(100%); }
|
||||
}
|
||||
.animate-progress {
|
||||
animation: progressBar linear forwards;
|
||||
}
|
||||
</style>
|
||||
39
src/lib/components/ui/button/transition.svelte
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<script lang='ts'>
|
||||
import { Button, type Props } from '$lib/components/ui/button'
|
||||
import { clickwrap, keywrap } from '$lib/modules/navigate'
|
||||
import { cn, scaleBlurFade } from '$lib/utils'
|
||||
|
||||
type $$Props = Props & { duration?: number }
|
||||
export let duration: $$Props['duration'] = 300
|
||||
|
||||
let className: $$Props['class'] = ''
|
||||
export { className as class }
|
||||
|
||||
let toggled = false
|
||||
let timeout: ReturnType<typeof setTimeout>
|
||||
|
||||
export let size: NonNullable<$$Props['size']> = 'icon-sm'
|
||||
export let variant: NonNullable<$$Props['variant']> = 'ghost'
|
||||
|
||||
function handleClick () {
|
||||
if (toggled) return
|
||||
|
||||
toggled = true
|
||||
clearTimeout(timeout)
|
||||
timeout = setTimeout(() => {
|
||||
toggled = false
|
||||
}, duration! + 500)
|
||||
}
|
||||
</script>
|
||||
|
||||
<Button {size} {variant} class={cn(className, 'relative')} on:click={clickwrap(handleClick)} on:click on:keydown={keywrap(handleClick)}>
|
||||
{#if toggled}
|
||||
<div class='absolute inset-0 flex items-center justify-center' transition:scaleBlurFade={{ duration }}>
|
||||
<slot name='transition' />
|
||||
</div>
|
||||
{:else}
|
||||
<div class='absolute inset-0 flex items-center justify-center' transition:scaleBlurFade={{ duration }}>
|
||||
<slot name='base' />
|
||||
</div>
|
||||
{/if}
|
||||
</Button>
|
||||
110
src/lib/components/ui/cards/YoutubeIframe.svelte
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<script lang='ts'>
|
||||
import Volume2 from 'lucide-svelte/icons/volume-2'
|
||||
import VolumeX from 'lucide-svelte/icons/volume-x'
|
||||
import { createEventDispatcher, onDestroy } from 'svelte'
|
||||
|
||||
import { click } from '$lib/modules/navigate'
|
||||
|
||||
export let id: string
|
||||
|
||||
const dispatch = createEventDispatcher<{hide: boolean}>()
|
||||
|
||||
function ytMessage (e: MessageEvent) {
|
||||
if (e.origin !== 'https://www.youtube-nocookie.com') return
|
||||
clearInterval(timeout)
|
||||
const json = JSON.parse(e.data as string) as { event: string, info: {videoData: {isPlayable: boolean}, playerState?: number} }
|
||||
if (json.event === 'onReady') ytCall('setVolume', '[30]')
|
||||
|
||||
if (json.event === 'initialDelivery' && !json.info.videoData.isPlayable) {
|
||||
dispatch('hide', true)
|
||||
}
|
||||
|
||||
if (json.event === 'infoDelivery' && json.info.playerState === 1) {
|
||||
hide = false
|
||||
dispatch('hide', false)
|
||||
}
|
||||
}
|
||||
|
||||
let muted = true
|
||||
function toggleMute () {
|
||||
if (muted) {
|
||||
ytCall('unMute')
|
||||
} else {
|
||||
ytCall('mute')
|
||||
}
|
||||
muted = !muted
|
||||
}
|
||||
|
||||
let hide = true
|
||||
|
||||
let frame: HTMLIFrameElement
|
||||
function ytCall (action: string, arg: string | null = null) {
|
||||
frame.contentWindow?.postMessage('{"event":"command", "func":"' + action + '", "args":' + arg + '}', '*')
|
||||
}
|
||||
|
||||
let timeout: ReturnType<typeof setInterval>
|
||||
|
||||
function initFrame () {
|
||||
timeout = setInterval(() => {
|
||||
frame.contentWindow?.postMessage('{"event":"listening","id":1,"channel":"widget"}', '*')
|
||||
}, 100)
|
||||
frame.contentWindow?.postMessage('{"event":"listening","id":1,"channel":"widget"}', '*')
|
||||
}
|
||||
|
||||
onDestroy(() => {
|
||||
clearInterval(timeout)
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:window on:message={ytMessage} />
|
||||
|
||||
<!-- indivious is nice because its faster, but not reliable -->
|
||||
<!-- <video src={`https://inv.tux.pizza/latest_version?id=${media.trailer.id}&itag=18`}
|
||||
class='w-full h-full position-absolute left-0'
|
||||
class:d-none={hide}
|
||||
playsinline
|
||||
preload='none'
|
||||
loop
|
||||
use:volume
|
||||
bind:muted
|
||||
on:loadeddata={() => { hide = false }}
|
||||
autoplay /> -->
|
||||
|
||||
<div class='h-full w-full overflow-clip absolute top-0 rounded-t'>
|
||||
<div class='absolute z-10 top-0 right-0 p-3' class:hide use:click={toggleMute}>
|
||||
{#if muted}
|
||||
<VolumeX size='1rem' fill='currentColor' class='pointer-events-none' />
|
||||
{:else}
|
||||
<Volume2 size='1rem' fill='currentColor' class='pointer-events-none' />
|
||||
{/if}
|
||||
</div>
|
||||
<iframe
|
||||
class='w-full border-0 absolute left-0 h-[calc(100%+200px)] top-1/2 transform-gpu -translate-y-1/2 pointer-events-none'
|
||||
class:hide
|
||||
title='trailer'
|
||||
allow='autoplay'
|
||||
allowfullscreen
|
||||
bind:this={frame}
|
||||
on:load={initFrame}
|
||||
src='https://www.youtube-nocookie.com/embed/{id}?enablejsapi=1&autoplay=1&controls=0&mute=1&disablekb=1&loop=1&playlist={id}&cc_lang_pref=ja'
|
||||
/>
|
||||
</div>
|
||||
<div class='h-full w-full overflow-clip absolute top-0 rounded-t blur-2xl saturate-200 -z-10 pointer-events-none'>
|
||||
<iframe
|
||||
class='w-full border-0 absolute left-0 h-[calc(100%+200px)] top-1/2 transform-gpu -translate-y-1/2'
|
||||
class:hide
|
||||
title='trailer'
|
||||
allow='autoplay'
|
||||
allowfullscreen
|
||||
src='https://www.youtube-nocookie.com/embed/{id}?autoplay=1&controls=0&mute=1&disablekb=1&loop=1&playlist={id}&cc_lang_pref=ja'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.absolute {
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
.absolute.hide {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
77
src/lib/components/ui/cards/episode.svelte
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<script lang='ts'>
|
||||
import CalendarDays from 'lucide-svelte/icons/calendar-days'
|
||||
import Tv from 'lucide-svelte/icons/tv'
|
||||
|
||||
import StatusDot from '../../StatusDot.svelte'
|
||||
import { Load } from '../img'
|
||||
|
||||
import PreviewCard from './preview.svelte'
|
||||
|
||||
import type { Media } from '$lib/modules/anilist/types'
|
||||
import type { TraceAnime } from '$lib/utils'
|
||||
|
||||
import { goto } from '$app/navigation'
|
||||
import { coverMedium, format, title } from '$lib/modules/anilist/util'
|
||||
import { list } from '$lib/modules/auth'
|
||||
import { hover } from '$lib/modules/navigate'
|
||||
|
||||
export let media: Media
|
||||
|
||||
export let trace: TraceAnime | undefined
|
||||
|
||||
let hidden = true
|
||||
|
||||
function onclick () {
|
||||
goto(`/app/anime/${media.id}`)
|
||||
}
|
||||
function onhover (state: boolean) {
|
||||
hidden = !state
|
||||
}
|
||||
|
||||
$: status = list(media)
|
||||
</script>
|
||||
|
||||
<div class='text-white p-4 cursor-pointer shrink-0 relative pointer-events-auto' class:z-40={!hidden} use:hover={[onclick, onhover]}>
|
||||
{#if !hidden}
|
||||
<PreviewCard {media} {trace} />
|
||||
{/if}
|
||||
<div class='item w-[16rem] flex flex-col'>
|
||||
<div class='h-[9rem]'>
|
||||
<Load src={trace?.image ?? coverMedium(media)} alt='cover' class='object-cover w-full h-full rounded' color={media.coverImage?.color} />
|
||||
</div>
|
||||
<div class='flex justify-between pt-3 gap-2'>
|
||||
<div class='font-black text-[.8rem] line-clamp-2'>
|
||||
{#if status}
|
||||
<StatusDot variant={status} />
|
||||
{/if}
|
||||
{title(media)}
|
||||
</div>
|
||||
{#if trace}
|
||||
<div class='text-xs font-medium flex-shrink-0 text-right'>
|
||||
<div class='pt-[1px]'>
|
||||
Episode {trace.episode}
|
||||
</div>
|
||||
<div class='text-neutral-500 mt-0.5'>
|
||||
{Math.round(trace.similarity * 100)}%
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='flex text-neutral-500 mt-auto pt-2 justify-between'>
|
||||
<div class='flex text-xs font-medium'>
|
||||
<CalendarDays class='w-[1rem] h-[1rem] mr-1 -ml-0.5' />
|
||||
{media.seasonYear ?? 'TBA'}
|
||||
</div>
|
||||
<div class='flex text-xs font-medium'>
|
||||
{format(media)}
|
||||
<Tv class='w-[1rem] h-[1rem] ml-1 -mr-0.5' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
}
|
||||
</style>
|
||||
6
src/lib/components/ui/cards/index.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export { default as SmallCard } from './small.svelte'
|
||||
export { default as SkeletonCard } from './skeleton.svelte'
|
||||
export { default as SkeletonTraceCard } from './skeletontrace.svelte'
|
||||
export { default as QueryCard } from './query.svelte'
|
||||
export { default as EpisodeCard } from './episode.svelte'
|
||||
export { default as TraceCards } from './trace.svelte'
|
||||
94
src/lib/components/ui/cards/preview.svelte
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<script lang='ts'>
|
||||
import { BookmarkButton, FavoriteButton, PlayButton } from '../button/extra'
|
||||
import { Banner } from '../img'
|
||||
import Load from '../img/load.svelte'
|
||||
|
||||
import YoutubeIframe from './YoutubeIframe.svelte'
|
||||
import Videoframe from './videoframe.svelte'
|
||||
|
||||
import { desc, duration, format, season, title, type Media } from '$lib/modules/anilist'
|
||||
import { of } from '$lib/modules/auth'
|
||||
import { SUPPORTS } from '$lib/modules/settings'
|
||||
import { cn, type TraceAnime } from '$lib/utils'
|
||||
|
||||
export let media: Media
|
||||
|
||||
export let trace: TraceAnime | undefined = undefined
|
||||
|
||||
let hideFrame: boolean | null = null
|
||||
function hide (e: CustomEvent<boolean>) {
|
||||
hideFrame = e.detail
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class='!absolute w-[17.5rem] h-80 left-1/2 right-1/2 top-0 bottom-0 m-auto bg-neutral-950 z-30 rounded cursor-pointer absolute-container'>
|
||||
<div class='h-[45%] banner relative bg-black rounded-t'>
|
||||
{#if trace}
|
||||
{#if !SUPPORTS.isUnderPowered}
|
||||
<Load src={trace.image} alt={media.title?.english} class={cn('object-cover w-full h-full blur-2xl saturate-200 absolute -z-10', hideFrame === false && 'hidden')} />
|
||||
{/if}
|
||||
<Load src={trace.image} alt={media.title?.english} class='object-cover w-full h-full rounded-t' />
|
||||
<Videoframe src={trace.video} on:hide={hide} />
|
||||
{:else}
|
||||
{#if !SUPPORTS.isUnderPowered}
|
||||
<Banner {media} class={cn('object-cover w-full h-full blur-2xl saturate-200 absolute -z-10', hideFrame === false && 'hidden')} />
|
||||
{/if}
|
||||
<Banner {media} class='object-cover w-full h-full rounded-t' />
|
||||
{#if media.trailer?.id && !hideFrame && !SUPPORTS.isUnderPowered}
|
||||
<YoutubeIframe id={media.trailer.id} on:hide={hide} />
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class='w-full px-4 bg-neutral-950'>
|
||||
<div class='text-lg font-bold truncate inline-block w-full text-white pt-2' title={title(media)}>
|
||||
{title(media)}
|
||||
</div>
|
||||
<div class='flex flex-row'>
|
||||
<PlayButton {media} class='grow' />
|
||||
<FavoriteButton {media} class='ml-2' />
|
||||
<BookmarkButton {media} class='ml-2' />
|
||||
</div>
|
||||
<div class='details text-white capitalize pt-3 pb-2 flex text-[11px] overflow-clip text-ellipsis text-nowrap'>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{format(media)}
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{of(media) ?? duration(media) ?? 'N/A' }
|
||||
</span>
|
||||
<span class='text-nowrap flex items-center'>
|
||||
{season(media)}
|
||||
</span>
|
||||
{#if media.averageScore}
|
||||
<span class='text-nowrap flex items-center text-ellipsis'>
|
||||
{media.averageScore}%
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class='w-full h-full overflow-clip text-[.7rem] text-muted-foreground line-clamp-4'>
|
||||
{desc(media)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.banner::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0 ; bottom: 0;
|
||||
/* when clicking, translate fucks up the position, and video might leak down 1 or 2 pixels, stickig under the gradient, look bad */
|
||||
margin-bottom: -2px;
|
||||
width: 100%; height: 100% ;
|
||||
background: linear-gradient(180deg, #0000 0%, #0a0a0a00 80%, #0a0a0ae3 95%, #0a0a0a 100%);
|
||||
}
|
||||
.absolute-container {
|
||||
animation: 0.3s ease 0s 1 load-in;
|
||||
transform: translate3d(-50%, 0, 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(1) scaleY(1);
|
||||
opacity: 1;
|
||||
}
|
||||
@keyframes load-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate3d(-50%, 1.2rem, 0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(0.95) scaleY(0.95);
|
||||
}
|
||||
}
|
||||
</style>
|
||||