feat: docker compose maybe

This commit is contained in:
2023-11-13 16:10:04 -05:00
parent 180b261e40
commit b625ccd8d6
8031 changed files with 2182966 additions and 0 deletions

View File

@ -0,0 +1,7 @@
/// <reference types="svelte" />
/**
* Indicates that the user has enabled reduced motion on their device.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
*/
export declare const prefersReducedMotionStore: import("svelte/store").Readable<boolean>;

View File

@ -0,0 +1,26 @@
import { readable } from 'svelte/store';
import { BROWSER } from 'esm-env';
/** Prefers reduced motion */
const reducedMotionQuery = '(prefers-reduced-motion: reduce)';
function prefersReducedMotion() {
if (!BROWSER)
return false;
return window.matchMedia(reducedMotionQuery).matches;
}
/**
* Indicates that the user has enabled reduced motion on their device.
*
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
*/
export const prefersReducedMotionStore = readable(prefersReducedMotion(), (set) => {
if (BROWSER) {
const setReducedMotion = (event) => {
set(event.matches);
};
const mediaQueryList = window.matchMedia(reducedMotionQuery);
mediaQueryList.addEventListener('change', setReducedMotion);
return () => {
mediaQueryList.removeEventListener('change', setReducedMotion);
};
}
});