Trying to fix prop updates reflected in widgets

This commit is contained in:
space-nuko
2023-05-03 20:16:45 -07:00
parent 573970eac6
commit 3d55badda8
7 changed files with 106 additions and 32 deletions

View File

@@ -6,6 +6,10 @@ import { get } from "svelte/store"
import layoutState from "$lib/stores/layoutState"
import type { SvelteComponentDev } from "svelte/internal";
export function clamp(n: number, min: number, max: number): number {
return Math.min(Math.max(n, min), max)
}
export function download(filename: string, text: string, type: string = "text/plain") {
const blob = new Blob([text], { type: type });
const url = URL.createObjectURL(blob);