322 Commits

Author SHA1 Message Date
Geometrically
07489fb405
Revert #87 (#139) 2023-11-13 12:58:33 -07:00
Mysterious_Dev
66154b30c1
Add Prefers Reduced Motion support for most components (#133) 2023-11-11 17:22:01 -05:00
ToBinio
bf5d391d53
fix SearchFilter.vue (#123) 2023-11-11 15:12:24 -07:00
Sasha Sorokin
591ce0894e
Add translations support (#116) 2023-11-11 17:03:58 -05:00
ToBinio
1c18563dfb
update VitePress (#117) 2023-11-11 16:48:52 -05:00
ToBinio
b60e781767
convert slider to typescript (#108) 2023-11-11 16:39:25 -05:00
Sasha Sorokin
ca54544b82
Fix declaration types for icons (#114) 2023-11-11 16:32:56 -05:00
Sasha Sorokin
9c3ff71ce4
Make Omorphia an ESM-only module (#115) 2023-11-11 16:22:00 -05:00
Mysterious_Dev
fd82ec7659
Fix page for modal documentation (#132) 2023-11-11 16:09:19 -05:00
Carter
39a4297168
Requested Changes for Editor Knossos Implementation (#129)
* placeholder

* max length & placeholder

* Accept editor comment conflict

* integrate requested features

* null check for ref

* Change prompt for image upload

* change filter for proper input blocking

* Add spoiler button

* change url of helper link

* shallow resource link style

* resource link inherit site style

* detach preview styling from markdown-body style

* remove sizing dependance on global styles

* Bump 0.6.5
2023-10-30 16:59:43 -07:00
Carter
544111846c
Tweaks for Knossos Integration (#122)
* placeholder

* max length & placeholder

* remove default placeholder

* remove scoped css

* allow for throwing in the upload process

* explicit import of info

* fix aggressive card input selection
2023-10-27 17:20:13 -07:00
Carter
79bdea0441
MOD-349 Contextual Uploads for MD Editor (#119)
* Migrate DropArea to composition

* remove hardcoded button styling

* let markdown editor call for image upload

* allow for local testing in the docs

* validate url on set

* add chips to modal with correct defaults

* update docs to show example url doesn't load

* Bump version 0.6.4
2023-10-26 14:34:15 -07:00
Adrian O.V
c056c4e79e
Improved graphs (#120)
* Complete chart overhaul

* Update package.json

* Update pnpm-lock.yaml

* run lint

* whoops

* Update pnpm-lock.yaml

* Update analytics.md

* Try again?

* Update Chart.vue

* Added Compact/Spark charts

* Added number formatting and cleanup

* Touch ups

* improve default colors

* removed unnecessary tooltip
2023-10-26 11:39:26 -07:00
Carter
16a39b364c
Change editor to comply with domain rules MOD-537 (#118)
* insert link rules

* change error message
2023-10-23 17:02:08 -07:00
Emma Alexia
91f79d2be0
Bump version v0.6.2 (#112) 2023-10-20 23:58:59 -04:00
Sasha Sorokin
9932fe5055
Fix relativeTime dayjs plugin import (#111) 2023-10-20 23:34:02 -04:00
Prospector
c296597427
Markdown editor (#92)
* Markdown editor

* use nocookie YT iframes

Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>

* Fix line prefix-related Markdown editor bugs and add auto-lists

* Fix a couple codeblock issues

* address SearchFilter composition

* standardize code and patternize editor

* make editor typesafe

* adjust imports

* simplify key press handler

* Codemirror markdown implementation (#106)

* demo

* custom newline logic

* basic editor styling and buttons

* propogate styles

* validate and command structure for modals

* mobile safari event fix

* remove url field causing remount

* browser & mobile fix for link insertion

* override event passthrough to fix mobile

* fix modal state & disallow invalid url submission

* override paste behavior

* remove block flag in favor of newline insert

* cleanup before pr

* emit value from editor

* remove "a"

---------

Co-authored-by: Emma Alexia Triphora <emma@modrinth.com>
Co-authored-by: Carter <safe@fea.st>
2023-10-20 16:55:38 -07:00
Prospector
97cb5bc12c
Merge pull request #110 from modrinth/fix/dropdown-icon-animation
Only animate the dropdown svg if last child
2023-10-20 09:11:59 -07:00
Prospector
7c596d6bf1
bump version 2023-10-20 08:47:25 -07:00
Prospector
b68799e2d1
Only animate the dropdown svg if last child 2023-10-20 08:20:33 -07:00
Prospector
a3d4db9fc1
Fix popout menu tab indices and buttons within being clickable when closed (#107) 2023-10-17 14:37:37 -07:00
Emma Alexia
8369330053
Move many things over from Knossos (and other rearrangements) (#102) 2023-10-16 21:18:23 -04:00
ToBinio
46a6fee81d
fix Markdown table corners (#105) 2023-10-16 21:02:39 -04:00
ToBinio
b2c75130ce
remove dropdown-button link (#104) 2023-10-16 20:49:53 -04:00
ToBinio
ef444f2a6f
Fix slider snap points positioning (#103) 2023-10-16 20:49:20 -04:00
Carter
36f0871f69
Merge pull request #97 from brawaru/feat/typescript-hell-yeah
Enable TypeScript support
2023-10-16 14:53:40 -07:00
Carter
5adf27d345
Merge branch 'master' into feat/typescript-hell-yeah 2023-10-16 14:51:19 -07:00
Prospector
5e4c261332
Merge pull request #101 from modrinth/feature/joined-buttons
Joined buttons
2023-10-16 07:49:25 -07:00
Prospector
6fb04e23ad
Remove dropdown button 2023-10-16 07:44:11 -07:00
Prospector
2c850a612d
Version bump 2023-10-14 14:45:12 -07:00
Prospector
e555c4d083
Joined buttons 2023-10-14 14:44:27 -07:00
Sasha Sorokin
cb32cca6aa Enable TypeScript support
This commit enables TypeScript support in Omorphia. It reconfigures
Vite, adds two new TSConfig files as a replacement for the old JSConfig,
adds TypeScript linting to ESLint configuration.

Why?
====

TypeScript has became a standard in modern web development. In makes
JavaScript a more type-safe language, makes code more maintaible and
boosts effeciency by empowering development tools.

What's included in this commit?
===============================

TypeScript config files
-----------------------

Old and plain JSConfig has been replaced with two TSConfigs: one
designed for the code, and the other for the Vite configuration file.

JavaScript support is still enabled, therefore TypeScript files can
import JavaScript files as well, and vice versa. However, it is
recommended that all the new files will be written in TypeScript, and
old files are slowly converted over to TypeScript, so this option can be
disabled in the future, making this a safe TypeScript only project.

UMD output is replaced with CJS
-------------------------------

UMD is an old format that tries to stay compatible with both the Node.js
CJS, as well as Require.js. However, nowadays almost everyone is using a
transpiler where this format won't be beneficial.

To avoid it being a breaking change, it has been replaced with CJS. But
in the future it's worth considering removing CJS output as well and
making Omorphia an ESM module only, as it's designed only to be
consumed by the Modrinth project, and all of these projects are already
ESM-first.

Minification is disabled
------------------------

Because this is a library, the responsibility of minifying its code lies
solely on the consumer. Just like with CJS, all of the supported
consumers of this library are already performing minification, so
minifying this library beforehand is rather wasteful and harmful, as it
negatively impacts debugging experience.

More dependencies are now externalised
--------------------------------------

Disabling UMD output allows more easily externalise dependencies based
on the package.json file, making it way more approachable.

Vue is now a peer dependency
----------------------------

Because this is a component library, Vue is not a direct dependency of
this project. Instead, this library relies on consumer having a Vue as
its dependency.

`lib` is no longer included in package
--------------------------------------

`lib` folder contains sources for the imports, but it's outside of
export map and cannot be imported by the consumers. It is now excluded
from the package to reduce the package size and installation time.

Typings
-------

Consumers of this library should also be able to benefit from the type
safety. To achieve this, there's now a Vite plugin that generates type
declarations that represent the project structure.

To lesser the incompatibility with the consumers, some of the files were
changed to import `index.js` from folders rather than folders
themselves.

While both will work for building, not doing this requires consumer to
opt in to bundler module dependency, whereas if `index.js` is imported,
the consumer can use both the normal ESM / Node16 module resolution, as
well as the bundler module resolution.

ESLint configuration changes
----------------------------

ESLint has been reconfigured to support TypeScript, and include rules
recommended by the TypeScript ESLint package. In the future it would be
good to review the rules and override rules for TypeScript files to
disable rules that would conflict with ones from TypeScript ESLint.

Entry file is now a TypeScript file
-----------------------------------

To test the changes and begin the slow conversion, the entry point file
is now a proper TypeScript file.

SVG imports use `?component` parameter
--------------------------------------

All components are now imported with `?component` URL parameter so that
they have a proper file. By default, Vite imports all files like .svg
as strings containing path to the file.

Unfortunately, `vite-svg-loader` overrides this behaviour without
overriding the Vite import type declaration, leading to incorrect types.
However, it does expose a new parameter `?component`, which is properly
typed and does the same thing you'd expect - export a Vue component, so
most of the SVG imports have been converted to use this parameter.
2023-10-14 15:43:57 +02:00
Prospector
ffb491a61f
Merge pull request #98 from modrinth/feature/popout-menus
Small button refactor, overflow and popout menus
2023-10-12 08:42:44 -07:00
Prospector
4ecba93a25
Fix lint 2023-10-12 08:40:05 -07:00
Prospector
52ec1d09b8
Merge pull request #99 from modrinth/bump-master
Bump version to 0.4.41
2023-10-12 08:35:59 -07:00
Prospector
3d2e2e2278
Bump version to 0.5.0 2023-10-12 08:34:02 -07:00
Prospector
f9a9ece320
More button options and dividers in overflow menus 2023-10-12 08:33:50 -07:00
Prospector
ffc46d6a48
Fix button docs 2023-10-12 08:33:50 -07:00
Prospector
ce458642af
indent on popout menu docs 2023-10-12 08:33:50 -07:00
Prospector
820d3ef426
Add example docs for overflow menu 2023-10-12 08:33:50 -07:00
Prospector
145386b6a7
Change page title of overflow menu 2023-10-12 08:33:50 -07:00
Prospector
a708cf7f69
Small button refactor, overflow and popout menus 2023-10-12 08:33:50 -07:00
Prospector
c70ebb6cce
Bump version 2023-10-12 08:32:50 -07:00
Prospector
a260b6eac4
Merge pull request #96 from ToBinio/snapping-slider
add snappingPoints to slider
2023-10-11 14:04:22 -07:00
Prospector
0ab17e1ec8
Merge pull request #87 from Banzobotic/fix-clickable-edges
Fix clicking edges of clickable elements
2023-10-11 14:04:10 -07:00
Prospector
d1a0cd1173
Merge pull request #94 from ToBinio/better-dropdown-transition
improve dropdown transitions
2023-10-11 14:03:59 -07:00
tobinio
3955b973ef add snappingPoints to slider 2023-10-08 10:49:51 +02:00
Emma Alexia Triphora
28b63bac38
Update XSS values to be consistent with knossos (#93)
Implements modrinth/knossos#1208
Implements modrinth/knossos#1239

Also closes modrinth/knossos#1371
2023-09-24 08:07:22 -05:00
tobinio
323a74eef3 improve dropdown transitions 2023-09-18 16:34:41 +02:00
Adrian O.V
ae7f7e9bd6
Search dropdown (#91)
* Bar charts

* Update package.json

* Search Dropdown

* Add circle icon option
2023-09-13 16:21:13 -04:00