├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── enhancement.yml └── workflows │ ├── build.yml │ └── publish.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.json ├── COPYING.md ├── LICENSE ├── README.md ├── crowdin.yml ├── docs ├── .postcssrc.cjs ├── .vitepress │ ├── config.js │ ├── env.d.ts │ └── theme │ │ ├── DemoContainer.vue │ │ ├── LanguageSwitcher.vue │ │ ├── compat.scss │ │ ├── index.js │ │ └── style.scss ├── components │ ├── analytics.md │ ├── animated-logo.md │ ├── avatar.md │ ├── badge.md │ ├── button.md │ ├── card.md │ ├── categories.md │ ├── checkbox.md │ ├── chips.md │ ├── copy-code.md │ ├── drop-area.md │ ├── dropdown-select.md │ ├── environment-indicator.md │ ├── file-input.md │ ├── icons.md │ ├── markdown-editor.md │ ├── markdown.md │ ├── modal.md │ ├── notifications.md │ ├── number-inputs.md │ ├── overflow-menu.md │ ├── pagination.md │ ├── popout-menu.md │ ├── project-card.md │ ├── promotion.md │ ├── search-dropdown.md │ ├── search-filter.md │ ├── share-modal.md │ ├── slider.md │ ├── text-inputs.md │ ├── text-logo.md │ └── toggle.md ├── index.md ├── public │ ├── favicon.ico │ └── favicon.svg └── setup.md ├── lib ├── assets │ ├── branding │ │ ├── 404.svg │ │ └── logo.svg │ ├── external │ │ ├── apple.svg │ │ ├── bh.svg │ │ ├── bmac.svg │ │ ├── discord.svg │ │ ├── kofi.svg │ │ ├── mastodon.svg │ │ ├── opencollective.svg │ │ ├── patreon.svg │ │ ├── paypal.svg │ │ ├── reddit.svg │ │ ├── sso │ │ │ ├── discord.svg │ │ │ ├── github.svg │ │ │ ├── gitlab.svg │ │ │ ├── google.svg │ │ │ ├── microsoft.svg │ │ │ └── steam.svg │ │ ├── twitter.svg │ │ └── windows.svg │ ├── icons │ │ ├── align-left.svg │ │ ├── archive.svg │ │ ├── asterisk.svg │ │ ├── bell-ring.svg │ │ ├── bell.svg │ │ ├── bold.svg │ │ ├── book.svg │ │ ├── bookmark.svg │ │ ├── box.svg │ │ ├── calendar.svg │ │ ├── chart.svg │ │ ├── check-check.svg │ │ ├── check-circle.svg │ │ ├── check.svg │ │ ├── chevron-left.svg │ │ ├── chevron-right.svg │ │ ├── clear.svg │ │ ├── client.svg │ │ ├── clipboard-copy.svg │ │ ├── code.svg │ │ ├── coins.svg │ │ ├── contract.svg │ │ ├── copy.svg │ │ ├── copyright.svg │ │ ├── currency.svg │ │ ├── dashboard.svg │ │ ├── download.svg │ │ ├── dropdown.svg │ │ ├── edit.svg │ │ ├── expand.svg │ │ ├── external.svg │ │ ├── eye-off.svg │ │ ├── eye.svg │ │ ├── file-text.svg │ │ ├── file.svg │ │ ├── filter.svg │ │ ├── folder-open.svg │ │ ├── folder-search.svg │ │ ├── gap.svg │ │ ├── github.svg │ │ ├── globe.svg │ │ ├── grid.svg │ │ ├── hamburger.svg │ │ ├── hammer.svg │ │ ├── hash.svg │ │ ├── heading-1.svg │ │ ├── heading-2.svg │ │ ├── heading-3.svg │ │ ├── heart-handshake.svg │ │ ├── heart.svg │ │ ├── history.svg │ │ ├── home.svg │ │ ├── image.svg │ │ ├── import.svg │ │ ├── info.svg │ │ ├── issues.svg │ │ ├── italic.svg │ │ ├── key.svg │ │ ├── languages.svg │ │ ├── left-arrow.svg │ │ ├── library.svg │ │ ├── light-bulb.svg │ │ ├── link.svg │ │ ├── list-bulleted.svg │ │ ├── list-end.svg │ │ ├── list-ordered.svg │ │ ├── list.svg │ │ ├── lock.svg │ │ ├── log-in.svg │ │ ├── log-out.svg │ │ ├── mail.svg │ │ ├── message.svg │ │ ├── microphone.svg │ │ ├── moon.svg │ │ ├── more-horizontal.svg │ │ ├── more-vertical.svg │ │ ├── omorphia.svg │ │ ├── paintbrush.svg │ │ ├── play.svg │ │ ├── plus.svg │ │ ├── radio-button-checked.svg │ │ ├── radio-button.svg │ │ ├── redo.svg │ │ ├── reply.svg │ │ ├── report.svg │ │ ├── right-arrow.svg │ │ ├── save.svg │ │ ├── scale.svg │ │ ├── scan-eye.svg │ │ ├── search.svg │ │ ├── send.svg │ │ ├── server.svg │ │ ├── settings.svg │ │ ├── share.svg │ │ ├── shield.svg │ │ ├── slash.svg │ │ ├── sort-asc.svg │ │ ├── sort-desc.svg │ │ ├── star.svg │ │ ├── stop-circle.svg │ │ ├── strikethrough.svg │ │ ├── sun.svg │ │ ├── sunrise.svg │ │ ├── tag.svg │ │ ├── tags.svg │ │ ├── terminal-square.svg │ │ ├── text-quote.svg │ │ ├── transfer.svg │ │ ├── trash.svg │ │ ├── underline.svg │ │ ├── undo.svg │ │ ├── unknown-donation.svg │ │ ├── unknown.svg │ │ ├── updated.svg │ │ ├── upload.svg │ │ ├── user-plus.svg │ │ ├── user-x.svg │ │ ├── user.svg │ │ ├── users.svg │ │ ├── version.svg │ │ ├── wiki.svg │ │ ├── x-circle.svg │ │ ├── x.svg │ │ ├── youtube.svg │ │ ├── zoom-in.svg │ │ └── zoom-out.svg │ ├── omorphia.scss │ └── styles │ │ ├── accessibility.scss │ │ ├── classes.scss │ │ ├── defaults.scss │ │ ├── highlightjs.scss │ │ ├── inter.scss │ │ ├── normalize.scss │ │ └── variables.scss ├── components │ ├── base │ │ ├── Avatar.vue │ │ ├── Badge.vue │ │ ├── Button.vue │ │ ├── Card.vue │ │ ├── Checkbox.vue │ │ ├── Chips.vue │ │ ├── ConditionalNuxtLink.vue │ │ ├── CopyCode.vue │ │ ├── DoubleIcon.vue │ │ ├── DropArea.vue │ │ ├── DropdownSelect.vue │ │ ├── EnvironmentIndicator.vue │ │ ├── FileInput.vue │ │ ├── ListSelector.vue │ │ ├── MarkdownEditor.vue │ │ ├── Notifications.vue │ │ ├── OverflowMenu.vue │ │ ├── Page.vue │ │ ├── PageBar.vue │ │ ├── Pagination.vue │ │ ├── PopoutMenu.vue │ │ ├── ProjectCard.vue │ │ ├── Promotion.vue │ │ ├── ScrollableMultiSelect.vue │ │ ├── Slider.vue │ │ └── Toggle.vue │ ├── brand │ │ ├── AnimatedLogo.vue │ │ └── TextLogo.vue │ ├── chart │ │ ├── Chart.vue │ │ └── CompactChart.vue │ ├── icons.js │ ├── index.js │ ├── modal │ │ ├── ConfirmModal.vue │ │ ├── Modal.vue │ │ └── ShareModal.vue │ ├── nav │ │ ├── Breadcrumbs.vue │ │ ├── NavItem.vue │ │ ├── NavRow.vue │ │ └── NavStack.vue │ └── search │ │ ├── Categories.vue │ │ ├── SearchDropdown.vue │ │ └── SearchFilter.vue ├── helpers │ ├── codemirror.ts │ ├── highlight.js │ ├── index.js │ ├── parse.js │ ├── projects.js │ ├── users.js │ └── utils.js ├── index.ts └── vite-env.d.ts ├── locales └── en-US │ └── index.json ├── package.json ├── pnpm-lock.yaml ├── tsconfig.docs.json ├── tsconfig.json ├── tsconfig.node.json ├── vercel.json └── vite.config.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 100 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log* 3 | .nuxt 4 | .nitro 5 | .cache 6 | .output 7 | .env 8 | dist 9 | *.md 10 | 11 | generated/ 12 | !.gitkeep 13 | 14 | # Created by .ignore support plugin (hsz.mobi) 15 | ### Node template 16 | # Logs 17 | /logs 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | 23 | # Runtime data 24 | pids 25 | *.pid 26 | *.seed 27 | *.pid.lock 28 | 29 | # Directory for instrumented libs generated by jscoverage/JSCover 30 | lib-cov 31 | 32 | # Coverage directory used by tools like istanbul 33 | coverage 34 | 35 | # nyc test coverage 36 | .nyc_output 37 | 38 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 39 | .grunt 40 | 41 | # Bower dependency directory (https://bower.io/) 42 | bower_components 43 | 44 | # node-waf configuration 45 | .lock-wscript 46 | 47 | # Compiled binary addons (https://nodejs.org/api/addons.html) 48 | build/Release 49 | 50 | # Dependency directories 51 | jspm_packages/ 52 | 53 | # TypeScript v1 declaration files 54 | typings/ 55 | 56 | # Optional npm cache directory 57 | .npm 58 | 59 | # Optional eslint cache 60 | .eslintcache 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # Serverless directories 72 | .serverless 73 | 74 | # IDE / Editor 75 | .idea 76 | 77 | # Service worker 78 | sw.* 79 | 80 | # macOS 81 | .DS_Store 82 | 83 | # Vim swap files 84 | *.swp 85 | 86 | # pnpm files 87 | pnpm-lock.yaml 88 | /.npmrc 89 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "browser": true, 5 | "es2021": true, 6 | "node": true 7 | }, 8 | "extends": [ 9 | "eslint:recommended", 10 | "plugin:@typescript-eslint/recommended", 11 | "plugin:vue/vue3-recommended", 12 | "plugin:prettier/recommended", 13 | "prettier" 14 | ], 15 | "parserOptions": { 16 | "parser": { 17 | "js": "espree", 18 | "jsx": "espree", 19 | "cjs": "espree", 20 | "mjs": "espree", 21 | "ts": "@typescript-eslint/parser" 22 | }, 23 | "ecmaVersion": "latest", 24 | "sourceType": "module", 25 | "extraFileExtensions": [".vue"], 26 | "ecmaFeatures": { 27 | "jsx": true 28 | } 29 | }, 30 | "plugins": ["@typescript-eslint", "vue"], 31 | "rules": { 32 | "no-console": "off", 33 | "vue/no-v-html": "off", 34 | "comma-dangle": ["error", "only-multiline"], 35 | "vue/multi-word-component-names": "off", 36 | "import/no-named-as-default": "off" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 2 | description: Create a report to help us improve Modrinth 3 | labels: [bug] 4 | body: 5 | - type: textarea 6 | attributes: 7 | label: Describe the bug 8 | description: A clear and concise description of what the bug is. 9 | validations: 10 | required: false 11 | - type: textarea 12 | attributes: 13 | label: Steps to reproduce 14 | description: Steps to reproduce the behavior. 15 | placeholder: | 16 | 1. Go to '...' 17 | 2. Click on '...' 18 | 3. Scroll down to '...' 19 | 4. See error 20 | validations: 21 | required: false 22 | - type: textarea 23 | attributes: 24 | label: Expected behavior 25 | description: A clear and concise description of what you expected to happen. 26 | validations: 27 | required: false 28 | - type: textarea 29 | attributes: 30 | label: Additional context 31 | description: Add any other context about the problem here. 32 | validations: 33 | required: false 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Discord 4 | about: Ask questions on our Discord Server. 5 | url: https://discord.modrinth.com 6 | - name: Roadmap 7 | about: View our Roadmap. Please do not open issues for items on our roadmap. 8 | url: https://roadmap.modrinth.com 9 | - name: Discussions (Feature requests) 10 | about: | 11 | Please use Issues for reporting bugs and suggesting enhancements to existing features. 12 | Suggestions for new features should be made as a Discussion. 13 | url: https://github.com/orgs/modrinth/discussions/categories/feature-requests 14 | - name: Documentation 15 | about: Useful documentation about Modrinth, its API, and how you can contribute. 16 | url: https://docs.modrinth.com 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yml: -------------------------------------------------------------------------------- 1 | name: Enhancement 2 | description: Suggest an enhancement for an existing Modrinth feature 3 | labels: [enhancement] 4 | body: 5 | - type: textarea 6 | attributes: 7 | label: Is your suggested enhancement related to a problem? Please describe. 8 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | validations: 10 | required: false 11 | - type: textarea 12 | attributes: 13 | label: Describe the solution you'd like 14 | description: A clear and concise description of what you want to happen. 15 | validations: 16 | required: false 17 | - type: textarea 18 | attributes: 19 | label: Describe alternatives you've considered 20 | description: A clear and concise description of any alternative solutions or features you've considered. 21 | validations: 22 | required: false 23 | - type: textarea 24 | attributes: 25 | label: Additional context 26 | description: Add any other context or screenshots about the suggested enhancement here. 27 | validations: 28 | required: false 29 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build + Lint 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v3 15 | - name: Use Node.js 16 | uses: actions/setup-node@v3 17 | with: 18 | node-version: 18.x 19 | - name: Install pnpm via corepack 20 | shell: bash 21 | run: | 22 | corepack enable 23 | corepack prepare --activate 24 | - name: Get pnpm store directory 25 | id: pnpm-cache 26 | shell: bash 27 | run: | 28 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 29 | - name: Setup pnpm cache 30 | uses: actions/cache@v3 31 | with: 32 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 33 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} 34 | restore-keys: | 35 | ${{ runner.os }}-pnpm-store- 36 | - name: Install dependencies 37 | run: pnpm install 38 | - name: Run Lint 39 | run: pnpm lint 40 | - name: Build 41 | run: pnpm build 42 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish Package 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | jobs: 9 | publish: 10 | runs-on: ubuntu-latest 11 | environment: Release 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v3 15 | 16 | - name: Use Node.js 17 | uses: actions/setup-node@v3 18 | with: 19 | node-version: 18.x 20 | - name: Install pnpm via corepack 21 | shell: bash 22 | run: | 23 | corepack enable 24 | corepack prepare --activate 25 | - name: Get pnpm store directory 26 | id: pnpm-cache 27 | shell: bash 28 | run: | 29 | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 30 | - name: Setup pnpm cache 31 | uses: actions/cache@v3 32 | with: 33 | path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} 34 | key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} 35 | restore-keys: | 36 | ${{ runner.os }}-pnpm-store- 37 | - name: Install dependencies 38 | run: pnpm install 39 | - name: Build 40 | run: pnpm build 41 | - name: Set publishing config 42 | run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" 43 | env: 44 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} 45 | - name: Publish package 46 | run: pnpm publish --no-git-checks --access=public --tag latest 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | docs/.vitepress/cache 30 | 31 | package-lock.json 32 | yarn.lock 33 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | fetch-retry-mintimeout=20000 2 | fetch-retry-maxtimeout=120000 3 | auto-install-peers=true 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.log* 3 | .nuxt 4 | .nitro 5 | .cache 6 | .output 7 | .env 8 | dist 9 | *.md 10 | 11 | generated/ 12 | !.gitkeep 13 | 14 | # Created by .ignore support plugin (hsz.mobi) 15 | ### Node template 16 | # Logs 17 | /logs 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | 22 | 23 | # Runtime data 24 | pids 25 | *.pid 26 | *.seed 27 | *.pid.lock 28 | 29 | # Directory for instrumented libs generated by jscoverage/JSCover 30 | lib-cov 31 | 32 | # Coverage directory used by tools like istanbul 33 | coverage 34 | 35 | # nyc test coverage 36 | .nyc_output 37 | 38 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 39 | .grunt 40 | 41 | # Bower dependency directory (https://bower.io/) 42 | bower_components 43 | 44 | # node-waf configuration 45 | .lock-wscript 46 | 47 | # Compiled binary addons (https://nodejs.org/api/addons.html) 48 | build/Release 49 | 50 | # Dependency directories 51 | jspm_packages/ 52 | 53 | # TypeScript v1 declaration files 54 | typings/ 55 | 56 | # Optional npm cache directory 57 | .npm 58 | 59 | # Optional eslint cache 60 | .eslintcache 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # Serverless directories 72 | .serverless 73 | 74 | # IDE / Editor 75 | .idea 76 | 77 | # Service worker 78 | sw.* 79 | 80 | # macOS 81 | .DS_Store 82 | 83 | # Vim swap files 84 | *.swp 85 | 86 | # pnpm files 87 | pnpm-lock.yaml 88 | /.npmrc 89 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "semi": false, 4 | "singleQuote": true, 5 | "endOfLine": "auto" 6 | } 7 | -------------------------------------------------------------------------------- /COPYING.md: -------------------------------------------------------------------------------- 1 | # Copying 2 | 3 | The source code of the omorphia repository is licensed under the GNU General Public License, Version 3 only, which is provided in the file [LICENSE](./LICENSE). However, some files listed below are licensed under a different license. 4 | 5 | ## Modrinth logo 6 | 7 | Any files depicting the Modrinth branding, including the wrench-in-labyrinth logo, the landing image, and variations thereof, are licensed as follows: 8 | 9 | > All rights reserved. © 2020-2023 Rinth, Inc. 10 | 11 | This includes, but may not be limited to, the following files: 12 | 13 | - lib/assets/branding/* 14 | 15 | ## External logos 16 | 17 | The following files are owned by their respective copyright holders and must be used within each of their Brand Guidelines: 18 | 19 | - lib/assets/external/* 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Omorphia is now known as the packages in Modrinth's monorepo here: https://github.com/modrinth/code/tree/main/packages 2 | This repo is archived and will no longer be updated. 3 | -------------------------------------------------------------------------------- /crowdin.yml: -------------------------------------------------------------------------------- 1 | project_id: 518556 2 | preserve_hierarchy: true 3 | commit_message: '[ci skip]' 4 | 5 | files: 6 | - source: /locales/en-US/* 7 | dest: /%original_file_name% 8 | translation: /locales/%locale%/%original_file_name% 9 | -------------------------------------------------------------------------------- /docs/.postcssrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | 'postcss-prefix-selector': { 4 | prefix: ':not(:where(.vp-raw *))', 5 | includeFiles: [/vp-doc\.css/], 6 | transform(prefix, _selector) { 7 | const [selector, pseudo = ''] = _selector.split(/(:\S*)$/) 8 | return selector + prefix + pseudo 9 | }, 10 | }, 11 | }, 12 | } 13 | -------------------------------------------------------------------------------- /docs/.vitepress/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '@modrinth/omorphia-dev/locales/index.js' { 4 | interface LocaleExport { 5 | messages: Record 6 | } 7 | 8 | interface LocaleDefinition { 9 | importFunction(): Promise 10 | } 11 | 12 | const localeDefinitions: Partial> 13 | 14 | export { localeDefinitions } 15 | } 16 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/DemoContainer.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 17 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/LanguageSwitcher.vue: -------------------------------------------------------------------------------- 1 | 42 | 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 | 42 | 45 | 48 | 51 | 54 | 57 | 58 | 59 | 60 | ```vue 61 | 98 | More options... 99 | 102 | 105 | 108 | 111 | 114 | 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 | 10 | 11 | 12 | Bottom going right 13 | 18 | 19 | 20 | Top going left 21 | 26 | 27 | 28 | Top going right 29 | 34 | 35 | 36 | Left going up 37 | 42 | 43 | 44 | Left going down 45 | 50 | 51 | 52 | Right going up 53 | 58 | 59 | 60 | Right going down 61 | 66 | 67 | 68 | 69 | ```vue 70 | 71 | Bottom going right 72 | 75 | 76 | ``` 77 | 78 | [//]: # (# Popout Menu on hover) 79 | 80 | [//]: # () 81 | 82 | [//]: # ( ) 83 | 84 | [//]: # ( Hover me! ) 85 | 86 | [//]: # ( ) 95 | 96 | [//]: # ( ) 97 | 98 | [//]: # () 99 | 100 | [//]: # () 101 | [//]: # (```vue) 102 | 103 | [//]: # () 104 | 105 | [//]: # ( Hover me!) 106 | 107 | [//]: # ( ) 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 | 27 | 28 | 29 | ```vue 30 | 44 | 45 | 51 | 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 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/external/apple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Black Logo Square 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/assets/external/bh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/assets/external/discord.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/assets/external/kofi.svg: -------------------------------------------------------------------------------- 1 | Ko-fi -------------------------------------------------------------------------------- /lib/assets/external/mastodon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/external/opencollective.svg: -------------------------------------------------------------------------------- 1 | Open Collective -------------------------------------------------------------------------------- /lib/assets/external/patreon.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/external/paypal.svg: -------------------------------------------------------------------------------- 1 | PayPal -------------------------------------------------------------------------------- /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 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/external/sso/google.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /lib/assets/external/sso/microsoft.svg: -------------------------------------------------------------------------------- 1 | MS-SymbolLockup 2 | -------------------------------------------------------------------------------- /lib/assets/external/sso/steam.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/external/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/external/windows.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/align-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/archive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/asterisk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/bell-ring.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/bell.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/bold.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/book.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/bookmark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/box.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/chart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/check-check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/check-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/check.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/chevron-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/chevron-right.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/client.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/clipboard-copy.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/code.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/coins.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/contract.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/copyright.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/currency.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/dashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/dropdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/expand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/external.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/eye-off.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/eye.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/file-text.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/assets/icons/file.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/folder-open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/folder-search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/gap.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/globe.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/grid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/hamburger.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 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 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/history.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/home.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 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 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/languages.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/left-arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/library.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/light-bulb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/list-bulleted.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/list-end.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/list-ordered.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/list.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/assets/icons/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/log-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/log-out.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/mail.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/message.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/microphone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/moon.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 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 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/play.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 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 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /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 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/assets/icons/scan-eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/send.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/server.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/settings.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/shield.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/assets/icons/slash.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/sort-asc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/sort-desc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib/assets/icons/sunrise.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/tag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/tags.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/terminal-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/text-quote.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/transfer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/trash.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/underline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/icons/undo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/unknown-donation.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/assets/icons/updated.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/upload.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/user-plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/user-x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/user.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/users.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/assets/icons/version.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/wiki.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/icons/x-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/assets/icons/x.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 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 | 36 | 37 | 81 | 82 | 144 | -------------------------------------------------------------------------------- /lib/components/base/Card.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 41 | 42 | 60 | -------------------------------------------------------------------------------- /lib/components/base/Checkbox.vue: -------------------------------------------------------------------------------- 1 | 26 | 58 | 59 | 134 | -------------------------------------------------------------------------------- /lib/components/base/Chips.vue: -------------------------------------------------------------------------------- 1 | 15 | 65 | 66 | 95 | -------------------------------------------------------------------------------- /lib/components/base/ConditionalNuxtLink.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | -------------------------------------------------------------------------------- /lib/components/base/CopyCode.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 29 | 30 | 70 | -------------------------------------------------------------------------------- /lib/components/base/DoubleIcon.vue: -------------------------------------------------------------------------------- 1 | 9 | 18 | 64 | -------------------------------------------------------------------------------- /lib/components/base/DropArea.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 69 | 70 | 99 | -------------------------------------------------------------------------------- /lib/components/base/EnvironmentIndicator.vue: -------------------------------------------------------------------------------- 1 | 50 | 103 | 115 | -------------------------------------------------------------------------------- /lib/components/base/FileInput.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 79 | 80 | 104 | -------------------------------------------------------------------------------- /lib/components/base/ListSelector.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 35 | 36 | 54 | -------------------------------------------------------------------------------- /lib/components/base/Notifications.vue: -------------------------------------------------------------------------------- 1 | 20 | 62 | 134 | -------------------------------------------------------------------------------- /lib/components/base/OverflowMenu.vue: -------------------------------------------------------------------------------- 1 | 49 | 50 | 87 | 88 | 102 | -------------------------------------------------------------------------------- /lib/components/base/Page.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 38 | 39 | 122 | -------------------------------------------------------------------------------- /lib/components/base/PageBar.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 86 | -------------------------------------------------------------------------------- /lib/components/base/Pagination.vue: -------------------------------------------------------------------------------- 1 | 55 | 104 | 105 | 160 | -------------------------------------------------------------------------------- /lib/components/base/Promotion.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 43 | 44 | 126 | -------------------------------------------------------------------------------- /lib/components/base/ScrollableMultiSelect.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 49 | 50 | 107 | -------------------------------------------------------------------------------- /lib/components/base/Toggle.vue: -------------------------------------------------------------------------------- 1 | 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 | 35 | 36 | 93 | 94 | 126 | -------------------------------------------------------------------------------- /lib/components/nav/Breadcrumbs.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 30 | 31 | 57 | -------------------------------------------------------------------------------- /lib/components/nav/NavItem.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/components/nav/NavRow.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 94 | 95 | 155 | -------------------------------------------------------------------------------- /lib/components/nav/NavStack.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | -------------------------------------------------------------------------------- /lib/components/search/Categories.vue: -------------------------------------------------------------------------------- 1 | 9 | 21 | 22 | 46 | -------------------------------------------------------------------------------- /lib/components/search/SearchFilter.vue: -------------------------------------------------------------------------------- 1 | 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 | --------------------------------------------------------------------------------