Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89c29e94c0 | ||
|
|
a2532ce0b6 | ||
|
|
7843f2db54 | ||
|
|
ea0a47fcd1 | ||
|
|
e482959612 | ||
|
|
25747ea028 | ||
|
|
8f7c6fd505 | ||
|
|
12a66ea6ae | ||
|
|
1d92db752b | ||
|
|
d496738dff | ||
|
|
2925b9d2cf | ||
|
|
e4bedabc69 | ||
|
|
8a933f1de4 | ||
|
|
3e9d2f583c | ||
|
|
d521a02201 | ||
|
|
29bb4cad5c | ||
|
|
9f5da73b17 | ||
|
|
a17537aba9 | ||
|
|
9d961c4c10 | ||
|
|
ff0b435bb6 | ||
|
|
56743466a4 | ||
|
|
f0b2a1d3a2 | ||
|
|
d581192999 | ||
|
|
a26b4db9ac | ||
|
|
2e5007ee42 | ||
|
|
6163301f2e | ||
|
|
8e670cbebe | ||
|
|
dd3210c9a1 | ||
|
|
02f4fe46e7 | ||
|
|
e6a185b6a5 | ||
|
|
1cf5b09d1a | ||
|
|
edd7238183 | ||
|
|
135c5bd39d | ||
|
|
dd764638a5 | ||
|
|
2a676c119a | ||
|
|
ccfdd37b00 | ||
|
|
5cf1d1ec06 | ||
|
|
34a982cbf3 | ||
|
|
0ee978ccfe | ||
|
|
9bd914cfb9 | ||
|
|
650e7e7b52 | ||
|
|
d2896c5ec1 | ||
|
|
4a604ca70e | ||
|
|
d58d09021c | ||
|
|
8deda0863f | ||
|
|
5a02cb8809 | ||
|
|
8ecd67baf6 | ||
|
|
f3adf1280b | ||
|
|
0494d7f070 | ||
|
|
f4faa3f140 | ||
|
|
000e46566d | ||
|
|
ed7e50475d | ||
|
|
d1971f596c | ||
|
|
c51cd0ee67 | ||
|
|
2c4772a3e5 | ||
|
|
629c4c43e8 | ||
|
|
f3262e7666 | ||
|
|
46d1182a5d | ||
|
|
594ffe4f7b | ||
|
|
f25750d994 | ||
|
|
61cb1b1da7 | ||
|
|
a838896eaa | ||
|
|
ca36a4ba44 | ||
|
|
614f02a347 | ||
|
|
59de261a1f | ||
|
|
1a48ef11ab | ||
|
|
fe77036aca | ||
|
|
e67801c67c | ||
|
|
d614bf9d67 | ||
|
|
a046ef4a16 | ||
|
|
d369af67d4 | ||
|
|
e9d554bd39 | ||
|
|
89e299cd57 | ||
|
|
b1c1989e60 | ||
|
|
6608948e2e | ||
|
|
803eb82330 | ||
|
|
4d6a9b9a15 | ||
|
|
9def292467 | ||
|
|
d5f9bfc7fb | ||
|
|
d09d11f374 | ||
|
|
6bfd7484fc | ||
|
|
40e13041f7 | ||
|
|
16fc954c8c | ||
|
|
c492d9a62b | ||
|
|
ccb94e5877 | ||
|
|
cae5088b7d | ||
|
|
4662e21a3d | ||
|
|
b2fb8ed916 | ||
|
|
e8496f9ead | ||
|
|
f85e32b9c5 | ||
|
|
ca83ddab3b | ||
|
|
a9de8a4fac | ||
|
|
ed87222874 | ||
|
|
8dab86b054 | ||
|
|
5f3b63cd43 | ||
|
|
e56bc3a1f2 | ||
|
|
e09d5bb1e1 | ||
|
|
87def91d4b | ||
|
|
b60c477164 | ||
|
|
0829f126b1 | ||
|
|
447721517a | ||
|
|
bebacbd585 | ||
|
|
59c2588709 | ||
|
|
45f9f798f3 | ||
|
|
d6d418126f | ||
|
|
f46228ac6e | ||
|
|
b2fdfdcb2d | ||
|
|
d13254effd | ||
|
|
5ea0a048f8 | ||
|
|
07e265164e | ||
|
|
6393d56c70 | ||
|
|
ef5ff12f38 | ||
|
|
180ca72cd9 | ||
|
|
9ab7c6f4fe | ||
|
|
fd634bc532 | ||
|
|
38a9287b0a | ||
|
|
99f4ad3d04 | ||
|
|
cb333d3cd4 | ||
|
|
a57c46ca44 | ||
|
|
84c832d941 | ||
|
|
1e11b0154f | ||
|
|
ef1ae42bda | ||
|
|
c4952724af | ||
|
|
c302ef69f0 | ||
|
|
32adb4f8f4 | ||
|
|
50f2c727fe | ||
|
|
c0da83cbdd | ||
|
|
506d4ec625 | ||
|
|
900efbc05d | ||
|
|
2d610caa4b | ||
|
|
77f63b66cc | ||
|
|
e66248a23a | ||
|
|
d3110bf10c | ||
|
|
2c27e12847 | ||
|
|
4e3f28e421 | ||
|
|
b797fedced | ||
|
|
6b0c6632a9 | ||
|
|
f49e7d9d43 | ||
|
|
0786a5df61 | ||
|
|
99546280d9 | ||
|
|
07f1539ec9 | ||
|
|
1800940d1d | ||
|
|
3dc996ddf1 | ||
|
|
a6e66aa02a | ||
|
|
78c0949439 | ||
|
|
7537dcb3fc | ||
|
|
378e120c65 | ||
|
|
edb46ab05b | ||
|
|
3582c1e063 | ||
|
|
a679149d03 | ||
|
|
811d1b11e6 | ||
|
|
a29837a4a1 | ||
|
|
6b2b90e92c | ||
|
|
96e3a3de69 | ||
|
|
a3047c96e5 | ||
|
|
0b36f05b98 | ||
|
|
0fc907d879 | ||
|
|
342a5dccab | ||
|
|
dcbec83aac | ||
|
|
b50a9c2fc5 | ||
|
|
10d6dab773 | ||
|
|
bc570810ca | ||
|
|
ffcda7a7a0 | ||
|
|
b59aa0e9ba | ||
|
|
0b7bcd7193 | ||
|
|
8298808db8 | ||
|
|
8fdc2d1b4d | ||
|
|
52fa28cac6 | ||
|
|
7bcbd3beb4 | ||
|
|
c31816b055 | ||
|
|
06cd28b590 | ||
|
|
7df92d319a | ||
|
|
be0ff402d8 | ||
|
|
e9d8415d7f | ||
|
|
53c36fba23 | ||
|
|
dca8031c09 | ||
|
|
0a4068e163 | ||
|
|
511747b720 | ||
|
|
ded3102afe | ||
|
|
57d7d01c4e | ||
|
|
ac263f9928 | ||
|
|
57bdb21d02 | ||
|
|
6742196e92 | ||
|
|
3939c9842f | ||
|
|
769ab50f1a | ||
|
|
8f3e5ec8a9 | ||
|
|
73b6992200 | ||
|
|
e1e6459b96 | ||
|
|
b2f1ac1913 | ||
|
|
ce26d8faf5 | ||
|
|
17c839d59c | ||
|
|
69f8bf97d4 | ||
|
|
2eb18d124f | ||
|
|
7d53cefaf2 | ||
|
|
00cf58c414 | ||
|
|
e3ec2f52f7 | ||
|
|
d69ab118bb | ||
|
|
ae933361a3 | ||
|
|
0d45f243ac | ||
|
|
0871e10cf8 | ||
|
|
51fbba9cb6 | ||
|
|
ed6cda24ee | ||
|
|
80c82e25c9 | ||
|
|
035f6b8baa | ||
|
|
84d2b6a3fe | ||
|
|
0aa54f18ba | ||
|
|
a3b0dad057 | ||
|
|
cad35e6ad4 | ||
|
|
1e02a888b5 | ||
|
|
ebc75dae1b | ||
|
|
6493eaffc4 | ||
|
|
d8a1596f11 | ||
|
|
9725b4db94 | ||
|
|
36c01cd57f | ||
|
|
6202b3ab5c | ||
|
|
c3373f3bdc | ||
|
|
72adf1d628 | ||
|
|
aa43b839eb | ||
|
|
3299a61d83 | ||
|
|
3874575a34 | ||
|
|
35398ce62b | ||
|
|
1e87ac616b | ||
|
|
3fbfbc1532 | ||
|
|
5c6fbdf5b8 | ||
|
|
eb40c081b4 | ||
|
|
7b0dccd596 | ||
|
|
04db6a4250 | ||
|
|
26a517726c | ||
|
|
bf8c4f0b70 | ||
|
|
b96eea8a00 | ||
|
|
3032987904 | ||
|
|
a81c1d25bc | ||
|
|
2b0b5ed884 | ||
|
|
56f73d270a | ||
|
|
84cb7c3730 | ||
|
|
3ccf39512b | ||
|
|
7bd226c07e | ||
|
|
1d9bd23a77 | ||
|
|
7fce7f96a5 | ||
|
|
dcc1f4ee1f | ||
|
|
37b1a3731d | ||
|
|
3eea85b547 | ||
|
|
dc73d73171 | ||
|
|
d57ecf214d | ||
|
|
b6c23960eb | ||
|
|
51843c3298 | ||
|
|
678cdc43a5 | ||
|
|
605a08b4ba | ||
|
|
c4b5de5f98 | ||
|
|
6406495098 | ||
|
|
90003d2012 | ||
|
|
0609ae50e1 | ||
|
|
d5d85a1260 | ||
|
|
45e5298cca | ||
|
|
1822a6bf97 | ||
|
|
e103240f12 | ||
|
|
58dc6adc5a | ||
|
|
e798e7024b | ||
|
|
408d7c4fd5 | ||
|
|
d8880c9679 | ||
|
|
800e66ca87 | ||
|
|
6f5902b263 | ||
|
|
6198ed5ea3 | ||
|
|
fddff8afbc | ||
|
|
1ba1569895 | ||
|
|
4d2d8d0138 | ||
|
|
c7bad1b0a6 | ||
|
|
4c9119fccf | ||
|
|
25eb5367e0 | ||
|
|
de696247a5 | ||
|
|
f472d25001 | ||
|
|
b1f682e683 | ||
|
|
86c6a48065 | ||
|
|
46523c4997 | ||
|
|
29e4b45198 | ||
|
|
d1fe5c4c9d | ||
|
|
3cd285e076 | ||
|
|
e9761c6b91 | ||
|
|
35b2b6db92 | ||
|
|
6077434854 | ||
|
|
dc44e085cc | ||
|
|
b5952f1415 | ||
|
|
894a9cbd0c | ||
|
|
fbbf94c793 | ||
|
|
92a8e9f116 | ||
|
|
74c24959a9 | ||
|
|
3f23f50038 | ||
|
|
900e6897b9 | ||
|
|
b4e2fcabf6 | ||
|
|
18e3f69ae8 | ||
|
|
dda4b604a1 | ||
|
|
a51fe5f826 | ||
|
|
0ffbb58621 | ||
|
|
affa9c4b38 | ||
|
|
f3a56348c1 | ||
|
|
4a5dcfb704 | ||
|
|
e4d9fff148 | ||
|
|
518876bfb0 | ||
|
|
b7bf42ecd3 | ||
|
|
558d58b721 | ||
|
|
cbadbf907f | ||
|
|
c6f7bf91c3 | ||
|
|
30d39e70ac | ||
|
|
0ec415eeb1 | ||
|
|
a11089e1cf | ||
|
|
72236c08d6 | ||
|
|
b312d28be3 | ||
|
|
7fa47e955a | ||
|
|
ff02445301 | ||
|
|
5a5fb99ee2 | ||
|
|
c6147418d9 | ||
|
|
536353239a | ||
|
|
f693e2835a | ||
|
|
0bf452c906 | ||
|
|
7dfbb9f40a | ||
|
|
d1235148ff | ||
|
|
52bb4ce4c3 | ||
|
|
62d1dc98ad | ||
|
|
0b5983f2cd | ||
|
|
35984777a8 | ||
|
|
e6cb91bb74 | ||
|
|
b83917c6bb | ||
|
|
31e787f864 | ||
|
|
0f804c5d09 | ||
|
|
48eb47b852 | ||
|
|
0f11d7e337 | ||
|
|
daa8d4c11e | ||
|
|
e675e9671d | ||
|
|
668fcefdc3 | ||
|
|
f7c3ba1976 | ||
|
|
ebbfaf8ce6 | ||
|
|
8642d70669 | ||
|
|
7fb47c6331 | ||
|
|
04db728099 | ||
|
|
e1463b06ac | ||
|
|
e4d6e15499 | ||
|
|
c1983f6037 | ||
|
|
b319a92612 | ||
|
|
97ae8f9071 | ||
|
|
435a32aa56 | ||
|
|
ff5d6bc46b | ||
|
|
1262531cdc | ||
|
|
de40ee70f8 | ||
|
|
4da05b5cbc | ||
|
|
8044fadc35 | ||
|
|
f7e2535a57 | ||
|
|
258c5079ee | ||
|
|
4c6e1610ab | ||
|
|
ee768c20ce | ||
|
|
70c7f08b8a | ||
|
|
5063047312 | ||
|
|
26f0ac4b1d | ||
|
|
52d67b6e6e | ||
|
|
b9e9bbff4a | ||
|
|
7aee4a4c4c | ||
|
|
1ab575a424 | ||
|
|
6771ce15dc | ||
|
|
748525c417 | ||
|
|
94d4623ff6 | ||
|
|
8e080da8b1 | ||
|
|
946056c729 | ||
|
|
5e2657d742 | ||
|
|
0571924dc1 | ||
|
|
2902ce08c6 | ||
|
|
ea3011b0db | ||
|
|
16a9d159e8 | ||
|
|
7772a77335 | ||
|
|
d88dafc09f | ||
|
|
dbc198ce85 | ||
|
|
a9fb242e23 | ||
|
|
d5482cd50d | ||
|
|
9a98bc5a68 | ||
|
|
66231fdcaa | ||
|
|
c12d1cf31d | ||
|
|
2fb72bb809 | ||
|
|
aa6a105c77 | ||
|
|
e82516dcc6 | ||
|
|
551a28f6f9 | ||
|
|
b3f3d07188 | ||
|
|
6cf10a5e04 | ||
|
|
aa03d5c48b | ||
|
|
537ac3fbc9 | ||
|
|
a26cc56172 | ||
|
|
c7358bbf7f | ||
|
|
a699a9e4a1 | ||
|
|
715455490d | ||
|
|
7d9b7dc516 | ||
|
|
94ea5ff719 | ||
|
|
120f0dbbef | ||
|
|
37d8f2ff72 | ||
|
|
00b8d6d297 | ||
|
|
504d4e0666 | ||
|
|
add5fd9b9a | ||
|
|
6e02fa0784 | ||
|
|
d3f7bb8072 | ||
|
|
874476d4da | ||
|
|
042669f9cc | ||
|
|
7ee57ccd22 | ||
|
|
4113fe3cd4 | ||
|
|
ea6a8bd341 | ||
|
|
83d1276b71 | ||
|
|
1799ca62ae | ||
|
|
a6aa0e0e16 | ||
|
|
c92620e324 | ||
|
|
31ca647ca3 | ||
|
|
7f37df42de | ||
|
|
8cbdb5a7f2 | ||
|
|
86a4255b6d | ||
|
|
9715859626 | ||
|
|
2a5e57fd39 | ||
|
|
7c84ca9fa3 | ||
|
|
0b1d8ad60f | ||
|
|
a9a8b87239 | ||
|
|
2ff10b0dc7 | ||
|
|
e687dbd9c2 | ||
|
|
a5c87be832 | ||
|
|
c609c59371 | ||
|
|
9085357e39 | ||
|
|
ac3eb00884 | ||
|
|
d33aa5712e | ||
|
|
bbea0de47f | ||
|
|
cd59867278 | ||
|
|
9e8cee534c | ||
|
|
9133475ce1 | ||
|
|
ecb825e5e0 | ||
|
|
ee7b1ebd20 | ||
|
|
7539f40d02 | ||
|
|
a998d849f7 | ||
|
|
844d6bdeb4 | ||
|
|
0198e975a8 | ||
|
|
1a402891a4 | ||
|
|
83664890d9 | ||
|
|
da55330901 | ||
|
|
cf733f7912 | ||
|
|
4cdf85dda4 | ||
|
|
26d06ffebd | ||
|
|
bdf0aa7ccf | ||
|
|
8f28c8c704 | ||
|
|
1d59b2fb21 | ||
|
|
d4ce0b1017 | ||
|
|
6ab9338709 | ||
|
|
1754cc5c95 | ||
|
|
4895d235f7 | ||
|
|
9c1f079f7e | ||
|
|
07575cdf25 | ||
|
|
d58b1a13fe | ||
|
|
455f1a8074 | ||
|
|
8dadc44c65 | ||
|
|
bf9628ed74 | ||
|
|
f4d5348a60 | ||
|
|
4949526d3f | ||
|
|
79c28b0ee9 | ||
|
|
b8c559eb19 | ||
|
|
72f7c3d990 | ||
|
|
a1d17bee3f | ||
|
|
9af53e5571 | ||
|
|
6b81875c47 | ||
|
|
482de39af9 | ||
|
|
0091a25efb | ||
|
|
8af1bef216 | ||
|
|
4f6ecd0156 | ||
|
|
24a854f5f3 | ||
|
|
70f48dbebf | ||
|
|
bf5596a5d2 | ||
|
|
4a0b28548d | ||
|
|
467377717a | ||
|
|
14219f72d6 | ||
|
|
c09588dacd | ||
|
|
14cebeebe5 | ||
|
|
b8ae69f79b | ||
|
|
7940d45510 | ||
|
|
e8bc646396 | ||
|
|
17159099c3 | ||
|
|
e6ec709541 | ||
|
|
7ce7c36e67 | ||
|
|
b6c9592259 | ||
|
|
41ab4cdf4b | ||
|
|
3d0220aa2d | ||
|
|
85aeb3f301 | ||
|
|
a18a8885af | ||
|
|
24e1200bfc | ||
|
|
a149d16206 | ||
|
|
9be17015f0 | ||
|
|
d6ebca736e | ||
|
|
ae0f8efad6 | ||
|
|
15fe1cd9b7 | ||
|
|
7a6a4b828c | ||
|
|
014983566c | ||
|
|
cd8cfe26a6 | ||
|
|
d309007080 | ||
|
|
dabb3f0947 | ||
|
|
3d50e48a85 | ||
|
|
2b4c3b78a2 | ||
|
|
3efdc8a5ee | ||
|
|
4f1e13d1a7 | ||
|
|
03c62f994d | ||
|
|
fe5a4a41ef | ||
|
|
3d6d9ed2cf | ||
|
|
077ae7358d | ||
|
|
f140f81f9b | ||
|
|
20957db13d | ||
|
|
01d816dfcc | ||
|
|
a871ee9a73 | ||
|
|
282dfe5672 | ||
|
|
005047445d | ||
|
|
1fbb777dec | ||
|
|
3680f67795 | ||
|
|
25fb645451 | ||
|
|
810332a009 | ||
|
|
309c733207 | ||
|
|
665c0a93bc | ||
|
|
abfe297991 | ||
|
|
565a92e98d | ||
|
|
5e2eab040a | ||
|
|
2b8ed62606 | ||
|
|
3e8b26888e | ||
|
|
6fbfc9a9dc | ||
|
|
bc69ea78d7 | ||
|
|
1f2ec0a4a6 | ||
|
|
a9115e903f | ||
|
|
e6eb4ab7e8 | ||
|
|
d152ad9301 | ||
|
|
e6b6ea6f3c | ||
|
|
fcd63274d4 | ||
|
|
fefb2b0a15 | ||
|
|
31c57d5b55 | ||
|
|
0df26325d7 | ||
|
|
69694a459f | ||
|
|
775b96454e | ||
|
|
94ab3c5ba9 | ||
|
|
c44493bd8c | ||
|
|
eab5434c7b | ||
|
|
c543ccd774 | ||
|
|
a0253c6862 | ||
|
|
16376a52ac | ||
|
|
547cafa8ba | ||
|
|
a710f345d3 | ||
|
|
a950c6777b | ||
|
|
77cc18eadb | ||
|
|
38863d0b8a | ||
|
|
c637cb40b2 | ||
|
|
ec283c013b | ||
|
|
b9b6c1d381 | ||
|
|
4661578d8f | ||
|
|
dfcb9364be | ||
|
|
f1bdcb4030 | ||
|
|
cf40763f47 | ||
|
|
8f60bf683b | ||
|
|
0b7fa80ca6 | ||
|
|
1445ba86d4 | ||
|
|
650000790c | ||
|
|
fb3109e648 | ||
|
|
6ea8439343 | ||
|
|
d97734944d | ||
|
|
8cbb09f912 | ||
|
|
d5e171b1bd | ||
|
|
344ac42008 | ||
|
|
028824cb3e | ||
|
|
1c153e5249 | ||
|
|
f9bfcf7fb4 | ||
|
|
9b7fc7255f | ||
|
|
c06810f9c2 | ||
|
|
cd4cc07c41 | ||
|
|
ef82c68eeb | ||
|
|
23b3eefad2 | ||
|
|
7850d08cc1 | ||
|
|
7597a244fd | ||
|
|
93b92be14a | ||
|
|
5d5f5ae355 | ||
|
|
4bae8c4b7d | ||
|
|
900e560242 | ||
|
|
6e1955c019 | ||
|
|
e440aa19f4 | ||
|
|
636baa4941 | ||
|
|
84a7b14cab | ||
|
|
80bf7cd76b | ||
|
|
6e26dbb174 | ||
|
|
8ae9492686 | ||
|
|
9a23fc32fc | ||
|
|
04796774a1 | ||
|
|
cf853b402c | ||
|
|
39e1c9bf0d | ||
|
|
ae92e3d091 | ||
|
|
e52372766d | ||
|
|
ac75dbbfc5 | ||
|
|
2e4a887293 | ||
|
|
5cae8d75d8 | ||
|
|
f5be0fa80e | ||
|
|
5c994cf246 | ||
|
|
3862f9b871 | ||
|
|
d2b7d94183 | ||
|
|
5bcc9b0c7c | ||
|
|
3e4b627172 | ||
|
|
01762ea804 | ||
|
|
00f2704190 | ||
|
|
ac0de4ee4c | ||
|
|
03aef80f82 | ||
|
|
7e8fdca1b5 | ||
|
|
da0186839d | ||
|
|
4d1db4ae6c | ||
|
|
1fb777934a | ||
|
|
0bd41e38d9 | ||
|
|
e71f2541ef | ||
|
|
0e35c6a1e9 | ||
|
|
4787758551 | ||
|
|
6c072b8b2b | ||
|
|
fc248f9579 | ||
|
|
99e62c3c62 | ||
|
|
450c9e9130 | ||
|
|
f4ebf93233 | ||
|
|
c3fed760cd | ||
|
|
b874fbef30 | ||
|
|
c281b232df | ||
|
|
c3bc79bc97 | ||
|
|
3b4baf7a4d | ||
|
|
60836fbe0a | ||
|
|
94476ea6b0 | ||
|
|
a2c0af1e57 | ||
|
|
7a60d00181 | ||
|
|
0bf7279c00 | ||
|
|
1901e09926 | ||
|
|
528520cbce | ||
|
|
358924d1f8 | ||
|
|
c6b2100993 | ||
|
|
6b3b98811e | ||
|
|
a1219c4a80 | ||
|
|
ee28174b2d | ||
|
|
eb5dabc797 | ||
|
|
926122b570 | ||
|
|
fad8271b8b | ||
|
|
9009d238d2 | ||
|
|
c578b0fb06 | ||
|
|
6609ea83db | ||
|
|
535ef6cc2b | ||
|
|
2f4b9b4604 | ||
|
|
d025866c83 | ||
|
|
660990f1f2 | ||
|
|
a3c31864ca | ||
|
|
b00497d755 | ||
|
|
b4dbb0a0d5 | ||
|
|
817226765d | ||
|
|
f43f68c0ee | ||
|
|
b15419322d | ||
|
|
5964b257c3 | ||
|
|
9a8d5f334d | ||
|
|
005811bb0b | ||
|
|
21150a21c4 | ||
|
|
f820d59542 | ||
|
|
c3e4a6b16c | ||
|
|
c28c21ab6e | ||
|
|
1cc0748558 | ||
|
|
9ce14dcb3a | ||
|
|
b29737458f | ||
|
|
eafb89862f | ||
|
|
e19cdc70f8 | ||
|
|
40aeda5bf3 | ||
|
|
b1eec1a946 | ||
|
|
4b91dffd60 | ||
|
|
5c9ad22aa7 | ||
|
|
c828b04004 | ||
|
|
603f33bcf9 | ||
|
|
9423d6e14f | ||
|
|
98c37cc322 | ||
|
|
45d4fa3d66 | ||
|
|
c4a9ee5100 | ||
|
|
189c7ca167 | ||
|
|
e35dfc44e5 | ||
|
|
0ae5e6a7b1 | ||
|
|
08dd82d3af | ||
|
|
3a08cf4545 | ||
|
|
6a405b26a1 | ||
|
|
1483a8e392 | ||
|
|
c3ebefdb0a | ||
|
|
e647c714a4 | ||
|
|
d8cefd5cd5 | ||
|
|
1400f755b0 | ||
|
|
b1e7361aa4 | ||
|
|
73436b8913 | ||
|
|
a34c7120c9 | ||
|
|
bde046a4f4 | ||
|
|
cef8e92087 | ||
|
|
f3d8764ac1 | ||
|
|
c477a679e4 | ||
|
|
a2092f53a8 | ||
|
|
577869a563 | ||
|
|
af2f32768b | ||
|
|
ae34063832 | ||
|
|
3450bc45c0 | ||
|
|
83a7cd0741 | ||
|
|
e443f8e98f | ||
|
|
3ac2aed2fe | ||
|
|
e9769a5192 | ||
|
|
009890a6d6 | ||
|
|
e6f6ce8697 | ||
|
|
6ba41dfcbe | ||
|
|
3b50119095 | ||
|
|
d8acb40918 | ||
|
|
1a7c5a5321 | ||
|
|
6785c6168e | ||
|
|
974b537012 | ||
|
|
6e3107dda1 | ||
|
|
b5c8a1d14e | ||
|
|
231136c807 | ||
|
|
8590f84867 | ||
|
|
c4566f68d0 | ||
|
|
56b2d071a7 | ||
|
|
33410cf7a3 | ||
|
|
c9f3f78bd8 | ||
|
|
5b91fa96c7 | ||
|
|
614c6946fb | ||
|
|
53138b50c8 | ||
|
|
5c290a35d1 | ||
|
|
3acd81b63c | ||
|
|
701267a5f1 | ||
|
|
fc5d880c74 | ||
|
|
e10cfa6e14 | ||
|
|
e734c38e9d | ||
|
|
e393af49a2 | ||
|
|
7bb1699031 | ||
|
|
e7e20e3b2b | ||
|
|
8311361da2 | ||
|
|
5a3c6e2fc7 | ||
|
|
e4dc80f830 | ||
|
|
13da532325 | ||
|
|
cfe06b4c17 | ||
|
|
0aa2b6c5e8 | ||
|
|
6eda021cbd | ||
|
|
25a7d22c9b | ||
|
|
a93e04eaec | ||
|
|
d48105d1b9 | ||
|
|
6ad6deb152 | ||
|
|
a162c1eb82 | ||
|
|
bbd0aa1f10 | ||
|
|
75b4d907b3 | ||
|
|
5524ab37d3 | ||
|
|
84fcb7621f | ||
|
|
fdaffa622a | ||
|
|
8fe3d3b3cd | ||
|
|
9c1c05b612 | ||
|
|
0126cd37e8 | ||
|
|
63fc7b390a | ||
|
|
1de7110be5 | ||
|
|
ed65a9be66 | ||
|
|
fd5df3531c | ||
|
|
4add303fe7 | ||
|
|
7c2f319f23 | ||
|
|
ddc2a0dc53 | ||
|
|
3061ee05a7 | ||
|
|
9216180019 | ||
|
|
80a02d79ba | ||
|
|
bf981d4d27 | ||
|
|
76615cc34a | ||
|
|
f950028455 | ||
|
|
e450041d71 | ||
|
|
c2ff8d225e | ||
|
|
a33f420e25 | ||
|
|
819cd2729b | ||
|
|
786905ba79 | ||
|
|
abc7a68fc4 | ||
|
|
2c95ac0708 | ||
|
|
e509e118b5 | ||
|
|
14d9b60b6d | ||
|
|
1c6eb9f60c | ||
|
|
8be19e2b99 | ||
|
|
7f37e03fb9 | ||
|
|
daa6c974c7 | ||
|
|
fc77fbcaa1 | ||
|
|
80ca1a38ca | ||
|
|
14c8bfc749 | ||
|
|
eb34e0f41c | ||
|
|
13aaa81d9a | ||
|
|
8a6bec0b25 | ||
|
|
6d3e259f5a | ||
|
|
1840496620 | ||
|
|
29fb6c4f39 | ||
|
|
a668e7ae2f | ||
|
|
1e528dfcf7 | ||
|
|
ec871e5fec | ||
|
|
cb9365156c | ||
|
|
203d21a28a | ||
|
|
b38d5df6de | ||
|
|
852c9fcc3c | ||
|
|
f37325aad1 | ||
|
|
8fc4c22562 | ||
|
|
0e4286e1d7 | ||
|
|
041fa31a86 | ||
|
|
de667d05fc | ||
|
|
935901f87e | ||
|
|
7ffd4fdabf | ||
|
|
29c686576c | ||
|
|
fa150ca03b | ||
|
|
09e2d7f56e | ||
|
|
962e108f79 | ||
|
|
fce4b0abb3 | ||
|
|
410da36327 | ||
|
|
733ecd1cf5 | ||
|
|
3e037a0d26 | ||
|
|
7d21712204 | ||
|
|
f85fd10b8e | ||
|
|
39c5284ae7 | ||
|
|
b8b2472a94 | ||
|
|
07bea63692 | ||
|
|
e0e3de1598 | ||
|
|
5521024bc4 | ||
|
|
b4df1a4e26 | ||
|
|
db214a8d78 | ||
|
|
1c77a14727 | ||
|
|
732208e84d | ||
|
|
c9dea03864 | ||
|
|
b8a86b1479 | ||
|
|
8268afbc6a | ||
|
|
4a6f387b01 | ||
|
|
e27da0df1b | ||
|
|
a3cd041a58 | ||
|
|
255207c40e | ||
|
|
fce3e3c9b8 | ||
|
|
52a45ae60a | ||
|
|
1e88a6e744 | ||
|
|
d98cc4edc0 | ||
|
|
71a3a3d489 | ||
|
|
1e59a72ebc | ||
|
|
f3b97d854f | ||
|
|
9f9f30b760 | ||
|
|
9bc781bddd | ||
|
|
5603642eec | ||
|
|
c57a66b1d5 | ||
|
|
f6cb6b7f07 | ||
|
|
f8e945a703 | ||
|
|
f98366b29a | ||
|
|
c3b8960376 | ||
|
|
22c7c1b6e1 | ||
|
|
c8a083cd5b | ||
|
|
030b40d2cb | ||
|
|
e035039d43 | ||
|
|
e6f7af59e1 | ||
|
|
109af18b4a | ||
|
|
69d6312d41 | ||
|
|
056e70cb30 | ||
|
|
db1868bf57 | ||
|
|
f7ffa43cf1 | ||
|
|
7c5bb81767 | ||
|
|
9b70222ff9 | ||
|
|
aaf606ba06 | ||
|
|
5914ae94eb | ||
|
|
e488ff524c | ||
|
|
1a4236f8fb | ||
|
|
db23aea342 | ||
|
|
08afad8fe0 | ||
|
|
d16920c2c4 | ||
|
|
e1769ef356 | ||
|
|
258dbc46ba | ||
|
|
b1de175b9d | ||
|
|
b61fb32512 | ||
|
|
403c8e8146 | ||
|
|
3e39e4f972 | ||
|
|
3efc99eed8 | ||
|
|
e2765666b7 | ||
|
|
7ffac15f42 | ||
|
|
2650776f0a | ||
|
|
3cdfe03745 | ||
|
|
13c15b4e3c | ||
|
|
34dd9e7ccd |
No files matched your search
@@ -0,0 +1,7 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
node_modules
|
||||
npm-debug.log
|
||||
README.md
|
||||
.next
|
||||
.git
|
||||
@@ -1,3 +1 @@
|
||||
NEXT_PUBLIC_BASE_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_ALTOGIC_ENV_URL=https://jsoncrack.c5-na.altogic.com
|
||||
NEXT_PUBLIC_ALTOGIC_CLIENT_KEY=f1e92022789f4ccf91273a345ab2bdf8
|
||||
NEXT_PUBLIC_NODE_LIMIT=1000
|
||||
@@ -1,3 +0,0 @@
|
||||
NEXT_PUBLIC_BASE_URL=https://jsoncrack.com
|
||||
NEXT_PUBLIC_ALTOGIC_ENV_URL=https://jsoncrack.c5-na.altogic.com
|
||||
NEXT_PUBLIC_ALTOGIC_CLIENT_KEY=f1e92022789f4ccf91273a345ab2bdf8
|
||||
@@ -1,15 +1,29 @@
|
||||
{
|
||||
"rules": {
|
||||
"@next/next/no-img-element": "off",
|
||||
"unused-imports/no-unused-imports": "error"
|
||||
"@typescript-eslint/consistent-type-imports": "error",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"prettier/prettier": "error",
|
||||
"space-in-parens": "error",
|
||||
"no-empty": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"strict": ["error", "never"],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"quotes": ["error", "double", { "avoidEscape": true }],
|
||||
"semi": ["error", "always"],
|
||||
"prefer-const": "error",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "always",
|
||||
"named": "never",
|
||||
"asyncArrow": "always"
|
||||
}
|
||||
]
|
||||
},
|
||||
"extends": ["next/core-web-vitals"],
|
||||
"plugins": ["testing-library", "unused-imports"],
|
||||
"overrides": [
|
||||
// Only uses Testing Library lint rules in test files
|
||||
{
|
||||
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"],
|
||||
"extends": ["plugin:testing-library/react"]
|
||||
}
|
||||
]
|
||||
"extends": ["next/core-web-vitals", "prettier", "plugin:@typescript-eslint/recommended"],
|
||||
"plugins": ["prettier", "unused-imports"],
|
||||
"ignorePatterns": ["src/enums", "next.config.js"]
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: AykutSarac
|
||||
patreon: # patreon name
|
||||
open_collective: # opencollective name
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -24,8 +24,7 @@ body:
|
||||
id: media
|
||||
attributes:
|
||||
label: Media & Screenshots
|
||||
description: Inlude screenshots or video of reproduction as much as possible
|
||||
render: md
|
||||
description: Include screenshots or video of reproduction as much as possible
|
||||
- type: textarea
|
||||
id: os
|
||||
attributes:
|
||||
@@ -34,7 +33,7 @@ body:
|
||||
value: |
|
||||
- OS: [e.g. iOS]:
|
||||
- Browser [e.g. chrome, safari]:
|
||||
|
||||
|
||||
- Any other details...
|
||||
- type: dropdown
|
||||
id: priority
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
name: Deploy Next.js site to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 9.1.4
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v4
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
with:
|
||||
static_site_generator: next
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
.next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build with Next.js
|
||||
run: pnpm next build
|
||||
env:
|
||||
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ vars.NEXT_PUBLIC_GA_MEASUREMENT_ID }}
|
||||
|
||||
- name: Upload Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-files
|
||||
path: ./out/_next/static/chunks
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: './out'
|
||||
|
||||
|
||||
# Sentry job
|
||||
sentry:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
SENTRY_RELEASE: ${{ github.sha }}
|
||||
SENTRY_SOURCEMAP_PATH: "./"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: build-files
|
||||
- name: Download sentry-cli
|
||||
run: curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="2.20.0" sh
|
||||
- name: Create Release
|
||||
run: sentry-cli releases new $SENTRY_RELEASE
|
||||
- name: Inject Debug IDs to source files
|
||||
run: sentry-cli sourcemaps inject $SENTRY_SOURCEMAP_PATH
|
||||
- name: Upload Source Files
|
||||
run: sentry-cli sourcemaps upload --validate -r=$SENTRY_RELEASE $SENTRY_SOURCEMAP_PATH
|
||||
- name: Set Release Commits
|
||||
run: sentry-cli releases set-commits $SENTRY_RELEASE --auto
|
||||
- name: Deploy to Sentry
|
||||
run: sentry-cli releases deploys $SENTRY_RELEASE new -e production
|
||||
- name: Finalize Sentry Release
|
||||
run: sentry-cli releases finalize $SENTRY_RELEASE
|
||||
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Verify Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
cache-and-install:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- uses: pnpm/action-setup@v2
|
||||
name: Install pnpm
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Get pnpm store directory
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ env.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
@@ -39,4 +37,6 @@ yarn-error.log*
|
||||
# PWA workers
|
||||
**/public/workbox-*.js
|
||||
**/public/sw.js
|
||||
**/public/fallback-*.js
|
||||
**/public/fallback-*.js
|
||||
# Sentry Auth Token
|
||||
.sentryclirc
|
||||
@@ -4,4 +4,4 @@ node_modules/
|
||||
out
|
||||
public
|
||||
*-lock.json
|
||||
tsconfig.json
|
||||
tsconfig.json
|
||||
@@ -7,11 +7,13 @@
|
||||
"importOrder": [
|
||||
"^(react/(.*)$)|^(react$)",
|
||||
"^(next/(.*)$)|^(next$)",
|
||||
"^@mantine/core",
|
||||
"^@mantine",
|
||||
"styled",
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"^components/(.*)$",
|
||||
"^utils/(.*)$",
|
||||
"^assets/(.*)$",
|
||||
"^src/(.*)$",
|
||||
"^[./]"
|
||||
],
|
||||
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
|
||||
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
|
||||
"plugins": ["@trivago/prettier-plugin-sort-imports"]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "14"
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run build
|
||||
deploy:
|
||||
provider: pages
|
||||
skip_cleanup: true
|
||||
local_dir: out
|
||||
token: $GITHUB_TOKEN
|
||||
target_branch: gh-pages
|
||||
keep_history: true
|
||||
on:
|
||||
branch: main
|
||||
@@ -1,4 +1,4 @@
|
||||
# Welcome to the JSON Crack contributing guide <!-- omit in toc -->
|
||||
# Welcome to the JSON Crack Contributing Guide <!-- omit in toc -->
|
||||
|
||||
Thank you for investing your time in contributing to our project! Any contribution you make will be reflected at [jsoncrack.com](https://jsoncrack.com).
|
||||
|
||||
@@ -6,75 +6,57 @@ Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approacha
|
||||
|
||||
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
|
||||
|
||||
Use the table of contents icon on the top left corner of this document to get to a specific section of this guide quickly.
|
||||
## Getting Started
|
||||
JSON Crack is built with React, Reaflow for visualization, Mantine UI for components, Zustand for state management. If you are not familiar with these technologies, we recommend you to read their documentation to get started. You can find the links to the respective documentations below:
|
||||
|
||||
## New contributor guide
|
||||
* [React](https://reactjs.org/docs/getting-started.html)
|
||||
* [Reaflow](https://github.com/reaviz/reaflow)
|
||||
* [Mantine UI](https://mantine.dev/)
|
||||
* [Zustand](https://github.com/pmndrs/zustand)
|
||||
|
||||
To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open source contributions:
|
||||
Once you are familiar with these technologies, you can clone the JSON Crack repository by running the following command:
|
||||
|
||||
- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
|
||||
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
|
||||
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
|
||||
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
|
||||
```bash
|
||||
git clone https://github.com/AykutSarac/jsoncrack.com.git
|
||||
```
|
||||
|
||||
## Getting started
|
||||
After cloning the repository, you can install the required dependencies by running the following command:
|
||||
|
||||
Join the [Discord channel](https://discord.gg/yVyTtCRueq). If you have questions or feedback, this is the best place to reach the team and other contributors directly.
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### Issues
|
||||
To run the development server, you can run the following command:
|
||||
|
||||
#### Create a new issue
|
||||
```bash
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
If you spot a problem, [search if an issue already exists](https://github.com/AykutSarac/jsoncrack.com/issues). If a related issue doesn't exist, you can open a new issue using a relevant [issue form](https://github.com/AykutSarac/jsoncrack.com/issues/new/choose).
|
||||
## Contributing Guidelines
|
||||
Before submitting a pull request, please make sure to follow these guidelines:
|
||||
|
||||
#### Solve an issue
|
||||
### 1. Performance
|
||||
Performance is an important criteria for JSON Crack. Any new contributions should not affect the re-rendering of the application. Therefore, when making changes to the code, please keep performance in mind.
|
||||
|
||||
Scan through our [existing issues](https://github.com/AykutSarac/jsoncrack.com/issues) to find one that interests you. You can narrow down the search using `labels` as filters. See [Labels](/contributing/how-to-use-labels.md) for more information. If you find an issue to work on, you are welcome to open a PR with a fix.
|
||||
If you're having trouble with re-rendering issues in React, you can use the React Devtools Profiler to debug it. You can also check out this up-to-date guide on debugging re-renders with React Devtools to learn more.
|
||||
|
||||
### Make Changes
|
||||
### 2. Code Style
|
||||
We follow the [Google TypeScript Style Guide](https://google.github.io/styleguide/tsguide.html) for our code. Please make sure to follow this guide when writing new code or modifying existing code.
|
||||
|
||||
#### Make changes locally
|
||||
### 3. Testing
|
||||
While we do not currently have a comprehensive testing suite in place, we encourage contributors to thoroughly test their changes and ensure that they do not break any existing functionality. Please include a description of how you tested your changes in your pull request, so that we can review them more effectively.
|
||||
|
||||
1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage).
|
||||
### 4. Commit Messages
|
||||
Please use descriptive commit messages that explain the changes you have made. This will help us understand your changes and make it easier to review your pull request.
|
||||
|
||||
2. Fork the repository.
|
||||
### 5. Pull Requests
|
||||
Please create a new branch for your changes and submit a pull request to the main branch. Please provide a detailed explanation of the changes you have made and any necessary context in the pull request description.
|
||||
|
||||
- Using GitHub Desktop:
|
||||
|
||||
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
|
||||
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!
|
||||
|
||||
- Using the command line:
|
||||
|
||||
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.
|
||||
|
||||
- GitHub Codespaces:
|
||||
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.
|
||||
|
||||
3. Install or update to **Node.js v16**.
|
||||
|
||||
4. Create a working branch and start with your changes!
|
||||
|
||||
5. Follow the [the development guide](guides/development.md).
|
||||
|
||||
### Commit your update
|
||||
|
||||
Commit the changes once you are happy with them.
|
||||
|
||||
### Pull Request
|
||||
|
||||
When you're finished with the changes, create a pull request, also known as a PR.
|
||||
|
||||
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
|
||||
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
|
||||
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
|
||||
Once you submit your PR, a team member will review your proposal. We may ask questions or request for additional information.
|
||||
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
|
||||
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
|
||||
- If you run into any merge issues, checkout this [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) to help you resolve merge conflicts and other issues.
|
||||
## Conclusion
|
||||
We appreciate any contributions to JSON Crack, big or small. If you have any questions or need any help, please do not hesitate to reach out to us. Thank you for contributing!
|
||||
|
||||
### Your PR is merged!
|
||||
|
||||
Congratulations :tada::tada: The JSON Crack team thanks you :sparkles:.
|
||||
|
||||
Once your PR is merged, your contributions will become part of the next JSON Crack release, and will be visible in the [JSON Crack app](https://jsoncrack.com).
|
||||
Once your PR is merged, your contributions will become part of the next JSON Crack release, and will be visible in the [JSON Crack app](https://jsoncrack.com).
|
||||
@@ -1,11 +1,22 @@
|
||||
# Builder
|
||||
FROM node:14-buster as builder
|
||||
WORKDIR /src
|
||||
COPY . /src
|
||||
RUN yarn install --legacy-peer-deps
|
||||
RUN yarn run build
|
||||
FROM node:lts-alpine AS base
|
||||
|
||||
# App
|
||||
FROM nginxinc/nginx-unprivileged
|
||||
COPY --from=builder /src/out /app
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
# Stage 1: Install dependencies
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN corepack enable pnpm && pnpm install --frozen-lockfile
|
||||
|
||||
# Stage 2: Build the application
|
||||
FROM base AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN corepack enable pnpm && pnpm run build
|
||||
|
||||
# Stage 3: Production image
|
||||
FROM nginxinc/nginx-unprivileged:stable AS production
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/out /app
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 8080
|
||||
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
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.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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>.
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2025 Aykut Saraç
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,58 +1,134 @@
|
||||
<div align="center" style="display:flex;flex-direction:column;">
|
||||
<a href="https://jsoncrack.com">
|
||||
<img width="700" alt="jsoncrack" src="https://user-images.githubusercontent.com/47941171/206401172-74c21f7f-0a32-4532-96cc-4cf6b493c837.png">
|
||||
<!-- PROJECT LOGO -->
|
||||
<p align="center">
|
||||
<a href="https://github.com/AykutSarac/jsoncrack.com">
|
||||
<img src="./public/assets/192.png" height="50" alt="Logo">
|
||||
</a>
|
||||
<h3>“Explore, analyze and understand even most complex JSON structures.”</br>Unlock the full potentiel of your data.</h3>
|
||||
<p align="center">
|
||||
<a href="https://www.producthunt.com/posts/json-crack?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-json-crack" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=332281&theme=light" alt="JSON Crack - Simple visualization tool for your JSON data. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
<a href="https://discord.gg/yVyTtCRueq" target="_blank"><img src="https://user-images.githubusercontent.com/47941171/206397224-94da03a4-59d0-48cd-aafc-512624a768d6.png" "style=" height: 54px;" height="54" /></a>
|
||||
</br>
|
||||
<a href="https://github.com/sponsors/AykutSarac" target="_blank"><img src="https://user-images.githubusercontent.com/47941171/206397875-a4e73f02-5d8f-4db0-902b-9a4bc2b22d90.png" "style=" height: 54px;" height="54" /></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h1 align="center">JSON Crack</h1>
|
||||
|
||||
<p align="center">
|
||||
<img width="800" src="./public/assets/jsoncrack-screenshot.webp" alt="preview 1" />
|
||||
The open-source JSON Editor.
|
||||
<br />
|
||||
<a href="https://jsoncrack.com"><strong>Learn more »</strong></a>
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://todiagram.com">ToDiagram</a>
|
||||
·
|
||||
<a href="https://discord.gg/yVyTtCRueq">Discord</a>
|
||||
·
|
||||
<a href="https://jsoncrack.com">Website</a>
|
||||
·
|
||||
<a href="https://github.com/AykutSarac/jsoncrack.com/issues">Issues</a>
|
||||
·
|
||||
<a href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode">VS Code</a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
# JSON Crack (jsoncrack.com)
|
||||
<!-- ABOUT THE PROJECT -->
|
||||
|
||||
Introducing JSON Crack – the open-source, free JSON visualization app that will revolutionize the way you work with data. With its intuitive and user-friendly interface, JSON Crack makes it easy to explore, analyze, and understand even the most complex JSON structures. Whether you're a developer working on a large-scale project or a data enthusiast looking to uncover hidden insights, JSON Crack has the tools and features you need to unlock the full potential of your data. Best of all, because JSON Crack is open-source and free, you can use it without breaking the bank. Try JSON Crack today and experience the power of data visualization like never before.
|
||||
## About the Project
|
||||
|
||||
> <b><a href="https://jsoncrack.com">JSON Crack - Crack your data into pieces</a></b>
|
||||
<img width="100%" alt="booking-screen" src="./public/assets/editor.webp">
|
||||
|
||||
## ⚡️ Key Features
|
||||
## Visualize JSON into interactive graphs
|
||||
|
||||
- Search Nodes
|
||||
- Share links & Create Embed Widgets
|
||||
- Download/Clipboard as image
|
||||
- Upload JSON locally or fetch from URL
|
||||
- User-friendly Interface
|
||||
- Light/Dark Mode
|
||||
JSON Crack is a tool for visualizing JSON data in a structured, interactive graphs, making it easier to explore, format, and validate JSON. It offers features like converting JSON to other formats (CSV, YAML), generating JSON Schema, executing queries, and exporting visualizations as images. Designed for both readability and usability.
|
||||
|
||||
## ⭐️ Embedding Into Your Website
|
||||
* **Visualizer**: Instantly convert JSON, YAML, CSV, XML, and TOML into interactive graphs or trees in dark or light mode.
|
||||
* **Convert**: Seamlessly transform data formats, like JSON to CSV or XML to JSON, for easy sharing.
|
||||
* **Format & Validate**: Beautify and validate JSON, YAML, and CSV for clear and accurate data.
|
||||
* **Code Generation**: Generate TypeScript interfaces, Golang structs, and JSON Schema.
|
||||
* **JSON Schema**: Create JSON Schema, mock data, and validate various data formats.
|
||||
* **Advanced Tools**: Decode JWT, randomize data, and run jq or JSON path queries.
|
||||
* **Export Image**: Download your visualization as PNG, JPEG, or SVG.
|
||||
* **Privacy**: All data processing is local; nothing is stored on our servers.
|
||||
|
||||
You can use the JSON Crack to visualize your JSON **at your products or websites**, see our very simple guide: https://jsoncrack.com/embed
|
||||
You can choose to **[partner us](https://github.com/sponsors/AykutSarac)** to remove attribute for your commercial products.
|
||||
## Recognition
|
||||
|
||||
<img width="291" alt="Screenshot_2022-12-08_at_11 46 02-removebg-preview" src="https://user-images.githubusercontent.com/47941171/206400503-150f60b6-f4b3-4649-854d-be4a7b826275.png">
|
||||
<a href="https://news.ycombinator.com/item?id=32626873">
|
||||
<img
|
||||
style="width: 250px; height: 54px;" width="250" height="54"
|
||||
alt="Featured on Hacker News"
|
||||
src="https://hackernews-badge.vercel.app/api?id=32626873"
|
||||
/>
|
||||
</a>
|
||||
|
||||
## 🛠 Development Setup
|
||||
<a href="https://producthunt.com/posts/JSON-Crack?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-jsoncrack" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=332281&theme=light" alt="JSON Crack | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
|
||||
|
||||
```console
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
### Built With
|
||||
|
||||
## 🐳 Docker
|
||||
- [Next.js](https://nextjs.org/?ref=jsoncrack.com)
|
||||
- [React.js](https://reactjs.org/?ref=jsoncrack.com)
|
||||
- [Reaflow](https://reaflow.dev/?ref=jsoncrack.com)
|
||||
- [Monaco Editor](https://github.com/suren-atoyan/monaco-react)
|
||||
|
||||
A [`Dockerfile`](Dockerfile) is provided in the root of the repository.
|
||||
## Stay Up-to-Date
|
||||
|
||||
JSON Crack officially launched as v1.0 on the 17th of February 2022 and we've come a long way so far. Watch **releases** of this repository to be notified of future updates:
|
||||
|
||||
<a href="https://github.com/AykutSarac/jsoncrack.com"><img src="https://img.shields.io/github/stars/AykutSarac/jsoncrack.com" alt="Star at GitHub" /></a>
|
||||
|
||||
<!-- GETTING STARTED -->
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get a local copy up and running, please follow these simple steps.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Here is what you need to be able to run JSON Crack.
|
||||
|
||||
- Node.js (Version: >=18.x)
|
||||
- Pnpm _(recommended)_
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
### Setup
|
||||
|
||||
1. Clone the repo into a public GitHub repository (or fork https://github.com/AykutSarac/jsoncrack.com/fork). If you plan to distribute the code, read the [`LICENSE`](/LICENSE.md) for additional details.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/AykutSarac/jsoncrack.com.git
|
||||
```
|
||||
|
||||
2. Go to the project folder
|
||||
|
||||
```sh
|
||||
cd jsoncrack.com
|
||||
```
|
||||
|
||||
3. Install packages
|
||||
|
||||
```sh
|
||||
pnpm install
|
||||
```
|
||||
|
||||
4. Run the project
|
||||
|
||||
```sh
|
||||
pnpm dev
|
||||
|
||||
# Running on http://localhost:3000/
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
🐳 A [`Dockerfile`](Dockerfile) is provided in the root of the repository.
|
||||
If you want to run JSON Crack locally:
|
||||
|
||||
* Build a Docker image with `docker build -t jsoncrack .`
|
||||
* Run locally with `docker run -p 8888:8080 jsoncrack`
|
||||
* Go to http://localhost:8888
|
||||
```console
|
||||
# Build a Docker image with:
|
||||
docker compose build
|
||||
|
||||
# Run locally with `docker-compose`
|
||||
docker compose up
|
||||
|
||||
# Go to http://localhost:8888
|
||||
```
|
||||
|
||||
<!-- LICENSE -->
|
||||
|
||||
## License
|
||||
|
||||
This project is open source and available under the [GNU General Public License v3.0](LICENSE).
|
||||
See [`LICENSE`](/LICENSE.md) for more information.
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
jsoncrack:
|
||||
image: jsoncrack
|
||||
container_name: jsoncrack
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8888:8080"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
@@ -1,17 +0,0 @@
|
||||
import nextJest from "next/jest";
|
||||
|
||||
const createJestConfig = nextJest({
|
||||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
|
||||
dir: "./",
|
||||
});
|
||||
|
||||
// Add any custom config to be passed to Jest
|
||||
const customJestConfig = {
|
||||
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
|
||||
testEnvironment: "jsdom",
|
||||
moduleDirectories: ["node_modules", "src"],
|
||||
modulePaths: ["<rootDir>"],
|
||||
};
|
||||
|
||||
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
|
||||
module.exports = createJestConfig(customJestConfig);
|
||||
@@ -1,5 +0,0 @@
|
||||
// Optional: configure or set up a testing framework before each test.
|
||||
// If you delete this file, remove `setupFilesAfterEnv` from `jest.config.js`
|
||||
// Used for __tests__/testing-library.js
|
||||
// Learn more: https://github.com/testing-library/jest-dom
|
||||
import "@testing-library/jest-dom/extend-expect";
|
||||
@@ -2,4 +2,4 @@
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
|
||||
@@ -0,0 +1,6 @@
|
||||
/** @type {import('next-sitemap').IConfig} */
|
||||
module.exports = {
|
||||
siteUrl: "https://jsoncrack.com",
|
||||
exclude: ["/widget"],
|
||||
autoLastmod: false,
|
||||
};
|
||||
@@ -1,15 +1,52 @@
|
||||
const withPWA = require("next-pwa")({
|
||||
dest: "public",
|
||||
register: true,
|
||||
disable: process.env.NODE_ENV === "development",
|
||||
scope: "/editor",
|
||||
const { withSentryConfig } = require("@sentry/nextjs");
|
||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
});
|
||||
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
const nextConfig = {
|
||||
const config = {
|
||||
output: "export",
|
||||
reactStrictMode: false,
|
||||
productionBrowserSourceMaps: true,
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
},
|
||||
webpack: (config, { isServer }) => {
|
||||
config.resolve.fallback = { fs: false };
|
||||
config.output.webassemblyModuleFilename = "static/wasm/[modulehash].wasm";
|
||||
config.experiments = { asyncWebAssembly: true, layers: true };
|
||||
|
||||
if (!isServer) {
|
||||
config.output.environment = { ...config.output.environment, asyncFunction: true };
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = withPWA(nextConfig);
|
||||
const configExport = () => {
|
||||
if (process.env.ANALYZE === "true") return withBundleAnalyzer(config);
|
||||
|
||||
if (process.env.GITHUB_REPOSITORY === "AykutSarac/jsoncrack.com") {
|
||||
return withSentryConfig(
|
||||
config,
|
||||
{
|
||||
silent: true,
|
||||
org: "aykut-sarac",
|
||||
project: "json-crack",
|
||||
},
|
||||
{
|
||||
widenClientFileUpload: true,
|
||||
hideSourceMaps: true,
|
||||
disableLogger: true,
|
||||
disableServerWebpackPlugin: true,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
module.exports = configExport();
|
||||
@@ -6,4 +6,12 @@ server {
|
||||
location /editor {
|
||||
try_files $uri /editor.html;
|
||||
}
|
||||
|
||||
location /widget {
|
||||
try_files $uri /widget.html;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
try_files $uri /docs.html;
|
||||
}
|
||||
}
|
||||
@@ -1,62 +1,90 @@
|
||||
{
|
||||
"name": "json-crack",
|
||||
"private": true,
|
||||
"version": "v2.5.0",
|
||||
"author": "https://github.com/AykutSarac",
|
||||
"version": "0.0.0",
|
||||
"author": {
|
||||
"name": "Aykut Saraç",
|
||||
"email": "aykutsarac0@gmail.com"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"homepage": "https://jsoncrack.com",
|
||||
"bugs": {
|
||||
"url": "https://github.com/AykutSarac/jsoncrack.com/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build && next export",
|
||||
"build": "next build",
|
||||
"postbuild": "next-sitemap --config next-sitemap.config.js",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "prettier --write \"./**/*.{ts,tsx,json}\"",
|
||||
"deploy": "gh-pages -d out -t true"
|
||||
"lint": "tsc --project tsconfig.json && eslint src && prettier --check src",
|
||||
"lint:fix": "eslint --fix src & prettier --write src",
|
||||
"analyze": "ANALYZE=true npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@monaco-editor/react": "^4.4.6",
|
||||
"@react-oauth/google": "^0.4.0",
|
||||
"@sentry/nextjs": "^7.16.0",
|
||||
"@tanstack/react-query": "^4.19.1",
|
||||
"allotment": "^1.17.0",
|
||||
"altogic": "^2.3.8",
|
||||
"axios": "^1.1.3",
|
||||
"dayjs": "^1.11.6",
|
||||
"html-to-image": "^1.10.8",
|
||||
"jsonc-parser": "^3.2.0",
|
||||
"@mantine/code-highlight": "^7.17.5",
|
||||
"@mantine/core": "^7.17.5",
|
||||
"@mantine/dropzone": "^7.17.5",
|
||||
"@mantine/hooks": "^7.17.5",
|
||||
"@monaco-editor/react": "^4.7.0",
|
||||
"@sentry/nextjs": "^7.118.0",
|
||||
"@tanstack/react-query": "^5.74.4",
|
||||
"allotment": "^1.20.3",
|
||||
"axios": "^1.8.4",
|
||||
"dayjs": "^1.11.13",
|
||||
"fast-xml-parser": "^5.2.1",
|
||||
"gofmt.js": "^0.0.2",
|
||||
"html-to-image": "^1.11.13",
|
||||
"jq-web": "^0.5.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-2-csv": "^5.5.4",
|
||||
"json-schema-faker": "^0.5.9",
|
||||
"json_typegen_wasm": "^0.7.0",
|
||||
"jsonc-parser": "^3.3.1",
|
||||
"jsonpath-plus": "^10.3.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lz-string": "^1.4.4",
|
||||
"next": "^12.3.1",
|
||||
"next-transpile-modules": "^9.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-color": "^2.19.3",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hot-toast": "^2.4.0",
|
||||
"react-icons": "^4.6.0",
|
||||
"react-in-viewport": "^1.0.0-alpha.28",
|
||||
"react-linkify-it": "^1.0.7",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"react-zoom-pan-pinch": "^2.1.3",
|
||||
"reaflow": "^5.0.7",
|
||||
"styled-components": "^5.3.6",
|
||||
"zustand": "^4.1.3"
|
||||
"next": "14.2.28",
|
||||
"next-seo": "^6.6.0",
|
||||
"next-sitemap": "^4.2.3",
|
||||
"nextjs-google-analytics": "^2.3.7",
|
||||
"react": "^18.3.1",
|
||||
"react-compare-slider": "^3.1.0",
|
||||
"react-countup": "^6.5.3",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-hot-toast": "^2.5.2",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-json-tree": "^0.18.0",
|
||||
"react-linkify-it": "^1.0.8",
|
||||
"react-text-transition": "^3.1.0",
|
||||
"react-zoomable-ui": "^0.11.0",
|
||||
"reaflow": "5.4.1",
|
||||
"styled-components": "^6.1.17",
|
||||
"toml": "^3.0.0",
|
||||
"use-long-press": "^3.3.0",
|
||||
"zustand": "^4.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
|
||||
"@types/lodash.debounce": "^4.0.7",
|
||||
"@types/lz-string": "^1.3.34",
|
||||
"@types/node": "^18.7.21",
|
||||
"@types/react": "18.0.21",
|
||||
"@types/react-color": "^3.0.6",
|
||||
"@types/react-syntax-highlighter": "^15.5.5",
|
||||
"@types/styled-components": "^5.1.26",
|
||||
"eslint": "8.24.0",
|
||||
"eslint-config-next": "12.3.1",
|
||||
"eslint-plugin-testing-library": "^5.7.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"next-pwa": "5.6.0",
|
||||
"prettier": "^2.7.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "4.8.3"
|
||||
}
|
||||
"@next/bundle-analyzer": "^14.2.28",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/js-yaml": "^4.0.9",
|
||||
"@types/jsonwebtoken": "^9.0.9",
|
||||
"@types/node": "^20.14.11",
|
||||
"@types/react": "18.2.51",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-next": "14.2.28",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-unused-imports": "^3.2.0",
|
||||
"prettier": "^3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "5.8.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.x"
|
||||
},
|
||||
"packageManager": "pnpm@9.1.4"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 14 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" data-name="Layer 1" width="1118.03" height="826.45" viewBox="0 0 1118.03 826.45"><defs><linearGradient id="2c65cc85-6ec1-454a-a801-b7854259077c-180" x1="377.53" y1="611.1" x2="377.53" y2="84.18" gradientTransform="translate(256.63 -110.12) rotate(27.45)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient></defs><title>startled</title><ellipse cx="741.34" cy="764.2" rx="314.09" ry="31.67" fill="#dadaf9" opacity="0.1"/><path d="M690.57,153c-71.67-2.08-139.94-21.34-205.12-42.42S355.69,66.17,285.73,55c-45-7.18-96.45-8.2-132.71,11.89-34.88,19.32-46.16,52.69-52.22,83.64-4.56,23.29-7.24,47.81,5.25,69.61,8.68,15.14,24.08,27.86,34.73,42.36,37.07,50.46,10.87,112.67-29.3,161.93-18.84,23.11-40.69,45.16-55.23,69.76S35,547,47.71,572.07c12.61,24.87,42.65,43.55,75.2,56.69,66.1,26.69,144,34.33,220,38.65C511,677,680,672.84,848.63,668.69c62.39-1.53,125-3.09,186.43-11.12,34.08-4.46,69.27-11.54,94-28.63,31.42-21.7,39.2-58.43,18.15-85.64-35.3-45.63-132.92-57-157.6-105.93-13.58-26.95.37-57,20.11-82,42.34-53.62,113.32-100.67,117.06-162,2.57-42.1-31.55-84.26-84.31-104.18-55.3-20.88-132-18.25-172.79,16.31C827.68,141.14,753.86,154.83,690.57,153Z" transform="translate(-40.99 -36.78)" fill="#dadaf9" opacity="0.1"/><path d="M213.3,663c-7.92-3.53-1.22-41.88,16-101,0,0,0,0,0,0,11-37.93,26.38-84.41,45-135.71,1.34-3.68,2.7-7.37,4.06-11.1q2.3-6.27,4.66-12.64l.14-.35c.22-.61.45-1.21.67-1.81q8.94-24,18.69-49.11c.12-.34.25-.67.38-1l.33-.85c1.56-4,3.14-8,4.73-12.07.17-.42.33-.86.5-1.28.23-.59.46-1.16.68-1.74.08-.18.14-.37.22-.53.13-.35.27-.69.4-1,1.6-4,3.19-8.05,4.78-12q3.9-9.7,7.74-19.21.67-1.67,1.35-3.3,1.93-4.79,3.87-9.51c.5-1.2,1-2.41,1.48-3.6.38-.91.75-1.83,1.12-2.73q6.09-14.73,12.1-28.89a.17.17,0,0,0,0-.1c15.25-35.93,30-68.92,43.7-97.76.08-.15.14-.31.22-.46l1.45-3.06c35.16-73.71,62.82-119.2,72.17-115,9.62,4.28-2.36,60.14-28.61,142.26-.34,1.09-.69,2.16-1.05,3.25a5.8,5.8,0,0,1-.2.63q-2,6.38-4.21,13c-.08.26-.17.52-.26.78q-5,15.3-10.64,31.6c-.51,1.46-1,2.95-1.54,4.43-5.8,16.79-12,34.27-18.65,52.29h0c-.4,1.11-.81,2.21-1.22,3.33h0c-6.65,18.05-13.66,36.63-21,55.59h0c-.47,1.2-.94,2.41-1.4,3.62h0c-.1.26-.2.51-.31.77q-2.75,7.05-5.53,14.16c-.53,1.32-1,2.64-1.56,3.95-1.32,3.35-2.64,6.7-4,10-.11.3-.23.6-.35.89s-.19.47-.29.7c-.22.58-.45,1.15-.68,1.72-.62,1.55-1.23,3.1-1.85,4.63-1.07,2.68-2.14,5.33-3.21,8l-.33.8v0a.76.76,0,0,1,0,.11q-6.52,16.11-13,31.67h0q-2.18,5.25-4.35,10.43v0c-1.07,2.55-2.13,5.09-3.2,7.6-7.94,18.77-15.74,36.74-23.34,53.77l0,0C263,600,224.64,668.06,213.3,663Z" transform="translate(-40.99 -36.78)" fill="#dadaf9" opacity="0.5"/><path d="M232.07,591.61c-4.88-2.1,1.18-29.38,14.92-71.76l0,0c8.8-27.18,20.77-60.58,35-97.52l3.11-8q1.75-4.51,3.56-9.1a2.77,2.77,0,0,0,.1-.26l.52-1.3q6.81-17.33,14.21-35.4c.09-.25.19-.48.29-.72s.16-.41.25-.61c1.18-2.9,2.37-5.79,3.57-8.71l.39-.93.51-1.25c.06-.13.11-.27.16-.39s.21-.49.31-.73q1.82-4.38,3.61-8.69,2.94-7,5.83-13.87l1-2.38c1-2.31,1.94-4.59,2.91-6.87l1.11-2.6c.29-.66.56-1.32.84-2q4.57-10.63,9.07-20.88a.14.14,0,0,0,0-.07c11.4-26,22.36-49.86,32.42-70.77.06-.11.11-.23.17-.34l1.06-2.22c25.86-53.47,45.62-86.74,51.38-84.25,5.93,2.56-4.33,42.39-24.9,101.35l-.82,2.34c-.05.15-.1.3-.16.45q-1.6,4.58-3.29,9.31l-.2.56q-3.93,11-8.27,22.71c-.39,1.06-.78,2.13-1.19,3.19-4.48,12.07-9.27,24.66-14.33,37.64h0l-.93,2.39h0q-7.62,19.5-16,40.06h0c-.35.87-.7,1.74-1.06,2.61h0c-.08.19-.16.37-.23.56l-4.19,10.21-1.18,2.85c-1,2.42-2,4.84-3,7.23-.08.22-.17.43-.26.64s-.14.34-.22.51l-.51,1.23c-.47,1.12-.93,2.24-1.4,3.35L333.88,395l-.25.58h0l0,.08q-4.92,11.64-9.76,22.87h0q-1.63,3.8-3.27,7.54s0,0,0,0q-1.2,2.78-2.4,5.5c-5.94,13.56-11.75,26.57-17.39,38.89l0,0C266.66,545,239.06,594.63,232.07,591.61Z" transform="translate(-40.99 -36.78)" fill="#dadaf9" opacity="0.5"/><path d="M553.79,389.26c0-2.79-2.73-1.35-3.11-1.23h0a19,19,0,0,0-3.56-2.31c-6.09-3.17-15.29-5.1-22.62-6.23a.12.12,0,0,0-.08,0c-6.46-1-11.44-1.34-11.44-1.34l-3.81.05-1.42,0a4,4,0,0,1,2.08-1.57c1.06-.13-4.48-.54-7.11-.72,0,0,0,0,0,0h-.11l-1.22-.08c-5.78,1.36-16.61-6.07-16.61-6.07l-1.26-6.34c4.28-4.63,3.66-16.2,3.66-16.2s.36-3.88,4-9.22-.61-8.72-.61-8.72l6.29-6.71a9,9,0,0,1,1.14-6.83h0a6.13,6.13,0,0,1,1.41-1.48l0-.05.1-.09c4.11-3.15,7.58-14.09,7.58-14.09s-.8-1.95,3.7-7.24l0-.06c.6-.7,1.3-1.45,2.11-2.29l0,0c0-.07.12-.13.18-.2C520.3,283,517.46,279,517.46,279l-8.77-10.66c2.07-3.46-14.55-28.29-14.55-28.29s-2.12-5.11-.92-10a7,7,0,0,0,.1-3.54,4,4,0,0,0-.94-1.77,3.07,3.07,0,0,0-1-.71l-.6-.05.71-.52c.29-.19.57-.4.86-.6.62.24,1.24.45,1.87.64a38.25,38.25,0,0,0,36.06-6.86c.25-.19.49-.4.72-.61s.63-.54.94-.83c.14-.13.28-.25.4-.38s.47-.46.7-.7c.07.22.14.43.22.65a19.34,19.34,0,0,0,1.13,2.58,1.59,1.59,0,0,0,.13.22.41.41,0,0,0,0,.09c.07.15.16.29.24.43a12.68,12.68,0,0,0,2.06,2.6,6.48,6.48,0,0,0,.62.54,6.85,6.85,0,0,0,1,.71,1,1,0,0,0,.17.12,1.22,1.22,0,0,0,Line truncated
|
||||
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,10 @@
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<filter id="shadow" x="0" y="0" width="150%" height="150%">
|
||||
<feOffset result="offOut" in="SourceAlpha" dx="1" dy="1" />
|
||||
<feGaussianBlur result="blurOut" in="offOut" stdDeviation="1" />
|
||||
<feBlend in="SourceGraphic" in2="blurOut" mode="normal" />
|
||||
</filter>
|
||||
</defs>
|
||||
<path d="M5.65376 12.3673H5.46026L5.31717 12.4976L0.500002 16.8829L0.500002 1.19841L11.7841 12.3673H5.65376Z" fill="#000000" stroke="#E2E2E2" stroke-width="1" filter="url(#shadow)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 620 B |
|
After Width: | Height: | Size: 100 KiB |
|
After Width: | Height: | Size: 100 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="887" height="342" viewBox="0 0 887 342"><foreignObject width="100%" height="100%" x="0" y="0" externalResourcesRequired="true"><svg xmlns="http://www.w3.org/2000/svg" id="ref-1" height="341.78125" width="886.515625" style="accent-color: auto; place-content: normal; place-items: normal; place-self: auto; alignment-baseline: auto; anchor-name: none; animation-composition: replace; animation: 0s ease 0s 1 normal none running none; app-region: none; appearance: none; backdrop-filter: none; backface-visibility: visible; background: none 0% 0% / auto repeat scroll padding-box border-box transparent; background-blend-mode: normal; baseline-shift: 0px; baseline-source: auto; block-size: 341.781px; border-block-end: 0px none rgb(0, 0, 0); border-block-start: 0px none rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-radius: 0px; border-style: none; border-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image: none 100% / 1 / 0 stretch; border-inline-end: 0px none rgb(0, 0, 0); border-inline-start: 0px none rgb(0, 0, 0); border-start-end-radius: 0px; border-start-start-radius: 0px; inset: auto; box-shadow: none; box-sizing: border-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(0, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(0, 0, 0); color-interpolation: srgb; color-interpolation-filters: linearrgb; color-rendering: auto; columns: auto; gap: normal; column-rule: 0px rgb(0, 0, 0); column-span: none; contain-intrinsic-block-size: none; contain-intrinsic-size: none; contain-intrinsic-inline-size: none; container: none; content: normal; cursor: url("http://localhost:3000/assets/cursor.svg"), auto; cx: 0px; cy: 0px; d: none; direction: ltr; display: inline; dominant-baseline: auto; empty-cells: show; field-sizing: fixed; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex: 0 1 auto; flex-flow: row; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-family: system-ui, -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-kerning: auto; font-optical-sizing: auto; font-palette: normal; font-size: 15.9px; font-size-adjust: none; font-stretch: 100%; font-style: normal; font-synthesis: weight style small-caps; font-variant: normal; font-weight: 400; grid: none; grid-area: auto; height: 341.781px; hyphenate-character: auto; hyphenate-limit-chars: auto; hyphens: manual; image-orientation: from-image; image-rendering: auto; initial-letter: normal; inline-size: 886.516px; inset-area: none; inset-block: auto; inset-inline: auto; isolation: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: 24.8px; list-style: outside none disc; margin-block: 0px; margin: 0px; margin-inline: 0px; marker: none; mask: none; mask-type: luminance; math-depth: 0; math-shift: normal; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; object-view-box: none; offset: normal; opacity: 1; order: 0; orphans: 2; outline: rgb(0, 0, 0) none 0px; outline-offset: 0px; overflow-anchor: auto; overflow-clip-margin: content-box; overflow-wrap: normal; overflow: hidden; overlay: none; overscroll-behavior-block: auto; overscroll-behavior-inline: auto; padding-block: 0px; padding: 0px; padding-inline: 0px; paint-order: normal; perspective: none; perspective-origin: 443.258px 170.891px; pointer-events: auto; position: static; position-anchor: auto; position-try: none; position-visibility: always; r: 0px; resize: none; rotate: none; ruby-align: space-around; ruby-position: over; rx: auto; ry: auto; scale: none; scroll-behavior: smooth; scroll-margin-block: 0px; scroll-margin-inline: 0px; scroll-padding-block: auto; scroll-padding-inline: auto; scroll-timeline: none; scrollbar-color: auto; scrollbar-gutter: auto; scrollbar-width: auto; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-rendering: auto; speak: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-align-last: auto; text-anchor: start; text-decoration: none solid rgb(0, 0, 0); text-decoration-skip-ink: auto; text-emphasis: none rgb(0, 0, 0); text-emphasis-position: over; text-indent: 0px; text-overflow: clip; text-rendering: auto; text-shadow: none; text-size-adjust: auto; text-sLine truncated
|
||||
|
After Width: | Height: | Size: 613 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 394 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="1072.34" height="780.14" viewBox="0 0 1072.34 780.14" xmlns:xlink="http://www.w3.org/1999/xlink"><title>QA engineers</title><path d="M1118,683.26c-26.56,54.81-80.52,91.46-136.42,115.63a503.33,503.33,0,0,1-140.45,37.48q-13.9,1.65-27.89,2.56a540.92,540.92,0,0,1-71.57-.08q-21.5-1.43-42.85-4.57a540.44,540.44,0,0,1-143.27-41.72q-19.74-8.89-38.68-19.41a494.85,494.85,0,0,1-60.46-39.54q-6.36-4.86-12.56-9.93l-1.7-1.39c-3.25-2.68-6.47-5.42-9.74-8.08a141.6,141.6,0,0,0-17.26-12.38c-.41-.24-.82-.48-1.24-.71-1.12-.65-2.26-1.26-3.42-1.84a78.31,78.31,0,0,0-7.34-3.24c-11.55-4.4-23.92-6-36.46-5.73-2.08,0-4.16.14-6.25.28h0c-2.92.2-5.85.5-8.77.88l-1.08.15a198.77,198.77,0,0,0-27.53,5.91c-13.94,4-27.63,9-41.41,13.51h0c-5.85,1.93-11.71,3.77-17.62,5.42l-1.3.36a192.87,192.87,0,0,1-25.61,5.36,142.7,142.7,0,0,1-58.61-4.72l-.66-.19-1.22-.36-1.67-.52q-4.2-1.32-8.33-2.89l-1.67-.64q-4-1.54-7.83-3.31l-1.67-.76q-4-1.86-7.83-3.93c-.92-.48-1.83-1-2.73-1.49q-4.08-2.28-8-4.78-4.16-2.65-8.14-5.53-1.84-1.32-3.64-2.71a161.36,161.36,0,0,1-19.37-17.47c-.33-.33-.64-.67-.95-1-1.59-1.72-3.15-3.47-4.66-5.26-.56-.66-1.12-1.32-1.67-2q-2.69-3.28-5.19-6.71c-.25-.33-.49-.67-.73-1a144.59,144.59,0,0,1-16.87-30.5c-.14-.33-.27-.67-.39-1q-2-5.15-3.65-10.47c-.45-1.48-.88-3-1.26-4.48-.13-.44-.25-.89-.36-1.33-5.52-21.73-6.15-44.32-6.15-66.78q0-3.93,0-7.85c.16-36.33.72-73.28,6.08-109.11,0-.25.07-.5.11-.74a340.76,340.76,0,0,1,7.31-35.82,264.25,264.25,0,0,1,12.31-36.3c12.33-29,30.26-55.39,50.17-79.85,24-29.43,51.5-56.59,82.13-79q6.6-4.83,13.38-9.38l2.09-1.37c.73-.49,1.46-1,2.19-1.43h0c1.5-1,3-1.94,4.52-2.89l1.7-1.06,3.24-2,1-.57,1.73-1,1.71-1q3-1.77,6.07-3.46,13.11-7.31,26.84-13.36,4.05-1.79,8.15-3.45a287.43,287.43,0,0,1,38.15-12.51q7.2-1.82,14.49-3.2,8.6-1.66,17.29-2.75a274.38,274.38,0,0,1,27.78-2.07c65.32-1.59,131.3,19.67,182.49,60.42,20.4,16.24,38.73,35.47,61.64,47.92,20,10.84,43.41,15.33,64.83,6.8,17.7-7.05,29.22-10.55,49.1-9.48A411.56,411.56,0,0,1,870.68,263c1.56.57,3.12,1.16,4.67,1.75,100.71,38.55,187.3,115.1,232.28,213.47q1.78,3.9,3.47,7.86C1137.93,548.73,1147.61,622.18,1118,683.26Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><path d="M264,337.32V716.48l-1.3.36a192.87,192.87,0,0,1-25.61,5.36,142.7,142.7,0,0,1-58.61-4.72l-.66-.19-1.22-.36-1.67-.52q-4.2-1.32-8.33-2.89l-1.67-.64q-4-1.54-7.83-3.31l-1.67-.76q-4-1.86-7.83-3.93c-.92-.48-1.83-1-2.73-1.49q-4.08-2.28-8-4.78-4.16-2.65-8.14-5.53-1.84-1.32-3.64-2.71a161.36,161.36,0,0,1-19.37-17.47c-.33-.33-.64-.67-.95-1-1.59-1.72-3.15-3.47-4.66-5.26-.56-.66-1.12-1.32-1.67-2q-2.69-3.28-5.19-6.71c-.25-.33-.49-.67-.73-1a144.59,144.59,0,0,1-16.87-30.5c-.14-.33-.27-.67-.39-1q-2-5.15-3.65-10.47c-.45-1.48-.88-3-1.26-4.48-.13-.44-.25-.89-.36-1.33-5.52-21.73-6.15-44.32-6.15-66.78q0-3.93,0-7.85c.16-36.33.72-73.28,6.08-109.11,0-.25.07-.5.11-.74a340.76,340.76,0,0,1,7.31-35.82H179.46V337.32h20.36V295.93h43.82v41.39Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><path d="M1118,683.26c-26.56,54.81-80.52,91.46-136.42,115.63a503.33,503.33,0,0,1-140.45,37.48q-13.9,1.65-27.89,2.56a540.92,540.92,0,0,1-71.57-.08q-21.5-1.43-42.85-4.57a540.44,540.44,0,0,1-143.27-41.72q-19.74-8.89-38.68-19.41a494.85,494.85,0,0,1-60.46-39.54q-6.36-4.86-12.56-9.93l-1.7-1.39c-3.25-2.68-6.47-5.42-9.74-8.08a141.6,141.6,0,0,0-17.26-12.38c-.41-.24-.82-.48-1.24-.71-1.12-.65-2.26-1.26-3.42-1.84a78.31,78.31,0,0,0-7.34-3.24V540.93H588.74v34.53h81.45V322.88h95.87v101h47.42v-59.8h39.18V300.2h18V263c1.56.57,3.12,1.16,4.67,1.75V300.2h17.52v63.92H932v59.8h57.73V651.75h91.76V486.06h29.57C1137.93,548.73,1147.61,622.18,1118,683.26Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><rect x="635.01" y="300.96" width="42.85" height="42.85" fill="#6c63ff" opacity="0.1"/><rect x="635.01" y="389.78" width="42.85" height="42.85" fill="#6c63ff" opacity="0.1"/><rect x="635.01" y="478.61" width="42.85" height="42.85" fill="#6c63ff" opacity="0.1"/><rect x="635.01" y="567.44" width="42.85" height="42.85" fill="#6c63ff" opacity="0.1"/><rect x="635.01" y="656.26" width="42.85" height="42.85" fill="#6c63ff" opacity="0.1"/><path d="M741.69,805v33.84q-21.5-1.43-42.85-4.57V805Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><rect x="353.45" y="536.38" width="149.99" height="19.41" fill="#6c63ff" opacity="0.1"/><rect x="353.45" y="595.33" width="149.99" height="19.41" fill="#6c63ff" opacity="0.1"/><path d="M567.27,714.21v19.4H456.43q-6.36-4.86-12.56-9.93l-1.7-1.39c-3.25-2.68-6.47-5.42-9.74-8.08Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><path d="M567.27,773.15v19.41h-11.7q-19.74-8.89-38.68-19.41Z" transform="translate(-63.83 -59.93)" fill="#6c63ff" opacity="0.1"/><rect x="749.43" y="416.99" width="27.89" height="27.89" fill="#6c63ff" opacity="0.1"/><rect x="145.43" y="287.01" width="27.89" height="27.89" fill="#6c63ff" opacity="0.1"/><rect x="145.43" y="351.81" width="27.89" height="27.89" fill="#6c63ff" opacity="0.1"/><rect Line truncated
|
||||
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "JSON Crack",
|
||||
"short_name": "JSON Crack",
|
||||
"description": "Visualize your JSON data onto graphs seamlessly.",
|
||||
"description": "JSON Crack Editor is a tool for visualizing into graphs, analyzing, editing, formatting, querying, transforming and validating JSON, CSV, YAML, XML, and more.",
|
||||
"theme_color": "#36393e",
|
||||
"background_color": "#36393e",
|
||||
"display": "standalone",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
User-agent: *
|
||||
|
||||
Allow: /
|
||||
Disallow: /*?*
|
||||
Disallow: /widget
|
||||
|
||||
Sitemap: https://jsoncrack.com/sitemap.xml
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
|
||||
<url><loc>https://jsoncrack.com</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/csv-to-json</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/csv-to-xml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/csv-to-yaml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/json-to-csv</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/json-to-xml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/json-to-yaml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/xml-to-csv</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/xml-to-json</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/xml-to-yaml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/yaml-to-csv</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/yaml-to-json</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/converter/yaml-to-xml</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/docs</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/editor</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/legal/privacy</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/legal/terms</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/tools/json-schema</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/csv-to-go</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/csv-to-kotlin</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/csv-to-rust</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/csv-to-typescript</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/json-to-go</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/json-to-kotlin</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/json-to-rust</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/json-to-typescript</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/xml-to-go</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/xml-to-kotlin</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/xml-to-rust</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/xml-to-typescript</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/yaml-to-go</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/yaml-to-kotlin</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/yaml-to-rust</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
<url><loc>https://jsoncrack.com/type/yaml-to-typescript</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
|
||||
</urlset>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<sitemap><loc>https://jsoncrack.com/sitemap-0.xml</loc></sitemap>
|
||||
</sitemapindex>
|
||||
@@ -0,0 +1,21 @@
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
Sentry.init({
|
||||
dsn: "https://d3345591295d4dd1b8c579b62003d939@o1284435.ingest.sentry.io/6495191",
|
||||
tracesSampleRate: 0.2,
|
||||
debug: false,
|
||||
release: `${process.env.SENTRY_RELEASE || "production"}`,
|
||||
allowUrls: ["https://jsoncrack.com/editor"],
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 0.1,
|
||||
integrations: [
|
||||
new Sentry.BrowserTracing(),
|
||||
new Sentry.Replay({
|
||||
maskAllText: true,
|
||||
blockAllMedia: true,
|
||||
}),
|
||||
],
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
/* empty */
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import { APIError, createClient } from "altogic";
|
||||
|
||||
let envUrl = process.env.NEXT_PUBLIC_ALTOGIC_ENV_URL as string;
|
||||
let clientKey = process.env.NEXT_PUBLIC_ALTOGIC_CLIENT_KEY as string;
|
||||
|
||||
const altogic = createClient(envUrl, clientKey);
|
||||
|
||||
export interface AltogicResponse<T> {
|
||||
data: T;
|
||||
errors: APIError | null;
|
||||
}
|
||||
|
||||
export { altogic };
|
||||
@@ -1,100 +0,0 @@
|
||||
import React from "react";
|
||||
import styled, { DefaultTheme } from "styled-components";
|
||||
|
||||
enum ButtonType {
|
||||
PRIMARY = "PRIMARY",
|
||||
SECONDARY = "BLURPLE",
|
||||
TERTIARY = "PURPLE",
|
||||
DANGER = "DANGER",
|
||||
SUCCESS = "SEAGREEN",
|
||||
WARNING = "ORANGE",
|
||||
}
|
||||
|
||||
interface ButtonProps {
|
||||
status?: keyof typeof ButtonType;
|
||||
block?: boolean;
|
||||
}
|
||||
|
||||
type ConditionalProps =
|
||||
| ({
|
||||
link: boolean;
|
||||
} & React.ComponentPropsWithoutRef<"a">)
|
||||
| ({
|
||||
link?: never;
|
||||
} & React.ComponentPropsWithoutRef<"button">);
|
||||
|
||||
function getButtonStatus(status: keyof typeof ButtonType, theme: DefaultTheme) {
|
||||
return theme[ButtonType[status]];
|
||||
}
|
||||
|
||||
const StyledButton = styled.button<{
|
||||
status: keyof typeof ButtonType;
|
||||
block: boolean;
|
||||
link: boolean;
|
||||
}>`
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background: ${({ status, theme }) => getButtonStatus(status, theme)};
|
||||
color: #ffffff;
|
||||
padding: ${({ link }) => (link ? "2px 16px" : "8px 16px")};
|
||||
min-width: 70px;
|
||||
min-height: 32px;
|
||||
border-radius: 3px;
|
||||
font-family: "Mona Sans";
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
width: ${({ block }) => (block ? "-webkit-fill-available" : "fit-content")};
|
||||
height: 40px;
|
||||
background-image: none;
|
||||
|
||||
:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
div {
|
||||
white-space: normal;
|
||||
margin: 0 auto;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
font-size: 14px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledButtonContent = styled.div`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 600;
|
||||
`;
|
||||
|
||||
export const Button: React.FC<ButtonProps & ConditionalProps> = ({
|
||||
children,
|
||||
status,
|
||||
block = false,
|
||||
link = false,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
<StyledButton
|
||||
type="button"
|
||||
as={link ? "a" : "button"}
|
||||
status={status ?? "PRIMARY"}
|
||||
block={block}
|
||||
link={link}
|
||||
{...props}
|
||||
>
|
||||
<StyledButtonContent>{children}</StyledButtonContent>
|
||||
</StyledButton>
|
||||
);
|
||||
};
|
||||
@@ -1,86 +0,0 @@
|
||||
import React from "react";
|
||||
import Script from "next/script";
|
||||
import { IoMdClose } from "react-icons/io";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledCloseBtn = styled.button`
|
||||
display: none;
|
||||
width: 3vw;
|
||||
height: 3vw;
|
||||
opacity: 0.8;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-radius: 0;
|
||||
background: ${({ theme }) => theme.DANGER};
|
||||
`;
|
||||
|
||||
const StyledWrapper = styled.span<{ editor?: boolean }>`
|
||||
position: relative;
|
||||
|
||||
#carbonads {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
${({ theme, editor }) =>
|
||||
editor &&
|
||||
`
|
||||
#carbonads {
|
||||
border-radius: 0;
|
||||
border-top: 1px solid ${theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
}
|
||||
|
||||
#carbonads > span {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
`};
|
||||
|
||||
&:hover {
|
||||
${StyledCloseBtn} {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (display-mode: standalone) {
|
||||
#carbonads {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CarbonAds: React.FC<{ editor?: boolean }> = ({ editor = false }) => {
|
||||
const [isHidden, setIsHidden] = React.useState(false);
|
||||
|
||||
if (isHidden) return null;
|
||||
|
||||
return (
|
||||
<StyledWrapper editor={editor} id="carbon-wrapper">
|
||||
{editor && (
|
||||
<StyledCloseBtn onClick={() => setIsHidden(true)}>
|
||||
<IoMdClose color="white" size="15" />
|
||||
</StyledCloseBtn>
|
||||
)}
|
||||
<Script
|
||||
type="text/javascript"
|
||||
src="//cdn.carbonads.com/carbon.js?serve=CE7IPKQL&placement=jsoncrackcom"
|
||||
id="_carbonads_js"
|
||||
strategy="lazyOnload"
|
||||
onLoad={() => {
|
||||
const init = () => {
|
||||
const parent = document.getElementById("carbon-wrapper");
|
||||
const ads = document.getElementById("carbonads");
|
||||
|
||||
if (ads === null) return setTimeout(() => init(), 500);
|
||||
parent?.appendChild(ads);
|
||||
};
|
||||
|
||||
init();
|
||||
}}
|
||||
/>
|
||||
</StyledWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
import React from "react";
|
||||
// import { useInViewport } from "react-in-viewport";
|
||||
import { CustomNodeProps } from "src/components/CustomNode";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import * as Styled from "./styles";
|
||||
|
||||
const inViewport = true;
|
||||
|
||||
const ObjectNode: React.FC<CustomNodeProps> = ({ node, x, y }) => {
|
||||
const { text, width, height, data } = node;
|
||||
const ref = React.useRef(null);
|
||||
const performanceMode = useGraph(state => state.performanceMode);
|
||||
// const { inViewport } = useInViewport(ref);
|
||||
|
||||
if (data.isEmpty) return null;
|
||||
|
||||
return (
|
||||
<Styled.StyledForeignObject width={width} height={height} x={0} y={0} ref={ref} isObject>
|
||||
{(!performanceMode || inViewport) &&
|
||||
text.map((val, idx) => (
|
||||
<Styled.StyledRow data-key={JSON.stringify(val[1])} data-x={x} data-y={y} key={idx}>
|
||||
<Styled.StyledKey objectKey>
|
||||
{JSON.stringify(val[0]).replaceAll('"', "")}:{" "}
|
||||
</Styled.StyledKey>
|
||||
<Styled.StyledLinkItUrl>{JSON.stringify(val[1])}</Styled.StyledLinkItUrl>
|
||||
</Styled.StyledRow>
|
||||
))}
|
||||
</Styled.StyledForeignObject>
|
||||
);
|
||||
};
|
||||
|
||||
function propsAreEqual(prev: CustomNodeProps, next: CustomNodeProps) {
|
||||
return String(prev.node.text) === String(next.node.text) && prev.node.width === next.node.width;
|
||||
}
|
||||
|
||||
export default React.memo(ObjectNode, propsAreEqual);
|
||||
@@ -1,113 +0,0 @@
|
||||
import React from "react";
|
||||
import { MdLink, MdLinkOff } from "react-icons/md";
|
||||
// import { useInViewport } from "react-in-viewport";
|
||||
import { CustomNodeProps } from "src/components/CustomNode";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import useStored from "src/store/useStored";
|
||||
import styled from "styled-components";
|
||||
import * as Styled from "./styles";
|
||||
|
||||
const inViewport = true;
|
||||
|
||||
const StyledExpand = styled.button`
|
||||
pointer-events: all;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
height: 100%;
|
||||
width: 40px;
|
||||
border-left: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
|
||||
&:hover {
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0);
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTextNodeWrapper = styled.div<{ hasCollapse: boolean }>`
|
||||
display: flex;
|
||||
justify-content: ${({ hasCollapse }) => (hasCollapse ? "space-between" : "center")};
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
`;
|
||||
|
||||
const StyledImageWrapper = styled.div`
|
||||
padding: 5px;
|
||||
`;
|
||||
|
||||
const StyledImage = styled.img`
|
||||
border-radius: 2px;
|
||||
object-fit: contain;
|
||||
background: ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
`;
|
||||
|
||||
const TextNode: React.FC<CustomNodeProps> = ({ node, x, y, hasCollapse = false }) => {
|
||||
const { id, text, width, height, data } = node;
|
||||
const ref = React.useRef(null);
|
||||
const hideCollapse = useStored(state => state.hideCollapse);
|
||||
const childrenCount = useStored(state => state.childrenCount);
|
||||
const imagePreview = useStored(state => state.imagePreview);
|
||||
const expandNodes = useGraph(state => state.expandNodes);
|
||||
const collapseNodes = useGraph(state => state.collapseNodes);
|
||||
const isExpanded = useGraph(state => state.collapsedParents.includes(id));
|
||||
const performanceMode = useGraph(state => state.performanceMode);
|
||||
const isImage =
|
||||
!Array.isArray(text) && /(https?:\/\/.*\.(?:png|jpg|gif))/i.test(text) && imagePreview;
|
||||
// const { inViewport } = useInViewport(ref);
|
||||
|
||||
const handleExpand = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.stopPropagation();
|
||||
|
||||
if (!isExpanded) collapseNodes(id);
|
||||
else expandNodes(id);
|
||||
};
|
||||
|
||||
return (
|
||||
<Styled.StyledForeignObject
|
||||
width={width}
|
||||
height={height}
|
||||
x={0}
|
||||
y={0}
|
||||
hasCollapse={data.parent && hasCollapse}
|
||||
ref={ref}
|
||||
>
|
||||
{isImage ? (
|
||||
<StyledImageWrapper>
|
||||
<StyledImage src={text} width="70" height="70" />
|
||||
</StyledImageWrapper>
|
||||
) : (
|
||||
<StyledTextNodeWrapper hasCollapse={data.parent && hideCollapse}>
|
||||
{(!performanceMode || inViewport) && (
|
||||
<Styled.StyledKey
|
||||
data-x={x}
|
||||
data-y={y}
|
||||
data-key={JSON.stringify(text)}
|
||||
parent={data.parent}
|
||||
>
|
||||
<Styled.StyledLinkItUrl>
|
||||
{JSON.stringify(text).replaceAll('"', "")}
|
||||
</Styled.StyledLinkItUrl>
|
||||
</Styled.StyledKey>
|
||||
)}
|
||||
{data.parent && data.childrenCount > 0 && childrenCount && (
|
||||
<Styled.StyledChildrenCount>({data.childrenCount})</Styled.StyledChildrenCount>
|
||||
)}
|
||||
|
||||
{inViewport && data.parent && hasCollapse && hideCollapse && (
|
||||
<StyledExpand onClick={handleExpand}>
|
||||
{isExpanded ? <MdLinkOff size={18} /> : <MdLink size={18} />}
|
||||
</StyledExpand>
|
||||
)}
|
||||
</StyledTextNodeWrapper>
|
||||
)}
|
||||
</Styled.StyledForeignObject>
|
||||
);
|
||||
};
|
||||
|
||||
function propsAreEqual(prev: CustomNodeProps, next: CustomNodeProps) {
|
||||
return prev.node.text === next.node.text && prev.node.width === next.node.width;
|
||||
}
|
||||
|
||||
export default React.memo(TextNode, propsAreEqual);
|
||||
@@ -1,36 +0,0 @@
|
||||
import React from "react";
|
||||
import { Node, NodeProps } from "reaflow";
|
||||
import ObjectNode from "./ObjectNode";
|
||||
import TextNode from "./TextNode";
|
||||
|
||||
export interface CustomNodeProps {
|
||||
node: NodeData;
|
||||
x: number;
|
||||
y: number;
|
||||
hasCollapse?: boolean;
|
||||
}
|
||||
|
||||
const rootProps = {
|
||||
width: 40,
|
||||
height: 40,
|
||||
rx: 50,
|
||||
ry: 50,
|
||||
};
|
||||
|
||||
export const CustomNode = (nodeProps: NodeProps) => {
|
||||
const { text, data } = nodeProps.properties;
|
||||
|
||||
return (
|
||||
<Node {...nodeProps} {...(data.isEmpty && rootProps)} label={<React.Fragment />}>
|
||||
{({ node, x, y }) => {
|
||||
if (Array.isArray(text)) {
|
||||
return <ObjectNode node={node as NodeData} x={x} y={y} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<TextNode node={node as NodeData} hasCollapse={data.childrenCount > 0} x={x} y={y} />
|
||||
);
|
||||
}}
|
||||
</Node>
|
||||
);
|
||||
};
|
||||
@@ -1,99 +0,0 @@
|
||||
import { LinkItUrl } from "react-linkify-it";
|
||||
import styled, { DefaultTheme } from "styled-components";
|
||||
|
||||
function getTypeColor(value: string, theme: DefaultTheme) {
|
||||
if (!Number.isNaN(+value)) return theme.NODE_COLORS.INTEGER;
|
||||
if (value === "true") return theme.NODE_COLORS.BOOL.TRUE;
|
||||
if (value === "false") return theme.NODE_COLORS.BOOL.FALSE;
|
||||
if (value === "null") return theme.NODE_COLORS.NULL;
|
||||
return theme.NODE_COLORS.NODE_VALUE;
|
||||
}
|
||||
|
||||
export const StyledLinkItUrl = styled(LinkItUrl)`
|
||||
text-decoration: underline;
|
||||
pointer-events: all;
|
||||
`;
|
||||
|
||||
export const StyledForeignObject = styled.foreignObject<{
|
||||
hasCollapse?: boolean;
|
||||
isObject?: boolean;
|
||||
}>`
|
||||
text-align: ${({ isObject }) => !isObject && "center"};
|
||||
font-size: 12px;
|
||||
overflow: hidden;
|
||||
color: ${({ theme }) => theme.NODE_COLORS.TEXT};
|
||||
pointer-events: none;
|
||||
padding: ${({ isObject }) => isObject && "10px"};
|
||||
|
||||
* {
|
||||
font-family: "Roboto Mono", monospace;
|
||||
}
|
||||
|
||||
&.searched {
|
||||
border: 2px solid ${({ theme }) => theme.TEXT_POSITIVE};
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
border: 2px dashed #ff2970;
|
||||
background: rgba(255, 214, 0, 0.3);
|
||||
}
|
||||
|
||||
.renderVisible {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
`;
|
||||
|
||||
function getKeyColor(theme: DefaultTheme, parent: "array" | "object" | false, objectKey: boolean) {
|
||||
if (parent) {
|
||||
if (parent === "array") return theme.NODE_COLORS.PARENT_ARR;
|
||||
return theme.NODE_COLORS.PARENT_OBJ;
|
||||
}
|
||||
if (objectKey) return theme.NODE_COLORS.NODE_KEY;
|
||||
return theme.NODE_COLORS.TEXT;
|
||||
}
|
||||
|
||||
export const StyledKey = styled.span<{
|
||||
objectKey?: boolean;
|
||||
parent?: "array" | "object" | false;
|
||||
value?: string;
|
||||
}>`
|
||||
display: inline;
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
color: ${({ theme, objectKey = false, parent = false }) => getKeyColor(theme, parent, objectKey)};
|
||||
font-size: ${({ parent }) => parent && "14px"};
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
padding: ${({ objectKey }) => !objectKey && 10}px;
|
||||
`;
|
||||
|
||||
export const StyledRow = styled.span.attrs<{
|
||||
"data-key": string;
|
||||
theme: DefaultTheme;
|
||||
}>(props => ({
|
||||
style: {
|
||||
color: getTypeColor(props["data-key"], props.theme),
|
||||
},
|
||||
}))<{ "data-key": string; theme: DefaultTheme }>`
|
||||
display: block;
|
||||
height: 18px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
padding: 0 auto;
|
||||
`;
|
||||
|
||||
export const StyledChildrenCount = styled.span`
|
||||
color: ${({ theme }) => theme.NODE_COLORS.CHILD_COUNT};
|
||||
padding: 10px;
|
||||
margin-left: -15px;
|
||||
`;
|
||||
@@ -1,61 +0,0 @@
|
||||
import React from "react";
|
||||
import { MdReportGmailerrorred, MdOutlineCheckCircleOutline } from "react-icons/md";
|
||||
import useJson from "src/store/useJson";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledErrorWrapper = styled.div`
|
||||
z-index: 1;
|
||||
`;
|
||||
|
||||
const StyledErrorExpand = styled.div<{ error: boolean }>`
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 4px 16px;
|
||||
height: 28px;
|
||||
border-radius: 0;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: ${({ theme, error }) => (error ? theme.TEXT_DANGER : theme.TEXT_POSITIVE)};
|
||||
pointer-events: ${({ error }) => !error && "none"};
|
||||
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
|
||||
box-shadow: 0 1px 0px ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
`;
|
||||
|
||||
const StyledTitle = styled.span`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
gap: 10px;
|
||||
font-size: 16px;
|
||||
`;
|
||||
|
||||
const StyledError = styled.pre`
|
||||
color: ${({ theme }) => theme.TEXT_DANGER};
|
||||
border-bottom: 1px solid ${({ theme }) => theme.SILVER_DARK};
|
||||
font-size: 12px;
|
||||
padding: 12px;
|
||||
margin: 0;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-line;
|
||||
`;
|
||||
|
||||
export const ErrorContainer = () => {
|
||||
const hasError = useJson(state => state.hasError);
|
||||
|
||||
return (
|
||||
<StyledErrorWrapper>
|
||||
<StyledErrorExpand error={hasError}>
|
||||
<StyledTitle>
|
||||
{hasError ? (
|
||||
<MdReportGmailerrorred size={20} />
|
||||
) : (
|
||||
<MdOutlineCheckCircleOutline size={20} />
|
||||
)}
|
||||
{hasError ? "Invalid JSON" : "JSON Valid"}
|
||||
</StyledTitle>
|
||||
</StyledErrorExpand>
|
||||
</StyledErrorWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,84 +0,0 @@
|
||||
import Link from "next/link";
|
||||
import { FaGithub, FaLinkedin, FaTwitter } from "react-icons/fa";
|
||||
import styled from "styled-components";
|
||||
import pkg from "../../../package.json";
|
||||
|
||||
export const StyledFooter = styled.footer`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 30px 3%;
|
||||
border-top: 1px solid #b4b4b4;
|
||||
opacity: 0.7;
|
||||
`;
|
||||
|
||||
export const StyledFooterText = styled.p`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
color: #b4b4b4;
|
||||
`;
|
||||
|
||||
export const StyledNavLink = styled.a`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover {
|
||||
font-weight: 500;
|
||||
color: ${({ theme }) => theme.ORANGE};
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledIconLinks = styled.div`
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
`;
|
||||
|
||||
export const Footer = () => (
|
||||
<StyledFooter>
|
||||
<StyledFooterText>
|
||||
<Link href="/">
|
||||
<a>
|
||||
<img width="120" src="assets/icon.png" alt="icon" loading="lazy" />
|
||||
</a>
|
||||
</Link>
|
||||
<span>
|
||||
© {new Date().getFullYear()} JSON Crack - {pkg.version}
|
||||
</span>
|
||||
</StyledFooterText>
|
||||
<StyledIconLinks>
|
||||
<StyledNavLink
|
||||
href="https://github.com/AykutSarac/jsoncrack.com"
|
||||
rel="external"
|
||||
target="_blank"
|
||||
aria-label="github"
|
||||
>
|
||||
<FaGithub size={26} />
|
||||
</StyledNavLink>
|
||||
|
||||
<StyledNavLink
|
||||
href="https://www.linkedin.com/in/aykutsarac/"
|
||||
rel="me"
|
||||
target="_blank"
|
||||
aria-label="linkedin"
|
||||
>
|
||||
<FaLinkedin size={26} />
|
||||
</StyledNavLink>
|
||||
|
||||
<StyledNavLink
|
||||
href="https://twitter.com/jsoncrack"
|
||||
rel="me"
|
||||
target="_blank"
|
||||
aria-label="twitter"
|
||||
>
|
||||
<FaTwitter size={26} />
|
||||
</StyledNavLink>
|
||||
</StyledIconLinks>
|
||||
</StyledFooter>
|
||||
);
|
||||
@@ -1,26 +0,0 @@
|
||||
import React from "react";
|
||||
import Script from "next/script";
|
||||
|
||||
const isDevelopment = process.env.NODE_ENV === "development";
|
||||
|
||||
export const GoogleAnalytics: React.FC = () => {
|
||||
if (isDevelopment) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Script
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-JKZEHMJBMH"
|
||||
strategy="afterInteractive"
|
||||
/>
|
||||
<Script id="google-analytics" strategy="afterInteractive">
|
||||
{`
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-JKZEHMJBMH');
|
||||
`}
|
||||
</Script>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,37 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledErrorView = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
img {
|
||||
filter: drop-shadow(2px 4px 6px black);
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTitle = styled.h2`
|
||||
color: ${({ theme }) => theme.TEXT_DANGER};
|
||||
`;
|
||||
|
||||
const StyledInfo = styled.p`
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
`;
|
||||
|
||||
export const ErrorView = () => (
|
||||
<StyledErrorView>
|
||||
<img src="/assets/undraw_qa_engineers_dg-5-p.svg" width="200" height="200" alt="oops" />
|
||||
<StyledTitle>JSON Crack is unable to handle this file!</StyledTitle>
|
||||
<StyledInfo>
|
||||
We apologize for the problem you encountered. We are doing our best as an Open Source
|
||||
community to improve our service. Unfortunately, JSON Crack is currently unable to handle such
|
||||
a large file.
|
||||
</StyledInfo>
|
||||
</StyledErrorView>
|
||||
);
|
||||
@@ -1,147 +0,0 @@
|
||||
import React from "react";
|
||||
import { ReactZoomPanPinchRef, TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
|
||||
import { Canvas, Edge, ElkRoot } from "reaflow";
|
||||
import { CustomNode } from "src/components/CustomNode";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import styled from "styled-components";
|
||||
import { Loading } from "../Loading";
|
||||
import { ErrorView } from "./ErrorView";
|
||||
|
||||
interface GraphProps {
|
||||
isWidget?: boolean;
|
||||
openModal: () => void;
|
||||
setSelectedNode: (node: [string, string][]) => void;
|
||||
}
|
||||
|
||||
const StyledEditorWrapper = styled.div<{ isWidget: boolean }>`
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: ${({ isWidget }) => (isWidget ? "100vh" : "calc(100vh - 36px)")};
|
||||
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
|
||||
background-image: ${({ theme }) =>
|
||||
`radial-gradient(#505050 0.5px, ${theme.BACKGROUND_SECONDARY} 0.5px)`};
|
||||
background-size: 15px 15px;
|
||||
|
||||
:active {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.dragging,
|
||||
.dragging button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
rect {
|
||||
fill: ${({ theme }) => theme.BACKGROUND_NODE};
|
||||
}
|
||||
`;
|
||||
|
||||
const GraphComponent = ({ isWidget = false, openModal, setSelectedNode }: GraphProps) => {
|
||||
const setLoading = useGraph(state => state.setLoading);
|
||||
const setZoomPanPinch = useGraph(state => state.setZoomPanPinch);
|
||||
const centerView = useGraph(state => state.centerView);
|
||||
|
||||
const loading = useGraph(state => state.loading);
|
||||
const direction = useGraph(state => state.direction);
|
||||
const nodes = useGraph(state => state.nodes);
|
||||
const edges = useGraph(state => state.edges);
|
||||
|
||||
const [size, setSize] = React.useState({
|
||||
width: 1,
|
||||
height: 1,
|
||||
});
|
||||
|
||||
const handleNodeClick = React.useCallback(
|
||||
(e: React.MouseEvent<SVGElement>, data: NodeData) => {
|
||||
if (setSelectedNode) setSelectedNode(data.text);
|
||||
if (openModal) openModal();
|
||||
},
|
||||
[openModal, setSelectedNode]
|
||||
);
|
||||
|
||||
const onInit = React.useCallback(
|
||||
(ref: ReactZoomPanPinchRef) => {
|
||||
setZoomPanPinch(ref);
|
||||
},
|
||||
[setZoomPanPinch]
|
||||
);
|
||||
|
||||
const onLayoutChange = React.useCallback(
|
||||
(layout: ElkRoot) => {
|
||||
if (layout.width && layout.height) {
|
||||
const areaSize = layout.width * layout.height;
|
||||
const changeRatio = Math.abs((areaSize * 100) / (size.width * size.height) - 100);
|
||||
|
||||
setSize({
|
||||
width: (layout.width as number) + 400,
|
||||
height: (layout.height as number) + 400,
|
||||
});
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
setTimeout(() => {
|
||||
if (changeRatio > 70 || isWidget) centerView();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
[centerView, isWidget, setLoading, size.height, size.width]
|
||||
);
|
||||
|
||||
const onCanvasClick = React.useCallback(() => {
|
||||
const input = document.querySelector("input:focus") as HTMLInputElement;
|
||||
if (input) input.blur();
|
||||
}, []);
|
||||
|
||||
if (nodes.length > 8_000) return <ErrorView />;
|
||||
|
||||
return (
|
||||
<StyledEditorWrapper isWidget={isWidget} onContextMenu={e => e.preventDefault()}>
|
||||
<Loading message="Painting graph..." loading={loading} />
|
||||
<TransformWrapper
|
||||
maxScale={2}
|
||||
minScale={0.05}
|
||||
initialScale={0.4}
|
||||
wheel={{ step: 0.08 }}
|
||||
zoomAnimation={{ animationType: "linear" }}
|
||||
doubleClick={{ disabled: true }}
|
||||
onInit={onInit}
|
||||
onPanning={ref => ref.instance.wrapperComponent?.classList.add("dragging")}
|
||||
onPanningStop={ref => ref.instance.wrapperComponent?.classList.remove("dragging")}
|
||||
>
|
||||
<TransformComponent
|
||||
wrapperStyle={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
overflow: "hidden",
|
||||
display: loading ? "none" : "block",
|
||||
}}
|
||||
>
|
||||
<Canvas
|
||||
className="jsoncrack-canvas"
|
||||
nodes={nodes}
|
||||
edges={edges}
|
||||
maxWidth={size.width}
|
||||
maxHeight={size.height}
|
||||
direction={direction}
|
||||
onLayoutChange={onLayoutChange}
|
||||
onCanvasClick={onCanvasClick}
|
||||
zoomable={false}
|
||||
animated={false}
|
||||
readonly={true}
|
||||
dragEdge={null}
|
||||
dragNode={null}
|
||||
fit={true}
|
||||
key={direction}
|
||||
node={props => <CustomNode {...props} onClick={handleNodeClick} />}
|
||||
edge={props => <Edge {...props} containerClassName={`edge-${props.id}`} />}
|
||||
/>
|
||||
</TransformComponent>
|
||||
</TransformWrapper>
|
||||
</StyledEditorWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export const Graph = React.memo(GraphComponent);
|
||||
@@ -1,19 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledInput = styled.input`
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
line-height: 32px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
height: 40px;
|
||||
`;
|
||||
|
||||
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
||||
|
||||
export const Input: React.FC<InputProps> = props => <StyledInput {...props} />;
|
||||
@@ -1,63 +0,0 @@
|
||||
import React from "react";
|
||||
import styled, { keyframes } from "styled-components";
|
||||
|
||||
interface LoadingProps {
|
||||
loading?: boolean;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
const fadeIn = keyframes`
|
||||
99% {
|
||||
visibility: hidden;
|
||||
}
|
||||
100% {
|
||||
visibility: visible;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledLoading = styled.div`
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
background: ${({ theme }) => theme.BLACK_DARK};
|
||||
z-index: 36;
|
||||
pointer-events: none;
|
||||
animation: 0.2s ${fadeIn};
|
||||
animation-fill-mode: forwards;
|
||||
visibility: hidden;
|
||||
`;
|
||||
|
||||
const StyledLogo = styled.h2`
|
||||
font-weight: 800;
|
||||
font-size: 56px;
|
||||
pointer-events: none;
|
||||
margin-bottom: 10px;
|
||||
`;
|
||||
|
||||
const StyledText = styled.span`
|
||||
color: #faa81a;
|
||||
`;
|
||||
|
||||
const StyledMessage = styled.div`
|
||||
color: #b9bbbe;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
`;
|
||||
|
||||
export const Loading: React.FC<LoadingProps> = ({ loading = true, message }) => {
|
||||
if (!loading) return null;
|
||||
|
||||
return (
|
||||
<StyledLoading>
|
||||
<StyledLogo>
|
||||
<StyledText>JSON</StyledText> Crack
|
||||
</StyledLogo>
|
||||
<StyledMessage>{message ?? "Preparing the environment for you..."}</StyledMessage>
|
||||
</StyledLoading>
|
||||
);
|
||||
};
|
||||
@@ -1,76 +0,0 @@
|
||||
import React from "react";
|
||||
import { Button } from "src/components/Button";
|
||||
import useKeyPress from "src/hooks/useKeyPress";
|
||||
import * as Styled from "./styles";
|
||||
|
||||
type ControlProps = React.PropsWithChildren<{
|
||||
setVisible: (status: boolean) => void;
|
||||
}>;
|
||||
|
||||
export type ReactComponent = React.FC<React.PropsWithChildren<{}>>;
|
||||
|
||||
type ModalTypes = {
|
||||
Header: ReactComponent;
|
||||
Content: ReactComponent;
|
||||
Controls: React.FC<ControlProps>;
|
||||
};
|
||||
|
||||
export interface ModalProps {
|
||||
visible: boolean;
|
||||
setVisible: React.Dispatch<React.SetStateAction<boolean>> | ((visible: boolean) => void);
|
||||
size?: "sm" | "md" | "lg";
|
||||
}
|
||||
|
||||
const Header: ReactComponent = ({ children }) => {
|
||||
return (
|
||||
<Styled.HeaderWrapper>
|
||||
<Styled.Title>{children}</Styled.Title>
|
||||
</Styled.HeaderWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
const Content: ReactComponent = ({ children }) => {
|
||||
return <Styled.ContentWrapper>{children}</Styled.ContentWrapper>;
|
||||
};
|
||||
|
||||
const Controls: React.FC<ControlProps> = ({ children, setVisible }) => {
|
||||
const handleEspacePress = useKeyPress("Escape");
|
||||
|
||||
React.useEffect(() => {
|
||||
if (handleEspacePress) setVisible(false);
|
||||
}, [handleEspacePress, setVisible]);
|
||||
|
||||
return (
|
||||
<Styled.ControlsWrapper>
|
||||
<Button onClick={() => setVisible(false)}>Close</Button>
|
||||
{children}
|
||||
</Styled.ControlsWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
const Modal: React.FC<React.PropsWithChildren<ModalProps>> & ModalTypes = ({
|
||||
children,
|
||||
visible,
|
||||
setVisible,
|
||||
size = "sm",
|
||||
}) => {
|
||||
const onClick = (e: React.SyntheticEvent<HTMLDivElement>) => {
|
||||
if (e.currentTarget === e.target) {
|
||||
setVisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (!visible) return null;
|
||||
|
||||
return (
|
||||
<Styled.ModalWrapper onClick={onClick}>
|
||||
<Styled.ModalInnerWrapper size={size}>{children}</Styled.ModalInnerWrapper>
|
||||
</Styled.ModalWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
Modal.Header = Header;
|
||||
Modal.Content = Content;
|
||||
Modal.Controls = Controls;
|
||||
|
||||
export { Modal };
|
||||
@@ -1,68 +0,0 @@
|
||||
import styled, { keyframes } from "styled-components";
|
||||
|
||||
const appearAnimation = keyframes`
|
||||
from { transform: scale(0.6); opacity: 0; }
|
||||
to { transform: scale(1); opacity: 1; };
|
||||
`;
|
||||
|
||||
export const ModalWrapper = styled.div`
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
z-index: 36;
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
`;
|
||||
|
||||
export const ModalInnerWrapper = styled.div<{ size: "sm" | "md" | "lg" }>`
|
||||
min-width: 440px;
|
||||
max-width: ${({ size }) => (size === "sm" ? "490px" : size === "md" ? "50%" : "90%")};
|
||||
width: fit-content;
|
||||
animation: ${appearAnimation} 220ms ease-in-out;
|
||||
line-height: 20px;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
min-width: 90%;
|
||||
max-width: 90%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Title = styled.h2`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_ACTIVE};
|
||||
font-size: 20px !important;
|
||||
margin: 0 !important;
|
||||
`;
|
||||
|
||||
export const HeaderWrapper = styled.div`
|
||||
background: ${({ theme }) => theme.MODAL_BACKGROUND};
|
||||
padding: 16px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
`;
|
||||
|
||||
export const ContentWrapper = styled.div`
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
background: ${({ theme }) => theme.MODAL_BACKGROUND};
|
||||
padding: 16px;
|
||||
overflow: hidden auto;
|
||||
max-height: 500px;
|
||||
`;
|
||||
|
||||
export const ControlsWrapper = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
|
||||
padding: 12px;
|
||||
border-radius: 0 0 5px 5px;
|
||||
gap: 10px;
|
||||
`;
|
||||
@@ -1,104 +0,0 @@
|
||||
import React from "react";
|
||||
import Editor, { loader, Monaco } from "@monaco-editor/react";
|
||||
import debounce from "lodash.debounce";
|
||||
import { Loading } from "src/components/Loading";
|
||||
import useJson from "src/store/useJson";
|
||||
import useStored from "src/store/useStored";
|
||||
import styled from "styled-components";
|
||||
|
||||
loader.config({
|
||||
paths: {
|
||||
vs: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs",
|
||||
},
|
||||
});
|
||||
|
||||
const editorOptions = {
|
||||
formatOnPaste: true,
|
||||
minimap: {
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
|
||||
const StyledWrapper = styled.div`
|
||||
display: grid;
|
||||
height: calc(100vh - 36px);
|
||||
grid-template-columns: 100%;
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
`;
|
||||
|
||||
export const MonacoEditor = () => {
|
||||
const json = useJson(state => state.json);
|
||||
const setJson = useJson(state => state.setJson);
|
||||
const setError = useJson(state => state.setError);
|
||||
const [loaded, setLoaded] = React.useState(false);
|
||||
const [value, setValue] = React.useState<string | undefined>(json);
|
||||
|
||||
const hasError = useJson(state => state.hasError);
|
||||
const getHasChanges = useJson(state => state.getHasChanges);
|
||||
const lightmode = useStored(state => (state.lightmode ? "light" : "vs-dark"));
|
||||
|
||||
const handleEditorWillMount = React.useCallback(
|
||||
(monaco: Monaco) => {
|
||||
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
||||
allowComments: true,
|
||||
comments: "ignore",
|
||||
});
|
||||
|
||||
monaco.editor.onDidChangeMarkers(([uri]) => {
|
||||
const markers = monaco.editor.getModelMarkers({ resource: uri });
|
||||
setError(!!markers.length);
|
||||
});
|
||||
},
|
||||
[setError]
|
||||
);
|
||||
|
||||
const debouncedSetJson = React.useMemo(
|
||||
() =>
|
||||
debounce(value => {
|
||||
if (hasError) return;
|
||||
setJson(value || "[]");
|
||||
}, 1200),
|
||||
[hasError, setJson]
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
if ((value || !hasError) && loaded) debouncedSetJson(value);
|
||||
setLoaded(true);
|
||||
|
||||
return () => debouncedSetJson.cancel();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [debouncedSetJson, hasError, value]);
|
||||
|
||||
React.useEffect(() => {
|
||||
const beforeunload = (e: BeforeUnloadEvent) => {
|
||||
if (getHasChanges()) {
|
||||
const confirmationMessage =
|
||||
"Unsaved changes, if you leave before saving your changes will be lost";
|
||||
|
||||
(e || window.event).returnValue = confirmationMessage; //Gecko + IE
|
||||
return confirmationMessage;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("beforeunload", beforeunload);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("beforeunload", beforeunload);
|
||||
};
|
||||
}, [getHasChanges]);
|
||||
|
||||
return (
|
||||
<StyledWrapper>
|
||||
<Editor
|
||||
value={json}
|
||||
theme={lightmode}
|
||||
options={editorOptions}
|
||||
onChange={setValue}
|
||||
loading={<Loading message="Loading Editor..." />}
|
||||
beforeMount={handleEditorWillMount}
|
||||
defaultLanguage="json"
|
||||
height="100%"
|
||||
/>
|
||||
</StyledWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,33 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledImage = styled.img`
|
||||
max-width: 300px;
|
||||
display: block;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
max-width: 250px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledProducthuntWrapper = styled.span``;
|
||||
|
||||
export const Producthunt = () => {
|
||||
return (
|
||||
<StyledProducthuntWrapper>
|
||||
<a
|
||||
href="https://www.producthunt.com/posts/json-crack?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-json-crack"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<StyledImage
|
||||
width="300"
|
||||
height="64"
|
||||
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=332281&theme=neutral"
|
||||
alt="JSON Crack - Simple visualization tool for your JSON data. | Product Hunt"
|
||||
loading="lazy"
|
||||
/>
|
||||
</a>
|
||||
</StyledProducthuntWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,84 +0,0 @@
|
||||
import React from "react";
|
||||
import { AiOutlineSearch } from "react-icons/ai";
|
||||
import { IoCloseSharp } from "react-icons/io5";
|
||||
import { useFocusNode } from "src/hooks/useFocusNode";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledInputWrapper = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
border-radius: 4px;
|
||||
height: 25px;
|
||||
`;
|
||||
|
||||
const StyledForm = styled.form`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4px 6px;
|
||||
`;
|
||||
|
||||
const StyledInput = styled.input`
|
||||
background: none;
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
outline: none;
|
||||
border: none;
|
||||
width: 112px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: width 0.3s;
|
||||
|
||||
&::-webkit-search-decoration,
|
||||
&::-webkit-search-cancel-button,
|
||||
&::-webkit-search-results-button,
|
||||
&::-webkit-search-results-decoration {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
width: 208px;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledSearchButton = styled.button`
|
||||
display: grid;
|
||||
background: none;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
padding: 0;
|
||||
min-height: unset;
|
||||
|
||||
&:hover {
|
||||
box-shadow: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const SearchInput: React.FC = () => {
|
||||
const [content, setContent, skip] = useFocusNode();
|
||||
|
||||
const onSubmit = (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
skip();
|
||||
};
|
||||
|
||||
const handleClear = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.preventDefault();
|
||||
setContent({ value: "", debounced: "" });
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledInputWrapper>
|
||||
<StyledForm onSubmit={onSubmit}>
|
||||
<StyledInput
|
||||
type="text"
|
||||
value={content.value}
|
||||
onChange={e => setContent(val => ({ ...val, value: e.target.value }))}
|
||||
placeholder="Search Node"
|
||||
/>
|
||||
<StyledSearchButton type="reset" aria-label="search" onClick={handleClear}>
|
||||
{content.value ? <IoCloseSharp size={18} /> : <AiOutlineSearch size={18} />}
|
||||
</StyledSearchButton>
|
||||
</StyledForm>
|
||||
</StyledInputWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
interface SeoTagsProps {
|
||||
title: string;
|
||||
description: string;
|
||||
image: string;
|
||||
}
|
||||
|
||||
export const SeoTags: React.FC<SeoTagsProps> = ({ description, title, image }) => (
|
||||
<>
|
||||
<meta name="description" content={description} />
|
||||
|
||||
{/* <!-- Facebook Meta Tags --> */}
|
||||
<meta property="og:url" content="https://jsoncrack.com" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={image} />
|
||||
|
||||
{/* <!-- Twitter Meta Tags --> */}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:domain" content="https://jsoncrack.com" />
|
||||
<meta property="twitter:url" content="https://jsoncrack.com" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={image} />
|
||||
</>
|
||||
);
|
||||
@@ -1,278 +0,0 @@
|
||||
import React from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { AiOutlineDelete, AiOutlineSave, AiOutlineFileAdd, AiOutlineEdit } from "react-icons/ai";
|
||||
import { CgArrowsMergeAltH, CgArrowsShrinkH } from "react-icons/cg";
|
||||
import { FiDownload } from "react-icons/fi";
|
||||
import { MdCenterFocusWeak } from "react-icons/md";
|
||||
import { TiFlowMerge } from "react-icons/ti";
|
||||
import {
|
||||
VscAccount,
|
||||
VscCloud,
|
||||
VscCollapseAll,
|
||||
VscExpandAll,
|
||||
VscSettingsGear,
|
||||
} from "react-icons/vsc";
|
||||
import { Tooltip } from "src/components/Tooltip";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import useJson from "src/store/useJson";
|
||||
import useModal from "src/store/useModal";
|
||||
import { getNextDirection } from "src/utils/getNextDirection";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledSidebar = styled.div`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
padding: 4px;
|
||||
border-right: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledElement = styled.button`
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
width: fit-content;
|
||||
color: ${({ theme }) => theme.SIDEBAR_ICONS};
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
padding: 12px 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&:hover :is(a, svg) {
|
||||
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
font-size: 22px;
|
||||
|
||||
svg {
|
||||
padding: 8px 4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledText = styled.span<{ secondary?: boolean }>`
|
||||
color: ${({ theme, secondary }) => (secondary ? theme.INTERACTIVE_HOVER : theme.ORANGE)};
|
||||
`;
|
||||
|
||||
const StyledFlowIcon = styled(TiFlowMerge)<{ rotate: number }>`
|
||||
transform: rotate(${({ rotate }) => `${rotate}deg`});
|
||||
`;
|
||||
|
||||
const StyledTopWrapper = styled.nav`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
justify-content: space-evenly;
|
||||
flex-direction: row;
|
||||
|
||||
.mobile {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.desktop {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledBottomWrapper = styled.nav`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledLogo = styled.a`
|
||||
color: ${({ theme }) => theme.FULL_WHITE};
|
||||
padding: 8px 4px;
|
||||
border-bottom: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
border-bottom: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
function rotateLayout(direction: "LEFT" | "RIGHT" | "DOWN" | "UP") {
|
||||
if (direction === "LEFT") return 90;
|
||||
if (direction === "UP") return 180;
|
||||
if (direction === "RIGHT") return 270;
|
||||
return 360;
|
||||
}
|
||||
|
||||
const SidebarButton: React.FC<{
|
||||
onClick: () => void;
|
||||
deviceDisplay?: "desktop" | "mobile";
|
||||
title: string;
|
||||
component: React.ReactNode;
|
||||
}> = ({ onClick, deviceDisplay, title, component }) => {
|
||||
return (
|
||||
<Tooltip className={deviceDisplay} title={title}>
|
||||
<StyledElement onClick={onClick}>{component}</StyledElement>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
export const Sidebar: React.FC = () => {
|
||||
const setVisible = useModal(state => state.setVisible);
|
||||
const setDirection = useGraph(state => state.setDirection);
|
||||
const getJson = useJson(state => state.getJson);
|
||||
|
||||
const collapseGraph = useGraph(state => state.collapseGraph);
|
||||
const expandGraph = useGraph(state => state.expandGraph);
|
||||
const centerView = useGraph(state => state.centerView);
|
||||
const toggleFold = useGraph(state => state.toggleFold);
|
||||
const toggleFullscreen = useGraph(state => state.toggleFullscreen);
|
||||
|
||||
const direction = useGraph(state => state.direction);
|
||||
const foldNodes = useGraph(state => state.foldNodes);
|
||||
const fullscreen = useGraph(state => state.fullscreen);
|
||||
const graphCollapsed = useGraph(state => state.graphCollapsed);
|
||||
|
||||
const handleSave = () => {
|
||||
const a = document.createElement("a");
|
||||
const file = new Blob([getJson()], { type: "text/plain" });
|
||||
|
||||
a.href = window.URL.createObjectURL(file);
|
||||
a.download = "jsoncrack.json";
|
||||
a.click();
|
||||
};
|
||||
|
||||
const toggleFoldNodes = () => {
|
||||
toggleFold(!foldNodes);
|
||||
toast(`${foldNodes ? "Unfolded" : "Folded"} nodes`);
|
||||
};
|
||||
|
||||
const toggleDirection = () => {
|
||||
const nextDirection = getNextDirection(direction);
|
||||
setDirection(nextDirection);
|
||||
};
|
||||
|
||||
const toggleExpandCollapseGraph = () => {
|
||||
if (graphCollapsed) expandGraph();
|
||||
else collapseGraph();
|
||||
|
||||
toast(`${graphCollapsed ? "Expanded" : "Collapsed"} graph.`);
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledSidebar>
|
||||
<StyledTopWrapper>
|
||||
<StyledElement href="/" as={StyledLogo}>
|
||||
<StyledText>J</StyledText>
|
||||
<StyledText secondary>C</StyledText>
|
||||
</StyledElement>
|
||||
|
||||
<SidebarButton
|
||||
title="Edit JSON"
|
||||
deviceDisplay="mobile"
|
||||
onClick={() => toggleFullscreen(!fullscreen)}
|
||||
component={<AiOutlineEdit />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Import File"
|
||||
onClick={() => setVisible("import")(true)}
|
||||
component={<AiOutlineFileAdd />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Rotate Layout"
|
||||
onClick={toggleDirection}
|
||||
component={<StyledFlowIcon rotate={rotateLayout(direction)} />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Center View"
|
||||
deviceDisplay="mobile"
|
||||
onClick={centerView}
|
||||
component={<MdCenterFocusWeak />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title={foldNodes ? "Unfold Nodes" : "Fold Nodes"}
|
||||
deviceDisplay="desktop"
|
||||
onClick={toggleFoldNodes}
|
||||
component={foldNodes ? <CgArrowsShrinkH /> : <CgArrowsMergeAltH />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title={graphCollapsed ? "Expand Graph" : "Collapse Graph"}
|
||||
deviceDisplay="desktop"
|
||||
onClick={toggleExpandCollapseGraph}
|
||||
component={graphCollapsed ? <VscExpandAll /> : <VscCollapseAll />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Download JSON"
|
||||
deviceDisplay="desktop"
|
||||
onClick={handleSave}
|
||||
component={<AiOutlineSave />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Download Image"
|
||||
deviceDisplay="mobile"
|
||||
onClick={() => setVisible("download")(true)}
|
||||
component={<FiDownload />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="Delete JSON"
|
||||
onClick={() => setVisible("clear")(true)}
|
||||
component={<AiOutlineDelete />}
|
||||
/>
|
||||
|
||||
<SidebarButton
|
||||
title="View Cloud"
|
||||
deviceDisplay="desktop"
|
||||
onClick={() => setVisible("cloud")(true)}
|
||||
component={<VscCloud />}
|
||||
/>
|
||||
</StyledTopWrapper>
|
||||
<StyledBottomWrapper>
|
||||
<SidebarButton
|
||||
title="Account"
|
||||
onClick={() => setVisible("account")(true)}
|
||||
component={<VscAccount />}
|
||||
/>
|
||||
<SidebarButton
|
||||
title="Settings"
|
||||
onClick={() => setVisible("settings")(true)}
|
||||
component={<VscSettingsGear />}
|
||||
/>
|
||||
</StyledBottomWrapper>
|
||||
</StyledSidebar>
|
||||
);
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
import React from "react";
|
||||
import { CgSpinner } from "react-icons/cg";
|
||||
import styled, { keyframes } from "styled-components";
|
||||
|
||||
const rotateAnimation = keyframes`
|
||||
to { transform: rotate(360deg); }
|
||||
`;
|
||||
|
||||
const StyledSpinnerWrapper = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 25px;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
svg {
|
||||
animation: ${rotateAnimation} 1s linear infinite;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Spinner = () => {
|
||||
return (
|
||||
<StyledSpinnerWrapper>
|
||||
<CgSpinner size={40} />
|
||||
</StyledSpinnerWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,94 +0,0 @@
|
||||
import React from "react";
|
||||
import useStored from "src/store/useStored";
|
||||
import styled from "styled-components";
|
||||
|
||||
async function getSponsors() {
|
||||
try {
|
||||
const res = await fetch("https://ghs.vercel.app/sponsors/aykutsarac");
|
||||
const data = await res.json();
|
||||
|
||||
if (data.sponsors) {
|
||||
return data.sponsors.map(user => ({
|
||||
handle: user.handle,
|
||||
avatar: user.avatar,
|
||||
profile: user.profile,
|
||||
}));
|
||||
}
|
||||
|
||||
return [];
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
const StyledSponsorsWrapper = styled.ul`
|
||||
display: flex;
|
||||
width: 70%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
`;
|
||||
|
||||
const StyledSponsor = styled.li<{ handle: string }>`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
&::before {
|
||||
content: "${({ handle }) => handle}";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
background: ${({ theme }) => theme.BACKGROUND_PRIMARY};
|
||||
transform: translateY(-130%);
|
||||
padding: 6px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: translateY(-110%);
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: ${({ theme }) => theme.BACKGROUND_PRIMARY} transparent transparent transparent;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Sponsors = () => {
|
||||
const { sponsors, setSponsors } = useStored();
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!sponsors?.nextDate || sponsors?.nextDate < Date.now()) {
|
||||
getSponsors().then(setSponsors);
|
||||
}
|
||||
}, [setSponsors, sponsors?.nextDate]);
|
||||
|
||||
if (!sponsors?.users?.length) return null;
|
||||
|
||||
return (
|
||||
<StyledSponsorsWrapper>
|
||||
{sponsors.users.map(user => (
|
||||
<StyledSponsor handle={user.handle} key={user.handle}>
|
||||
<a href={user.profile} target="_blank" rel="noreferrer">
|
||||
<img src={user.avatar} alt={user.handle} width="40" height="40" loading="lazy" />
|
||||
</a>
|
||||
</StyledSponsor>
|
||||
))}
|
||||
</StyledSponsorsWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,53 +0,0 @@
|
||||
import React from "react";
|
||||
import { HiHeart } from "react-icons/hi";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledText = styled.span`
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
width: 0px;
|
||||
transition: 0.2s;
|
||||
font-weight: 600;
|
||||
`;
|
||||
|
||||
const StyledSupportButton = styled.a`
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
padding: 8px;
|
||||
height: 24px;
|
||||
background: ${({ theme }) => theme.DANGER};
|
||||
transition: all 0.5s;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.07),
|
||||
0 4px 8px rgba(0, 0, 0, 0.07), 0 8px 16px rgba(0, 0, 0, 0.07), 0 16px 32px rgba(0, 0, 0, 0.07),
|
||||
0 32px 64px rgba(0, 0, 0, 0.07);
|
||||
opacity: 0.7;
|
||||
box-sizing: content-box !important;
|
||||
|
||||
&:hover {
|
||||
width: 180px;
|
||||
border-radius: 6px;
|
||||
|
||||
${StyledText} {
|
||||
opacity: 1;
|
||||
width: fit-content;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SupportButton = () => {
|
||||
return (
|
||||
<StyledSupportButton href="https://github.com/sponsors/AykutSarac" target="_blank" rel="me">
|
||||
<StyledText>Support JSON Crack</StyledText>
|
||||
<HiHeart size={25} />
|
||||
</StyledSupportButton>
|
||||
);
|
||||
};
|
||||
@@ -1,65 +0,0 @@
|
||||
import React from "react";
|
||||
import { IoIosCheckmarkCircle, IoMdCloseCircle } from "react-icons/io";
|
||||
import styled from "styled-components";
|
||||
|
||||
interface ToggleProps {
|
||||
checked?: boolean;
|
||||
children?: React.ReactNode;
|
||||
onChange?: (value: boolean) => void;
|
||||
}
|
||||
|
||||
const StyledToggleWrapper = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
width: 100%;
|
||||
gap: 6px;
|
||||
`;
|
||||
|
||||
const StyledLabel = styled.label`
|
||||
color: ${({ theme }) => theme.INTERACTIVE_ACTIVE};
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
||||
const StyledToggle = styled.div<{ active: boolean }>`
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: ${({ active }) => (active ? "right" : "left")};
|
||||
align-items: center;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
padding: 2px;
|
||||
border-radius: 14px;
|
||||
background: ${({ active }) => (active ? "#3AA55D" : "#72767c")};
|
||||
cursor: pointer;
|
||||
|
||||
input {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const Toggle: React.FC<ToggleProps> = ({ children, checked = false, onChange }) => {
|
||||
const [isChecked, setIsChecked] = React.useState(checked);
|
||||
|
||||
const handleClick = () => {
|
||||
setIsChecked(!isChecked);
|
||||
if (onChange) onChange(!isChecked);
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledToggleWrapper>
|
||||
<StyledToggle active={isChecked} onClick={handleClick}>
|
||||
{isChecked ? (
|
||||
<IoIosCheckmarkCircle size={22} color="white" />
|
||||
) : (
|
||||
<IoMdCloseCircle size={22} color="white" />
|
||||
)}
|
||||
<input type="checkbox" checked={isChecked} onChange={handleClick} />
|
||||
</StyledToggle>
|
||||
<StyledLabel onClick={handleClick}>{children}</StyledLabel>
|
||||
</StyledToggleWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Toggle;
|
||||
@@ -1,63 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
interface TooltipProps extends React.ComponentPropsWithoutRef<"div"> {
|
||||
title?: string;
|
||||
}
|
||||
|
||||
const StyledTooltip = styled.div`
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translate(calc(100% + 15px), 25%);
|
||||
z-index: 2;
|
||||
background: ${({ theme }) => theme.BACKGROUND_PRIMARY};
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
border-radius: 5px;
|
||||
padding: 6px 8px;
|
||||
white-space: nowrap;
|
||||
font-family: "Mona Sans";
|
||||
font-size: 16px;
|
||||
user-select: none;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.07),
|
||||
0 4px 8px rgba(0, 0, 0, 0.07), 0 8px 16px rgba(0, 0, 0, 0.07), 0 16px 32px rgba(0, 0, 0, 0.07),
|
||||
0 32px 64px rgba(0, 0, 0, 0.07);
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform: translate(-90%, 50%);
|
||||
border-width: 8px;
|
||||
border-style: solid;
|
||||
border-color: transparent ${({ theme }) => theme.BACKGROUND_PRIMARY} transparent transparent;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTooltipWrapper = styled.div`
|
||||
position: relative;
|
||||
width: fit-content;
|
||||
height: 100%;
|
||||
|
||||
&:hover ${StyledTooltip} {
|
||||
display: initial;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Tooltip: React.FC<React.PropsWithChildren<TooltipProps>> = ({
|
||||
children,
|
||||
title,
|
||||
...props
|
||||
}) => (
|
||||
<StyledTooltipWrapper {...props}>
|
||||
{title && <StyledTooltip>{title}</StyledTooltip>}
|
||||
<div>{children}</div>
|
||||
</StyledTooltipWrapper>
|
||||
);
|
||||
@@ -1,10 +0,0 @@
|
||||
import React from "react";
|
||||
import { screen, render } from "@testing-library/react";
|
||||
import { Button } from "src/components/Button";
|
||||
|
||||
describe("Button", () => {
|
||||
it("should render Button component", () => {
|
||||
render(<Button>Click Me!</Button>);
|
||||
expect(screen.getByRole("button", { name: /Click Me/ })).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -1,38 +0,0 @@
|
||||
export const baseURL = process.env.NEXT_PUBLIC_BASE_URL;
|
||||
|
||||
// Example taken from https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json
|
||||
const sampleJson = Object.freeze({
|
||||
squadName: "Super hero squad",
|
||||
homeTown: "Metro City",
|
||||
formed: 2016,
|
||||
secretBase: "Super tower",
|
||||
active: true,
|
||||
members: [
|
||||
{
|
||||
name: "Molecule Man",
|
||||
age: 29,
|
||||
secretIdentity: "Dan Jukes",
|
||||
powers: ["Radiation resistance", "Turning tiny", "Radiation blast"],
|
||||
},
|
||||
{
|
||||
name: "Madame Uppercut",
|
||||
age: 39,
|
||||
secretIdentity: "Jane Wilson",
|
||||
powers: ["Million tonne punch", "Damage resistance", "Superhuman reflexes"],
|
||||
},
|
||||
{
|
||||
name: "Eternal Flame",
|
||||
age: 1000000,
|
||||
secretIdentity: "Unknown",
|
||||
powers: [
|
||||
"Immortality",
|
||||
"Heat Immunity",
|
||||
"Inferno",
|
||||
"Teleportation",
|
||||
"Interdimensional travel",
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
export const defaultJson = JSON.stringify(sampleJson, null, 2);
|
||||
@@ -1,61 +1,37 @@
|
||||
import { createGlobalStyle } from "styled-components";
|
||||
|
||||
const GlobalStyle = createGlobalStyle`
|
||||
@font-face {
|
||||
font-family: 'Mona Sans';
|
||||
src:
|
||||
url('assets/Mona-Sans.woff2') format('woff2 supports variations'),
|
||||
url('assets/Mona-Sans.woff2') format('woff2-variations');
|
||||
font-weight: 200 900;
|
||||
font-stretch: 75% 125%;
|
||||
}
|
||||
|
||||
svg {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, p {
|
||||
font-family: 'Mona Sans';
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
color: ${({ theme }) => theme.FULL_WHITE};
|
||||
font-family: 'Mona Sans';
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 800 800'%3E%3Cg fill-opacity='0.3'%3E%3Ccircle fill='%23000000' cx='400' cy='400' r='600'/%3E%3Ccircle fill='%23110718' cx='400' cy='400' r='500'/%3E%3Ccircle fill='%23220e30' cx='400' cy='400' r='400'/%3E%3Ccircle fill='%23331447' cx='400' cy='400' r='300'/%3E%3Ccircle fill='%23441b5f' cx='400' cy='400' r='200'/%3E%3Ccircle fill='%23552277' cx='400' cy='400' r='100'/%3E%3C/g%3E%3C/svg%3E");
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
background-position: right;
|
||||
}
|
||||
background: #ffffff;
|
||||
overscroll-behavior: none;
|
||||
-webkit-font-smoothing: subpixel-antialiased !important;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
scroll-behavior: smooth;
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
scroll-behavior: smooth !important;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-smoothing: never;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
svg {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: unset;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
button {
|
||||
font-family: 'Mona Sans';
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
@@ -63,94 +39,6 @@ const GlobalStyle = createGlobalStyle`
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
#carbonads * {
|
||||
margin: initial;
|
||||
padding: initial;
|
||||
line-height: initial;
|
||||
}
|
||||
|
||||
#carbonads {
|
||||
--carbon-font-size: 16px;
|
||||
--carbon-padding-size: 12px;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#carbonads {
|
||||
display: inline-block;
|
||||
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
||||
Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue',
|
||||
Helvetica, Arial, sans-serif;
|
||||
font-size: var(--carbon-font-size);
|
||||
}
|
||||
|
||||
#carbonads > span {
|
||||
|
||||
min-width: 18.75em;
|
||||
max-width: clamp(18.75em, 22.5em, 24.5em);
|
||||
min-height: 100px;
|
||||
background-color: ${({ theme }) => theme.BACKGROUND_SECONDARY};
|
||||
box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.085),
|
||||
0 0 2px hsl(0deg 0% 0% / 0.085),
|
||||
0 0 4px hsl(0deg 0% 0% / 0.085),
|
||||
0 0 8px hsl(0deg 0% 0% / 0.085);
|
||||
}
|
||||
|
||||
#carbonads a {
|
||||
text-decoration: none;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
}
|
||||
|
||||
#carbonads a:hover {
|
||||
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
|
||||
}
|
||||
|
||||
#carbonads span {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#carbonads .carbon-wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#carbonads .carbon-img {
|
||||
height: 100px;
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
#carbonads .carbon-img img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#carbonads .carbon-text {
|
||||
padding: 0.625em 1em;
|
||||
|
||||
font-size: 0.8125em;
|
||||
margin-bottom: 1em;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#carbonads .carbon-poweredby {
|
||||
display: block;
|
||||
padding: 6px 8px;
|
||||
color: ${({ theme }) => theme.TEXT_NORMAL};
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1ch;
|
||||
font-weight: 600;
|
||||
font-size: 0.5em;
|
||||
line-height: 1;
|
||||
border-top-left-radius: 3px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export const NODE_DIMENSIONS = {
|
||||
ROW_HEIGHT: 24, // Regular row height
|
||||
PARENT_HEIGHT: 36, // Height for parent nodes
|
||||
} as const;
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { NextSeoProps } from "next-seo";
|
||||
|
||||
export const SEO: NextSeoProps = {
|
||||
title: "JSON Crack | Transform your data into interactive graphs",
|
||||
description:
|
||||
"JSON Crack Editor is a tool for visualizing into graphs, analyzing, editing, formatting, querying, transforming and validating JSON, CSV, YAML, XML, and more.",
|
||||
themeColor: "#36393E",
|
||||
openGraph: {
|
||||
type: "website",
|
||||
images: [
|
||||
{
|
||||
url: "https://jsoncrack.com/assets/jsoncrack.png",
|
||||
width: 1200,
|
||||
height: 627,
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
handle: "@jsoncrack",
|
||||
cardType: "summary_large_image",
|
||||
},
|
||||
additionalLinkTags: [
|
||||
{
|
||||
rel: "manifest",
|
||||
href: "/manifest.json",
|
||||
},
|
||||
{
|
||||
rel: "icon",
|
||||
href: "/favicon.ico",
|
||||
sizes: "48x48",
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -10,7 +10,7 @@ const fixedColors = {
|
||||
DARK_SALMON: "#E9967A",
|
||||
DANGER: "hsl(359,calc(var(--saturation-factor, 1)*66.7%),54.1%)",
|
||||
LIGHTGREEN: "#90EE90",
|
||||
SEAGREEN: "#3BA55D",
|
||||
SEAGREEN: "#11883B",
|
||||
ORANGE: "#FAA81A",
|
||||
SILVER: "#B9BBBE",
|
||||
PRIMARY: "#4D4D4D",
|
||||
@@ -20,7 +20,7 @@ const fixedColors = {
|
||||
const nodeColors = {
|
||||
dark: {
|
||||
NODE_COLORS: {
|
||||
TEXT: "#35D073",
|
||||
TEXT: "#DCE5E7",
|
||||
NODE_KEY: "#59b8ff",
|
||||
NODE_VALUE: "#DCE5E7",
|
||||
INTEGER: "#e8c479",
|
||||
@@ -32,14 +32,15 @@ const nodeColors = {
|
||||
PARENT_ARR: "#FC9A40",
|
||||
PARENT_OBJ: "#59b8ff",
|
||||
CHILD_COUNT: "white",
|
||||
DIVIDER: "#383838",
|
||||
},
|
||||
},
|
||||
light: {
|
||||
NODE_COLORS: {
|
||||
TEXT: "#748700",
|
||||
TEXT: "#000",
|
||||
NODE_KEY: "#761CEA",
|
||||
NODE_VALUE: "#535353",
|
||||
INTEGER: "#A771FE",
|
||||
INTEGER: "#FD0079",
|
||||
NULL: "#afafaf",
|
||||
BOOL: {
|
||||
FALSE: "#FF0000",
|
||||
@@ -48,6 +49,7 @@ const nodeColors = {
|
||||
PARENT_ARR: "#FF6B00",
|
||||
PARENT_OBJ: "#761CEA",
|
||||
CHILD_COUNT: "#535353",
|
||||
DIVIDER: "#e6e6e6",
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -67,11 +69,15 @@ export const darkTheme = {
|
||||
BACKGROUND_NODE: "#2B2C3E",
|
||||
BACKGROUND_TERTIARY: "#202225",
|
||||
BACKGROUND_SECONDARY: "#2f3136",
|
||||
TOOLBAR_BG: "#262626",
|
||||
BACKGROUND_PRIMARY: "#36393f",
|
||||
BACKGROUND_MODIFIER_ACCENT: "rgba(79,84,92,0.48)",
|
||||
MODAL_BACKGROUND: "#36393E",
|
||||
TEXT_NORMAL: "#dcddde",
|
||||
TEXT_POSITIVE: "hsl(139,calc(var(--saturation-factor, 1)*51.6%),52.2%)",
|
||||
GRID_BG_COLOR: "#141414",
|
||||
GRID_COLOR_PRIMARY: "#1c1b1b",
|
||||
GRID_COLOR_SECONDARY: "#191919",
|
||||
};
|
||||
|
||||
export const lightTheme = {
|
||||
@@ -86,14 +92,18 @@ export const lightTheme = {
|
||||
INTERACTIVE_NORMAL: "#4f5660",
|
||||
INTERACTIVE_HOVER: "#2e3338",
|
||||
INTERACTIVE_ACTIVE: "#060607",
|
||||
BACKGROUND_NODE: "#FAFAFA",
|
||||
BACKGROUND_NODE: "#F6F8FA",
|
||||
BACKGROUND_TERTIARY: "#e3e5e8",
|
||||
BACKGROUND_SECONDARY: "#f2f3f5",
|
||||
TOOLBAR_BG: "#ECECEC",
|
||||
BACKGROUND_PRIMARY: "#FFFFFF",
|
||||
BACKGROUND_MODIFIER_ACCENT: "rgba(106,116,128,0.24)",
|
||||
MODAL_BACKGROUND: "#FFFFFF",
|
||||
TEXT_NORMAL: "#2e3338",
|
||||
TEXT_POSITIVE: "#008736",
|
||||
GRID_BG_COLOR: "#f7f7f7",
|
||||
GRID_COLOR_PRIMARY: "#ebe8e8",
|
||||
GRID_COLOR_SECONDARY: "#f2eeee",
|
||||
};
|
||||
|
||||
const themeDs = {
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
import React from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import toast from "react-hot-toast";
|
||||
import {
|
||||
AiOutlineCloudSync,
|
||||
AiOutlineCloudUpload,
|
||||
AiOutlineLink,
|
||||
AiOutlineLock,
|
||||
AiOutlineUnlock,
|
||||
} from "react-icons/ai";
|
||||
import { VscAccount } from "react-icons/vsc";
|
||||
import { saveJson, updateJson } from "src/services/db/json";
|
||||
import useJson from "src/store/useJson";
|
||||
import useModal from "src/store/useModal";
|
||||
import useStored from "src/store/useStored";
|
||||
import useUser from "src/store/useUser";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledBottomBar = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-top: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
max-height: 28px;
|
||||
height: 28px;
|
||||
padding: 0 6px;
|
||||
`;
|
||||
|
||||
const StyledLeft = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: left;
|
||||
gap: 4px;
|
||||
`;
|
||||
|
||||
const StyledRight = styled.div`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: right;
|
||||
gap: 4px;
|
||||
`;
|
||||
|
||||
const StyledBottomBarItem = styled.button`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
width: fit-content;
|
||||
margin: 0;
|
||||
height: 28px;
|
||||
padding: 4px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
|
||||
&:hover:not(&:disabled) {
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0);
|
||||
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: progress;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledImg = styled.img<{ light: boolean }>`
|
||||
filter: ${({ light }) => light && "invert(100%)"};
|
||||
`;
|
||||
|
||||
export const BottomBar = () => {
|
||||
const { replace, query } = useRouter();
|
||||
const data = useJson(state => state.data);
|
||||
const user = useUser(state => state.user);
|
||||
const lightmode = useStored(state => state.lightmode);
|
||||
const hasChanges = useJson(state => state.hasChanges);
|
||||
|
||||
const getJson = useJson(state => state.getJson);
|
||||
const setVisible = useModal(state => state.setVisible);
|
||||
const setHasChanges = useJson(state => state.setHasChanges);
|
||||
const [isPrivate, setIsPrivate] = React.useState(false);
|
||||
const [isUpdating, setIsUpdating] = React.useState(false);
|
||||
|
||||
React.useEffect(() => {
|
||||
setIsPrivate(data?.private ?? false);
|
||||
}, [data]);
|
||||
|
||||
const handleSaveJson = React.useCallback(async () => {
|
||||
if (!user) return setVisible("login")(true);
|
||||
|
||||
if (hasChanges) {
|
||||
try {
|
||||
setIsUpdating(true);
|
||||
toast.loading("Saving JSON...", { id: "jsonSave" });
|
||||
const res = await saveJson({ id: query.json as string, data: getJson() });
|
||||
|
||||
if (res.errors && res.errors.items.length > 0) throw res.errors;
|
||||
if (res.data._id) replace({ query: { json: res.data._id } });
|
||||
|
||||
toast.success("JSON saved to cloud", { id: "jsonSave" });
|
||||
setHasChanges(false);
|
||||
} catch (error: any) {
|
||||
if (error?.items?.length > 0) {
|
||||
return toast.error(error.items[0].message, { id: "jsonSave", duration: 5000 });
|
||||
}
|
||||
|
||||
toast.error("Failed to save JSON!", { id: "jsonSave" });
|
||||
} finally {
|
||||
setIsUpdating(false);
|
||||
}
|
||||
}
|
||||
}, [getJson, hasChanges, query.json, replace, setHasChanges, setVisible, user]);
|
||||
|
||||
const handleLoginClick = () => {
|
||||
if (user) return setVisible("account")(true);
|
||||
else setVisible("login")(true);
|
||||
};
|
||||
|
||||
const setPrivate = async () => {
|
||||
try {
|
||||
if (!query.json) return handleSaveJson();
|
||||
if (!isPrivate && user?.type === 0) {
|
||||
return window.open("https://jsoncrack.com/pricing", "_blank");
|
||||
}
|
||||
|
||||
setIsUpdating(true);
|
||||
const res = await updateJson(query.json as string, { private: !isPrivate });
|
||||
if (!res.errors?.items.length) {
|
||||
setIsPrivate(res.data.private);
|
||||
toast.success(`Document set to ${isPrivate ? "public" : "private"}.`);
|
||||
} else throw res.errors;
|
||||
} catch (error) {
|
||||
toast.error("An error occured while updating document!");
|
||||
} finally {
|
||||
setIsUpdating(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledBottomBar>
|
||||
<StyledLeft>
|
||||
<StyledBottomBarItem onClick={handleLoginClick}>
|
||||
<VscAccount />
|
||||
{user ? user.name : "Login"}
|
||||
</StyledBottomBarItem>
|
||||
<StyledBottomBarItem onClick={handleSaveJson} disabled={isUpdating}>
|
||||
{hasChanges ? <AiOutlineCloudUpload /> : <AiOutlineCloudSync />}
|
||||
{hasChanges ? "Unsaved Changes" : "Saved"}
|
||||
</StyledBottomBarItem>
|
||||
{data && (
|
||||
<>
|
||||
{typeof data.private !== "undefined" && (
|
||||
<StyledBottomBarItem onClick={setPrivate} disabled={isUpdating}>
|
||||
{isPrivate ? <AiOutlineLock /> : <AiOutlineUnlock />}
|
||||
{isPrivate ? "Private" : "Public"}
|
||||
</StyledBottomBarItem>
|
||||
)}
|
||||
<StyledBottomBarItem onClick={() => setVisible("share")(true)}>
|
||||
<AiOutlineLink />
|
||||
Share
|
||||
</StyledBottomBarItem>
|
||||
</>
|
||||
)}
|
||||
</StyledLeft>
|
||||
<StyledRight>
|
||||
<a
|
||||
href="https://www.altogic.com/?utm_source=jsoncrack&utm_medium=referral&utm_campaign=sponsorship"
|
||||
rel="sponsored noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<StyledBottomBarItem>
|
||||
Powered by
|
||||
<StyledImg
|
||||
height="20"
|
||||
src="https://www.altogic.com/img/logo_dark.svg"
|
||||
alt="powered by altogic"
|
||||
light={lightmode}
|
||||
/>
|
||||
</StyledBottomBarItem>
|
||||
</a>
|
||||
</StyledRight>
|
||||
</StyledBottomBar>
|
||||
);
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
import React from "react";
|
||||
import { ErrorContainer } from "src/components/ErrorContainer";
|
||||
import { MonacoEditor } from "src/components/MonacoEditor";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledEditorWrapper = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
user-select: none;
|
||||
`;
|
||||
export const JsonEditor: React.FC = () => {
|
||||
return (
|
||||
<StyledEditorWrapper>
|
||||
<ErrorContainer />
|
||||
<MonacoEditor />
|
||||
</StyledEditorWrapper>
|
||||
);
|
||||
};
|
||||
@@ -1,43 +0,0 @@
|
||||
import React from "react";
|
||||
import { Graph } from "src/components/Graph";
|
||||
import { NodeModal } from "src/containers/Modals/NodeModal";
|
||||
import useGraph from "src/store/useGraph";
|
||||
|
||||
export const GraphCanvas = ({ isWidget = false }: { isWidget?: boolean }) => {
|
||||
const [isModalVisible, setModalVisible] = React.useState(false);
|
||||
const [selectedNode, setSelectedNode] = React.useState<[string, string][]>([]);
|
||||
|
||||
const collapsedNodes = useGraph(state => state.collapsedNodes);
|
||||
const collapsedEdges = useGraph(state => state.collapsedEdges);
|
||||
|
||||
const openModal = React.useCallback(() => setModalVisible(true), []);
|
||||
|
||||
React.useEffect(() => {
|
||||
const nodeList = collapsedNodes.map(id => `[id$="node-${id}"]`);
|
||||
const edgeList = collapsedEdges.map(id => `[class$="edge-${id}"]`);
|
||||
|
||||
const hiddenItems = document.querySelectorAll(".hide");
|
||||
hiddenItems.forEach(item => item.classList.remove("hide"));
|
||||
|
||||
if (nodeList.length) {
|
||||
const selectedNodes = document.querySelectorAll(nodeList.join(","));
|
||||
selectedNodes.forEach(node => node.classList.add("hide"));
|
||||
}
|
||||
|
||||
if (edgeList.length) {
|
||||
const selectedEdges = document.querySelectorAll(edgeList.join(","));
|
||||
selectedEdges.forEach(edge => edge.classList.add("hide"));
|
||||
}
|
||||
}, [collapsedNodes, collapsedEdges]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Graph openModal={openModal} setSelectedNode={setSelectedNode} isWidget={isWidget} />
|
||||
<NodeModal
|
||||
selectedNode={selectedNode}
|
||||
visible={isModalVisible}
|
||||
closeModal={() => setModalVisible(false)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
import React from "react";
|
||||
import { GraphCanvas } from "src/containers/Editor/LiveEditor/GraphCanvas";
|
||||
import { Tools } from "src/containers/Editor/Tools";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledLiveEditor = styled.div`
|
||||
position: relative;
|
||||
height: 100%;
|
||||
`;
|
||||
|
||||
const LiveEditor: React.FC = () => {
|
||||
return (
|
||||
<StyledLiveEditor>
|
||||
<Tools />
|
||||
<GraphCanvas />
|
||||
</StyledLiveEditor>
|
||||
);
|
||||
};
|
||||
|
||||
export default LiveEditor;
|
||||
@@ -1,45 +0,0 @@
|
||||
import React from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import { Allotment } from "allotment";
|
||||
import "allotment/dist/style.css";
|
||||
import { JsonEditor } from "src/containers/Editor/JsonEditor";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import styled from "styled-components";
|
||||
|
||||
export const StyledEditor = styled(Allotment)`
|
||||
position: relative !important;
|
||||
display: flex;
|
||||
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
|
||||
`;
|
||||
|
||||
const LiveEditor = dynamic(() => import("src/containers/Editor/LiveEditor"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
const Panes: React.FC = () => {
|
||||
const fullscreen = useGraph(state => state.fullscreen);
|
||||
const toggleFullscreen = useGraph(state => state.toggleFullscreen);
|
||||
const isMobile = React.useMemo(() => window.innerWidth <= 768, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isMobile) toggleFullscreen(true);
|
||||
}, [isMobile, toggleFullscreen]);
|
||||
|
||||
return (
|
||||
<StyledEditor proportionalLayout={false} vertical={isMobile}>
|
||||
<Allotment.Pane
|
||||
preferredSize={isMobile ? "100%" : 400}
|
||||
minSize={fullscreen ? 0 : 300}
|
||||
maxSize={isMobile ? Infinity : 800}
|
||||
visible={!fullscreen}
|
||||
>
|
||||
<JsonEditor />
|
||||
</Allotment.Pane>
|
||||
<Allotment.Pane minSize={0} maxSize={isMobile && !fullscreen ? 0 : Infinity}>
|
||||
<LiveEditor />
|
||||
</Allotment.Pane>
|
||||
</StyledEditor>
|
||||
);
|
||||
};
|
||||
|
||||
export default Panes;
|
||||
@@ -1,81 +0,0 @@
|
||||
import React from "react";
|
||||
import { AiOutlineFullscreen, AiOutlineMinus, AiOutlinePlus } from "react-icons/ai";
|
||||
import { FiDownload } from "react-icons/fi";
|
||||
import { MdCenterFocusWeak } from "react-icons/md";
|
||||
import { SearchInput } from "src/components/SearchInput";
|
||||
import useGraph from "src/store/useGraph";
|
||||
import useModal from "src/store/useModal";
|
||||
import styled from "styled-components";
|
||||
|
||||
export const StyledTools = styled.div`
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-direction: row-reverse;
|
||||
height: 28px;
|
||||
padding: 4px 16px;
|
||||
background: ${({ theme }) => theme.BACKGROUND_PRIMARY};
|
||||
color: ${({ theme }) => theme.SILVER};
|
||||
box-shadow: 0 1px 0px ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
z-index: 1;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledToolElement = styled.button`
|
||||
display: grid;
|
||||
place-content: center;
|
||||
font-size: 20px;
|
||||
background: none;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
padding: 6px;
|
||||
border-radius: 3px;
|
||||
|
||||
&:hover {
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
|
||||
opacity: 1;
|
||||
box-shadow: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Tools: React.FC = () => {
|
||||
const setVisible = useModal(state => state.setVisible);
|
||||
|
||||
const fullscreen = useGraph(state => state.fullscreen);
|
||||
const toggleFullscreen = useGraph(state => state.toggleFullscreen);
|
||||
|
||||
const zoomIn = useGraph(state => state.zoomIn);
|
||||
const zoomOut = useGraph(state => state.zoomOut);
|
||||
const centerView = useGraph(state => state.centerView);
|
||||
const toggleEditor = () => toggleFullscreen(!fullscreen);
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledTools>
|
||||
<StyledToolElement aria-label="fullscreen" onClick={toggleEditor}>
|
||||
<AiOutlineFullscreen />
|
||||
</StyledToolElement>
|
||||
<SearchInput />
|
||||
<StyledToolElement aria-label="save" onClick={() => setVisible("download")(true)}>
|
||||
<FiDownload />
|
||||
</StyledToolElement>
|
||||
<StyledToolElement aria-label="center canvas" onClick={centerView}>
|
||||
<MdCenterFocusWeak />
|
||||
</StyledToolElement>
|
||||
<StyledToolElement aria-label="zoom out" onClick={zoomOut}>
|
||||
<AiOutlineMinus />
|
||||
</StyledToolElement>
|
||||
<StyledToolElement aria-label="zoom in" onClick={zoomIn}>
|
||||
<AiOutlinePlus />
|
||||
</StyledToolElement>
|
||||
</StyledTools>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,295 +0,0 @@
|
||||
import React from "react";
|
||||
import Head from "next/head";
|
||||
import Link from "next/link";
|
||||
import Script from "next/script";
|
||||
import { AiOutlineRight } from "react-icons/ai";
|
||||
import {
|
||||
HiCursorClick,
|
||||
HiLightningBolt,
|
||||
HiOutlineDownload,
|
||||
HiOutlineSearchCircle,
|
||||
} from "react-icons/hi";
|
||||
import { IoRocketSharp } from "react-icons/io5";
|
||||
import { SiVisualstudiocode } from "react-icons/si";
|
||||
import { CarbonAds } from "src/components/CarbonAds";
|
||||
import { Footer } from "src/components/Footer";
|
||||
import { Producthunt } from "src/components/Producthunt";
|
||||
import { Sponsors } from "src/components/Sponsors";
|
||||
import { SupportButton } from "src/components/SupportButton";
|
||||
import { baseURL } from "src/constants/data";
|
||||
import { PricingCards } from "../PricingCards";
|
||||
import * as Styles from "./styles";
|
||||
|
||||
const Navbar = () => (
|
||||
<Styles.StyledNavbar>
|
||||
<Styles.StyledNavLink href="/editor">Editor</Styles.StyledNavLink>
|
||||
<Link href="#features" passHref>
|
||||
<Styles.StyledNavLink>Features</Styles.StyledNavLink>
|
||||
</Link>
|
||||
<Link href="#sponsor" passHref>
|
||||
<Styles.StyledNavLink>Sponsor</Styles.StyledNavLink>
|
||||
</Link>
|
||||
<Styles.StyledNavLink
|
||||
href="https://github.com/AykutSarac/jsoncrack.com"
|
||||
target="_blank"
|
||||
rel="external"
|
||||
>
|
||||
GitHub
|
||||
</Styles.StyledNavLink>
|
||||
<Link href="docs" passHref>
|
||||
<Styles.StyledNavLink>Documentation</Styles.StyledNavLink>
|
||||
</Link>
|
||||
</Styles.StyledNavbar>
|
||||
);
|
||||
|
||||
const HeroSection = () => {
|
||||
const [isModalVisible, setModalVisible] = React.useState(false);
|
||||
|
||||
return (
|
||||
<Styles.StyledHeroSection id="main">
|
||||
<Styles.StyledTitle>
|
||||
<Styles.StyledGradientText>JSON</Styles.StyledGradientText> CRACK
|
||||
</Styles.StyledTitle>
|
||||
<Styles.StyledSubTitle>
|
||||
Seamlessly visualize your JSON data{" "}
|
||||
<Styles.StyledHighlightedText>instantly</Styles.StyledHighlightedText> into graphs.
|
||||
</Styles.StyledSubTitle>
|
||||
|
||||
<Styles.StyledButton href="/editor" link>
|
||||
GO TO EDITOR
|
||||
<AiOutlineRight strokeWidth="80" />
|
||||
</Styles.StyledButton>
|
||||
|
||||
<Styles.StyledButtonWrapper>
|
||||
<Styles.StyledSponsorButton href="/pricing" link>
|
||||
GET PREMIUM
|
||||
<IoRocketSharp />
|
||||
</Styles.StyledSponsorButton>
|
||||
<Styles.StyledSponsorButton
|
||||
href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode"
|
||||
link
|
||||
isBlue
|
||||
>
|
||||
GET IT ON VS CODE
|
||||
<SiVisualstudiocode />
|
||||
</Styles.StyledSponsorButton>
|
||||
</Styles.StyledButtonWrapper>
|
||||
</Styles.StyledHeroSection>
|
||||
);
|
||||
};
|
||||
|
||||
const PreviewSection = () => (
|
||||
<Styles.StyledPreviewSection>
|
||||
<Styles.StyledImageWrapper>
|
||||
<Styles.StyledImage
|
||||
width="1200"
|
||||
height="863"
|
||||
src="/assets/jsoncrack-screenshot.webp"
|
||||
alt="preview"
|
||||
/>
|
||||
</Styles.StyledImageWrapper>
|
||||
</Styles.StyledPreviewSection>
|
||||
);
|
||||
|
||||
const FeaturesSection = () => (
|
||||
<Styles.StyledFeaturesSection id="features">
|
||||
<Styles.StyledSectionCard>
|
||||
<Styles.StyledCardIcon>
|
||||
<HiCursorClick size={50} color="#3BA55D" />
|
||||
</Styles.StyledCardIcon>
|
||||
<Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
|
||||
<Styles.StyledCardDescription>
|
||||
We believe that powerful software doesn't have to be difficult to use. That's why
|
||||
we've designed our app to be as intuitive and easy-to-use as possible. You can quickly
|
||||
and easily load your JSON data and start exploring and analyzing it right away!
|
||||
</Styles.StyledCardDescription>
|
||||
</Styles.StyledSectionCard>
|
||||
|
||||
<Styles.StyledSectionCard>
|
||||
<Styles.StyledCardIcon>
|
||||
<HiOutlineSearchCircle size={50} color="#5865F2" />
|
||||
</Styles.StyledCardIcon>
|
||||
<Styles.StyledCardTitle>SEARCH</Styles.StyledCardTitle>
|
||||
<Styles.StyledCardDescription>
|
||||
Have a huge file of values, keys or arrays? Worry no more, type in the keyword you are
|
||||
looking for into search input and it will take you to each node with matching result
|
||||
highlighting the line to understand better!
|
||||
</Styles.StyledCardDescription>
|
||||
</Styles.StyledSectionCard>
|
||||
|
||||
<Styles.StyledSectionCard>
|
||||
<Styles.StyledCardIcon>
|
||||
<HiOutlineDownload size={50} color="#DA2877" />
|
||||
</Styles.StyledCardIcon>
|
||||
<Styles.StyledCardTitle>DOWNLOAD</Styles.StyledCardTitle>
|
||||
<Styles.StyledCardDescription>
|
||||
Download the graph to your local machine and use it wherever you want, to your blogs,
|
||||
website or make it a poster and paste to the wall. Who wouldn't want to see a JSON
|
||||
Crack graph onto their wall, eh?
|
||||
</Styles.StyledCardDescription>
|
||||
</Styles.StyledSectionCard>
|
||||
|
||||
<Styles.StyledSectionCard>
|
||||
<Styles.StyledCardIcon>
|
||||
<HiLightningBolt size={50} color="#F5E027" />
|
||||
</Styles.StyledCardIcon>
|
||||
<Styles.StyledCardTitle>LIVE</Styles.StyledCardTitle>
|
||||
<Styles.StyledCardDescription>
|
||||
With Microsoft's Monaco Editor which is also used by VS Code, easily edit your JSON and
|
||||
directly view through the graphs. Also there's a JSON validator above of it to make
|
||||
sure there is no type error.
|
||||
</Styles.StyledCardDescription>
|
||||
</Styles.StyledSectionCard>
|
||||
</Styles.StyledFeaturesSection>
|
||||
);
|
||||
|
||||
const GitHubSection = () => (
|
||||
<Styles.StyledSection id="github" reverse>
|
||||
<Styles.StyledTwitterQuote>
|
||||
<blockquote className="twitter-tweet" data-lang="en" data-dnt="true" data-theme="light">
|
||||
<p lang="en" dir="ltr">
|
||||
Looking to understand or explore some JSON? Just paste or upload to visualize it as a
|
||||
graph with <a href="https://t.co/HlKSrhKryJ">https://t.co/HlKSrhKryJ</a> 😍 <br />
|
||||
<br />
|
||||
Thanks to <a href="https://twitter.com/aykutsarach?ref_src=twsrc%5Etfw">
|
||||
@aykutsarach
|
||||
</a>! <a href="https://t.co/0LyPUL8Ezz">pic.twitter.com/0LyPUL8Ezz</a>
|
||||
</p>
|
||||
— GitHub (@github){" "}
|
||||
<a href="https://twitter.com/github/status/1519363257794015233?ref_src=twsrc%5Etfw">
|
||||
April 27, 2022
|
||||
</a>
|
||||
</blockquote>{" "}
|
||||
<Script async src="https://platform.twitter.com/widgets.js" charSet="utf-8"></Script>
|
||||
</Styles.StyledTwitterQuote>
|
||||
<Styles.StyledSectionArea>
|
||||
<Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
|
||||
<Styles.StyledMinorTitle>
|
||||
At JSON Crack, we believe in the power of open source software and the communities that
|
||||
support it. That's why we're proud to be part of the open source community and to
|
||||
contribute to the development and growth of open source tools and technologies.
|
||||
<br />
|
||||
<br /> As part of our commitment to the open source community, we've made our app
|
||||
freely available to anyone who wants to use it, and we welcome contributions from anyone
|
||||
who's interested in helping to improve it. Whether you're a developer, a data
|
||||
scientist, or just someone who's passionate about open source, we'd love to have
|
||||
you join our community and help us make JSON Crack the best it can be.
|
||||
<br />
|
||||
<br /> So why not join us and become part of the JSON Crack open source community today? We
|
||||
can't wait to see what we can accomplish together!
|
||||
</Styles.StyledMinorTitle>
|
||||
<Styles.StyledButton
|
||||
href="https://github.com/AykutSarac/jsoncrack.com"
|
||||
status="SECONDARY"
|
||||
link
|
||||
>
|
||||
STAR ON GITHUB
|
||||
</Styles.StyledButton>
|
||||
</Styles.StyledSectionArea>
|
||||
</Styles.StyledSection>
|
||||
);
|
||||
|
||||
const EmbedSection = () => (
|
||||
<Styles.StyledSection id="embed">
|
||||
<Styles.StyledSectionArea>
|
||||
<Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
|
||||
<Styles.StyledMinorTitle>
|
||||
JSON Crack provides users with the necessary code to embed the app into a website easily
|
||||
using an iframe. This code can be easily copied and pasted into the desired location on the
|
||||
website, allowing users to quickly and easily integrate JSON Crack into existing workflows.
|
||||
<br />
|
||||
<br /> Once the app is embedded, users can use it to view and analyze JSON data directly on
|
||||
the website. This can be useful for a variety of purposes, such as quickly checking the
|
||||
structure of a JSON file or verifying the data contained within it. JSON Crack's
|
||||
intuitive interface makes it easy to navigate and understand even complex JSON data, making
|
||||
it a valuable tool for anyone working with JSON.
|
||||
</Styles.StyledMinorTitle>
|
||||
<Styles.StyledButton href="/docs" status="SECONDARY" link>
|
||||
LEARN TO EMBED
|
||||
</Styles.StyledButton>
|
||||
</Styles.StyledSectionArea>
|
||||
<div>
|
||||
<Styles.StyledIframge
|
||||
src={`${baseURL}/widget`}
|
||||
onLoad={e => {
|
||||
const frame = e.currentTarget.contentWindow;
|
||||
setTimeout(() => {
|
||||
frame?.postMessage(
|
||||
{
|
||||
json: JSON.stringify({
|
||||
"random images": [
|
||||
"https://random.imagecdn.app/50/50?.png",
|
||||
"https://random.imagecdn.app/80/80?.png",
|
||||
"https://random.imagecdn.app/100/100?.png",
|
||||
],
|
||||
}),
|
||||
options: {
|
||||
theme: "dark",
|
||||
},
|
||||
},
|
||||
"*"
|
||||
);
|
||||
}, 500);
|
||||
}}
|
||||
></Styles.StyledIframge>
|
||||
</div>
|
||||
</Styles.StyledSection>
|
||||
);
|
||||
|
||||
const SupportSection = () => (
|
||||
<Styles.StyledPaidSection>
|
||||
<Styles.StyledProducthunt>
|
||||
<Styles.StyledSubTitle>
|
||||
Support JSON Crack at
|
||||
<br />
|
||||
<Styles.StyledHighlightedText>Product Hunt</Styles.StyledHighlightedText>
|
||||
</Styles.StyledSubTitle>
|
||||
<Producthunt />
|
||||
</Styles.StyledProducthunt>
|
||||
<Styles.StyledAffiliate>
|
||||
<Styles.StyledSubTitle>Affiliate</Styles.StyledSubTitle>
|
||||
<CarbonAds />
|
||||
</Styles.StyledAffiliate>
|
||||
</Styles.StyledPaidSection>
|
||||
);
|
||||
|
||||
const SponsorSection = () => (
|
||||
<Styles.StyledSponsorSection id="sponsor">
|
||||
<Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
|
||||
<Styles.StyledMinorTitle>
|
||||
Your supports make JSON Crack possible to continue and accessible for everyone!
|
||||
</Styles.StyledMinorTitle>
|
||||
<Styles.StyledButton
|
||||
href="https://github.com/sponsors/AykutSarac"
|
||||
rel="external"
|
||||
status="SUCCESS"
|
||||
link
|
||||
>
|
||||
Become A Sponsor!
|
||||
</Styles.StyledButton>
|
||||
<Sponsors />
|
||||
</Styles.StyledSponsorSection>
|
||||
);
|
||||
|
||||
const Home: React.FC = () => {
|
||||
return (
|
||||
<Styles.StyledHome>
|
||||
<Head>
|
||||
<title>JSON Crack - Crack your data into pieces</title>
|
||||
</Head>
|
||||
<Navbar />
|
||||
<HeroSection />
|
||||
<PreviewSection />
|
||||
<FeaturesSection />
|
||||
<GitHubSection />
|
||||
<EmbedSection />
|
||||
<PricingCards />
|
||||
<SupportSection />
|
||||
<SponsorSection />
|
||||
<SupportButton />
|
||||
<Footer />
|
||||
</Styles.StyledHome>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
@@ -1,394 +0,0 @@
|
||||
import { Button } from "src/components/Button";
|
||||
import styled from "styled-components";
|
||||
|
||||
export const StyledButtonWrapper = styled.div`
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledTwitterQuote = styled.div`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
blockquote.twitter-tweet {
|
||||
display: inline-block;
|
||||
font-family: "Helvetica Neue", Roboto, "Segoe UI", Calibri, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
border-color: #eee #ddd #bbb;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||
margin: 10px 5px;
|
||||
padding: 0 16px 16px 16px;
|
||||
max-width: 468px;
|
||||
}
|
||||
|
||||
blockquote.twitter-tweet p {
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
blockquote.twitter-tweet a {
|
||||
color: inherit;
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
blockquote.twitter-tweet a:hover,
|
||||
blockquote.twitter-tweet a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledImageWrapper = styled.div`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
export const StyledHome = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8em;
|
||||
font-family: "Roboto", sans-serif;
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
gap: 3em;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledGradientText = styled.span`
|
||||
background: #ffb76b;
|
||||
background: linear-gradient(to right, #ffb76b 0%, #ffa73d 30%, #ff7c00 60%, #ff7f04 100%);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
`;
|
||||
|
||||
export const StyledNavbar = styled.nav`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 16px 16px;
|
||||
gap: 20px;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
a:first-of-type {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledHeroSection = styled.section`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 1.5em;
|
||||
min-height: 40vh;
|
||||
padding: 0 3%;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledNavLink = styled.a`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
|
||||
&:hover {
|
||||
font-weight: 500;
|
||||
color: ${({ theme }) => theme.ORANGE};
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledTitle = styled.h1`
|
||||
font-weight: 900;
|
||||
margin: 0;
|
||||
font-size: min(10vw, 64px);
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSubTitle = styled.h2`
|
||||
color: #dedede;
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
max-width: 40rem;
|
||||
margin: 0;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledMinorTitle = styled.p`
|
||||
color: #b4b4b4;
|
||||
text-align: center;
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
letter-spacing: 1.2px;
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
font-size: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledButton = styled(Button)`
|
||||
background: ${({ status }) => !status && "#a13cc2"};
|
||||
padding: 12px 24px;
|
||||
height: 46px;
|
||||
|
||||
div {
|
||||
font-family: "Mona Sans";
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSponsorButton = styled(Button)<{ isBlue?: boolean }>`
|
||||
background: transparent;
|
||||
border: 1px solid ${({ isBlue }) => (isBlue ? "#1F9CF0" : "#ee3d48")};
|
||||
transition: all 200ms;
|
||||
padding: 12px 24px;
|
||||
|
||||
div {
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
svg {
|
||||
color: ${({ isBlue }) => (isBlue ? "#1F9CF0" : "#ee3d48")};
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: ${({ isBlue }) => (isBlue ? "#1F9CF0" : "#ee3d48")};
|
||||
|
||||
svg {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledFeaturesSection = styled.section`
|
||||
display: grid;
|
||||
margin: 0 auto;
|
||||
max-width: 60%;
|
||||
justify-content: center;
|
||||
grid-template-columns: repeat(2, 40%);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
grid-column-gap: 60px;
|
||||
grid-row-gap: 60px;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
max-width: 80%;
|
||||
display: flex;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSectionCard = styled.div`
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
border: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
|
||||
background: rgb(48, 0, 65);
|
||||
background: linear-gradient(
|
||||
138deg,
|
||||
rgba(48, 0, 65, 0.8870141806722689) 0%,
|
||||
rgba(72, 12, 84, 0.40802258403361347) 33%,
|
||||
rgba(65, 8, 92, 0.6012998949579832) 100%
|
||||
);
|
||||
border-radius: 6px;
|
||||
padding: 16px;
|
||||
`;
|
||||
|
||||
export const StyledCardTitle = styled.div`
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
padding: 1.5rem 0 0.5rem;
|
||||
letter-spacing: 1px;
|
||||
`;
|
||||
|
||||
export const StyledCardIcon = styled.div``;
|
||||
|
||||
export const StyledCardDescription = styled.p`
|
||||
color: #e0e0e0;
|
||||
text-align: left;
|
||||
line-height: 1.5rem;
|
||||
font-size: 0.875rem;
|
||||
`;
|
||||
|
||||
export const StyledIframge = styled.iframe`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 200px;
|
||||
border: 2px solid ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
border-radius: 6px;
|
||||
|
||||
@media only screen and (min-width: 768px) {
|
||||
min-height: 384px;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSection = styled.section<{ reverse?: boolean }>`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
max-width: 85%;
|
||||
margin: 0 auto;
|
||||
gap: 4rem;
|
||||
line-height: 1.5;
|
||||
padding: 50px 3%;
|
||||
|
||||
& > div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1200px) {
|
||||
flex-direction: ${({ reverse }) => (reverse ? "column-reverse" : "column")};
|
||||
max-width: 80%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSectionArea = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
width: 40%;
|
||||
margin-top: 3rem;
|
||||
|
||||
h2,
|
||||
p {
|
||||
text-align: left;
|
||||
letter-spacing: unset;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledSponsorSection = styled.section`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 85%;
|
||||
margin: 0 auto;
|
||||
gap: 2rem;
|
||||
line-height: 1.5;
|
||||
padding: 50px 3%;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
max-width: 90%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledEmbedSection = styled.section`
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: 85%;
|
||||
margin: 0 auto;
|
||||
gap: 2rem;
|
||||
line-height: 1.5;
|
||||
padding: 50px 3%;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
max-width: 80%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledPreviewSection = styled.section`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
max-width: 85%;
|
||||
margin: 0 auto;
|
||||
padding: 0 3%;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledImage = styled.img`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0px 0px 12px rgba(255, 255, 255, 0.6));
|
||||
`;
|
||||
|
||||
export const StyledHighlightedText = styled.span`
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dashed;
|
||||
text-decoration-color: #eab308;
|
||||
`;
|
||||
|
||||
export const StyledProducthunt = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 3rem;
|
||||
border-right: 1px solid white;
|
||||
padding-right: 3rem;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
border-right: none;
|
||||
border-bottom: 1px solid white;
|
||||
padding-bottom: 3rem;
|
||||
padding-right: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledPaidSection = styled.section`
|
||||
display: flex;
|
||||
max-width: 85%;
|
||||
margin: 0 auto;
|
||||
gap: 2rem;
|
||||
padding: 50px 3%;
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
max-width: 80%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledAffiliate = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 3rem;
|
||||
`;
|
||||
@@ -1,51 +0,0 @@
|
||||
import React from "react";
|
||||
import { AccountModal } from "src/containers/Modals/AccountModal";
|
||||
import { ClearModal } from "src/containers/Modals/ClearModal";
|
||||
import { CloudModal } from "src/containers/Modals/CloudModal";
|
||||
import { DownloadModal } from "src/containers/Modals/DownloadModal";
|
||||
import { ImportModal } from "src/containers/Modals/ImportModal";
|
||||
import { LoginModal } from "src/containers/Modals/LoginModal";
|
||||
import { SettingsModal } from "src/containers/Modals/SettingsModal";
|
||||
import { ShareModal } from "src/containers/Modals/ShareModal";
|
||||
import useModal from "src/store/useModal";
|
||||
import shallow from "zustand/shallow";
|
||||
|
||||
export const ModalController = () => {
|
||||
const setVisible = useModal(state => state.setVisible);
|
||||
|
||||
const [
|
||||
importModal,
|
||||
clearModal,
|
||||
downloadModal,
|
||||
settingsModal,
|
||||
cloudModal,
|
||||
accountModal,
|
||||
loginModal,
|
||||
shareModal,
|
||||
] = useModal(
|
||||
state => [
|
||||
state.import,
|
||||
state.clear,
|
||||
state.download,
|
||||
state.settings,
|
||||
state.cloud,
|
||||
state.account,
|
||||
state.login,
|
||||
state.share,
|
||||
],
|
||||
shallow
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ImportModal visible={importModal} setVisible={setVisible("import")} />
|
||||
<ClearModal visible={clearModal} setVisible={setVisible("clear")} />
|
||||
<DownloadModal visible={downloadModal} setVisible={setVisible("download")} />
|
||||
<SettingsModal visible={settingsModal} setVisible={setVisible("settings")} />
|
||||
<CloudModal visible={cloudModal} setVisible={setVisible("cloud")} />
|
||||
<AccountModal visible={accountModal} setVisible={setVisible("account")} />
|
||||
<LoginModal visible={loginModal} setVisible={setVisible("login")} />
|
||||
<ShareModal visible={shareModal} setVisible={setVisible("share")} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,143 +0,0 @@
|
||||
import React from "react";
|
||||
import { IoRocketSharp } from "react-icons/io5";
|
||||
import { MdVerified } from "react-icons/md";
|
||||
import { Button } from "src/components/Button";
|
||||
import { Modal, ModalProps } from "src/components/Modal";
|
||||
import useUser from "src/store/useUser";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledTitle = styled.p`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: ${({ theme }) => theme.TEXT_POSITIVE};
|
||||
flex: 1;
|
||||
font-weight: 700;
|
||||
margin-top: 0;
|
||||
|
||||
&::after {
|
||||
background: ${({ theme }) => theme.TEXT_POSITIVE};
|
||||
height: 1px;
|
||||
|
||||
content: "";
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
margin-left: 4px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAccountWrapper = styled.div`
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
|
||||
button {
|
||||
flex-basis: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledAvatar = styled.img`
|
||||
border-radius: 100%;
|
||||
`;
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 12px 0;
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
font-weight: 600;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
|
||||
|
||||
& > div {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: ${({ theme }) => theme.INTERACTIVE_ACTIVE};
|
||||
}
|
||||
`;
|
||||
|
||||
const AccountView: React.FC<Pick<ModalProps, "setVisible">> = ({ setVisible }) => {
|
||||
const user = useUser(state => state.user);
|
||||
const isPremium = useUser(state => state.isPremium());
|
||||
const logout = useUser(state => state.logout);
|
||||
|
||||
const onImgFail = (e: React.SyntheticEvent<HTMLImageElement>) => {
|
||||
e.currentTarget.setAttribute("src", `https://ui-avatars.com/api/?name=${user?.name}`);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal.Header>Account</Modal.Header>
|
||||
<Modal.Content>
|
||||
<StyledTitle>Hello, {user?.name}!</StyledTitle>
|
||||
<StyledAccountWrapper>
|
||||
<StyledAvatar
|
||||
width="60"
|
||||
height="60"
|
||||
src={user?.profilePicture}
|
||||
alt={user?.name}
|
||||
onError={onImgFail}
|
||||
/>
|
||||
<StyledContainer>
|
||||
USERNAME
|
||||
<div>{user?.name}</div>
|
||||
</StyledContainer>
|
||||
<StyledContainer>
|
||||
ACCOUNT STATUS
|
||||
<div>
|
||||
{isPremium ? "PREMIUM " : "Free"}
|
||||
{isPremium && <MdVerified />}
|
||||
</div>
|
||||
</StyledContainer>
|
||||
<StyledContainer>
|
||||
EMAIL
|
||||
<div>{user?.email}</div>
|
||||
</StyledContainer>
|
||||
<StyledContainer>
|
||||
REGISTRATION
|
||||
<div>{user?.signUpAt && new Date(user.signUpAt).toDateString()}</div>
|
||||
</StyledContainer>
|
||||
{isPremium ? (
|
||||
<Button
|
||||
status="DANGER"
|
||||
block
|
||||
onClick={() => window.open("https://patreon.com/jsoncrack", "_blank")}
|
||||
>
|
||||
<IoRocketSharp />
|
||||
Cancel Subscription
|
||||
</Button>
|
||||
) : (
|
||||
<Button href="/pricing" status="TERTIARY" block link>
|
||||
<IoRocketSharp />
|
||||
UPGRADE TO PREMIUM!
|
||||
</Button>
|
||||
)}
|
||||
</StyledAccountWrapper>
|
||||
</Modal.Content>
|
||||
<Modal.Controls setVisible={setVisible}>
|
||||
<Button
|
||||
status="DANGER"
|
||||
onClick={() => {
|
||||
logout();
|
||||
setVisible(false);
|
||||
}}
|
||||
>
|
||||
Log Out
|
||||
</Button>
|
||||
</Modal.Controls>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const AccountModal: React.FC<ModalProps> = ({ setVisible, visible }) => {
|
||||
return (
|
||||
<Modal visible={visible} setVisible={setVisible}>
|
||||
<AccountView setVisible={setVisible} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||