65 Commits

Author SHA1 Message Date
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
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
ef444f2a6f
Fix slider snap points positioning (#103) 2023-10-16 20:49:20 -04:00
Carter
5adf27d345
Merge branch 'master' into feat/typescript-hell-yeah 2023-10-16 14:51:19 -07:00
Prospector
6fb04e23ad
Remove dropdown button 2023-10-16 07:44:11 -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
4ecba93a25
Fix lint 2023-10-12 08:40:05 -07:00
Prospector
f9a9ece320
More button options and dividers in overflow menus 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
a260b6eac4
Merge pull request #96 from ToBinio/snapping-slider
add snappingPoints to slider
2023-10-11 14:04:22 -07:00
tobinio
3955b973ef add snappingPoints to slider 2023-10-08 10:49:51 +02: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
Adrian O.V
a7191e8efb
Bar charts (#89)
* Bar charts

* Update package.json
2023-08-21 15:55:50 -04:00
Adrian O.V
e1f4d791ae
Charts (#88)
* Charts

* Version bump

* Update pnpm-lock.yaml
2023-08-21 15:29:24 -04:00
Adrian O.V
27172c2a19
Promotion tweaks (#85)
* Modify promotion, Fix #80, Fix #79

* Update Avatar.vue

* Version bump
2023-08-10 11:49:00 -04:00
Geometrically
a372cbbf52
Switch to new ad (#82) 2023-08-05 09:50:16 -07:00
Wyatt Verchere
05fda903c6
added options to promotion (#81)
* added options to promotion

* prettier

* incremented package.json
2023-07-28 12:52:14 -07:00
Adrian O.V
a149f06f58
Dropdown Input + move to chevron (#78) 2023-06-30 08:09:57 -07:00
Adrian O.V
42f97f63d5
Share modal (#74)
* Creation of the share modal

* Update package.json

* Addressed comments

* Fixed dependency

* Update ShareModal.vue

* Fixed url

* Update ShareModal.vue

* Adressed changes
2023-06-28 08:44:47 -07:00
Geometrically
33f3479569
Fix tauri modal drag region (#72) 2023-06-20 17:14:48 -07:00
Geometrically
6e0659af4c
add draggable attr to modal background (#71) 2023-06-20 09:19:47 -07:00
Prospector
6de1fa0878
Large and outlined buttons (#69) 2023-06-20 09:05:26 -07:00
Geometrically
61e00f1620
Add unclosable modals (#70) 2023-06-19 22:15:45 -07:00
Geometrically
2bdd0a0e8d
Fix dropdown bug on webkit (#68) 2023-06-14 17:48:46 -07:00
Adrian O.V
4f74b3fafe
Dropdowns buttons colorized (#66)
* Buttons  colorized 

* Update package.json
2023-06-12 15:02:16 -07:00
Adrian O.V
6edac37031
fix some styling (oops) (#64)
* fix some styling (oops)

* Update pnpm-lock.yaml
2023-06-10 09:21:29 -07:00
Adrian O.V
cea5a18a7a
Slider and text input changes (#65) 2023-06-10 09:18:15 -07:00
Geometrically
01304e807a
Fix dropdown quirks (#63) 2023-06-06 16:07:58 -07:00
Adrian O.V
d98a6adfb3
Create button (#62) 2023-06-05 23:34:52 -04:00
Geometrically
1db59fc052
Knossos Catch-up (#58)
* Knossos Catch-up

* bump version

* fix build

* fix build again

* Fix lint

* downgrade pnpm

* fix modals

* fix btn style

* add missing styles
2023-05-28 16:36:49 -04:00
Geometrically
e29a4d79ba
Fix none size not working (#55) 2023-05-25 17:39:32 -04:00
Geometrically
4243bf9ba8
Remove uses of iconified-button (#54) 2023-05-25 16:25:36 -04:00
Geometrically
097a1cc799
Notifications (#52)
* Notifications

* fix docs
2023-05-22 14:33:45 -07:00
Geometrically
625511d28b
Disabling sliders (#51)
* Add disabled slider to omorphia

* lint
2023-05-18 19:57:35 -07:00
Adrian O.V
5fde3c53b8
Switch to composition API, Add custom names (#47)
* Switch to composition API, Add custom names

* Update package.json

* Update DropdownSelect.vue
2023-05-03 17:50:39 -04:00
Geometrically
9d92b8cc6d
fix btn transparent, add shadows (#45) 2023-04-22 12:18:09 -07:00
Adrian O.V
6794da0738
Dropdown improvements (#40)
* Disableability, Up or down rendering

* Switch to scale animation

* Update DropdownSelect.vue

* Fix animation

* bump

* adjustments

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2023-04-21 17:03:45 -07:00
Zachary Baird
71d770e679 Fixes lint error in DropdownSelect. 2023-04-12 10:55:19 -04:00
Zachary Baird
08f284ce29 Fixes Lint error. 2023-04-12 10:19:46 -04:00
Zachary Baird
4336aeb0ad Imports XIcon in Modal. 2023-04-12 10:16:38 -04:00
Adrian O.V
0736f372dc
Update slider to composition API (#35)
* Update slider to composition API

* Version bump
2023-04-06 20:05:14 -04:00
Adrian O.V
6bdea219bf
Create component (#34) 2023-04-02 01:53:29 -04:00
Geometrically
d238b0b9f2
Add missing icons (#33)
* Markdown table styling

* Add missing icons

* add code icon
2023-03-31 14:04:09 -04:00
Adrian O.V
78840157ef
Dropdown fix (#31)
* Fix v-model not working

* Fix clicking off not closing dropdown

* Update DropdownSelect.vue
2023-03-29 14:06:50 -04:00
Jai A
70e894c268
fix vars 2023-03-28 10:43:16 -07:00
Jai A
9ff3ab1a2b
lint 2023-03-28 10:42:03 -07:00