From 201a4efb26153e90c8307cda850e9eb98f773bcd Mon Sep 17 00:00:00 2001 From: dev Date: Fri, 15 May 2026 04:50:22 +0200 Subject: [PATCH] Remove stale Soma service types --- src/uix/soma/types/index.ts | 20 ---------- src/uix/soma/types/services.ts | 71 ---------------------------------- 2 files changed, 91 deletions(-) delete mode 100644 src/uix/soma/types/services.ts diff --git a/src/uix/soma/types/index.ts b/src/uix/soma/types/index.ts index ccfcf608b..eda83d1d0 100644 --- a/src/uix/soma/types/index.ts +++ b/src/uix/soma/types/index.ts @@ -22,26 +22,6 @@ export type { export { isFunction, isNull, isNotNull, isNumberString } from './guards'; -export type { - SomaTranslator, - SomaTranslationModule, - SomaTranslationValue, - SomaTranslationFallback, - SomaTranslationDescriptor, - SomaTranslationParams, - SomaLogger, - SomaFormatter, - SomaNumberFormatter, - SomaCurrencyFormatter, - SomaUnitFormatter, - SomaDateTimeFormatter, - SomaPrefsConfig, - SomaProps, - SomaPropsWithoutChildren, - DateOrder, - HourCycle -} from './services'; - export type { Side, Align, Boundary } from '$soma/layers/floating'; export type { diff --git a/src/uix/soma/types/services.ts b/src/uix/soma/types/services.ts deleted file mode 100644 index 42030e67a..000000000 --- a/src/uix/soma/types/services.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { Direction } from './component'; - -// ── Translator ─────────────────────────────────────────────────────────────── - -export type SomaTranslationModule = unknown; -export type SomaTranslationParams = Record; -export type SomaTranslationFallback = string | Record; -export type SomaTranslationDescriptor = { - path: string; - fallback?: SomaTranslationFallback; - params?: SomaTranslationParams; -}; -export type SomaTranslationValue = SomaTranslationFallback | SomaTranslationDescriptor; - -export interface SomaTranslator { - getLocale(): string; - translate(value: SomaTranslationValue): string; - translatePath(path: string, ...args: unknown[]): string; - extend?: (...args: any[]) => void; -} - -// ── Logger ─────────────────────────────────────────────────────────────────── - -export interface SomaLogger { - debug(message: string, context?: Record): void; - info(message: string, context?: Record): void; - warn(message: string, context?: Record): void; - error(message: string, context?: Record): void; -} - -// ── Formatter ──────────────────────────────────────────────────────────────── - -export type SomaFormatter = { - format: (...args: unknown[]) => string; -}; - -export type SomaNumberFormatter = SomaFormatter; -export type SomaCurrencyFormatter = SomaFormatter; -export type SomaUnitFormatter = SomaFormatter; - -// ── DateTimeFormatter ──────────────────────────────────────────────────────── - -export type { DateOrder, HourCycle } from '$soma/external/dates'; - -export interface SomaDateTimeFormatter { - getDateOrder(): import('$soma/external/dates').DateOrder | undefined; - getHourCycle(): import('$soma/external/dates').HourCycle | undefined; -} - -// ── Prefs ──────────────────────────────────────────────────────────────────── - -export interface SomaPrefsConfig { - dir?: Direction; - dateTimeFormatter?: SomaDateTimeFormatter; - numberFormatter?: SomaNumberFormatter; - currencyFormatter?: SomaCurrencyFormatter; - unitFormatter?: SomaUnitFormatter; -} - -// ── Soma props ─────────────────────────────────────────────────────────────── - -export interface SomaPropsWithoutChildren { - portalTo?: string | HTMLElement; - translator?: SomaTranslator; - prefs?: SomaPrefsConfig; - logger?: SomaLogger; -} - -export interface SomaProps extends SomaPropsWithoutChildren { - children?: import('svelte').Snippet; -}