Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 390fda7

Browse files
authored
feat: use url as state, validated fetched data, dark mode, support GitHub (#19)
1 parent 283b2ec commit 390fda7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2175
-1138
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
],
8787
"cSpell.words": [
8888
"dedupe",
89-
"deduped"
89+
"deduped",
90+
"slideover",
91+
"unjs"
9092
]
9193
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
# Relations UnJS
44

5-
[![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro) [![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)
5+
[![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)
66

77
Discover UnJS ecosystem from a new angle! 🔭
88

99
- 🪄 Visualize dependencies from UnJS packages
10-
- 👶 Print children UnJS dependencies
1110
- 🎨 Add any npm package to the graph
11+
- 📦 Add packages from a GitHub repository or organization
12+
- 👶 Print children UnJS dependencies
13+
- 🌙 Enable dark mode
1214

1315
[👉 Check it out](https://unjs-relations.barbapapazes.dev/)
1416

app.config.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,30 @@ export default defineAppConfig({
55
button: {
66
base: 'transition ease-in',
77
color: {
8-
white: {
9-
solid: 'shadow-none',
8+
gray: {
9+
solid: 'shadow-none bg-gray-300/20 hover:bg-gray-300/40 dark:bg-gray-700/40 dark:hover:bg-gray-700/50',
1010
},
1111
},
12-
variant: {
13-
solid: 'shadow-none text-gray-900',
14-
},
1512
},
1613
input: {
14+
base: 'transition ease-in',
15+
color: {
16+
gray: {
17+
outline: 'shadow-none bg-gray-300/20 hover:bg-gray-300/40 dark:bg-gray-700/40 dark:hover:bg-gray-700/50',
18+
},
19+
},
1720
variant: {
1821
outline: 'shadow-none',
1922
},
2023
},
2124
select: {
25+
base: 'transition ease-in',
2226
color: {
23-
white: {
24-
outline: 'shadow-none',
25-
},
27+
gray: { outline: 'shadow-none bg-gray-300/20 hover:bg-gray-300/40 dark:bg-gray-700/40 dark:hover:bg-gray-700/50' },
2628
},
2729
},
30+
card: {
31+
base: 'transition ease-in duration-150',
32+
},
2833
},
2934
})

app.vue

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1+
<script lang="ts" setup>
2+
useHead({
3+
htmlAttrs: {
4+
lang: 'en',
5+
dir: 'ltr',
6+
class: 'scroll-smooth',
7+
},
8+
meta: [
9+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
10+
{ name: 'theme-color', content: '#ECDC5A' },
11+
],
12+
link: [
13+
{ rel: 'icon', href: '/favicon.svg' },
14+
],
15+
})
16+
</script>
17+
118
<template>
2-
<main class="font-sans">
19+
<main class="font-sans dark:bg-gray-900">
320
<NuxtPage />
421
</main>
522

assets/app.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
::-webkit-scrollbar {
2+
width: 0.6em;
3+
height: 0.6em;
4+
@apply bg-transparent;
5+
}
6+
7+
::-webkit-scrollbar-track {
8+
@apply bg-gray-100;
9+
}
10+
11+
::-webkit-scrollbar-thumb {
12+
border-radius: 0.6em;
13+
@apply bg-gray-300 hover:bg-gray-400;
14+
}
15+
16+
.dark {
17+
& ::-webkit-scrollbar-track {
18+
@apply bg-gray-800;
19+
}
20+
21+
& ::-webkit-scrollbar-thumb {
22+
@apply bg-gray-700 hover:bg-gray-600;
23+
}
24+
}

components/Card.vue

Lines changed: 0 additions & 5 deletions
This file was deleted.

components/CardSlideover.vue

Lines changed: 0 additions & 36 deletions
This file was deleted.

components/CardSlideoverClose.vue

Lines changed: 0 additions & 7 deletions
This file was deleted.

components/GraphSettings.vue

Lines changed: 0 additions & 22 deletions
This file was deleted.

components/Info.vue

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<script setup lang="ts">
2+
const { metaSymbol } = useShortcuts()
3+
</script>
4+
5+
<template>
6+
<section class="prose dark:prose-invert">
7+
<p>
8+
Welcome to UnJS Relations, a tool to help you visualize the interdependencies between packages in the <NuxtLink
9+
class="inline-block"
10+
rel="noopener"
11+
to="https://unjs.io"
12+
>
13+
UnJS
14+
</NuxtLink> ecosystem and with other packages.
15+
</p>
16+
<p>
17+
<NuxtLink
18+
class="inline-block"
19+
rel="noopener"
20+
to="https://unjs.io"
21+
>
22+
UnJS
23+
</NuxtLink> is a large and <strong>complex ecosystem</strong>. It's not easy to get to grips with, to understand and can be very intimidating, especially for beginners.
24+
</p>
25+
<p>
26+
Despite this, it's very <strong>powerful</strong>, with packages that can be integrated into all your projects. Understanding and visualizing the links between the different packages could help you to <strong>better understand</strong> how the ecosystem is composed and articulated.
27+
</p>
28+
<p>
29+
You can use multiple shortcuts to navigate through the interface:
30+
<ul>
31+
<li>
32+
<kbd>{{ metaSymbol }}</kbd> + <kbd>h</kbd> toggle the menu
33+
</li>
34+
<li>
35+
<kbd>{{ metaSymbol }}</kbd> + <kbd>i</kbd> toggle the info
36+
</li>
37+
<li>
38+
<kbd>{{ metaSymbol }}</kbd> + <kbd>l</kbd> toggle the legend
39+
</li>
40+
<li>
41+
<kbd>{{ metaSymbol }}</kbd> + <kbd>s</kbd> toggle the settings
42+
</li>
43+
<li>
44+
<kbd>{{ metaSymbol }}</kbd> + <kbd>u</kbd> toggle the UnJS manage packages
45+
</li>
46+
<li>
47+
<kbd>{{ metaSymbol }}</kbd> + <kbd>y</kbd> toggle the NPM manage packages
48+
</li>
49+
</ul>
50+
</p>
51+
<p>
52+
Built by <NuxtLink
53+
class="inline-block"
54+
rel="noopener"
55+
to="https://github.com/barbapapazes"
56+
>
57+
Estéban (Barbapapazes)
58+
</NuxtLink>, this tool is <strong>open source</strong> and <strong>free</strong>. You can find the source code on <NuxtLink
59+
class="inline-block"
60+
rel="noopener"
61+
to="https://github.com/barbapapazes/unjs-relations"
62+
>
63+
GitHub
64+
</NuxtLink>.
65+
</p>
66+
</section>
67+
</template>

0 commit comments

Comments
 (0)