>
13 |
14 | export { localeDefinitions }
15 | }
16 |
--------------------------------------------------------------------------------
/docs/.vitepress/theme/DemoContainer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
--------------------------------------------------------------------------------
/docs/.vitepress/theme/LanguageSwitcher.vue:
--------------------------------------------------------------------------------
1 |
42 |
43 |
44 |
Playground language
45 |
46 |
55 |
56 |
57 |
74 |
--------------------------------------------------------------------------------
/docs/.vitepress/theme/compat.scss:
--------------------------------------------------------------------------------
1 | .VPLink,
2 | .title,
3 | .pager-link,
4 | .link,
5 | .header-anchor {
6 | color: inherit;
7 | transition: none;
8 |
9 | &:hover {
10 | text-decoration: none;
11 | }
12 |
13 | &:active:not(&:disabled) {
14 | scale: 1;
15 | }
16 | }
17 |
18 | .content-container {
19 | max-width: 100% !important;
20 | }
21 |
22 | body {
23 | background-color: var(--vp-c-bg);
24 | }
25 |
--------------------------------------------------------------------------------
/docs/.vitepress/theme/index.js:
--------------------------------------------------------------------------------
1 | import { localeDefinitions } from '@modrinth/omorphia-dev/locales/index.js'
2 | import { createPlugin } from '@vintl/vintl/plugin'
3 | import { plugin as Omorphia } from 'omorphia'
4 | import DefaultTheme from 'vitepress/theme'
5 | import { createVNode } from 'vue'
6 | import DemoContainer from './DemoContainer.vue'
7 | import LanguageSwitcher from './LanguageSwitcher.vue'
8 |
9 | import './compat.scss'
10 | import './style.scss'
11 |
12 | /** @type {import('vitepress').Theme} */
13 | export default {
14 | ...DefaultTheme,
15 | enhanceApp(ctx) {
16 | ctx.app.use(Omorphia)
17 | ctx.app.component('DemoContainer', DemoContainer)
18 | ctx.app.use(
19 | createPlugin({
20 | controllerOpts: {
21 | locales: Object.keys(localeDefinitions).map((tag) => ({ tag })),
22 | listen: {
23 | async localeload(event) {
24 | const locale = event.locale.tag
25 | if (!Object.hasOwn(localeDefinitions, locale)) {
26 | throw new Error(`Unknown locale: ${locale}`)
27 | }
28 |
29 | try {
30 | const { messages } = await localeDefinitions[locale].importFunction()
31 | event.addMessages(messages)
32 | } catch (err) {
33 | console.error(`Failed to load locale: ${locale}`, err)
34 | }
35 | },
36 | },
37 | defaultMessageOrder: ['locale', 'descriptor'],
38 | },
39 | globalMixin: false,
40 | })
41 | )
42 | },
43 | Layout() {
44 | return createVNode(DefaultTheme.Layout, null, {
45 | 'sidebar-nav-before'() {
46 | return createVNode(LanguageSwitcher)
47 | },
48 | })
49 | },
50 | }
51 |
--------------------------------------------------------------------------------
/docs/components/animated-logo.md:
--------------------------------------------------------------------------------
1 | # Animated Logo
2 |
3 |
4 |
5 |
6 | ```vue
7 |
8 | ```
9 |
--------------------------------------------------------------------------------
/docs/components/avatar.md:
--------------------------------------------------------------------------------
1 | # Avatars
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | ```vue
12 |
13 |
14 |
15 |
16 | ```
17 |
--------------------------------------------------------------------------------
/docs/components/badge.md:
--------------------------------------------------------------------------------
1 | # Badge
2 |
3 | ## Colored badge
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | ```vue
13 |
14 |
15 |
16 |
17 | ```
18 |
19 | ## Badge with icon
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | ```vue
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | ```
72 |
73 |
--------------------------------------------------------------------------------
/docs/components/card.md:
--------------------------------------------------------------------------------
1 | # Card
2 |
3 |
4 |
5 | This is a card!
6 |
7 |
8 |
9 | ```vue
10 |
11 | This is a card!
12 |
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/components/categories.md:
--------------------------------------------------------------------------------
1 | # Categories
2 |
3 |
4 |
9 |
10 |
11 | ```vue
12 |
17 | ```
18 |
--------------------------------------------------------------------------------
/docs/components/checkbox.md:
--------------------------------------------------------------------------------
1 | # Checkbox
2 |
3 |
8 |
9 |
10 | Test
11 | Value: {{ value }}
12 |
13 |
14 | ```vue
15 |
20 |
21 | Test
22 | ```
23 |
--------------------------------------------------------------------------------
/docs/components/chips.md:
--------------------------------------------------------------------------------
1 | # Chips
2 |
3 |
8 |
9 |
10 |
11 |
12 | ```vue
13 |
18 |
19 |
20 | ```
21 |
--------------------------------------------------------------------------------
/docs/components/copy-code.md:
--------------------------------------------------------------------------------
1 | # Copy Code
2 |
3 |
4 |
7 |
8 |
9 | ```vue
10 |
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/components/drop-area.md:
--------------------------------------------------------------------------------
1 | # Drop Area
2 |
7 |
8 |
9 |
10 | Click to choose a file or drag one onto this page
11 |
12 |
13 |
14 | ```vue
15 | Click to choose a file or drag one onto this page
16 |
17 | ```
18 |
--------------------------------------------------------------------------------
/docs/components/dropdown-select.md:
--------------------------------------------------------------------------------
1 | # Dropdown
2 |
10 |
11 |
12 |
17 |
23 |
29 |
35 |
36 |
37 | ```vue
38 |
44 | ```
45 |
--------------------------------------------------------------------------------
/docs/components/environment-indicator.md:
--------------------------------------------------------------------------------
1 | # Environment Indicator
2 |
3 | :::raw
4 |
5 |
12 |
19 |
26 |
27 | :::
28 |
29 | ```vue
30 |
37 |
44 |
51 | ```
52 |
--------------------------------------------------------------------------------
/docs/components/file-input.md:
--------------------------------------------------------------------------------
1 | # File Input
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 | ```vue
15 |
21 |
22 |
23 | ```
24 |
25 | ## Long Style
26 |
27 |
28 |
35 |
36 |
37 | ```vue
38 |
45 | ```
--------------------------------------------------------------------------------
/docs/components/icons.md:
--------------------------------------------------------------------------------
1 | # Icons
2 |
3 | Omorphia includes a set of icons. You can view the available icons in the `~/assets/icons/*` folder of this repository.
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | ```vue
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ```
28 |
--------------------------------------------------------------------------------
/docs/components/markdown-editor.md:
--------------------------------------------------------------------------------
1 | # Markdown Editor
2 |
18 |
19 | The Markdown editor allows for easy formatting of Markdown text whether the user is familiar with Markdown or not. It includes standard shortcuts such as `CTRL+B` for bold, `CTRL+I` for italic, and more.
20 |
21 | ## Full editor
22 |
23 |
24 |
25 |
26 | ```vue
27 |
31 |
32 |
33 | ```
34 |
35 | ## With options
36 |
37 |
38 |
39 |
40 | ```vue
41 |
45 |
46 |
47 | ```
48 |
49 | ## With image upload
50 |
51 |
52 |
53 |
54 | ```vue
55 |
69 |
70 |
71 | ```
72 |
73 | ## Without heading buttons
74 |
75 |
76 |
77 |
78 | ```vue
79 |
83 |
84 |
85 | ```
86 |
87 | ## With default value
88 |
89 |
90 |
91 |
92 | ```vue
93 |
98 |
99 |
100 | ```
101 |
102 | ## Disabled
103 |
104 |
105 |
106 |
107 |
108 | ```vue
109 |
114 |
115 |
116 | ```
117 |
--------------------------------------------------------------------------------
/docs/components/markdown.md:
--------------------------------------------------------------------------------
1 | # Markdown
2 |
3 |
14 |
15 | :::raw
16 |
17 |
18 |
19 | :::
20 |
21 |
39 |
--------------------------------------------------------------------------------
/docs/components/modal.md:
--------------------------------------------------------------------------------
1 | # Modal
2 | :::raw
3 |
4 |
5 |
6 |
14 |
15 |
16 | :::
17 |
18 | ```vue
19 |
20 |
28 |
29 | ```
30 |
--------------------------------------------------------------------------------
/docs/components/notifications.md:
--------------------------------------------------------------------------------
1 | # Notifications
2 |
3 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ```vue
26 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/components/number-inputs.md:
--------------------------------------------------------------------------------
1 | # Number Inputs
2 |
3 |
8 |
9 |
10 |
11 |
12 | ```vue
13 |
18 |
19 |
20 | ```
--------------------------------------------------------------------------------
/docs/components/overflow-menu.md:
--------------------------------------------------------------------------------
1 | # Overflow Menu
2 |
3 |
38 | More options...
39 |
40 | Play
41 |
42 |
43 | Duplicate
44 |
45 |
46 | Disabled
47 |
48 |
49 | Report
50 |
51 |
52 | I shall remain
53 |
54 |
55 | Delete
56 |
57 |
58 |
59 |
60 | ```vue
61 |
98 | More options...
99 |
100 | Play
101 |
102 |
103 | Duplicate
104 |
105 |
106 | Disabled
107 |
108 |
109 | Report
110 |
111 |
112 | I shall remain
113 |
114 |
115 | Delete
116 |
117 |
118 | ```
119 |
--------------------------------------------------------------------------------
/docs/components/pagination.md:
--------------------------------------------------------------------------------
1 | # Pagination
2 |
3 |
12 |
13 |
14 |
15 |
16 | ```vue
17 |
26 |
27 |
28 | ```
29 |
--------------------------------------------------------------------------------
/docs/components/popout-menu.md:
--------------------------------------------------------------------------------
1 | # Popout Menu
2 |
3 |
4 | Bottom going left
5 |
6 | Menu contents!
7 | Menu contents!
8 | Menu contents!
9 |
10 |
11 |
12 | Bottom going right
13 |
14 | Menu contents!
15 | Menu contents!
16 | Menu contents!
17 |
18 |
19 |
20 | Top going left
21 |
22 | Menu contents!
23 | Menu contents!
24 | Menu contents!
25 |
26 |
27 |
28 | Top going right
29 |
30 | Menu contents!
31 | Menu contents!
32 | Menu contents!
33 |
34 |
35 |
36 | Left going up
37 |
38 | Menu contents!
39 | Menu contents!
40 | Menu contents!
41 |
42 |
43 |
44 | Left going down
45 |
46 | Menu contents!
47 | Menu contents!
48 | Menu contents!
49 |
50 |
51 |
52 | Right going up
53 |
54 | Menu contents!
55 | Menu contents!
56 | Menu contents!
57 |
58 |
59 |
60 | Right going down
61 |
62 | Menu contents!
63 | Menu contents!
64 | Menu contents!
65 |
66 |
67 |
68 |
69 | ```vue
70 |
71 | Bottom going right
72 |
73 | Menu contents!
74 |
75 |
76 | ```
77 |
78 | [//]: # (# Popout Menu on hover)
79 |
80 | [//]: # ()
81 |
82 | [//]: # ( )
83 |
84 | [//]: # ( Hover me! )
85 |
86 | [//]: # ( )
87 |
88 | [//]: # ( Menu contents!)
89 |
90 | [//]: # ( Menu contents!)
91 |
92 | [//]: # ( Menu contents!)
93 |
94 | [//]: # ( )
95 |
96 | [//]: # ( )
97 |
98 | [//]: # ()
99 |
100 | [//]: # ()
101 | [//]: # (```vue)
102 |
103 | [//]: # ()
104 |
105 | [//]: # ( Hover me!)
106 |
107 | [//]: # ( )
108 |
109 | [//]: # ( Menu contents!)
110 |
111 | [//]: # ( )
112 |
113 | [//]: # ()
114 |
115 | [//]: # (```)
116 |
--------------------------------------------------------------------------------
/docs/components/promotion.md:
--------------------------------------------------------------------------------
1 | # Promotion
2 | The Promotion component is used to serve Adrinth ads.
3 | :::raw
4 |
5 |
6 |
7 | :::
8 |
9 |
10 | ```vue
11 |
12 | ```
13 |
--------------------------------------------------------------------------------
/docs/components/search-dropdown.md:
--------------------------------------------------------------------------------
1 | # Search Dropdown
2 |
3 |
12 |
13 |
14 | {{options}}
15 | {{text}}
16 |
17 |
72 |
73 |
74 |
75 | ```vue
76 |
93 | ```
94 |
--------------------------------------------------------------------------------
/docs/components/search-filter.md:
--------------------------------------------------------------------------------
1 | # Search Filter
2 |
3 |
17 |
18 |
19 |
25 |
26 |
27 |
28 |
29 | ```vue
30 |
44 |
45 |
51 |
52 |
53 | ```
54 |
--------------------------------------------------------------------------------
/docs/components/share-modal.md:
--------------------------------------------------------------------------------
1 | # Share Modal
2 |
3 |
4 |
8 |
12 |
17 |
23 |
24 |
25 | ```vue
26 |
31 |
37 |
38 | ```
39 | You can use ref to open the modal, calling the show method
40 |
41 | `content` is what will be shown in the text of the input for sharing
42 | ```text
43 | $refs.shareContent.show(content)
44 | ```
45 |
--------------------------------------------------------------------------------
/docs/components/slider.md:
--------------------------------------------------------------------------------
1 | # Slider
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | ```vue
17 |
22 |
23 |
24 | ```
25 |
--------------------------------------------------------------------------------
/docs/components/text-inputs.md:
--------------------------------------------------------------------------------
1 | # Text Inputs
2 |
6 |
7 |
8 |
12 |
13 |
14 | ```vue
15 |
19 | ```
20 |
21 |
22 |
23 |
24 |
29 |
32 |
33 |
34 |
35 | ```vue
36 |
40 |
41 |
42 |
43 |
48 |
51 |
52 | ```
53 |
54 |
55 |
73 |
74 |
75 | ```vue
76 |
81 |
82 |
100 | ```
101 |
102 |
--------------------------------------------------------------------------------
/docs/components/text-logo.md:
--------------------------------------------------------------------------------
1 | # Text Logo
2 |
3 |
4 |
5 |
6 | ```vue
7 |
8 | ```
9 |
10 |
11 |
12 |
13 |
14 | ```vue
15 |
16 | ```
17 |
18 |
24 |
--------------------------------------------------------------------------------
/docs/components/toggle.md:
--------------------------------------------------------------------------------
1 | # Toggle
2 |
3 |
8 |
9 |
10 |
11 |
12 | ```vue
13 |
18 |
19 |
20 | ```
21 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | ## Overview
4 |
5 | Omorphia is Modrinth's internal component and style library for its Vue projects. It includes:
6 |
7 | - 🧩 Typed components which enhance HTML elements and provide a consistent UI
8 | - 🎨 CSS classes to easily style elements with a coherent style
9 |
10 | Omorphia is used in [Knossos](https://github.com/modrinth/knossos) (modrinth.com) and [Theseus](https://github.com/modrinth/theseus) (Minecraft launcher).
11 |
12 | ## Getting started
13 |
14 | Follow the instructions on the [➜ **setup page** 🛠️](/setup).
15 |
--------------------------------------------------------------------------------
/docs/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/modrinth/omorphia/2f103f07291184b1b18fca42fdc2055f2afd1504/docs/public/favicon.ico
--------------------------------------------------------------------------------
/docs/public/favicon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/setup.md:
--------------------------------------------------------------------------------
1 | # Setup
2 |
3 | ```bash
4 | npm install omorphia
5 | ```
6 |
--------------------------------------------------------------------------------
/lib/assets/branding/logo.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/external/apple.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/lib/assets/external/bh.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/external/discord.svg:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/lib/assets/external/kofi.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/mastodon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/opencollective.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/patreon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/external/paypal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/reddit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/discord.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/github.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/gitlab.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/google.svg:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/microsoft.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/external/sso/steam.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/external/twitter.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/external/windows.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/align-left.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/archive.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/asterisk.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/bell-ring.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/bell.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/bold.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/book.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/bookmark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/box.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/calendar.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/chart.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/check-check.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/check-circle.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/check.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/chevron-left.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/chevron-right.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/clear.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/client.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/clipboard-copy.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/code.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/coins.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/contract.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/copy.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/copyright.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/currency.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/dashboard.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/download.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/dropdown.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/edit.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/expand.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/external.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/eye-off.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/eye.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/file-text.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/lib/assets/icons/file.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/filter.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/folder-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/folder-search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/gap.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/github.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/globe.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/grid.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/hamburger.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/hammer.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/hash.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/heading-1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/heading-2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/heading-3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/heart-handshake.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/heart.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/history.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/home.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/image.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/import.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/info.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/issues.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/italic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/key.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/languages.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/left-arrow.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/library.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/light-bulb.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/link.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/list-bulleted.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/list-end.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/list-ordered.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/list.svg:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/lib/assets/icons/lock.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/log-in.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/log-out.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/mail.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/microphone.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/moon.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/more-horizontal.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/more-vertical.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/omorphia.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/paintbrush.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/play.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/plus.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/lib/assets/icons/radio-button-checked.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/radio-button.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/redo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/reply.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/report.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/right-arrow.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/save.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/scale.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/assets/icons/scan-eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/search.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/send.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/server.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/settings.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/share.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/shield.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/lib/assets/icons/slash.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/sort-asc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/sort-desc.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/star.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/stop-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/strikethrough.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/sun.svg:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/lib/assets/icons/sunrise.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/tag.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/tags.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/terminal-square.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/text-quote.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/transfer.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/trash.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/underline.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/undo.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/unknown-donation.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/unknown.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/lib/assets/icons/updated.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/upload.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/user-plus.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/user-x.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/user.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/users.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/lib/assets/icons/version.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/wiki.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/lib/assets/icons/x-circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/x.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/lib/assets/icons/youtube.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/zoom-in.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/icons/zoom-out.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/assets/omorphia.scss:
--------------------------------------------------------------------------------
1 | // Create the variables used by everything
2 | @import 'styles/variables';
3 | // Normalize styling across browsers to a standard stripped down form
4 | @import 'styles/normalize';
5 |
6 | // Add Omorphia base classes
7 | @import 'styles/classes';
8 |
9 | // Apply default styles
10 | @import 'styles/defaults';
11 | // Apply code block highlighting styles
12 | @import 'styles/highlightjs';
13 |
14 | // Finally, apply accessibility-related global styling
15 | @import 'styles/accessibility';
16 |
17 | // Fonts
18 | @import 'styles/inter';
19 |
--------------------------------------------------------------------------------
/lib/assets/styles/accessibility.scss:
--------------------------------------------------------------------------------
1 | button:focus-visible,
2 | a:focus-visible,
3 | [tabindex='0']:focus-visible {
4 | outline: 0.25rem solid #ea80ff;
5 | border-radius: 0.25rem;
6 | }
7 |
--------------------------------------------------------------------------------
/lib/assets/styles/highlightjs.scss:
--------------------------------------------------------------------------------
1 | .hljs,
2 | .hljs-subst {
3 | color: #444;
4 | }
5 |
6 | .hljs-comment {
7 | color: #888888;
8 | }
9 |
10 | .hljs-keyword,
11 | .hljs-attribute,
12 | .hljs-selector-tag,
13 | .hljs-meta-keyword,
14 | .hljs-doctag,
15 | .hljs-name {
16 | color: #f58300;
17 | font-weight: bold;
18 | }
19 |
20 | .hljs-type,
21 | .hljs-string,
22 | .hljs-number,
23 | .hljs-selector-id,
24 | .hljs-selector-class,
25 | .hljs-quote,
26 | .hljs-template-tag,
27 | .hljs-deletion {
28 | color: var(--color-brand);
29 | }
30 |
31 | .hljs-title,
32 | .hljs-section {
33 | color: #008888;
34 | font-weight: bold;
35 | }
36 |
37 | .hljs-regexp,
38 | .hljs-symbol,
39 | .hljs-variable,
40 | .hljs-template-variable,
41 | .hljs-link,
42 | .hljs-selector-attr,
43 | .hljs-selector-pseudo {
44 | color: #bc6060;
45 | }
46 |
47 | .hljs-literal {
48 | color: #78a960;
49 | }
50 |
51 | .hljs-built_in,
52 | .hljs-bullet,
53 | .hljs-code,
54 | .hljs-addition {
55 | color: #f58300;
56 | }
57 |
58 | .hljs-meta {
59 | color: #1f7199;
60 | }
61 |
62 | .hljs-meta-string {
63 | color: #4d99bf;
64 | }
65 |
66 | .hljs-emphasis {
67 | font-style: italic;
68 | }
69 |
70 | .hljs-strong {
71 | font-weight: bold;
72 | }
73 |
74 | pre {
75 | background-color: #222222;
76 | padding: 1em 1em 1em 1em;
77 | border-width: 5px;
78 | border-radius: 2em;
79 | border-color: var(--color-brand);
80 | overflow-x: hidden;
81 |
82 | code {
83 | line-height: 100%;
84 | padding: 0.2em;
85 | letter-spacing: -0.05em;
86 | word-break: normal;
87 | font-family: monospace;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/lib/assets/styles/inter.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: inter;
3 | font-style: normal;
4 | font-weight: 400;
5 | font-display: swap;
6 | src: url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff2?v=3.19') format('woff2'),
7 | url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff?v=3.19') format('woff');
8 | }
9 | @font-face {
10 | font-family: inter;
11 | font-style: normal;
12 | font-weight: 500;
13 | font-display: swap;
14 | src: url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff2?v=3.19') format('woff2'),
15 | url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff?v=3.19') format('woff');
16 | }
17 | @font-face {
18 | font-family: inter;
19 | font-style: normal;
20 | font-weight: 600;
21 | font-display: swap;
22 | src: url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff2?v=3.19') format('woff2'),
23 | url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff?v=3.19') format('woff');
24 | }
25 | @font-face {
26 | font-family: inter;
27 | font-style: normal;
28 | font-weight: 700;
29 | font-display: swap;
30 | src: url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff2?v=3.19') format('woff2'),
31 | url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff?v=3.19') format('woff');
32 | }
33 | @font-face {
34 | font-family: inter;
35 | font-style: normal;
36 | font-weight: 800;
37 | font-display: swap;
38 | src: url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19') format('woff2'),
39 | url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff?v=3.19') format('woff');
40 | }
41 |
--------------------------------------------------------------------------------
/lib/components/base/Avatar.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
35 |
36 |
37 |
81 |
82 |
144 |
--------------------------------------------------------------------------------
/lib/components/base/Card.vue:
--------------------------------------------------------------------------------
1 |
27 |
28 |
29 |
30 |
38 |
39 |
40 |
41 |
42 |
60 |
--------------------------------------------------------------------------------
/lib/components/base/Checkbox.vue:
--------------------------------------------------------------------------------
1 |
2 |
25 |
26 |
58 |
59 |
134 |
--------------------------------------------------------------------------------
/lib/components/base/Chips.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
65 |
66 |
95 |
--------------------------------------------------------------------------------
/lib/components/base/ConditionalNuxtLink.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
22 |
--------------------------------------------------------------------------------
/lib/components/base/CopyCode.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
30 |
70 |
--------------------------------------------------------------------------------
/lib/components/base/DoubleIcon.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
64 |
--------------------------------------------------------------------------------
/lib/components/base/DropArea.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 |
14 |
15 |
69 |
70 |
99 |
--------------------------------------------------------------------------------
/lib/components/base/EnvironmentIndicator.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ formatMessage(messages.typeLabel, { type: type }) }}
5 |
6 |
14 |
15 |
16 | {{ formatMessage(messages.clientOrServerLabel) }}
17 |
18 |
19 |
20 | {{ formatMessage(messages.clientAndServerLabel) }}
21 |
22 |
28 |
29 | {{ formatMessage(messages.clientLabel) }}
30 |
31 |
37 |
38 | {{ formatMessage(messages.serverLabel) }}
39 |
40 |
41 |
42 | {{ formatMessage(messages.unsupportedLabel) }}
43 |
44 |
45 |
46 | {{ formatMessage(messages.typeLabel, { type: type }) }}
47 |
48 |
49 |
50 |
103 |
115 |
--------------------------------------------------------------------------------
/lib/components/base/FileInput.vue:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
79 |
80 |
104 |
--------------------------------------------------------------------------------
/lib/components/base/ListSelector.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
35 |
36 |
54 |
--------------------------------------------------------------------------------
/lib/components/base/Notifications.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
62 |
134 |
--------------------------------------------------------------------------------
/lib/components/base/OverflowMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
45 |
46 |
47 |
48 |
49 |
50 |
87 |
88 |
102 |
--------------------------------------------------------------------------------
/lib/components/base/Page.vue:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
24 |
27 |
30 |
31 |
32 |
33 |
36 |
37 |
38 |
39 |
122 |
--------------------------------------------------------------------------------
/lib/components/base/PageBar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
86 |
--------------------------------------------------------------------------------
/lib/components/base/Pagination.vue:
--------------------------------------------------------------------------------
1 |
2 |
54 |
55 |
104 |
105 |
160 |
--------------------------------------------------------------------------------
/lib/components/base/Promotion.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
13 | Host your Minecraft server on
14 | BisectHosting
15 | - get 25% off your first month with code MODRINTH.
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
26 |
43 |
44 |
126 |
--------------------------------------------------------------------------------
/lib/components/base/ScrollableMultiSelect.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
49 |
50 |
107 |
--------------------------------------------------------------------------------
/lib/components/base/Toggle.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
31 |
--------------------------------------------------------------------------------
/lib/components/index.js:
--------------------------------------------------------------------------------
1 | // Base content
2 | export { default as Avatar } from './base/Avatar.vue'
3 | export { default as Badge } from './base/Badge.vue'
4 | export { default as Button } from './base/Button.vue'
5 | export { default as Card } from './base/Card.vue'
6 | export { default as Checkbox } from './base/Checkbox.vue'
7 | export { default as Chips } from './base/Chips.vue'
8 | export { default as ConditionalNuxtLink } from './base/ConditionalNuxtLink.vue'
9 | export { default as CopyCode } from './base/CopyCode.vue'
10 | export { default as DoubleIcon } from './base/DoubleIcon.vue'
11 | export { default as DropArea } from './base/DropArea.vue'
12 | export { default as DropdownSelect } from './base/DropdownSelect.vue'
13 | export { default as EnvironmentIndicator } from './base/EnvironmentIndicator.vue'
14 | export { default as FileInput } from './base/FileInput.vue'
15 | export { default as MarkdownEditor } from './base/MarkdownEditor.vue'
16 | export { default as Notifications } from './base/Notifications.vue'
17 | export { default as OverflowMenu } from './base/OverflowMenu.vue'
18 | export { default as Page } from './base/Page.vue'
19 | export { default as Pagination } from './base/Pagination.vue'
20 | export { default as PopoutMenu } from './base/PopoutMenu.vue'
21 | export { default as ProjectCard } from './base/ProjectCard.vue'
22 | export { default as Promotion } from './base/Promotion.vue'
23 | export { default as Slider } from './base/Slider.vue'
24 | export { default as Toggle } from './base/Toggle.vue'
25 | export { default as ListSelector } from './base/ListSelector.vue'
26 | export { default as PageBar } from './base/PageBar.vue'
27 | export { default as ScrollableMultiSelect } from './base/ScrollableMultiSelect.vue'
28 |
29 | // Branding
30 | export { default as AnimatedLogo } from './brand/AnimatedLogo.vue'
31 | export { default as TextLogo } from './brand/TextLogo.vue'
32 |
33 | // Charts
34 | export { default as Chart } from './chart/Chart.vue'
35 | export { default as CompactChart } from './chart/CompactChart.vue'
36 |
37 | // Modals
38 | export { default as Modal } from './modal/Modal.vue'
39 | export { default as ConfirmModal } from './modal/ConfirmModal.vue'
40 | export { default as ShareModal } from './modal/ShareModal.vue'
41 |
42 | // Navigation
43 | export { default as Breadcrumbs } from './nav/Breadcrumbs.vue'
44 | export { default as NavItem } from './nav/NavItem.vue'
45 | export { default as NavRow } from './nav/NavRow.vue'
46 | export { default as NavStack } from './nav/NavStack.vue'
47 |
48 | // Search
49 | export { default as Categories } from './search/Categories.vue'
50 | export { default as SearchDropdown } from './search/SearchDropdown.vue'
51 | export { default as SearchFilter } from './search/SearchFilter.vue'
52 |
53 | export * from './icons.js'
54 |
--------------------------------------------------------------------------------
/lib/components/modal/ConfirmModal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
13 |
21 |
22 |
23 |
27 |
31 |
32 |
33 |
34 |
35 |
36 |
93 |
94 |
126 |
--------------------------------------------------------------------------------
/lib/components/nav/Breadcrumbs.vue:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
30 |
31 |
57 |
--------------------------------------------------------------------------------
/lib/components/nav/NavItem.vue:
--------------------------------------------------------------------------------
1 |
31 |
32 |
33 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/lib/components/nav/NavRow.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
94 |
95 |
155 |
--------------------------------------------------------------------------------
/lib/components/nav/NavStack.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
23 |
--------------------------------------------------------------------------------
/lib/components/search/Categories.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ formatCategory(category) }}
6 |
7 |
8 |
9 |
21 |
22 |
46 |
--------------------------------------------------------------------------------
/lib/components/search/SearchFilter.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ displayName }}
5 |
6 |
7 |
8 |
34 |
35 |
59 |
--------------------------------------------------------------------------------
/lib/helpers/highlight.js:
--------------------------------------------------------------------------------
1 | import hljs from 'highlight.js/lib/core'
2 | // Scripting
3 | import javascript from 'highlight.js/lib/languages/javascript'
4 | import python from 'highlight.js/lib/languages/python'
5 | import lua from 'highlight.js/lib/languages/lua'
6 | // Coding
7 | import java from 'highlight.js/lib/languages/java'
8 | import kotlin from 'highlight.js/lib/languages/kotlin'
9 | import scala from 'highlight.js/lib/languages/scala'
10 | import groovy from 'highlight.js/lib/languages/groovy'
11 | // Configs
12 | import gradle from 'highlight.js/lib/languages/gradle'
13 | import json from 'highlight.js/lib/languages/json'
14 | import ini from 'highlight.js/lib/languages/ini'
15 | import yaml from 'highlight.js/lib/languages/yaml'
16 | import xml from 'highlight.js/lib/languages/xml'
17 | import properties from 'highlight.js/lib/languages/properties'
18 | import { md, configuredXss } from '@/helpers/parse'
19 |
20 | /* REGISTRATION */
21 | // Scripting
22 | hljs.registerLanguage('javascript', javascript)
23 | hljs.registerLanguage('python', python)
24 | hljs.registerLanguage('lua', lua)
25 | // Coding
26 | hljs.registerLanguage('java', java)
27 | hljs.registerLanguage('kotlin', kotlin)
28 | hljs.registerLanguage('scala', scala)
29 | hljs.registerLanguage('groovy', groovy)
30 | // Configs
31 | hljs.registerLanguage('gradle', gradle)
32 | hljs.registerLanguage('json', json)
33 | hljs.registerLanguage('ini', ini)
34 | hljs.registerLanguage('yaml', yaml)
35 | hljs.registerLanguage('xml', xml)
36 | hljs.registerLanguage('properties', properties)
37 |
38 | /* ALIASES */
39 | // Scripting
40 | hljs.registerAliases(['js'], { languageName: 'javascript' })
41 | hljs.registerAliases(['py'], { languageName: 'python' })
42 | // Coding
43 | hljs.registerAliases(['kt'], { languageName: 'kotlin' })
44 | // Configs
45 | hljs.registerAliases(['json5'], { languageName: 'json' })
46 | hljs.registerAliases(['toml'], { languageName: 'ini' })
47 | hljs.registerAliases(['yml'], { languageName: 'yaml' })
48 | hljs.registerAliases(['html', 'htm', 'xhtml', 'mcui', 'fxml'], { languageName: 'xml' })
49 |
50 | export const renderHighlightedString = (string) =>
51 | configuredXss.process(
52 | md({
53 | highlight: function (str, lang) {
54 | if (lang && hljs.getLanguage(lang)) {
55 | try {
56 | return hljs.highlight(str, { language: lang }).value
57 | } catch (__) {
58 | /* empty */
59 | }
60 | }
61 |
62 | return ''
63 | },
64 | }).render(string)
65 | )
66 |
--------------------------------------------------------------------------------
/lib/helpers/index.js:
--------------------------------------------------------------------------------
1 | export * from './highlight.js'
2 | export * from './parse.js'
3 | export * from './projects.js'
4 | export * from './users.js'
5 | export * from './utils.js'
6 |
--------------------------------------------------------------------------------
/lib/helpers/projects.js:
--------------------------------------------------------------------------------
1 | // noinspection JSUnusedGlobalSymbols
2 |
3 | export const getProjectLink = (project) => {
4 | return `/${project.project_type}/${project.slug ? project.slug : project.id}`
5 | }
6 |
7 | export const getVersionLink = (project, version) => {
8 | if (version) {
9 | return getProjectLink(project) + '/version/' + version.id
10 | } else {
11 | return getProjectLink(project)
12 | }
13 | }
14 |
15 | export const isApproved = (project) => {
16 | return project && APPROVED_PROJECT_STATUSES.includes(project.status)
17 | }
18 |
19 | export const isListed = (project) => {
20 | return project && LISTED_PROJECT_STATUSES.includes(project.status)
21 | }
22 |
23 | export const isUnlisted = (project) => {
24 | return project && UNLISTED_PROJECT_STATUSES.includes(project.status)
25 | }
26 |
27 | export const isPrivate = (project) => {
28 | return project && PRIVATE_PROJECT_STATUSES.includes(project.status)
29 | }
30 |
31 | export const isRejected = (project) => {
32 | return project && REJECTED_PROJECT_STATUSES.includes(project.status)
33 | }
34 |
35 | export const isUnderReview = (project) => {
36 | return project && UNDER_REVIEW_PROJECT_STATUSES.includes(project.status)
37 | }
38 |
39 | export const isDraft = (project) => {
40 | return project && DRAFT_PROJECT_STATUSES.includes(project.status)
41 | }
42 |
43 | export const APPROVED_PROJECT_STATUSES = ['approved', 'archived', 'unlisted', 'private']
44 | export const LISTED_PROJECT_STATUSES = ['approved', 'archived']
45 | export const UNLISTED_PROJECT_STATUSES = ['unlisted', 'withheld']
46 | export const PRIVATE_PROJECT_STATUSES = ['private', 'rejected', 'processing']
47 | export const REJECTED_PROJECT_STATUSES = ['rejected', 'withheld']
48 | export const UNDER_REVIEW_PROJECT_STATUSES = ['processing']
49 | export const DRAFT_PROJECT_STATUSES = ['draft']
50 |
--------------------------------------------------------------------------------
/lib/helpers/users.js:
--------------------------------------------------------------------------------
1 | // noinspection JSUnusedGlobalSymbols
2 |
3 | export const getUserLink = (user) => {
4 | return `/user/${user.username}`
5 | }
6 |
7 | export const isStaff = (user) => {
8 | return user && STAFF_ROLES.includes(user.role)
9 | }
10 |
11 | export const STAFF_ROLES = ['moderator', 'admin']
12 |
--------------------------------------------------------------------------------
/lib/index.ts:
--------------------------------------------------------------------------------
1 | import * as components from './components/index.js'
2 | import FloatingVue from 'floating-vue'
3 | import { Plugin } from 'vue'
4 |
5 | export const plugin: Plugin = (app) => {
6 | for (const key in components) {
7 | app.component(key, components[key as keyof typeof components])
8 | }
9 | app.use(FloatingVue)
10 | }
11 |
12 | export * from './components/index.js'
13 | export * from './helpers/index.js'
14 |
15 | import './assets/omorphia.scss'
16 |
--------------------------------------------------------------------------------
/lib/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/locales/en-US/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "omorphia.component.badge.label.accepted": {
3 | "defaultMessage": "Accepted"
4 | },
5 | "omorphia.component.badge.label.approved": {
6 | "defaultMessage": "Approved"
7 | },
8 | "omorphia.component.badge.label.archived": {
9 | "defaultMessage": "Archived"
10 | },
11 | "omorphia.component.badge.label.closed": {
12 | "defaultMessage": "Closed"
13 | },
14 | "omorphia.component.badge.label.creator": {
15 | "defaultMessage": "Creator"
16 | },
17 | "omorphia.component.badge.label.draft": {
18 | "defaultMessage": "Draft"
19 | },
20 | "omorphia.component.badge.label.failed": {
21 | "defaultMessage": "Failed"
22 | },
23 | "omorphia.component.badge.label.listed": {
24 | "defaultMessage": "Listed"
25 | },
26 | "omorphia.component.badge.label.moderator": {
27 | "defaultMessage": "Moderator"
28 | },
29 | "omorphia.component.badge.label.modrinth-team": {
30 | "defaultMessage": "Modrinth Team"
31 | },
32 | "omorphia.component.badge.label.pending": {
33 | "defaultMessage": "Pending"
34 | },
35 | "omorphia.component.badge.label.private": {
36 | "defaultMessage": "Private"
37 | },
38 | "omorphia.component.badge.label.processed": {
39 | "defaultMessage": "Processed"
40 | },
41 | "omorphia.component.badge.label.rejected": {
42 | "defaultMessage": "Rejected"
43 | },
44 | "omorphia.component.badge.label.returned": {
45 | "defaultMessage": "Returned"
46 | },
47 | "omorphia.component.badge.label.scheduled": {
48 | "defaultMessage": "Scheduled"
49 | },
50 | "omorphia.component.badge.label.under-review": {
51 | "defaultMessage": "Under review"
52 | },
53 | "omorphia.component.badge.label.unlisted": {
54 | "defaultMessage": "Unlisted"
55 | },
56 | "omorphia.component.badge.label.withheld": {
57 | "defaultMessage": "Withheld"
58 | },
59 | "omorphia.component.copy.action.copy": {
60 | "defaultMessage": "Copy code to clipboard"
61 | },
62 | "omorphia.component.environment-indicator.label.client": {
63 | "defaultMessage": "Client"
64 | },
65 | "omorphia.component.environment-indicator.label.client-and-server": {
66 | "defaultMessage": "Client and server"
67 | },
68 | "omorphia.component.environment-indicator.label.client-or-server": {
69 | "defaultMessage": "Client or server"
70 | },
71 | "omorphia.component.environment-indicator.label.server": {
72 | "defaultMessage": "Server"
73 | },
74 | "omorphia.component.environment-indicator.label.type": {
75 | "defaultMessage": "A {type}"
76 | },
77 | "omorphia.component.environment-indicator.label.unsupported": {
78 | "defaultMessage": "Unsupported"
79 | },
80 | "project.by-author": {
81 | "defaultMessage": "by {author}"
82 | },
83 | "project.tooltip.downloads": {
84 | "defaultMessage": "{count} downloads"
85 | },
86 | "project.tooltip.followers": {
87 | "defaultMessage": "{count} followers"
88 | },
89 | "project.tooltip.published": {
90 | "defaultMessage": "Published {date}"
91 | },
92 | "project.tooltip.updated": {
93 | "defaultMessage": "Updated {date}"
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "omorphia",
3 | "type": "module",
4 | "version": "0.9.5",
5 | "files": [
6 | "dist",
7 | "locales"
8 | ],
9 | "module": "./dist/omorphia.js",
10 | "exports": {
11 | ".": {
12 | "types": "./dist/index.d.ts",
13 | "import": "./dist/omorphia.js"
14 | },
15 | "./locales/*": {
16 | "import": "./locales/*"
17 | },
18 | "./dist/style.css": "./dist/style.css"
19 | },
20 | "scripts": {
21 | "build": "vue-tsc && vite build",
22 | "lint:js": "eslint --ext .js,.vue,.ts,.jsx,.tsx,.html,.vue .",
23 | "lint": "pnpm run lint:js && prettier --check .",
24 | "fix": "eslint --fix --ext .js,.vue,.ts,.jsx,.tsx,.html,.vue . && prettier --write .",
25 | "docs:dev": "vitepress dev docs",
26 | "docs:build": "vitepress build docs",
27 | "docs:preview": "vitepress preview docs",
28 | "intl:extract": "formatjs extract \"lib/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore \"lib/**/*.d.ts\" --out-file locales/en-US/index.json --preserve-whitespace"
29 | },
30 | "dependencies": {
31 | "@codemirror/commands": "^6.3.2",
32 | "@codemirror/lang-markdown": "^6.2.3",
33 | "@codemirror/language": "^6.9.3",
34 | "@codemirror/state": "^6.3.2",
35 | "@codemirror/view": "^6.22.1",
36 | "apexcharts": "^3.44.0",
37 | "dayjs": "^1.11.10",
38 | "floating-vue": "2.0.0-beta.24",
39 | "highlight.js": "^11.9.0",
40 | "markdown-it": "^13.0.2",
41 | "qrcode.vue": "^3.4.1",
42 | "vue": "^3.3.9",
43 | "vue-router": "^4.2.5",
44 | "vue-select": "4.0.0-beta.6",
45 | "vue3-apexcharts": "^1.4.4",
46 | "xss": "^1.0.14"
47 | },
48 | "devDependencies": {
49 | "@formatjs/cli": "^6.2.4",
50 | "@rollup/plugin-virtual": "^3.0.2",
51 | "@typescript-eslint/eslint-plugin": "^6.13.1",
52 | "@typescript-eslint/parser": "^6.13.1",
53 | "@vintl/unplugin": "^1.5.1",
54 | "@vintl/vintl": "^4.4.1",
55 | "@vitejs/plugin-vue": "^4.5.0",
56 | "eslint": "^8.54.0",
57 | "eslint-config-prettier": "^8.10.0",
58 | "eslint-plugin-prettier": "^4.2.1",
59 | "eslint-plugin-vue": "^9.18.1",
60 | "glob": "^10.3.10",
61 | "postcss": "^8.4.31",
62 | "postcss-prefix-selector": "^1.16.0",
63 | "prettier": "^2.8.8",
64 | "rollup-plugin-node-externals": "^6.1.2",
65 | "sass": "^1.69.5",
66 | "sass-loader": "^13.3.2",
67 | "typescript": "^5.3.2",
68 | "vite": "^4.5.0",
69 | "vite-plugin-dts": "^3.6.3",
70 | "vite-plugin-eslint": "^1.8.1",
71 | "vite-svg-loader": "^4.0.0",
72 | "vitepress": "1.0.0-rc.31",
73 | "vue-tsc": "^1.8.22"
74 | },
75 | "peerDependencies": {
76 | "vue": "^3.3.4"
77 | },
78 | "packageManager": "pnpm@8.5.1"
79 | }
80 |
--------------------------------------------------------------------------------
/tsconfig.docs.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 |
5 | "target": "ESNext",
6 | "moduleResolution": "Bundler",
7 |
8 | "allowJs": true,
9 | "allowArbitraryExtensions": true,
10 | "allowImportingTsExtensions": true,
11 | "resolveJsonModule": true,
12 |
13 | "emitDeclarationOnly": true
14 | },
15 | "include": [
16 | "docs/.vitepress/**/*.ts",
17 | "docs/.vitepress/**/*.js",
18 | "docs/.vitepress/**/*.vue",
19 | "locales/*.json"
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2022",
4 | "useDefineForClassFields": true,
5 | "module": "ESNext",
6 | "lib": ["ES2022", "DOM", "DOM.Iterable"],
7 | "skipLibCheck": true,
8 |
9 | /* Bundler mode */
10 | "moduleResolution": "bundler",
11 | "allowImportingTsExtensions": true,
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "noEmit": true,
15 | "jsx": "preserve",
16 | "allowJs": true,
17 |
18 | /* Linting */
19 | "strict": true,
20 | "noUnusedLocals": true,
21 | "noUnusedParameters": true,
22 | "noFallthroughCasesInSwitch": true,
23 |
24 | "paths": {
25 | "@/*": ["./lib/*"],
26 | "@": ["./lib/index.ts"]
27 | }
28 | },
29 | "include": ["lib/**/*.js", "lib/**/*.ts", "lib/**/*.d.ts", "lib/**/*.tsx", "lib/**/*.vue"],
30 | "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.docs.json" }]
31 | }
32 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "bundler",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "github": {
3 | "silent": true
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/vite.config.ts:
--------------------------------------------------------------------------------
1 | import { resolve } from 'path'
2 | import { defineConfig } from 'vite'
3 | import svgLoader from 'vite-svg-loader'
4 | import eslintPlugin from 'vite-plugin-eslint'
5 | import vue from '@vitejs/plugin-vue'
6 | import dts from 'vite-plugin-dts'
7 | import nodeExternals from 'rollup-plugin-node-externals'
8 |
9 | export default defineConfig({
10 | build: {
11 | minify: false,
12 | lib: {
13 | entry: resolve(__dirname, 'lib/index.ts'),
14 | name: 'Omorphia',
15 | fileName: 'omorphia',
16 | formats: ['es'],
17 | },
18 | },
19 | plugins: [
20 | { enforce: 'pre', ...nodeExternals() },
21 | vue(),
22 | svgLoader({
23 | svgoConfig: {
24 | plugins: [
25 | {
26 | name: 'preset-default',
27 | params: {
28 | overrides: {
29 | removeViewBox: false,
30 | },
31 | },
32 | },
33 | ],
34 | },
35 | }),
36 | eslintPlugin(),
37 | dts(),
38 | ],
39 | resolve: {
40 | alias: {
41 | '@': resolve(__dirname, './lib'),
42 | },
43 | },
44 | })
45 |
--------------------------------------------------------------------------------