There is a bug in vue-multiselect library where it will default
`custom-label` property to raw properies object. Presumably this is a
bug that appeared because they ported library to Vue 3 and have not
considered that the signature for `default` prop's function has changed.
To work around this, we can provide custom `custom-label` property that
is just a function that returns the input itself. In other places, where
objects are passed, `label` property can be used. In this case the first
suggestion applies. DO NOT USE VUE-MULTISELECT WITOUT `LABEL` OR
`CUSTOM-LABEL` PROPS!
Previously, the Exclude button was removed from the the element tree
entirely until the group is hovered. Only when the group is hovered, the
button element was being switched to a proper display form. This has
caused the layout shift which was very visible when quickly moving
cursor over the filter options.
This commit makes it so that the Exclude button is always in its proper
display form (flex), however is transparent until the group is hovered.
The repeated transparency classes were removed from the icon as well to
prevent jarringly-looking double transition.
- Cosmetics and theme preferences are now only stored in cookies instead
of a combination of both cookies and state.
- The theme plugin now supports client hints. This allows the server
to render a page using the client-preferred theme provided it supplies
this information (any browser other than Firefox), helping to avoid an
annoying flash while the page is hydrating.
- For the future, the theme plugin now supports additional light themes.
Light theme preferences are currently not stored, but this can easily
be fixed if the need arises.
- The previous workaround using the Nitro plugin has been removed. Its
functionality is now handled by the Nuxt theme plugin with cleaner
code.
- All pages and components now use the new plugins.
- Compared to the previous attempt, this commit has been improved to be
more robust in cases where the theme cookie contains invalid values.
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
- Cosmetics and theme preferences are now only stored in cookies instead
of a combination of both cookies and state.
- The theme plugin now supports client hints. This allows the server
to render a page using the client-preferred theme provided it supplies
this information (any browser other than Firefox), helping to avoid an
annoying flash while the page is hydrating.
- The previous workaround using the Nitro plugin has been removed. Its
functionality is now handled by the Nuxt theme plugin with cleaner
code.
- All pages and components now use the new plugins.
This pushes bottom transition to a background level while setting it so
that any z-indexes are isolated within the hero to avoid any other
weirdness from happenning.
It seems that Nuxt Turnstile's way of setting the key in `runtimeConfig`
is broken and doesn't work properly, resulting in an error in runtime,
because it has to be set. This commit sets the key in `runtimeConfig`
manually instead, which seems to fix the issue.
It seems that Rollup node-resolve module doesn't properly deal with
trailing slashes, causing it to thing that `string_decoder` is a
built-in Node.js dependency and attempt to import it from `unenv`, which
will obviously fail, because `string_decoder` is not, in fact, a Node.js
dependency, but an individual dependency of `readable-stream`.
This adds a small patch for `readable-stream@2.3.8` dependency, which
removes the leading slash, which seems to fix the builds.
This probably should be reported to relevant developers (Rollup
node-resolve plugin or Nitro?).
* Update Nuxt dependencies
* Fix ref access in ChartDisplay
* Fix feature flags cookie options type error
* Specify type-only imports
* Fix shorthands access to tags outside of reactive scope
* Replace most useRoute calls with useRoute from vue-router
Nuxt's version of this composable is horrendously broken (nuxt/nuxt#21340)
* Import all svgs with ?component parameter
Fixes weird hydration issues + gives correct type
Many people contacting support forget to provide the debug information,
which significantly delays the resolution time because we're forced to
ask for this information anyway, as without it we cannot tell with
certainty the issue the person is facing.
Ideally in the future it would probably make sense to give a link to the
article describing the common issues for self-help, but there's no such
article yet. Perseus however is able to give suggestion for a few issues
given that it has the debug information.
* Further auth requests consistency fixes
- Generated device UUIDs are lowercase, whereas they're uppercase in MCL
- TitleId in SISU authenticate is supposed to be a string (it is in MCL)
- UseModernGamertag in SISU authorize, on the other hand, is a boolean
- Clarified charset of our requests like MCL does
- Specified rng gen call to generate u8 to fix compile error (???)
* Enable deflate, gzip and brotli compression support
This commit adds a fallback to getProjectTypeMessage function to return
a generic project type whenever it encounters an unknown project type,
ensuring there are no errors when the new project types are added.
Implements loading of all locale files shipped with Omorphia package by
globbing and registering them during the `vintl:extendOptions` hook.
Also updated VIntl for Nuxt to ensure those files are properly loaded.
Previous version of VIntl for Nuxt had a somewhat broken module ID
tracking, preventing Omorphia locale files to be properly transformed
during the build; at least on systems like Windows, don't know about
*nix. The tracking approach was replaced in 1.8.0, and it seems to be
working now.
Currently Omorphia's index file has both the default and named exports.
While this is totally supported by native ESM, it's pretty hard for
transpilers to process and may lead to situations where named exports
cannot be imported directly, requiring destructuring on the default
import. For this and just consistency reasons, you'd usually avoid
mixing default and named exports.
This commit removes the default export, making it just an another named
export called `plugin`.
BREAKING CHANGE: plugin is now exported using `plugin` export, rather
than the default export.
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.
* Add initial language picker prototype
* Heap o' improvements and Pirate tongue
* Move .visually-hidden to shared utils and add copyright notice
* Add a little space before categories names
* Simplify search to input focus logic
* Remove larger font size and padding from the search field
* Some refactors
* Braw's descent into madness
Thanks web development!
In seriousness though, tried to make the list more accessible. Making it
fully accessible feels like unbearable task, so at least that.
* Litol refactoring
* Extract new strings and remove old ones
* Update @vintl/nuxt to 1.3.0
This fixes the bug where default locale won't be saved.
* A buncha refactorings and cleanup
* Scuttle the Pirate lingo
'Twas employed 'ere for testin' purposes, but fear not, for it shall be
returnin' in the days to come. Should ye require it fer testin', simply
roll back this here commit.
* Clean languages source file
* Change "US" to "United States"
I think it would make distinguishing two languages simpler as now
there's more than one letter of difference (US/UK vs United States/
United Kingdom).
Detecting that ad has failed to load with timeout is not accurate and
won't work on slow connections. This commit fixes that by changing
detection to use 'onerror' event on <script> tag instead, which will be
triggered if ad script fails to load due to blocking.
- Now styled as a proper link.
- Change :focus to :focus-visible to avoid link getting stuck in that
'hovered' state because focus does not actually change (it deffo
should though, something to fix in the future - should be one
fragment change).
- Removed all padding and transition.