From eae5d24d9e79e59a19d4721caaeaa0ca650ecb33 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 1 Mar 2026 16:20:51 -0800 Subject: chore(biome): drop formatter style overrides --- src/lib/Notification/Notification.svelte | 12 +++---- src/lib/Notification/NotificationsProvider.svelte | 6 ++-- src/lib/Notification/options.ts | 36 +++++++++++---------- src/lib/Notification/store.ts | 38 +++++++++++------------ 4 files changed, 47 insertions(+), 45 deletions(-) (limited to 'src/lib/Notification') diff --git a/src/lib/Notification/Notification.svelte b/src/lib/Notification/Notification.svelte index 4e6fd2e7..76775ff3 100644 --- a/src/lib/Notification/Notification.svelte +++ b/src/lib/Notification/Notification.svelte @@ -1,20 +1,20 @@ diff --git a/src/lib/Notification/NotificationsProvider.svelte b/src/lib/Notification/NotificationsProvider.svelte index 15e5f2b2..c346aceb 100644 --- a/src/lib/Notification/NotificationsProvider.svelte +++ b/src/lib/Notification/NotificationsProvider.svelte @@ -1,11 +1,11 @@ diff --git a/src/lib/Notification/options.ts b/src/lib/Notification/options.ts index be972a7e..28eeecb3 100644 --- a/src/lib/Notification/options.ts +++ b/src/lib/Notification/options.ts @@ -1,24 +1,26 @@ -type Position = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; +type Position = "top-right" | "top-left" | "bottom-right" | "bottom-left"; export interface Options { - heading: string; - description?: string; - position: Position; - duration: number; - id: string; + heading: string; + description?: string; + position: Position; + duration: number; + id: string; } export const options = (preferences: { - heading: string; - description?: string; - position?: string; - duration?: number; + heading: string; + description?: string; + position?: string; + duration?: number; }): Options => { - return { - position: (preferences.position || 'top-right') as Position, - duration: preferences.duration || 3000, - heading: preferences.heading, - description: preferences.description, - id: Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15) - }; + return { + position: (preferences.position || "top-right") as Position, + duration: preferences.duration || 3000, + heading: preferences.heading, + description: preferences.description, + id: + Math.random().toString(36).substring(2, 15) + + Math.random().toString(36).substring(2, 15), + }; }; diff --git a/src/lib/Notification/store.ts b/src/lib/Notification/store.ts index 0cb4cf96..4eb163f9 100644 --- a/src/lib/Notification/store.ts +++ b/src/lib/Notification/store.ts @@ -1,32 +1,32 @@ -import { writable } from 'svelte/store'; +import { writable } from "svelte/store"; export interface Notification { - id: string; - heading: string; - description?: string; - duration?: number; + id: string; + heading: string; + description?: string; + duration?: number; } function createNotificationStore() { - const { subscribe, update } = writable([]); + const { subscribe, update } = writable([]); - return { - subscribe, - add: (notification: Omit) => { - const id = crypto.randomUUID(); + return { + subscribe, + add: (notification: Omit) => { + const id = crypto.randomUUID(); - update((notifications) => [...notifications, { ...notification, id }]); + update((notifications) => [...notifications, { ...notification, id }]); - return id; - }, - remove: (id: string) => { - update((notifications) => notifications.filter((n) => n.id !== id)); - } - }; + return id; + }, + remove: (id: string) => { + update((notifications) => notifications.filter((n) => n.id !== id)); + }, + }; } export const notifications = createNotificationStore(); -export function addNotification(notification: Omit) { - return notifications.add(notification); +export function addNotification(notification: Omit) { + return notifications.add(notification); } -- cgit v1.2.3