Compare commits

...
670 Commits
Author SHA1 Message Date
AykutSarac 844d6bdeb4 chore: version upgrade v3.2.0 2023-12-17 22:08:20 +03:00
AykutSarac 0198e975a8 chore: version upgrade 2023-12-17 22:07:50 +03:00
AykutSarac 1a402891a4 feat: change type gen language 2023-12-17 16:24:17 +03:00
Aykut Saraç 83664890d9 Merge pull request #369 from AykutSarac/feat/go-struct-generator
feat: add go struct generator
2023-12-17 16:15:19 +03:00
AykutSarac da55330901 feat: add go struct generator 2023-12-17 16:10:48 +03:00
AykutSarac cf733f7912 chore: remove github link from social 2023-12-17 15:34:38 +03:00
Aykut Saraç 4cdf85dda4 Merge pull request #363 from BandhiyaHardik/changed-"Twitter"-to-"𝕏-(Twitter)"
fix: changed  "Twitter" to "𝕏 (Twitter)"
2023-12-17 15:32:50 +03:00
Aykut Saraç 26d06ffebd Merge pull request #367 from AykutSarac/feat/jsongraph-react
feat: UI updates
2023-12-17 15:31:38 +03:00
AykutSarac bdf0aa7ccf chore: upgrade yarn.lock 2023-12-17 15:27:52 +03:00
AykutSarac 8f28c8c704 ci: use yarn 2023-12-17 15:24:13 +03:00
AykutSarac 1d59b2fb21 feat: ui fixes 2023-12-17 15:21:36 +03:00
AykutSarac d4ce0b1017 feat: small ui fixes 2023-12-17 15:14:04 +03:00
AykutSarac 6ab9338709 feat: update ui 2023-12-17 14:52:50 +03:00
AykutSarac 1754cc5c95 fix: feedback modal 2023-12-11 17:53:43 +03:00
AykutSarac 4895d235f7 Merge branch 'main' into feat/jsongraph-react 2023-12-11 17:42:58 +03:00
AykutSarac 9c1f079f7e feat: create cancelation & refund policy pages 2023-12-11 17:40:29 +03:00
AykutSarac 07575cdf25 feat: update premium view bg color 2023-12-11 17:11:23 +03:00
AykutSarac d58b1a13fe feat: revert premium limit change 2023-11-26 14:52:49 +03:00
AykutSarac 455f1a8074 feat: use jsongraph-react pkg 2023-11-26 14:51:21 +03:00
AykutSarac 8dadc44c65 update pricing 2023-11-23 10:24:06 +03:00
HardikBandhiya bf9628ed74 Update index.tsx
changed  "Twitter" to "𝕏 (Twitter)"
2023-10-28 01:48:00 +05:30
AykutSarac f4d5348a60 Revert "fix reset password"
This reverts commit 4949526d3f.
2023-10-23 19:36:44 +03:00
AykutSarac 4949526d3f fix reset password 2023-10-23 19:34:40 +03:00
AykutSarac 79c28b0ee9 fix reset password 2023-10-23 19:26:06 +03:00
Aykut Saraç b8c559eb19 Update index.tsx 2023-10-09 11:10:52 +03:00
Aykut Saraç 72f7c3d990 Update index.tsx 2023-10-09 11:02:13 +03:00
AykutSarac a1d17bee3f update landing hero section 2023-10-08 23:28:23 +03:00
AykutSarac 9af53e5571 prevent signin clickjacking 2023-10-07 21:46:10 +03:00
AykutSarac 6b81875c47 add sign-in xframe options 2023-10-07 21:38:48 +03:00
AykutSarac 482de39af9 refactor 2023-10-03 20:39:40 +03:00
AykutSarac 0091a25efb feat: update login/signup page 2023-10-03 20:35:20 +03:00
AykutSarac 8af1bef216 remove package-lock 2023-09-28 11:22:33 +03:00
AykutSarac 4f6ecd0156 feat: add new badge 2023-09-28 10:50:42 +03:00
AykutSarac 24a854f5f3 feat: add jq 2023-09-28 10:24:50 +03:00
AykutSarac 70f48dbebf fix: bottom bar login styling 2023-09-28 09:33:22 +03:00
AykutSarac bf5596a5d2 upgrade package versions 2023-09-26 21:24:47 +03:00
AykutSarac 4a0b28548d feat: add orgAdmin check 2023-09-24 09:39:58 +03:00
AykutSarac 467377717a feat: update bottombar 2023-09-21 11:09:23 +03:00
Aykut Saraç 14219f72d6 Merge pull request #353 from JinnaBalu/main
Dockefile conf updated cache. Created other conf for dockerisation.
2023-09-21 10:00:16 +03:00
JinnaBalu c09588dacd Dockefile conf updated cache. Created other conf for dockerisation. 2023-09-17 01:35:44 +05:30
AykutSarac 14cebeebe5 feat: add feedback textarea description 2023-09-13 13:32:34 +03:00
AykutSarac b8ae69f79b feat: colorize text nodes 2023-09-09 22:26:16 +03:00
AykutSarac 7940d45510 update leave review text 2023-09-06 12:49:22 +03:00
AykutSarac e8bc646396 add trackpad gestures to settings 2023-09-02 13:15:23 +03:00
AykutSarac 17159099c3 revert zoom ui panning 2023-09-02 12:31:14 +03:00
AykutSarac e6ec709541 feat: update home title 2023-09-01 15:33:17 +03:00
AykutSarac 7ce7c36e67 feat: update page titles 2023-09-01 10:34:08 +03:00
AykutSarac b6c9592259 update sitemap 2023-09-01 10:25:26 +03:00
AykutSarac 41ab4cdf4b add terms & privacy links 2023-09-01 10:24:34 +03:00
AykutSarac 3d0220aa2d docs: update assets 2023-08-31 22:05:49 +03:00
AykutSarac 85aeb3f301 fix: reset pwd 2023-08-29 12:23:13 +03:00
AykutSarac a18a8885af fix: sign-in redirect 2023-08-29 11:18:18 +03:00
AykutSarac 24e1200bfc update robots.txt 2023-08-28 10:18:20 +03:00
AykutSarac a149d16206 add fetch priority 2023-08-27 10:32:51 +03:00
AykutSarac 9be17015f0 refactor 2023-08-25 12:08:06 +03:00
AykutSarac d6ebca736e update template 2023-08-25 11:35:03 +03:00
AykutSarac ae0f8efad6 refactor custom node 2023-08-25 11:34:58 +03:00
AykutSarac 15fe1cd9b7 update reaflow 2023-08-23 17:46:07 +03:00
AykutSarac 7a6a4b828c fix: disable sentry on other urls 2023-08-23 00:05:31 +03:00
AykutSarac 014983566c feat: update pkg & font setting 2023-08-22 23:56:50 +03:00
AykutSarac cd8cfe26a6 Revert "feat: upgrade reaflow"
This reverts commit d309007080.
2023-08-22 23:44:18 +03:00
AykutSarac d309007080 feat: upgrade reaflow 2023-08-22 18:15:42 +03:00
AykutSarac dabb3f0947 code refactor 2023-08-21 18:44:55 +03:00
AykutSarac 3d50e48a85 chore: split graph 2023-08-21 13:31:36 +03:00
AykutSarac 2b4c3b78a2 fix: page leave alert 2023-08-21 12:30:37 +03:00
AykutSarac 3efdc8a5ee chore: update feature card 2023-08-19 19:49:34 +03:00
AykutSarac 4f1e13d1a7 feat: load ads script on homepage only 2023-08-19 19:43:33 +03:00
AykutSarac 03c62f994d feat: layout updates 2023-08-19 19:06:31 +03:00
AykutSarac fe5a4a41ef fix: invalid json error 2023-08-19 16:33:25 +03:00
AykutSarac 3d6d9ed2cf fix: json schema 2023-08-19 12:08:21 +03:00
AykutSarac 077ae7358d feat: update modal bg color 2023-08-19 11:34:18 +03:00
AykutSarac f140f81f9b feat: add feedback modal 2023-08-19 11:27:42 +03:00
AykutSarac 20957db13d increase free limit 2023-08-19 10:36:31 +03:00
AykutSarac 01d816dfcc feat: modal updates 2023-08-18 16:32:42 +03:00
AykutSarac a871ee9a73 fix: allow json with comments 2023-08-18 16:32:29 +03:00
Aykut Saraç 282dfe5672 Merge pull request #349 from prathameshjchavan/fix/array-doesnt-update
Fixed array length doesn't update
2023-08-18 16:05:52 +03:00
Prathamesh Chavan 005047445d Fixed array length doesn't update 2023-08-18 11:27:44 +05:30
AykutSarac 1fbb777dec remove style 2023-08-17 21:50:28 +03:00
AykutSarac 3680f67795 performance and styling fixes 2023-08-17 21:32:38 +03:00
AykutSarac 25fb645451 remove powered by 2023-08-17 16:44:29 +03:00
Aykut Saraç 810332a009 Update README.md 2023-08-17 16:38:07 +03:00
Aykut Saraç 309c733207 Update README.md 2023-08-17 16:37:19 +03:00
AykutSarac 665c0a93bc feat: update font loading 2023-08-17 16:15:45 +03:00
AykutSarac abfe297991 fix: firefox object node display 2023-08-17 15:39:47 +03:00
AykutSarac 565a92e98d Revert "feat: fetch font from github"
This reverts commit 5e2eab040a.
2023-08-16 17:06:19 +03:00
AykutSarac 5e2eab040a feat: fetch font from github 2023-08-16 12:00:01 +03:00
AykutSarac 2b8ed62606 fix: error & premium views 2023-08-14 13:50:35 +03:00
AykutSarac 3e8b26888e add alert to sign in 2023-08-14 12:47:40 +03:00
AykutSarac 6fbfc9a9dc feat: replace zoom library 2023-08-12 16:57:22 +03:00
AykutSarac bc69ea78d7 improve rerendering of collapse/expand 2023-08-12 12:39:40 +03:00
AykutSarac 1f2ec0a4a6 perf improvements 2023-08-12 12:05:49 +03:00
AykutSarac a9115e903f update robots.txt 2023-08-09 18:19:01 +03:00
AykutSarac e6eb4ab7e8 fix sentry ci 2023-08-09 18:11:24 +03:00
AykutSarac d152ad9301 update ga 2023-08-09 18:00:08 +03:00
AykutSarac e6b6ea6f3c update pricing 2023-08-09 16:57:39 +03:00
AykutSarac fcd63274d4 update pricing 2023-08-09 16:56:04 +03:00
AykutSarac fefb2b0a15 fix pricing ui 2023-08-09 10:24:06 +03:00
AykutSarac 31c57d5b55 update ci 2023-08-08 22:10:30 +03:00
AykutSarac 0df26325d7 update ci 2023-08-08 21:56:13 +03:00
AykutSarac 69694a459f update ui 2023-08-08 21:32:31 +03:00
AykutSarac 775b96454e fix: asset prefix 2023-08-07 23:39:20 +03:00
AykutSarac 94ab3c5ba9 update assets prefix 2023-08-07 23:25:48 +03:00
AykutSarac c44493bd8c feat: replace diagram img 2023-08-07 23:22:15 +03:00
AykutSarac eab5434c7b update favicon 2023-08-07 18:05:34 +03:00
AykutSarac c543ccd774 update favicon 2023-08-07 14:00:00 +03:00
AykutSarac a0253c6862 update docs page 2023-08-04 21:16:40 +03:00
AykutSarac 16376a52ac update limit 2023-08-04 18:49:18 +03:00
AykutSarac 547cafa8ba fix: hasQuery check 2023-08-04 18:08:34 +03:00
AykutSarac a710f345d3 add meta tags prevent page indexing 2023-08-04 18:07:47 +03:00
AykutSarac a950c6777b fix styled-components rendering 2023-08-04 17:41:34 +03:00
AykutSarac 77cc18eadb remove font preload option 2023-08-04 17:30:38 +03:00
AykutSarac 38863d0b8a set fixed height to elements 2023-08-04 17:29:30 +03:00
AykutSarac c637cb40b2 fix color contrast 2023-08-04 17:05:38 +03:00
AykutSarac ec283c013b update features section 2023-08-04 16:57:47 +03:00
AykutSarac b9b6c1d381 feat: update account ui 2023-08-04 15:42:18 +03:00
AykutSarac 4661578d8f set hero section fixed height 2023-08-04 14:36:39 +03:00
AykutSarac dfcb9364be remove unused packages 2023-08-04 14:08:46 +03:00
AykutSarac f1bdcb4030 fix: ui & bundle 2023-08-04 13:59:26 +03:00
AykutSarac cf40763f47 Revert "remove supabase session check from _app"
This reverts commit 8f60bf683b.
2023-08-03 23:47:35 +03:00
AykutSarac 8f60bf683b remove supabase session check from _app 2023-08-03 21:55:38 +03:00
AykutSarac 0b7fa80ca6 add jpeg download option 2023-08-03 21:13:56 +03:00
AykutSarac 1445ba86d4 fix: widget fetch url 2023-08-03 12:19:44 +03:00
AykutSarac 650000790c fix: create btn quota & cancel sub 2023-08-03 11:31:27 +03:00
AykutSarac fb3109e648 feat: remove altogic 2023-08-03 10:55:50 +03:00
AykutSarac 6ea8439343 feat: fix pwd reset & sign-in ui 2023-08-03 10:43:13 +03:00
AykutSarac d97734944d fix: fetch url 2023-08-02 22:50:51 +03:00
AykutSarac 8cbb09f912 feat: add private status to cloud 2023-08-02 21:33:49 +03:00
AykutSarac d5e171b1bd fix: redirect reset-password 2023-08-02 21:23:28 +03:00
AykutSarac 344ac42008 fix: login & register 2023-08-02 21:10:46 +03:00
AykutSarac 028824cb3e fix: create document 2023-08-02 20:56:52 +03:00
AykutSarac 1c153e5249 fix: copy share link 2023-08-02 19:38:47 +03:00
AykutSarac f9bfcf7fb4 fix: document fetch 2023-08-02 19:30:01 +03:00
AykutSarac 9b7fc7255f feat: update reset pwd 2023-08-02 19:20:13 +03:00
AykutSarac c06810f9c2 update gitignore 2023-08-02 18:46:47 +03:00
AykutSarac cd4cc07c41 feat: improve premium checks 2023-08-02 13:20:52 +03:00
AykutSarac ef82c68eeb feat: setup supabase 2023-07-31 21:38:33 +03:00
AykutSarac 23b3eefad2 feat: add enterprise 2023-07-30 00:34:39 +03:00
AykutSarac 7850d08cc1 feat: update colors 2023-07-28 09:52:31 +03:00
AykutSarac 7597a244fd feat: append email to checkout url 2023-07-28 00:36:53 +03:00
AykutSarac 93b92be14a update contact mails 2023-07-27 09:37:38 +03:00
AykutSarac 5d5f5ae355 add support mail 2023-07-27 09:34:41 +03:00
AykutSarac 4bae8c4b7d feat: update layouting & update elkjs config 2023-07-25 20:57:49 +03:00
AykutSarac 900e560242 ci: update sentry job 2023-07-25 13:34:52 +03:00
AykutSarac 6e1955c019 ci: update sentry job 2023-07-24 20:12:06 +03:00
AykutSarac e440aa19f4 ci: update sentry job 2023-07-24 20:06:16 +03:00
AykutSarac 636baa4941 ci: fix build upload artifacts path 2023-07-24 20:01:23 +03:00
AykutSarac 84a7b14cab ci: update sentry job 2023-07-24 19:54:35 +03:00
AykutSarac 80bf7cd76b ci: update sentry job 2023-07-24 19:49:44 +03:00
AykutSarac 6e26dbb174 ci: separate sentry build jobs 2023-07-24 19:42:03 +03:00
AykutSarac 8ae9492686 ci: fix sentry job upload sourcemaps 2023-07-24 19:30:10 +03:00
AykutSarac 9a23fc32fc ci: update sentry job 2023-07-24 19:27:16 +03:00
AykutSarac 04796774a1 ci: update sentry 2023-07-24 19:21:00 +03:00
AykutSarac cf853b402c ci: update sentry job 2023-07-24 19:15:57 +03:00
AykutSarac 39e1c9bf0d ci: update github action 2023-07-24 19:02:46 +03:00
AykutSarac ae92e3d091 ci: update sentry 2023-07-24 18:58:17 +03:00
AykutSarac e52372766d feat: update sentry 2023-07-24 14:29:35 +03:00
AykutSarac ac75dbbfc5 chore: update docker config 2023-07-23 13:38:32 +03:00
AykutSarac 2e4a887293 feat: migrate styled-components to v6 2023-07-23 13:34:49 +03:00
AykutSarac 5cae8d75d8 dont set sessionstorage on widget 2023-07-22 20:07:24 +03:00
AykutSarac f5be0fa80e restore editor data per session 2023-07-21 17:10:49 +03:00
AykutSarac 5c994cf246 update title & meta tags 2023-07-21 17:10:39 +03:00
AykutSarac 3862f9b871 code refactor 2023-07-20 23:52:35 +03:00
AykutSarac d2b7d94183 feat: add react-ga events 2023-07-20 20:14:33 +03:00
AykutSarac 5bcc9b0c7c feat: update styled-components load 2023-07-18 16:42:41 +03:00
AykutSarac 3e4b627172 fix: external host warning 2023-07-18 16:34:01 +03:00
AykutSarac 01762ea804 fix: external warning 2023-07-18 16:30:36 +03:00
AykutSarac 00f2704190 fix: Tools ssr validations 2023-07-18 16:25:24 +03:00
AykutSarac ac0de4ee4c feat: update structure 2023-07-18 15:09:37 +03:00
AykutSarac 03aef80f82 fix: display if subscription cancelled 2023-07-18 12:19:43 +03:00
AykutSarac 7e8fdca1b5 Update README.md 2023-07-16 23:17:29 +03:00
AykutSarac da0186839d update lint rules 2023-07-16 22:38:34 +03:00
AykutSarac 4d1db4ae6c lint 2023-07-16 22:34:14 +03:00
AykutSarac 1fb777934a feat: update mantine primaryShade 2023-07-16 21:37:21 +03:00
AykutSarac 0bd41e38d9 fix: bottom bar position 2023-07-16 15:59:26 +03:00
Aykut Saraç e71f2541ef Merge pull request #342 from AykutSarac/feat/optimize-bundle
chore: optimize bundle
2023-07-16 15:48:16 +03:00
AykutSarac 0e35c6a1e9 chore: optimize bundle 2023-07-16 15:44:10 +03:00
AykutSarac 4787758551 feat: remove unused ref 2023-06-30 14:50:52 +03:00
AykutSarac 6c072b8b2b fix: fetch id & url 2023-06-22 11:22:58 +03:00
AykutSarac fc248f9579 feat: downgrade monaco version 2023-06-21 21:05:16 +03:00
AykutSarac 99e62c3c62 feat: downgrade monaco version 2023-06-21 20:04:55 +03:00
AykutSarac 450c9e9130 feat: update monaco editor version 2023-06-21 19:42:26 +03:00
AykutSarac f4ebf93233 fix: change format error 2023-06-21 12:20:00 +03:00
AykutSarac c3fed760cd feat: improve google analytics setup 2023-06-19 20:07:57 +03:00
AykutSarac b874fbef30 fix: set format after error 2023-06-19 19:38:58 +03:00
AykutSarac c281b232df feat: set Link prefetch false & add ads 2023-06-19 19:38:08 +03:00
AykutSarac c3bc79bc97 improve page performance 2023-06-18 17:00:35 +03:00
AykutSarac 3b4baf7a4d fix: remove console.log 2023-06-18 12:37:46 +03:00
AykutSarac 60836fbe0a fix: save file query 2023-06-18 12:34:44 +03:00
AykutSarac 94476ea6b0 feat: update og image 2023-06-18 12:19:10 +03:00
Aykut Saraç a2c0af1e57 Merge pull request #335 from AykutSarac/feat/v3
Version 3
2023-06-18 12:05:04 +03:00
AykutSarac 7a60d00181 fix: save json 2023-06-18 11:53:41 +03:00
AykutSarac 0bf7279c00 fix: types 2023-06-18 11:50:11 +03:00
AykutSarac 1901e09926 feat: version 3 2023-06-18 11:41:10 +03:00
AykutSarac 528520cbce update contact mail 2023-05-31 19:43:15 +03:00
AykutSarac 358924d1f8 ci: update sentry job 2023-05-31 12:54:33 +03:00
AykutSarac c6b2100993 ci: fix sentry job 2023-05-31 12:44:50 +03:00
AykutSarac 6b3b98811e chore: update configs 2023-05-31 12:42:01 +03:00
AykutSarac a1219c4a80 ci: update sentry job 2023-05-31 12:40:12 +03:00
AykutSarac ee28174b2d ci: update sentry version var 2023-05-31 12:26:33 +03:00
AykutSarac eb5dabc797 ci: update sentry job 2023-05-31 12:17:49 +03:00
AykutSarac 926122b570 ci: update sentry job 2023-05-31 12:09:58 +03:00
AykutSarac fad8271b8b ci: update sentry job 2023-05-31 11:59:27 +03:00
AykutSarac 9009d238d2 ci: remove sentry job 2023-05-31 11:38:42 +03:00
AykutSarac c578b0fb06 ci: sentry fix path 2023-05-29 10:30:31 +03:00
AykutSarac 6609ea83db ci: sentry job 2023-05-29 10:23:50 +03:00
AykutSarac 535ef6cc2b ci: update sentry job 2023-05-29 10:18:33 +03:00
AykutSarac 2f4b9b4604 fix sentry job 2023-05-29 10:08:19 +03:00
AykutSarac d025866c83 ci: update sentry job 2023-05-29 09:59:24 +03:00
AykutSarac 660990f1f2 fix #332 2023-05-28 17:07:54 +03:00
AykutSarac a3c31864ca fix: sign-in page flow 2023-05-26 11:00:48 +03:00
AykutSarac b00497d755 show message after register 2023-05-25 12:52:02 +03:00
AykutSarac b4dbb0a0d5 fix: display error at register 2023-05-25 12:34:10 +03:00
AykutSarac 817226765d add login with pwd 2023-05-24 10:03:29 +03:00
AykutSarac f43f68c0ee update mail 2023-05-24 09:08:44 +03:00
AykutSarac b15419322d fix premium check at login 2023-05-23 16:16:34 +03:00
AykutSarac 5964b257c3 fix cancel premium btn 2023-05-23 16:12:14 +03:00
AykutSarac 9a8d5f334d update premium cancel flow 2023-05-23 15:58:05 +03:00
AykutSarac 005811bb0b fix old premium check 2023-05-23 15:35:59 +03:00
AykutSarac 21150a21c4 update payment flow 2023-05-23 15:35:03 +03:00
AykutSarac f820d59542 update render on error 2023-05-22 19:43:32 +03:00
AykutSarac c3e4a6b16c ci update 2023-05-22 19:43:07 +03:00
AykutSarac c28c21ab6e update build job 2023-05-22 19:20:59 +03:00
AykutSarac 1cc0748558 ci update 2023-05-22 19:14:50 +03:00
AykutSarac 9ce14dcb3a update ci 2023-05-22 19:09:25 +03:00
AykutSarac b29737458f update workflow 2023-05-22 19:02:20 +03:00
AykutSarac eafb89862f update sentry path 2023-05-22 18:54:44 +03:00
AykutSarac e19cdc70f8 allow comments in json 2023-05-22 18:24:00 +03:00
AykutSarac 40aeda5bf3 fix: sentry job 2023-05-22 12:01:53 +03:00
AykutSarac b1eec1a946 add job needs 2023-05-22 11:52:36 +03:00
AykutSarac 4b91dffd60 feat: implement sentry cli 2023-05-22 11:49:38 +03:00
AykutSarac 5c9ad22aa7 fix: typo 2023-05-21 16:44:14 +03:00
AykutSarac c828b04004 fix: update json deleting/adding keys 2023-05-21 13:21:53 +03:00
AykutSarac 603f33bcf9 feat: update premium features list 2023-05-21 13:02:16 +03:00
AykutSarac 9423d6e14f feat: hide edit on embed 2023-05-21 13:01:13 +03:00
AykutSarac 98c37cc322 chore: enable dev user premium 2023-05-21 12:41:49 +03:00
AykutSarac 45d4fa3d66 feat: support edit on graph 2023-05-21 12:41:21 +03:00
AykutSarac c4a9ee5100 remove news 2023-05-21 11:53:56 +03:00
AykutSarac 189c7ca167 upgrade node version 2023-05-20 17:58:39 +03:00
AykutSarac e35dfc44e5 downgrade next 2023-05-20 17:57:51 +03:00
AykutSarac 0ae5e6a7b1 update packages 2023-05-20 17:51:04 +03:00
AykutSarac 08dd82d3af lint 2023-05-20 17:36:03 +03:00
AykutSarac 3a08cf4545 fix: buttond widths 2023-05-18 00:57:17 +03:00
AykutSarac 6a405b26a1 fix: cloud post/put 2023-05-18 00:42:15 +03:00
AykutSarac 1483a8e392 fix: save file 2023-05-18 00:30:10 +03:00
AykutSarac c3ebefdb0a feat: update login flow 2023-05-17 10:16:00 +03:00
AykutSarac e647c714a4 fix: import/fetch file 2023-05-16 12:59:20 +03:00
AykutSarac d8cefd5cd5 fix: parsing with error 2023-05-15 11:59:35 +03:00
AykutSarac 1400f755b0 refactor: traverse function 2023-05-14 20:03:56 +03:00
AykutSarac b1e7361aa4 refactor 2023-05-14 20:03:35 +03:00
AykutSarac 73436b8913 feat: update toolbar premium badge 2023-05-14 15:10:10 +03:00
AykutSarac a34c7120c9 fix: homepage ad size 2023-05-14 15:04:19 +03:00
AykutSarac bde046a4f4 feat: display ads at editor 2023-05-14 14:53:16 +03:00
AykutSarac cef8e92087 chore: update eslint & prettier 2023-05-14 13:35:14 +03:00
AykutSarac f3d8764ac1 fix: empty node size 2023-05-14 10:34:09 +03:00
AykutSarac c477a679e4 feat: display external host warning 2023-05-14 10:25:27 +03:00
AykutSarac a2092f53a8 fix: add pkg & widget height 2023-05-13 21:32:42 +03:00
AykutSarac 577869a563 feat: remove unused pkg 2023-05-13 21:29:00 +03:00
AykutSarac af2f32768b feat: update docs ui 2023-05-13 21:28:50 +03:00
AykutSarac ae34063832 fix: style widget height 2023-05-13 21:11:52 +03:00
AykutSarac 3450bc45c0 style: fix mobile layout 2023-05-13 21:04:26 +03:00
AykutSarac 83a7cd0741 fix: small screen display 2023-05-13 20:55:26 +03:00
AykutSarac e443f8e98f fix: styling & auth 2023-05-13 20:24:59 +03:00
AykutSarac 3ac2aed2fe chore: refactor & remove graphcanvas 2023-05-13 16:08:31 +03:00
AykutSarac e9769a5192 feat: display colors in colorswatch 2023-05-13 13:39:21 +03:00
AykutSarac 009890a6d6 feat: set test user for dev env 2023-05-13 12:58:43 +03:00
Aykut Saraç e6f6ce8697 Update README.md 2023-05-13 11:53:39 +03:00
AykutSarac 6ba41dfcbe docs: update docs 2023-05-13 11:11:52 +03:00
AykutSarac 3b50119095 feat: update widget 2023-05-13 10:46:35 +03:00
AykutSarac d8acb40918 feat: update navbar ui 2023-05-12 21:09:23 +03:00
AykutSarac 1a7c5a5321 feat: update premium view & features 2023-05-12 13:16:31 +03:00
AykutSarac 6785c6168e feat: update herowand links 2023-05-11 22:37:13 +03:00
AykutSarac 974b537012 feat: update premium wordings 2023-05-11 22:36:17 +03:00
AykutSarac 6e3107dda1 fix: widget default data 2023-05-11 22:29:31 +03:00
AykutSarac b5c8a1d14e fix: styling & fetch url 2023-05-11 22:20:34 +03:00
AykutSarac 231136c807 fix: widget 2023-05-11 22:08:17 +03:00
AykutSarac 8590f84867 fix: downgrade next 2023-05-11 21:43:16 +03:00
AykutSarac c4566f68d0 feat: improve project structure 2023-05-11 21:36:01 +03:00
AykutSarac 56b2d071a7 docs: update preview 2023-05-07 20:06:24 +03:00
AykutSarac 33410cf7a3 docs: update preview 2023-05-07 19:57:03 +03:00
Aykut Saraç c9f3f78bd8 Update README.md 2023-05-07 19:52:31 +03:00
AykutSarac 5b91fa96c7 feat: move news to editor page only 2023-05-07 12:51:46 +03:00
AykutSarac 614c6946fb feat: move news modal check to cookie 2023-05-07 12:32:54 +03:00
AykutSarac 53138b50c8 feat: update premium modal ui 2023-05-06 15:18:25 +03:00
AykutSarac 5c290a35d1 feat: update center canvas padding 2023-04-30 00:04:38 +03:00
AykutSarac 3acd81b63c fix widget view 2023-04-29 19:05:40 +03:00
AykutSarac 701267a5f1 feat: update editor layout 2023-04-29 18:45:01 +03:00
AykutSarac fc5d880c74 decrease news debounce 2023-04-24 20:48:32 +03:00
AykutSarac e10cfa6e14 replace herowand ads to news modal 2023-04-24 20:39:40 +03:00
AykutSarac e734c38e9d update docker node version 2023-04-22 10:45:56 +03:00
AykutSarac e393af49a2 remove premium node limit 2023-04-21 11:25:36 +03:00
AykutSarac 7bb1699031 add herowand banner 2023-04-19 10:14:50 +03:00
AykutSarac e7e20e3b2b update patreon links 2023-04-15 12:52:32 +03:00
AykutSarac 8311361da2 remove unused action 2023-04-05 10:22:41 +03:00
AykutSarac 5a3c6e2fc7 lint fix 2023-03-31 20:33:37 +03:00
Aykut Saraç e4dc80f830 Merge pull request #326 from AykutSarac/refactor-codebase
Refactor codebase
2023-03-31 19:04:08 +03:00
AykutSarac 13da532325 remove repair json 2023-03-31 18:53:39 +03:00
AykutSarac cfe06b4c17 lint fix 2023-03-31 18:46:37 +03:00
AykutSarac 0aa2b6c5e8 fix: sidebar icons mweb 2023-03-31 18:43:29 +03:00
AykutSarac 6eda021cbd refactor codebase 2023-03-25 10:59:29 +03:00
Aykut Saraç 25a7d22c9b Merge pull request #318 from AykutSarac/feat/mantine-ui
Feat/mantine UI
2023-03-12 14:31:34 +03:00
AykutSarac a93e04eaec update yarn lock 2023-03-11 19:56:58 +03:00
AykutSarac d48105d1b9 feat: optimize loading & performance 2023-03-11 19:48:58 +03:00
AykutSarac 6ad6deb152 feat: styling fixes 2023-03-11 18:21:45 +03:00
AykutSarac a162c1eb82 feat: upgarde package versions 2023-03-09 23:52:02 +03:00
Aykut Saraç bbd0aa1f10 Update CONTRIBUTING.md 2023-03-09 23:38:10 +03:00
Aykut Saraç 75b4d907b3 Update Dockerfile 2023-03-09 22:47:03 +03:00
Aykut Saraç 5524ab37d3 Merge pull request #274 from roland-becsi-veratrak/patch-1
Update default.conf
2023-03-08 12:39:48 +03:00
AykutSarac 84fcb7621f fix: loading 2023-03-08 12:38:30 +03:00
AykutSarac fdaffa622a fix: image size 2023-03-08 12:26:26 +03:00
AykutSarac 8fe3d3b3cd Merge remote-tracking branch 'origin/main' into feat/mantine-ui 2023-03-08 12:15:58 +03:00
Aykut Saraç 9c1c05b612 Update nextjs.yml 2023-03-08 12:12:24 +03:00
Aykut Saraç 0126cd37e8 Update next.config.js 2023-03-08 12:10:09 +03:00
Aykut Saraç 63fc7b390a Update nextjs.yml 2023-03-08 12:06:26 +03:00
Aykut Saraç 1de7110be5 Update nextjs.yml 2023-03-08 11:53:24 +03:00
Aykut Saraç ed65a9be66 Update Dockerfile 2023-03-08 11:43:38 +03:00
AykutSarac fd5df3531c feat: update premium view button 2023-03-07 22:12:15 +03:00
AykutSarac 4add303fe7 fix: docs button 2023-03-07 22:09:05 +03:00
AykutSarac 7c2f319f23 feat: implement prsim & modal ui 2023-03-07 22:05:25 +03:00
AykutSarac ddc2a0dc53 feat: mantine ui migration 2023-03-05 22:49:15 +03:00
AykutSarac 3061ee05a7 fix node path not working 2023-02-12 22:48:46 +03:00
Aykut Saraç 9216180019 Merge pull request #304 from hanbin9775/feature/dot-notation-on-edge
#257 Getting path of JSON on clicking the edges
2023-02-12 22:20:36 +03:00
AykutSarac 80a02d79ba improve algorithm performance 2023-02-12 22:15:17 +03:00
AykutSarac bf981d4d27 fix navbar 2023-02-11 22:59:07 +03:00
AykutSarac 76615cc34a set page names dynamically 2023-02-11 20:25:01 +03:00
AykutSarac f950028455 update sign-in page 2023-02-11 20:16:32 +03:00
AykutSarac e450041d71 set png default extension 2023-02-11 19:49:55 +03:00
Aykut Saraç c2ff8d225e Merge pull request #309 from AykutSarac/dogukanuhn/main
Dogukanuhn/main
2023-02-11 19:45:17 +03:00
AykutSarac a33f420e25 remove travis 2023-02-11 19:44:45 +03:00
AykutSarac 819cd2729b Trigger actions 2023-02-11 19:41:24 +03:00
Aykut Saraç 786905ba79 Update pull-request.yml 2023-02-11 19:41:16 +03:00
AykutSarac abc7a68fc4 Trigger actions 2023-02-11 19:39:47 +03:00
Aykut Saraç 2c95ac0708 Delete pr.yml 2023-02-11 19:39:35 +03:00
Aykut Saraç e509e118b5 Update pull-request.yml 2023-02-11 19:39:17 +03:00
Aykut Saraç 14d9b60b6d Update pull-request.yml 2023-02-11 19:38:44 +03:00
AykutSarac 1c6eb9f60c Trigger actions 2023-02-11 19:37:58 +03:00
Aykut Saraç 8be19e2b99 Update pull-request.yml 2023-02-11 19:36:47 +03:00
Aykut Saraç 7f37e03fb9 Create pr.yml 2023-02-11 19:34:08 +03:00
Aykut Saraç daa6c974c7 Update and rename verify.yml to pull-request.yml 2023-02-11 19:30:11 +03:00
AykutSarac fc77fbcaa1 remove tests 2023-02-11 19:25:45 +03:00
Aykut Saraç 80ca1a38ca Create verify.yml 2023-02-11 19:25:38 +03:00
AykutSarac 14c8bfc749 refactor 2023-02-11 19:18:49 +03:00
AykutSarac eb34e0f41c Merge branch 'main' into dogukanuhn/main 2023-02-11 19:14:05 +03:00
AykutSarac 13aaa81d9a remove incorrect import 2023-02-10 12:05:06 +03:00
AykutSarac 8a6bec0b25 fix modal height 2023-02-09 15:13:34 +03:00
AykutSarac 6d3e259f5a next config sourcemap 2023-02-09 09:22:11 +03:00
AykutSarac 1840496620 fix: prevent double parsing 2023-02-09 00:06:35 +03:00
AykutSarac 29fb6c4f39 update packages 2023-02-08 23:32:06 +03:00
AykutSarac a668e7ae2f fix type error 2023-02-08 23:18:12 +03:00
AykutSarac 1e528dfcf7 upload sourcemaps 2023-02-08 23:15:30 +03:00
AykutSarac ec871e5fec refactor: improve parser readability 2023-02-08 23:10:33 +03:00
AykutSarac cb9365156c update ads 2023-02-08 17:07:44 +03:00
AykutSarac 203d21a28a revert sign in 2023-02-05 17:13:11 +03:00
AykutSarac b38d5df6de fix auth 2023-02-05 16:58:30 +03:00
AykutSarac 852c9fcc3c fix useeffect 2023-02-05 16:56:41 +03:00
AykutSarac f37325aad1 improve auth 2023-02-05 16:46:37 +03:00
AykutSarac 8fc4c22562 Revert "implement pro version updates"
This reverts commit 041fa31a86.
2023-02-05 11:58:48 +03:00
Aykut Saraç 0e4286e1d7 Create nextjs.yml 2023-02-05 11:53:27 +03:00
AykutSarac 041fa31a86 implement pro version updates 2023-02-05 11:25:16 +03:00
hanbin9775 de667d05fc feat: function that returns information of edge 2023-01-31 02:36:33 +09:00
AykutSarac 935901f87e convert esm import to cjs 2023-01-29 20:04:53 +03:00
AykutSarac 7ffd4fdabf improve bundle performance 2023-01-29 20:00:07 +03:00
AykutSarac 29c686576c improve bundle performance 2023-01-29 19:45:09 +03:00
AykutSarac fa150ca03b update editor page background 2023-01-29 18:20:53 +03:00
AykutSarac 09e2d7f56e update landing page styles 2023-01-29 18:14:05 +03:00
Aykut Saraç 962e108f79 Merge pull request #291 from cihat/fix/smooth-scroll
Fix smooth scroll behavior on styles
2023-01-29 15:12:20 +03:00
hanbin9775 fce4b0abb3 Implement EdgeModal 2023-01-29 20:46:40 +09:00
cihat-salik 410da36327 Fix smooth scroll behavior on styles 2023-01-29 14:43:42 +03:00
AykutSarac 733ecd1cf5 fix type colors 2023-01-29 14:34:49 +03:00
AykutSarac 3e037a0d26 lazy load graph images 2023-01-28 18:45:46 +03:00
AykutSarac 7d21712204 update seagreen color 2023-01-28 18:05:45 +03:00
AykutSarac f85fd10b8e improve font performance 2023-01-28 17:45:51 +03:00
AykutSarac 39c5284ae7 add iframe title 2023-01-28 17:39:26 +03:00
AykutSarac b8b2472a94 lazy load twitter embed 2023-01-28 17:38:17 +03:00
AykutSarac 07bea63692 remove partner check for iframe 2023-01-28 17:18:47 +03:00
AykutSarac e0e3de1598 update nextjs to v13 2023-01-28 17:17:21 +03:00
Aykut Saraç 5521024bc4 Merge pull request #302 from HyunseungLee-Travis/typo-fix
Fix typo
2023-01-28 16:06:01 +03:00
Hyunseung Lee b4df1a4e26 Fix typo 2023-01-28 21:52:31 +09:00
AykutSarac db214a8d78 improve node content modal ui 2023-01-28 14:56:49 +03:00
AykutSarac 1c77a14727 improve styling 2023-01-28 14:46:16 +03:00
AykutSarac 732208e84d fix widget height 2023-01-24 21:47:18 +03:00
AykutSarac c9dea03864 update packages 2023-01-21 13:05:07 +03:00
Aykut Saraç b8a86b1479 Merge pull request #284 from liqun98/feature/drag_import
import file by drag and drop
2023-01-21 12:24:59 +03:00
AykutSarac 8268afbc6a improve search focus 2023-01-21 01:01:50 +03:00
AykutSarac 4a6f387b01 validate error view before premium 2023-01-20 22:02:12 +03:00
AykutSarac e27da0df1b format json on change 2023-01-20 21:05:22 +03:00
AykutSarac a3cd041a58 update partner validation 2023-01-18 21:27:42 +03:00
AykutSarac 255207c40e update partner request 2023-01-18 21:11:00 +03:00
AykutSarac fce3e3c9b8 implement premium validation 2023-01-18 20:49:31 +03:00
AykutSarac 52a45ae60a update search input found info 2023-01-16 22:53:51 +03:00
AykutSarac 1e88a6e744 update ads 2023-01-16 22:41:47 +03:00
AykutSarac d98cc4edc0 disable toolbar for mobile 2023-01-15 18:28:44 +03:00
AykutSarac 71a3a3d489 display highlighed nodes count 2023-01-15 16:53:22 +03:00
AykutSarac 1e59a72ebc bigger data requires premium 2023-01-15 16:06:50 +03:00
AykutSarac f3b97d854f fix parent node width 2023-01-15 15:33:24 +03:00
AykutSarac 9f9f30b760 improve highlight styling 2023-01-15 14:36:42 +03:00
AykutSarac 9bc781bddd remove unused pkg 2023-01-15 14:15:23 +03:00
AykutSarac 5603642eec remove unused pkg 2023-01-15 14:15:18 +03:00
AykutSarac c57a66b1d5 add tools to widget 2023-01-15 14:14:59 +03:00
AykutSarac f6cb6b7f07 fix search node 2023-01-15 14:04:55 +03:00
AykutSarac f8e945a703 add discord link to footer 2023-01-15 13:20:08 +03:00
AykutSarac f98366b29a move support to top 2023-01-15 13:17:49 +03:00
AykutSarac c3b8960376 improve font performance 2023-01-15 00:08:00 +03:00
AykutSarac 22c7c1b6e1 improve performance 2023-01-15 00:05:56 +03:00
AykutSarac c8a083cd5b update landing hero 2023-01-14 23:48:40 +03:00
Aykut Saraç 030b40d2cb Merge pull request #295 from nnamua/fix-typo
Fixed README typo
2023-01-12 17:51:46 +03:00
Aykut Saraç e035039d43 Merge pull request #299 from AykutSarac/dependabot/npm_and_yarn/json5-1.0.2
Bump json5 from 1.0.1 to 1.0.2
2023-01-10 17:07:12 +03:00
dependabot[bot] e6f7af59e1 Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 13:53:25 +00:00
paumann 109af18b4a Fixed typo 2023-01-09 13:00:51 +01:00
AykutSarac 69d6312d41 update outdated link 2023-01-08 10:35:34 +03:00
AykutSarac 056e70cb30 update icon for disabled 2023-01-07 16:19:23 +03:00
AykutSarac db1868bf57 disable share button if private 2023-01-07 14:23:59 +03:00
AykutSarac f7ffa43cf1 set new json private by default 2023-01-07 12:00:20 +03:00
AykutSarac 7c5bb81767 create sitemap.txt 2023-01-02 15:55:01 +03:00
CodeMaker-Zhao 9b70222ff9 check the file type and reject non-JSON file 2023-01-02 08:43:47 +08:00
CodeMaker-Zhao aaf606ba06 import file by drag and drop 2023-01-01 19:22:07 +08:00
AykutSarac 5914ae94eb refactor parser 2022-12-31 15:24:27 +03:00
Aykut Saraç e488ff524c Merge pull request #268 from hanbin9775/fix/align-object-child
fix: align object's children to keep the consistency of graph illustration
2022-12-31 14:10:42 +03:00
AykutSarac 1a4236f8fb update outdated eslint rules 2022-12-31 14:04:01 +03:00
AykutSarac db23aea342 update delete button styling 2022-12-31 14:03:55 +03:00
AykutSarac 08afad8fe0 Merge branch 'main' into fix/align-object-child 2022-12-31 14:00:52 +03:00
AykutSarac d16920c2c4 update packages 2022-12-31 13:56:43 +03:00
AykutSarac e1769ef356 set img fixed width 2022-12-31 13:29:37 +03:00
AykutSarac 258dbc46ba improve font loading 2022-12-31 13:27:06 +03:00
AykutSarac b1de175b9d hide bar on mobile 2022-12-31 13:27:01 +03:00
AykutSarac b61fb32512 remove odd iframe 2022-12-30 19:09:58 +03:00
AykutSarac 403c8e8146 update embed 2022-12-30 19:09:07 +03:00
AykutSarac 3e39e4f972 fix incorrect image 2022-12-30 18:37:00 +03:00
AykutSarac 3efc99eed8 update images 2022-12-30 18:35:10 +03:00
Aykut Saraç 6533e5746f Merge pull request #281 from AykutSarac/dependabot/npm_and_yarn/loader-utils-2.0.4
Bump loader-utils from 2.0.2 to 2.0.4
2022-12-30 18:22:38 +03:00
dependabot[bot] 5cc6d862e6 Bump loader-utils from 2.0.2 to 2.0.4
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-30 15:18:56 +00:00
Aykut Saraç 1940987759 Merge pull request #280 from AykutSarac/mona-sans
Cloud updates
2022-12-30 18:15:46 +03:00
AykutSarac db0536a5e7 update user type 2022-12-30 18:12:10 +03:00
AykutSarac 2886488fd9 remove unused type 2022-12-30 18:09:35 +03:00
AykutSarac 7ad96fcf5b prettier 2022-12-30 18:06:37 +03:00
AykutSarac 3b47a36d23 Merge branch 'main' into mona-sans 2022-12-30 17:47:31 +03:00
AykutSarac d7bcc5ded4 update version 2022-12-30 17:46:00 +03:00
AykutSarac afce1006e5 use default avatar on error 2022-12-30 17:10:45 +03:00
AykutSarac c759853cd2 update env 2022-12-30 17:02:48 +03:00
AykutSarac 319abe039b update pricing styles 2022-12-30 16:49:41 +03:00
AykutSarac 321a13ab37 fix node width 2022-12-26 21:37:32 +03:00
AykutSarac 736fe68f2e prettier lint 2022-12-25 21:06:46 +03:00
AykutSarac 0195933c0a create pricing page 2022-12-25 21:05:41 +03:00
AykutSarac f42bbe6b83 refactor & delete json from list 2022-12-25 18:22:28 +03:00
AykutSarac df648c7809 lint 2022-12-25 18:22:01 +03:00
AykutSarac a2d77cf65a fix typoe 2022-12-25 18:21:57 +03:00
AykutSarac 1e6c7b6cb2 warn unsaved changes 2022-12-25 15:35:44 +03:00
AykutSarac 2c53a3af64 increase canvas ratio for change watch 2022-12-24 23:05:54 +03:00
AykutSarac 8070c7c280 api improvements & document count limit 2022-12-24 22:55:54 +03:00
AykutSarac 418031a3c8 hide public/private from non owners 2022-12-23 20:10:11 +03:00
AykutSarac 810f0d72be add auth for get json 2022-12-23 19:12:51 +03:00
AykutSarac 0f76b4ad4f styling improvements 2022-12-23 16:13:52 +03:00
AykutSarac 35382609a4 rename embed page to docs 2022-12-23 13:39:05 +03:00
AykutSarac abf0c0856f create embed docs 2022-12-23 13:36:32 +03:00
AykutSarac 8c3ae89355 create embed guide 2022-12-23 00:13:30 +03:00
AykutSarac 458723b2d6 improve embeds 2022-12-22 22:13:40 +03:00
AykutSarac 1548d6d4dd update error page img 2022-12-22 22:13:24 +03:00
AykutSarac f0399b68a5 code refactor sidebar & cloud modal 2022-12-20 11:00:34 +03:00
AykutSarac ca9cd881c4 update login button text 2022-12-18 18:48:50 +03:00
AykutSarac fd58197035 improve parser & add image preview setting 2022-12-18 15:24:32 +03:00
AykutSarac 7da91633a5 prettier lint 2022-12-18 14:14:07 +03:00
AykutSarac 6456e41671 fix expand/collapse all 2022-12-18 13:59:25 +03:00
AykutSarac ebe39c2210 fix unauthorized json access 2022-12-17 23:43:07 +03:00
AykutSarac 05869e63db prettier lint 2022-12-17 23:06:12 +03:00
AykutSarac 9265d45e79 fix incorrect state 2022-12-17 23:04:08 +03:00
AykutSarac 7eb5edf550 remove unused function 2022-12-17 23:02:02 +03:00
AykutSarac 20bcdfef10 replace useConfig with useGraph 2022-12-17 23:00:37 +03:00
AykutSarac a26b94f584 improve parsing structure 2022-12-17 22:27:48 +03:00
Aykut Saraç f8a8747775 style responsive design 2022-12-12 10:52:20 +03:00
AykutSarac 4d0386b32e lazy load image 2022-12-11 22:37:47 +03:00
AykutSarac 9f51259084 update doc name 2022-12-11 19:37:48 +03:00
AykutSarac 6c270635ac fix toggle private 2022-12-11 18:27:22 +03:00
AykutSarac 4ed3411f86 styling improvements 2022-12-11 14:27:07 +03:00
AykutSarac 8225bc2986 improve parsing ui 2022-12-10 17:08:42 +03:00
AykutSarac 5da20fa5be Merge branch 'main' into mona-sans 2022-12-08 19:56:49 +03:00
AykutSarac d5db8a2df0 update folder structure 2022-12-08 19:52:16 +03:00
hanbin9775 e2765666b7 fix: align object's children to keep the consistency of graph illustration 2022-12-09 01:13:16 +09:00
Aykut Saraç da620a17cb Update README.md 2022-12-08 11:51:55 +03:00
AykutSarac 9bcd86f88a update homepage embed options 2022-12-08 00:14:01 +03:00
AykutSarac a8167f53d6 update folder structure 2022-12-08 00:11:44 +03:00
AykutSarac 3feb5983a4 fix homepage 2022-12-08 00:08:23 +03:00
AykutSarac ba02b60e06 add options to embed 2022-12-07 23:37:32 +03:00
AykutSarac eb73508ab7 create altogic connections 2022-12-07 22:34:12 +03:00
roland-becsi-veratrak 7ffac15f42 Update default.conf 2022-12-05 13:53:48 +00:00
AykutSarac 59789aaeb1 refactor: improve parsing logic 2022-12-04 00:12:16 +03:00
AykutSarac cf575c690a style font size 2022-12-03 12:59:56 +03:00
AykutSarac 1b37e812ff implement font mona-sans 2022-12-02 21:36:16 +03:00
Aykut Saraç debe13fef5 update version 2022-11-24 13:12:02 +03:00
Aykut Saraç 4864d35d51 Merge pull request #264 from AykutSarac/style-object-array
seperate colors from array and object
2022-11-24 13:08:30 +03:00
Aykut Saraç dface28f1f remove readonly type 2022-11-24 13:04:54 +03:00
Aykut Saraç c8134fcda5 seperate colors from array and object 2022-11-24 12:56:55 +03:00
AykutSarac b02f7ccb99 add generic support store hooks 2022-11-20 11:59:28 +03:00
AykutSarac d0e11cc5c1 feat: replace powered by 2022-11-13 21:46:23 +03:00
Aykut Saraç 57389b3837 Merge pull request #251 from victorbrambati/main
fix empty nodes
2022-11-07 10:43:27 +03:00
AykutSarac 965e070ca7 style: resize sponsors section 2022-11-07 08:11:20 +03:00
victorbrambati 41743f1ff0 chore: refactor getOutgoers 2022-11-06 18:37:40 -03:00
victorbrambati b7492c1c55 fix: collapsed parent node disappears when expand 2022-11-06 18:22:19 -03:00
AykutSarac edff409b7d refactor(validateToken): code refactor 2022-11-06 13:06:21 +03:00
AykutSarac a8df2c20aa feat: create account view after logged in 2022-11-06 13:05:21 +03:00
AykutSarac 21717be7f3 feat: implement google auth 2022-11-05 21:19:41 +03:00
AykutSarac 9e9b9e5481 feat: create layout 2022-11-05 16:09:46 +03:00
Aykut Saraç 94bc4275ec Merge pull request #252 from AykutSarac/code-refactor
chore: code refactor
2022-11-05 13:09:30 +03:00
victorbrambati 36fcb6f55b feat: don't create an empty node in a root array 2022-11-04 17:12:10 -03:00
victorbrambati e772153cd3 fix: different brothers node in array is not work correctly 2022-11-03 19:42:01 -03:00
victorbrambati 76bcad4e1d fix: different brother node for same parent object 2022-11-02 22:39:25 -03:00
AykutSarac 15f6dd2545 chore: code refactor 2022-11-01 22:44:54 +03:00
victorbrambati 50cb490dbe feat: brothers node and parent node in the same parent 2022-11-01 09:45:06 -03:00
AykutSarac d3bbc6d813 fix: canvas scaling 2022-11-01 12:18:12 +03:00
victorbrambati 24d9715056 fix empty nodes 2022-10-30 22:47:48 -03:00
AykutSarac fb6d8a55f5 feat: replace twitter embed with official 2022-10-30 15:59:45 +03:00
AykutSarac f8e5f93c6e chore: update docs 2022-10-30 15:44:35 +03:00
AykutSarac 2e93da574d fix: remove collapsed state persisting on json change 2022-10-30 15:44:25 +03:00
AykutSarac 96748179f7 update version 2022-10-30 15:39:37 +03:00
AykutSarac 7dfe1c5df2 update preview image 2022-10-30 15:36:28 +03:00
AykutSarac 9449e6b006 fix incorrect state fold/unfold 2022-10-30 15:30:34 +03:00
AykutSarac 7774e685b4 feat: improve collapse/expand all & rename fold/unfold 2022-10-30 15:19:03 +03:00
Aykut Saraç 86f0f0d5ec Merge pull request #250 from AykutSarac/fix/canvas-pan
fix: #158
2022-10-30 13:34:12 +03:00
AykutSarac 8fa8130d9d fix: #158 2022-10-30 13:32:20 +03:00
Aykut Saraç e32147e1bf Merge pull request #210 from TallTed/patch-1
improve language of "huge file" error
2022-10-30 13:22:56 +03:00
Aykut Saraç 3f17281a80 fix: widget src 2022-10-28 15:38:20 +03:00
Aykut Saraç c055e14fc8 feat: improve loading state 2022-10-28 15:24:48 +03:00
Aykut Saraç 35aa992375 feat: bug fixes & deprecation warning 2022-10-28 14:44:55 +03:00
AykutSarac 0468180440 update packages 2022-10-26 21:17:34 +03:00
AykutSarac 884a2ad1ec add page title 2022-10-26 20:44:34 +03:00
Aykut Saraç c76da1fb22 center widget on data change 2022-10-26 19:11:31 +03:00
Aykut Saraç e7fe70e628 display warning for embed query json 2022-10-26 18:31:37 +03:00
Aykut Saraç 76b627ccc2 update received message structure 2022-10-26 17:05:42 +03:00
Aykut Saraç c17aec748b update routes & config 2022-10-26 16:59:11 +03:00
Aykut Saraç 51cae9e9f6 update embed architecture 2022-10-26 16:51:25 +03:00
Aykut Saraç 6ccd08f041 Merge pull request #243 from shivam1646/fix/collapse-bug
Fix: don't show disconnected nodes on expand
2022-10-23 13:45:52 +03:00
Shivam f70af5806b fix: don't show disconnected nodes on expand 2022-10-23 15:01:10 +05:30
Aykut Saraç 0737bcbbbf Merge pull request #238 from shivam1646/main
Fix: persist hidden nodes on rotate
2022-10-12 19:49:01 +03:00
AykutSarac 3e0fafbf91 hide support btn on widget 2022-10-12 19:44:00 +03:00
Shivam 74671012cb fix: persist hidden nodes on rotate 2022-10-12 12:26:23 +05:30
AykutSarac 833c65d735 add support button 2022-10-11 21:46:58 +03:00
AykutSarac 67b5d6a1f8 fix json validator 2022-10-10 21:49:14 +03:00
AykutSarac c2bd77294c remove btn title 2022-10-06 22:06:54 +03:00
Aykut Saraç 679fc707b0 Merge pull request #230 from VladCuciureanu/feature/188
Added a 'Collapse/Expand Graph' button
2022-10-06 21:50:55 +03:00
Aykut Saraç 984cd57352 Merge pull request #218 from VladCuciureanu/feature/169
Added children count label next to the node key
2022-10-06 21:49:06 +03:00
VladCuciureanu b6ccddb41e Added children count label next to the node key 2022-10-05 22:08:20 +03:00
Aykut Saraç cde90e1e25 Merge pull request #227 from VladCuciureanu/feature/145
Accept JSONC by stripping it of it's comments
2022-10-05 20:45:30 +03:00
AykutSarac 4f3b9df48d fix typing 2022-10-05 20:33:50 +03:00
AykutSarac 75ecb12cee support jsonc 2022-10-05 20:33:17 +03:00
VladCuciureanu a3e110a1ea Added a 'Collapse/Expand Graph' button 2022-10-05 20:25:59 +03:00
AykutSarac 50a553a022 update hero section buttons 2022-10-04 20:42:13 +03:00
AykutSarac 86508e9023 fix carbon ads tag 2022-10-04 19:54:42 +03:00
AykutSarac 357de1e691 update manifest 2022-10-04 19:54:37 +03:00
Ted Thibodeau Jr c11779eaba improve language of "huge file" error 2022-09-28 10:49:26 -04:00
AykutSarac 7c88dca656 Revert "update widget structure"
This reverts commit 1c6875b85d.
2022-09-27 22:59:43 +03:00
AykutSarac 1c6875b85d update widget structure 2022-09-27 22:05:56 +03:00
AykutSarac 2cfb49dab9 update button 2022-09-27 18:42:46 +03:00
AykutSarac a057871191 update readme 2022-09-27 18:04:58 +03:00
AykutSarac 879fc15e15 update license 2022-09-27 18:04:23 +03:00
AykutSarac ca0bb8b32c hide vscode btn on mobile 2022-09-27 12:54:49 +03:00
AykutSarac 507e3a8f32 add vscode link 2022-09-27 12:48:14 +03:00
AykutSarac 6fc9d43857 update twitter handle 2022-09-26 23:25:42 +03:00
AykutSarac e240286a67 remove test scripts 2022-09-26 20:06:36 +03:00
AykutSarac d408dde8a0 create yarn.lock 2022-09-25 23:39:52 +03:00
AykutSarac 2d28229494 update README dev guide 2022-09-25 23:38:35 +03:00
AykutSarac 2ed79c58d2 update packages 2022-09-25 23:37:47 +03:00
dogukanuhn 2650776f0a Add SVG support to download options 2022-09-25 23:00:12 +03:00
dogukanuhn 3cdfe03745 Add SVG support to download options 2022-09-25 22:17:38 +03:00
dogukanuhn 13c15b4e3c Merge branch 'main' of https://github.com/dogukanuhn/jsoncrack.com 2022-09-25 21:54:18 +03:00
dogukanuhn 34dd9e7ccd add extension to modal 2022-09-25 21:52:51 +03:00
AykutSarac be8258a626 fix type 2022-09-25 21:03:03 +03:00
AykutSarac 2207c8ec37 fix scaling 2022-09-25 18:35:27 +03:00
AykutSarac 1414fff690 update paths [ci skip] 2022-09-24 19:45:19 +03:00
AykutSarac 8f156f41cb fix type [ci skip] 2022-09-24 19:40:31 +03:00
Aykut Saraç 6a8ff533b7 Merge pull request #203 from dogukanuhn/main
Canvas should fit into view on click Center icon at toolbar
2022-09-24 16:05:44 +03:00
AykutSarac 4c39318beb set autoscale & center canvas 2022-09-24 15:57:27 +03:00
dogukanuhn 23a69d78c8 Canvas should fit into view on click Center icon at toolbar 2022-09-24 15:17:17 +03:00
AykutSarac 4cd73ecad9 update maxZoom 2022-09-23 21:30:58 +03:00
AykutSarac dc3185d5cd custom maxZoom per canvas size 2022-09-23 20:46:07 +03:00
AykutSarac 36af69b076 refactor 2022-09-22 21:17:05 +03:00
AykutSarac af51b43771 lint code 2022-09-22 18:47:26 +03:00
Aykut Saraç 0694dc4d0a Merge pull request #191 from AykutSarac/handle-window-freeze
Handle window freeze
2022-09-22 10:05:10 +03:00
AykutSarac ff248f041f hide loading under 500ms 2022-09-22 09:50:25 +03:00
AykutSarac ec14df55a8 handle window freezing 2022-09-21 23:09:13 +03:00
AykutSarac a0b769faa7 update next version & lint 2022-09-21 20:57:57 +03:00
AykutSarac 64d412a075 remove toast 2022-09-19 19:47:41 +03:00
AykutSarac 8465939ff3 refactor code 2022-09-14 19:37:22 +03:00
AykutSarac 9dfde2f181 update error page 2022-09-13 22:58:53 +03:00
AykutSarac a7a202f535 remove extra padding key 2022-09-13 22:34:14 +03:00
AykutSarac 1fab5e681a remove minify 2022-09-13 15:34:22 +03:00
AykutSarac 452bb87c2e fix node highlight 2022-09-13 15:34:04 +03:00
AykutSarac 851aa4a912 fix shrink parent node width 2022-09-13 15:17:13 +03:00
AykutSarac 1ddeb72dca ESLint improvements 2022-09-12 22:28:33 +03:00
AykutSarac 6048bb1482 update .prettierrc 2022-09-12 22:14:28 +03:00
Aykut Saraç 046686ba44 Merge pull request #165 from Hexrt/main
fix: highlight red-dashed border display
2022-09-12 22:12:02 +03:00
AykutSarac cb86128df8 fixed collapsed parents reset state on edit 2022-09-12 22:07:40 +03:00
Aykut Saraç b435634f47 Merge pull request #167 from AykutSarac/prevent-all-expand
Prevent All Nodes from Expanding
2022-09-12 21:59:25 +03:00
AykutSarac cc79aec841 remove render config 2022-09-12 21:54:30 +03:00
AykutSarac be07f7b783 prettier 2022-09-12 21:53:31 +03:00
AykutSarac e1fc30b095 fix object node shrink 2022-09-12 21:39:46 +03:00
AykutSarac 41638eb35b prevent expand btn expanding all 2022-09-12 21:03:25 +03:00
Hexrt 7a084e39f7 fix: highlight red-dashed border display 2022-09-12 20:55:38 +08:00
AykutSarac 263696ed88 update CONTRIBUTING.md 2022-09-12 10:49:09 +03:00
AykutSarac 4fa5d88a81 update COC 2022-09-12 10:47:57 +03:00
AykutSarac 841ff1f1a6 add COC & CONTRIBUTING & TODO 2022-09-12 10:45:32 +03:00
AykutSarac a8bcacbe57 fix object node memoize 2022-09-11 14:04:33 +03:00
AykutSarac c5521a4b27 memoize graph 2022-09-11 13:54:18 +03:00
AykutSarac bf0aa7793f styling 2022-09-11 13:47:23 +03:00
Aykut Saraç d7d90ad742 Merge pull request #157 from AykutSarac/editor-perf
Improve Editor Rerender Performance
2022-09-11 13:24:25 +03:00
AykutSarac 8c98963385 memoize nodes 2022-09-11 13:20:43 +03:00
AykutSarac 1b7e7a6f99 fix widget 2022-09-09 12:37:56 +03:00
AykutSarac 23fd115326 update version 2022-09-09 12:07:04 +03:00
AykutSarac e72ffd7c4c refactor sample data 2022-09-09 12:05:42 +03:00
AykutSarac 12a26130f9 switch monaco to cdn 2022-09-09 12:05:30 +03:00
AykutSarac 7f8bd9d1f7 performance improvements & refactor 2022-09-09 11:58:18 +03:00
AykutSarac 3d3de397c4 add swcMinify 2022-09-08 23:38:20 +03:00
AykutSarac 7172985750 update baseurl env variable 2022-09-08 23:38:15 +03:00
AykutSarac 8ccafa6cdd decrease gap between sections 2022-09-07 18:18:24 +03:00
AykutSarac 98b56deaa5 style search node 2022-09-07 18:09:24 +03:00
Aykut Saraç d353d01189 Update README.md 2022-09-06 10:35:00 +03:00
AykutSarac ad7b079c32 styling fixes 2022-09-04 19:37:12 +03:00
AykutSarac 7b207dcc39 fix manifest 2022-09-04 13:38:43 +03:00
AykutSarac e741357d40 remove serviceworker remover 2022-09-04 13:15:44 +03:00
AykutSarac 5759ea7643 improve a11y 2022-09-04 13:01:09 +03:00
AykutSarac c37c8d7af8 update packages 2022-09-04 13:01:01 +03:00
AykutSarac 62590b4980 remove unused var 2022-09-04 12:12:42 +03:00
AykutSarac 949efa84af fix styling 2022-09-04 12:12:22 +03:00
AykutSarac 944ba76485 a11y 2022-09-04 12:12:12 +03:00
AykutSarac a97b8b6277 Merge branch 'main' of https://github.com/AykutSarac/jsonvisio.com 2022-09-04 11:32:28 +03:00
AykutSarac 79add7d60f remove lazy loading 2022-09-04 11:32:26 +03:00
Aykut Saraç 16ee461a30 Merge pull request #136 from yuvalg99/bug/share_link
Bug/share link
2022-09-03 23:30:01 +03:00
Aykut Saraç 0e4908bd96 Merge branch 'main' into bug/share_link 2022-09-03 23:29:47 +03:00
Aykut Saraç 75dbc41415 Merge pull request #108 from mbrukman/patch-1
Update Docker section formatting in README
2022-09-03 23:25:57 +03:00
Aykut Saraç badd705a83 Merge pull request #109 from mbrukman/patch-2
Link Travis CI badge to project build status
2022-09-03 23:25:29 +03:00
Aykut Saraç f60c2eb10d Update bug_report.yml 2022-09-03 23:23:18 +03:00
Aykut Saraç bcdca87f39 Update bug_report.yml 2022-09-03 23:21:47 +03:00
Aykut Saraç 47d4ecfaab Update bug_report.yml 2022-09-03 23:20:56 +03:00
Aykut Saraç bfc3034304 Update bug_report.yml 2022-09-03 23:20:36 +03:00
Aykut Saraç 581f3f1d87 Update and rename bug_report.md to bug_report.yml 2022-09-03 23:20:12 +03:00
Aykut Saraç 1adbcae2ab Update feature_request.yml 2022-09-03 23:13:12 +03:00
Aykut Saraç e1c4de9a6d Update feature_request.yml 2022-09-03 23:12:36 +03:00
Aykut Saraç 4c85b37d72 Rename feature_request.md to feature_request.yml 2022-09-03 23:11:26 +03:00
Aykut Saraç cdddd413a5 Update feature_request.md 2022-09-03 23:10:55 +03:00
Aykut Saraç d3a390a6b6 Update feature_request.md 2022-09-03 23:09:24 +03:00
Aykut Saraç 93c0db4ddf Update issue templates 2022-09-03 23:01:09 +03:00
AykutSarac 920c8ff440 disable node click while dragging 2022-09-03 19:39:42 +03:00
AykutSarac 897ceabfe0 improve types 2022-09-03 19:39:28 +03:00
AykutSarac 1f477e99d9 reduce nodes element count for performance 2022-09-03 18:32:29 +03:00
yuvalg99 69d8cc541f Updated README.md's docker section to work with NEXT_PUBLIC_JSONCRACK_HOST. 2022-09-02 15:05:32 +03:00
yuvalg99 4d03de70c3 Updated Dockerfile to work with NEXT_PUBLIC_JSONCRACK_HOST. 2022-09-02 15:04:07 +03:00
yuvalg99 cf9d3ddeae Added NEXT_PUBLIC_JSONCRACK_HOST env var to identify running host. 2022-09-02 15:02:26 +03:00
AykutSarac 29a217633b disable perfMode temp 2022-09-02 11:34:25 +03:00
Misha Brukman 80f6c40fd8 Link Travis CI badge to build status [skip ci]
Right now, clicking on the Travis CI badge just opens the image itself.

With this change, it links to the current build status dashboard, which
is much more useful.
2022-09-01 21:48:11 -04:00
Misha Brukman 2c68e93cb5 Update Docker section formatting [skip ci]
* convert code block into Markdown for readability
* add link to the Dockerfile for easy reference
2022-09-01 21:45:51 -04:00
AykutSarac 45f08ec3ec fix download modal z-index 2022-09-02 00:28:38 +03:00
AykutSarac 393cd7ec59 fix search input blur 2022-09-02 00:20:17 +03:00
AykutSarac 5b02ff7797 fix z-index problems 2022-09-02 00:14:10 +03:00
AykutSarac 5b9879d0ec fix loading screen 2022-09-01 23:52:45 +03:00
Aykut Saraç 9005763c71 Merge pull request #133 from AykutSarac/design-improvements
General UI/UX Improvements
2022-09-01 21:15:24 +03:00
AykutSarac 4f74321303 new design implementations 2022-09-01 21:04:00 +03:00
Aykut Saraç 5ca31703a6 Merge pull request #132 from AykutSarac/enable-perfmode-default
Enable Performance Mode by default
2022-09-01 12:47:16 +03:00
AykutSarac 74125565f9 enable perfmode by default 2022-09-01 12:33:35 +03:00
AykutSarac a94d951c35 improve json parser 2022-08-31 20:48:40 +03:00
AykutSarac 633f5bb8f1 mobile improvements 2022-08-30 16:37:45 +03:00
AykutSarac 16fcd3d61d improve mobile experience 2022-08-30 16:25:42 +03:00
Aykut Saraç aab0265338 Merge pull request #115 from AykutSarac/mobile-support
Add mobile support for JSON Crack
2022-08-30 16:03:53 +03:00
AykutSarac ef1b9fb6f6 update version 2022-08-30 15:48:38 +03:00
AykutSarac b7e365dc24 update producthunt links 2022-08-30 15:46:14 +03:00
AykutSarac 50f803d018 add mobile support 2022-08-30 15:39:06 +03:00
AykutSarac aa75f74496 fix incompatible device warning 2022-08-30 14:16:43 +03:00
Aykut Saraç 96e6ce7e0c Update README.md 2022-08-30 13:49:21 +03:00
AykutSarac 4b1e5b923e complete migration 2022-08-30 12:06:15 +03:00
Aykut Saraç 1a365471c8 Merge pull request #113 from AykutSarac/jsoncrack-migration
jsoncrack.com Migration
2022-08-30 11:17:24 +03:00
AykutSarac 22e42e3f1a jsoncrack migration 2022-08-30 11:16:52 +03:00
Aykut Saraç acf953916e Merge pull request #107 from victorbrambati/main
fix hide wrong collapsed nodes
2022-08-30 09:33:51 +03:00
victorbrambati bb8731e7ec fix hide wrong collapsed nodes 2022-08-29 17:26:59 -03:00
AykutSarac c7475bb955 increase canvas padding 2022-08-28 15:41:45 +03:00
185 changed files with 12751 additions and 9167 deletions

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
# Ignore node modules as they will be installed in the Dockerfile
node_modules/
# Ignore local configuration and cache files
.cache/
.config/
.DS_Store
# Ignore logs
*.log
# Ignore test and development files
*.md
*.test.js
+5
View File
@@ -0,0 +1,5 @@
NEXT_PUBLIC_BASE_URL=http://localhost:3000
NEXT_PUBLIC_PAYMENT_URL=https://herowand.lemonsqueezy.com/checkout/buy/ce30521f-c7cc-44f3-9435-995d3260ba22
NEXT_PUBLIC_GA_ID=G-JKZEHMJBMH
NEXT_PUBLIC_SUPABASE_URL=https://bxkgqurwqjmvrqekcbws.supabase.co
NEXT_PUBLIC_SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ4a2dxdXJ3cWptdnJxZWtjYndzIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTA2NDU0MjUsImV4cCI6MjAwNjIyMTQyNX0.3nZ0yhuFjnI3yHbAL8S9UtK-Ny-6F5AylNHgo1tymTU
+5
View File
@@ -0,0 +1,5 @@
NEXT_PUBLIC_BASE_URL=https://jsoncrack.com
NEXT_PUBLIC_PAYMENT_URL=https://herowand.lemonsqueezy.com/checkout/buy/ce30521f-c7cc-44f3-9435-995d3260ba22
NEXT_PUBLIC_GA_ID=G-JKZEHMJBMH
NEXT_PUBLIC_SUPABASE_URL=https://bxkgqurwqjmvrqekcbws.supabase.co
NEXT_PUBLIC_SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJ4a2dxdXJ3cWptdnJxZWtjYndzIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTA2NDU0MjUsImV4cCI6MjAwNjIyMTQyNX0.3nZ0yhuFjnI3yHbAL8S9UtK-Ny-6F5AylNHgo1tymTU
+23 -13
View File
@@ -1,17 +1,27 @@
{
"rules": {
"@next/next/no-img-element": "off"
"@next/next/no-img-element": "off",
"unused-imports/no-unused-imports": "error",
"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"],
"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"],
"plugins": ["prettier", "unused-imports"],
"ignorePatterns": ["src/enums"]
}
+48
View File
@@ -0,0 +1,48 @@
name: Bug report
description: Create a report to help us improve
title: "[BUG]: <Context of the issue>"
labels: bug
assignees: AykutSarac
body:
- type: textarea
id: description
attributes:
label: Issue description
description: |
Describe the issue in as much detail as possible.
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files into it.
placeholder: |
Steps to reproduce with below code sample:
1. do thing
2. click...
3. observe behavior
4. see error logs below
validations:
required: true
- type: textarea
id: media
attributes:
label: Media & Screenshots
description: Include screenshots or video of reproduction as much as possible
- type: textarea
id: os
attributes:
label: Operating system
description: Which OS does your application run on?
value: |
- OS: [e.g. iOS]:
- Browser [e.g. chrome, safari]:
- Any other details...
- type: dropdown
id: priority
attributes:
label: Priority this issue should have
description: Please be realistic. If you need to elaborate on your reasoning, please use the Issue description field above.
options:
- Low (slightly annoying)
- Medium (should be fixed soon)
- High (immediate attention needed)
validations:
required: true
@@ -0,0 +1,22 @@
name: Feature request
description: Request a new feature
labels: [feature]
body:
- type: textarea
id: description
attributes:
label: Feature
description: A clear and concise description of what the problem is, or what feature you want to be implemented.
placeholder: I'm always frustrated when..., Discord has recently released..., A good addition would be...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternative solutions or implementations
description: A clear and concise description of any alternative solutions or features you have considered.
- type: textarea
id: additional-context
attributes:
label: Other context
description: Any other context, screenshots, or file uploads that help us understand your feature request.
+118
View File
@@ -0,0 +1,118 @@
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@v3
with:
fetch-depth: 0
- name: Detect package manager
id: detect-package-manager
run: |
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install --frozen-lockfile" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
~/.npm
~/.cache/yarn
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node-
- name: Setup Pages
uses: actions/configure-pages@v3
with:
static_site_generator: next
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: build-files
path: ./out/_next/static/chunks
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
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@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
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@v1
+24
View File
@@ -0,0 +1,24 @@
name: Verify Pull Request
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn lint
- run: yarn build
+5 -1
View File
@@ -39,4 +39,8 @@ yarn-error.log*
# PWA workers
**/public/workbox-*.js
**/public/sw.js
**/public/fallback-*.js
**/public/fallback-*.js
# Sentry Auth Token
.sentryclirc
/src/migration
+3 -1
View File
@@ -2,4 +2,6 @@
.next
node_modules/
out
public
public
*-lock.json
tsconfig.json
+12 -4
View File
@@ -2,8 +2,16 @@
"trailingComma": "es5",
"singleQuote": false,
"semi": true,
"printWidth": 80,
"importOrder": ["^[~]", "^[./]"],
"importOrderSortSpecifiers": true,
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"]
"printWidth": 100,
"arrowParens": "avoid",
"importOrder": [
"^(react/(.*)$)|^(react$)",
"^(next/(.*)$)|^(next$)",
"styled",
"<THIRD_PARTY_MODULES>",
"^src/(.*)$",
"^[./]"
],
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
-22
View File
@@ -1,22 +0,0 @@
language: node_js
node_js:
- "14"
branches:
only:
- main
cache:
directories:
- node_modules
script:
- npm run test
- 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
+133
View File
@@ -0,0 +1,133 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
opensource@github.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
+62
View File
@@ -0,0 +1,62 @@
# 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).
Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community approachable and respectable.
In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
## Getting Started
JSON Crack is built with React, Reaflow for visualization, Mantine UI for components, Zustand for state management, and Supabase for backend integration. 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:
* [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)
Once you are familiar with these technologies, you can clone the JSON Crack repository by running the following command:
```bash
git clone https://github.com/AykutSarac/jsoncrack.com.git
```
After cloning the repository, you can install the required dependencies by running the following command:
```bash
yarn install
```
To run the development server, you can run the following command:
```bash
yarn dev
```
## Contributing Guidelines
Before submitting a pull request, please make sure to follow these guidelines:
### 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.
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.
### 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.
### 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.
### 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.
### 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.
## 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).
+10 -5
View File
@@ -1,11 +1,16 @@
# Builder
FROM node:14-buster as builder
FROM node:18-alpine as builder
WORKDIR /src
COPY . /src
RUN yarn install --legacy-peer-deps
RUN yarn run build
# Cache dependencies first
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Copy other files and build
COPY . /src/
RUN yarn build
# App
FROM nginxinc/nginx-unprivileged
COPY --from=builder /src/out /app
COPY --chown=nginx:nginx --from=builder /src/out /app
COPY default.conf /etc/nginx/conf.d/default.conf
+670 -17
View File
@@ -1,21 +1,674 @@
MIT License
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (c) 2022 Aykut Saraç
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.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Preamble
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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.
JSON Crack
Copyright (C) 2023 Aykut Saraç
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:
JSON Crack Copyright (C) 2023 Aykut Saraç
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>.
+76 -53
View File
@@ -1,69 +1,92 @@
<center>
<a href="https://jsonvisio.com">
<img width="1080" alt="jsonvisio" src="https://user-images.githubusercontent.com/47941171/182015412-f048058e-6e31-4cf6-bcfc-ab9ba3f6e005.png">
</a>
</center>
<a href="https://jsoncrack.com/" target="_blank" rel="noopener">
<img alt="JSON Crack" w src="https://user-images.githubusercontent.com/47941171/236689277-0fa9e50a-3106-4854-a2d4-bb5722f16d48.png" />
</a>
<p>
<p align="center">
<img alt="travis ci badge" src="https://img.shields.io/travis/com/AykutSarac/jsonvisio.com/main?style=flat-square" />
<a href="https://github.com/AykutSarac/jsonvisio.com/blob/main/LICENSE">
<img alt="license badge" src="https://img.shields.io/github/license/AykutSarac/jsonvisio.com?style=flat-square" />
</a>
<a href="https://github.com/AykutSarac/jsonvisio.com/releases">
<img alt="version badge" src="https://img.shields.io/github/package-json/v/AykutSarac/jsonvisio.com?color=brightgreen&style=flat-square" />
</a>
<a href="https://github.com/sponsors/AykutSarac">
<img alt="github sponsors" src="https://img.shields.io/github/sponsors/AykutSarac?style=flat-square" />
</a>
</p>
<p align="center">
<i>Simple json visualization tool for your data.</i>
<p align="center">
<a href="https://www.producthunt.com/posts/json-visio?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-json&#0045;visio" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=332281&theme=light" alt="JSON&#0032;Visio - Simple&#0032;visualization&#0032;tool&#0032;for&#0032;your&#0032;JSON&#0032;data&#0046; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
</p>
<h4 align="center">
<a href="https://jsoncrack.com">JSON Crack</a> |
<a href="https://marketplace.visualstudio.com/items?itemName=AykutSarac.jsoncrack-vscode">VS Code Extension</a> |
<a href="https://jsoncrack.com/docs">Documentation</a>
</h4>
<div align="center">
<h2>
An innovative, open source data visualization app.
<br />
Brings data to life through captivating graphs.
</h2>
</div>
<br />
<p align="center">
<a href="https://www.producthunt.com/posts/json-crack?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-json&#0045;crack" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=332281&theme=light" alt="JSON&#0032;Crack - Simple&#0032;visualization&#0032;tool&#0032;for&#0032;your&#0032;JSON&#0032;data&#0046; | 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>
<p align="center">
<img width="800" src="/public/jsonvisio-screenshot.webp" alt="preview 1" />
</p>
<p align="center">
<img src="./public/assets/jsoncrack-screenshot.webp" alt="Product Preview" />
</p>
# JSON Visio (jsonvisio.com)
# JSON Crack (jsoncrack.com)
JSON Visio is a tool that generates graph diagrams from JSON objects. These diagrams are much easier to navigate than the textual format and to make it even more convenient, the tool also allows you to search the nodes. Additionally, the generated diagrams can also be downloaded or clipboard as image.
JSON Crack is a free, open-source data visualization app capable of visualizing data formats such as JSON, YAML, XML, CSV and more, into interactive graphs. With its intuitive and user-friendly interface, JSON Crack makes it easy to explore, analyze, and understand even the most complex data 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.
You can use the web version at [jsonvisio.com](https://jsonvisio.com) or also run it locally as [Docker container](https://github.com/AykutSarac/jsonvisio.com#-docker).
## Features
- 💯 Free & open-source.
- 🌓 Dark mode.
- 🖼️ Export to PNG, SVG, JPEG & clipboard.
- 🔍 Zoom and panning support with touch gestures.
- 🛠 Wide range of tools - search, json path, node contents, expand/toggle, auto format...
- 🔗 Share/Import/Fetch
- 🧱 Embeddable iframe widgets.
> <b><a href="https://jsonvisio.com">JSON Visio - Directly onto graphs</a></b>
## Contributing
## ⚡️ Features
- Missing something or found a bug? [Report here](https://github.com/AykutSarac/jsoncrack.com/issues).
- Want to contribute? Check out our [contribution guide](https://github.com/AykutSarac/jsoncrack.com/blob/main/CONTRIBUTING.md) or let us know on [Discord](https://discord.gg/yVyTtCRueq).
- Search Nodes
- Share links & Create Embed Widgets
- Download/Clipboard as image
- Upload JSON locally or fetch from URL
- Great UI/UX
- Light/Dark Mode
- Advanced Error Messages
## Sponsors & support
## 🛠 Development Setup
If you like the project, you can become a sponsor at [GitHub Sponsors](https://github.com/sponsors/AykutSarac) or use [Premium](https://jsoncrack.com/pricing).
## Running Locally
### Local
After cloning the repository, run the following commands:
```console
# Install the packages
yarn install
# Start development server
# Then the development server will run at http://localhost:3000
yarn dev
```
### Docker
🐳 A [`Dockerfile`](Dockerfile) is provided in the root of the repository.
If you want to run JSON Crack locally:
```console
npm install --legacy-peer-deps
npm run dev
# Build a Docker image with:
docker build -t jsoncrack .
# Run locally with `docker run`
docker run -p 8888:8080 jsoncrack
# Run locally with `docker-compose`
docker-compose up -d
# Go to http://localhost:8888
```
## 🐳 Docker
## Thank you for supporting JSON Crack
```
A Docker file is provided in the root of the repository.
If you want to run JSON Visio locally:
Last but not least, we're thankful to these companies for offering their services for free:
* Build Docker image with `docker build -t jsonvisio .`
* Run locally with `docker run -p 8888:8080 jsonvisio`
* Go to [http://localhost:8888]
```
## License
This project is open source and available under the [MIT License](LICENSE).
<a href="https://sentry.io">
<img height="30" src="https://user-images.githubusercontent.com/47941171/236691121-717c7975-809f-4508-b58e-5ada2f7e8c7c.png" alt="Sentry" />
</a>
+29
View File
@@ -6,4 +6,33 @@ server {
location /editor {
try_files $uri /editor.html;
}
location /widget {
try_files $uri /widget.html;
}
location /embed {
try_files $uri /embed.html;
}
location /docs {
try_files $uri /docs.html;
}
location /oss {
try_files $uri /oss.html;
}
location /pricing {
try_files $uri /pricing.html;
}
location /forgot-password {
try_files $uri /forgot-password.html;
}
location /sign-in {
try_files $uri /sign-in.html;
}
}
+10
View File
@@ -0,0 +1,10 @@
version: '3.9'
services:
jsoncrack:
image: jsoncrack
container_name: jsoncrack
build:
context: .
dockerfile: Dockerfile
ports:
- "8888:8080"
-17
View File
@@ -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);
-6
View File
@@ -1,6 +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";
+34 -20
View File
@@ -1,26 +1,40 @@
// const withPWA = require("next-pwa");
// const pwaConfig = {
// pwa: {
// disable: true, // disable temp until issue #61 solved
// dest: "public",
// fallbacks: {
// document: "/editor",
// },
// },
// };
const { withSentryConfig } = require("@sentry/nextjs");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
reactStrictMode: true,
exportPathMap: async () => ({
"/": { page: "/" },
"/editor": { page: "/Editor" },
"/widget": { page: "/Widget" },
}),
//...pwaConfig,
const config = {
output: "export",
reactStrictMode: false,
productionBrowserSourceMaps: true,
compiler: {
styledComponents: true,
},
webpack: config => {
config.resolve.fallback = { fs: false };
return config;
},
};
module.exports = nextConfig;
const bundleAnalyzerConfig = withBundleAnalyzer(config);
const sentryConfig = withSentryConfig(
config,
{
silent: true,
org: "aykut-sarac",
project: "json-crack",
},
{
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
disableServerWebpackPlugin: true,
}
);
module.exports = process.env.ANALYZE === "true" ? bundleAnalyzerConfig : sentryConfig;
+64 -47
View File
@@ -1,63 +1,80 @@
{
"name": "json-visio",
"name": "json-crack",
"private": true,
"version": "v2.0.0",
"version": "v3.2.0",
"license": "GPL-3.0",
"author": "https://github.com/AykutSarac",
"homepage": "https://jsonvisio.com",
"homepage": "https://jsoncrack.com",
"scripts": {
"dev": "next dev",
"build": "next build && next export",
"test": "jest",
"build": "next build",
"start": "next start",
"lint": "next lint",
"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.5",
"@sentry/nextjs": "^7.9.0",
"allotment": "^1.15.0",
"compress-json": "^2.0.1",
"html-to-image": "^1.10.0",
"next": "^12.2.5",
"next-transpile-modules": "^9.0.0",
"parse-json": "^6.0.2",
"@emotion/react": "^11.11.1",
"@emotion/server": "^11.11.0",
"@mantine/core": "^6.0.17",
"@mantine/hooks": "^6.0.17",
"@mantine/next": "^6.0.21",
"@mantine/prism": "^6.0.21",
"@monaco-editor/react": "^4.5.2",
"@sentry/nextjs": "^7.72.0",
"@supabase/auth-helpers-nextjs": "^0.8.1",
"@supabase/auth-helpers-react": "^0.4.2",
"@supabase/supabase-js": "^2.36.0",
"@tanstack/react-query": "^4.35.3",
"allotment": "^1.19.3",
"axios": "^1.5.0",
"dayjs": "^1.11.10",
"gofmt.js": "^0.0.2",
"html-to-image": "^1.11.11",
"jq-in-the-browser": "^0.7.2",
"jq-web": "^0.5.1",
"json-2-csv": "^5.0.1",
"json-to-ts": "^1.7.0",
"jsonc-parser": "^3.2.0",
"jsonwebtoken": "^9.0.2",
"jxon": "^2.0.0-beta.5",
"lodash.debounce": "^4.0.8",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"maketypes": "^1.1.2",
"next": "13.4.12",
"react": "^18.2.0",
"react-color": "^2.19.3",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.3.0",
"react-icons": "^4.4.0",
"react-ga4": "^2.1.0",
"react-hot-toast": "^2.4.1",
"react-icons": "^4.12.0",
"react-json-tree": "^0.18.0",
"react-linkify-it": "^1.0.7",
"react-render-if-visible": "^2.1.0",
"react-twitter-embed": "^4.0.4",
"react-zoom-pan-pinch": "^2.1.3",
"reaflow": "^5.0.6",
"styled-components": "^5.3.5",
"zustand": "^4.0.0"
"react-simple-typewriter": "^5.0.1",
"react-zoomable-ui": "^0.11.0",
"reaflow": "5.2.8",
"styled-components": "^6.1.1",
"toml": "^3.0.0",
"use-long-press": "^3.1.5",
"zustand": "^4.4.7"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.4.2",
"@types/enzyme": "^3.10.12",
"@types/jest": "^28.1.6",
"@types/node": "^18.6.5",
"@types/parse-json": "^4.0.0",
"@types/react": "18.0.17",
"@types/react-color": "^3.0.6",
"@types/react-splitter-layout": "^3.0.2",
"@types/styled-components": "^5.1.25",
"babel-jest": "^28.1.3",
"enzyme": "^3.11.0",
"eslint": "8.21.0",
"eslint-config-next": "12.2.4",
"eslint-plugin-testing-library": "^5.6.0",
"gh-pages": "^4.0.0",
"jest": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"next-compose-plugins": "^2.2.1",
"next-pwa": "5.5.3",
"prettier": "^2.7.1",
"@next/bundle-analyzer": "^13.4.12",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jsonwebtoken": "^9.0.5",
"@types/jxon": "^2.0.5",
"@types/lodash.debounce": "^4.0.9",
"@types/lodash.get": "^4.4.9",
"@types/lodash.set": "^4.3.9",
"@types/node": "^20.4.7",
"@types/react": "18.2.18",
"eslint": "8.56.0",
"eslint-config-next": "13.4.12",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"prettier": "^3.1.1",
"ts-node": "^10.9.1",
"typescript": "4.7.4"
"typescript": "5.1.6"
}
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="982.48732" height="763.01413" viewBox="0 0 982.48732 763.01413" xmlns:xlink="http://www.w3.org/1999/xlink"><circle cx="559.4329" cy="333.06116" r="40.02979" fill="#e6e6e6"/><path d="M766.295,452.99465l-41.832-41.832a44.307,44.307,0,0,0-14.42627-61.92578,44.45758,44.45758,0,0,0-58.91358,12.23779,44.30652,44.30652,0,0,0,60.03321,62.99512l41.832,41.832A9.40939,9.40939,0,0,0,766.295,452.99465ZM709.59431,409.6011a31.68421,31.68421,0,1,1,9.27978-22.40381A31.58568,31.58568,0,0,1,709.59431,409.6011Z" transform="translate(-108.75634 -68.49293)" fill="#3f3d56"/><path d="M1069.529,514.69884C1176.50914,633.00725,866.39184,803.50707,615.8095,803.50707S191.86334,671.39983,162.09,514.69884C89.89987,134.75174,777.16735-106.74054,615.8095,225.89055,380.61181,710.73882,985.27984,421.5284,1069.529,514.69884Z" transform="translate(-108.75634 -68.49293)" fill="#e6e6e6"/><path d="M1021.529,542.69884C1128.50914,661.00725,818.39184,831.50707,567.8095,831.50707S143.86334,699.39983,114.09,542.69884C41.89987,162.75174,729.16735-78.74054,567.8095,253.89055,332.61181,738.73882,937.27984,449.5284,1021.529,542.69884Z" transform="translate(-108.75634 -68.49293)" fill="#3f3d56"/><path d="M258.35026,265.31823c-75.06741-3.30525-133.27133-19.49788-132.50668-36.86436.45844-10.41178,21.70324-18.7842,58.28677-22.96955a1,1,0,1,1,.22727,1.987c-34.46168,3.943-56.11733,12.01678-56.516,21.07051-.69148,15.70451,59.11433,31.63093,130.59659,34.77832s132.4564-7.461,133.14787-23.16554c.40032-9.09178-20.59681-19.06558-54.79775-26.0284a1.00008,1.00008,0,1,1,.3991-1.95993c36.3011,7.39058,56.85694,17.624,56.39672,28.0763C392.81953,257.60908,333.41767,268.62348,258.35026,265.31823Z" transform="translate(-108.75634 -68.49293)" fill="#7289da"/><path d="M191.67927,268.22672a76.98277,76.98277,0,0,0,133.03578,5.52178A1211.97551,1211.97551,0,0,1,191.67927,268.22672Z" transform="translate(-108.75634 -68.49293)" fill="#7289da"/><path d="M333.019,252.71347a76.997,76.997,0,1,0-147.74945-5.70562A572.23325,572.23325,0,0,0,333.019,252.71347Z" transform="translate(-108.75634 -68.49293)" fill="#7289da"/><circle cx="168.83353" cy="123.60073" r="9" fill="#fff"/><circle cx="122.51347" cy="152.59128" r="15" fill="#fff"/><circle cx="348.90479" cy="142.89813" r="9.99975" fill="#7289da"/><circle cx="122.90479" cy="452.89813" r="6.00007" fill="#e6e6e6"/><circle cx="542.90479" cy="658.89813" r="6.00007" fill="#e6e6e6"/><circle cx="151.90479" cy="339.89813" r="3.00007" fill="#e6e6e6"/><circle cx="399.90479" cy="563.89813" r="3.00007" fill="#e6e6e6"/><circle cx="850.90479" cy="534.89813" r="3.00007" fill="#e6e6e6"/><circle cx="709.90479" cy="623.89813" r="3.00007" fill="#e6e6e6"/><circle cx="562.90479" cy="515.89813" r="3.00007" fill="#e6e6e6"/><circle cx="372.90479" cy="219.89813" r="3.00007" fill="#e6e6e6"/><circle cx="396.90479" cy="71.89813" r="3.00007" fill="#e6e6e6"/><circle cx="382.90479" cy="694.89813" r="3.00007" fill="#e6e6e6"/><circle cx="234.90479" cy="631.89813" r="3.00007" fill="#e6e6e6"/><circle cx="703.90479" cy="523.89813" r="3.00007" fill="#e6e6e6"/><circle cx="148.3737" cy="224.7987" r="9" fill="#fff"/><path d="M460.6612,431.39114c0,26.88035-41.55939,89.516-53.70465,107.24669a3.99188,3.99188,0,0,1-6.5907,0c-12.14526-17.73066-53.70465-80.36634-53.70465-107.24669a57,57,0,1,1,114,0Z" transform="translate(-108.75634 -68.49293)" fill="#fff"/><circle cx="294.90486" cy="358.8982" r="29" fill="#7289da"/><ellipse cx="294.40486" cy="496.3982" rx="33.5" ry="6.5" fill="#fff"/><path d="M925.60957,386.41245a10.52681,10.52681,0,0,0-.64106,1.52851l-47.783,13.27682-8.61085-8.42662L854.1589,404.12429,867.953,420.52338a8,8,0,0,0,9.35283,2.169l51.61632-22.78484a10.49709,10.49709,0,1,0-3.31256-13.49509Z" transform="translate(-108.75634 -68.49293)" fill="#ffb8b8"/><path d="M875.50191,401.996l-17.9352,13.95958a4.5,4.5,0,0,1-6.68163-1.33719L839.73843,394.891a12.49741,12.49741,0,0,1,19.76923-15.29426l16.33819,15.59379a4.5,4.5,0,0,1-.34394,6.80543Z" transform="translate(-108.75634 -68.49293)" fill="#7289da"/><path d="M930.19158,379.80967l18.18807,8.1829a3.14913,3.14913,0,0,1,1.57976,4.16384l-2.15339,4.78633a1.05293,1.05293,0,0,1,.52659,1.38795l-.86136,1.91453a1.05292,1.05292,0,0,1-1.388.52659l-.86136,1.91453a1.05292,1.05292,0,0,1,.52659,1.388l-.86136,1.91453a1.0529,1.0529,0,0,1-1.38794.52659L931.8709,432.36162a3.14914,3.14914,0,0,1-4.16384,1.57977l-18.18807-8.1829a3.14915,3.14915,0,0,1-1.57977-4.16384l18.08852-40.20522A3.14913,3.14913,0,0,1,930.19158,379.80967Z" transform="translate(-108.75634 -68.49293)" fill="#3f3d56"/><path d="M912.82137,423.21181l14.59056,6.57106a3.03424,3.03424,0,0,0,3.99937-1.51155l6.73892-14.98951,2.34078-5.196,6.09875-13.562a3.026,3.026,0,0,0-1.51149-3.98886l-4.58726-2.06786L930.47694,383.964a3.02112,3.02112,0,0,0-3.98861,1.522L920.589,398.59669l-6.7179,14.92653-2.56118,5.69979A3.022,3.022,0,0,0,912.82137,423.21181Z" transform="translate(-108.75634 -68.49293)" fill="#f2f2f2"/><polygon points="773.577 Line truncated

Before

Width:  |  Height:  |  Size: 7.8 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

+1 -1
View File
@@ -1 +1 @@
jsonvisio.com
jsoncrack.com
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+1
View File
@@ -0,0 +1 @@
<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

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+229
View File
@@ -0,0 +1,229 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg id="ab01b6ca-fda4-4c55-a447-43113c79b51e" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="865.76" height="682.89" viewBox="0 0 865.76 682.89">
<defs>
<style xmlns="http://www.w3.org/1999/xhtml">*, ::after, ::before { box-sizing: border-box; }
img, svg { vertical-align: middle; }
</style>
<style xmlns="http://www.w3.org/1999/xhtml">*, body, html { -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
</style>
</defs>
<g id="aacbc6a0-2124-4f6c-b34d-11346ed3b501" data-name="freepik--background-simple--inject-2">
<path d="M732.32,286.81s19.57-46.27,1.78-119.22S634.47,91.07,565,82.18,490.32,28.8,415.6,23.46s-138.76,40.93-151.24,89,1.78,72.95-51.58,110.32-105,69.39-83.65,138.79,74.73,69.39,83.63,115.65,71.17,103.15,144.13,126.34,122.77-41,190.38-37.37S679,564.37,711,512.78s-14.24-101.43-5.34-137S725.29,320.6,732.32,286.81Z" fill="#014D4E" data-primary="true"/>
<path d="M732.32,286.81s19.57-46.27,1.78-119.22S634.47,91.07,565,82.18,490.32,28.8,415.6,23.46s-138.76,40.93-151.24,89,1.78,72.95-51.58,110.32-105,69.39-83.65,138.79,74.73,69.39,83.63,115.65,71.17,103.15,144.13,126.34,122.77-41,190.38-37.37S679,564.37,711,512.78s-14.24-101.43-5.34-137S725.29,320.6,732.32,286.81Z" fill="#fff" opacity="0.7" style="isolation:isolate"/>
</g>
<g id="a4889a5a-1504-4c3e-a144-1f84ee95c415" data-name="freepik--Mountains--inject-2">
<path d="M711,512.78c14.33-23.14,13-45.85,7.89-67.2-2.62-.2-5.53-.34-8.85-.34-21.25,0-26.25,36.26-38.68,37.51S640.07,464,618.82,464s-48.71,86.25-58.74,92.51-17.51-5-38.76-13.75-48.71,18.75-73.75,27.49-52.5-6.24-61.25-22.49S357.56,484,340.07,485.24s-35,13.75-45,2.51S251.31,385.24,238.82,384c-8.16-.82-45.56,21.78-70.59,37.58,19.78,17.77,39.44,29.23,44.53,55.62,8.89,46.26,71.17,103.15,144.13,126.34s122.77-41,190.38-37.37S679,564.37,711,512.78Z" fill="#014D4E" data-primary="true"/>
<path d="M711,512.78c14.33-23.14,13-45.85,7.89-67.2-2.62-.2-5.53-.34-8.85-.34-21.25,0-26.25,36.26-38.68,37.51S640.07,464,618.82,464s-48.71,86.25-58.74,92.51-17.51-5-38.76-13.75-48.71,18.75-73.75,27.49-52.5-6.24-61.25-22.49S357.56,484,340.07,485.24s-35,13.75-45,2.51S251.31,385.24,238.82,384c-8.16-.82-45.56,21.78-70.59,37.58,19.78,17.77,39.44,29.23,44.53,55.62,8.89,46.26,71.17,103.15,144.13,126.34s122.77-41,190.38-37.37S679,564.37,711,512.78Z" fill="#fff" opacity="0.5" style="isolation:isolate"/>
</g>
<g id="b373a570-594e-4f19-bd18-202c80330dc7" data-name="freepik--Stars--inject-2">
<path d="M661.74,264.26a6.53,6.53,0,1,0,6.52,6.54h0A6.52,6.52,0,0,0,661.74,264.26Z" fill="#014D4E" data-primary="true"/>
<path d="M606.89,271.38a3.27,3.27,0,1,0,3.25,3.28v0A3.26,3.26,0,0,0,606.89,271.38Z" fill="#014D4E" data-primary="true"/>
<path d="M673.91,211.17a3.27,3.27,0,1,0,3.25,3.28h0A3.27,3.27,0,0,0,673.91,211.17Z" fill="#014D4E" data-primary="true"/>
<path d="M713.35,266.05a3.27,3.27,0,1,0,3.25,3.28v0A3.26,3.26,0,0,0,713.35,266.05Z" fill="#014D4E" data-primary="true"/>
<path d="M614.32,344.57a6.52,6.52,0,1,0,9,2.25,6.52,6.52,0,0,0-9-2.25Z" fill="#014D4E" data-primary="true"/>
<path d="M584.51,302.29a3.25,3.25,0,1,0,4.47,1.12A3.26,3.26,0,0,0,584.51,302.29Z" fill="#014D4E" data-primary="true"/>
<path d="M670.58,328.86a3.25,3.25,0,1,0,4.47,1.12,3.25,3.25,0,0,0-4.47-1.12Z" fill="#014D4E" data-primary="true"/>
<path d="M643.79,390.88a3.27,3.27,0,1,0,4.48,1.13h0A3.27,3.27,0,0,0,643.79,390.88Z" fill="#014D4E" data-primary="true"/>
<path d="M243.6,284.43a6.52,6.52,0,1,0,9,2.25A6.52,6.52,0,0,0,243.6,284.43Z" fill="#014D4E" data-primary="true"/>
<path d="M213.8,242.13a3.27,3.27,0,1,0,4.48,1.15h0A3.28,3.28,0,0,0,213.8,242.13Z" fill="#014D4E" data-primary="true"/>
<path d="M299.87,268.7a3.27,3.27,0,1,0,4.47,1.14h0A3.26,3.26,0,0,0,299.87,268.7Z" fill="#014D4E" data-primary="true"/>
<path d="M273.06,330.73a3.25,3.25,0,1,0,4.48,1.12,3.25,3.25,0,0,0-4.48-1.12Z" fill="#014D4E" data-primary="true"/>
<path d="M182.8,344.37a6.52,6.52,0,1,0,8.95,2.25,6.53,6.53,0,0,0-8.95-2.25Z" fill="#014D4E" data-primary="true"/>
<path d="M153,302.09a3.26,3.26,0,1,0,4.47,1.12,3.27,3.27,0,0,0-4.47-1.12Z" fill="#014D4E" data-primary="true"/>
<path d="M239.06,328.66a3.25,3.25,0,1,0,4.48,1.11,3.26,3.26,0,0,0-4.48-1.11Z" fill="#014D4E" data-primary="true"/>
<path d="M212.27,390.62a3.26,3.26,0,1,0,4.48,1.13h0A3.27,3.27,0,0,0,212.27,390.62Z" fill="#014D4E" data-primary="true"/>
<path d="M330.41,52.07a6.52,6.52,0,1,0,8.72,3h0A6.53,6.53,0,0,0,330.41,52.07Z" fill="#014D4E" data-primary="true"/>
<path d="M379.45,27.47A3.25,3.25,0,1,0,383.79,29a.36.36,0,0,0,0-.09A3.26,3.26,0,0,0,379.45,27.47Z" fill="#014D4E" data-primary="true"/>
<path d="M345.61,96.73a3.16,3.16,0,1,0,.11-.06Z" fill="#014D4E" data-primary="true"/>
<path d="M286.11,79a3.27,3.27,0,1,0,4.38,1.46v0A3.27,3.27,0,0,0,286.11,79Z" fill="#014D4E" data-primary="true"/>
<path d="M625.1,135.32a6.52,6.52,0,1,0,2.47,8.89v0A6.53,6.53,0,0,0,625.1,135.32Z" fill="#014D4E" data-primary="true"/>
<path d="M573.83,114.55a3.25,3.25,0,1,0,1.23,4.44,3.25,3.25,0,0,0-1.23-4.44Z" fill="#014D4E" data-primary="true"/>
<path d="M650.07,103.16a3.25,3.25,0,1,0,1.23,4.44,3.25,3.25,0,0,0-1.23-4.44Z" fill="#014D4E" data-primary="true"/>
<path d="M665.94,167.93a3.27,3.27,0,1,0-1.22-4.45h0A3.29,3.29,0,0,0,665.94,167.93Z" fill="#014D4E" data-primary="true"/>
<g opacity="0.3">
<path d="M661.74,264.26a6.53,6.53,0,1,0,6.52,6.54h0A6.52,6.52,0,0,0,661.74,264.26Z" fill="#fff"/>
<path d="M606.89,271.38a3.27,3.27,0,1,0,3.25,3.28v0A3.26,3.26,0,0,0,606.89,271.38Z" fill="#fff"/>
<path d="M673.91,211.17a3.27,3.27,0,1,0,3.25,3.28h0A3.27,3.27,0,0,0,673.91,211.17Z" fill="#fff"/>
<path d="M713.35,266.05a3.27,3.27,0,1,0,3.25,3.28v0A3.26,3.26,0,0,0,713.35,266.05Z" fill="#fff"/>
<path d="M614.32,344.57a6.52,6.52,0,1,0,9,2.25,6.52,6.52,0,0,0-9-2.25Z" fill="#fff"/>
<path d="M584.51,302.29a3.25,3.25,0,1,0,4.47,1.12A3.26,3.26,0,0,0,584.51,302.29Z" fill="#fff"/>
<path d="M670.58,328.86a3.25,3.25,0,1,0,4.47,1.12,3.25,3.25,0,0,0-4.47-1.12Z" fill="#fff"/>
<path d="M643.79,390.88a3.27,3.27,0,1,0,4.48,1.13h0A3.27,3.27,0,0,0,643.79,390.88Z" fill="#fff"/>
<path d="M243.6,284.43a6.52,6.52,0,1,0,9,2.25A6.52,6.52,0,0,0,243.6,284.43Z" fill="#fff"/>
<path d="M213.8,242.13a3.27,3.27,0,1,0,4.48,1.15h0A3.28,3.28,0,0,0,213.8,242.13Z" fill="#fff"/>
<path d="M299.87,268.7a3.27,3.27,0,1,0,4.47,1.14h0A3.26,3.26,0,0,0,299.87,268.7Z" fill="#fff"/>
<path d="M273.06,330.73a3.25,3.25,0,1,0,4.48,1.12,3.25,3.25,0,0,0-4.48-1.12Z" fill="#fff"/>
<path d="M182.8,344.37a6.52,6.52,0,1,0,8.95,2.25,6.53,6.53,0,0,0-8.95-2.25Z" fill="#fff"/>
<path d="M153,302.09a3.26,3.26,0,1,0,4.47,1.12,3.27,3.27,0,0,0-4.47-1.12Z" fill="#fff"/>
<path d="M239.06,328.66a3.25,3.25,0,1,0,4.48,1.11,3.26,3.26,0,0,0-4.48-1.11Z" fill="#fff"/>
<path d="M212.27,390.62a3.26,3.26,0,1,0,4.48,1.13h0A3.27,3.27,0,0,0,212.27,390.62Z" fill="#fff"/>
<path d="M330.41,52.07a6.52,6.52,0,1,0,8.72,3h0A6.53,6.53,0,0,0,330.41,52.07Z" fill="#fff"/>
<path d="M379.45,27.47A3.25,3.25,0,1,0,383.79,29a.36.36,0,0,0,0-.09A3.26,3.26,0,0,0,379.45,27.47Z" fill="#fff"/>
<path d="M345.61,96.73a3.16,3.16,0,1,0,.11-.06Z" fill="#fff"/>
<path d="M286.11,79a3.27,3.27,0,1,0,4.38,1.46v0A3.27,3.27,0,0,0,286.11,79Z" fill="#fff"/>
<path d="M625.1,135.32a6.52,6.52,0,1,0,2.47,8.89v0A6.53,6.53,0,0,0,625.1,135.32Z" fill="#fff"/>
<path d="M573.83,114.55a3.25,3.25,0,1,0,1.23,4.44,3.25,3.25,0,0,0-1.23-4.44Z" fill="#fff"/>
<path d="M650.07,103.16a3.25,3.25,0,1,0,1.23,4.44,3.25,3.25,0,0,0-1.23-4.44Z" fill="#fff"/>
<path d="M665.94,167.93a3.27,3.27,0,1,0-1.22-4.45h0A3.29,3.29,0,0,0,665.94,167.93Z" fill="#fff"/>
</g>
</g>
<ellipse cx="441.92" cy="141.46" rx="82.81" ry="64.64" fill="#2f2e41" data-secondary="true"/>
<path d="M500.35,100.85c12.32,10.79,19.81,25,19.81,40.61,0,33.72-35,61.06-78.21,61.06s-78.21-27.34-78.21-61.06c0-21.08,13.68-39.65,34.48-50.62" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.24"/>
<path d="M408,86.42a94.3,94.3,0,0,1,19.5-5" fill="#263238" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.24"/>
<ellipse cx="441.92" cy="156.71" rx="133.93" ry="44.44" fill="#014D4E" data-primary="true"/>
<ellipse cx="441.92" cy="172.73" rx="190.83" ry="44.44" fill="#014D4E" data-primary="true"/>
<ellipse cx="441.92" cy="172.73" rx="190.83" ry="44.44" opacity="0.2"/>
<ellipse cx="441.92" cy="184.58" rx="220.45" ry="44.44" fill="#2f2e41" data-secondary="true"/>
<ellipse cx="442.04" cy="184.57" rx="165.11" ry="31.06" fill="#014D4E" data-primary="true"/>
<ellipse cx="441.92" cy="184.58" rx="73.48" ry="14.81" fill="#263238" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.24"/>
<ellipse cx="442.04" cy="151.03" rx="17.51" ry="3.84" fill="#fff"/>
<path d="M279.81,184.31c0,1.43-5.36,2.64-12,2.64s-12-1.19-12-2.64,5.37-2.64,12-2.64S279.81,182.88,279.81,184.31Z" fill="#fff"/>
<path d="M631.73,184.31c0,1.43-5.37,2.64-12,2.64s-11.94-1.21-11.94-2.64,5.36-2.64,12-2.64S631.73,182.88,631.73,184.31Z" fill="#fff"/>
<ellipse cx="550.15" cy="163.31" rx="16.36" ry="3.6" fill="#fff"/>
<ellipse cx="346.72" cy="163.31" rx="16.36" ry="3.6" fill="#fff"/>
<ellipse cx="550.15" cy="205.4" rx="11.98" ry="2.64" fill="#fff"/>
<ellipse cx="346.72" cy="205.4" rx="11.98" ry="2.64" fill="#fff"/>
<path d="M305.25,397.67l-.15,0a.54.54,0,0,1-.37-.67l4-14a.55.55,0,0,1,.68-.37.54.54,0,0,1,.37.67l-4.06,14A.53.53,0,0,1,305.25,397.67Z" fill="#2f2e41" data-secondary="true"/>
<path d="M313.51,369.3a.41.41,0,0,1-.16,0,.54.54,0,0,1-.37-.67l32-110a.54.54,0,1,1,1,.3L314,368.91A.54.54,0,0,1,313.51,369.3Z" fill="#2f2e41" data-secondary="true"/>
<path d="M349,247.28l-.15,0a.55.55,0,0,1-.37-.68L364.56,191a.53.53,0,0,1,.67-.37.55.55,0,0,1,.38.67l-16.14,55.57A.55.55,0,0,1,349,247.28Z" fill="#2f2e41" data-secondary="true"/>
<path d="M584.64,390.55a.55.55,0,0,1-.52-.37L514.89,184.76a.54.54,0,0,1,1-.35l69.23,205.42a.54.54,0,0,1-.34.69Z" fill="#2f2e41" data-secondary="true"/>
<path d="M382.35,293h-.1a.55.55,0,0,1-.44-.63l16.11-89.75a.54.54,0,0,1,1.07.19l-16.11,89.75A.54.54,0,0,1,382.35,293Z" fill="#2f2e41" data-secondary="true"/>
<path d="M523.87,363.16a.54.54,0,0,1-.53-.45L494.57,202.77a.54.54,0,0,1,.44-.63.54.54,0,0,1,.63.44l28.77,159.94a.55.55,0,0,1-.44.63Z" fill="#2f2e41" data-secondary="true"/>
<line x1="441.92" y1="391.38" x2="441.92" y2="409.79" fill="none" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.24"/>
<path d="M441.92,169.77a309.57,309.57,0,0,0-42.05,2.66c4.05,8.4,21.78,14.73,43,14.73s38.6-6.2,42.88-14.47A302.76,302.76,0,0,0,441.92,169.77Z" fill="#fff" stroke="#263238" stroke-miterlimit="10" stroke-width="1.24"/>
<path d="M448,618.07l-7.66,8.64s-3,4,2,9.59L458,651.7s12.62,12.12,18.68,6.82c0,0,3-1.52-2.77-9.6,0,0-10.22-9.17-6.5-19.7C467.44,629.22,460.49,626.6,448,618.07Z" fill="#014D4E" data-primary="true"/>
<path d="M411.28,602.79s-11.3,8.78-8,14.08l9.34,9.34a34,34,0,0,0,11.11,9.84s9.08,6.56,11.86,7.32c0,0,4-.23,2.27-4.4,0,0-9.95-20.16-8.55-26.21C429.29,612.76,421.57,611.69,411.28,602.79Z" fill="#014D4E" data-primary="true"/>
<path d="M442.09,332.82a10.72,10.72,0,0,0,1,7.14l2.95,5.72-5.83,8.42-20.54,4.41-1.6-6.55,5.6-16.27,15.74-2.87Z" fill="#f9b499"/>
<path d="M442.09,332.82a7.52,7.52,0,0,1-4.79,2.87s1.92,3.22,5.24,3.11C442.54,338.8,441.22,335.22,442.09,332.82Z" fill="#f7a48b"/>
<path d="M424.71,416.6c-1.32.2-4.39,6.69-7.83,15.11-6.57,16-14.53,39.06-14.53,39.06-2.11,5.15-11.46,0-11.46,0-3-.47-2.81-1.87-2.81-1.87l4-14.5c4.91-23.16,8.65-31.34,8.65-31.34,2.57-5.62,4.92-21.76,4.92-21.76-.1-3.19.07-7.37.31-11.24.34-5.78.85-10.85.85-10.85l.14,1.16a18.23,18.23,0,0,0,.73,3S417.68,408.76,424.71,416.6Z" fill="#014D4E" data-primary="true"/>
<path d="M390.89,470.77s-5.14,8.65-1.4,16.37c0,0,2.85,8.44,10.44,7a1.42,1.42,0,0,0,.49-2.59,15.68,15.68,0,0,0-2.75-1.34,4.83,4.83,0,0,1-1.78-4.82.81.81,0,0,1,1.13-.57,2.13,2.13,0,0,0,2.23-.33.87.87,0,0,0,.23-1.25,6.34,6.34,0,0,1-1.34-5l.24-5.14S393.7,472.64,390.89,470.77Z" fill="#f9b499"/>
<path d="M442,452.86a221,221,0,0,0,2.77,31.62s-2.12,30.88-2.77,37.74c0,0-3.15,3.12-2.84,10,0,0-14.18,11.16-20.58,51a6.47,6.47,0,0,1-1.19,2.86,8.73,8.73,0,0,0-1.56,4.27,3.13,3.13,0,0,1-1,2c-.45.38-.91,1.43-1,4.11a9.69,9.69,0,0,1-2.59,6.34h0s9.81,9,16.82,9.71c0,0,3.83,2.68,2.59-5.78,0,0,4.33-3.93,1-10.74,0,0-.21-3.1,2.48-4.13,0,0,2.61-.75,3.22-9.88a12.2,12.2,0,0,1,.59-3.05,181.91,181.91,0,0,1,8.11-20.57,37.34,37.34,0,0,1,9.12-12c2.91-2.51,7.59-8.29,9.51-20.4,0,0,3.72,9.5-3.92,27.87A154.37,154.37,0,0,0,453,599.93a10.82,10.82,0,0,1-1.35,5.16c-1.09,2-2.3,5.06-1.23,7.68,0,0,2.38.76-2.37,5.3,0,0,11.36,8,19.41,11.15,0,0,2.06,3.1,1.24-4.33,0,0,.2-5,2.47-6.2,0,0,3.51-4.54,0-10.53,0,0-1.21-4.95,1.56-7.64,0,0,1.52-.18,1.56-5.21a6.28,6.28,0,0,1,.44-2.31c1.86-4.58,8.65-22,8.83-32.74,0,0,2.89-.62,1.65-5,0,0,3.51-2.69,3.51-9.71,0,0,2.37-5.16,2.94-19.4,0,0,5.26-10.13,10.24-43.67,0,0,2.58-19.84-2.41-37.64l-5.81-7.47L450.4,450.63l-6.29-4.13Z" fill="#2f2e41" data-secondary="true"/>
<path d="M437.3,335.69l-13.75-.83-6.77-.4s-8.57-15.58-7.76-15.84,5.4-3.24,5.4-3.24.66-.12,1.63-.25c1.94-.24,5.16-.48,7.11.25,0,0,4-3.43,6.67,2.17,0,0,11.2,2.93,13.07,9.07C442.9,326.62,444.77,334.62,437.3,335.69Z" fill="#f9b499"/>
<path d="M431.7,340a7.87,7.87,0,0,1,1.22,3.94,2.47,2.47,0,0,0,2.38,2.32,32.39,32.39,0,0,0,6-.55l-13.58,10.2-6.66-.31s-.77-8.37,0-8.52,5.62-9.42,5.62-9.42S427.75,339.69,431.7,340Z" fill="#f7a48b"/>
<path d="M424.71,416.6c-1.32.2-4.39,6.69-7.83,15.11-2.16-2.71-6.67-10-5.6-22.68,0,0,.41-12.48-5.34-18.94v0c.34-5.78.85-10.85.85-10.85l.14,1.16a18.23,18.23,0,0,0,.73,3S417.68,408.76,424.71,416.6Z" opacity="0.3"/>
<path d="M456.91,459.58a12,12,0,0,0-1.54,8,13,13,0,0,0,4.06,7.05c1,.95,2.15,1.7,3.21,2.72a10.58,10.58,0,0,1,2.41,3.57,10.15,10.15,0,0,1,.76,4.24,16.34,16.34,0,0,1-.62,4.24c-1.53,5.35-1.44,11.06-.7,16.57.11.68.21,1.38.34,2.06l.39,2.07a8.46,8.46,0,0,1-.4,4.24,12.89,12.89,0,0,0,.14,8.21,12.76,12.76,0,0,1-.48-8.3,8.18,8.18,0,0,0,.29-4.07l-.44-2c-.14-.69-.26-1.39-.39-2.08a47.61,47.61,0,0,1-.61-8.44,33.63,33.63,0,0,1,1.16-8.4,15.62,15.62,0,0,0,.63-4.06,9.32,9.32,0,0,0-.68-4,10,10,0,0,0-2.24-3.38c-1-.93-2.15-1.77-3.16-2.77a13.52,13.52,0,0,1-4-7.38A12,12,0,0,1,456.91,459.58Z" opacity="0.3"/>
<path d="M496.4,446.63c-14.61,5.14-54.37,6.23-54.37,6.23-1.8-9.49-1.43-15.71-.85-19.15a3,3,0,0,0-2.3-3.36c-7.33-1.73-14.17-13.75-14.17-13.75-7-7.84-17-33.27-17-33.27a17.31,17.31,0,0,1-.74-3c-1.87-11.82,9.93-19.22,9.93-19.22-.8-2.17,1.63-4.33,1.63-4.33,2.1-1.11,4.16-2.08,5.86-2.84a42,42,0,0,0,7-4.08c6.66-4.65,12.25-4.45,12.25-4.45,1.9-1.62,6.75,4.06,6.75,4.06a26.25,26.25,0,0,1,14.08,7.31c13.8,15.15,18.4,36.52,18.4,36.52,9.19,16.77,18.12,43.55,18.12,43.55C504.52,443.93,496.4,446.63,496.4,446.63Z" fill="#014D4E" data-primary="true"/>
<path d="M466.65,472.49s1.35,12.29,8.92,16.35a22.62,22.62,0,0,0,12,4.78,3.79,3.79,0,0,0,3.93-2.45,3.57,3.57,0,0,0-1.16-3.84s-9.21-7.25-9.24-15.07a.42.42,0,0,1,.81-.16c1.24,3.35,4.23,10.14,8,9.86,0,0,2.48-.36.93-3,0,0-3.25-3.87-3.72-7.59,0,0-1.37-5.57-5.8-8.51C481.25,462.87,469.78,461.21,466.65,472.49Z" fill="#f9b499"/>
<path d="M489,493.46a23.68,23.68,0,0,1-4-2.45,28.5,28.5,0,0,1-3.55-3.13c-.56-.56-1.07-1.17-1.59-1.76s-1-1.23-1.4-1.91a22.14,22.14,0,0,1-2.25-4.14c.46.63.83,1.32,1.31,1.94l.67.95c.23.32.48.62.72.92a40.77,40.77,0,0,0,3.06,3.5,44.38,44.38,0,0,0,3.38,3.19c.58.51,1.19,1,1.81,1.48S488.38,493,489,493.46Z" fill="#f7a48b"/>
<path d="M471.74,451s11.44-1,17.28-2.41c0,0-14.68-31.27-16.44-49.54L459,409.92Z" opacity="0.2"/>
<path d="M426.09,332.76l-2.54,2.1-6.77-.4s-8.57-15.58-7.76-15.84,5.4-3.24,5.4-3.24.66-.12,1.63-.25c0,0,1.9,3.88,2,6C418.09,321.16,428.88,317.44,426.09,332.76Z" fill="#f7a48b"/>
<path d="M403.49,315.2c-3.31,4.85-13.15,21.44-2.74,34.1,0,0,8.54,8.11,17.74,7.52l5.86-2.84,5.29-8.19a3.71,3.71,0,0,0-.22-4.33c-1.86-2.29-4.38-6.07-3.33-8.71,0,0,1.34-14.67-9.6-9.6,0,0-1.84-16.34-10-11A10.78,10.78,0,0,0,403.49,315.2Z" fill="#2f2e41" data-secondary="true"/>
<ellipse cx="431.04" cy="335.69" rx="5.6" ry="4.27" fill="#f9b499"/>
<ellipse cx="431.04" cy="335.69" rx="1.94" ry="1.39" fill="#f7a48b"/>
<path d="M466.65,472.49c.84-2.95,4-10.27,14.6-9.62a138.92,138.92,0,0,1-7.44-30.57s-1.21-25.63-1.48-45.45c0,0,2.3-24.6-9.43-28a8.69,8.69,0,0,0-5.77.42c-4.46,1.88-13.15,7.62-10.61,23.53a41.72,41.72,0,0,1,.57,7c-.08,9.08.43,32.93,7.22,50.13,0,0,6.83,23.77,11.45,32.7A.48.48,0,0,0,466.65,472.49Z" fill="#014D4E" data-primary="true"/>
<path d="M466.65,472.49c.84-2.95,4-10.27,14.6-9.62a138.92,138.92,0,0,1-7.44-30.57s-1.21-25.63-1.48-45.45c0,0,2.3-24.6-9.43-28a8.69,8.69,0,0,0-5.77.42c-4.46,1.88-13.15,7.62-10.61,23.53a41.72,41.72,0,0,1,.57,7c-.08,9.08.43,32.93,7.22,50.13,0,0,6.83,23.77,11.45,32.7A.48.48,0,0,0,466.65,472.49Z" opacity="0.3"/>
<path d="M397.49,493.63a9.79,9.79,0,0,1-2.74-1.91,11.9,11.9,0,0,1-2.06-2.67,12.74,12.74,0,0,1-.73-1.54,9.53,9.53,0,0,1-.46-1.64,8.94,8.94,0,0,1-.05-3.34,25.66,25.66,0,0,0,.85,3.13,16.84,16.84,0,0,0,1.3,2.87A26,26,0,0,0,397.49,493.63Z" fill="#f7a48b"/>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1 @@
<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

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 KiB

+6 -6
View File
@@ -1,22 +1,22 @@
{
"name": "JSON Visio",
"short_name": "JSON Visio",
"description": "Visualize your JSON data onto graphs seamlessly.",
"name": "JSON Crack",
"short_name": "JSON Crack",
"description": "Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.",
"theme_color": "#36393e",
"background_color": "#36393e",
"display": "standalone",
"orientation": "landscape",
"scope": "/",
"scope": "/editor",
"start_url": "/editor",
"icons": [
{
"src": "/192.png",
"src": "assets/192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/512.png",
"src": "assets/512.png",
"sizes": "512x512",
"type": "image/png"
}
+6
View File
@@ -1,4 +1,10 @@
# Allow all crawlers
User-agent: *
Allow: /
# Block all crawlers for /accounts
User-agent: *
Disallow: /*?*
Disallow: /forgot-password
Disallow: /widget
+6
View File
@@ -0,0 +1,6 @@
https://jsoncrack.com
https://jsoncrack.com/sign-in
https://jsoncrack.com/editor
https://jsoncrack.com/docs
https://jsoncrack.com/legal/terms
https://jsoncrack.com/legal/privacy
+21
View File
@@ -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,
}),
],
});
}
+3
View File
@@ -0,0 +1,3 @@
{
/* empty */
}
+3
View File
@@ -0,0 +1,3 @@
{
/* empty */
}
Binary file not shown.
+140
View File
@@ -0,0 +1,140 @@
import React from "react";
import styled from "styled-components";
const AdWrapper = styled.div`
& {
position: fixed;
z-index: 1000;
bottom: 40px;
right: 10px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
& .native-button {
z-index: 100;
display: flex;
padding: 8px 20px;
border-radius: 4px;
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.15);
color: #fff;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 600;
font-size: 12px;
cursor: pointer;
user-select: none;
justify-content: center;
align-items: center;
}
& .native-img {
margin-right: 10px;
width: 20px;
height: 20px;
}
& .native-overlay {
position: fixed;
bottom: 80px;
display: none;
padding: 20px;
max-width: 330px;
border-radius: 4px;
background: #fff;
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.15);
opacity: 0;
transition:
transform 0.2s ease-in-out,
opacity 0.1s ease-in-out;
transform: scale(1) translateY(-50px);
}
& #native-button:checked + .native-overlay {
opacity: 1;
transition:
transform 0.2s ease-in-out,
opacity 0.4s ease-in-out;
transform: scale(1) translateY(0);
}
#native-button {
display: none;
}
& .native-banner {
line-height: 1.35;
}
& .native-tagline {
letter-spacing: 0.5px;
font-weight: 600;
font-size: 16px;
}
& .native-description {
margin-bottom: 10px;
font-size: 16px;
}
& .native-footer {
display: flex;
justify-content: space-between;
align-items: center;
}
& .native-logo {
width: 120px;
height: auto;
}
& .native-cta {
padding: 6px 8px;
border-radius: 3px;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
font-size: 12px;
}
`;
const template = `${"`"}
<label class="native-button" for="native-button" style="background-color: ##backgroundColor##; color: ##textColor##;"><img src="##image##" class="native-img">Sponsored by ##company##</label>
<input type="checkbox" id="native-button">
<div class="native-overlay" style="background-color: ##backgroundColor##; color: ##textColor##">
<div class="native-banner">
<div class="native-tagline">##tagline##</div>
<div class="native-description">##description##</div>
<div class="native-footer">
<a href="##statlink##" class="native-cta" style="background-color: ##ctaBackgroundColor##; color: ##ctaTextColor##">##callToAction##</a>
<img class="native-logo" src="##logo##">
</div>
</div>
</div>
${"`"}`;
export const AdTest = () => {
const ref = React.useRef<HTMLDivElement>(null!);
React.useEffect(() => {
if (window.innerWidth < 660) return;
ref.current.innerHTML = "";
const s = document.createElement("script");
s.id = "_carbonads_js";
s.innerHTML = `(function() {
if (typeof _bsa !== 'undefined' && _bsa) {
_bsa.init('custom', 'CWYD42JI', 'placement:jsoncrackcom', {
target: '#cutton-js',
template: ${template}
});
}
})();`;
ref.current.appendChild(s);
}, []);
return <AdWrapper ref={ref} id="cutton-js"></AdWrapper>;
};
-69
View File
@@ -1,69 +0,0 @@
import React from "react";
import styled, { DefaultTheme } from "styled-components";
enum ButtonType {
PRIMARY = "PRIMARY",
SECONDARY = "BLURPLE",
DANGER = "DANGER",
SUCCESS = "SEAGREEN",
WARNING = "ORANGE",
}
export interface ButtonProps extends React.ComponentPropsWithoutRef<"button"> {
status?: keyof typeof ButtonType;
block?: boolean;
}
function getButtonStatus(status: keyof typeof ButtonType, theme: DefaultTheme) {
return theme[ButtonType[status]];
}
const StyledButton = styled.button<{
status: keyof typeof ButtonType;
block: boolean;
}>`
display: flex;
align-items: center;
background: ${({ status, theme }) => getButtonStatus(status, theme)};
color: #ffffff;
padding: 8px 16px;
min-width: 60px;
width: ${({ block }) => (block ? "100%" : "fit-content")};
height: 40px;
:disabled {
cursor: not-allowed;
opacity: 0.5;
}
@media only screen and (max-width: 768px) {
font-size: 18px;
}
`;
const StyledButtonContent = styled.div`
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
white-space: nowrap;
text-overflow: ellipsis;
`;
export const Button: React.FC<ButtonProps> = ({
children,
status,
block = false,
...props
}) => {
return (
<StyledButton
type="button"
status={status ?? "PRIMARY"}
block={block}
{...props}
>
<StyledButtonContent>{children}</StyledButtonContent>
</StyledButton>
);
};
+14 -82
View File
@@ -1,90 +1,22 @@
import Script from "next/script";
import React from "react";
import { IoMdClose } from "react-icons/io";
import styled from "styled-components";
import useUser from "src/store/useUser";
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;
z-index: 50;
border-radius: 0;
background: ${({ theme }) => theme.DANGER};
`;
export const CarbonAds = () => {
const ref = React.useRef<HTMLDivElement>(null!);
const premium = useUser(state => state.premium);
const StyledWrapper = styled.span<{ editor?: boolean }>`
position: relative;
React.useEffect(() => {
if (!premium) {
ref.current.innerHTML = "";
const s = document.createElement("script");
#carbonads {
width: 100%;
display: flex;
}
${({ theme, editor }) =>
editor &&
`
#carbonads {
border-radius: 0;
border-top: 1px solid ${theme.BACKGROUND_MODIFIER_ACCENT};
s.id = "_carbonads_js";
s.src = "//cdn.carbonads.com/carbon.js?serve=CE7IPKQL&placement=jsoncrackcom";
ref.current.appendChild(s);
}
}, [premium]);
#carbonads > span {
max-width: 100%;
width: 100%;
}
`};
if (premium) return null;
&: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="https://cdn.carbonads.com/carbon.js?serve=CE7IPKQL&placement=jsonvisiocom"
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>
);
return <div ref={ref} className="carbon-outer" />;
};
-42
View File
@@ -1,42 +0,0 @@
import React from "react";
import { ConditionalWrapper, CustomNodeProps } from "src/components/CustomNode";
import useConfig from "src/hooks/store/useConfig";
import * as Styled from "./styles";
const ObjectNode: React.FC<CustomNodeProps<[string, string][]>> = ({
width,
height,
value,
x,
y,
}) => {
const performanceMode = useConfig((state) => state.performanceMode);
return (
<Styled.StyledForeignObject width={width} height={height} x={0} y={0}>
<ConditionalWrapper condition={performanceMode}>
<Styled.StyledText width={width} height={height}>
{value.map((val, idx) => (
<Styled.StyledRow
data-key={JSON.stringify(val[1])}
data-x={x}
data-y={y}
key={idx}
width={`${width - 20}px`}
value={JSON.stringify(val[1])}
>
<Styled.StyledKey objectKey>
{JSON.stringify(val[0]).replaceAll('"', "")}:{" "}
</Styled.StyledKey>
<Styled.StyledLinkItUrl>
{JSON.stringify(val[1])}
</Styled.StyledLinkItUrl>
</Styled.StyledRow>
))}
</Styled.StyledText>
</ConditionalWrapper>
</Styled.StyledForeignObject>
);
};
export default ObjectNode;
-88
View File
@@ -1,88 +0,0 @@
import React from "react";
import { MdCompareArrows } from "react-icons/md";
import { NodeData } from "reaflow/dist/types";
import { ConditionalWrapper, CustomNodeProps } from "src/components/CustomNode";
import useConfig from "src/hooks/store/useConfig";
import useGraph from "src/hooks/store/useGraph";
import useStored from "src/hooks/store/useStored";
import styled from "styled-components";
import * as Styled from "./styles";
const StyledExpand = styled.button`
pointer-events: all;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
top: 0;
right: 0;
padding: 0;
color: ${({ theme }) => theme.TEXT_NORMAL};
background: rgba(0, 0, 0, 0.1);
min-height: 0;
height: 100%;
width: 40px;
border-radius: 0;
border-left: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
`;
const TextNode: React.FC<CustomNodeProps<string> & { node: NodeData }> = ({
node,
width,
height,
value,
isParent = false,
x,
y,
}) => {
const performanceMode = useConfig((state) => state.performanceMode);
const hideCollapse = useStored((state) => state.hideCollapse);
const expandNodes = useGraph((state) => state.expandNodes);
const collapseNodes = useGraph((state) => state.collapseNodes);
const [isExpanded, setIsExpanded] = React.useState(true);
const handleExpand = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
setIsExpanded(!isExpanded);
if (isExpanded) collapseNodes(node.id);
else expandNodes(node.id);
};
return (
<Styled.StyledForeignObject
width={width}
height={height}
x={0}
y={0}
data-nodeid={node.id}
>
<ConditionalWrapper condition={performanceMode}>
<Styled.StyledText
hideCollapse={hideCollapse}
parent={isParent}
width={width}
height={height}
>
<Styled.StyledKey
data-x={x}
data-y={y}
data-key={JSON.stringify(value)}
parent={isParent}
>
<Styled.StyledLinkItUrl>
{JSON.stringify(value).replaceAll('"', "")}
</Styled.StyledLinkItUrl>
</Styled.StyledKey>
</Styled.StyledText>
</ConditionalWrapper>
{isParent && !hideCollapse && (
<StyledExpand onClick={handleExpand}>
<MdCompareArrows size={18} />
</StyledExpand>
)}
</Styled.StyledForeignObject>
);
};
export default TextNode;
-69
View File
@@ -1,69 +0,0 @@
import React from "react";
import RenderIfVisible from "react-render-if-visible";
import { Label, Node, NodeProps } from "reaflow";
import ObjectNode from "./ObjectNode";
import { StyledTextWrapper } from "./styles";
import TextNode from "./TextNode";
export interface CustomNodeProps<T> {
width: number;
height: number;
value: T;
isParent?: boolean;
x: number;
y: number;
}
const baseLabelStyle = {
fill: "transparent",
stroke: "transparent",
strokeWidth: 0,
};
export const ConditionalWrapper: React.FC<{
condition?: boolean;
children: React.ReactNode;
}> = ({ condition, children }) =>
condition ? (
<RenderIfVisible rootElementClass="renderVisible">
{children}
</RenderIfVisible>
) : (
<StyledTextWrapper>{children}</StyledTextWrapper>
);
export const CustomNode = (nodeProps: NodeProps) => {
const { properties } = nodeProps;
return (
<Node {...nodeProps} label={<Label style={baseLabelStyle} />}>
{({ width, height, x, y, node }) => {
if (properties.text instanceof Object) {
const entries = Object.entries<string>(properties.text);
return (
<ObjectNode
value={entries}
width={width}
height={height}
x={x}
y={y}
/>
);
}
return (
<TextNode
node={node}
isParent={properties.data.isParent}
value={properties.text}
width={width}
height={height}
x={x}
y={y}
/>
);
}}
</Node>
);
};
-101
View File
@@ -1,101 +0,0 @@
import styled, { DefaultTheme } from "styled-components";
import { LinkItUrl } from "react-linkify-it";
function getTypeColor(value: string, theme: DefaultTheme) {
if (!Number.isNaN(+value)) return "#FD0079";
if (value === "true") return theme.TEXT_POSITIVE;
if (value === "false") return theme.TEXT_DANGER;
}
export const StyledLinkItUrl = styled(LinkItUrl)`
text-decoration: underline;
pointer-events: all;
`;
export const StyledTextWrapper = styled.div`
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
width: 100%;
height: 100%;
overflow: hidden;
cursor: pointer;
`;
export const StyledText = styled.div<{
width: number;
height: number;
parent?: boolean;
hideCollapse?: boolean;
}>`
display: flex;
justify-content: center;
flex-direction: column;
width: ${({ width }) => width};
height: ${({ height }) => height};
min-height: 50;
color: ${({ theme }) => theme.TEXT_NORMAL};
padding-right: ${({ parent, hideCollapse }) =>
parent && !hideCollapse && "20px"};
`;
export const StyledForeignObject = styled.foreignObject`
pointer-events: none;
* {
font-family: "Roboto Mono", monospace;
}
&.searched {
border: 2px solid ${({ theme }) => theme.TEXT_POSITIVE};
border-radius: 2px;
}
.highlight {
background-color: rgba(255, 0, 255, 0.5);
filter: hue-rotate();
}
.renderVisible {
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
width: 100%;
height: 100%;
overflow: hidden;
cursor: pointer;
}
`;
export const StyledKey = styled.span<{
objectKey?: boolean;
parent?: boolean;
}>`
font-weight: 500;
color: ${({ theme, objectKey, parent }) =>
parent
? theme.NODE_KEY
: objectKey
? theme.OBJECT_KEY
: theme.TEXT_POSITIVE};
font-size: ${({ parent }) => parent && "14px"};
`;
export const StyledRow = styled.span.attrs<{
width: string;
value: string;
theme: DefaultTheme;
}>((props) => ({
style: {
width: props.width,
color: getTypeColor(props.value, props.theme),
},
}))<{ width: string; value: string; theme: DefaultTheme }>`
height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0 auto;
`;
@@ -1,81 +0,0 @@
import React from "react";
import styled from "styled-components";
import {
MdExpandMore,
MdExpandLess,
MdReportGmailerrorred,
MdOutlineCheckCircleOutline,
} from "react-icons/md";
const StyledErrorWrapper = styled.div`
z-index: 1;
`;
const StyledErrorExpand = styled.button<{ error: boolean }>`
display: flex;
width: 100%;
padding: 4px 16px;
height: 36px;
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};
cursor: pointer;
&:hover {
color: ${({ theme }) => theme.TEXT_DANGER};
box-shadow: none;
}
`;
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 = ({ error }: { error: string }) => {
const [isErrorExpanded, setErrorExpanded] = React.useState(true);
return (
<StyledErrorWrapper>
<StyledErrorExpand
error={!!error.length}
onClick={() => setErrorExpanded(!isErrorExpanded)}
>
<StyledTitle>
{error ? (
<MdReportGmailerrorred size={20} />
) : (
<MdOutlineCheckCircleOutline size={20} />
)}
{error ? "Error" : "JSON Valid"}
</StyledTitle>
{error &&
(isErrorExpanded ? (
<MdExpandLess size={22} />
) : (
<MdExpandMore size={22} />
))}
</StyledErrorExpand>
{isErrorExpanded && error && <StyledError>{error}</StyledError>}
</StyledErrorWrapper>
);
};
+80
View File
@@ -0,0 +1,80 @@
import React from "react";
import styled from "styled-components";
const StyledInputWrapper = styled.div`
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
width: 100%;
border-radius: 4px;
`;
const StyledForm = styled.div`
display: flex;
flex: 1;
`;
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%;
height: 40px;
`;
const StyledButton = styled.button`
display: flex;
align-items: center;
background: none;
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
padding: 0 10px;
min-height: unset;
text-transform: uppercase;
&:hover {
box-shadow: none;
}
&.active {
background: ${({ theme }) => theme.PRIMARY};
color: white;
outline: 3px solid ${({ theme }) => theme.BACKGROUND_TERTIARY};
border-radius: 10px;
}
`;
export interface InputProps {
value: string | number | string[];
extensions: string[];
activeExtension: number;
onChange?: React.ChangeEventHandler<HTMLInputElement>;
setExtension: (value: number) => void;
}
export const FileInput: React.FC<InputProps> = ({
setExtension,
activeExtension,
onChange,
extensions,
value,
}) => {
return (
<StyledInputWrapper>
<StyledForm>
<StyledInput type="text" onChange={onChange} value={value} placeholder="File Name" />
{extensions.map((ext, key) => (
<StyledButton
className={`${activeExtension === key && "active"}`}
key={key}
aria-label="search"
onClick={() => setExtension(key)}
>
{ext}
</StyledButton>
))}
</StyledForm>
</StyledInputWrapper>
);
};
-26
View File
@@ -1,26 +0,0 @@
import Script from "next/script";
import React from "react";
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>
</>
);
};
+13
View File
@@ -0,0 +1,13 @@
import React from "react";
import dynamic from "next/dynamic";
import { EdgeProps } from "reaflow/dist/symbols/Edge";
const Edge = dynamic(() => import("reaflow").then(r => r.Edge), {
ssr: false,
});
const CustomEdgeWrapper = (props: EdgeProps) => {
return <Edge containerClassName={`edge-${props.id}`} {...props} />;
};
export const CustomEdge = React.memo(CustomEdgeWrapper);
@@ -0,0 +1,40 @@
import React from "react";
import { CustomNodeProps } from "src/components/Graph/CustomNode";
import { TextRenderer } from "./TextRenderer";
import * as Styled from "./styles";
type Value = [string, string];
type RowProps = {
val: Value;
x: number;
y: number;
index: number;
};
const Row = ({ val, x, y, index }: RowProps) => {
const key = JSON.stringify(val);
const rowKey = JSON.stringify(val[0]).replaceAll('"', "");
const rowValue = JSON.stringify(val[1]);
return (
<Styled.StyledRow $value={rowValue} data-key={key} data-x={x} data-y={y + index * 17.8}>
<Styled.StyledKey $type="object">{rowKey}: </Styled.StyledKey>
<TextRenderer>{rowValue}</TextRenderer>
</Styled.StyledRow>
);
};
const Node: React.FC<CustomNodeProps> = ({ node, x, y }) => (
<Styled.StyledForeignObject width={node.width} height={node.height} x={0} y={0} $isObject>
{(node.text as Value[]).map((val, idx) => (
<Row val={val} index={idx} x={x} y={y} key={idx} />
))}
</Styled.StyledForeignObject>
);
function propsAreEqual(prev: CustomNodeProps, next: CustomNodeProps) {
return String(prev.node.text) === String(next.node.text) && prev.node.width === next.node.width;
}
export const ObjectNode = React.memo(Node, propsAreEqual);
@@ -0,0 +1,111 @@
import React from "react";
import styled from "styled-components";
import { MdLink, MdLinkOff } from "react-icons/md";
import { CustomNodeProps } from "src/components/Graph/CustomNode";
import useToggleHide from "src/hooks/useToggleHide";
import { isContentImage } from "src/lib/utils/graph/calculateNodeSize";
import useConfig from "src/store/useConfig";
import useGraph from "src/store/useGraph";
import { TextRenderer } from "./TextRenderer";
import * as Styled from "./styles";
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.span<{ $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 Node: React.FC<CustomNodeProps> = ({ node, x, y, hasCollapse = false }) => {
const {
id,
text,
width,
height,
data: { isParent, childrenCount, type },
} = node;
const { validateHiddenNodes } = useToggleHide();
const collapseButtonVisible = useConfig(state => state.collapseButtonVisible);
const childrenCountVisible = useConfig(state => state.childrenCountVisible);
const imagePreviewEnabled = useConfig(state => state.imagePreviewEnabled);
const expandNodes = useGraph(state => state.expandNodes);
const collapseNodes = useGraph(state => state.collapseNodes);
const isExpanded = useGraph(state => state.collapsedParents.includes(id));
const isImage = imagePreviewEnabled && isContentImage(text as string);
const value = JSON.stringify(text).replaceAll('"', "");
const handleExpand = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation();
if (!isExpanded) collapseNodes(id);
else expandNodes(id);
validateHiddenNodes();
};
return (
<Styled.StyledForeignObject width={width} height={height} x={0} y={0}>
{isImage ? (
<StyledImageWrapper>
<StyledImage src={text as string} width="70" height="70" loading="lazy" />
</StyledImageWrapper>
) : (
<StyledTextNodeWrapper
data-x={x}
data-y={y}
data-key={JSON.stringify(text)}
$hasCollapse={isParent && collapseButtonVisible}
>
<Styled.StyledKey $value={value} $parent={isParent} $type={type}>
<TextRenderer>{value}</TextRenderer>
</Styled.StyledKey>
{isParent && childrenCount > 0 && childrenCountVisible && (
<Styled.StyledChildrenCount>({childrenCount})</Styled.StyledChildrenCount>
)}
{isParent && hasCollapse && collapseButtonVisible && (
<StyledExpand aria-label="Expand" 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 &&
prev.node.data.childrenCount === next.node.data.childrenCount
);
}
export const TextNode = React.memo(Node, propsAreEqual);
@@ -0,0 +1,41 @@
import React from "react";
import styled from "styled-components";
import { ColorSwatch } from "@mantine/core";
import * as Styled from "./styles";
const StyledRow = styled.span`
display: inline-flex;
align-items: center;
overflow: hidden;
gap: 4px;
vertical-align: middle;
`;
function isColorFormat(colorString: string) {
const hexCodeRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
const rgbRegex = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/;
const rgbaRegex = /^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(0|1|0\.\d+)\s*\)$/;
return (
hexCodeRegex.test(colorString) || rgbRegex.test(colorString) || rgbaRegex.test(colorString)
);
}
const isURL =
/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;
export const TextRenderer: React.FC<{ children: string }> = ({ children }) => {
if (isURL.test(children?.replaceAll('"', ""))) {
return <Styled.StyledLinkItUrl>{children}</Styled.StyledLinkItUrl>;
}
if (isColorFormat(children?.replaceAll('"', ""))) {
return (
<StyledRow>
<ColorSwatch radius={4} h={12} w={12} mr={8} color={children?.replaceAll('"', "")} />
{children?.replaceAll('"', "")}
</StyledRow>
);
}
return <>{children}</>;
};
+59
View File
@@ -0,0 +1,59 @@
import React from "react";
import dynamic from "next/dynamic";
import { NodeProps } from "reaflow";
import useGraph from "src/store/useGraph";
import useModal from "src/store/useModal";
import { NodeData } from "src/types/graph";
import { ObjectNode } from "./ObjectNode";
import { TextNode } from "./TextNode";
const Node = dynamic(() => import("reaflow").then(r => r.Node), {
ssr: false,
});
export interface CustomNodeProps {
node: NodeData;
x: number;
y: number;
hasCollapse?: boolean;
}
const rootProps = {
rx: 50,
ry: 50,
};
const CustomNodeWrapper = (nodeProps: NodeProps<NodeData["data"]>) => {
const data = nodeProps.properties.data;
const setSelectedNode = useGraph(state => state.setSelectedNode);
const setVisible = useModal(state => state.setVisible);
const handleNodeClick = React.useCallback(
(_: React.MouseEvent<SVGGElement, MouseEvent>, data: NodeData) => {
if (setSelectedNode) setSelectedNode(data);
setVisible("node")(true);
},
[setSelectedNode, setVisible]
);
return (
<Node
{...nodeProps}
{...(data?.isEmpty && rootProps)}
onClick={handleNodeClick as any}
animated={false}
label={null as any}
>
{({ node, x, y }) => {
if (Array.isArray(nodeProps.properties.text)) {
if (data?.isEmpty) return null;
return <ObjectNode node={node as NodeData} x={x} y={y} />;
}
return <TextNode node={node as NodeData} hasCollapse={!!data?.childrenCount} x={x} y={y} />;
}}
</Node>
);
};
export const CustomNode = React.memo(CustomNodeWrapper);
@@ -0,0 +1,99 @@
import styled, { DefaultTheme } from "styled-components";
import { LinkItUrl } from "react-linkify-it";
import { firaMono } from "src/constants/fonts";
type TextColorFn = {
theme: DefaultTheme;
$type?: string;
$value?: string;
$parent?: boolean;
};
function getTextColor({ $value, $type, $parent, theme }: TextColorFn) {
// per type
if ($parent && $type === "array") return theme.NODE_COLORS.PARENT_ARR;
if ($parent && $type === "object") return theme.NODE_COLORS.PARENT_OBJ;
if ($type === "object") return theme.NODE_COLORS.NODE_KEY;
if ($type === "array") return theme.NODE_COLORS.NODE_VALUE;
// per value
if ($value && !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;
// default
return theme.NODE_COLORS.NODE_VALUE;
}
export const StyledLinkItUrl = styled(LinkItUrl)`
text-decoration: underline;
pointer-events: all;
`;
export const StyledForeignObject = styled.foreignObject<{ $isObject?: boolean }>`
text-align: ${({ $isObject }) => !$isObject && "center"};
color: ${({ theme }) => theme.NODE_COLORS.TEXT};
font-family: ${firaMono.style.fontFamily};
font-size: 12px;
font-weight: 500;
overflow: hidden;
pointer-events: none;
&.searched {
background: rgba(27, 255, 0, 0.1);
border: 2px solid ${({ theme }) => theme.TEXT_POSITIVE};
border-radius: 2px;
box-sizing: border-box;
}
.highlight {
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;
}
`;
export const StyledKey = styled.span<{ $parent?: boolean; $type: string; $value?: string }>`
display: inline;
flex: 1;
color: ${({ theme, $type, $parent = false, $value = "" }) =>
getTextColor({ $parent, $type, $value, theme })};
font-size: ${({ $parent }) => $parent && "14px"};
overflow: hidden;
text-overflow: ellipsis;
padding: ${({ $type }) => $type !== "object" && "10px"};
white-space: nowrap;
`;
export const StyledRow = styled.span<{ $value: string }>`
padding: 0 10px;
color: ${({ theme, $value }) => getTextColor({ $value, theme })};
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
&:first-of-type {
padding-top: 10px;
}
&:last-of-type {
padding-bottom: 10px;
}
`;
export const StyledChildrenCount = styled.span`
color: ${({ theme }) => theme.NODE_COLORS.CHILD_COUNT};
padding: 10px;
margin-left: -15px;
`;
+37
View File
@@ -0,0 +1,37 @@
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>
);
+204
View File
@@ -0,0 +1,204 @@
import React from "react";
import styled from "styled-components";
import { Button, Image, List, ThemeIcon, Title } from "@mantine/core";
import { BsCheck } from "react-icons/bs";
import { paymentURL } from "src/constants/data";
const StyledPremiumView = styled.div`
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background: #020015;
img {
filter: drop-shadow(2px 2px 1px black);
}
.glowing {
position: relative;
min-width: 700px;
height: 550px;
margin: -150px;
transform-origin: right;
animation: colorChange 5s linear infinite;
}
.glowing:nth-child(even) {
transform-origin: left;
}
@keyframes colorChange {
0% {
filter: hue-rotate(0deg);
transform: rotate(0deg);
}
100% {
filter: hue-rotate(360deg);
transform: rotate(360deg);
}
}
.glowing span {
--i: 1;
position: absolute;
top: calc(80px * var(--i));
left: calc(80px * var(--i));
bottom: calc(80px * var(--i));
right: calc(80px * var(--i));
}
.glowing span::before {
content: "";
position: absolute;
top: 50%;
left: -8px;
width: 15px;
height: 15px;
background: #f00;
border-radius: 50%;
}
.glowing span:nth-child(3n + 1)::before {
background: rgba(134, 255, 0, 1);
box-shadow:
0 0 20px rgba(134, 255, 0, 1),
0 0 40px rgba(134, 255, 0, 1),
0 0 60px rgba(134, 255, 0, 1),
0 0 80px rgba(134, 255, 0, 1),
0 0 0 8px rgba(134, 255, 0, 0.1);
}
.glowing span:nth-child(3n + 2)::before {
background: rgba(255, 214, 0, 1);
box-shadow:
0 0 20px rgba(255, 214, 0, 1),
0 0 40px rgba(255, 214, 0, 1),
0 0 60px rgba(255, 214, 0, 1),
0 0 80px rgba(255, 214, 0, 1),
0 0 0 8px rgba(255, 214, 0, 0.1);
}
.glowing span:nth-child(3n + 3)::before {
background: rgba(0, 226, 255, 1);
box-shadow:
0 0 20px rgba(0, 226, 255, 1),
0 0 40px rgba(0, 226, 255, 1),
0 0 60px rgba(0, 226, 255, 1),
0 0 80px rgba(0, 226, 255, 1),
0 0 0 8px rgba(0, 226, 255, 0.1);
}
.glowing span:nth-child(3n + 1) {
animation: animate 10s alternate infinite;
}
.glowing span:nth-child(3n + 2) {
animation: animate-reverse 3s alternate infinite;
}
.glowing span:nth-child(3n + 3) {
animation: animate 8s alternate infinite;
}
@keyframes animate {
0% {
transform: rotate(180deg);
}
50% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes animate-reverse {
0% {
transform: rotate(360deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(0deg);
}
}
`;
const StyledInfo = styled.p`
width: 60%;
font-weight: 600;
font-size: 20px;
text-align: center;
color: ${({ theme }) => theme.TEXT_NORMAL};
`;
const StyledContent = styled.div`
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
`;
export const PremiumView = () => (
<StyledPremiumView>
<StyledContent>
<Title align="center">
<Image width="400" src="assets/icon.png" alt="JSON Crack" />
</Title>
<StyledInfo>
Upgrade JSON Crack to premium and explore full potantial of your data!
</StyledInfo>
<List
spacing="xs"
size="md"
center
icon={
<ThemeIcon color="teal" size={20} radius="xl">
<BsCheck size="1rem" />
</ThemeIcon>
}
>
<List.Item>Edit directly on graph</List.Item>
<List.Item>JSON Schema support</List.Item>
<List.Item>Visualize data at full capability</List.Item>
<List.Item>Save & share up to 200 files</List.Item>
</List>
<Button
mt="lg"
size="lg"
component="a"
variant="gradient"
gradient={{ from: "blue", to: "teal" }}
href={paymentURL()}
target="_blank"
>
UPGRADE TO PREMIUM
</Button>
</StyledContent>
<div className="glowing">
<span></span>
<span></span>
<span></span>
</div>
</StyledPremiumView>
);
+176 -129
View File
@@ -1,167 +1,214 @@
import React from "react";
import {
ReactZoomPanPinchRef,
TransformComponent,
TransformWrapper,
} from "react-zoom-pan-pinch";
import { Canvas, Edge, ElkRoot, NodeData } from "reaflow";
import { CustomNode } from "src/components/CustomNode";
import { NodeModal } from "src/containers/Modals/NodeModal";
import { getEdgeNodes } from "src/containers/Editor/LiveEditor/helpers";
import useConfig from "src/hooks/store/useConfig";
import dynamic from "next/dynamic";
import styled from "styled-components";
import shallow from "zustand/shallow";
import useGraph from "src/hooks/store/useGraph";
import { toast } from "react-hot-toast";
import { Space } from "react-zoomable-ui";
import { ElkRoot } from "reaflow/dist/layout/useLayout";
import { useLongPress } from "use-long-press";
import { CustomNode } from "src/components/Graph/CustomNode";
import { ViewMode } from "src/enums/viewMode.enum";
import useToggleHide from "src/hooks/useToggleHide";
import { Loading } from "src/layout/Loading";
import useConfig from "src/store/useConfig";
import useGraph from "src/store/useGraph";
import useUser from "src/store/useUser";
import { NodeData } from "src/types/graph";
import { CustomEdge } from "./CustomEdge";
import { ErrorView } from "./ErrorView";
import { PremiumView } from "./PremiumView";
interface LayoutProps {
isWidget: boolean;
openModal: () => void;
setSelectedNode: (node: object) => void;
const Canvas = dynamic(() => import("reaflow").then(r => r.Canvas), {
ssr: false,
});
interface GraphProps {
isWidget?: boolean;
}
const StyledEditorWrapper = styled.div<{ isWidget: boolean }>`
const StyledEditorWrapper = styled.div<{ $widget: boolean; $showRulers: boolean }>`
position: absolute;
width: 100%;
height: ${({ isWidget }) => (isWidget ? "100vh" : "calc(100vh - 36px)")};
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
height: ${({ $widget }) => ($widget ? "calc(100vh - 36px)" : "calc(100vh - 63px)")};
--bg-color: ${({ theme }) => theme.GRID_BG_COLOR};
--line-color-1: ${({ theme }) => theme.GRID_COLOR_PRIMARY};
--line-color-2: ${({ theme }) => theme.GRID_COLOR_SECONDARY};
background-color: var(--bg-color);
${({ $showRulers }) =>
$showRulers &&
`
background-image: linear-gradient(var(--line-color-1) 1.5px, transparent 1.5px),
linear-gradient(90deg, var(--line-color-1) 1.5px, transparent 1.5px),
linear-gradient(var(--line-color-2) 1px, transparent 1px),
linear-gradient(90deg, var(--line-color-2) 1px, transparent 1px);
background-position:
-1.5px -1.5px,
-1.5px -1.5px,
-1px -1px,
-1px -1px;
background-size:
100px 100px,
100px 100px,
20px 20px,
20px 20px;
`};
:active {
cursor: move;
}
.dragging,
.dragging button {
pointer-events: none;
}
rect {
fill: ${({ theme }) => theme.BACKGROUND_NODE};
}
@media only screen and (max-width: 768px) {
height: ${({ $widget }) => ($widget ? "calc(100vh - 36px)" : "100vh")};
}
@media only screen and (max-width: 320px) {
height: 100vh;
}
`;
const MemoizedGraph = React.memo(function Layout({
isWidget,
openModal,
setSelectedNode,
}: LayoutProps) {
const json = useConfig((state) => state.json);
const nodes = useGraph((state) => state.nodes);
const edges = useGraph((state) => state.edges);
const setGraphValue = useGraph((state) => state.setGraphValue);
const layoutOptions = {
"elk.layered.compaction.postCompaction.strategy": "EDGE_LENGTH",
"elk.layered.nodePlacement.strategy": "NETWORK_SIMPLEX",
};
const [size, setSize] = React.useState({
width: 2000,
height: 2000,
});
const PREMIUM_LIMIT = 200;
const ERROR_LIMIT_TREE = 5_000;
const ERROR_LIMIT = 10_000;
const setConfig = useConfig((state) => state.setConfig);
const [expand, layout] = useConfig(
(state) => [state.expand, state.layout],
shallow
);
const GraphCanvas = ({ isWidget }: GraphProps) => {
const { validateHiddenNodes } = useToggleHide();
const setLoading = useGraph(state => state.setLoading);
const centerView = useGraph(state => state.centerView);
const direction = useGraph(state => state.direction);
const nodes = useGraph(state => state.nodes);
const edges = useGraph(state => state.edges);
const handleNodeClick = React.useCallback(
(e: React.MouseEvent<SVGElement>, data: NodeData) => {
setSelectedNode(data.text);
openModal();
const [paneWidth, setPaneWidth] = React.useState(2000);
const [paneHeight, setPaneHeight] = React.useState(2000);
const onLayoutChange = React.useCallback(
(layout: ElkRoot) => {
if (layout.width && layout.height) {
const areaSize = layout.width * layout.height;
const changeRatio = Math.abs((areaSize * 100) / (paneWidth * paneHeight) - 100);
setPaneWidth(layout.width + 50);
setPaneHeight((layout.height as number) + 50);
setTimeout(() => {
validateHiddenNodes();
window.requestAnimationFrame(() => {
if (changeRatio > 70 || isWidget) centerView();
setLoading(false);
});
});
}
},
[openModal, setSelectedNode]
[isWidget, paneHeight, paneWidth, centerView, setLoading, validateHiddenNodes]
);
const onInit = (ref: ReactZoomPanPinchRef) => {
setConfig("zoomPanPinch", ref);
};
const onLayoutChange = (layout: ElkRoot) => {
if (layout.width && layout.height)
setSize({ width: layout.width, height: layout.height });
};
React.useEffect(() => {
const { nodes, edges } = getEdgeNodes(json, expand);
setGraphValue("nodes", nodes);
setGraphValue("edges", edges);
}, [expand, json, setGraphValue]);
return (
<StyledEditorWrapper isWidget={isWidget}>
<TransformWrapper
onInit={onInit}
maxScale={1.8}
minScale={0.4}
initialScale={0.7}
wheel={{
step: 0.05,
}}
doubleClick={{
disabled: true,
}}
>
<TransformComponent
wrapperStyle={{
width: "100%",
height: "100%",
overflow: "hidden",
}}
>
<Canvas
nodes={nodes}
edges={edges}
maxWidth={size.width + 100}
maxHeight={size.height + 100}
direction={layout}
key={layout}
onLayoutChange={onLayoutChange}
node={(props) => (
<CustomNode {...props} onClick={handleNodeClick} />
)}
edge={(props) => (
<Edge {...props} containerClassName={`edge-${props.id}`} />
)}
zoomable={false}
readonly
/>
</TransformComponent>
</TransformWrapper>
</StyledEditorWrapper>
<Canvas
className="jsoncrack-canvas"
onLayoutChange={onLayoutChange}
node={p => <CustomNode {...p} />}
edge={p => <CustomEdge {...p} />}
nodes={nodes}
edges={edges}
maxHeight={paneHeight}
maxWidth={paneWidth}
height={paneHeight}
width={paneWidth}
direction={direction}
layoutOptions={layoutOptions}
key={direction}
pannable={false}
zoomable={false}
animated={false}
readonly={true}
dragEdge={null}
dragNode={null}
fit={true}
/>
);
});
};
export const Graph = ({ isWidget = false }: { isWidget?: boolean }) => {
const [isModalVisible, setModalVisible] = React.useState(false);
const [selectedNode, setSelectedNode] = React.useState<object>({});
function getViewType(nodes: NodeData[]) {
if (nodes.length > ERROR_LIMIT) return "error";
if (nodes.length > ERROR_LIMIT_TREE) return "tree";
if (nodes.length > PREMIUM_LIMIT) return "premium";
return "graph";
}
const openModal = React.useCallback(() => setModalVisible(true), []);
export const Graph = ({ isWidget = false }: GraphProps) => {
const setViewPort = useGraph(state => state.setViewPort);
const loading = useGraph(state => state.loading);
const isPremium = useUser(state => state.premium);
const viewType = useGraph(state => getViewType(state.nodes));
const gesturesEnabled = useConfig(state => state.gesturesEnabled);
const rulersEnabled = useConfig(state => state.rulersEnabled);
const setViewMode = useConfig(state => state.setViewMode);
const collapsedNodes = useGraph((state) => state.collapsedNodes);
const collapsedEdges = useGraph((state) => state.collapsedEdges);
const callback = React.useCallback(() => {
const canvas = document.querySelector(".jsoncrack-canvas") as HTMLDivElement | null;
canvas?.classList.add("dragging");
}, []);
React.useEffect(() => {
const nodeList = collapsedNodes.map((id) => `[id*="node-${id}"]`);
const edgeList = collapsedEdges.map((id) => `[class*="edge-${id}"]`);
const bindLongPress = useLongPress(callback, {
threshold: 150,
onFinish: () => {
const canvas = document.querySelector(".jsoncrack-canvas") as HTMLDivElement | null;
canvas?.classList.remove("dragging");
},
});
const hiddenItems = document.querySelectorAll(".hide");
hiddenItems.forEach((item) => item.classList.remove("hide"));
const blurOnClick = React.useCallback(() => {
if ("activeElement" in document) (document.activeElement as HTMLElement)?.blur();
}, []);
if (nodeList.length) {
const selectedNodes = document.querySelectorAll(nodeList.join(","));
const selectedEdges = document.querySelectorAll(edgeList.join(","));
if (viewType === "error") {
return <ErrorView />;
}
selectedNodes.forEach((node) => node.classList.add("hide"));
selectedEdges.forEach((edge) => edge.classList.add("hide"));
}
}, [collapsedNodes, collapsedEdges]);
if (viewType === "tree") {
setViewMode(ViewMode.Tree);
toast("This document is too large to display as a graph. Switching to tree view.");
}
if (viewType === "premium" && !isWidget) {
if (!isPremium) return <PremiumView />;
}
return (
<>
<MemoizedGraph
openModal={openModal}
setSelectedNode={setSelectedNode}
isWidget={isWidget}
/>
{!isWidget && (
<NodeModal
selectedNode={selectedNode}
visible={isModalVisible}
closeModal={() => setModalVisible(false)}
/>
)}
<Loading loading={loading} message="Painting graph..." />
<StyledEditorWrapper
$widget={isWidget}
onContextMenu={e => e.preventDefault()}
onClick={blurOnClick}
key={String(gesturesEnabled)}
$showRulers={rulersEnabled}
{...bindLongPress()}
>
<Space
onCreate={setViewPort}
onContextMenu={e => e.preventDefault()}
treatTwoFingerTrackPadGesturesLikeTouch={gesturesEnabled}
pollForElementResizing
>
<GraphCanvas isWidget={isWidget} />
</Space>
</StyledEditorWrapper>
</>
);
};
+20
View File
@@ -0,0 +1,20 @@
import React from "react";
import { useRouter } from "next/router";
export const HovercardAds = () => {
const router = useRouter();
React.useEffect(() => {
const isAvailable = document.querySelectorAll("#_hellobar_")[0];
if (typeof window._bsa !== "undefined" && window._bsa && !!!isAvailable) {
window._bsa.init("hellobar", "CE7IPKQL", "placement:jsoncrackcom");
}
if (isAvailable) {
window._bsa.reload("#_hellobar_");
}
}, [router.asPath]);
return <div id="hellobarContainer"></div>;
};
-21
View File
@@ -1,21 +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} />
);
-49
View File
@@ -1,49 +0,0 @@
import React from "react";
import styled from "styled-components";
interface LoadingProps {
message?: string;
}
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: 10;
`;
const StyledLogo = styled.h2`
font-weight: 600;
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> = ({ message }) => {
return (
<StyledLoading>
<StyledLogo>
<StyledText>JSON</StyledText> Visio
</StyledLogo>
<StyledMessage>
{message ?? "Preparing the environment for you..."}
</StyledMessage>
</StyledLoading>
);
};
-73
View File
@@ -1,73 +0,0 @@
import React from "react";
import { ReactComponent } from "src/typings/global";
import { Button } from "src/components/Button";
import * as Styled from "./styles";
import useKeyPress from "src/hooks/useKeyPress";
type ControlProps = React.PropsWithChildren<{
setVisible: (status: boolean) => void;
}>;
type ModalTypes = {
Header: ReactComponent;
Content: ReactComponent;
Controls: React.FC<ControlProps>;
};
export interface ModalProps {
visible: boolean;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
}
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,
}) => {
const onClick = (e: React.SyntheticEvent<HTMLDivElement>) => {
if (e.currentTarget === e.target) {
setVisible((v) => !v);
}
};
if (!visible) return null;
return (
<Styled.ModalWrapper onClick={onClick}>
<Styled.ModalInnerWrapper>{children}</Styled.ModalInnerWrapper>
</Styled.ModalWrapper>
);
};
Modal.Header = Header;
Modal.Content = Content;
Modal.Controls = Controls;
export { Modal };
-59
View File
@@ -1,59 +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`
min-width: 440px;
max-width: 490px;
width: fit-content;
animation: ${appearAnimation} 220ms ease-in-out;
line-height: 20px;
`;
export const Title = styled.h2`
color: ${({ theme }) => theme.INTERACTIVE_ACTIVE};
font-size: 20px !important;
margin: 0;
`;
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;
`;
export const ControlsWrapper = styled.div`
display: flex;
flex-direction: row-reverse;
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
padding: 16px;
border-radius: 0 0 5px 5px;
gap: 10px;
`;
+87
View File
@@ -0,0 +1,87 @@
import React from "react";
import styled from "styled-components";
import Editor, { loader, useMonaco } from "@monaco-editor/react";
import { Loading } from "src/layout/Loading";
import useConfig from "src/store/useConfig";
import useFile from "src/store/useFile";
loader.config({
paths: {
vs: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.0/min/vs",
},
});
const editorOptions = {
formatOnPaste: true,
formatOnType: true,
minimap: {
enabled: false,
},
};
const StyledWrapper = styled.div`
display: grid;
height: calc(100vh - 63px);
grid-template-columns: 100%;
grid-template-rows: minmax(0, 1fr);
`;
export const MonacoEditor = () => {
const monaco = useMonaco();
const contents = useFile(state => state.contents);
const setContents = useFile(state => state.setContents);
const setError = useFile(state => state.setError);
const jsonSchema = useFile(state => state.jsonSchema);
const getHasChanges = useFile(state => state.getHasChanges);
const theme = useConfig(state => (state.darkmodeEnabled ? "vs-dark" : "light"));
const fileType = useFile(state => state.format);
React.useEffect(() => {
monaco?.languages.json.jsonDefaults.setDiagnosticsOptions({
validate: true,
allowComments: true,
enableSchemaRequest: true,
...(jsonSchema && {
schemas: [
{
fileMatch: ["*"],
schema: jsonSchema,
},
],
}),
});
}, [jsonSchema, monaco?.languages.json.jsonDefaults]);
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
height="100%"
language={fileType}
theme={theme}
value={contents}
options={editorOptions}
onValidate={errors => setError(errors[0]?.message)}
onChange={contents => setContents({ contents, skipUpdate: true })}
loading={<Loading message="Loading Editor..." />}
/>
</StyledWrapper>
);
};
+23 -77
View File
@@ -1,86 +1,32 @@
import React from "react";
import { Flex, Input, Text } from "@mantine/core";
import { getHotkeyHandler } from "@mantine/hooks";
import ReactGA from "react-ga4";
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;
padding: 4px 6px;
`;
const StyledForm = styled.form`
display: flex;
`;
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 [searchValue, setValue, skip, nodeCount, currentNode] = useFocusNode();
return (
<StyledInputWrapper>
<StyledForm onSubmit={onSubmit}>
<StyledInput
type="text"
value={content.value}
onChange={(e) =>
setContent((val) => ({ ...val, value: e.target.value }))
}
placeholder="Search Node"
/>
</StyledForm>
<StyledSearchButton
aria-label="search"
onClick={() => setContent({ value: "", debounced: "" })}
>
{content.value ? (
<IoCloseSharp size={18} />
) : (
<AiOutlineSearch size={18} />
)}
</StyledSearchButton>
</StyledInputWrapper>
<Input
type="search"
size="xs"
id="search-node"
w={180}
value={searchValue}
onChange={e => setValue(e.currentTarget.value)}
onFocus={() => ReactGA.event({ action: "focus_node_search", category: "User" })}
placeholder="Search Node"
onKeyDown={getHotkeyHandler([["Enter", skip]])}
icon={<AiOutlineSearch />}
rightSection={
<Flex h={30} align="center" gap="sm">
<Text size="xs" color="dimmed">
{searchValue && `${nodeCount}/${nodeCount > 0 ? currentNode + 1 : "0"}`}
</Text>
</Flex>
}
/>
);
};
+4 -9
View File
@@ -1,5 +1,4 @@
import React from "react";
import packageJson from "package.json";
interface SeoTagsProps {
title: string;
@@ -7,16 +6,12 @@ interface SeoTagsProps {
image: string;
}
export const SeoTags: React.FC<SeoTagsProps> = ({
description,
title,
image,
}) => (
export const SeoTags: React.FC<SeoTagsProps> = ({ description, title, image }) => (
<>
<meta name="description" content={description} />
{/* <!-- Facebook Meta Tags --> */}
<meta property="og:url" content={packageJson.homepage} />
<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} />
@@ -24,8 +19,8 @@ export const SeoTags: React.FC<SeoTagsProps> = ({
{/* <!-- Twitter Meta Tags --> */}
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="jsonvisio.com" />
<meta property="twitter:url" content={packageJson.homepage} />
<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} />
-214
View File
@@ -1,214 +0,0 @@
import React from "react";
import toast from "react-hot-toast";
import Link from "next/link";
import styled from "styled-components";
import { CanvasDirection } from "reaflow";
import { TiFlowMerge } from "react-icons/ti";
import { CgArrowsMergeAltH, CgArrowsShrinkH } from "react-icons/cg";
import {
AiOutlineDelete,
AiFillGithub,
AiOutlineTwitter,
AiOutlineSave,
AiOutlineFileAdd,
AiOutlineLink,
} from "react-icons/ai";
import { Tooltip } from "src/components/Tooltip";
import { useRouter } from "next/router";
import { ImportModal } from "src/containers/Modals/ImportModal";
import { ClearModal } from "src/containers/Modals/ClearModal";
import { ShareModal } from "src/containers/Modals/ShareModal";
import useConfig from "src/hooks/store/useConfig";
import { getNextLayout } from "src/containers/Editor/LiveEditor/helpers";
import { HiHeart } from "react-icons/hi";
import shallow from "zustand/shallow";
import { IoAlertCircleSharp } from "react-icons/io5";
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};
`;
const StyledElement = styled.div<{ beta?: boolean }>`
position: relative;
display: flex;
justify-content: center;
text-align: center;
font-size: 26px;
font-weight: 600;
width: 100%;
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
cursor: pointer;
svg {
padding: 8px;
vertical-align: middle;
}
a {
display: flex;
}
&:hover :is(a, svg) {
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
}
`;
const StyledText = styled.span<{ secondary?: boolean }>`
color: ${({ theme, secondary }) =>
secondary ? theme.INTERACTIVE_NORMAL : 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%;
& > div:nth-child(n + 1) {
border-bottom: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
}
`;
const StyledBottomWrapper = styled.nav`
display: flex;
justify-content: space-between;
flex-direction: column;
align-items: center;
width: 100%;
& > div,
a:nth-child(0) {
border-top: 1px solid ${({ theme }) => theme.BACKGROUND_MODIFIER_ACCENT};
}
`;
const StyledLogo = styled.div`
color: ${({ theme }) => theme.FULL_WHITE};
`;
function rotateLayout(layout: CanvasDirection) {
if (layout === "LEFT") return 90;
if (layout === "UP") return 180;
if (layout === "RIGHT") return 270;
return 360;
}
export const Sidebar: React.FC = () => {
const getJson = useConfig((state) => state.getJson);
const setConfig = useConfig((state) => state.setConfig);
const [uploadVisible, setUploadVisible] = React.useState(false);
const [clearVisible, setClearVisible] = React.useState(false);
const [shareVisible, setShareVisible] = React.useState(false);
const { push } = useRouter();
const [expand, layout] = useConfig(
(state) => [state.expand, state.layout],
shallow
);
const handleSave = () => {
const a = document.createElement("a");
const file = new Blob([getJson()], { type: "text/plain" });
a.href = window.URL.createObjectURL(file);
a.download = "jsonvisio.json";
a.click();
};
const toggleExpandCollapse = () => {
setConfig("expand", !expand);
toast(`${expand ? "Collapsed" : "Expanded"} nodes.`);
};
const toggleLayout = () => {
const nextLayout = getNextLayout(layout);
setConfig("layout", nextLayout);
};
return (
<StyledSidebar>
<StyledTopWrapper>
<Link passHref href="/">
<StyledElement onClick={() => push("/")}>
<StyledLogo>
<StyledText>J</StyledText>
<StyledText secondary>V</StyledText>
</StyledLogo>
</StyledElement>
</Link>
<Tooltip title="Import File">
<StyledElement onClick={() => setUploadVisible(true)}>
<AiOutlineFileAdd />
</StyledElement>
</Tooltip>
<Tooltip title="Rotate Layout">
<StyledElement onClick={toggleLayout}>
<StyledFlowIcon rotate={rotateLayout(layout)} />
</StyledElement>
</Tooltip>
<Tooltip title={expand ? "Shrink Nodes" : "Expand Nodes"}>
<StyledElement
title="Toggle Expand/Collapse"
onClick={toggleExpandCollapse}
>
{expand ? <CgArrowsMergeAltH /> : <CgArrowsShrinkH />}
</StyledElement>
</Tooltip>
<Tooltip title="Save JSON">
<StyledElement onClick={handleSave}>
<AiOutlineSave />
</StyledElement>
</Tooltip>
<Tooltip title="Clear JSON">
<StyledElement onClick={() => setClearVisible(true)}>
<AiOutlineDelete />
</StyledElement>
</Tooltip>
<Tooltip title="Share">
<StyledElement onClick={() => setShareVisible(true)}>
<AiOutlineLink />
</StyledElement>
</Tooltip>
</StyledTopWrapper>
<StyledBottomWrapper>
<StyledElement>
<Link href="https://twitter.com/aykutsarach">
<a aria-label="Twitter" rel="me" target="_blank">
<AiOutlineTwitter />
</a>
</Link>
</StyledElement>
<StyledElement>
<Link href="https://github.com/AykutSarac/jsonvisio.com">
<a aria-label="GitHub" rel="me" target="_blank">
<AiFillGithub />
</a>
</Link>
</StyledElement>
<StyledElement>
<Link href="https://github.com/sponsors/AykutSarac">
<a aria-label="GitHub Sponsors" rel="me" target="_blank">
<HiHeart />
</a>
</Link>
</StyledElement>
</StyledBottomWrapper>
<ImportModal visible={uploadVisible} setVisible={setUploadVisible} />
<ClearModal visible={clearVisible} setVisible={setClearVisible} />
<ShareModal visible={shareVisible} setVisible={setShareVisible} />
</StyledSidebar>
);
};
-101
View File
@@ -1,101 +0,0 @@
import React from "react";
import useStored from "src/hooks/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: 100%;
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}>
<img
src={user.avatar}
alt={user.handle}
width="40"
height="40"
loading="lazy"
/>
</a>
</StyledSponsor>
))}
</StyledSponsorsWrapper>
);
};
-70
View File
@@ -1,70 +0,0 @@
import React from "react";
import styled from "styled-components";
import { IoIosCheckmarkCircle, IoMdCloseCircle } from "react-icons/io";
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")};
transition: 0.1s;
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;
-66
View File
@@ -1,66 +0,0 @@
import React from "react";
import styled from "styled-components";
interface TooltipProps {
title?: string;
}
const StyledTooltipWrapper = styled.div`
position: relative;
width: 100%;
height: 100%;
`;
const StyledTooltip = styled.div<{ visible: boolean }>`
position: absolute;
top: 0;
right: 0;
transform: translate(calc(100% + 15px), 10%);
z-index: 5;
background: ${({ theme }) => theme.BACKGROUND_PRIMARY};
color: ${({ theme }) => theme.TEXT_NORMAL};
border-radius: 5px;
padding: 4px 8px;
display: ${({ visible }) => (visible ? "initial" : "none")};
white-space: nowrap;
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;
}
`;
const StyledChildren = styled.div``;
export const Tooltip: React.FC<React.PropsWithChildren<TooltipProps>> = ({
children,
title,
}) => {
const [visible, setVisible] = React.useState(false);
return (
<StyledTooltipWrapper>
{title && <StyledTooltip visible={visible}>{title}</StyledTooltip>}
<StyledChildren
onMouseEnter={() => setVisible(true)}
onMouseLeave={() => setVisible(false)}
>
{children}
</StyledChildren>
</StyledTooltipWrapper>
);
};
-12
View File
@@ -1,12 +0,0 @@
import React from "react";
import { Button } from "src/components/Button";
import { screen, render } from "@testing-library/react";
describe("Button", () => {
it("should render Button component", () => {
render(<Button>Click Me!</Button>);
expect(
screen.getByRole("button", { name: /Click Me/ })
).toBeInTheDocument();
});
});
+17 -7
View File
@@ -1,5 +1,17 @@
import useUser from "src/store/useUser";
export const baseURL = process.env.NEXT_PUBLIC_BASE_URL as string;
export const paymentURL = () => {
const email = useUser.getState().user?.email;
let url = process.env.NEXT_PUBLIC_PAYMENT_URL as string;
if (email) url += `?checkout[email]=${email}`;
return url;
};
// Example taken from https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json
export const defaultJson = {
const sampleJson = Object.freeze({
squadName: "Super hero squad",
homeTown: "Metro City",
formed: 2016,
@@ -16,11 +28,7 @@ export const defaultJson = {
name: "Madame Uppercut",
age: 39,
secretIdentity: "Jane Wilson",
powers: [
"Million tonne punch",
"Damage resistance",
"Superhuman reflexes",
],
powers: ["Million tonne punch", "Damage resistance", "Superhuman reflexes"],
},
{
name: "Eternal Flame",
@@ -35,4 +43,6 @@ export const defaultJson = {
],
},
],
};
});
export const defaultJson = JSON.stringify(sampleJson, null, 2);
+18
View File
@@ -0,0 +1,18 @@
import { Fira_Mono } from "next/font/google";
import localFont from "next/font/local";
const monaSans = localFont({
src: "../assets/fonts/Mona-Sans.woff2",
variable: "--mona-sans",
display: "swap",
fallback: ["Futura, Helvetica, sans-serif", "Tahoma, Verdana, sans-serif"],
});
const firaMono = Fira_Mono({
weight: ["500"],
subsets: ["latin"],
display: "swap",
fallback: ["Menlo, Monaco, monospace", "Consolas, Courier New, monospace"],
});
export { monaSans, firaMono };
+39 -48
View File
@@ -2,76 +2,68 @@ import { createGlobalStyle } from "styled-components";
const GlobalStyle = createGlobalStyle`
html, body {
margin: 0;
padding: 0;
box-sizing: border-box;
color: ${({ theme }) => theme.FULL_WHITE};
font-family: 'Catamaran', sans-serif;
color: ${({ theme }) => theme.FULL_WHITE} !important;
font-weight: 400;
font-size: 16px;
scroll-behavior: smooth;
background: rgb(246,249,253) !important;
background: radial-gradient(circle, rgb(245 245 245) 33%, rgb(252 252 255) 100%) !important;
background-color: #000000;
opacity: 1;
background-image: radial-gradient(#414141 0.5px, #000000 0.5px);
background-size: 10px 10px;
@media only screen and (min-width: 768px) {
background-color: #000000;
opacity: 1;
background-image: radial-gradient(#414141 0.5px, #000000 0.5px);
background-size: 15px 15px;
@media only screen and (max-width: 768px) {
background-position: right;
}
}
* {
-webkit-tap-highlight-color: transparent;
scroll-behavior: smooth !important;
}
.hide {
display: none;
}
/* g {
opacity: 1 !important;
} */
.mantine-Modal-inner {
padding: 0;
}
svg {
vertical-align: text-top;
}
a {
text-decoration: none;
color: unset;
text-decoration: none;
}
button {
min-height: 32px;
border: none;
border-radius: 3px;
outline: none;
font-family: 'Catamaran', sans-serif;
font-weight: 500;
font-size: 14px;
background-image: none;
background: transparent;
width: fit-content;
margin: 0;
padding: 0;
cursor: pointer;
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);
}
}
#carbonads * {
margin: initial;
padding: initial;
line-height: initial;
margin: initial;
padding: initial;
line-height: initial;
}
#carbonads {
--carbon-font-size: 16px;
--carbon-padding-size: 12px;
border-radius: 4px;
overflow: hidden;
}
#carbonads {
width: 100%;
z-index: 100;
display: inline-block;
display: block;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue',
@@ -80,11 +72,9 @@ const GlobalStyle = createGlobalStyle`
}
#carbonads > span {
min-width: 18.75em;
max-width: clamp(18.75em, 22.5em, 24.5em);
min-height: 100px;
background-color: ${({ theme }) => theme.BACKGROUND_SECONDARY};
background-color: hsl(0, 0%, 10%);
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),
@@ -93,11 +83,11 @@ const GlobalStyle = createGlobalStyle`
#carbonads a {
text-decoration: none;
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
color: #ddd;
}
#carbonads a:hover {
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
color: #ddd;
}
#carbonads span {
@@ -130,8 +120,8 @@ const GlobalStyle = createGlobalStyle`
#carbonads .carbon-poweredby {
display: block;
padding: 6px 8px;
color: ${({ theme }) => theme.TEXT_NORMAL};
background: ${({ theme }) => theme.BACKGROUND_TERTIARY};
color: #aaa;
background: #1e2021;
text-align: center;
text-transform: uppercase;
letter-spacing: 0.1ch;
@@ -143,6 +133,7 @@ const GlobalStyle = createGlobalStyle`
bottom: 0;
right: 0;
}
`;
export default GlobalStyle;
+78 -8
View File
@@ -1,8 +1,7 @@
import { DefaultTheme } from "styled-components";
const fixedColors = {
CRIMSON: "#DC143C",
BLURPLE: "#5865F2",
PURPLE: "#9036AF",
FULL_WHITE: "#FFFFFF",
BLACK: "#202225",
BLACK_DARK: "#2C2F33",
@@ -11,19 +10,72 @@ 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",
TEXT_DANGER: "#db662e",
};
export const darkTheme: DefaultTheme = {
const promptInputColors = {
dark: {
PROMPT_BG: "#072719",
PROMPT_PLACEHOLDER_COLOR: "#15593A",
PROMPT_TEXT_COLOR: "#3DCF8E",
PROMPT_BORDER_COLOR: "#0C3924",
},
light: {
PROMPT_BG: "#d3ede1",
PROMPT_PLACEHOLDER_COLOR: "#77c2a1",
PROMPT_TEXT_COLOR: "#289b67",
PROMPT_BORDER_COLOR: "#8ad7b3",
},
};
const nodeColors = {
dark: {
NODE_COLORS: {
TEXT: "#DCE5E7",
NODE_KEY: "#59b8ff",
NODE_VALUE: "#DCE5E7",
INTEGER: "#e8c479",
NULL: "#939598",
BOOL: {
FALSE: "#F85C50",
TRUE: "#00DC7D",
},
PARENT_ARR: "#FC9A40",
PARENT_OBJ: "#59b8ff",
CHILD_COUNT: "white",
},
},
light: {
NODE_COLORS: {
TEXT: "#000",
NODE_KEY: "#761CEA",
NODE_VALUE: "#535353",
INTEGER: "#FD0079",
NULL: "#afafaf",
BOOL: {
FALSE: "#FF0000",
TRUE: "#748700",
},
PARENT_ARR: "#FF6B00",
PARENT_OBJ: "#761CEA",
CHILD_COUNT: "#535353",
},
},
};
export const darkTheme = {
...fixedColors,
...nodeColors.dark,
...promptInputColors.dark,
BLACK_SECONDARY: "#23272A",
SILVER_DARK: "#4D4D4D",
NODE_KEY: "#FAA81A",
OBJECT_KEY: "#59b8ff",
SIDEBAR_ICONS: "#8B8E90",
INTERACTIVE_NORMAL: "#b9bbbe",
INTERACTIVE_HOVER: "#dcddde",
@@ -31,29 +83,47 @@ export const darkTheme: DefaultTheme = {
BACKGROUND_NODE: "#2B2C3E",
BACKGROUND_TERTIARY: "#202225",
BACKGROUND_SECONDARY: "#2f3136",
TOOLBAR_BG: "#2f3136",
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%)",
} as const;
GRID_BG_COLOR: "#1C1C1C",
GRID_COLOR_PRIMARY: "#2A2A2A",
GRID_COLOR_SECONDARY: "#252525",
};
export const lightTheme: DefaultTheme = {
export const lightTheme = {
...fixedColors,
...nodeColors.light,
...promptInputColors.light,
BLACK_SECONDARY: "#F2F2F2",
SILVER_DARK: "#CCCCCC",
NODE_KEY: "#DC3790",
OBJECT_KEY: "#0260E8",
SIDEBAR_ICONS: "#6D6E70",
INTERACTIVE_NORMAL: "#4f5660",
INTERACTIVE_HOVER: "#2e3338",
INTERACTIVE_ACTIVE: "#060607",
BACKGROUND_NODE: "#FAFAFA",
BACKGROUND_NODE: "#F6F8FA",
BACKGROUND_TERTIARY: "#e3e5e8",
BACKGROUND_SECONDARY: "#f2f3f5",
TOOLBAR_BG: "#FAFAFA",
BACKGROUND_PRIMARY: "#FFFFFF",
BACKGROUND_MODIFIER_ACCENT: "rgba(106,116,128,0.24)",
MODAL_BACKGROUND: "#FFFFFF",
TEXT_NORMAL: "#2e3338",
TEXT_POSITIVE: "#008736",
} as const;
GRID_BG_COLOR: "#f3f3f3",
GRID_COLOR_PRIMARY: "#E0E0E0",
GRID_COLOR_SECONDARY: "#E4E4E4",
};
const themeDs = {
...lightTheme,
...darkTheme,
};
export default themeDs;
+270
View File
@@ -0,0 +1,270 @@
import React from "react";
import Head from "next/head";
import { useRouter } from "next/router";
import styled from "styled-components";
import { Flex, Popover, Text } from "@mantine/core";
import toast from "react-hot-toast";
import {
AiOutlineCloudSync,
AiOutlineCloudUpload,
AiOutlineLink,
AiOutlineLock,
AiOutlineUnlock,
} from "react-icons/ai";
import { BiSolidDockLeft } from "react-icons/bi";
import { MdOutlineCheckCircleOutline } from "react-icons/md";
import { TbTransform } from "react-icons/tb";
import { VscError, VscFeedback, VscSourceControl, VscSync, VscSyncIgnored } from "react-icons/vsc";
import { documentSvc } from "src/services/document.service";
import useConfig from "src/store/useConfig";
import useFile from "src/store/useFile";
import useGraph from "src/store/useGraph";
import useModal from "src/store/useModal";
import useUser from "src/store/useUser";
const StyledBottomBar = styled.div`
position: relative;
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: 27px;
height: 27px;
z-index: 35;
padding-right: 6px;
@media screen and (max-width: 320px) {
display: none;
}
`;
const StyledLeft = styled.div`
display: flex;
align-items: center;
justify-content: left;
gap: 4px;
padding-left: 8px;
@media screen and (max-width: 480px) {
display: none;
}
`;
const StyledRight = styled.div`
display: flex;
align-items: center;
justify-content: right;
gap: 4px;
`;
const StyledBottomBarItem = styled.button<{ $bg?: string }>`
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};
background: ${({ $bg }) => $bg};
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
&:hover:not(&:disabled) {
background-image: linear-gradient(rgba(0, 0, 0, 0.1) 0 0);
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
}
&:disabled {
opacity: 0.6;
cursor: default;
}
`;
export const BottomBar = () => {
const { query, replace } = useRouter();
const data = useFile(state => state.fileData);
const user = useUser(state => state.user);
const toggleLiveTransform = useConfig(state => state.toggleLiveTransform);
const liveTransformEnabled = useConfig(state => state.liveTransformEnabled);
const hasChanges = useFile(state => state.hasChanges);
const error = useFile(state => state.error);
const getContents = useFile(state => state.getContents);
const setContents = useFile(state => state.setContents);
const nodeCount = useGraph(state => state.nodes.length);
const fileName = useFile(state => state.fileData?.name);
const toggleFullscreen = useGraph(state => state.toggleFullscreen);
const fullscreen = useGraph(state => state.fullscreen);
const setVisible = useModal(state => state.setVisible);
const setHasChanges = useFile(state => state.setHasChanges);
const getFormat = useFile(state => state.getFormat);
const [isPrivate, setIsPrivate] = React.useState(false);
const [isUpdating, setIsUpdating] = React.useState(false);
const toggleEditor = () => toggleFullscreen(!fullscreen);
React.useEffect(() => {
setIsPrivate(data?.private ?? true);
}, [data]);
const handleSaveJson = React.useCallback(async () => {
if (!user) return setVisible("login")(true);
if (
hasChanges &&
!error &&
(typeof query.json === "string" || typeof query.json === "undefined")
) {
try {
setIsUpdating(true);
toast.loading("Saving document...", { id: "fileSave" });
const { data, error } = await documentSvc.upsert({
id: query?.json,
contents: getContents(),
format: getFormat(),
});
if (error) throw error;
if (data) replace({ query: { json: data } });
toast.success("Document saved to cloud", { id: "fileSave" });
setHasChanges(false);
} catch (error: any) {
toast.error(error.message, { id: "fileSave" });
} finally {
setIsUpdating(false);
}
}
}, [
error,
getContents,
getFormat,
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();
setIsUpdating(true);
const { data: updatedJsonData, error } = await documentSvc.update(query.json as string, {
private: !isPrivate,
});
if (error) return toast.error(error.message);
if (updatedJsonData[0]) {
setIsPrivate(updatedJsonData[0].private);
toast.success(`Document set to ${isPrivate ? "public" : "private"}.`);
} else throw error;
} catch (error) {
console.error(error);
} finally {
setIsUpdating(false);
}
};
return (
<StyledBottomBar>
{data?.name && (
<Head>
<title>{data.name} | JSON Crack</title>
</Head>
)}
<StyledLeft>
<StyledBottomBarItem onClick={toggleEditor}>
<BiSolidDockLeft />
</StyledBottomBarItem>
{fileName && (
<StyledBottomBarItem onClick={() => setVisible("cloud")(true)}>
<VscSourceControl />
{fileName}
</StyledBottomBarItem>
)}
<StyledBottomBarItem>
{error ? (
<Popover width="auto" shadow="md" position="top" withArrow>
<Popover.Target>
<Flex align="center" gap={2}>
<VscError color="red" size={16} />
<Text color="red" fw="bold">
Invalid
</Text>
</Flex>
</Popover.Target>
<Popover.Dropdown sx={{ pointerEvents: "none" }}>
<Text size="xs">{error}</Text>
</Popover.Dropdown>
</Popover>
) : (
<Flex align="center" gap={2}>
<MdOutlineCheckCircleOutline />
<Text>Valid</Text>
</Flex>
)}
</StyledBottomBarItem>
{(data?.owner_email === user?.email || (!data && user)) && (
<StyledBottomBarItem onClick={handleSaveJson} disabled={isUpdating || error}>
{hasChanges || !user ? <AiOutlineCloudUpload /> : <AiOutlineCloudSync />}
{hasChanges || !user ? (query?.json ? "Unsaved Changes" : "Save to Cloud") : "Saved"}
</StyledBottomBarItem>
)}
{data?.owner_email === user?.email && (
<StyledBottomBarItem onClick={setPrivate} disabled={isUpdating}>
{isPrivate ? <AiOutlineLock /> : <AiOutlineUnlock />}
{isPrivate ? "Private" : "Public"}
</StyledBottomBarItem>
)}
<StyledBottomBarItem
onClick={() => setVisible("share")(true)}
disabled={isPrivate || !data}
>
<AiOutlineLink />
Share
</StyledBottomBarItem>
{liveTransformEnabled ? (
<StyledBottomBarItem onClick={() => toggleLiveTransform(false)}>
<VscSync />
<Text>Live Transform</Text>
</StyledBottomBarItem>
) : (
<StyledBottomBarItem onClick={() => toggleLiveTransform(true)}>
<VscSyncIgnored />
<Text>Manual Transform</Text>
</StyledBottomBarItem>
)}
{!liveTransformEnabled && (
<StyledBottomBarItem onClick={() => setContents({})}>
<TbTransform />
Transform
</StyledBottomBarItem>
)}
</StyledLeft>
<StyledRight>
<StyledBottomBarItem>Nodes: {nodeCount}</StyledBottomBarItem>
<StyledBottomBarItem onClick={() => setVisible("review")(true)}>
<VscFeedback />
Feedback
</StyledBottomBarItem>
</StyledRight>
</StyledBottomBar>
);
};
+109 -68
View File
@@ -1,91 +1,132 @@
import React from "react";
import styled from "styled-components";
import Editor from "@monaco-editor/react";
import parseJson from "parse-json";
import { loader } from "@monaco-editor/react";
import { ErrorContainer } from "src/components/ErrorContainer/ErrorContainer";
import useConfig from "src/hooks/store/useConfig";
import { Loading } from "src/components/Loading";
import useStored from "src/hooks/store/useStored";
loader.config({
paths: {
vs: "https://microsoft.github.io/monaco-editor/node_modules/monaco-editor/min/vs",
},
});
import { ActionIcon, Input, Loader, Tooltip } from "@mantine/core";
import { getHotkeyHandler, useSessionStorage } from "@mantine/hooks";
import { toast } from "react-hot-toast";
import { GoDependabot } from "react-icons/go";
import { VscClose, VscQuestion } from "react-icons/vsc";
import { MonacoEditor } from "src/components/MonacoEditor";
import useJsonQuery from "src/hooks/useJsonQuery";
import { supabase } from "src/lib/api/supabase";
import useUser from "src/store/useUser";
const StyledEditorWrapper = styled.div`
display: flex;
flex-direction: column;
height: 100%;
overflow: auto;
user-select: none;
`;
const editorOptions = {
formatOnPaste: true,
minimap: {
enabled: false,
},
};
function removeWhitespaces(inputString: string) {
// Remove extra whitespaces and newlines
const compactString = inputString.replace(/\s+/g, "").replaceAll("interface", "interface ");
return compactString;
}
const StyledWrapper = styled.div`
display: grid;
height: calc(100vh - 36px);
grid-template-columns: 100%;
grid-template-rows: minmax(0, 1fr);
const StyledPromptInput = styled(Input)`
.mantine-Input-input {
font-weight: 500;
background: ${({ theme }) => theme.PROMPT_BG};
color: ${({ theme }) => theme.PROMPT_TEXT_COLOR};
border: none;
border-bottom: 1px solid ${({ theme }) => theme.PROMPT_BORDER_COLOR};
:focus-within {
border-color: #15593a;
}
}
svg {
color: ${({ theme }) => theme.PROMPT_TEXT_COLOR};
}
::placeholder {
color: ${({ theme }) => theme.PROMPT_PLACEHOLDER_COLOR};
}
`;
export const JsonEditor: React.FC = () => {
const [value, setValue] = React.useState<string | undefined>("");
const [error, setError] = React.useState("");
const PromptInput = () => {
const { updateJson, getJsonType } = useJsonQuery();
const premium = useUser(state => state.premium);
const [completing, setCompleting] = React.useState(false);
const [prompt, setPrompt] = React.useState("");
const [promptVisible, setPromptVisible] = useSessionStorage({
key: "promptVisible",
defaultValue: true,
});
const json = useConfig((state) => state.json);
const lightmode = useStored((state) => state.lightmode);
const setJson = useConfig((state) => state.setJson);
const onSubmit = async () => {
try {
setCompleting(true);
const editorTheme = React.useMemo(
() => (lightmode ? "light" : "vs-dark"),
[lightmode]
);
const resp = await supabase.functions.invoke("jq", {
body: {
query: prompt,
jsonModel: removeWhitespaces(getJsonType()),
},
});
React.useEffect(() => {
setValue(JSON.stringify(JSON.parse(json), null, 2));
}, [json]);
updateJson(resp.data.choices[0].message?.content || "");
} catch (error) {
toast.error("An error occured while parsing result.");
} finally {
setCompleting(false);
}
};
React.useEffect(() => {
const formatTimer = setTimeout(() => {
try {
if (!value) {
setError("");
return setJson("{}");
}
parseJson(value);
setJson(value);
setError("");
} catch (jsonError: any) {
setError(jsonError.message);
}
}, 1500);
return () => clearTimeout(formatTimer);
}, [value, setJson]);
if (!promptVisible) return null;
return (
<StyledEditorWrapper>
<ErrorContainer error={error} />
<StyledWrapper>
<Editor
height="100%"
defaultLanguage="json"
value={value}
theme={editorTheme}
options={editorOptions}
onChange={setValue}
loading={<Loading message="Loading Editor..." />}
<Tooltip.Floating
disabled={premium}
label="JSON Crack AI is currently only available to premium users"
fz="xs"
withinPortal
>
<div>
<StyledPromptInput
placeholder="Ask JSON Crack AI to transform the data"
value={prompt}
onChange={e => setPrompt(e.currentTarget.value)}
rightSectionWidth={60}
maxLength={200}
disabled={!premium || completing}
onKeyDown={getHotkeyHandler([["Enter", onSubmit]])}
onSubmit={onSubmit}
rightSection={
<>
<Tooltip
label="This feature is in the experimental phase, and its outcomes may not consistently reflect accuracy. It solely utilizes the schema without incorporating values, hence your actions should align with your particular schema. Please note that we do not store your data."
maw={300}
multiline
withinPortal
fz="xs"
withArrow
>
<ActionIcon>
<VscQuestion />
</ActionIcon>
</Tooltip>
<ActionIcon title="Close" onClick={() => setPromptVisible(false)}>
<VscClose />
</ActionIcon>
</>
}
icon={completing ? <Loader size="xs" /> : <GoDependabot strokeWidth={1} />}
radius={0}
/>
</StyledWrapper>
</div>
</Tooltip.Floating>
);
};
export const JsonEditor: React.FC = () => {
return (
<StyledEditorWrapper>
{/* <PromptInput /> */}
<MonacoEditor />
</StyledEditorWrapper>
);
};
export default JsonEditor;
+563
View File
@@ -0,0 +1,563 @@
import React from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import styled from "styled-components";
import {
Avatar,
Flex,
Group,
Input,
MediaQuery,
Menu,
SegmentedControl,
Select,
Text,
} from "@mantine/core";
import { getHotkeyHandler, useHotkeys } from "@mantine/hooks";
import ReactGA from "react-ga4";
import toast from "react-hot-toast";
import { AiOutlineFullscreen } from "react-icons/ai";
import { BsCheck2 } from "react-icons/bs";
import { CgArrowsMergeAltH, CgArrowsShrinkH, CgChevronDown } from "react-icons/cg";
import { FiDownload } from "react-icons/fi";
import { MdOutlineWorkspacePremium } from "react-icons/md";
import { SiJsonwebtokens } from "react-icons/si";
import { TiFlowMerge } from "react-icons/ti";
import {
VscCollapseAll,
VscExpandAll,
VscJson,
VscTarget,
VscSearchFuzzy,
VscGroupByRefType,
VscSignOut,
VscFeedback,
VscSignIn,
} from "react-icons/vsc";
import { SearchInput } from "src/components/SearchInput";
import { FileFormat } from "src/enums/file.enum";
import { ViewMode } from "src/enums/viewMode.enum";
import useToggleHide from "src/hooks/useToggleHide";
import { JSONCrackLogo } from "src/layout/JsonCrackLogo";
import { getNextDirection } from "src/lib/utils/graph/getNextDirection";
import { isIframe } from "src/lib/utils/widget";
import useConfig from "src/store/useConfig";
import useFile from "src/store/useFile";
import useGraph from "src/store/useGraph";
import useJson from "src/store/useJson";
import useModal from "src/store/useModal";
import useUser from "src/store/useUser";
export const StyledTools = styled.div`
position: relative;
display: flex;
align-items: center;
gap: 4px;
justify-content: space-between;
height: 36px;
padding: 4px 8px;
background: ${({ theme }) => theme.TOOLBAR_BG};
color: ${({ theme }) => theme.SILVER};
box-shadow: 0 1px 0px ${({ theme }) => theme.BACKGROUND_TERTIARY};
z-index: 36;
@media only screen and (max-width: 320px) {
display: none;
}
`;
const StyledToolElement = styled.button<{ $hide?: boolean }>`
display: ${({ $hide }) => ($hide ? "none" : "grid")};
place-content: center;
font-size: 12px;
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;
}
`;
const StyledFlowIcon = styled(TiFlowMerge)<{ rotate: number }>`
transform: rotate(${({ rotate }) => `${rotate}deg`});
`;
function rotateLayout(direction: "LEFT" | "RIGHT" | "DOWN" | "UP") {
if (direction === "LEFT") return 90;
if (direction === "UP") return 180;
if (direction === "RIGHT") return 270;
return 360;
}
function fullscreenBrowser() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen().catch(() => {
toast.error("Unable to enter fullscreen mode.");
});
} else if (document.exitFullscreen) {
document.exitFullscreen();
}
}
const ViewMenu = () => {
const { validateHiddenNodes } = useToggleHide();
const [coreKey, setCoreKey] = React.useState("CTRL");
const toggleFold = useGraph(state => state.toggleFold);
const setDirection = useGraph(state => state.setDirection);
const direction = useGraph(state => state.direction);
const expandGraph = useGraph(state => state.expandGraph);
const collapseGraph = useGraph(state => state.collapseGraph);
const focusFirstNode = useGraph(state => state.focusFirstNode);
const foldNodes = useGraph(state => state.foldNodes);
const graphCollapsed = useGraph(state => state.graphCollapsed);
const toggleFoldNodes = () => {
toggleFold(!foldNodes);
toast(`${foldNodes ? "Unfolded" : "Folded"} nodes`);
};
const toggleDirection = () => {
const nextDirection = getNextDirection(direction || "RIGHT");
if (setDirection) setDirection(nextDirection);
};
const toggleExpandCollapseGraph = () => {
if (graphCollapsed) expandGraph();
else collapseGraph();
validateHiddenNodes();
toast(`${graphCollapsed ? "Expanded" : "Collapsed"} graph.`);
};
useHotkeys([
["mod+shift+d", toggleDirection],
["mod+shift+f", toggleFoldNodes],
["mod+shift+c", toggleExpandCollapseGraph],
[
"mod+f",
() => {
const input = document.querySelector("#search-node") as HTMLInputElement;
input.focus();
},
],
]);
React.useEffect(() => {
if (typeof window !== "undefined") {
setCoreKey(navigator.userAgent.indexOf("Mac OS X") ? "⌘" : "CTRL");
}
}, []);
return (
<Menu shadow="md" closeOnItemClick={false} withArrow>
<Menu.Target>
<StyledToolElement>
<Flex align="center" gap={3}>
View <CgChevronDown />
</Flex>
</StyledToolElement>
</Menu.Target>
<Menu.Dropdown>
<Menu.Item
fz={12}
onClick={() => {
toggleDirection();
ReactGA.event({
action: "toggle_layout_direction",
category: "User",
label: "Tools",
});
}}
icon={<StyledFlowIcon rotate={rotateLayout(direction || "RIGHT")} />}
rightSection={
<Text ml="md" fz={10} color="dimmed">
{coreKey} Shift D
</Text>
}
>
Rotate Layout
</Menu.Item>
<Menu.Item
fz={12}
onClick={() => {
toggleFoldNodes();
ReactGA.event({
action: "toggle_fold_nodes",
category: "User",
label: "Tools",
});
}}
icon={foldNodes ? <CgArrowsShrinkH /> : <CgArrowsMergeAltH />}
rightSection={
<Text ml="md" fz={10} color="dimmed">
{coreKey} Shift F
</Text>
}
>
{foldNodes ? "Unfold" : "Fold"} Nodes
</Menu.Item>
<Menu.Item
fz={12}
onClick={() => {
toggleExpandCollapseGraph();
ReactGA.event({
action: "toggle_collapse_nodes",
category: "User",
label: "Tools",
});
}}
icon={graphCollapsed ? <VscExpandAll /> : <VscCollapseAll />}
rightSection={
<Text ml="md" fz={10} color="dimmed">
{coreKey} Shift C
</Text>
}
>
{graphCollapsed ? "Expand" : "Collapse"} Nodes
</Menu.Item>
<Menu.Item fz={12} onClick={focusFirstNode} icon={<VscTarget />}>
Focus to First Node
</Menu.Item>
</Menu.Dropdown>
</Menu>
);
};
export const Tools: React.FC<{ isWidget?: boolean }> = ({ isWidget = false }) => {
const { push } = useRouter();
const getJson = useJson(state => state.getJson);
const setVisible = useModal(state => state.setVisible);
const centerView = useGraph(state => state.centerView);
const zoomIn = useGraph(state => state.zoomIn);
const zoomOut = useGraph(state => state.zoomOut);
const toggleGestures = useConfig(state => state.toggleGestures);
const toggleChildrenCount = useConfig(state => state.toggleChildrenCount);
const toggleDarkMode = useConfig(state => state.toggleDarkMode);
const toggleRulers = useConfig(state => state.toggleRulers);
const toggleCollapseButton = useConfig(state => state.toggleCollapseButton);
const setViewMode = useConfig(state => state.setViewMode);
const setZoomFactor = useGraph(state => state.setZoomFactor);
const toggleImagePreview = useConfig(state => state.toggleImagePreview);
const logout = useUser(state => state.logout);
const user = useUser(state => state.user);
const premium = useUser(state => state.premium);
const zoomFactor = useGraph(state => state.viewPort?.zoomFactor || 1);
const gesturesEnabled = useConfig(state => state.gesturesEnabled);
const childrenCountVisible = useConfig(state => state.childrenCountVisible);
const darkmodeEnabled = useConfig(state => state.darkmodeEnabled);
const viewMode = useConfig(state => state.viewMode);
const rulersEnabled = useConfig(state => state.rulersEnabled);
const collapseButtonVisible = useConfig(state => state.collapseButtonVisible);
const imagePreviewEnabled = useConfig(state => state.imagePreviewEnabled);
const setFormat = useFile(state => state.setFormat);
const format = useFile(state => state.format);
const [tempZoomValue, setTempZoomValue] = React.useState(zoomFactor);
const [logoURL, setLogoURL] = React.useState("CTRL");
React.useEffect(() => {
if (!Number.isNaN(zoomFactor)) setTempZoomValue(zoomFactor);
}, [zoomFactor]);
useHotkeys([
["shift+Digit0", () => setZoomFactor(100 / 100)],
["shift+Digit1", centerView],
]);
React.useEffect(() => {
if (typeof window !== "undefined") {
const url = !isIframe()
? "https://jsoncrack.com"
: window.location.href.replace("widget", "editor");
setLogoURL(url);
}
}, []);
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();
};
return (
<StyledTools>
{isWidget && (
<StyledToolElement title="JSON Crack">
<Flex gap="xs" align="center" justify="center">
<JSONCrackLogo
fontSize="1.2em"
href={logoURL}
target={isIframe() ? "_blank" : "_parent"}
/>
</Flex>
</StyledToolElement>
)}
{!isWidget && (
<MediaQuery smallerThan="xs" styles={{ display: "none" }}>
<Group spacing="xs" position="left" w="100%" noWrap>
<StyledToolElement title="JSON Crack">
<Flex gap="xs" align="center" justify="center">
<JSONCrackLogo fontSize="1.2em" />
</Flex>
</StyledToolElement>
<Select
defaultValue="json"
size="xs"
value={format}
onChange={setFormat}
miw={80}
w={120}
data={[
{ value: FileFormat.JSON, label: "JSON" },
{ value: FileFormat.YAML, label: "YAML" },
{ value: FileFormat.XML, label: "XML" },
{ value: FileFormat.TOML, label: "TOML" },
{ value: FileFormat.CSV, label: "CSV" },
]}
/>
<Menu trigger="click" shadow="md" withArrow>
<Menu.Target>
<StyledToolElement title="View Mode">
<Flex align="center" gap={3}>
View Mode <CgChevronDown />
</Flex>
</StyledToolElement>
</Menu.Target>
<Menu.Dropdown>
<SegmentedControl
value={viewMode}
onChange={setViewMode}
data={[
{ value: ViewMode.Graph, label: "Graph" },
{ value: ViewMode.Tree, label: "Tree" },
]}
/>
</Menu.Dropdown>
</Menu>
<StyledToolElement title="Import File" onClick={() => setVisible("import")(true)}>
Import
</StyledToolElement>
<ViewMenu />
<Menu shadow="md" withArrow>
<Menu.Target>
<StyledToolElement>
<Flex align="center" gap={3}>
Tools <CgChevronDown />
</Flex>
</StyledToolElement>
</Menu.Target>
<Menu.Dropdown>
<Menu.Item fz={12} icon={<VscSearchFuzzy />} onClick={() => setVisible("jq")(true)}>
JSON Query (jq)
</Menu.Item>
<Menu.Item fz={12} icon={<VscJson />} onClick={() => setVisible("schema")(true)}>
JSON Schema
</Menu.Item>
<Menu.Item
fz={12}
icon={<SiJsonwebtokens />}
onClick={() => setVisible("jwt")(true)}
>
Decode JWT
</Menu.Item>
<Menu.Item
fz={12}
icon={<VscGroupByRefType />}
onClick={() => setVisible("type")(true)}
>
Generate Type
</Menu.Item>
</Menu.Dropdown>
</Menu>
<StyledToolElement title="Cloud" onClick={() => setVisible("cloud")(true)}>
Cloud
</StyledToolElement>
<StyledToolElement title="Download as File" onClick={handleSave}>
Download
</StyledToolElement>
</Group>
</MediaQuery>
)}
<Group spacing="xs" position="right" w="100%" noWrap>
<SearchInput />
{!isWidget && (
<StyledToolElement title="Save as Image" onClick={() => setVisible("download")(true)}>
<FiDownload size="18" />
</StyledToolElement>
)}
{!isWidget && (
<Menu shadow="md" trigger="click" closeOnItemClick={false} withArrow>
<Menu.Target>
<StyledToolElement>
<Flex gap={4}>
{Math.round(zoomFactor * 100)}%
<CgChevronDown />
</Flex>
</StyledToolElement>
</Menu.Target>
<Menu.Dropdown>
<Menu.Item>
<Input
type="number"
value={Math.round(tempZoomValue * 100)}
onChange={e => setTempZoomValue(e.currentTarget.valueAsNumber / 100)}
onKeyDown={getHotkeyHandler([["Enter", () => setZoomFactor(tempZoomValue)]])}
size="xs"
rightSection="%"
/>
</Menu.Item>
<Menu.Item rightSection="+" onClick={zoomIn}>
<Text size="xs">Zoom in</Text>
</Menu.Item>
<Menu.Item rightSection="-" onClick={zoomOut}>
<Text size="xs">Zoom out</Text>
</Menu.Item>
<Menu.Item rightSection="⇧ 1" onClick={centerView}>
<Text size="xs">Zoom to fit</Text>
</Menu.Item>
<Menu.Item onClick={() => setZoomFactor(50 / 100)}>
<Text size="xs">Zoom to %50</Text>
</Menu.Item>
<Menu.Item rightSection="⇧ 0" onClick={() => setZoomFactor(100 / 100)}>
<Text size="xs">Zoom to %100</Text>
</Menu.Item>
<Menu.Item onClick={() => setZoomFactor(200 / 100)}>
<Text size="xs">Zoom to %200</Text>
</Menu.Item>
<Menu.Divider />
<Menu.Item
icon={<BsCheck2 opacity={rulersEnabled ? 100 : 0} />}
onClick={() => toggleRulers(!rulersEnabled)}
>
<Text size="xs">Rulers</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={gesturesEnabled ? 100 : 0} />}
onClick={() => toggleGestures(!gesturesEnabled)}
>
<Text size="xs">Trackpad Gestures</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={childrenCountVisible ? 100 : 0} />}
onClick={() => toggleChildrenCount(!childrenCountVisible)}
>
<Text size="xs">Item Count</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={imagePreviewEnabled ? 100 : 0} />}
onClick={() => toggleImagePreview(!imagePreviewEnabled)}
>
<Text size="xs">Image Link Preview</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={collapseButtonVisible ? 100 : 0} />}
onClick={() => toggleCollapseButton(!collapseButtonVisible)}
>
<Text size="xs">Show Expand/Collapse</Text>
</Menu.Item>
<Menu.Item
icon={<BsCheck2 opacity={darkmodeEnabled ? 100 : 0} />}
onClick={() => toggleDarkMode(!darkmodeEnabled)}
>
<Text size="xs">Dark Mode</Text>
</Menu.Item>
</Menu.Dropdown>
</Menu>
)}
{!isWidget && (
<Menu shadow="md" trigger="click" closeOnItemClick={false} withArrow>
<Menu.Target>
<StyledToolElement>
<Avatar
color="grape"
variant="filled"
size={20}
radius="xl"
src={user?.user_metadata.avatar_url}
alt={user?.user_metadata.name}
>
{user?.user_metadata.name[0]}
</Avatar>
</StyledToolElement>
</Menu.Target>
<Menu.Dropdown>
{user ? (
<Menu.Item
icon={
<Avatar color="grape" alt={user.user_metadata.name} size={20} radius="xl" />
}
onClick={() => setVisible("account")(true)}
closeMenuOnClick
>
<Text size="xs">Account</Text>
</Menu.Item>
) : (
<Link href="/sign-in">
<Menu.Item icon={<VscSignIn />}>
<Text size="xs">Sign in</Text>
</Menu.Item>
</Link>
)}
{!premium && (
<Menu.Item
icon={<MdOutlineWorkspacePremium color="red" />}
onClick={() => setVisible("premium")(true)}
closeMenuOnClick
>
<Text
variant="gradient"
fw="bold"
gradient={{ from: "orange", to: "red" }}
size="xs"
>
Get Premium
</Text>
</Menu.Item>
)}
{user && (
<>
<Menu.Divider />
<Menu.Item
icon={<VscFeedback />}
onClick={() => setVisible("review")(true)}
closeMenuOnClick
>
<Text size="xs">Feedback</Text>
</Menu.Item>
<Menu.Item icon={<VscSignOut />} onClick={() => logout()} closeMenuOnClick>
<Text size="xs">Log out</Text>
</Menu.Item>
</>
)}
</Menu.Dropdown>
</Menu>
)}
{!isWidget && (
<StyledToolElement title="Fullscreen" $hide={isWidget} onClick={fullscreenBrowser}>
<AiOutlineFullscreen size="18" />
</StyledToolElement>
)}
</Group>
</StyledTools>
);
};
@@ -1,87 +0,0 @@
import { CanvasDirection, NodeData, EdgeData } from "reaflow";
import { parser } from "src/utils/json-editor-parser";
export function getEdgeNodes(
graph: string,
isExpanded: boolean = true
): {
nodes: NodeData[];
edges: EdgeData[];
} {
const elements = parser(JSON.parse(graph));
let nodes: NodeData[] = [],
edges: EdgeData[] = [];
for (let i = 0; i < elements.length; i++) {
const el = elements[i];
if (isNode(el)) {
const text = renderText(el.text);
const lines = text.split("\n");
const lineLengths = lines
.map((line) => line.length)
.sort((a, b) => a - b);
const longestLine = lineLengths.reverse()[0];
const height = lines.length * 17.8 < 30 ? 40 : lines.length * 17.8;
nodes.push({
id: el.id,
text: el.text,
data: {
isParent: el.parent,
},
width: isExpanded ? 35 + longestLine * 8 + (el.parent && 60) : 180,
height,
});
} else {
edges.push(el);
}
}
return {
nodes,
edges,
};
}
export function getNextLayout(layout: CanvasDirection) {
switch (layout) {
case "RIGHT":
return "DOWN";
case "DOWN":
return "LEFT";
case "LEFT":
return "UP";
default:
return "RIGHT";
}
}
function renderText(value: string | object) {
if (value instanceof Object) {
let temp = "";
const entries = Object.entries(value);
if (Object.keys(value).every((val) => !isNaN(+val))) {
return Object.values(value).join("");
}
entries.forEach((entry) => {
temp += `${entry[0]}: ${String(entry[1])}\n`;
});
return temp;
}
return value;
}
function isNode(element: NodeData | EdgeData) {
if ("text" in element) return true;
return false;
}
+131 -5
View File
@@ -1,17 +1,143 @@
import React from "react";
import styled from "styled-components";
import { Tools } from "src/containers/Editor/Tools";
import styled, { DefaultTheme, useTheme } from "styled-components";
import { Menu, Text } from "@mantine/core";
import { JSONTree } from "react-json-tree";
import { Graph } from "src/components/Graph";
import { TextRenderer } from "src/components/Graph/CustomNode/TextRenderer";
import { firaMono } from "src/constants/fonts";
import { ViewMode } from "src/enums/viewMode.enum";
import useConfig from "src/store/useConfig";
import useJson from "src/store/useJson";
const StyledLiveEditor = styled.div`
position: relative;
height: 100%;
background: ${({ theme }) => theme.GRID_BG_COLOR};
overflow: auto;
& > ul {
margin-top: 0 !important;
padding: 12px !important;
font-family: ${firaMono.style.fontFamily};
font-size: 14px;
font-weight: 500;
}
`;
type TextColorFn = {
theme: DefaultTheme;
$value?: string | unknown;
};
function getValueColor({ $value, theme }: TextColorFn) {
if ($value && !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;
// default
return theme.NODE_COLORS.NODE_VALUE;
}
function getLabelColor({ $type, theme }: { $type?: string; theme: DefaultTheme }) {
if ($type === "Object") return theme.NODE_COLORS.PARENT_OBJ;
if ($type === "Array") return theme.NODE_COLORS.PARENT_ARR;
return theme.NODE_COLORS.PARENT_OBJ;
}
const View = () => {
const theme = useTheme();
const json = useJson(state => state.json);
const viewMode = useConfig(state => state.viewMode);
if (viewMode === ViewMode.Graph) return <Graph />;
if (viewMode === ViewMode.Tree)
return (
<JSONTree
data={JSON.parse(json)}
labelRenderer={(keyPath, nodeType, expanded, expandable) => {
return (
<span
style={{
color: getLabelColor({
theme,
$type: nodeType,
}),
}}
>
{keyPath[0]}:
</span>
);
}}
valueRenderer={(valueAsString, value) => {
return (
<span
style={{
color: getValueColor({
theme,
$value: valueAsString,
}),
}}
>
<TextRenderer>{JSON.stringify(value)}</TextRenderer>
</span>
);
}}
theme={{
extend: {
overflow: "scroll",
height: "100%",
scheme: "monokai",
author: "wimer hazenberg (http://www.monokai.nl)",
base00: theme.GRID_BG_COLOR,
},
}}
/>
);
};
const LiveEditor: React.FC = () => {
const viewMode = useConfig(state => state.viewMode);
const [contextOpened, setContextOpened] = React.useState(false);
const [contextPosition, setContextPosition] = React.useState({
x: 0,
y: 0,
});
return (
<StyledLiveEditor>
<Tools />
<Graph />
<StyledLiveEditor
onContextMenuCapture={e => {
e.preventDefault();
setContextOpened(true);
setContextPosition({ x: e.pageX, y: e.pageY });
}}
onClick={() => setContextOpened(false)}
>
<div
style={{
position: "fixed",
top: contextPosition.y,
left: contextPosition.x,
zIndex: 100,
}}
>
<Menu opened={false} shadow="sm">
<Menu.Dropdown>
<Menu.Item>
<Text size="xs">Download as Image</Text>
</Menu.Item>
<Menu.Item>
<Text size="xs">Zoom to Fit</Text>
</Menu.Item>
<Menu.Item>
<Text size="xs">Rotate</Text>
</Menu.Item>
</Menu.Dropdown>
</Menu>
</div>
<View />
</StyledLiveEditor>
);
};
+24 -10
View File
@@ -1,35 +1,49 @@
import { Allotment } from "allotment";
import React from "react";
import { JsonEditor } from "src/containers/Editor/JsonEditor";
import dynamic from "next/dynamic";
import useConfig from "src/hooks/store/useConfig";
import styled from "styled-components";
import { Allotment } from "allotment";
import "allotment/dist/style.css";
import useGraph from "src/store/useGraph";
export const StyledEditor = styled(Allotment)`
position: relative !important;
display: flex;
background: ${({ theme }) => theme.BACKGROUND_SECONDARY};
height: calc(100vh - 63px);
@media only screen and (max-width: 320px) {
height: 100vh;
}
`;
const JsonEditor = dynamic(() => import("src/containers/Editor/JsonEditor"), {
ssr: false,
});
const LiveEditor = dynamic(() => import("src/containers/Editor/LiveEditor"), {
ssr: false,
});
const Panes: React.FC = () => {
const hideEditor = useConfig((state) => state.hideEditor);
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>
<StyledEditor proportionalLayout={false} vertical={isMobile}>
<Allotment.Pane
preferredSize={400}
minSize={300}
maxSize={600}
visible={!hideEditor}
preferredSize={isMobile ? "100%" : 450}
minSize={fullscreen ? 0 : 300}
maxSize={isMobile ? Infinity : 800}
visible={!fullscreen}
>
<JsonEditor />
</Allotment.Pane>
<Allotment.Pane>
<Allotment.Pane minSize={0} maxSize={isMobile && !fullscreen ? 0 : Infinity}>
<LiveEditor />
</Allotment.Pane>
</StyledEditor>
-66
View File
@@ -1,66 +0,0 @@
import React from "react";
import toast from "react-hot-toast";
import { IoAlertCircleSharp } from "react-icons/io5";
import { Modal } from "src/components/Modal";
import Toggle from "src/components/Toggle";
import useConfig from "src/hooks/store/useConfig";
import useStored from "src/hooks/store/useStored";
import styled from "styled-components";
import shallow from "zustand/shallow";
const StyledToggle = styled(Toggle)`
flex-flow: row-reverse;
background: black;
`;
const StyledAlertIcon = styled(IoAlertCircleSharp)`
color: ${({ theme }) => theme.ORANGE};
`;
const StyledModalWrapper = styled.div`
display: flex;
flex-direction: column;
gap: 20px;
`;
export const Settings: React.FC<{
visible: boolean;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
}> = ({ visible, setVisible }) => {
const performanceMode = useConfig((state) => state.performanceMode);
const [toggleHideCollapse, hideCollapse] = useStored(
(state) => [state.toggleHideCollapse, state.hideCollapse],
shallow
);
const setConfig = useConfig((state) => state.setConfig);
const togglePerformance = () => {
const toastMsg = performanceMode
? "Disabled Performance Mode\nSearch Node & Save Image enabled."
: "Enabled Performance Mode\nSearch Node & Save Image disabled.";
toast(toastMsg, {
icon: <StyledAlertIcon size={36} />,
duration: 3000,
});
setConfig("performanceMode", !performanceMode);
};
return (
<Modal visible={visible} setVisible={setVisible}>
<Modal.Header>Settings</Modal.Header>
<Modal.Content>
<StyledModalWrapper>
<StyledToggle onChange={toggleHideCollapse} checked={hideCollapse}>
Hide Collapse/Expand Button
</StyledToggle>
<StyledToggle onChange={togglePerformance} checked={performanceMode}>
Performance Mode (Experimental)
</StyledToggle>
</StyledModalWrapper>
</Modal.Content>
<Modal.Controls setVisible={setVisible} />
</Modal>
);
};
-105
View File
@@ -1,105 +0,0 @@
import React from "react";
import {
AiOutlineFullscreen,
AiOutlineMinus,
AiOutlinePlus,
} from "react-icons/ai";
import { FiDownload } from "react-icons/fi";
import { HiOutlineSun, HiOutlineMoon } from "react-icons/hi";
import { MdCenterFocusWeak } from "react-icons/md";
import { SearchInput } from "src/components/SearchInput";
import styled from "styled-components";
import useConfig from "src/hooks/store/useConfig";
import shallow from "zustand/shallow";
import { DownloadModal } from "../Modals/DownloadModal";
import useStored from "src/hooks/store/useStored";
import { TbSettings } from "react-icons/tb";
import { Settings } from "./Settings";
export const StyledTools = styled.div`
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};
`;
const StyledToolElement = styled.button`
display: grid;
place-content: center;
font-size: 20px;
background: none;
color: ${({ theme }) => theme.INTERACTIVE_NORMAL};
&:hover {
color: ${({ theme }) => theme.INTERACTIVE_HOVER};
opacity: 1;
box-shadow: none;
}
`;
export const Tools: React.FC = () => {
const [settingsVisible, setSettingsVisible] = React.useState(false);
const [isDownloadVisible, setDownloadVisible] = React.useState(false);
const lightmode = useStored((state) => state.lightmode);
const setLightTheme = useStored((state) => state.setLightTheme);
const [performanceMode, hideEditor] = useConfig(
(state) => [state.performanceMode, state.hideEditor],
shallow
);
const setConfig = useConfig((state) => state.setConfig);
const zoomIn = useConfig((state) => state.zoomIn);
const zoomOut = useConfig((state) => state.zoomOut);
const centerView = useConfig((state) => state.centerView);
const toggleEditor = () => setConfig("hideEditor", !hideEditor);
const toggleTheme = () => setLightTheme(!lightmode);
return (
<StyledTools>
<StyledToolElement aria-label="fullscreen" onClick={toggleEditor}>
<AiOutlineFullscreen />
</StyledToolElement>
<StyledToolElement
aria-label="settings"
onClick={() => setSettingsVisible(true)}
>
<TbSettings />
</StyledToolElement>
<StyledToolElement aria-label="switch theme" onClick={toggleTheme}>
{lightmode ? <HiOutlineMoon /> : <HiOutlineSun />}
</StyledToolElement>
{!performanceMode && <SearchInput />}
{!performanceMode && (
<StyledToolElement
aria-label="save"
onClick={() => setDownloadVisible(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>
<DownloadModal
visible={isDownloadVisible}
setVisible={setDownloadVisible}
/>
<Settings visible={settingsVisible} setVisible={setSettingsVisible} />
</StyledTools>
);
};
+153
View File
@@ -0,0 +1,153 @@
import {
createStyles,
Title,
Text,
Card,
SimpleGrid,
Container,
rem,
MediaQuery,
} from "@mantine/core";
import { FaProjectDiagram, FaRegImages } from "react-icons/fa";
import { MdOutlineDesignServices } from "react-icons/md";
import { TbTransform } from "react-icons/tb";
import { VscCloud, VscJson } from "react-icons/vsc";
const mockdata = [
{
title: "Designed for Everyone",
description:
"We focus on simplicity and ease of use. Whether you're a data scientist or product owner, JSON Crack is the tool for you to understand your data.",
icon: <MdOutlineDesignServices size="30" />,
},
{
title: "Interactive Graphs",
description:
"JSON Crack visualizes data from JSON, YAML, XML, CSV, and more in interactive graphs. Users can click nodes for more details, edit data, and search through the graph.",
icon: <FaProjectDiagram size="30" />,
hideMobile: true,
},
{
title: "Multi-Format Support & Data Conversion",
description:
"JSON Crack seamlessly handles various data formats, allowing easy conversion between them.",
icon: <TbTransform size="30" />,
hideMobile: true,
},
{
title: "Cloud Storage and Sharing",
description:
"JSON Crack comes with built-in cloud storage, allowing users to store their data and easily share links with collaborators or other stakeholders, fostering efficient teamwork and collaboration.",
icon: <VscCloud size="30" />,
hideMobile: true,
},
{
title: "Graph Export & Download",
description:
"Users have the option to download the generated graph as an image, enabling them to save and share visual representations of their data with others or use them in presentations and reports.",
icon: <FaRegImages size="30" />,
},
{
title: "JSON Schema Support",
description:
"JSON Crack supports JSON Schema, offering users the ability to validate and enforce data structure rules, ensuring data consistency and integrity.",
icon: <VscJson size="30" />,
},
];
const useStyles = createStyles(theme => ({
title: {
fontSize: rem(34),
fontWeight: 900,
[theme.fn.smallerThan("sm")]: {
fontSize: rem(24),
},
},
description: {
maxWidth: 600,
margin: "auto",
"&::after": {
content: '""',
display: "block",
backgroundColor: theme.fn.primaryColor(),
width: rem(45),
height: rem(2),
marginTop: theme.spacing.sm,
marginLeft: "auto",
marginRight: "auto",
},
},
card: {
border: `${rem(1)} solid ${
theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[1]
}`,
},
cardTitle: {
"&::after": {
content: '""',
display: "block",
backgroundColor: theme.fn.primaryColor(),
width: rem(45),
height: rem(2),
marginTop: theme.spacing.sm,
},
},
}));
export function FeaturesCards() {
const { classes } = useStyles();
const features = mockdata.map(feature => (
<MediaQuery
key={feature.title}
query="(max-width: 36em)"
styles={{ display: feature.hideMobile ? "none" : "initial" }}
>
<Card shadow="md" radius="md" className={classes.card} padding="xl">
{feature.icon}
<Text fz="lg" fw={500} className={classes.cardTitle} mt="md">
{feature.title}
</Text>
<Text fz="sm" color="dark.3" mt="sm">
{feature.description}
</Text>
</Card>
</MediaQuery>
));
return (
<Container size="lg" py="xl" mt={40}>
<Title
variant="gradient"
gradient={{ from: "purple", to: "orange", deg: 45 }}
order={2}
className={classes.title}
ta="center"
mt="sm"
>
Transform data into stunning graphs.
</Title>
<Text color="dark.3" className={classes.description} ta="center" mt="md">
JSON Crack empowers users to visualize, analyze, and manipulate data with ease, making it a
versatile and powerful tool for data representation and exploration.
</Text>
<SimpleGrid
cols={3}
spacing="xl"
mt={50}
breakpoints={[
{ maxWidth: "sm", cols: 1 },
{ maxWidth: "md", cols: 2 },
]}
>
{features}
</SimpleGrid>
</Container>
);
}
-249
View File
@@ -1,249 +0,0 @@
import React from "react";
import Head from "next/head";
import Link from "next/link";
import { useRouter } from "next/router";
import { TwitterTweetEmbed } from "react-twitter-embed";
import { FaGithub, FaHeart, FaLinkedin, FaTwitter } from "react-icons/fa";
import {
HiCursorClick,
HiLightningBolt,
HiOutlineDownload,
HiOutlineSearchCircle,
} from "react-icons/hi";
import { Producthunt } from "src/components/Producthunt";
import { CarbonAds } from "src/components/CarbonAds";
import { Sponsors } from "src/components/Sponsors";
import { GoalsModal } from "src/containers/Modals/GoalsModal";
import pkg from "../../../package.json";
import * as Styles from "./styles";
const Home: React.FC = () => {
const { push } = useRouter();
const [isModalVisible, setModalVisible] = React.useState(false);
const [isMobile, setIsMobile] = React.useState(false);
React.useEffect(() => {
setIsMobile(window.screen.width <= 768);
}, []);
return (
<Styles.StyledHome>
<Head>
<title>JSON Visio - Directly onto graphs</title>
</Head>
<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/jsonvisio.com"
target="_blank"
rel="external"
>
GitHub
</Styles.StyledNavLink>
</Styles.StyledNavbar>
<Styles.StyledHeroSection id="main">
<Styles.StyledTitle>
<Styles.StyledGradientText>JSON</Styles.StyledGradientText> Visio
</Styles.StyledTitle>
<Styles.StyledSubTitle>
Seamlessly visualize your JSON data{" "}
<Styles.StyledHighlightedText>instantly</Styles.StyledHighlightedText>{" "}
into graphs.
</Styles.StyledSubTitle>
<Styles.StyledMinorTitle>
Paste - Import - Fetch!
</Styles.StyledMinorTitle>
<Styles.StyledButton
onClick={() => window.location.replace("/editor")}
disabled={isMobile}
>
{isMobile ? "Incompatible Device" : "GO TO EDITOR"}
</Styles.StyledButton>
{!isMobile && (
<>
<Styles.StyledSponsorButton onClick={() => setModalVisible(true)}>
Help JSON Visio Accomplish It&apos;s Goals
<FaHeart />
</Styles.StyledSponsorButton>
<GoalsModal visible={isModalVisible} setVisible={setModalVisible} />
</>
)}
</Styles.StyledHeroSection>
<Styles.StyledPreviewSection>
<Styles.StyledImageWrapper>
<Styles.StyledImage
width="1200"
height="863"
src="/jsonvisio-screenshot.webp"
alt="preview"
loading="lazy"
/>
</Styles.StyledImageWrapper>
</Styles.StyledPreviewSection>
<Styles.StyledFeaturesSection id="features">
<Styles.StyledSectionCard>
<Styles.StyledCardIcon>
<HiCursorClick size={50} color="#3BA55D" />
</Styles.StyledCardIcon>
<Styles.StyledCardTitle>EASY-TO-USE</Styles.StyledCardTitle>
<Styles.StyledCardDescription>
Don&apos;t even bother to update your schema to view your JSON into
graphs; directly paste, import or fetch! JSON Visio helps you to
visualize without any additional values and save your time.
</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&apos;t want to see a JSON Visio 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&apos;s Monaco Editor which is also used by VS Code,
easily edit your JSON and directly view through the graphs. Also
there&apos;s a JSON validator above of it to make sure there is no
type error.
</Styles.StyledCardDescription>
</Styles.StyledSectionCard>
</Styles.StyledFeaturesSection>
<Styles.StyledSection id="github" reverse>
<TwitterTweetEmbed
tweetId="1519363257794015233"
options={{
width: "600",
align: "center",
}}
/>
<Styles.StyledSectionArea>
<Styles.StyledSubTitle>Open Source Community</Styles.StyledSubTitle>
<Styles.StyledMinorTitle>
Join the Open Source Community by suggesting new ideas, support by
contributing; implementing new features, fixing bugs and doing
changes minor to major!
</Styles.StyledMinorTitle>
<Styles.StyledButton
onClick={() => push("https://github.com/AykutSarac/jsonvisio.com")}
status="SECONDARY"
>
STAR ON GITHUB
</Styles.StyledButton>
</Styles.StyledSectionArea>
</Styles.StyledSection>
<Styles.StyledSection id="embed">
<Styles.StyledSectionArea>
<Styles.StyledSubTitle>Embed Into Your Website</Styles.StyledSubTitle>
<Styles.StyledMinorTitle>
Easily embed the JSON Visio graph into your website to showcase your
visitors, blog readers or anybody else!
</Styles.StyledMinorTitle>
</Styles.StyledSectionArea>
<div>
<Styles.StyledIframge src="https://jsonvisio.com/widget?json=%5B%5B%22squadName%22%2C%22homeTown%22%2C%22formed%22%2C%22secretBase%22%2C%22active%22%2C%22members%22%2C%22a%7C0%7C1%7C2%7C3%7C4%7C5%22%2C%22Super%20hero%20squad%22%2C%22Metro%20City%22%2C%22n%7CWW%22%2C%22Super%20tower%22%2C%22b%7CT%22%2C%22name%22%2C%22age%22%2C%22secretIdentity%22%2C%22powers%22%2C%22a%7CC%7CD%7CE%7CF%22%2C%22Molecule%20Man%22%2C%22n%7CT%22%2C%22Dan%20Jukes%22%2C%22Radiation%20resistance%22%2C%22Turning%20tiny%22%2C%22Radiation%20blast%22%2C%22a%7CK%7CL%7CM%22%2C%22o%7CG%7CH%7CI%7CJ%7CN%22%2C%22Madame%20Uppercut%22%2C%22n%7Cd%22%2C%22Jane%20Wilson%22%2C%22Million%20tonne%20punch%22%2C%22Damage%20resistance%22%2C%22Superhuman%20reflexes%22%2C%22a%7CS%7CT%7CU%22%2C%22o%7CG%7CP%7CQ%7CR%7CV%22%2C%22Eternal%20Flame%22%2C%22n%7C4C92%22%2C%22Unknown%22%2C%22Immortality%22%2C%22Heat%20Immunity%22%2C%22Inferno%22%2C%22Teleportation%22%2C%22Interdimensional%20travel%22%2C%22a%7Ca%7Cb%7Cc%7Cd%7Ce%22%2C%22o%7CG%7CX%7CY%7CZ%7Cf%22%2C%22a%7CO%7CW%7Cg%22%2C%22o%7C6%7C7%7C8%7C9%7CA%7CB%7Ch%22%5D%2C%22i%22%5D"></Styles.StyledIframge>
</div>
</Styles.StyledSection>
<Styles.StyledPaidSection>
<Styles.StyledProducthunt>
<Styles.StyledSubTitle>
Support JSON Visio 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>
<Styles.StyledSponsorSection id="sponsor">
<Styles.StyledSubTitle>Sponsors</Styles.StyledSubTitle>
<Styles.StyledMinorTitle>
Your supports make JSON Visio possible to continue and accessible for
everyone!
</Styles.StyledMinorTitle>
<Styles.StyledButton
status="SUCCESS"
onClick={() => push("https://github.com/sponsors/AykutSarac")}
>
Become A Sponsor!
</Styles.StyledButton>
<Sponsors />
</Styles.StyledSponsorSection>
<Styles.StyledFooter>
<Styles.StyledFooterText>
© 2022 JSON Visio - {pkg.version}
</Styles.StyledFooterText>
<Styles.StyledIconLinks>
<Styles.StyledNavLink
href="https://github.com/AykutSarac/jsonvisio.com"
target="_blank"
aria-label="github"
>
<FaGithub size={26} />
</Styles.StyledNavLink>
<Styles.StyledNavLink
href="https://www.linkedin.com/in/aykutsarac/"
target="_blank"
aria-label="linkedin"
>
<FaLinkedin size={26} />
</Styles.StyledNavLink>
<Styles.StyledNavLink
href="https://twitter.com/aykutsarach"
target="_blank"
aria-label="twitter"
>
<FaTwitter size={26} />
</Styles.StyledNavLink>
</Styles.StyledIconLinks>
</Styles.StyledFooter>
</Styles.StyledHome>
);
};
export default Home;
-355
View File
@@ -1,355 +0,0 @@
import { Button } from "src/components/Button";
import styled from "styled-components";
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%;
`;
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-size: 5rem;
font-weight: 900;
margin: 0;
@media only screen and (max-width: 768px) {
font-size: 3rem;
}
`;
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.75rem;
}
`;
export const StyledMinorTitle = styled.p`
color: #b4b4b4;
text-align: center;
font-size: 1.25rem;
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;
div {
font-family: "Roboto", sans-serif;
font-weight: 700;
font-size: 16px;
}
`;
export const StyledSponsorButton = styled(StyledButton)`
background: transparent;
border: 1px solid #ee3d48;
transition: all 200ms;
svg {
color: #ee3d48;
}
&:hover {
background: #ee3d48;
svg {
color: white;
}
}
`;
export const StyledFeaturesSection = styled.section`
display: flex;
max-width: 85%;
margin: 0 auto;
gap: 2rem;
padding: 60px 3%;
@media only screen and (max-width: 768px) {
flex-direction: column;
max-width: 80%;
}
`;
export const StyledSectionCard = styled.div`
text-align: center;
flex: 1;
`;
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: 60px 3%;
& > div {
width: 100%;
}
@media only screen and (max-width: 768px) {
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%;
h2,
p {
text-align: center;
}
button {
align-self: 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: 60px 3%;
@media only screen and (max-width: 768px) {
max-width: 80%;
}
`;
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: 60px 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;
max-width: 80%;
}
`;
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 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`
color: #b4b4b4;
`;
export const StyledIconLinks = styled.div`
display: flex;
gap: 20px;
${StyledNavLink} {
color: unset;
}
`;
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: 60px 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;
`;
-46
View File
@@ -1,46 +0,0 @@
import { useRouter } from "next/router";
import React from "react";
import { Button } from "src/components/Button";
import styled from "styled-components";
export const StyledIncompatible = styled.div`
display: none;
@media only screen and (max-width: 568px) {
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
background: ${({ theme }) => theme.BLACK_LIGHT};
color: ${({ theme }) => theme.SILVER};
width: 100%;
height: 100vh;
justify-content: center;
align-items: center;
button {
margin-top: 60px;
}
&::before {
content: "Uh, oh!";
font-weight: 600;
font-size: 60px;
opacity: 0.6;
}
}
`;
export const Incompatible: React.FC = () => {
const { push } = useRouter();
return (
<StyledIncompatible>
This app is not compatible with your device!
<Button className="incompatible" onClick={() => push("/")}>
Go Back
</Button>
</StyledIncompatible>
);
};
@@ -0,0 +1,98 @@
import React from "react";
import {
Modal,
Group,
Button,
Avatar,
Text,
Divider,
ModalProps,
Paper,
Badge,
} from "@mantine/core";
import { useUser as useSupaUser } from "@supabase/auth-helpers-react";
import { IoRocketSharp } from "react-icons/io5";
import useModal from "src/store/useModal";
import useUser from "src/store/useUser";
export const AccountModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const user = useSupaUser();
const isPremium = useUser(state => state.premium);
const isOrg = useUser(state => state.organization);
const isOrgAdmin = useUser(state => state.orgAdmin);
const premiumCancelled = useUser(state => state.premiumCancelled);
const setVisible = useModal(state => state.setVisible);
const logout = useUser(state => state.logout);
return (
<Modal title={`Hello, ${user?.user_metadata.name}!`} opened={opened} onClose={onClose} centered>
<Paper p="md">
<Group noWrap>
<Avatar src={user?.user_metadata.avatar_url} size={94}>
JC
</Avatar>
<div>
<Text fz="lg" tt="uppercase" fw={700}>
{user?.user_metadata.name}
</Text>
<Group noWrap spacing={10} mt={3}>
<Text fz="xs" c="dimmed">
{user?.email}
</Text>
</Group>
<Group noWrap spacing={10} mt={5}>
<Text fz="xs" c="dimmed">
<Badge
size="sm"
variant={isPremium ? "gradient" : "dot"}
color={premiumCancelled || !isPremium ? "dark" : "green"}
gradient={{ from: "#8800fe", to: "#ff00cc", deg: 35 }}
>
{isPremium ? "Premium" : "Free"}{" "}
{premiumCancelled ? "(Cancelled)" : isOrg && "(Organization)"}
</Badge>
</Text>
</Group>
</div>
</Group>
</Paper>
<Divider py="xs" />
<Group position="right">
{isPremium && !premiumCancelled ? (
<Button
variant="light"
color="red"
onClick={() => {
setVisible("cancelPremium")(true);
onClose();
}}
disabled={isOrg && !isOrgAdmin}
>
Cancel Subscription
</Button>
) : (
<Button
variant="gradient"
gradient={{ from: "teal", to: "lime", deg: 105 }}
leftIcon={<IoRocketSharp />}
onClick={() => setVisible("premium")(true)}
>
UPGRADE TO PREMIUM!
</Button>
)}
<Button
color="red"
onClick={() => {
logout();
onClose();
}}
>
Log Out
</Button>
</Group>
</Modal>
);
};
@@ -0,0 +1,72 @@
import React from "react";
import { Modal, Group, Button, Divider, ModalProps, Text, Image, Anchor } from "@mantine/core";
import { toast } from "react-hot-toast";
import { supabase } from "src/lib/api/supabase";
import useModal from "src/store/useModal";
export const CancelPremiumModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const [cancelling, setCancelling] = React.useState(false);
const showFeedback = useModal(state => state.setVisible("review"));
const cancelSub = async () => {
try {
setCancelling(true);
const { data: user } = await supabase.auth.getSession();
if (user) {
const { error } = await supabase.functions.invoke("lemonsqueezy", {
method: "DELETE",
body: {
jwt: user.session?.access_token,
},
});
if (error) {
return toast.error(
"An error occured while cancelling subscription, please contact: contact@jsoncrack.com"
);
}
toast.success("Cancelled premium plan!");
showFeedback(true);
} else {
toast.error("Couldn't fetch user details, please contact: contact@jsoncrack.com");
}
toast.success("Cancelled premium plan!");
onClose();
} catch (err) {
console.error(err);
} finally {
setCancelling(false);
}
};
return (
<Modal title="CANCEL PREMIUM?" opened={opened} onClose={onClose} centered>
<Image py="xs" src="assets/taken.svg" mx="auto" width={200} alt="taken" />
<Text fz="sm" pb="md">
Cancellation will take effect at the end of your current billing period.
<br />
<br />
You can restart your subscription anytime.
<br />
<Text size="xs" color="dimmed">
If you have problems with cancelling plan please contact: contact@jsoncrack.com
</Text>
<Anchor target="_blank" href="https://patreon.com/herowand">
Click here to cancel if you are Patreon member
</Anchor>
</Text>
<Divider py="xs" />
<Group position="right">
<Button color="dark" variant="subtle" onClick={onClose}>
Cancel
</Button>
<Button onClick={cancelSub} loading={cancelling} color="red">
QUIT SUBSCRIPTION
</Button>
</Group>
</Modal>
);
};
+21 -14
View File
@@ -1,27 +1,34 @@
import React from "react";
import toast from "react-hot-toast";
import { Button } from "src/components/Button";
import { Modal, ModalProps } from "src/components/Modal";
import useConfig from "src/hooks/store/useConfig";
import { useRouter } from "next/router";
import { Modal, Group, Button, Text, Divider, ModalProps } from "@mantine/core";
import { documentSvc } from "src/services/document.service";
import useJson from "src/store/useJson";
export const ClearModal: React.FC<ModalProps> = ({ visible, setVisible }) => {
const setJson = useConfig((state) => state.setJson);
export const ClearModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const setJson = useJson(state => state.setJson);
const { query, replace } = useRouter();
const handleClear = () => {
setJson("{}");
toast.success(`Cleared JSON and removed from memory.`);
setVisible(false);
onClose();
if (typeof query.json === "string") {
documentSvc.delete(query.json);
replace("/editor");
}
};
return (
<Modal visible={visible} setVisible={setVisible}>
<Modal.Header>Clear JSON</Modal.Header>
<Modal.Content>Are you sure you want to clear JSON?</Modal.Content>
<Modal.Controls setVisible={setVisible}>
<Button status="DANGER" onClick={handleClear}>
<Modal title="Delete JSON" opened={opened} onClose={onClose} centered>
<Group py="sm">
<Text>Are you sure you want to delete JSON?</Text>
</Group>
<Divider py="xs" />
<Group position="right">
<Button color="red" onClick={handleClear}>
Confirm
</Button>
</Modal.Controls>
</Group>
</Modal>
);
};
+262
View File
@@ -0,0 +1,262 @@
import React from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import {
Modal,
Text,
Divider,
ScrollArea,
ModalProps,
Table,
ActionIcon,
Badge,
Paper,
Flex,
DefaultMantineColor,
Input,
Button,
Group,
Stack,
RingProgress,
UnstyledButton,
} from "@mantine/core";
import { useQuery } from "@tanstack/react-query";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import toast from "react-hot-toast";
import { AiOutlineLink } from "react-icons/ai";
import { FaTrash } from "react-icons/fa";
import { MdFileOpen } from "react-icons/md";
import { VscAdd, VscEdit, VscLock, VscUnlock } from "react-icons/vsc";
import { FileFormat } from "src/enums/file.enum";
import { documentSvc } from "src/services/document.service";
import useFile, { File } from "src/store/useFile";
import useUser from "src/store/useUser";
dayjs.extend(relativeTime);
const colorByFormat: Record<FileFormat, DefaultMantineColor> = {
json: "orange",
yaml: "blue",
xml: "red",
toml: "dark",
csv: "grape",
};
const UpdateNameModal: React.FC<{
file: File | null;
onClose: () => void;
refetch: () => void;
}> = ({ file, onClose, refetch }) => {
const [name, setName] = React.useState("");
const onSubmit = () => {
if (!file) return;
toast
.promise(documentSvc.update(file.id, { name }), {
loading: "Updating document...",
error: "Error occurred while updating document!",
success: `Renamed document to ${name}`,
})
.then(() => {
refetch();
setName("");
});
onClose();
};
return (
<Modal title="Update Document name" opened={!!file} onClose={onClose} centered zIndex={202}>
<Stack>
<Input
value={name}
placeholder={file?.name}
onChange={e => setName(e.currentTarget.value)}
/>
<Group position="right">
<Button variant="outline" onClick={onClose}>
Cancel
</Button>
<Button onClick={onSubmit}>Update</Button>
</Group>
</Stack>
</Modal>
);
};
export const CloudModal: React.FC<ModalProps> = ({ opened, onClose }) => {
const totalQuota = useUser(state => (state.premium ? 200 : 25));
const isPremium = useUser(state => state.premium);
const getContents = useFile(state => state.getContents);
const setHasChanges = useFile(state => state.setHasChanges);
const getFormat = useFile(state => state.getFormat);
const [currentFile, setCurrentFile] = React.useState<File | null>(null);
const { isReady, query, replace } = useRouter();
const { data, refetch } = useQuery(["allJson", query], () => documentSvc.getAll(), {
enabled: isReady && opened,
});
const isCreateDisabled = React.useMemo(() => {
if (!data?.length) return false;
return isPremium ? data.length >= 200 : data.length >= 25;
}, [isPremium, data?.length]);
const onCreate = async () => {
try {
toast.loading("Saving document...", { id: "fileSave" });
const { data, error } = await documentSvc.upsert({
contents: getContents(),
format: getFormat(),
});
if (error) throw error;
toast.success("Document saved to cloud", { id: "fileSave" });
setHasChanges(false);
replace({ query: { json: data } });
onClose();
} catch (error: any) {
toast.error("Failed to save document!", { id: "fileSave" });
console.error(error);
}
};
const onDeleteClick = React.useCallback(
(file: File) => {
toast
.promise(documentSvc.delete(file.id), {
loading: "Deleting file...",
error: "An error occurred while deleting the file!",
success: `Deleted ${file.name}!`,
})
.then(() => refetch());
},
[refetch]
);
const copyShareLink = React.useCallback((fileId: string) => {
const shareLink = `${window.location.origin}/editor?json=${fileId}`;
navigator.clipboard.writeText(shareLink);
toast.success("Copied share link to clipboard!");
}, []);
const rows = React.useMemo(
() =>
data?.map(element => (
<tr key={element.id}>
<td>
<Flex align="center" gap="xs">
{element.private ? <VscLock /> : <VscUnlock />}
{element.id}
</Flex>
</td>
<td>
<Flex align="center" justify="space-between">
{element.name}
<ActionIcon color="cyan" onClick={() => setCurrentFile(element)}>
<VscEdit />
</ActionIcon>
</Flex>
</td>
<td>{dayjs(element.created_at).format("DD.MM.YYYY")}</td>
<td>
<Badge variant="light" color={colorByFormat[element.format]} size="sm">
{element.format.toUpperCase()}
</Badge>
</td>
<td>{element.views.toLocaleString("en-US")}</td>
<td>
<Flex gap="xs">
<ActionIcon
component={Link}
href={`?json=${element.id}`}
prefetch={false}
color="blue"
onClick={onClose}
>
<MdFileOpen size="18" />
</ActionIcon>
<ActionIcon color="red" onClick={() => onDeleteClick(element)}>
<FaTrash size="18" />
</ActionIcon>
<ActionIcon color="green" onClick={() => copyShareLink(element.id)}>
<AiOutlineLink />
</ActionIcon>
</Flex>
</td>
</tr>
)),
[data, copyShareLink, onClose, onDeleteClick]
);
return (
<Modal title="Saved On The Cloud" opened={opened} size="xl" onClose={onClose} centered>
<Paper>
<ScrollArea h={360} offsetScrollbars>
<Table fontSize="xs" verticalSpacing="xs" striped>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Create Date</th>
<th>Format</th>
<th>Views</th>
<th>Actions</th>
</tr>
</thead>
<tbody>{rows}</tbody>
</Table>
</ScrollArea>
</Paper>
{data && (
<Flex gap="md">
<Paper my="lg" withBorder radius="md" p="xs" w="100%">
<Group>
<RingProgress
size={60}
roundCaps
thickness={8}
sections={[
{
value: (data.length * 100) / totalQuota,
color: data.length > totalQuota / 1.5 ? "red" : "blue",
},
]}
/>
<div>
<Text color="dimmed" size="xs" transform="uppercase" weight={700}>
Total Quota
</Text>
<Text weight={700} size="xl">
{data.length} / {totalQuota}
</Text>
</div>
</Group>
</Paper>
<Paper my="lg" withBorder radius="md" p="xs" w={250}>
<UnstyledButton
fw="bold"
w="100%"
h="100%"
onClick={onCreate}
disabled={isCreateDisabled}
>
<Text fz="md" align="center" color="blue">
<Flex align="center" justify="center">
<VscAdd size="24" />
Create New Document
</Flex>
</Text>
</UnstyledButton>
</Paper>
</Flex>
)}
<Divider py="xs" />
<Text fz="xs">
The Cloud Save feature is primarily designed for convenient access and is not advisable for
storing sensitive data.
</Text>
<UpdateNameModal file={currentFile} onClose={() => setCurrentFile(null)} refetch={refetch} />
</Modal>
);
};
Loaded 100 of 185 files, more files were not shown because too many files have changed in this diff. Show more